diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ea7cc9035abc..7f4a4ac0b76c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -753,6 +753,12 @@ # ServiceLabel: %Notification Hub # ServiceOwners: @tjsomasundaram +# PRLabel: %Online Experimentation +/sdk/onlineexperimentation/ @Azure/azure-sdk-write-onlineexperimentation + +# ServiceLabel: %Online Experimentation +# ServiceOwners: @Azure/azure-sdk-write-onlineexperimentation + # PRLabel: %OpenAI /sdk/openai/ @jpalvarezl @trrwilson @joseharriaga @m-nash @ralph-msft @@ -1050,10 +1056,13 @@ # ServiceOwners: @alluri02 # PRLabel: %Network - CDN -/sdk/cdn/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 +/sdk/cdn/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 @Ptnan7 # PRLabel: %Network - Front Door -/sdk/frontdoor/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 +/sdk/frontdoor/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 @Ptnan7 + +# ServiceLabel: %Network - Front Door %Mgmt +# ServiceOwners: @Ptnan7 # PRLabel: %Network - Mobile /sdk/mobilenetwork/Azure.ResourceManager.*/ @ArcturusZhang @ArthurMa1978 @@ -1082,6 +1091,12 @@ # ServiceLabel: %Pinecone %Mgmt # ServiceOwners: @aggarwalsw +# PRLabel: %PureStorage +/sdk/purestorageblock/Azure.ResourceManager.*/ @deepakmauryams + +# ServiceLabel: %PureStorage %Mgmt +# ServiceOwners: @deepakmauryams + # PRLabel: %Quota /sdk/quota/Azure.ResourceManager.*/ @tejasm-microsoft @@ -1100,8 +1115,8 @@ # ServiceLabel: %Recovery Services Data-Replication %Mgmt # ServiceOwners: @helen-afework -# (Remove this when uncommenting path) PRLabel: %Secret Store Extension -#/sdk/edgeworkloadsecurity/Azure.ResourceManager.*/ @cjoprey @locomotiveviaduct +# PRLabel: %Secret Store Extension +/sdk/secretsstoreextension/Azure.ResourceManager.*/ @cjoprey @locomotiveviaduct # ServiceLabel: %Secret Store Extension %Mgmt # ServiceOwners: @cjoprey @locomotiveviaduct diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 193a39b1a633..8a66b878399f 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -197,7 +197,15 @@ { "filename": "**/sdk/ai/**/*.cs", "words": [ - "Ubinary" + "Ubinary", + "Ansii", + "Atbash", + "Bleu", + "azureai", + "bleu", + "azureai", + "Gleu", + "gleu" ] }, { diff --git a/doc/GeneratorMigration/Library_Inventory.md b/doc/GeneratorMigration/Library_Inventory.md new file mode 100644 index 000000000000..2ff5592b3878 --- /dev/null +++ b/doc/GeneratorMigration/Library_Inventory.md @@ -0,0 +1,451 @@ +# Azure SDK for .NET Libraries Inventory + +## Summary + +- Total libraries: 391 +- Management Plane (Swagger): 177 +- Management Plane (TSP-Old): 29 +- Management Plane (TypeSpec - @azure-typespec/http-client-csharp): 0 +- Data Plane (Swagger): 114 +- Data Plane (TSP-Old): 32 +- Data Plane (TypeSpec - @azure-typespec/http-client-csharp): 2 +- No generator: 37 + + +## 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: 2 + +| Service | Library | Path | +| ------- | ------- | ---- | +| eventgrid | Azure.Messaging.EventGrid.Namespaces | sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces | +| openai | Azure.AI.OpenAI | sdk/openai/Azure.AI.OpenAI | + + +## Data 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: 32 + +| Service | Library | Path | +| ------- | ------- | ---- | +| ai | Azure.AI.Agents.Persistent | sdk/ai/Azure.AI.Agents.Persistent | +| ai | Azure.AI.Inference | sdk/ai/Azure.AI.Inference | +| ai | Azure.AI.Projects | sdk/ai/Azure.AI.Projects | +| anomalydetector | Azure.AI.AnomalyDetector | sdk/anomalydetector/Azure.AI.AnomalyDetector | +| batch | Azure.Compute.Batch | sdk/batch/Azure.Compute.Batch | +| cognitivelanguage | Azure.AI.Language.Conversations | sdk/cognitivelanguage/Azure.AI.Language.Conversations | +| cognitivelanguage | Azure.AI.Language.Conversations.Authoring | sdk/cognitivelanguage/Azure.AI.Language.Conversations.Authoring | +| cognitivelanguage | Azure.AI.Language.Text | sdk/cognitivelanguage/Azure.AI.Language.Text | +| cognitivelanguage | Azure.AI.Language.Text.Authoring | sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring | +| communication | Azure.Communication.JobRouter | sdk/communication/Azure.Communication.JobRouter | +| communication | Azure.Communication.Messages | sdk/communication/Azure.Communication.Messages | +| communication | Azure.Communication.ProgrammableConnectivity | sdk/communication/Azure.Communication.ProgrammableConnectivity | +| confidentialledger | Azure.Security.CodeTransparency | sdk/confidentialledger/Azure.Security.CodeTransparency | +| contentsafety | Azure.AI.ContentSafety | sdk/contentsafety/Azure.AI.ContentSafety | +| devcenter | Azure.Developer.DevCenter | sdk/devcenter/Azure.Developer.DevCenter | +| documentintelligence | Azure.AI.DocumentIntelligence | sdk/documentintelligence/Azure.AI.DocumentIntelligence | +| easm | Azure.Analytics.Defender.Easm | sdk/easm/Azure.Analytics.Defender.Easm | +| eventgrid | Azure.Messaging.EventGrid.SystemEvents | sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents | +| face | Azure.AI.Vision.Face | sdk/face/Azure.AI.Vision.Face | +| healthdataaiservices | Azure.Health.Deidentification | sdk/healthdataaiservices/Azure.Health.Deidentification | +| healthinsights | Azure.Health.Insights.CancerProfiling | sdk/healthinsights/Azure.Health.Insights.CancerProfiling | +| healthinsights | Azure.Health.Insights.ClinicalMatching | sdk/healthinsights/Azure.Health.Insights.ClinicalMatching | +| healthinsights | Azure.Health.Insights.RadiologyInsights | sdk/healthinsights/Azure.Health.Insights.RadiologyInsights | +| keyvault | Azure.Security.KeyVault.Administration | sdk/keyvault/Azure.Security.KeyVault.Administration | +| loadtestservice | Azure.Developer.LoadTesting | sdk/loadtestservice/Azure.Developer.LoadTesting | +| onlineexperimentation | Azure.Analytics.OnlineExperimentation | sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation | +| openai | Azure.AI.OpenAI.Assistants | sdk/openai/Azure.AI.OpenAI.Assistants | +| purview | Azure.Analytics.Purview.DataMap | sdk/purview/Azure.Analytics.Purview.DataMap | +| schemaregistry | Azure.Data.SchemaRegistry | sdk/schemaregistry/Azure.Data.SchemaRegistry | +| translation | Azure.AI.Translation.Document | sdk/translation/Azure.AI.Translation.Document | +| translation | Azure.AI.Translation.Text | sdk/translation/Azure.AI.Translation.Text | +| vision | Azure.AI.Vision.ImageAnalysis | sdk/vision/Azure.AI.Vision.ImageAnalysis | + + +## Data Plane Libraries using Swagger + +Total: 114 + +| Service | Library | Path | +| ------- | ------- | ---- | +| agrifood | Azure.Verticals.AgriFood.Farming | sdk/agrifood/Azure.Verticals.AgriFood.Farming | +| appconfiguration | Azure.Data.AppConfiguration | sdk/appconfiguration/Azure.Data.AppConfiguration | +| attestation | Azure.Security.Attestation | sdk/attestation/Azure.Security.Attestation | +| cognitivelanguage | Azure.AI.Language.QuestionAnswering | sdk/cognitivelanguage/Azure.AI.Language.QuestionAnswering | +| cognitiveservices | AnomalyDetector | sdk/cognitiveservices/AnomalyDetector | +| cognitiveservices | FormRecognizer | sdk/cognitiveservices/FormRecognizer | +| cognitiveservices | Knowledge.QnAMaker | sdk/cognitiveservices/Knowledge.QnAMaker | +| cognitiveservices | Language.LUIS.Authoring | sdk/cognitiveservices/Language.LUIS.Authoring | +| cognitiveservices | Language.LUIS.Runtime | sdk/cognitiveservices/Language.LUIS.Runtime | +| cognitiveservices | Language.SpellCheck | sdk/cognitiveservices/Language.SpellCheck | +| cognitiveservices | Language.TextAnalytics | sdk/cognitiveservices/Language.TextAnalytics | +| cognitiveservices | Personalizer | sdk/cognitiveservices/Personalizer | +| cognitiveservices | Search.BingAutoSuggest | sdk/cognitiveservices/Search.BingAutoSuggest | +| cognitiveservices | Search.BingCustomImageSearch | sdk/cognitiveservices/Search.BingCustomImageSearch | +| cognitiveservices | Search.BingCustomSearch | sdk/cognitiveservices/Search.BingCustomSearch | +| cognitiveservices | Search.BingEntitySearch | sdk/cognitiveservices/Search.BingEntitySearch | +| cognitiveservices | Search.BingImageSearch | sdk/cognitiveservices/Search.BingImageSearch | +| cognitiveservices | Search.BingLocalSearch | sdk/cognitiveservices/Search.BingLocalSearch | +| cognitiveservices | Search.BingNewsSearch | sdk/cognitiveservices/Search.BingNewsSearch | +| cognitiveservices | Search.BingVideoSearch | sdk/cognitiveservices/Search.BingVideoSearch | +| cognitiveservices | Search.BingVisualSearch | sdk/cognitiveservices/Search.BingVisualSearch | +| cognitiveservices | Search.BingWebSearch | sdk/cognitiveservices/Search.BingWebSearch | +| cognitiveservices | Vision.ComputerVision | sdk/cognitiveservices/Vision.ComputerVision | +| cognitiveservices | Vision.ContentModerator | sdk/cognitiveservices/Vision.ContentModerator | +| cognitiveservices | Vision.CustomVision.Prediction | sdk/cognitiveservices/Vision.CustomVision.Prediction | +| cognitiveservices | Vision.CustomVision.Training | sdk/cognitiveservices/Vision.CustomVision.Training | +| cognitiveservices | Vision.Face | sdk/cognitiveservices/Vision.Face | +| communication | Azure.Communication.AlphaIds | sdk/communication/Azure.Communication.AlphaIds | +| communication | Azure.Communication.CallAutomation | sdk/communication/Azure.Communication.CallAutomation | +| communication | Azure.Communication.CallingServer | sdk/communication/Azure.Communication.CallingServer | +| communication | Azure.Communication.Chat | sdk/communication/Azure.Communication.Chat | +| communication | Azure.Communication.Email | sdk/communication/Azure.Communication.Email | +| communication | Azure.Communication.Identity | sdk/communication/Azure.Communication.Identity | +| communication | Azure.Communication.PhoneNumbers | sdk/communication/Azure.Communication.PhoneNumbers | +| communication | Azure.Communication.Rooms | sdk/communication/Azure.Communication.Rooms | +| communication | Azure.Communication.ShortCodes | sdk/communication/Azure.Communication.ShortCodes | +| communication | Azure.Communication.Sms | sdk/communication/Azure.Communication.Sms | +| confidentialledger | Azure.Security.ConfidentialLedger | sdk/confidentialledger/Azure.Security.ConfidentialLedger | +| containerregistry | Azure.Containers.ContainerRegistry | sdk/containerregistry/Azure.Containers.ContainerRegistry | +| core | Azure.Core.Expressions.DataFactory | sdk/core/Azure.Core.Expressions.DataFactory | +| core | Azure.Core.TestFramework | sdk/core/Azure.Core.TestFramework | +| deviceupdate | Azure.IoT.DeviceUpdate | sdk/deviceupdate/Azure.IoT.DeviceUpdate | +| digitaltwins | Azure.DigitalTwins.Core | sdk/digitaltwins/Azure.DigitalTwins.Core | +| eventgrid | Azure.Messaging.EventGrid | sdk/eventgrid/Azure.Messaging.EventGrid | +| formrecognizer | Azure.AI.FormRecognizer | sdk/formrecognizer/Azure.AI.FormRecognizer | +| iot | Azure.IoT.Hub.Service | sdk/iot/Azure.IoT.Hub.Service | +| maps | Azure.Maps.Common | sdk/maps/Azure.Maps.Common | +| maps | Azure.Maps.Geolocation | sdk/maps/Azure.Maps.Geolocation | +| maps | Azure.Maps.Rendering | sdk/maps/Azure.Maps.Rendering | +| maps | Azure.Maps.Routing | sdk/maps/Azure.Maps.Routing | +| maps | Azure.Maps.Search | sdk/maps/Azure.Maps.Search | +| maps | Azure.Maps.TimeZones | sdk/maps/Azure.Maps.TimeZones | +| maps | Azure.Maps.Weather | sdk/maps/Azure.Maps.Weather | +| metricsadvisor | Azure.AI.MetricsAdvisor | sdk/metricsadvisor/Azure.AI.MetricsAdvisor | +| mixedreality | Azure.MixedReality.Authentication | sdk/mixedreality/Azure.MixedReality.Authentication | +| monitor | Azure.Monitor.Ingestion | sdk/monitor/Azure.Monitor.Ingestion | +| monitor | Azure.Monitor.OpenTelemetry.Exporter | sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter | +| monitor | Azure.Monitor.OpenTelemetry.LiveMetrics | sdk/monitor/Azure.Monitor.OpenTelemetry.LiveMetrics | +| 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 | +| provisioning | Azure.Provisioning.AppService | sdk/provisioning/Azure.Provisioning.AppService | +| provisioning | Azure.Provisioning.ApplicationInsights | sdk/provisioning/Azure.Provisioning.ApplicationInsights | +| provisioning | Azure.Provisioning.CognitiveServices | sdk/provisioning/Azure.Provisioning.CognitiveServices | +| provisioning | Azure.Provisioning.Communication | sdk/provisioning/Azure.Provisioning.Communication | +| provisioning | Azure.Provisioning.ContainerRegistry | sdk/provisioning/Azure.Provisioning.ContainerRegistry | +| provisioning | Azure.Provisioning.ContainerService | sdk/provisioning/Azure.Provisioning.ContainerService | +| provisioning | Azure.Provisioning.CosmosDB | sdk/provisioning/Azure.Provisioning.CosmosDB | +| provisioning | Azure.Provisioning.EventGrid | sdk/provisioning/Azure.Provisioning.EventGrid | +| provisioning | Azure.Provisioning.EventHubs | sdk/provisioning/Azure.Provisioning.EventHubs | +| 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.OperationalInsights | sdk/provisioning/Azure.Provisioning.OperationalInsights | +| provisioning | Azure.Provisioning.PostgreSql | sdk/provisioning/Azure.Provisioning.PostgreSql | +| provisioning | Azure.Provisioning.Redis | sdk/provisioning/Azure.Provisioning.Redis | +| provisioning | Azure.Provisioning.Search | sdk/provisioning/Azure.Provisioning.Search | +| provisioning | Azure.Provisioning.ServiceBus | sdk/provisioning/Azure.Provisioning.ServiceBus | +| provisioning | Azure.Provisioning.SignalR | sdk/provisioning/Azure.Provisioning.SignalR | +| provisioning | Azure.Provisioning.Sql | sdk/provisioning/Azure.Provisioning.Sql | +| provisioning | Azure.Provisioning.Storage | sdk/provisioning/Azure.Provisioning.Storage | +| provisioning | Azure.Provisioning.WebPubSub | sdk/provisioning/Azure.Provisioning.WebPubSub | +| purview | Azure.Analytics.Purview.Account | sdk/purview/Azure.Analytics.Purview.Account | +| purview | Azure.Analytics.Purview.Administration | sdk/purview/Azure.Analytics.Purview.Administration | +| purview | Azure.Analytics.Purview.Catalog | sdk/purview/Azure.Analytics.Purview.Catalog | +| purview | Azure.Analytics.Purview.Scanning | sdk/purview/Azure.Analytics.Purview.Scanning | +| purview | Azure.Analytics.Purview.Sharing | sdk/purview/Azure.Analytics.Purview.Sharing | +| purview | Azure.Analytics.Purview.Workflows | sdk/purview/Azure.Analytics.Purview.Workflows | +| quantum | Azure.Quantum.Jobs | sdk/quantum/Azure.Quantum.Jobs | +| remoterendering | Azure.MixedReality.RemoteRendering | sdk/remoterendering/Azure.MixedReality.RemoteRendering | +| search | Azure.Search.Documents | sdk/search/Azure.Search.Documents | +| storage | Azure.Storage.Blobs | sdk/storage/Azure.Storage.Blobs | +| storage | Azure.Storage.Blobs.Batch | sdk/storage/Azure.Storage.Blobs.Batch | +| storage | Azure.Storage.Common | sdk/storage/Azure.Storage.Common | +| storage | Azure.Storage.Files.DataLake | sdk/storage/Azure.Storage.Files.DataLake | +| storage | Azure.Storage.Files.Shares | sdk/storage/Azure.Storage.Files.Shares | +| storage | Azure.Storage.Queues | sdk/storage/Azure.Storage.Queues | +| synapse | Azure.Analytics.Synapse.AccessControl | sdk/synapse/Azure.Analytics.Synapse.AccessControl | +| synapse | Azure.Analytics.Synapse.Artifacts | sdk/synapse/Azure.Analytics.Synapse.Artifacts | +| synapse | Azure.Analytics.Synapse.ManagedPrivateEndpoints | sdk/synapse/Azure.Analytics.Synapse.ManagedPrivateEndpoints | +| synapse | Azure.Analytics.Synapse.Monitoring | sdk/synapse/Azure.Analytics.Synapse.Monitoring | +| synapse | Azure.Analytics.Synapse.Spark | sdk/synapse/Azure.Analytics.Synapse.Spark | +| tables | Azure.Data.Tables | sdk/tables/Azure.Data.Tables | +| template | .content | sdk/template/.content | +| template | Azure.Template | sdk/template/Azure.Template | +| textanalytics | Azure.AI.TextAnalytics | sdk/textanalytics/Azure.AI.TextAnalytics | +| textanalytics | Azure.AI.TextAnalytics.Legacy.Shared | sdk/textanalytics/Azure.AI.TextAnalytics.Legacy.Shared | +| timeseriesinsights | Azure.IoT.TimeSeriesInsights | sdk/timeseriesinsights/Azure.IoT.TimeSeriesInsights | +| videoanalyzer | Azure.Media.VideoAnalyzer.Edge | sdk/videoanalyzer/Azure.Media.VideoAnalyzer.Edge | +| webpubsub | Azure.Messaging.WebPubSub | sdk/webpubsub/Azure.Messaging.WebPubSub | + + +## 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: 29 + +| Service | Library | Path | +| ------- | ------- | ---- | +| agricultureplatform | Azure.ResourceManager.AgriculturePlatform | sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform | +| arizeaiobservabilityeval | Azure.ResourceManager.ArizeAIObservabilityEval | sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval | +| carbon | Azure.ResourceManager.CarbonOptimization | sdk/carbon/Azure.ResourceManager.CarbonOptimization | +| chaos | Azure.ResourceManager.Chaos | sdk/chaos/Azure.ResourceManager.Chaos | +| computefleet | Azure.ResourceManager.ComputeFleet | sdk/computefleet/Azure.ResourceManager.ComputeFleet | +| computeschedule | Azure.ResourceManager.ComputeSchedule | sdk/computeschedule/Azure.ResourceManager.ComputeSchedule | +| containerorchestratorruntime | Azure.ResourceManager.ContainerOrchestratorRuntime | sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime | +| databasewatcher | Azure.ResourceManager.DatabaseWatcher | sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher | +| dependencymap | Azure.ResourceManager.DependencyMap | sdk/dependencymap/Azure.ResourceManager.DependencyMap | +| deviceregistry | Azure.ResourceManager.DeviceRegistry | sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry | +| devopsinfrastructure | Azure.ResourceManager.DevOpsInfrastructure | sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure | +| durabletask | Azure.ResourceManager.DurableTask | sdk/durabletask/Azure.ResourceManager.DurableTask | +| fabric | Azure.ResourceManager.Fabric | sdk/fabric/Azure.ResourceManager.Fabric | +| healthdataaiservices | Azure.ResourceManager.HealthDataAIServices | sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices | +| hybridconnectivity | Azure.ResourceManager.HybridConnectivity | sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity | +| informaticadatamanagement | Azure.ResourceManager.InformaticaDataManagement | sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement | +| iotoperations | Azure.ResourceManager.IotOperations | sdk/iotoperations/Azure.ResourceManager.IotOperations | +| lambdatesthyperexecute | Azure.ResourceManager.LambdaTestHyperExecute | sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute | +| mongocluster | Azure.ResourceManager.MongoCluster | sdk/mongocluster/Azure.ResourceManager.MongoCluster | +| neonpostgres | Azure.ResourceManager.NeonPostgres | sdk/neonpostgres/Azure.ResourceManager.NeonPostgres | +| pineconevectordb | Azure.ResourceManager.PineconeVectorDB | sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB | +| playwrighttesting | Azure.ResourceManager.PlaywrightTesting | sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting | +| portalservices | Azure.ResourceManager.PortalServicesCopilot | sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot | +| recoveryservices-datareplication | Azure.ResourceManager.RecoveryServicesDataReplication | sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication | +| servicenetworking | Azure.ResourceManager.ServiceNetworking | sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking | +| standbypool | Azure.ResourceManager.StandbyPool | sdk/standbypool/Azure.ResourceManager.StandbyPool | +| terraform | Azure.ResourceManager.Terraform | sdk/terraform/Azure.ResourceManager.Terraform | +| weightsandbiases | Azure.ResourceManager.WeightsAndBiases | sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases | +| workloadssapvirtualinstance | Azure.ResourceManager.WorkloadsSapVirtualInstance | sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance | + + +## Management Plane Libraries using Swagger + +Total: 177 + +| Service | Library | Path | +| ------- | ------- | ---- | +| advisor | Azure.ResourceManager.Advisor | sdk/advisor/Azure.ResourceManager.Advisor | +| agrifood | Azure.ResourceManager.AgFoodPlatform | sdk/agrifood/Azure.ResourceManager.AgFoodPlatform | +| alertsmanagement | Azure.ResourceManager.AlertsManagement | sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement | +| analysisservices | Azure.ResourceManager.Analysis | sdk/analysisservices/Azure.ResourceManager.Analysis | +| apicenter | Azure.ResourceManager.ApiCenter | sdk/apicenter/Azure.ResourceManager.ApiCenter | +| apimanagement | Azure.ResourceManager.ApiManagement | sdk/apimanagement/Azure.ResourceManager.ApiManagement | +| appcomplianceautomation | Azure.ResourceManager.AppComplianceAutomation | sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation | +| appconfiguration | Azure.ResourceManager.AppConfiguration | sdk/appconfiguration/Azure.ResourceManager.AppConfiguration | +| applicationinsights | Azure.ResourceManager.ApplicationInsights | sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights | +| appplatform | Azure.ResourceManager.AppPlatform | sdk/appplatform/Azure.ResourceManager.AppPlatform | +| arc-scvmm | Azure.ResourceManager.ScVmm | sdk/arc-scvmm/Azure.ResourceManager.ScVmm | +| astronomer | Azure.ResourceManager.Astro | sdk/astronomer/Azure.ResourceManager.Astro | +| attestation | Azure.ResourceManager.Attestation | sdk/attestation/Azure.ResourceManager.Attestation | +| authorization | Azure.ResourceManager.Authorization | sdk/authorization/Azure.ResourceManager.Authorization | +| automanage | Azure.ResourceManager.Automanage | sdk/automanage/Azure.ResourceManager.Automanage | +| automation | Azure.ResourceManager.Automation | sdk/automation/Azure.ResourceManager.Automation | +| avs | Azure.ResourceManager.Avs | sdk/avs/Azure.ResourceManager.Avs | +| azurelargeinstance | Azure.ResourceManager.LargeInstance | sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance | +| azurestackhci | Azure.ResourceManager.Hci | sdk/azurestackhci/Azure.ResourceManager.Hci | +| batch | Azure.ResourceManager.Batch | sdk/batch/Azure.ResourceManager.Batch | +| billing | Azure.ResourceManager.Billing | sdk/billing/Azure.ResourceManager.Billing | +| billingbenefits | Azure.ResourceManager.BillingBenefits | sdk/billingbenefits/Azure.ResourceManager.BillingBenefits | +| blueprint | Azure.ResourceManager.Blueprint | sdk/blueprint/Azure.ResourceManager.Blueprint | +| botservice | Azure.ResourceManager.BotService | sdk/botservice/Azure.ResourceManager.BotService | +| cdn | Azure.ResourceManager.Cdn | sdk/cdn/Azure.ResourceManager.Cdn | +| changeanalysis | Azure.ResourceManager.ChangeAnalysis | sdk/changeanalysis/Azure.ResourceManager.ChangeAnalysis | +| cognitiveservices | Azure.ResourceManager.CognitiveServices | sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices | +| communication | Azure.ResourceManager.Communication | sdk/communication/Azure.ResourceManager.Communication | +| compute | Azure.ResourceManager.Compute | sdk/compute/Azure.ResourceManager.Compute | +| confidentialledger | Azure.ResourceManager.ConfidentialLedger | sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger | +| confluent | Azure.ResourceManager.Confluent | sdk/confluent/Azure.ResourceManager.Confluent | +| connectedvmwarevsphere | Azure.ResourceManager.ConnectedVMwarevSphere | sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere | +| consumption | Azure.ResourceManager.Consumption | sdk/consumption/Azure.ResourceManager.Consumption | +| containerapps | Azure.ResourceManager.AppContainers | sdk/containerapps/Azure.ResourceManager.AppContainers | +| containerinstance | Azure.ResourceManager.ContainerInstance | sdk/containerinstance/Azure.ResourceManager.ContainerInstance | +| containerregistry | Azure.ResourceManager.ContainerRegistry | sdk/containerregistry/Azure.ResourceManager.ContainerRegistry | +| containerservice | Azure.ResourceManager.ContainerService | sdk/containerservice/Azure.ResourceManager.ContainerService | +| cosmosdb | Azure.ResourceManager.CosmosDB | sdk/cosmosdb/Azure.ResourceManager.CosmosDB | +| 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 | +| datalake-analytics | Azure.ResourceManager.DataLakeAnalytics | sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics | +| datalake-store | Azure.ResourceManager.DataLakeStore | sdk/datalake-store/Azure.ResourceManager.DataLakeStore | +| datamigration | Azure.ResourceManager.DataMigration | sdk/datamigration/Azure.ResourceManager.DataMigration | +| dataprotection | Azure.ResourceManager.DataProtectionBackup | sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup | +| datashare | Azure.ResourceManager.DataShare | sdk/datashare/Azure.ResourceManager.DataShare | +| defendereasm | Azure.ResourceManager.DefenderEasm | sdk/defendereasm/Azure.ResourceManager.DefenderEasm | +| desktopvirtualization | Azure.ResourceManager.DesktopVirtualization | sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization | +| devcenter | Azure.ResourceManager.DevCenter | sdk/devcenter/Azure.ResourceManager.DevCenter | +| deviceprovisioningservices | Azure.ResourceManager.DeviceProvisioningServices | sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices | +| deviceupdate | Azure.ResourceManager.DeviceUpdate | sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate | +| devspaces | Azure.ResourceManager.DevSpaces | sdk/devspaces/Azure.ResourceManager.DevSpaces | +| devtestlabs | Azure.ResourceManager.DevTestLabs | sdk/devtestlabs/Azure.ResourceManager.DevTestLabs | +| digitaltwins | Azure.ResourceManager.DigitalTwins | sdk/digitaltwins/Azure.ResourceManager.DigitalTwins | +| dns | Azure.ResourceManager.Dns | sdk/dns/Azure.ResourceManager.Dns | +| dnsresolver | Azure.ResourceManager.DnsResolver | sdk/dnsresolver/Azure.ResourceManager.DnsResolver | +| dynatrace | Azure.ResourceManager.Dynatrace | sdk/dynatrace/Azure.ResourceManager.Dynatrace | +| edgeorder | Azure.ResourceManager.EdgeOrder | sdk/edgeorder/Azure.ResourceManager.EdgeOrder | +| edgezones | Azure.ResourceManager.EdgeZones | sdk/edgezones/Azure.ResourceManager.EdgeZones | +| elastic | Azure.ResourceManager.Elastic | sdk/elastic/Azure.ResourceManager.Elastic | +| elasticsan | Azure.ResourceManager.ElasticSan | sdk/elasticsan/Azure.ResourceManager.ElasticSan | +| eventgrid | Azure.ResourceManager.EventGrid | sdk/eventgrid/Azure.ResourceManager.EventGrid | +| eventhub | Azure.ResourceManager.EventHubs | sdk/eventhub/Azure.ResourceManager.EventHubs | +| extendedlocation | Azure.ResourceManager.ExtendedLocations | sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations | +| fleet | Azure.ResourceManager.ContainerServiceFleet | sdk/fleet/Azure.ResourceManager.ContainerServiceFleet | +| fluidrelay | Azure.ResourceManager.FluidRelay | sdk/fluidrelay/Azure.ResourceManager.FluidRelay | +| frontdoor | Azure.ResourceManager.FrontDoor | sdk/frontdoor/Azure.ResourceManager.FrontDoor | +| grafana | Azure.ResourceManager.Grafana | sdk/grafana/Azure.ResourceManager.Grafana | +| graphservices | Azure.ResourceManager.GraphServices | sdk/graphservices/Azure.ResourceManager.GraphServices | +| guestconfiguration | Azure.ResourceManager.GuestConfiguration | sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration | +| hardwaresecuritymodules | Azure.ResourceManager.HardwareSecurityModules | sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules | +| hdinsight | Azure.ResourceManager.HDInsight | sdk/hdinsight/Azure.ResourceManager.HDInsight | +| hdinsightcontainers | Azure.ResourceManager.HDInsight.Containers | sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers | +| healthbot | Azure.ResourceManager.HealthBot | sdk/healthbot/Azure.ResourceManager.HealthBot | +| healthcareapis | Azure.ResourceManager.HealthcareApis | sdk/healthcareapis/Azure.ResourceManager.HealthcareApis | +| hybridaks | Azure.ResourceManager.HybridContainerService | sdk/hybridaks/Azure.ResourceManager.HybridContainerService | +| hybridcompute | Azure.ResourceManager.HybridCompute | sdk/hybridcompute/Azure.ResourceManager.HybridCompute | +| hybridkubernetes | Azure.ResourceManager.Kubernetes | sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes | +| hybridnetwork | Azure.ResourceManager.HybridNetwork | sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork | +| iot | Azure.ResourceManager.IotFirmwareDefense | sdk/iot/Azure.ResourceManager.IotFirmwareDefense | +| iotcentral | Azure.ResourceManager.IotCentral | sdk/iotcentral/Azure.ResourceManager.IotCentral | +| iothub | Azure.ResourceManager.IotHub | sdk/iothub/Azure.ResourceManager.IotHub | +| keyvault | Azure.ResourceManager.KeyVault | sdk/keyvault/Azure.ResourceManager.KeyVault | +| kubernetesconfiguration | Azure.ResourceManager.KubernetesConfiguration | sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration | +| kusto | Azure.ResourceManager.Kusto | sdk/kusto/Azure.ResourceManager.Kusto | +| labservices | Azure.ResourceManager.LabServices | sdk/labservices/Azure.ResourceManager.LabServices | +| loadtestservice | Azure.ResourceManager.LoadTesting | sdk/loadtestservice/Azure.ResourceManager.LoadTesting | +| logic | Azure.ResourceManager.Logic | sdk/logic/Azure.ResourceManager.Logic | +| machinelearningcompute | Azure.ResourceManager.MachineLearningCompute | sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute | +| machinelearningservices | Azure.ResourceManager.MachineLearning | sdk/machinelearningservices/Azure.ResourceManager.MachineLearning | +| maintenance | Azure.ResourceManager.Maintenance | sdk/maintenance/Azure.ResourceManager.Maintenance | +| managednetwork | Azure.ResourceManager.ManagedNetwork | sdk/managednetwork/Azure.ResourceManager.ManagedNetwork | +| managednetworkfabric | Azure.ResourceManager.ManagedNetworkFabric | sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric | +| managedserviceidentity | Azure.ResourceManager.ManagedServiceIdentities | sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities | +| managedservices | Azure.ResourceManager.ManagedServices | sdk/managedservices/Azure.ResourceManager.ManagedServices | +| managementpartner | Azure.ResourceManager.ManagementPartner | sdk/managementpartner/Azure.ResourceManager.ManagementPartner | +| maps | Azure.ResourceManager.Maps | sdk/maps/Azure.ResourceManager.Maps | +| marketplace | Azure.ResourceManager.Marketplace | sdk/marketplace/Azure.ResourceManager.Marketplace | +| marketplaceordering | Azure.ResourceManager.MarketplaceOrdering | sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering | +| mediaservices | Azure.ResourceManager.Media | sdk/mediaservices/Azure.ResourceManager.Media | +| migrationassessment | Azure.ResourceManager.Migration.Assessment | sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment | +| migrationdiscoverysap | Azure.ResourceManager.MigrationDiscoverySap | sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap | +| mixedreality | Azure.ResourceManager.MixedReality | sdk/mixedreality/Azure.ResourceManager.MixedReality | +| mobilenetwork | Azure.ResourceManager.MobileNetwork | sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork | +| monitor | Azure.ResourceManager.Monitor | sdk/monitor/Azure.ResourceManager.Monitor | +| mysql | Azure.ResourceManager.MySql | sdk/mysql/Azure.ResourceManager.MySql | +| netapp | Azure.ResourceManager.NetApp | sdk/netapp/Azure.ResourceManager.NetApp | +| network | Azure.ResourceManager.Network | sdk/network/Azure.ResourceManager.Network | +| networkanalytics | Azure.ResourceManager.NetworkAnalytics | sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics | +| networkcloud | Azure.ResourceManager.NetworkCloud | sdk/networkcloud/Azure.ResourceManager.NetworkCloud | +| networkfunction | Azure.ResourceManager.NetworkFunction | sdk/networkfunction/Azure.ResourceManager.NetworkFunction | +| newrelicobservability | Azure.ResourceManager.NewRelicObservability | sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability | +| nginx | Azure.ResourceManager.Nginx | sdk/nginx/Azure.ResourceManager.Nginx | +| notificationhubs | Azure.ResourceManager.NotificationHubs | sdk/notificationhubs/Azure.ResourceManager.NotificationHubs | +| openenergyplatform | Azure.ResourceManager.EnergyServices | sdk/openenergyplatform/Azure.ResourceManager.EnergyServices | +| operationalinsights | Azure.ResourceManager.OperationalInsights | sdk/operationalinsights/Azure.ResourceManager.OperationalInsights | +| oracle | Azure.ResourceManager.OracleDatabase | sdk/oracle/Azure.ResourceManager.OracleDatabase | +| orbital | Azure.ResourceManager.Orbital | sdk/orbital/Azure.ResourceManager.Orbital | +| paloaltonetworks.ngfw | Azure.ResourceManager.PaloAltoNetworks.Ngfw | sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw | +| peering | Azure.ResourceManager.Peering | sdk/peering/Azure.ResourceManager.Peering | +| policyinsights | Azure.ResourceManager.PolicyInsights | sdk/policyinsights/Azure.ResourceManager.PolicyInsights | +| postgresql | Azure.ResourceManager.PostgreSql | sdk/postgresql/Azure.ResourceManager.PostgreSql | +| powerbidedicated | Azure.ResourceManager.PowerBIDedicated | sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated | +| privatedns | Azure.ResourceManager.PrivateDns | sdk/privatedns/Azure.ResourceManager.PrivateDns | +| providerhub | Azure.ResourceManager.ProviderHub | sdk/providerhub/Azure.ResourceManager.ProviderHub | +| purview | Azure.ResourceManager.Purview | sdk/purview/Azure.ResourceManager.Purview | +| quantum | Azure.ResourceManager.Quantum | sdk/quantum/Azure.ResourceManager.Quantum | +| qumulo | Azure.ResourceManager.Qumulo | sdk/qumulo/Azure.ResourceManager.Qumulo | +| quota | Azure.ResourceManager.Quota | sdk/quota/Azure.ResourceManager.Quota | +| recoveryservices | Azure.ResourceManager.RecoveryServices | sdk/recoveryservices/Azure.ResourceManager.RecoveryServices | +| recoveryservices-backup | Azure.ResourceManager.RecoveryServicesBackup | sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup | +| recoveryservices-siterecovery | Azure.ResourceManager.RecoveryServicesSiteRecovery | sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery | +| redis | Azure.ResourceManager.Redis | sdk/redis/Azure.ResourceManager.Redis | +| redisenterprise | Azure.ResourceManager.RedisEnterprise | sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise | +| relay | Azure.ResourceManager.Relay | sdk/relay/Azure.ResourceManager.Relay | +| reservations | Azure.ResourceManager.Reservations | sdk/reservations/Azure.ResourceManager.Reservations | +| resourceconnector | Azure.ResourceManager.ResourceConnector | sdk/resourceconnector/Azure.ResourceManager.ResourceConnector | +| resourcegraph | Azure.ResourceManager.ResourceGraph | sdk/resourcegraph/Azure.ResourceManager.ResourceGraph | +| resourcehealth | Azure.ResourceManager.ResourceHealth | sdk/resourcehealth/Azure.ResourceManager.ResourceHealth | +| resourcemanager | Azure.ResourceManager | sdk/resourcemanager/Azure.ResourceManager | +| resourcemover | Azure.ResourceManager.ResourceMover | sdk/resourcemover/Azure.ResourceManager.ResourceMover | +| resources | Azure.ResourceManager.Resources | sdk/resources/Azure.ResourceManager.Resources | +| search | Azure.ResourceManager.Search | sdk/search/Azure.ResourceManager.Search | +| securitycenter | Azure.ResourceManager.SecurityCenter | sdk/securitycenter/Azure.ResourceManager.SecurityCenter | +| securitydevops | Azure.ResourceManager.SecurityDevOps | sdk/securitydevops/Azure.ResourceManager.SecurityDevOps | +| securityinsights | Azure.ResourceManager.SecurityInsights | sdk/securityinsights/Azure.ResourceManager.SecurityInsights | +| selfhelp | Azure.ResourceManager.SelfHelp | sdk/selfhelp/Azure.ResourceManager.SelfHelp | +| servicebus | Azure.ResourceManager.ServiceBus | sdk/servicebus/Azure.ResourceManager.ServiceBus | +| servicefabric | Azure.ResourceManager.ServiceFabric | sdk/servicefabric/Azure.ResourceManager.ServiceFabric | +| servicefabricmanagedclusters | Azure.ResourceManager.ServiceFabricManagedClusters | sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters | +| servicelinker | Azure.ResourceManager.ServiceLinker | sdk/servicelinker/Azure.ResourceManager.ServiceLinker | +| signalr | Azure.ResourceManager.SignalR | sdk/signalr/Azure.ResourceManager.SignalR | +| sphere | Azure.ResourceManager.Sphere | sdk/sphere/Azure.ResourceManager.Sphere | +| springappdiscovery | Azure.ResourceManager.SpringAppDiscovery | sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery | +| sqlmanagement | Azure.ResourceManager.Sql | sdk/sqlmanagement/Azure.ResourceManager.Sql | +| sqlvirtualmachine | Azure.ResourceManager.SqlVirtualMachine | sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine | +| storage | Azure.ResourceManager.Storage | sdk/storage/Azure.ResourceManager.Storage | +| storageactions | Azure.ResourceManager.StorageActions | sdk/storageactions/Azure.ResourceManager.StorageActions | +| storagecache | Azure.ResourceManager.StorageCache | sdk/storagecache/Azure.ResourceManager.StorageCache | +| storagemover | Azure.ResourceManager.StorageMover | sdk/storagemover/Azure.ResourceManager.StorageMover | +| storagepool | Azure.ResourceManager.StoragePool | sdk/storagepool/Azure.ResourceManager.StoragePool | +| storagesync | Azure.ResourceManager.StorageSync | sdk/storagesync/Azure.ResourceManager.StorageSync | +| streamanalytics | Azure.ResourceManager.StreamAnalytics | sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics | +| subscription | Azure.ResourceManager.Subscription | sdk/subscription/Azure.ResourceManager.Subscription | +| support | Azure.ResourceManager.Support | sdk/support/Azure.ResourceManager.Support | +| synapse | Azure.ResourceManager.Synapse | sdk/synapse/Azure.ResourceManager.Synapse | +| trafficmanager | Azure.ResourceManager.TrafficManager | sdk/trafficmanager/Azure.ResourceManager.TrafficManager | +| trustedsigning | Azure.ResourceManager.TrustedSigning | sdk/trustedsigning/Azure.ResourceManager.TrustedSigning | +| voiceservices | Azure.ResourceManager.VoiceServices | sdk/voiceservices/Azure.ResourceManager.VoiceServices | +| webpubsub | Azure.ResourceManager.WebPubSub | sdk/webpubsub/Azure.ResourceManager.WebPubSub | +| websites | Azure.ResourceManager.AppService | sdk/websites/Azure.ResourceManager.AppService | +| workloadmonitor | Azure.ResourceManager.WorkloadMonitor | sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor | +| workloads | Azure.ResourceManager.Workloads | sdk/workloads/Azure.ResourceManager.Workloads | + + +## Libraries with No Generator + +Libraries with no generator have neither autorest.md nor tsp-location.yaml files. Total: 37 + +| Service | Library | Path | +| ------- | ------- | ---- | +| cloudmachine | Azure.Projects | sdk/cloudmachine/Azure.Projects | +| cloudmachine | Azure.Projects.AI | sdk/cloudmachine/Azure.Projects.AI | +| cloudmachine | Azure.Projects.AI.Foundry | sdk/cloudmachine/Azure.Projects.AI.Foundry | +| cloudmachine | Azure.Projects.Provisioning | sdk/cloudmachine/Azure.Projects.Provisioning | +| cloudmachine | Azure.Projects.Tsp | sdk/cloudmachine/Azure.Projects.Tsp | +| cloudmachine | Azure.Projects.Web | sdk/cloudmachine/Azure.Projects.Web | +| communication | Azure.Communication.Common | sdk/communication/Azure.Communication.Common | +| communication | Shared | sdk/communication/Shared | +| core | Azure.Core | sdk/core/Azure.Core | +| core | Azure.Core.Amqp | sdk/core/Azure.Core.Amqp | +| core | Azure.Core.Experimental | sdk/core/Azure.Core.Experimental | +| core | System.ClientModel | sdk/core/System.ClientModel | +| eventhub | Azure.Messaging.EventHubs | sdk/eventhub/Azure.Messaging.EventHubs | +| eventhub | Azure.Messaging.EventHubs.Processor | sdk/eventhub/Azure.Messaging.EventHubs.Processor | +| eventhub | Azure.Messaging.EventHubs.Shared | sdk/eventhub/Azure.Messaging.EventHubs.Shared | +| extensions | Azure.Extensions.AspNetCore.Configuration.Secrets | sdk/extensions/Azure.Extensions.AspNetCore.Configuration.Secrets | +| extensions | Azure.Extensions.AspNetCore.DataProtection.Blobs | sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs | +| extensions | Azure.Extensions.AspNetCore.DataProtection.Keys | sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys | +| identity | Azure.Identity | sdk/identity/Azure.Identity | +| identity | Azure.Identity.Broker | sdk/identity/Azure.Identity.Broker | +| keyvault | Azure.Security.KeyVault.Certificates | sdk/keyvault/Azure.Security.KeyVault.Certificates | +| keyvault | Azure.Security.KeyVault.Keys | sdk/keyvault/Azure.Security.KeyVault.Keys | +| keyvault | Azure.Security.KeyVault.Secrets | sdk/keyvault/Azure.Security.KeyVault.Secrets | +| keyvault | Azure.Security.KeyVault.Shared | sdk/keyvault/Azure.Security.KeyVault.Shared | +| 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 | +| storage | Azure.Storage.Blobs.ChangeFeed | sdk/storage/Azure.Storage.Blobs.ChangeFeed | +| storage | Azure.Storage.DataMovement | sdk/storage/Azure.Storage.DataMovement | +| storage | Azure.Storage.DataMovement.Blobs | sdk/storage/Azure.Storage.DataMovement.Blobs | +| storage | Azure.Storage.DataMovement.Files.Shares | sdk/storage/Azure.Storage.DataMovement.Files.Shares | +| storage | Azure.Storage.Internal.Avro | sdk/storage/Azure.Storage.Internal.Avro | +| synapse | Azure.Analytics.Synapse.Shared | sdk/synapse/Azure.Analytics.Synapse.Shared | +| webpubsub | Azure.Messaging.WebPubSub.Client | sdk/webpubsub/Azure.Messaging.WebPubSub.Client | \ No newline at end of file diff --git a/doc/GeneratorMigration/Library_Inventory.py b/doc/GeneratorMigration/Library_Inventory.py new file mode 100644 index 000000000000..7c9ccd6caa12 --- /dev/null +++ b/doc/GeneratorMigration/Library_Inventory.py @@ -0,0 +1,362 @@ +#!/usr/bin/env python3 + +""" +Azure SDK for .NET Libraries Inventory Generator + +This script generates an inventory of libraries in the Azure SDK for .NET repository, +categorizing them as data plane or management plane, and by the type of generator used +(Swagger or TypeSpec). + +Usage: + python Library_Inventory.py [--json] + +Options: + --json Generate a JSON file with the inventory data +""" + +import os +import re +import json +import glob +import sys +from pathlib import Path + +def is_mgmt_library(path): + """Check if a library is a management plane library.""" + if "Azure.ResourceManager" in path or ".Management." in path: + return True + return False + +def identify_generator(path): + """ + Identify if a library is generated using swagger or tsp. + Returns: "Swagger", a specific TypeSpec generator name, "TSP-Old", or "No Generator" + """ + # Special case for Azure.AI.OpenAI which uses TypeSpec with new generator via special handling + if os.path.basename(path) == "Azure.AI.OpenAI" and "openai" in path: + return "@azure-typespec/http-client-csharp" + + # First check for direct TypeSpec indicators + tsp_config_path = os.path.join(path, "src", "tspconfig.yaml") + tsp_dir = os.path.join(path, "src", "tsp") + tsp_files = glob.glob(os.path.join(path, "src", "*.tsp")) + + # Check for tsp-location.yaml files + tsp_location_paths = [] + for root, dirs, files in os.walk(path): + for file in files: + if file.lower() == "tsp-location.yaml": + tsp_location_paths.append(os.path.join(root, file)) + + # If there's a tsp-location.yaml file and it contains emitterPackageJsonPath, extract the generator name + for tsp_location_path in tsp_location_paths: + try: + with open(tsp_location_path, 'r', encoding='utf-8', errors='ignore') as f: + content = f.read() + if "emitterPackageJsonPath" in content: + # Extract the emitterPackageJsonPath value + import re + match = re.search(r'emitterPackageJsonPath:\s*"([^"]+)"', content) + if match: + emitter_path = match.group(1) + # Construct absolute path to the emitter package JSON + repo_root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..")) + emitter_json_path = os.path.join(repo_root, emitter_path) + + # Try to read the generator name from the emitter package JSON + if os.path.exists(emitter_json_path): + try: + with open(emitter_json_path, 'r', encoding='utf-8', errors='ignore') as f: + package_json = json.load(f) + # Look for TypeSpec generator in dependencies + for dep in package_json.get('dependencies', {}): + if dep.startswith('@azure-typespec/'): + # Return the fully qualified name of the emitter package + return dep + except Exception as e: + pass # Fall back to generic name if can't extract + + # If we couldn't extract a specific name, use a default fully qualified name + return "@azure-typespec/http-client-csharp" # Default name for new generator + else: + # Found tsp-location.yaml but no emitterPackageJsonPath, it's using the old TypeSpec generator + return "TSP-Old" + except: + pass + + if os.path.exists(tsp_config_path) or os.path.exists(tsp_dir) or tsp_files: + return "TSP-Old" + + # Check autorest.md for generator information + autorest_md_path = os.path.join(path, "src", "autorest.md") + if os.path.exists(autorest_md_path): + # If autorest.md exists, assume it's a Swagger library + return "Swagger" + + # No autorest.md but Generated folder exists, assume Swagger + if os.path.exists(os.path.join(path, "src", "Generated")): + return "Swagger" + + # Check if there's any file in src with "// " comment + # which is typically found in AutoRest generated code + src_dir = os.path.join(path, "src") + if os.path.exists(src_dir): + for root, dirs, files in os.walk(src_dir): + for file in files: + if file.endswith(".cs"): + file_path = os.path.join(root, file) + try: + with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: + first_lines = "".join([f.readline() for _ in range(10)]) + if "" in first_lines: + return "Swagger" # Default to Swagger if we see auto-generated code + except: + pass + + # If we couldn't identify a generator, it's "No Generator" instead of "Unknown" + return "No Generator" + +def scan_libraries(sdk_root): + """ + Scan all libraries in the sdk directory. + + Args: + sdk_root (str): Path to the SDK root directory + + Returns: + list: List of dictionaries with library information + """ + libraries = [] + + # Scan through all service directories + for service_dir in os.listdir(sdk_root): + service_path = os.path.join(sdk_root, service_dir) + if not os.path.isdir(service_path): + continue + + # Look for library directories + for library_dir in os.listdir(service_path): + library_path = os.path.join(service_path, library_dir) + if not os.path.isdir(library_path): + continue + + # Skip directories that don't look like libraries + if library_dir in ["tests", "samples", "perf", "assets", "docs"]: + continue + + # Skip libraries that start with "Microsoft." + if library_dir.startswith("Microsoft."): + continue + + # If it has a /src directory or a csproj file, it's likely a library + if os.path.exists(os.path.join(library_path, "src")) or glob.glob(os.path.join(library_path, "*.csproj")): + library_type = "Management" if is_mgmt_library(library_path) else "Data Plane" + generator = identify_generator(library_path) + + libraries.append({ + "service": service_dir, + "library": library_dir, + "path": os.path.relpath(library_path, os.path.dirname(sdk_root)), + "type": library_type, + "generator": generator + }) + + return libraries + +def generate_markdown_report(libraries): + """ + Generate a markdown report from the library inventory. + + Args: + libraries (list): List of library dictionaries + + Returns: + str: Markdown report content + """ + # Group by type and generator + mgmt_swagger = [lib for lib in libraries if lib["type"] == "Management" and lib["generator"] == "Swagger"] + data_swagger = [lib for lib in libraries if lib["type"] == "Data Plane" and lib["generator"] == "Swagger"] + + # Old TypeSpec libraries + mgmt_tsp_old = [lib for lib in libraries if lib["type"] == "Management" and lib["generator"] == "TSP-Old"] + data_tsp_old = [lib for lib in libraries if lib["type"] == "Data Plane" and lib["generator"] == "TSP-Old"] + + # Group by specific TypeSpec generator + # First, identify all unique new generator types + new_generator_types = set([ + lib["generator"] + for lib in libraries + if lib["generator"] not in ["Swagger", "TSP-Old", "No Generator"] + ]) + + # Create groups for each generator type + mgmt_tsp_by_generator = {} + data_tsp_by_generator = {} + + for gen_type in new_generator_types: + mgmt_tsp_by_generator[gen_type] = [ + lib for lib in libraries + if lib["type"] == "Management" and lib["generator"] == gen_type + ] + data_tsp_by_generator[gen_type] = [ + lib for lib in libraries + if lib["type"] == "Data Plane" and lib["generator"] == gen_type + ] + + no_generator = [lib for lib in libraries if lib["generator"] == "No Generator"] + + report = [] + report.append("# Azure SDK for .NET Libraries Inventory\n") + + report.append("## Summary\n") + report.append(f"- Total libraries: {len(libraries)}") + report.append(f"- Management Plane (Swagger): {len(mgmt_swagger)}") + report.append(f"- Management Plane (TSP-Old): {len(mgmt_tsp_old)}") + + # List all new generator types with counts + for gen_type in sorted(new_generator_types): + report.append(f"- Management Plane (TypeSpec - {gen_type}): {len(mgmt_tsp_by_generator[gen_type])}") + + report.append(f"- Data Plane (Swagger): {len(data_swagger)}") + report.append(f"- Data Plane (TSP-Old): {len(data_tsp_old)}") + + # List all new generator types with counts for data plane + for gen_type in sorted(new_generator_types): + report.append(f"- Data Plane (TypeSpec - {gen_type}): {len(data_tsp_by_generator[gen_type])}") + + report.append(f"- No generator: {len(no_generator)}") + report.append("\n") + + # Add sections for each TypeSpec generator for Data Plane + for gen_type in sorted(new_generator_types): + if len(data_tsp_by_generator[gen_type]) > 0: + report.append(f"## Data Plane Libraries using TypeSpec ({gen_type})\n") + report.append(f"TypeSpec with {gen_type} generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing {gen_type}, or through special handling for specific libraries. Total: {len(data_tsp_by_generator[gen_type])}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(data_tsp_by_generator[gen_type], key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # Old TypeSpec Data Plane Libraries + if len(data_tsp_old) > 0: + report.append("## Data Plane Libraries using TypeSpec (Old Generator)\n") + report.append(f"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: {len(data_tsp_old)}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(data_tsp_old, key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # Data Plane Swagger Libraries + if len(data_swagger) > 0: + report.append("## Data Plane Libraries using Swagger\n") + report.append(f"Total: {len(data_swagger)}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(data_swagger, key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # Add sections for each TypeSpec generator for Management Plane + for gen_type in sorted(new_generator_types): + if len(mgmt_tsp_by_generator[gen_type]) > 0: + report.append(f"## Management Plane Libraries using TypeSpec ({gen_type})\n") + report.append(f"TypeSpec with {gen_type} generator is detected by the presence of a tsp-location.yaml file with an emitterPackageJsonPath value referencing {gen_type}, or through special handling for specific libraries. Total: {len(mgmt_tsp_by_generator[gen_type])}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(mgmt_tsp_by_generator[gen_type], key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # Old TypeSpec Management Plane Libraries + if len(mgmt_tsp_old) > 0: + report.append("## Management Plane Libraries using TypeSpec (Old Generator)\n") + report.append(f"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: {len(mgmt_tsp_old)}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(mgmt_tsp_old, key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # Management Plane Swagger Libraries + if len(mgmt_swagger) > 0: + report.append("## Management Plane Libraries using Swagger\n") + report.append(f"Total: {len(mgmt_swagger)}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(mgmt_swagger, key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + report.append("\n") + + # No Generator Libraries + report.append("## Libraries with No Generator\n") + report.append(f"Libraries with no generator have neither autorest.md nor tsp-location.yaml files. Total: {len(no_generator)}\n") + report.append("| Service | Library | Path |") + report.append("| ------- | ------- | ---- |") + for lib in sorted(no_generator, key=lambda x: (x["service"], x["library"])): + report.append(f"| {lib['service']} | {lib['library']} | {lib['path']} |") + + return "\n".join(report) + +if __name__ == "__main__": + # Parse command line arguments + generate_json = "--json" in sys.argv + + # Define the path to the SDK root directory + SDK_ROOT = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", "sdk") + + # Scan libraries + libraries = scan_libraries(SDK_ROOT) + + # Print summary counts + mgmt_swagger = sum(1 for lib in libraries if lib["type"] == "Management" and lib["generator"] == "Swagger") + mgmt_tsp_old = sum(1 for lib in libraries if lib["type"] == "Management" and lib["generator"] == "TSP-Old") + data_swagger = sum(1 for lib in libraries if lib["type"] == "Data Plane" and lib["generator"] == "Swagger") + data_tsp_old = sum(1 for lib in libraries if lib["type"] == "Data Plane" and lib["generator"] == "TSP-Old") + no_generator = sum(1 for lib in libraries if lib["generator"] == "No Generator") + + # Get counts for specific TypeSpec generators + new_generator_types = set([ + lib["generator"] + for lib in libraries + if lib["generator"] not in ["Swagger", "TSP-Old", "No Generator"] + ]) + + print(f"Total libraries found: {len(libraries)}") + print(f"Management Plane (Swagger): {mgmt_swagger}") + print(f"Management Plane (TSP-Old): {mgmt_tsp_old}") + + # Print counts for each new generator type in Management Plane + for gen_type in sorted(new_generator_types): + mgmt_gen_count = sum(1 for lib in libraries if lib["type"] == "Management" and lib["generator"] == gen_type) + if mgmt_gen_count > 0: + print(f"Management Plane (TypeSpec - {gen_type}): {mgmt_gen_count}") + + print(f"Data Plane (Swagger): {data_swagger}") + print(f"Data Plane (TSP-Old): {data_tsp_old}") + + # Print counts for each new generator type in Data Plane + for gen_type in sorted(new_generator_types): + data_gen_count = sum(1 for lib in libraries if lib["type"] == "Data Plane" and lib["generator"] == gen_type) + if data_gen_count > 0: + print(f"Data Plane (TypeSpec - {gen_type}): {data_gen_count}") + + print(f"No generator: {no_generator}") + + # Generate the inventory markdown file + markdown_report = generate_markdown_report(libraries) + inventory_md_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "Library_Inventory.md") + with open(inventory_md_path, 'w') as f: + f.write(markdown_report) + + print(f"Library inventory markdown generated at: {inventory_md_path}") + + # Export JSON only if requested via the --json flag + if generate_json: + json_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "Library_Inventory.json") + with open(json_path, 'w') as f: + json.dump(libraries, f, indent=2) + print(f"Library inventory JSON generated at: {json_path}") + else: + print("JSON file generation skipped. Use --json flag to generate the JSON file.") \ No newline at end of file diff --git a/doc/GeneratorMigration/Library_Inventory_Guide.md b/doc/GeneratorMigration/Library_Inventory_Guide.md new file mode 100644 index 000000000000..062643b28fb4 --- /dev/null +++ b/doc/GeneratorMigration/Library_Inventory_Guide.md @@ -0,0 +1,85 @@ +# Azure SDK for .NET Library Inventory Guide + +This document outlines how to generate and maintain the inventory of libraries in the Azure SDK for .NET repository. + +## Purpose + +The library inventory helps us: + +1. Track all libraries in the repository +2. Categorize them as data plane or management plane +3. Identify which generator (Swagger or TypeSpec) they use +4. Plan migrations to newer generators + +## Generating the Inventory + +To generate the library inventory: + +1. Run the `Library_Inventory.py` script from the repository root: + +```bash +python doc/GeneratorMigration/Library_Inventory.py +``` + +2. The script will: + - Scan all libraries in the `sdk/` directory + - Categorize them by type (data plane or management plane) + - Identify the generator used (Swagger or TypeSpec) + - Generate a markdown report (`doc/GeneratorMigration/Library_Inventory.md`) + +3. If you need JSON output for programmatic use, use the `--json` flag: + +```bash +python doc/GeneratorMigration/Library_Inventory.py --json +``` + - This will generate an additional `Library_Inventory.json` file with the raw inventory data + - Note: The JSON file is for temporary analytical use and should not be checked into the repository + +## Inventory Classification Logic + +The script uses the following logic to categorize libraries: + +### Data Plane vs Management Plane + +- **Management Plane**: Libraries that contain "Azure.ResourceManager" or ".Management." in their path +- **Data Plane**: All other libraries + +### Swagger vs TypeSpec (TSP) + +The script looks for evidence of TypeSpec usage in the following order: + +1. Direct TypeSpec indicators: + - `tsp-location.yaml` file with an `emitterPackageJsonPath` value + - `src/tspconfig.yaml` file + - `src/tsp` directory + - `.tsp` files in the src directory + +2. Swagger indicators: + - Presence of `src/autorest.md` file + - `src/Generated` directory exists + - Files with `` comment headers + +If none of these TypeSpec indicators are found but there is evidence of code generation +(like a `src/Generated` directory or files with `` markers), the script assumes Swagger. + +## Understanding the Results + +The inventory markdown file provides: + +1. Overall summary counts +2. Tables for each category: + - Data Plane libraries using TypeSpec + - Data Plane libraries using Swagger + - Management Plane libraries using TypeSpec + - Management Plane libraries using Swagger + - Libraries with unknown generator + +## Updating the Inventory + +The inventory should be updated whenever: + +1. New libraries are added to the repository +2. Libraries are migrated from Swagger to TypeSpec +3. Preparing for migration planning + +Simply run the script again to regenerate the inventory files. \ No newline at end of file diff --git a/eng/CodeGeneration.targets b/eng/CodeGeneration.targets index 9ecf7d56daa3..b8be7788bdc4 100644 --- a/eng/CodeGeneration.targets +++ b/eng/CodeGeneration.targets @@ -1,39 +1,24 @@ - - - <_AutoRestVersion>https://github.com/Azure/autorest/releases/download/autorest-3.0.6236/autorest-3.0.6236.tgz - <_AutoRestCoreVersion>3.0.6306 - <_AutoRestCSharpVersion>https://github.com/Azure/autorest.csharp/releases/download/3.0.0-dev.20200811.1/autorest-csharp-v3-3.0.0-dev.20200811.1.tgz - <_SupportsCodeGeneration Condition="'$(IsClientLibrary)' == 'true'">true - <_DefaultInputName Condition="Exists('$(MSBuildProjectDirectory)/autorest.md')">$(MSBuildProjectDirectory)/autorest.md - $(_DefaultInputName) - - - - <_GenerateCode Condition="'$(_SupportsCodeGeneration)' == 'true' AND '$(AutoRestInput)' != ''">true - - + + $(MSBuildProjectDirectory)/../tsp-location.yaml + <_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 + + $(TypespecAdditionalOptions)%3Bgenerate-test-project=true + generate-test-project=true + <_TypespecAdditionalOptions Condition="'$(TypespecAdditionalOptions)' != ''">--emitter-options "$(TypespecAdditionalOptions)" + <_LocalSpecRepo Condition="'$(LocalSpecRepo)' != ''">--local-spec-repo $(LocalSpecRepo) - - - - - - - - - - - - - - - + + + + + + diff --git a/eng/Directory.Build.Common.props b/eng/Directory.Build.Common.props index 874fdf1ec19a..4cd576529d9f 100644 --- a/eng/Directory.Build.Common.props +++ b/eng/Directory.Build.Common.props @@ -13,6 +13,7 @@ true true + true true true diff --git a/eng/Directory.Build.Common.targets b/eng/Directory.Build.Common.targets index 8f42937efb33..f3d56135b7e5 100644 --- a/eng/Directory.Build.Common.targets +++ b/eng/Directory.Build.Common.targets @@ -89,7 +89,7 @@ - + @@ -172,7 +172,7 @@ - + diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 9dca002a1715..42c947e3ee19 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -89,7 +89,7 @@ - + @@ -166,7 +166,7 @@ - + @@ -209,7 +209,6 @@ - - + @@ -301,7 +300,7 @@ - + @@ -416,7 +415,7 @@ - + @@ -439,7 +438,7 @@ 1.0.0-dev.20250501.1 - 1.0.0-alpha.20250509.1 - 1.0.0-alpha.20250508.1 + 1.0.0-alpha.20250522.1 + 1.0.0-alpha.20250522.1 diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 1e28cdf10ef0..500bd89d0dfc 100755 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -18,7 +18,7 @@ param ( [ValidatePattern('^[-\w\._\(\)]+$')] [string] $ResourceGroupName, - [Parameter(Mandatory = $true, Position = 0)] + [Parameter(Position = 0)] [string] $ServiceDirectory, [Parameter()] @@ -159,10 +159,13 @@ if ($initialContext) { # try..finally will also trap Ctrl+C. try { - # Enumerate test resources to deploy. Fail if none found. - $repositoryRoot = "$PSScriptRoot/../../.." | Resolve-Path - $root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | Resolve-Path + $root = $repositoryRoot = "$PSScriptRoot/../../.." | Resolve-Path + + if($ServiceDirectory) { + $root = "$repositoryRoot/sdk/$ServiceDirectory" | Resolve-Path + } + if ($TestResourcesDirectory) { $root = $TestResourcesDirectory | Resolve-Path # Add an explicit check below in case ErrorActionPreference is overridden and Resolve-Path doesn't stop execution @@ -171,6 +174,7 @@ try { } Write-Verbose "Overriding test resources search directory to '$root'" } + $templateFiles = @() "$ResourceType-resources.json", "$ResourceType-resources.bicep" | ForEach-Object { @@ -192,7 +196,12 @@ try { exit } + # returns empty string if $ServiceDirectory is not set $serviceName = GetServiceLeafDirectoryName $ServiceDirectory + + # in ci, random names are used + # in non-ci, without BaseName, ResourceGroupName or ServiceDirectory, all invocations will + # generate the same resource group name and base name for a given user $BaseName, $ResourceGroupName = GetBaseAndResourceGroupNames ` -baseNameDefault $BaseName ` -resourceGroupNameDefault $ResourceGroupName ` @@ -296,7 +305,7 @@ try { } } - # This needs to happen after we set the TenantId but before we use the ResourceGroupName + # This needs to happen after we set the TenantId but before we use the ResourceGroupName if ($wellKnownTMETenants.Contains($TenantId)) { # Add a prefix to the resource group name to avoid flagging the usages of local auth # See details at https://eng.ms/docs/products/onecert-certificates-key-vault-and-dsms/key-vault-dsms/certandsecretmngmt/credfreefaqs#how-can-i-disable-s360-reporting-when-testing-customer-facing-3p-features-that-depend-on-use-of-unsafe-local-auth @@ -364,9 +373,10 @@ try { $ProvisionerApplicationOid = $sp.Id } - $tags = @{ - Owners = (GetUserName) - ServiceDirectory = $ServiceDirectory + $tags = @{ Owners = (GetUserName) } + + if ($ServiceDirectory) { + $tags['ServiceDirectory'] = $ServiceDirectory } # Tag the resource group to be deleted after a certain number of hours. diff --git a/eng/common/TestResources/Remove-TestResources.ps1 b/eng/common/TestResources/Remove-TestResources.ps1 index 4479d9783d6f..232c86196c15 100755 --- a/eng/common/TestResources/Remove-TestResources.ps1 +++ b/eng/common/TestResources/Remove-TestResources.ps1 @@ -157,10 +157,6 @@ $context = Get-AzContext if (!$ResourceGroupName) { if ($CI) { - if (!$ServiceDirectory) { - Write-Warning "ServiceDirectory parameter is empty, nothing to remove" - exit 0 - } $envVarName = (BuildServiceDirectoryPrefix (GetServiceLeafDirectoryName $ServiceDirectory)) + "RESOURCE_GROUP" $ResourceGroupName = [Environment]::GetEnvironmentVariable($envVarName) if (!$ResourceGroupName) { @@ -221,7 +217,12 @@ if ($wellKnownSubscriptions.ContainsKey($subscriptionName)) { Log "Selected subscription '$subscriptionName'" if ($ServiceDirectory) { - $root = [System.IO.Path]::Combine("$PSScriptRoot/../../../sdk", $ServiceDirectory) | Resolve-Path + $root = "$PSScriptRoot/../../.." + if($ServiceDirectory) { + $root = "$root/sdk/$ServiceDirectory" + } + $root = $root | Resolve-Path + $preRemovalScript = Join-Path -Path $root -ChildPath "remove-$ResourceType-resources-pre.ps1" if (Test-Path $preRemovalScript) { Log "Invoking pre resource removal script '$preRemovalScript'" diff --git a/eng/common/TestResources/SubConfig-Helpers.ps1 b/eng/common/TestResources/SubConfig-Helpers.ps1 index ab2344283bb3..061160d59f6c 100644 --- a/eng/common/TestResources/SubConfig-Helpers.ps1 +++ b/eng/common/TestResources/SubConfig-Helpers.ps1 @@ -1,4 +1,7 @@ function BuildServiceDirectoryPrefix([string]$serviceName) { + if(!$serviceName) { + return "" + } $serviceName = $serviceName -replace '[\./\\]', '_' return $serviceName.ToUpperInvariant() + "_" } @@ -32,10 +35,15 @@ function GetBaseAndResourceGroupNames( if ($CI) { $base = 't' + (New-Guid).ToString('n').Substring(0, 16) # Format the resource group name based on resource group naming recommendations and limitations. - $generatedGroup = "rg-{0}-$base" -f ($serviceName -replace '[\.\\\/:]', '-'). - Substring(0, [Math]::Min($serviceDirectoryName.Length, 90 - $base.Length - 4)). - Trim('-'). - ToLowerInvariant() + if ($serviceDirectoryName) { + $generatedGroup = "rg-{0}-$base" -f ($serviceName -replace '[\.\\\/:]', '-'). + Substring(0, [Math]::Min($serviceDirectoryName.Length, 90 - $base.Length - 4)). + Trim('-'). + ToLowerInvariant() + } else { + $generatedGroup = "rg-$base" + } + $group = $resourceGroupNameDefault ? $resourceGroupNameDefault : $generatedGroup Log "Generated resource base name '$base' and resource group name '$group' for CI build" diff --git a/eng/common/TestResources/TestResources-Helpers.ps1 b/eng/common/TestResources/TestResources-Helpers.ps1 index 5968cac5d0d0..cbe047ebc5f1 100644 --- a/eng/common/TestResources/TestResources-Helpers.ps1 +++ b/eng/common/TestResources/TestResources-Helpers.ps1 @@ -129,8 +129,30 @@ function MergeHashes([hashtable] $source, [psvariable] $dest) { } } +function IsBicepInstalled() { + try { + bicep --version | Out-Null + return $LASTEXITCODE -eq 0 + } + catch { + return $false + } +} + +function IsAzCliBicepInstalled() { + try { + az bicep version | Out-Null + return $LASTEXITCODE -eq 0 + } + catch { + return $false + } +} + function BuildBicepFile([System.IO.FileSystemInfo] $file) { - if (!(Get-Command bicep -ErrorAction Ignore)) { + $useBicepCli = IsBicepInstalled + + if (!$useBicepCli -and !(IsAzCliBicepInstalled)) { Write-Error "A bicep file was found at '$($file.FullName)' but the Azure Bicep CLI is not installed. See https://aka.ms/bicep-install" throw } @@ -140,7 +162,12 @@ function BuildBicepFile([System.IO.FileSystemInfo] $file) { # Az can deploy bicep files natively, but by compiling here it becomes easier to parse the # outputted json for mismatched parameter declarations. - bicep build $file.FullName --outfile $templateFilePath + if ($useBicepCli) { + bicep build $file.FullName --outfile $templateFilePath + } else { + az bicep build --file $file.FullName --outfile $templateFilePath + } + if ($LASTEXITCODE) { Write-Error "Failure building bicep file '$($file.FullName)'" throw @@ -150,13 +177,22 @@ function BuildBicepFile([System.IO.FileSystemInfo] $file) { } function LintBicepFile([string] $path) { - if (!(Get-Command bicep -ErrorAction Ignore)) { - Write-Error "A bicep file was found at '$path' but the Azure Bicep CLI is not installed. See https://aka.ms/bicep-install" - throw + $useBicepCli = IsBicepInstalled + + if (!$useBicepCli -and !(IsAzCliBicepInstalled)) { + Write-Error "A bicep file was found at '$path' but the Azure Bicep CLI is not installed. See https://aka.ms/bicep-install" + throw } # Work around lack of config file override: https://github.com/Azure/bicep/issues/5013 - $output = bicep lint "$path" 2>&1 + $output = bicep lint $path 2>&1 + + if ($useBicepCli) { + $output = bicep lint $path 2>&1 + } else { + $output = az bicep lint --file $path 2>&1 + } + if ($LASTEXITCODE) { Write-Error "Failed linting bicep file '$path'" throw diff --git a/eng/common/TestResources/deploy-test-resources.yml b/eng/common/TestResources/deploy-test-resources.yml index 9a4887622d4c..e64404e7c5b4 100644 --- a/eng/common/TestResources/deploy-test-resources.yml +++ b/eng/common/TestResources/deploy-test-resources.yml @@ -1,5 +1,5 @@ parameters: - ServiceDirectory: not-set + ServiceDirectory: '' ArmTemplateParameters: '@{}' DeleteAfterHours: 8 Location: '' diff --git a/eng/common/mcp/azure-sdk-mcp.ps1 b/eng/common/mcp/azure-sdk-mcp.ps1 index a344051f7e11..ade107e406d8 100755 --- a/eng/common/mcp/azure-sdk-mcp.ps1 +++ b/eng/common/mcp/azure-sdk-mcp.ps1 @@ -1,7 +1,7 @@ #!/bin/env pwsh param( - [string]$FileName = 'azsdk', + [string]$FileName = 'Azure.Sdk.Tools.Cli', [string]$Package = 'azsdk', [string]$Version, # Default to latest [string]$InstallDirectory = (Join-Path $HOME ".azure-sdk-mcp" "azsdk"), @@ -56,5 +56,5 @@ $exe = Install-Standalone-Tool ` -Repository $Repository if ($Run) { - Start-Process -FilePath $exe -NoNewWindow -Wait -} \ No newline at end of file + Start-Process -FilePath $exe -ArgumentList 'start' -NoNewWindow -Wait +} diff --git a/eng/common/pipelines/templates/steps/check-spelling.yml b/eng/common/pipelines/templates/steps/check-spelling.yml index a25fd9444118..8d7a716cbdfc 100644 --- a/eng/common/pipelines/templates/steps/check-spelling.yml +++ b/eng/common/pipelines/templates/steps/check-spelling.yml @@ -15,15 +15,9 @@ parameters: steps: - ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: - - task: NodeTool@0 - condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true')) - inputs: - versionSpec: 18.x - displayName: Use Node.js 18.x - - task: PowerShell@2 displayName: Check spelling (cspell) - condition: and(succeededOrFailed(), ne(variables['Skip.SpellCheck'],'true')) + condition: and(succeeded(), ne(variables['Skip.SpellCheck'],'true')) continueOnError: ${{ parameters.ContinueOnError }} inputs: targetType: filePath diff --git a/eng/common/pipelines/templates/steps/detect-api-changes.yml b/eng/common/pipelines/templates/steps/detect-api-changes.yml index 2525dade5205..573a23c1979d 100644 --- a/eng/common/pipelines/templates/steps/detect-api-changes.yml +++ b/eng/common/pipelines/templates/steps/detect-api-changes.yml @@ -24,5 +24,5 @@ steps: -ArtifactName ${{ parameters.ArtifactName }} -DevopsProject $(System.TeamProject) pwsh: true - displayName: Detect API changes + displayName: Create APIView if API has changes condition: and(${{ parameters.Condition }}, succeededOrFailed(), eq(variables['Build.Reason'],'PullRequest')) diff --git a/eng/common/pipelines/templates/steps/save-package-properties.yml b/eng/common/pipelines/templates/steps/save-package-properties.yml index 65966d1c6f18..d3a1177aced5 100644 --- a/eng/common/pipelines/templates/steps/save-package-properties.yml +++ b/eng/common/pipelines/templates/steps/save-package-properties.yml @@ -41,11 +41,26 @@ steps: pwsh: true workingDirectory: '${{ parameters.WorkingDirectory }}' + - task: Powershell@2 + displayName: Save package properties filtered for PR + inputs: + filePath: ${{ parameters.ScriptDirectory }}/Save-Package-Properties.ps1 + arguments: > + -PrDiff '${{ parameters.DiffDirectory }}/diff.json' + -OutDirectory '${{ parameters.PackageInfoDirectory }}' + pwsh: true + workingDirectory: '${{ parameters.WorkingDirectory }}' + # When running in PR mode, we want the detected changed services to be attached to the build as tags. # However, the public identity does not have the permissions to attach tags to the build. # Instead, we will save the changed services to a file, attach it as an attachment for PiplineWitness to pick up and utilize. + # - pwsh: | - $changedServices = (Get-Content -Path '${{ parameters.DiffDirectory }}/diff.json' -Raw | ConvertFrom-Json).ChangedServices + $changedPackages = Get-ChildItem -Recurse -Filter *.json "${{ parameters.PackageInfoDirectory }}" ` + | ForEach-Object { Get-Content -Raw $_ | ConvertFrom-Json } + + $changedServices = $changedPackages | Where-Object { $_.IncludedForValidation -eq $false } ` + | Select-Object -ExpandProperty ServiceDirectory | Sort-Object -Unique if ($changedServices) { Write-Host "Attaching changed service names to the build for additional tag generation." @@ -55,15 +70,6 @@ steps: displayName: Upload tags.json with changed services workingDirectory: '${{ parameters.WorkingDirectory }}' - - task: Powershell@2 - displayName: Save package properties filtered for PR - inputs: - filePath: ${{ parameters.ScriptDirectory }}/Save-Package-Properties.ps1 - arguments: > - -PrDiff '${{ parameters.DiffDirectory }}/diff.json' - -OutDirectory '${{ parameters.PackageInfoDirectory }}' - pwsh: true - workingDirectory: '${{ parameters.WorkingDirectory }}' - ${{ else }}: - task: Powershell@2 displayName: Save package properties diff --git a/eng/common/pipelines/templates/steps/sparse-checkout.yml b/eng/common/pipelines/templates/steps/sparse-checkout.yml index d3992a85e3f6..d7f1bc0d1246 100644 --- a/eng/common/pipelines/templates/steps/sparse-checkout.yml +++ b/eng/common/pipelines/templates/steps/sparse-checkout.yml @@ -14,6 +14,9 @@ parameters: - name: TokenToUseForAuth type: string default: '' + - name: PreserveAuthToken + type: boolean + default: false steps: - ${{ if not(parameters.SkipCheckoutNone) }}: @@ -137,7 +140,7 @@ steps: pwsh: true workingDirectory: $(System.DefaultWorkingDirectory) - - ${{ if ne(parameters.TokenToUseForAuth, '') }}: + - ${{ if and(ne(parameters.TokenToUseForAuth, ''), not(parameters.PreserveAuthToken)) }}: - pwsh: | git config unset --global "http.extraheader" displayName: Removing git config auth header diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index 3d159ad8be74..f29fc12068dc 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -19,7 +19,7 @@ function Get-ChangeLogEntries { LogError "ChangeLog[${ChangeLogLocation}] does not exist" return $null } - LogDebug "Extracting entries from [${ChangeLogLocation}]." + Write-Verbose "Extracting entries from [${ChangeLogLocation}]." return Get-ChangeLogEntriesFromContent (Get-Content -Path $ChangeLogLocation) } diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1 index 6be93332118c..25f3101a8b9b 100644 --- a/eng/common/scripts/Detect-Api-Changes.ps1 +++ b/eng/common/scripts/Detect-Api-Changes.ps1 @@ -55,11 +55,21 @@ function Submit-Request($filePath, $packageName) } $uri = [System.UriBuilder]$APIViewUri $uri.query = $query.toString() + + $correlationId = [System.Guid]::NewGuid().ToString() + $headers = @{ + "x-correlation-id" = $correlationId + } LogInfo "Request URI: $($uri.Uri.OriginalString)" + LogInfo "Correlation ID: $correlationId" try { - $Response = Invoke-WebRequest -Method 'GET' -Uri $uri.Uri -MaximumRetryCount 3 + $Response = Invoke-WebRequest -Method 'GET' -Uri $uri.Uri -Headers $headers -MaximumRetryCount 3 $StatusCode = $Response.StatusCode + if ($Response.Headers['Content-Type'] -like 'application/json*') { + $responseContent = $Response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10 + LogSuccess $responseContent + } } catch { diff --git a/eng/common/scripts/Helpers/ApiView-Helpers.ps1 b/eng/common/scripts/Helpers/ApiView-Helpers.ps1 index af5335a98def..d5813d19fdcb 100644 --- a/eng/common/scripts/Helpers/ApiView-Helpers.ps1 +++ b/eng/common/scripts/Helpers/ApiView-Helpers.ps1 @@ -168,10 +168,16 @@ function Set-ApiViewCommentForPR { $apiviewEndpoint = "$APIViewHost/api/pullrequests?pullRequestNumber=$PrNumber&repoName=$repoFullName&commitSHA=$HeadCommitish" LogDebug "Get APIView information for PR using endpoint: $apiviewEndpoint" + $correlationId = [System.Guid]::NewGuid().ToString() + $headers = @{ + "x-correlation-id" = $correlationId + } + LogInfo "Correlation ID: $correlationId" + $commentText = @() $commentText += "## API Change Check" try { - $response = Invoke-WebRequest -Uri $apiviewEndpoint -Method Get -MaximumRetryCount 3 + $response = Invoke-WebRequest -Uri $apiviewEndpoint -Method Get -Headers $headers -MaximumRetryCount 3 LogInfo "OperationId: $($response.Headers['X-Operation-Id'])" if ($response.StatusCode -ne 200) { LogInfo "API changes are not detected in this pull request." @@ -261,7 +267,6 @@ function Create-API-Review { $correlationId = [System.Guid]::NewGuid().ToString() $headers = @{ - "Content-Type" = "application/json" "x-correlation-id" = $correlationId } @@ -271,11 +276,20 @@ function Create-API-Review { try { $response = Invoke-WebRequest -Method 'GET' -Uri $requestUri.Uri -Headers $headers -MaximumRetryCount 3 - if ($response.StatusCode -eq 201) { - LogSuccess "Status Code: $($response.StatusCode)`nAPI review request created successfully.`n$($response.Content)" - } - elseif ($response.StatusCode -eq 208) { - LogSuccess "Status Code: $($response.StatusCode)`nThere is no API change compared with the previous version." + if ($response.StatusCode -eq 201 -or $response.StatusCode -eq 208) { + if ($response.StatusCode -eq 201) { + LogSuccess "Status Code: $($response.StatusCode)`nAPI review request created successfully" + } + elseif ($response.StatusCode -eq 208) { + LogSuccess "Status Code: $($response.StatusCode)`nThere is no API change compared with the previous version." + } + if ($response.Headers['Content-Type'] -like 'application/json*') { + $responseContent = $response.Content | ConvertFrom-Json | ConvertTo-Json -Depth 10 + LogSuccess "Response:`n$($responseContent)" + } + else { + LogSuccess "Response: $($response.Content)" + } } else { LogError "Failed to create API review request. $($response)" diff --git a/eng/common/scripts/Package-Properties.ps1 b/eng/common/scripts/Package-Properties.ps1 index 70fa78a1e52b..0142017c8468 100644 --- a/eng/common/scripts/Package-Properties.ps1 +++ b/eng/common/scripts/Package-Properties.ps1 @@ -368,7 +368,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) { # this is the primary loop that identifies the packages that have changes foreach ($pkg in $allPackageProperties) { - Write-Host "Processing changed files against $($pkg.Name). $pkgCounter of $($allPackageProperties.Count)." + Write-Verbose "Processing changed files against $($pkg.Name). $pkgCounter of $($allPackageProperties.Count)." $pkgDirectory = (Resolve-Path "$($pkg.DirectoryPath)").Path.Replace("`\", "/") $lookupKey = $pkgDirectory.Replace($RepoRoot, "").TrimStart('\/') $lookup[$lookupKey] = $pkg @@ -389,6 +389,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) { # handle direct changes to packages $shouldInclude = $filePath -eq $pkgDirectory -or $filePath -like "$pkgDirectory/*" + $includeMsg = "Including '$($pkg.Name)' because of changed file '$filePath'." + # we only need to do additional work for indirect packages if we haven't already decided # to include this package due to this file if (-not $shouldInclude) { @@ -399,6 +401,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) { $includedForValidation = ($filePath -like ("$resolvedRelativePath/*") -or $filePath -eq $resolvedRelativePath) $shouldInclude = $shouldInclude -or $includedForValidation if ($includedForValidation) { + $includeMsg += " - (triggerPath: '$triggerPath')" break } } @@ -448,6 +451,8 @@ function Get-PrPkgProperties([string]$InputDiffJson) { } if ($shouldInclude) { + + LogInfo $includeMsg $packagesWithChanges += $pkg if ($pkg.AdditionalValidationPackages) { @@ -474,6 +479,7 @@ function Get-PrPkgProperties([string]$InputDiffJson) { if ($pkg.Name -notin $existingPackageNames) { $pkg.IncludedForValidation = $true + LogInfo "Including '$($pkg.Name)' for validation only because it is a dependency of another package." $packagesWithChanges += $pkg } } @@ -484,6 +490,9 @@ function Get-PrPkgProperties([string]$InputDiffJson) { if ($AdditionalValidationPackagesFromPackageSetFn -and (Test-Path "Function:$AdditionalValidationPackagesFromPackageSetFn")) { $additionalPackages = &$AdditionalValidationPackagesFromPackageSetFn $packagesWithChanges $diff $allPackageProperties $packagesWithChanges += $additionalPackages + foreach ($pkg in $additionalPackages) { + LogInfo "Including '$($pkg.Name)' from the additional validation package set." + } } # finally, if we have gotten all the way here and we still don't have any packages, we should include the template service diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 8162270de615..7bba07fe1ae1 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -283,14 +283,14 @@ function ParseLinks([string]$baseUri, [string]$htmlContent) $hrefRegex = "]+href\s*=\s*[""']?(?[^""']*)[""']?" $regexOptions = [System.Text.RegularExpressions.RegexOptions]"Singleline, IgnoreCase"; - $hrefs = [RegEx]::Matches($htmlContent, $hrefRegex, $regexOptions); + $matches = [RegEx]::Matches($htmlContent, $hrefRegex, $regexOptions); - #$hrefs | Foreach-Object { Write-Host $_ } + Write-Verbose "Found $($matches.Count) raw href's in page $baseUri"; - Write-Verbose "Found $($hrefs.Count) raw href's in page $baseUri"; - [string[]] $links = $hrefs | ForEach-Object { ResolveUri $baseUri $_.Groups["href"].Value } + # Html encoded urls in anchor hrefs need to be decoded + $urls = $matches | ForEach-Object { [System.Web.HttpUtility]::HtmlDecode($_.Groups["href"].Value) } - #$links | Foreach-Object { Write-Host $_ } + [string[]] $links = $urls | ForEach-Object { ResolveUri $baseUri $_ } if ($null -eq $links) { $links = @() diff --git a/eng/docsSDKCIConfig.json b/eng/docsSDKCIConfig.json index 931905297aa1..763a78749655 100644 --- a/eng/docsSDKCIConfig.json +++ b/eng/docsSDKCIConfig.json @@ -1,12 +1,12 @@ { "TFM": "net471", "target_repo": { - "url": "https://github.com/Azure/azure-docs-sdk-dotnet", + "url": "https://github.com/MicrosoftDocs/azure-docs-sdk-dotnet", "branch": "%%DocsBranchName%%", "folder": "xml" }, "source_repo": { - "url": "https://github.com/Azure/azure-docs-sdk-dotnet", + "url": "https://github.com/MicrosoftDocs/azure-docs-sdk-dotnet", "branch": "%%DocsBranchName%%", "csvPath": "bundlepackages" }, diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 17e2dd3a5bb1..4649ba0b6869 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250512.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250521.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.56.0", @@ -26,9 +26,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20250512.2", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250512.2.tgz", - "integrity": "sha512-uHcEQTujg3dMhIGxoFBti+ndAQbuHlBSY5gQmwzBcW9mHWWmR7sYJ2UHRPDrnzIwKHucsCkQP7KUZJQ4rikL+A==" + "version": "3.0.0-beta.20250521.1", + "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20250521.1.tgz", + "integrity": "sha512-B3iGh/X8I/FpmvkxoaDqpAuyz7Ke4nANRTMT1+MEpaw2j/iiUuy+2TdB3oLMne9VtqoFYeloKgoIO1M+QMEHtA==" }, "node_modules/@azure-tools/typespec-autorest": { "version": "0.56.0", @@ -131,13 +131,13 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20250512.2", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250512.2.tgz", - "integrity": "sha512-KMR5XSGUGidJ1ztH6DmpGDJ/D4tEYqzZkqbqa0SE5fK9e6L7AX4nszG00mTYjjpAyxFZkaWs5RK6cx7XaAWzZQ==", + "version": "0.2.0-beta.20250521.1", + "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20250521.1.tgz", + "integrity": "sha512-sxlXO9vEAQdgJC5/7W6p7WgxGSDbdi/jG//rVhuEZxZB7alW2o3k+n68sAts03zm4GcrGNQVvu3AdYFqnOMbwA==", "license": "MIT", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20250512.2", - "@typespec/http-client-csharp": "1.0.0-alpha.20250507.1" + "@autorest/csharp": "3.0.0-beta.20250521.1", + "@typespec/http-client-csharp": "1.0.0-alpha.20250521.5" }, "peerDependencies": { "@azure-tools/typespec-autorest": ">=0.56.0 <1.0.0", @@ -636,9 +636,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250507.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250507.1.tgz", - "integrity": "sha512-KKAhLbPbGxqL6Sv/ffAbPS5CUZbV41akyXy7Qhh+QHamm3vW8uU+qffqVZiTnooRU3yjYpKVL8MRLBMtFvvvrg==", + "version": "1.0.0-alpha.20250521.5", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250521.5.tgz", + "integrity": "sha512-mDXJGSmIwkiOUNYyj0iWDuOaDKVX09qHNYLwAPDymKhIRV2MuYjnM62ql1Z+INvunXoI2PDVoVwHv98xwW5i6A==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 3d08142b3d23..0a1291ceda62 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20250512.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20250521.1" }, "devDependencies": { "@azure-tools/typespec-autorest": "0.56.0", diff --git a/eng/http-client-csharp-emitter-package-lock.json b/eng/http-client-csharp-emitter-package-lock.json index ef8a165e0df0..f2195a4e02eb 100644 --- a/eng/http-client-csharp-emitter-package-lock.json +++ b/eng/http-client-csharp-emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250509.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250522.2" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.56.0", @@ -98,12 +98,12 @@ } }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250509.1", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250509.1.tgz", - "integrity": "sha512-OQsE+xsqF8AWrJtiGgP4K3gFZyE7XuXROvhjdQuZSCROZnCaTaBhgcVySY6YzvgDEzyrKys2AQ1XoVsisycIaQ==", + "version": "1.0.0-alpha.20250522.2", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250522.2.tgz", + "integrity": "sha512-rirkIUnpwPf99bxqJ/6U4V/5LVptuXezg7On28LZQgNyNVAUNPGZKWkyZTFvHdU6P3f309Bltd+t/9KB21GcGQ==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250509.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250522.1" } }, "node_modules/@babel/code-frame": { @@ -130,12 +130,12 @@ } }, "node_modules/@inquirer/checkbox": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.5.tgz", - "integrity": "sha512-swPczVU+at65xa5uPfNP9u3qx/alNwiaykiI/ExpsmMSQW55trmZcwhYWzw/7fj+n6Q8z1eENvR7vFfq9oPSAQ==", + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.1.6.tgz", + "integrity": "sha512-62u896rWCtKKE43soodq5e/QcRsA22I+7/4Ov7LESWnKRO6BVo2A1DFLDmXL9e28TB0CfHc3YtkbPm7iwajqkg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/figures": "^1.0.11", "@inquirer/type": "^3.0.6", "ansi-escapes": "^4.3.2", @@ -154,12 +154,12 @@ } }, "node_modules/@inquirer/confirm": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.9.tgz", - "integrity": "sha512-NgQCnHqFTjF7Ys2fsqK2WtnA8X1kHyInyG+nMIuHowVTIgIuS10T4AznI/PvbqSpJqjCUqNBlKGh1v3bwLFL4w==", + "version": "5.1.10", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.10.tgz", + "integrity": "sha512-FxbQ9giWxUWKUk2O5XZ6PduVnH2CZ/fmMKMBkH71MHJvWr7WL5AHKevhzF1L5uYWB2P548o1RzVxrNd3dpmk6g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6" }, "engines": { @@ -175,9 +175,9 @@ } }, "node_modules/@inquirer/core": { - "version": "10.1.10", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.1.10.tgz", - "integrity": "sha512-roDaKeY1PYY0aCqhRmXihrHjoSW2A00pV3Ke5fTpMCkzcGF64R8e0lw3dK+eLEHwS4vB5RnW1wuQmvzoRul8Mw==", + "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==", "license": "MIT", "dependencies": { "@inquirer/figures": "^1.0.11", @@ -202,12 +202,12 @@ } }, "node_modules/@inquirer/editor": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.10.tgz", - "integrity": "sha512-5GVWJ+qeI6BzR6TIInLP9SXhWCEcvgFQYmcRG6d6RIlhFjM5TyG18paTGBgRYyEouvCmzeco47x9zX9tQEofkw==", + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.11.tgz", + "integrity": "sha512-YoZr0lBnnLFPpfPSNsQ8IZyKxU47zPyVi9NLjCWtna52//M/xuL0PGPAxHxxYhdOhnvY2oBafoM+BI5w/JK7jw==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6", "external-editor": "^3.1.0" }, @@ -224,12 +224,12 @@ } }, "node_modules/@inquirer/expand": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.12.tgz", - "integrity": "sha512-jV8QoZE1fC0vPe6TnsOfig+qwu7Iza1pkXoUJ3SroRagrt2hxiL+RbM432YAihNR7m7XnU0HWl/WQ35RIGmXHw==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.13.tgz", + "integrity": "sha512-HgYNWuZLHX6q5y4hqKhwyytqAghmx35xikOGY3TcgNiElqXGPas24+UzNPOwGUZa5Dn32y25xJqVeUcGlTv+QQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6", "yoctocolors-cjs": "^2.1.2" }, @@ -255,12 +255,12 @@ } }, "node_modules/@inquirer/input": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.9.tgz", - "integrity": "sha512-mshNG24Ij5KqsQtOZMgj5TwEjIf+F2HOESk6bjMwGWgcH5UBe8UoljwzNFHqdMbGYbgAf6v2wU/X9CAdKJzgOA==", + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.1.10.tgz", + "integrity": "sha512-kV3BVne3wJ+j6reYQUZi/UN9NZGZLxgc/tfyjeK3mrx1QI7RXPxGp21IUTv+iVHcbP4ytZALF8vCHoxyNSC6qg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6" }, "engines": { @@ -276,12 +276,12 @@ } }, "node_modules/@inquirer/number": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.12.tgz", - "integrity": "sha512-7HRFHxbPCA4e4jMxTQglHJwP+v/kpFsCf2szzfBHy98Wlc3L08HL76UDiA87TOdX5fwj2HMOLWqRWv9Pnn+Z5Q==", + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.13.tgz", + "integrity": "sha512-IrLezcg/GWKS8zpKDvnJ/YTflNJdG0qSFlUM/zNFsdi4UKW/CO+gaJpbMgQ20Q58vNKDJbEzC6IebdkprwL6ew==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6" }, "engines": { @@ -297,12 +297,12 @@ } }, "node_modules/@inquirer/password": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.12.tgz", - "integrity": "sha512-FlOB0zvuELPEbnBYiPaOdJIaDzb2PmJ7ghi/SVwIHDDSQ2K4opGBkF+5kXOg6ucrtSUQdLhVVY5tycH0j0l+0g==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.13.tgz", + "integrity": "sha512-NN0S/SmdhakqOTJhDwOpeBEEr8VdcYsjmZHDb0rblSh2FcbXQOr+2IApP7JG4WE3sxIdKytDn4ed3XYwtHxmJQ==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6", "ansi-escapes": "^4.3.2" }, @@ -319,21 +319,21 @@ } }, "node_modules/@inquirer/prompts": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.0.tgz", - "integrity": "sha512-tk8Bx7l5AX/CR0sVfGj3Xg6v7cYlFBkEahH+EgBB+cZib6Fc83dwerTbzj7f2+qKckjIUGsviWRI1d7lx6nqQA==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.5.1.tgz", + "integrity": "sha512-5AOrZPf2/GxZ+SDRZ5WFplCA2TAQgK3OYrXCYmJL5NaTu4ECcoWFlfUZuw7Es++6Njv7iu/8vpYJhuzxUH76Vg==", "license": "MIT", "dependencies": { - "@inquirer/checkbox": "^4.1.5", - "@inquirer/confirm": "^5.1.9", - "@inquirer/editor": "^4.2.10", - "@inquirer/expand": "^4.0.12", - "@inquirer/input": "^4.1.9", - "@inquirer/number": "^3.0.12", - "@inquirer/password": "^4.0.12", - "@inquirer/rawlist": "^4.1.0", - "@inquirer/search": "^3.0.12", - "@inquirer/select": "^4.2.0" + "@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" }, "engines": { "node": ">=18" @@ -348,12 +348,12 @@ } }, "node_modules/@inquirer/rawlist": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.0.tgz", - "integrity": "sha512-6ob45Oh9pXmfprKqUiEeMz/tjtVTFQTgDDz1xAMKMrIvyrYjAmRbQZjMJfsictlL4phgjLhdLu27IkHNnNjB7g==", + "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==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/type": "^3.0.6", "yoctocolors-cjs": "^2.1.2" }, @@ -370,12 +370,12 @@ } }, "node_modules/@inquirer/search": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.12.tgz", - "integrity": "sha512-H/kDJA3kNlnNIjB8YsaXoQI0Qccgf0Na14K1h8ExWhNmUg2E941dyFPrZeugihEa9AZNW5NdsD/NcvUME83OPQ==", + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.0.13.tgz", + "integrity": "sha512-9g89d2c5Izok/Gw/U7KPC3f9kfe5rA1AJ24xxNZG0st+vWekSk7tB9oE+dJv5JXd0ZSijomvW0KPMoBd8qbN4g==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/figures": "^1.0.11", "@inquirer/type": "^3.0.6", "yoctocolors-cjs": "^2.1.2" @@ -393,12 +393,12 @@ } }, "node_modules/@inquirer/select": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.0.tgz", - "integrity": "sha512-KkXQ4aSySWimpV4V/TUJWdB3tdfENZUU765GjOIZ0uPwdbGIG6jrxD4dDf1w68uP+DVtfNhr1A92B+0mbTZ8FA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.2.1.tgz", + "integrity": "sha512-gt1Kd5XZm+/ddemcT3m23IP8aD8rC9drRckWoP/1f7OL46Yy2FGi8DSmNjEjQKtPl6SV96Kmjbl6p713KXJ/Jg==", "license": "MIT", "dependencies": { - "@inquirer/core": "^10.1.10", + "@inquirer/core": "^10.1.11", "@inquirer/figures": "^1.0.11", "@inquirer/type": "^3.0.6", "ansi-escapes": "^4.3.2", @@ -556,9 +556,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250509.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250509.1.tgz", - "integrity": "sha512-O6fVeLEivLBDtLP+87ZTm5GU1bQuaLJ2aekTzb3W4VwKgAvXu3dbwc9czloVQ7pa+HBCMTQ8REtZUln0tNdnrg==", + "version": "1.0.0-alpha.20250522.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250522.1.tgz", + "integrity": "sha512-IvF7OSzv3NwzQmJvfANn5LL7kDqjuBYYYb7XtdUW9cYlW5PxF3pV3uGIRC1NKmCabj1WA020RPcVzpalKyPkiw==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" @@ -1247,9 +1247,9 @@ "license": "MIT" }, "node_modules/semver": { - "version": "7.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", - "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "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" diff --git a/eng/http-client-csharp-emitter-package.json b/eng/http-client-csharp-emitter-package.json index 24058ebc8651..9a7934b8ce11 100644 --- a/eng/http-client-csharp-emitter-package.json +++ b/eng/http-client-csharp-emitter-package.json @@ -1,7 +1,7 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250509.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250522.2" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.56.0", diff --git a/eng/packages/http-client-csharp-mgmt/ci.yml b/eng/packages/http-client-csharp-mgmt/ci.yml index 3fcb197798bc..441239b26a18 100644 --- a/eng/packages/http-client-csharp-mgmt/ci.yml +++ b/eng/packages/http-client-csharp-mgmt/ci.yml @@ -4,7 +4,6 @@ trigger: - main paths: include: - - eng/packages/http-client-csharp - eng/packages/http-client-csharp-mgmt - eng/scripts/typespec pr: @@ -16,10 +15,9 @@ pr: - release/* paths: include: - - eng/packages/http-client-csharp - eng/packages/http-client-csharp-mgmt - eng/scripts/typespec - + parameters: - name: UseTypeSpecNext displayName: "Use TypeSpec Next" 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 c983fdc5b346..fcb56acf8cf1 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 @@ -8,15 +8,19 @@ import { } from "@typespec/http-client-csharp"; import { calculateResourceTypeFromPath, - ResourceMetadata + ResourceMetadata, + ResourceScope } from "./resource-metadata.js"; import { DecoratorInfo } from "@azure-tools/typespec-client-generator-core"; import { armResourceCreateOrUpdate, armResourceOperations, armResourceRead, + resourceGroupResource, resourceMetadata, - singleton + singleton, + subscriptionResource, + tenantResource } from "./sdk-context-options.js"; export function updateClients(codeModel: CodeModel) { @@ -43,7 +47,7 @@ export function updateClients(codeModel: CodeModel) { } } -function getAllClients(codeModel: CodeModel): InputClient[] { +export function getAllClients(codeModel: CodeModel): InputClient[] { const clients: InputClient[] = []; for (const client of codeModel.clients) { traverseClient(client); @@ -112,15 +116,29 @@ function gatherResourceMetadata( } if (resourceModel && resourceType) { - const metadata = { + // find the scope on its model + const metadata: ResourceMetadata = { resourceModel: resourceModel, resourceClient: client, resourceType: resourceType, - isSingleton: isSingleton + isSingleton: isSingleton, + resourceScope: getResourceScope(resourceModel) }; metadataMap.set(client, metadata); } } + + function getResourceScope(model: InputModelType): ResourceScope { + const decorators = model.decorators; + if (decorators?.some((d) => d.name == tenantResource)) { + return ResourceScope.Tenant; + } else if (decorators?.some((d) => d.name == subscriptionResource)) { + return ResourceScope.Subscription; + } else if (decorators?.some((d) => d.name == resourceGroupResource)) { + return ResourceScope.ResourceGroup; + } + return ResourceScope.ResourceGroup; // all the templates work as if there is a resource group decorator when there is no such decorator + } } function addResourceMetadata(client: InputClient, metadata: ResourceMetadata) { @@ -128,8 +146,10 @@ function addResourceMetadata(client: InputClient, metadata: ResourceMetadata) { name: resourceMetadata, arguments: { resourceModel: metadata.resourceModel.crossLanguageDefinitionId, + resourceClient: metadata.resourceClient.crossLanguageDefinitionId, isSingleton: metadata.isSingleton, - resourceType: metadata.resourceType + resourceType: metadata.resourceType, + resourceScope: metadata.resourceScope } }; diff --git a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts index d6f6f9d3a6bd..592aa35e52cc 100644 --- a/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts +++ b/eng/packages/http-client-csharp-mgmt/emitter/src/resource-metadata.ts @@ -10,7 +10,7 @@ const TenantScopePrefix = "/tenants"; const Providers = "/providers"; export function calculateResourceTypeFromPath(path: string): string { - const providerIndex = path.indexOf(Providers); + const providerIndex = path.lastIndexOf(Providers); if (providerIndex === -1) { if (path.startsWith(ResourceGroupScopePrefix)) { return "Microsoft.Resources/resourceGroups"; @@ -32,9 +32,17 @@ export function calculateResourceTypeFromPath(path: string): string { }, ""); } +export enum ResourceScope { + Tenant = "Tenant", + Subscription = "Subscription", + ResourceGroup = "ResourceGroup" +} + export interface ResourceMetadata { resourceType: string; resourceModel: InputModelType; resourceClient: InputClient; isSingleton: boolean; + resourceScope: ResourceScope; + // TODO -- add parent resource support in the same RP case } 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 04b9db2b54bc..747a72a9a809 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 @@ -34,7 +34,24 @@ const armResourceCreateOrUpdateRegex = export const singleton = "Azure.ResourceManager.@singleton"; const singletonRegex = "Azure\\.ResourceManager\\.@singleton"; -const armResourceInternalRegex = "Azure\\.ResourceManager\\.Private\\.@armResourceInternal"; +const armResourceInternalRegex = + "Azure\\.ResourceManager\\.Private\\.@armResourceInternal"; + +// https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#subscriptionresource +export const subscriptionResource = + "Azure.ResourceManager.@subscriptionResource"; +const subscriptionResourceRegex = + "Azure\\.ResourceManager\\.@subscriptionResource"; + +// https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#tenantresource +export const tenantResource = "Azure.ResourceManager.@tenantResource"; +const tenantResourceRegex = "Azure\\.ResourceManager\\.@tenantResource"; + +// https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-resource-manager/README.md#resourcegroupresource +export const resourceGroupResource = + "Azure.ResourceManager.@resourceGroupResource"; +const resourceGroupResourceRegex = + "Azure\\.ResourceManager\\.@resourceGroupResource"; // TODO: add this decorator to TCGC export const resourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema"; @@ -55,5 +72,8 @@ export const azureSDKContextOptions: CreateSdkContextOptions = { parentResourceRegex, singletonRegex, armResourceInternalRegex, + subscriptionResourceRegex, + resourceGroupResourceRegex, + tenantResourceRegex ] }; 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 new file mode 100644 index 000000000000..e9034870daf2 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/emitter/test/resource-detection.test.ts @@ -0,0 +1,119 @@ +import { beforeEach, describe, it } from "vitest"; +import { + createCSharpSdkContext, + createEmitterContext, + createEmitterTestHost, + typeSpecCompile +} from "./test-util.js"; +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"; + +describe("Resource Detection", () => { + let runner: TestHost; + beforeEach(async () => { + runner = await createEmitterTestHost(); + }); + + it("resource group resource", async () => { + const program = await typeSpecCompile( + ` +/** An Employee resource */ +model Employee is TrackedResource { + ...ResourceNameParameter; +} + +/** Employee properties */ +model EmployeeProperties { +/** Age of employee */ +age?: int32; + +/** City of employee */ +city?: string; + +/** Profile of employee */ +@encode("base64url") +profile?: bytes; + +/** The status of the last operation. */ +@visibility(Lifecycle.Read) +provisioningState?: ProvisioningState; +} + +/** The provisioning state of a resource. */ +@lroStatus +union ProvisioningState { +string, + +/** The resource create request has been accepted */ +Accepted: "Accepted", + +/** The resource is being provisioned */ +Provisioning: "Provisioning", + +/** The resource is updating */ +Updating: "Updating", + +/** Resource has been created. */ +Succeeded: "Succeeded", + +/** Resource creation failed. */ +Failed: "Failed", + +/** Resource creation was canceled. */ +Canceled: "Canceled", + +/** The resource is being deleted */ +Deleting: "Deleting", +} + +interface Operations extends Azure.ResourceManager.Operations {} + +@armResourceOperations +interface Employees { + get is ArmResourceRead; + createOrUpdate is ArmResourceCreateOrReplaceAsync; + update is ArmCustomPatchSync< + Employee, + Azure.ResourceManager.Foundations.ResourceUpdateModel + >; + delete is ArmResourceDeleteWithoutOkAsync; + listByResourceGroup is ArmResourceListByParent; + listBySubscription is ArmListBySubscription; +}`, + runner + ); + const context = createEmitterContext(program); + const sdkContext = await createCSharpSdkContext(context); + const root = createModel(sdkContext); + updateClients(root); + const client = getAllClients(root).find((c) => c.name === "Employees"); + ok(client); + const model = root.models.find((m) => m.name === "Employee"); + ok(model); + + const resourceMetadataDecorator = client.decorators?.find( + (d) => d.name === resourceMetadata + ); + ok(resourceMetadataDecorator); + strictEqual( + resourceMetadataDecorator.arguments?.resourceType, + "Microsoft.ContosoProviderHub/employees" + ); + strictEqual( + resourceMetadataDecorator.arguments?.resourceModel, + model.crossLanguageDefinitionId + ); + strictEqual( + resourceMetadataDecorator.arguments?.resourceClient, + client.crossLanguageDefinitionId + ); + strictEqual(resourceMetadataDecorator.arguments?.isSingleton, false); + strictEqual( + resourceMetadataDecorator.arguments?.resourceScope, + "ResourceGroup" + ); + }); +}); diff --git a/eng/packages/http-client-csharp-mgmt/emitter/test/resource-type.test.ts b/eng/packages/http-client-csharp-mgmt/emitter/test/resource-type.test.ts new file mode 100644 index 000000000000..9865d090ef85 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/emitter/test/resource-type.test.ts @@ -0,0 +1,79 @@ +import { describe, it } from "vitest"; +import { calculateResourceTypeFromPath } from "../src/resource-metadata.js"; +import { strictEqual } from "assert"; + +describe("Resource Type Calculation", () => { + it("resource group resource", async () => { + const path = + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines"); + }); + + it("resource group sub resource", async () => { + const path = + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines/extensions"); + }); + + it("subscription resource", async () => { + const path = + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines/{vmName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines"); + }); + + it("subscription sub resource", async () => { + const path = + "/subscriptions/{subscriptionId}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines/extensions"); + }); + + it("tenant resource", async () => { + const path = "/providers/Microsoft.Compute/virtualMachines/{vmName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines"); + }); + + it("tenant sub resource", async () => { + const path = + "/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines/extensions"); + }); + + it("extension resource", async () => { + const path = + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Something/somethingElse/{name}/providers/Microsoft.Compute/virtualMachines/{vmName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines"); + }); + + it("extension sub resource", async () => { + const path = + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Something/somethingElse/{name}/providers/Microsoft.Compute/virtualMachines/{vmName}/extensions/{extensionName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Compute/virtualMachines/extensions"); + }); + + it("resource group", async () => { + const path = + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Resources/resourceGroups"); + }); + + it("subscription", async () => { + const path = "/subscriptions/{subscriptionId}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Resources/subscriptions"); + }); + + it("tenant", async () => { + const path = "/tenants/{tenantId}"; + const resourceType = calculateResourceTypeFromPath(path); + strictEqual(resourceType, "Microsoft.Resources/tenants"); + }); +}); diff --git a/eng/packages/http-client-csharp-mgmt/emitter/test/test-util.ts b/eng/packages/http-client-csharp-mgmt/emitter/test/test-util.ts new file mode 100644 index 000000000000..948d4fb07119 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/emitter/test/test-util.ts @@ -0,0 +1,114 @@ +import { AzureCoreTestLibrary } from "@azure-tools/typespec-azure-core/testing"; +import { AzureResourceManagerTestLibrary } from "@azure-tools/typespec-azure-resource-manager/testing"; +import { createSdkContext } from "@azure-tools/typespec-client-generator-core"; +import { SdkTestLibrary } from "@azure-tools/typespec-client-generator-core/testing"; +import { CompilerOptions, EmitContext, Program } from "@typespec/compiler"; +import { createTestHost, TestHost } from "@typespec/compiler/testing"; +import { + createCSharpEmitterContext, + CSharpEmitterContext, + Logger, + LoggerLevel +} from "@typespec/http-client-csharp"; +import { HttpTestLibrary } from "@typespec/http/testing"; +import { RestTestLibrary } from "@typespec/rest/testing"; +import { OpenAPITestLibrary } from "@typespec/openapi/testing"; +import { VersioningTestLibrary } from "@typespec/versioning/testing"; +import { XmlTestLibrary } from "@typespec/xml/testing"; +import { AzureEmitterOptions } from "@azure-typespec/http-client-csharp"; +import { azureSDKContextOptions } from "../src/sdk-context-options.js"; + +export async function createEmitterTestHost(): Promise { + return createTestHost({ + libraries: [ + RestTestLibrary, + HttpTestLibrary, + VersioningTestLibrary, + AzureCoreTestLibrary, + AzureResourceManagerTestLibrary, + OpenAPITestLibrary, + SdkTestLibrary, + XmlTestLibrary + ] + }); +} + +export interface ArmTypeSpecCompileOptions { + providerNamespace?: string; +} + +export async function typeSpecCompile( + content: string, + host: TestHost, + options?: ArmTypeSpecCompileOptions +) { + const fileContent = ` + import "@typespec/http"; + import "@typespec/rest"; + import "@typespec/versioning"; + import "@azure-tools/typespec-azure-core"; + import "@azure-tools/typespec-azure-resource-manager"; + import "@azure-tools/typespec-client-generator-core"; + using TypeSpec.Http; + using TypeSpec.Rest; + using TypeSpec.Versioning; + using Azure.Core; + using Azure.ResourceManager; + using Azure.ClientGenerator.Core; + + @armProviderNamespace + @service(#{ title: "Azure Management emitter Testing" }) + @versioned(Versions) + namespace ${options?.providerNamespace ?? "Microsoft.ContosoProviderHub"}; + + /** api versions */ + enum Versions { + /** 2021-10-01-preview version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + \`2021-10-01-preview\`, + } + + ${content} + `; + host.addTypeSpecFile("main.tsp", fileContent); + const cliOptions = { + warningAsError: false + } as CompilerOptions; + await host.compile("./", cliOptions); + return host.program; +} + +export function createEmitterContext( + program: Program +): EmitContext { + const options: AzureEmitterOptions = { + "new-project": false, + "save-inputs": false, + "generate-protocol-methods": true, + "generate-convenience-methods": true, + "generator-name": "ManagementClientGenerator", + "sdk-context-options": azureSDKContextOptions, + "model-namespace": true + }; + return { + program: program, + emitterOutputDir: "./", + options: options + } as EmitContext; +} + +/* We always need to pass in the emitter name now that it is required so making a helper to do this. */ +export async function createCSharpSdkContext( + program: EmitContext +): Promise { + const context = await createSdkContext( + program, + "@typespec/http-client-csharp", + program.options["sdk-context-options"] + ); + return createCSharpEmitterContext( + context, + new Logger(program.program, LoggerLevel.INFO) + ); +} diff --git a/eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1 b/eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1 index 55e59612b59d..74bb01bf1b40 100644 --- a/eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1 +++ b/eng/packages/http-client-csharp-mgmt/eng/scripts/Generate.ps1 @@ -66,7 +66,7 @@ if ($null -eq $filter) { } # Write the launch settings to the launchSettings.json file - $mgmtLaunchSettingsPath = Join-Path $mgmtSolutionDir "Azure.Generator.Mgmt" "src" "Properties" "launchSettings.json" + $mgmtLaunchSettingsPath = Join-Path $mgmtSolutionDir "Azure.Generator.Management" "src" "Properties" "launchSettings.json" # Write the settings to JSON and normalize line endings to Unix style (LF) $mgmtSortedLaunchSettings | ConvertTo-Json | ForEach-Object { ($_ -replace "`r`n", "`n") + "`n" } | Set-Content -NoNewline $mgmtLaunchSettingsPath } \ No newline at end of file diff --git a/eng/packages/http-client-csharp-mgmt/eng/scripts/Generation.psm1 b/eng/packages/http-client-csharp-mgmt/eng/scripts/Generation.psm1 index 4e5436d2f2c3..ce1b78a0b67a 100644 --- a/eng/packages/http-client-csharp-mgmt/eng/scripts/Generation.psm1 +++ b/eng/packages/http-client-csharp-mgmt/eng/scripts/Generation.psm1 @@ -39,7 +39,7 @@ function Get-Mgmt-TspCommand { if ($generateStub) { $command += " --option @azure-typespec/http-client-csharp-mgmt.plugin-name=AzureStubPlugin" } - + if ($apiVersion) { $command += " --option @azure-typespec/http-client-csharp-mgmt.api-version=$apiVersion" } @@ -58,7 +58,7 @@ function Refresh-Mgmt-Build { } # we don't want to build the entire solution because the test projects might not build until after regeneration - Invoke "dotnet build $repoRoot/../../http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src" + Invoke "dotnet build $repoRoot/../../http-client-csharp-mgmt/generator/Azure.Generator.Management/src" # exit if the generation failed if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management.sln b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management.sln new file mode 100644 index 000000000000..cb1e62c4a81e --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.12.35728.132 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Management", "Azure.Generator.Management\src\Azure.Generator.Management.csproj", "{690F5280-BCDB-433C-B523-D3E782340BA4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Management.Tests", "Azure.Generator.Management\test\Azure.Generator.Mgmt.Tests.csproj", "{236F0049-E44C-40C9-90BB-BD19495CB689}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjects.Local.Tests", "TestProjects\Local.Tests\TestProjects.Local.Tests.csproj", "{E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Tests.Common", "..\..\http-client-csharp\generator\Azure.Generator\test\common\Azure.Generator.Tests.Common.csproj", "{5C43C4D9-AC67-6643-B7AF-DF8096B8265A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {690F5280-BCDB-433C-B523-D3E782340BA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {690F5280-BCDB-433C-B523-D3E782340BA4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {690F5280-BCDB-433C-B523-D3E782340BA4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {690F5280-BCDB-433C-B523-D3E782340BA4}.Release|Any CPU.Build.0 = Release|Any CPU + {236F0049-E44C-40C9-90BB-BD19495CB689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {236F0049-E44C-40C9-90BB-BD19495CB689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {236F0049-E44C-40C9-90BB-BD19495CB689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {236F0049-E44C-40C9-90BB-BD19495CB689}.Release|Any CPU.Build.0 = Release|Any CPU + {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Release|Any CPU.Build.0 = Release|Any CPU + {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9E9389E8-7266-4312-9710-1BE45A571319} + EndGlobalSection +EndGlobal diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj new file mode 100644 index 000000000000..fd60acff8447 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Azure.Generator.Management.csproj @@ -0,0 +1,99 @@ + + + Azure.Generator.Management + 1.0.0-beta.1 + true + + + + + + + + + + + + + + + + + + + + + + + + + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + + diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/InheritableSystemObjectModelVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/InheritableSystemObjectModelVisitor.cs similarity index 99% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/InheritableSystemObjectModelVisitor.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/InheritableSystemObjectModelVisitor.cs index 34baa20dea2c..e66b6f9bb4d1 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/InheritableSystemObjectModelVisitor.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/InheritableSystemObjectModelVisitor.cs @@ -2,7 +2,7 @@ // Licensed under the MIT License. using Azure.Generator.Management.Providers; -using Azure.Generator.Mgmt.Primitives; +using Azure.Generator.Management.Primitives; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; @@ -127,7 +127,7 @@ private static void UpdateFullConstructor(ModelProvider model, FieldProvider raw var body = model.FullConstructor.BodyStatements; var statement = rawDataField.Assign(model.FullConstructor.Signature.Parameters.Single(f => f.Name.Equals(RawDataParameterName))).Terminate(); - MethodBodyStatement[] updatedBody = [statement, .. body!.Flatten()]; + MethodBodyStatement[] updatedBody = [statement, .. body!]; model.FullConstructor.Update(bodyStatements: updatedBody); } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/InputTransformation/InputClientTransformer.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/InputTransformation/InputClientTransformer.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/InputTransformation/InputClientTransformer.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/InputTransformation/InputClientTransformer.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementClientGenerator.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementClientGenerator.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementClientGenerator.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementClientGenerator.cs 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 new file mode 100644 index 000000000000..61450379df82 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementInputLibrary.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Generator.Management.Models; +using Azure.Generator.Management.Primitives; +using Microsoft.TypeSpec.Generator.Input; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.Generator.Management +{ + /// + public class ManagementInputLibrary : InputLibrary + { + private IReadOnlyList? _allClients; + private IReadOnlyDictionary? _resourceMetadata; + private IReadOnlyDictionary? _inputModelsByCrossLanguageDefinitionId; + private IReadOnlyDictionary? _inputClientsByCrossLanguageDefinitionId; + + /// + public ManagementInputLibrary(string configPath) : base(configPath) + { + } + + /// + /// All clients in the input library, including the subclients. + /// + internal IReadOnlyList AllClients => _allClients ??= EnumerateClients(); + + private IReadOnlyDictionary ResourceMetadata => _resourceMetadata ??= DeserializeResourceMetadata(); + + private IReadOnlyDictionary InputModelsByCrossLanguageDefinitionId => _inputModelsByCrossLanguageDefinitionId ??= BuildModelCrossLanguageDefinitionIds(); + + private IReadOnlyDictionary InputClientsByCrossLanguageDefinitionId => _inputClientsByCrossLanguageDefinitionId ??= AllClients.ToDictionary(c => c.CrossLanguageDefinitionId, c => c); + + internal ResourceMetadata? GetResourceMetadata(InputClient client) + => ResourceMetadata.TryGetValue(client, out var metadata) ? metadata : null; + + internal InputModelType? GetModelByCrossLanguageDefinitionId(string crossLanguageDefinitionId) + => InputModelsByCrossLanguageDefinitionId.TryGetValue(crossLanguageDefinitionId, out var model) ? model : null; + + internal InputClient? GetClientByCrossLanguageDefinitionId(string crossLanguageDefinitionId) + => InputClientsByCrossLanguageDefinitionId.TryGetValue(crossLanguageDefinitionId, out var client) ? client : null; + + internal bool IsResourceModel(InputModelType model) + => model.Decorators.Any(d => d.Name.Equals(KnownDecorators.ArmResourceInternal)); + + private IReadOnlyList EnumerateClients() + { + var clients = new List(InputNamespace.Clients); + for (int i = 0; i < clients.Count; i++) + { + var client = clients[i]; + clients.AddRange(client.Children); + } + + return clients; + } + + private IReadOnlyDictionary BuildModelCrossLanguageDefinitionIds() + { + // TODO -- we must have this because of a bug or a design issue in TCGC: https://github.com/Azure/typespec-azure/issues/1297 + // once this is solved, we could change this to the simple invocation of `ToDictionary`. + var result = new Dictionary(); + foreach (var model in InputNamespace.Models) + { + if (!result.ContainsKey(model.CrossLanguageDefinitionId)) + { + result.Add(model.CrossLanguageDefinitionId, model); + } + } + return result; + } + + private IReadOnlyDictionary DeserializeResourceMetadata() + { + var resourceMetadata = new Dictionary(); + foreach (var client in AllClients) + { + var decorator = client.Decorators.FirstOrDefault(d => d.Name == KnownDecorators.ResourceMetadata); + if (decorator != null) + { + var metadata = BuildResourceMetadata(decorator); + resourceMetadata.Add(client, metadata); + } + } + return resourceMetadata; + + ResourceMetadata BuildResourceMetadata(InputDecoratorInfo decorator) + { + var args = decorator.Arguments ?? throw new InvalidOperationException(); + string? resourceType = null; + InputModelType? resourceModel = null; + InputClient? resourceClient = null; + bool isSingleton = false; + ResourceScope? resourceScope = null; + if (args.TryGetValue(KnownDecorators.ResourceType, out var resourceTypeData)) + { + resourceType = resourceTypeData.ToObjectFromJson(); + } + + if (args.TryGetValue(KnownDecorators.ResourceModel, out var resourceModelData)) + { + var resourceModelId = resourceModelData.ToObjectFromJson(); + if (resourceModelId != null) + { + resourceModel = GetModelByCrossLanguageDefinitionId(resourceModelId!); + } + } + + if (args.TryGetValue(KnownDecorators.ResourceClient, out var resourceClientData)) + { + var resourceClientId = resourceClientData.ToObjectFromJson(); + if (resourceClientId != null) + { + resourceClient = GetClientByCrossLanguageDefinitionId(resourceClientId!); + } + } + + if (args.TryGetValue(KnownDecorators.IsSingleton, out var isSingletonData)) + { + isSingleton = isSingletonData.ToObjectFromJson(); + } + + if (args.TryGetValue(KnownDecorators.ResourceScope, out var scopeData)) + { + var scopeString = scopeData.ToObjectFromJson(); + if (Enum.TryParse(scopeString, true, out var scope)) + { + resourceScope = scope; + } + } + + // TODO -- I know we should never throw the exception, but here we just put it here and refine it later + return new(resourceType ?? throw new InvalidOperationException("resourceType cannot be null"), + resourceModel ?? throw new InvalidOperationException("resourceModel cannot be null"), + resourceClient ?? throw new InvalidOperationException("resourceClient cannot be null"), + isSingleton, + resourceScope ?? throw new InvalidOperationException("resourceScope cannot be null")); + } + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementOutputLibrary.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementOutputLibrary.cs similarity index 86% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementOutputLibrary.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementOutputLibrary.cs index 41c48920c259..1c708ef54d71 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementOutputLibrary.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementOutputLibrary.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Providers; using Microsoft.TypeSpec.Generator.Providers; using System.Collections.Generic; @@ -22,7 +21,7 @@ public class ManagementOutputLibrary : AzureOutputLibrary { var resources = new List(); var collections = new List(); - foreach (var client in ManagementClientGenerator.Instance.InputLibrary.InputNamespace.Clients) + foreach (var client in ManagementClientGenerator.Instance.InputLibrary.AllClients) { BuildResourceCore(resources, collections, client); } @@ -32,24 +31,19 @@ public class ManagementOutputLibrary : AzureOutputLibrary private static void BuildResourceCore(List resources, List collections, Microsoft.TypeSpec.Generator.Input.InputClient client) { // A resource client should contain the decorator "Azure.ResourceManager.@resourceMetadata" - var resourceMetadata = client.Decorators.FirstOrDefault(d => d.Name.Equals(KnownDecorators.ResourceMetadata)); + var resourceMetadata = ManagementClientGenerator.Instance.InputLibrary.GetResourceMetadata(client); if (resourceMetadata is not null) { - var resource = new ResourceClientProvider(client); + var resource = new ResourceClientProvider(client, resourceMetadata); ManagementClientGenerator.Instance.AddTypeToKeep(resource.Name); resources.Add(resource); if (!resource.IsSingleton) { - var collection = new ResourceCollectionClientProvider(client, resource); + var collection = new ResourceCollectionClientProvider(client, resourceMetadata, resource); ManagementClientGenerator.Instance.AddTypeToKeep(collection.Name); collections.Add(collection); } } - - foreach (var child in client.Children) - { - BuildResourceCore(resources, collections, child); - } } /// diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementTypeFactory.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementTypeFactory.cs similarity index 98% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementTypeFactory.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementTypeFactory.cs index b3be8e825630..8f4bfd850db4 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementTypeFactory.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ManagementTypeFactory.cs @@ -3,7 +3,7 @@ using Azure.Generator.Management.InputTransformation; using Azure.Generator.Management.Providers.Abstraction; -using Azure.Generator.Mgmt.Primitives; +using Azure.Generator.Management.Primitives; using Microsoft.TypeSpec.Generator; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Models/RequestPath.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPath.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Models/RequestPath.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/RequestPath.cs 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 new file mode 100644 index 000000000000..ba99d6783dbc --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceMetadata.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Microsoft.TypeSpec.Generator.Input; + +namespace Azure.Generator.Management.Models +{ + internal record ResourceMetadata(string ResourceType, InputModelType ResourceModel, InputClient ResourceClient, bool IsSingleton, ResourceScope ResourceScope); +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceScope.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceScope.cs new file mode 100644 index 000000000000..888c0520eeb3 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Models/ResourceScope.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Generator.Management.Models +{ + internal enum ResourceScope + { + Tenant, + Subscription, + ResourceGroup + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownAzureParameters.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownAzureParameters.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownAzureParameters.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownAzureParameters.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownDecorators.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownDecorators.cs similarity index 87% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownDecorators.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownDecorators.cs index 16f0f8bfde0d..229d870fb7cb 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownDecorators.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownDecorators.cs @@ -11,8 +11,10 @@ internal class KnownDecorators public const string ResourceMetadata = "Azure.ClientGenerator.Core.@resourceSchema"; public const string ArmResourceInternal = "Azure.ResourceManager.Private.@armResourceInternal"; + public const string ResourceClient = "resourceClient"; public const string ResourceModel = "resourceModel"; public const string ResourceType = "resourceType"; public const string IsSingleton = "isSingleton"; + public const string ResourceScope = "resourceScope"; } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownManagementTypes.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs similarity index 98% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownManagementTypes.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs index fa3c318ac359..51477d81faa4 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Primitives/KnownManagementTypes.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Primitives/KnownManagementTypes.cs @@ -9,7 +9,7 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; -namespace Azure.Generator.Mgmt.Primitives +namespace Azure.Generator.Management.Primitives { internal class KnownManagementTypes { diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Properties/AssemblyInfo.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Properties/AssemblyInfo.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Properties/AssemblyInfo.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Properties/AssemblyInfo.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Properties/launchSettings.json b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Properties/launchSettings.json similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Properties/launchSettings.json rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Properties/launchSettings.json diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/Abstraction/MgmtHttpPipelineProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/Abstraction/MgmtHttpPipelineProvider.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/Abstraction/MgmtHttpPipelineProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/Abstraction/MgmtHttpPipelineProvider.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/InheritableSystemObjectModelProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/InheritableSystemObjectModelProvider.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/InheritableSystemObjectModelProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/InheritableSystemObjectModelProvider.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ManagementLongRunningOperationProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ManagementLongRunningOperationProvider.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ManagementLongRunningOperationProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ManagementLongRunningOperationProvider.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/OperationSourceProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationSourceProvider.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/OperationSourceProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/OperationSourceProvider.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs similarity index 90% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceClientProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs index 29df7bec9eba..be437d8f7b0a 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceClientProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceClientProvider.cs @@ -34,19 +34,17 @@ internal class ResourceClientProvider : TypeProvider private IReadOnlyCollection _resourceServiceMethods; private FieldProvider _dataField; - private FieldProvider _resourcetypeField; + private FieldProvider _resourceTypeField; protected ClientProvider _clientProvider; protected FieldProvider _clientDiagonosticsField; protected FieldProvider _restClientField; - public ResourceClientProvider(InputClient inputClient) + public ResourceClientProvider(InputClient inputClient, ResourceMetadata resourceMetadata) { - var resourceMetadata = inputClient.Decorators.Single(d => d.Name.Equals(KnownDecorators.ResourceMetadata)); - var codeModelId = resourceMetadata.Arguments?[KnownDecorators.ResourceModel].ToObjectFromJson()!; - IsSingleton = resourceMetadata.Arguments?.TryGetValue("isSingleton", out var isSingleton) == true ? isSingleton.ToObjectFromJson() : false; - var resourceType = resourceMetadata.Arguments?[KnownDecorators.ResourceType].ToObjectFromJson()!; - _resourcetypeField = new FieldProvider(FieldModifiers.Public | FieldModifiers.Static | FieldModifiers.ReadOnly, typeof(ResourceType), "ResourceType", this, description: $"Gets the resource type for the operations.", initializationValue: Literal(resourceType)); - var resourceModel = ManagementClientGenerator.Instance.InputLibrary.GetModelByCrossLanguageDefinitionId(codeModelId)!; + IsSingleton = resourceMetadata.IsSingleton; + var resourceType = resourceMetadata.ResourceType; + _resourceTypeField = new FieldProvider(FieldModifiers.Public | FieldModifiers.Static | FieldModifiers.ReadOnly, typeof(ResourceType), "ResourceType", this, description: $"Gets the resource type for the operations.", initializationValue: Literal(resourceType)); + var resourceModel = resourceMetadata.ResourceModel; SpecName = resourceModel.Name; // We should be able to assume that all operations in the resource client are for the same resource @@ -90,7 +88,7 @@ private IReadOnlyList GetContextualParameters(string contextualRequestPa protected override string BuildRelativeFilePath() => Path.Combine("src", "Generated", $"{Name}.cs"); - protected override FieldProvider[] BuildFields() => [_clientDiagonosticsField, _restClientField, _dataField, _resourcetypeField]; + protected override FieldProvider[] BuildFields() => [_clientDiagonosticsField, _restClientField, _dataField, _resourceTypeField]; protected override PropertyProvider[] BuildProperties() { @@ -196,11 +194,11 @@ protected MethodProvider BuildValidateResourceIdMethod() return new MethodProvider(signature, bodyStatements, this); } - protected virtual ValueExpression ResourceTypeExpression => _resourcetypeField; + protected virtual ValueExpression ResourceTypeExpression => _resourceTypeField; - protected virtual ValueExpression ExpectedResourceTypeForValidation => _resourcetypeField; + protected virtual ValueExpression ExpectedResourceTypeForValidation => _resourceTypeField; - protected virtual CSharpType ResourceClientCharpType => this.Type; + protected virtual CSharpType ResourceClientCSharpType => this.Type; protected override CSharpType[] BuildImplements() => [typeof(ArmResource)]; @@ -311,36 +309,36 @@ protected CSharpType GetOperationMethodReturnType(InputServiceMethod method, boo } else { - return isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(ArmOperation<>), ResourceClientCharpType)) : new CSharpType(typeof(ArmOperation<>), ResourceClientCharpType); + return isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(ArmOperation<>), ResourceClientCSharpType)) : new CSharpType(typeof(ArmOperation<>), ResourceClientCSharpType); } } - return isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(Response<>), ResourceClientCharpType)) : new CSharpType(typeof(Response<>), ResourceClientCharpType); + return isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(Response<>), ResourceClientCSharpType)) : new CSharpType(typeof(Response<>), ResourceClientCSharpType); } - private TryStatement BuildOperationMethodTryStatement(InputServiceMethod method, MethodProvider convenienceMethod, MethodSignature signature, bool isAsync, bool isGeneric) + private TryExpression BuildOperationMethodTryStatement(InputServiceMethod method, MethodProvider convenienceMethod, MethodSignature signature, bool isAsync, bool isGeneric) { var operation = method.Operation; var cancellationToken = convenienceMethod.Signature.Parameters.Single(p => p.Type.Equals(typeof(CancellationToken))); - var tryStatement = new TryStatement(); + var tryStatements = new List(); var contextDeclaration = Declare("context", typeof(RequestContext), New.Instance(typeof(RequestContext), new Dictionary { { Identifier(nameof(RequestContext.CancellationToken)), cancellationToken } }), out var contextVariable); - tryStatement.Add(contextDeclaration); + tryStatements.Add(contextDeclaration); var requestMethod = GetCorrespondingRequestMethod(operation); var messageDeclaration = Declare("message", typeof(HttpMessage), _restClientField.Invoke(requestMethod.Signature.Name, PopulateArguments(requestMethod.Signature.Parameters, convenienceMethod, contextVariable)), out var messageVariable); - tryStatement.Add(messageDeclaration); + tryStatements.Add(messageDeclaration); var responseType = GetResponseType(convenienceMethod, isAsync); VariableExpression responseVariable; if (!responseType.Equals(typeof(Response))) { var resultDeclaration = Declare("result", typeof(Response), This.Property("Pipeline").Invoke(isAsync ? "ProcessMessageAsync" : "ProcessMessage", [messageVariable, contextVariable], null, isAsync), out var resultVariable); - tryStatement.Add(resultDeclaration); + tryStatements.Add(resultDeclaration); var responseDeclaration = Declare("response", responseType, Static(typeof(Response)).Invoke(nameof(Response.FromValue), [resultVariable.CastTo(ResourceData.Type), resultVariable]), out responseVariable); - tryStatement.Add(responseDeclaration); + tryStatements.Add(responseDeclaration); } else { var responseDeclaration = Declare("response", typeof(Response), This.Property("Pipeline").Invoke(isAsync ? "ProcessMessageAsync" : "ProcessMessage", [messageVariable, contextVariable], null, isAsync), out responseVariable); - tryStatement.Add(responseDeclaration); + tryStatements.Add(responseDeclaration); } if (method is InputLongRunningServiceMethod || method is InputLongRunningPagingServiceMethod) @@ -355,25 +353,25 @@ private TryStatement BuildOperationMethodTryStatement(InputServiceMethod method, finalStateVia = (OperationFinalStateVia)lroPagingMethod.LongRunningServiceMetadata.FinalStateVia; } - var armOperationType = !isGeneric ? ManagementClientGenerator.Instance.OutputLibrary.ArmOperation.Type : ManagementClientGenerator.Instance.OutputLibrary.GenericArmOperation.Type.MakeGenericType([ResourceClientCharpType]); + var armOperationType = !isGeneric ? ManagementClientGenerator.Instance.OutputLibrary.ArmOperation.Type : ManagementClientGenerator.Instance.OutputLibrary.GenericArmOperation.Type.MakeGenericType([ResourceClientCSharpType]); ValueExpression[] armOperationArguments = [_clientDiagonosticsField, This.Property("Pipeline"), messageVariable.Property("Request"), isGeneric ? responseVariable.Invoke("GetRawResponse") : responseVariable, Static(typeof(OperationFinalStateVia)).Property(finalStateVia.ToString())]; var operationDeclaration = Declare("operation", armOperationType, New.Instance(armOperationType, isGeneric ? [New.Instance(Source.Type, This.Property("Client")), .. armOperationArguments] : armOperationArguments), out var operationVariable); - tryStatement.Add(operationDeclaration); - tryStatement.Add(new IfStatement(KnownAzureParameters.WaitUntil.Equal(Static(typeof(WaitUntil)).Property(nameof(WaitUntil.Completed)))) + tryStatements.Add(operationDeclaration); + tryStatements.Add(new IfStatement(KnownAzureParameters.WaitUntil.Equal(Static(typeof(WaitUntil)).Property(nameof(WaitUntil.Completed)))) { isAsync ? operationVariable.Invoke(isGeneric ? "WaitForCompletionAsync" : "WaitForCompletionResponseAsync", [cancellationToken], null, isAsync).Terminate() : operationVariable.Invoke(isGeneric ? "WaitForCompletion" : "WaitForCompletionResponse", cancellationToken).Terminate() }); - tryStatement.Add(Return(operationVariable)); + tryStatements.Add(Return(operationVariable)); } else { - tryStatement.Add(BuildReturnStatements(responseVariable, signature)); + tryStatements.Add(BuildReturnStatements(responseVariable, signature)); } - return tryStatement; + return new TryExpression(tryStatements); } protected virtual MethodBodyStatement BuildReturnStatements(ValueExpression responseVariable, MethodSignature signature) @@ -385,7 +383,7 @@ protected virtual MethodBodyStatement BuildReturnStatements(ValueExpression resp ((KeywordExpression)ThrowExpression(New.Instance(typeof(RequestFailedException), responseVariable.Invoke("GetRawResponse")))).Terminate() }, ]; - var returnValueExpression = New.Instance(ResourceClientCharpType, This.Property("Client"), responseVariable.Property("Value")); + var returnValueExpression = New.Instance(ResourceClientCSharpType, This.Property("Client"), responseVariable.Property("Value")); statements.Add(Return(Static(typeof(Response)).Invoke(nameof(Response.FromValue), returnValueExpression, responseVariable.Invoke("GetRawResponse")))); return statements; diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceCollectionClientProvider.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs similarity index 90% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceCollectionClientProvider.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs index 62b314428b9b..fe7a6dd037b8 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Providers/ResourceCollectionClientProvider.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Providers/ResourceCollectionClientProvider.cs @@ -1,5 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using Azure.Generator.Management.Models; using Azure.Generator.Management.Primitives; using Azure.Generator.Management.Utilities; using Azure.ResourceManager; @@ -26,7 +27,7 @@ internal class ResourceCollectionClientProvider : ResourceClientProvider private InputServiceMethod? _create; private InputServiceMethod? _get; - public ResourceCollectionClientProvider(InputClient inputClient, ResourceClientProvider resource) : base(inputClient) + public ResourceCollectionClientProvider(InputClient inputClient, ResourceMetadata resourceMetadata, ResourceClientProvider resource) : base(inputClient, resourceMetadata) { _resource = resource; @@ -69,7 +70,7 @@ protected override ConstructorProvider[] BuildConstructors() protected override ValueExpression ResourceTypeExpression => Static(_resource.Type).Property("ResourceType"); - protected override CSharpType ResourceClientCharpType => _resource.Type; + protected override CSharpType ResourceClientCSharpType => _resource.Type; protected override MethodProvider[] BuildMethods() => [BuildValidateResourceIdMethod(), .. BuildCreateOrUpdateMethods(), .. BuildGetMethods(), .. BuildGetAllMethods(), .. BuildExistsMethods(), .. BuildGetIfExistsMethods(), .. BuildEnumeratorMethods()]; @@ -209,7 +210,7 @@ private List BuildGetIfExistsMethods() isAsync ? "GetIfExistsAsync" : "GetIfExists", $"Tries to get details for this resource from the service.", convenienceMethod.Signature.Modifiers, - isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(NullableResponse<>), ResourceClientCharpType)) : new CSharpType(typeof(NullableResponse<>), ResourceClientCharpType), + isAsync ? new CSharpType(typeof(Task<>), new CSharpType(typeof(NullableResponse<>), ResourceClientCSharpType)) : new CSharpType(typeof(NullableResponse<>), ResourceClientCSharpType), convenienceMethod.Signature.ReturnDescription, GetOperationMethodParameters(convenienceMethod, false), convenienceMethod.Signature.Attributes, @@ -246,21 +247,19 @@ protected override MethodBodyStatement BuildReturnStatements(ValueExpression res return base.BuildReturnStatements(responseVariable, signature); } - // TODO: make the commented implementation work - find a way to access the NoValueResponse type private MethodBodyStatement BuildReturnStatementsForGetIfExists(ValueExpression responseVariable, MethodSignature signature) { - // List statements = - // [ - // new IfStatement(responseVariable.Property("Value").Equal(Null)) - // { - // Return(New.Instance(new CSharpType(typeof(NoValueResponse<>), _resource.Type), responseVariable.Invoke("GetRawResponse"))) - // } - // ]; - // var returnValueExpression = New.Instance(ResourceClientCharpType, This.Property("Client"), responseVariable.Property("Value")); - // statements.Add(Return(Static(typeof(Response)).Invoke(nameof(Response.FromValue), returnValueExpression, responseVariable.Invoke("GetRawResponse")))); - - // return statements; - return base.BuildReturnStatements(responseVariable, signature); + List statements = + [ + new IfStatement(responseVariable.Property("Value").Equal(Null)) + { + Return(New.Instance(new CSharpType(typeof(NoValueResponse<>), _resource.Type), responseVariable.Invoke("GetRawResponse"))) + } + ]; + var returnValueExpression = New.Instance(ResourceClientCSharpType, This.Property("Client"), responseVariable.Property("Value")); + statements.Add(Return(Static(typeof(Response)).Invoke(nameof(Response.FromValue), returnValueExpression, responseVariable.Invoke("GetRawResponse")))); + + return statements; } private MethodBodyStatement BuildReturnStatementsForExists(ValueExpression responseVariable) diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ResourceVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs similarity index 93% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ResourceVisitor.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs index 164b586faf0b..097d57169996 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ResourceVisitor.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/ResourceVisitor.cs @@ -23,7 +23,7 @@ internal class ResourceVisitor : ScmLibraryVisitor private void TransformResource(InputModelType model, TypeProvider type) { - if (type is ModelProvider && model.Decorators.Any(d => d.Name.Equals(KnownDecorators.ArmResourceInternal))) + if (type is ModelProvider && ManagementClientGenerator.Instance.InputLibrary.IsResourceModel(model)) { type.Update(relativeFilePath: TransformRelativeFilePath(type)); type.Type.Update(TransformName(type)); diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/RestClientVisitor.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/RestClientVisitor.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/RestClientVisitor.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/RestClientVisitor.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Utilities/ConstructorProviderHelper.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ConstructorProviderHelper.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Utilities/ConstructorProviderHelper.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/src/Utilities/ConstructorProviderHelper.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Azure.Generator.Mgmt.Tests.csproj b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Azure.Generator.Mgmt.Tests.csproj new file mode 100644 index 000000000000..de5dcbddc5d1 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Azure.Generator.Mgmt.Tests.csproj @@ -0,0 +1,35 @@ + + + + enable + + + + + + + + + + + + PreserveNewest + + + + + + PreserveNewest + + + + + + + + + + + + + diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Common/InputResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Common/InputResourceData.cs new file mode 100644 index 000000000000..cb89e489c0c6 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Common/InputResourceData.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Generator.Management.Models; +using Azure.Generator.Management.Primitives; +using Azure.Generator.Tests.Common; +using Microsoft.TypeSpec.Generator.Input; + +namespace Azure.Generator.Management.Tests.Common +{ + internal static class InputResourceData + { + public static (InputClient InputClient, IReadOnlyList InputModels) ClientWithResource() + { + const string TestClientName = "TestClient"; + const string ResourceModelName = "ResponseType"; + var responseModel = InputFactory.Model(ResourceModelName, + usage: InputModelTypeUsage.Output | InputModelTypeUsage.Json, + properties: + [ + InputFactory.Property("id", InputPrimitiveType.String), + InputFactory.Property("type", InputPrimitiveType.String), + InputFactory.Property("name", InputFactory.Primitive.String()), + ], + decorators: [new InputDecoratorInfo(KnownDecorators.ArmResourceInternal, null)]); + var responseType = InputFactory.OperationResponse(statusCodes: [200], bodytype: responseModel); + var testNameParameter = InputFactory.Parameter("testName", InputPrimitiveType.String, location: InputRequestLocation.Path); + var operation = InputFactory.Operation(name: "get", responses: [responseType], parameters: [testNameParameter], path: "/providers/a/test/{testName}", decorators: [new InputDecoratorInfo(KnownDecorators.ArmResourceRead, null)]); + var decorators = new List() + { + new InputDecoratorInfo(KnownDecorators.ArmProviderNamespace, new Dictionary()) + }; + var client = InputFactory.Client( + TestClientName, + methods: [InputFactory.BasicServiceMethod("Get", operation, parameters: [testNameParameter])], + crossLanguageDefinitionId: $"Test.{TestClientName}", + decorators: decorators); + decorators.Add(BuildResourceMetadata(responseModel, client, "a/test", false, ResourceScope.ResourceGroup)); + return (client, [responseModel]); + } + + private static InputDecoratorInfo BuildResourceMetadata(InputModelType resourceModel, InputClient resourceClient, string resourceType, bool isSingleton, ResourceScope resourceScope) + { + var arguments = new Dictionary + { + [KnownDecorators.ResourceModel] = FromLiteralString(resourceModel.CrossLanguageDefinitionId), + [KnownDecorators.ResourceClient] = FromLiteralString(resourceClient.CrossLanguageDefinitionId), + [KnownDecorators.ResourceType] = FromLiteralString(resourceType), + [KnownDecorators.IsSingleton] = BinaryData.FromObjectAsJson(isSingleton), + [KnownDecorators.ResourceScope] = FromLiteralString(resourceScope.ToString()), + }; + + return new InputDecoratorInfo(KnownDecorators.ResourceMetadata, arguments); + + static BinaryData FromLiteralString(string literal) + => BinaryData.FromString($"\"{literal}\""); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/MgmtLroProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/MgmtLroProviderTests.cs new file mode 100644 index 000000000000..a8329083c691 --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/MgmtLroProviderTests.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Generator.Management.Providers; +using Azure.Generator.Management.Tests.TestHelpers; +using Azure.Generator.Tests.Common; +using Microsoft.TypeSpec.Generator.Primitives; +using NUnit.Framework; + +namespace Azure.Generator.Management.Tests.Providers +{ + internal class MgmtLroProviderTests + { + [SetUp] + public void SetUp() + { + ManagementMockHelpers.LoadMockPlugin(); + } + + [TestCase] + public void Verify_NonGeneric_LROProviderGeneration() + { + var nonGenericLROProvider = new ManagementLongRunningOperationProvider(false); + var codeFile = new TypeProviderWriter(nonGenericLROProvider).Write(); + var result = codeFile.Content; + + var exptected = Helpers.GetExpectedFromFile(); + + Assert.AreEqual(exptected, result); + } + + [TestCase] + public void Verify_Generic_LROProviderGeneration() + { + var genericLROProvider = new ManagementLongRunningOperationProvider(true); + var codeFile = new TypeProviderWriter(genericLROProvider).Write(); + var result = codeFile.Content; + + var exptected = Helpers.GetExpectedFromFile(); + + Assert.AreEqual(exptected, result); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/OperationSourceProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/OperationSourceProviderTests.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/OperationSourceProviderTests.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/OperationSourceProviderTests.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ResourceClientProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/ResourceClientProviderTests.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ResourceClientProviderTests.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/ResourceClientProviderTests.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/ResourceCollectionClientProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/ResourceCollectionClientProviderTests.cs new file mode 100644 index 000000000000..52143fec1fba --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/ResourceCollectionClientProviderTests.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Generator.Management.Providers; +using Azure.Generator.Management.Tests.Common; +using Azure.Generator.Management.Tests.TestHelpers; +using Azure.Generator.Tests.Common; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using NUnit.Framework; + +namespace Azure.Generator.Management.Tests.Providers +{ + internal class ResourceCollectionClientProviderTests + { + private static MethodProvider GetResourceCollectionClientProviderMethodByName(string methodName) + { + ResourceCollectionClientProvider resourceProvider = GetResourceCollectionClientProvider(); + var method = resourceProvider.Methods.FirstOrDefault(m => m.Signature.Name == methodName); + Assert.NotNull(method); + return method!; + } + + private static ResourceCollectionClientProvider GetResourceCollectionClientProvider() + { + var (client, models) = InputResourceData.ClientWithResource(); + var plugin = ManagementMockHelpers.LoadMockPlugin(inputModels: () => models, clients: () => [client]); + var resourceProvider = plugin.Object.OutputLibrary.TypeProviders.FirstOrDefault(p => p is ResourceCollectionClientProvider) as ResourceCollectionClientProvider; + Assert.NotNull(resourceProvider); + return resourceProvider!; + } + + [TestCase] + public void Verify_GetOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("Get"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Response<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + + [TestCase] + public void Verify_GetAsyncOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("GetAsync"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual | MethodSignatureModifiers.Async)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Task<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + + [TestCase] + public void Verify_ExistsOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("Exists"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Response<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + + [TestCase] + public void Verify_ExistsAsyncOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("ExistsAsync"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual | MethodSignatureModifiers.Async)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Task<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + + [TestCase] + public void Verify_GetIfExistsOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("GetIfExists"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(NullableResponse<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + + [TestCase] + public void Verify_GetIfExistsAsyncOperationMethod() + { + MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("GetIfExistsAsync"); + + // verify the method signature + var signature = getMethod.Signature; + Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual | MethodSignatureModifiers.Async)); + Assert.IsTrue(signature.Parameters.Count == 2); + Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); + Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); + Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Task<>)); + + // verify the method body + var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); + Assert.NotNull(bodyStatements); + var exptected = Helpers.GetExpectedFromFile(); + Assert.AreEqual(exptected, bodyStatements); + } + } +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ManagementLongRunningOperationProviderTests/Verify_Generic_LROProviderGeneration.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/MgmtLroProviderTests/Verify_Generic_LROProviderGeneration.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ManagementLongRunningOperationProviderTests/Verify_Generic_LROProviderGeneration.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/MgmtLroProviderTests/Verify_Generic_LROProviderGeneration.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ManagementLongRunningOperationProviderTests/Verify_NonGeneric_LROProviderGeneration.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/MgmtLroProviderTests/Verify_NonGeneric_LROProviderGeneration.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ManagementLongRunningOperationProviderTests/Verify_NonGeneric_LROProviderGeneration.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/MgmtLroProviderTests/Verify_NonGeneric_LROProviderGeneration.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/OperationSourceProviderTests/Verify_CreateResult.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/OperationSourceProviderTests/Verify_CreateResult.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/OperationSourceProviderTests/Verify_CreateResult.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/OperationSourceProviderTests/Verify_CreateResult.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/OperationSourceProviderTests/Verify_CreateResultAsync.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/OperationSourceProviderTests/Verify_CreateResultAsync.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/OperationSourceProviderTests/Verify_CreateResultAsync.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/OperationSourceProviderTests/Verify_CreateResultAsync.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_AsyncOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_AsyncOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_AsyncOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_AsyncOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithData.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithData.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithData.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithData.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithId.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithId.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithId.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ConstructorWithId.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_SyncOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_SyncOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_SyncOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_SyncOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ValidateIdMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ValidateIdMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceClientProviderTests/Verify_ValidateIdMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceClientProviderTests/Verify_ValidateIdMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsAsyncOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsAsyncOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsAsyncOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsAsyncOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_ExistsOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetAsyncOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetAsyncOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetAsyncOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetAsyncOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsAsyncOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsAsyncOperationMethod.cs new file mode 100644 index 000000000000..bb5732c731db --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsAsyncOperationMethod.cs @@ -0,0 +1,23 @@ +using global::Azure.Core.Pipeline.DiagnosticScope scope = _responsetypeClientDiagnostics.CreateScope("ResponseTypeCollection.GetIfExistsAsync"); +scope.Start(); +try +{ + global::Azure.RequestContext context = new global::Azure.RequestContext + { + CancellationToken = cancellationToken + } + ; + global::Azure.Core.HttpMessage message = _responsetypeRestClient.CreateGetRequest(this.Id.Name, context); + global::Azure.Response result = await this.Pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + global::Azure.Response response = global::Azure.Response.FromValue(((global::Samples.Models.ResponseTypeData)result), result); + if ((response.Value == null)) + { + return new global::Azure.NoValueResponse(response.GetRawResponse()); + } + return global::Azure.Response.FromValue(new global::Samples.ResponseTypeResource(this.Client, response.Value), response.GetRawResponse()); +} +catch (global::System.Exception e) +{ + scope.Failed(e); + throw; +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsOperationMethod.cs new file mode 100644 index 000000000000..00a31b5a466d --- /dev/null +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetIfExistsOperationMethod.cs @@ -0,0 +1,23 @@ +using global::Azure.Core.Pipeline.DiagnosticScope scope = _responsetypeClientDiagnostics.CreateScope("ResponseTypeCollection.GetIfExists"); +scope.Start(); +try +{ + global::Azure.RequestContext context = new global::Azure.RequestContext + { + CancellationToken = cancellationToken + } + ; + global::Azure.Core.HttpMessage message = _responsetypeRestClient.CreateGetRequest(this.Id.Name, context); + global::Azure.Response result = this.Pipeline.ProcessMessage(message, context); + global::Azure.Response response = global::Azure.Response.FromValue(((global::Samples.Models.ResponseTypeData)result), result); + if ((response.Value == null)) + { + return new global::Azure.NoValueResponse(response.GetRawResponse()); + } + return global::Azure.Response.FromValue(new global::Samples.ResponseTypeResource(this.Client, response.Value), response.GetRawResponse()); +} +catch (global::System.Exception e) +{ + scope.Failed(e); + throw; +} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetOperationMethod.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetOperationMethod.cs similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetOperationMethod.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/Providers/TestData/ResourceCollectionClientProviderTests/Verify_GetOperationMethod.cs diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/TestHelpers/Configuration.json b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/TestHelpers/Configuration.json similarity index 100% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/TestHelpers/Configuration.json rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/TestHelpers/Configuration.json diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/TestHelpers/ManagementMockHelpers.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/TestHelpers/ManagementMockHelpers.cs similarity index 94% rename from eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/TestHelpers/ManagementMockHelpers.cs rename to eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/TestHelpers/ManagementMockHelpers.cs index 1b9465564c7c..da671fd4c526 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/TestHelpers/ManagementMockHelpers.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Management/test/TestHelpers/ManagementMockHelpers.cs @@ -25,6 +25,7 @@ public static Mock LoadMockPlugin( Func? apiKeyAuth = null, Func? oauth2Auth = null, Func>? apiVersions = null, + Func>? inputLiterals = null, Func>? inputEnums = null, Func>? inputModels = null, Func>? clients = null, @@ -33,6 +34,7 @@ public static Mock LoadMockPlugin( HttpMessageApi? httpMessageApi = null) { IReadOnlyList inputNsApiVersions = apiVersions?.Invoke() ?? []; + IReadOnlyList inputNsLiterals = inputLiterals?.Invoke() ?? []; IReadOnlyList inputNsEnums = inputEnums?.Invoke() ?? []; IReadOnlyList inputNsClients = clients?.Invoke() ?? []; IReadOnlyList inputNsModels = inputModels?.Invoke() ?? []; @@ -41,6 +43,7 @@ public static Mock LoadMockPlugin( var mockInputNs = new Mock( "Samples", inputNsApiVersions, + inputNsLiterals, inputNsEnums, inputNsModels, inputNsClients, @@ -75,7 +78,7 @@ public static Mock LoadMockPlugin( mockPluginInstance.SetupGet(p => p.TypeFactory).Returns(mockTypeFactory.Object); } - var sourceInputModel = new Mock(() => new SourceInputModel(null)) { CallBase = true }; + var sourceInputModel = new Mock(() => new SourceInputModel(null, null)) { CallBase = true }; mockPluginInstance.Setup(p => p.SourceInputModel).Returns(sourceInputModel.Object); var configureMethod = typeof(CodeModelGenerator).GetMethod( "Configure", diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt.sln b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt.sln deleted file mode 100644 index 350e4f2251d5..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt.sln +++ /dev/null @@ -1,43 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.12.35728.132 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Mgmt", "Azure.Generator.Mgmt\src\Azure.Generator.Mgmt.csproj", "{690F5280-BCDB-433C-B523-D3E782340BA4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Mgmt.Tests", "Azure.Generator.Mgmt\test\Azure.Generator.Mgmt.Tests\Azure.Generator.Mgmt.Tests.csproj", "{236F0049-E44C-40C9-90BB-BD19495CB689}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProjects.Local.Tests", "TestProjects\Local.Tests\TestProjects.Local.Tests.csproj", "{E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Generator.Tests.Common", "..\..\http-client-csharp\generator\Azure.Generator\test\common\Azure.Generator.Tests.Common.csproj", "{5C43C4D9-AC67-6643-B7AF-DF8096B8265A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {690F5280-BCDB-433C-B523-D3E782340BA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {690F5280-BCDB-433C-B523-D3E782340BA4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {690F5280-BCDB-433C-B523-D3E782340BA4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {690F5280-BCDB-433C-B523-D3E782340BA4}.Release|Any CPU.Build.0 = Release|Any CPU - {236F0049-E44C-40C9-90BB-BD19495CB689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {236F0049-E44C-40C9-90BB-BD19495CB689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {236F0049-E44C-40C9-90BB-BD19495CB689}.Release|Any CPU.ActiveCfg = Release|Any CPU - {236F0049-E44C-40C9-90BB-BD19495CB689}.Release|Any CPU.Build.0 = Release|Any CPU - {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E6E6C66A-E1E2-4D4D-9E8A-FD97A1761F90}.Release|Any CPU.Build.0 = Release|Any CPU - {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5C43C4D9-AC67-6643-B7AF-DF8096B8265A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9E9389E8-7266-4312-9710-1BE45A571319} - EndGlobalSection -EndGlobal diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Azure.Generator.Mgmt.csproj b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Azure.Generator.Mgmt.csproj deleted file mode 100644 index 3e15df6aacbd..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/Azure.Generator.Mgmt.csproj +++ /dev/null @@ -1,97 +0,0 @@ - - - Azure.Generator.Mgmt - 1.0.0-beta.1 - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - - - - diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementInputLibrary.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementInputLibrary.cs deleted file mode 100644 index 7e05f6f2b04f..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src/ManagementInputLibrary.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Microsoft.TypeSpec.Generator.Input; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.Generator.Management -{ - /// - public class ManagementInputLibrary : InputLibrary - { - private IReadOnlyDictionary? _inputModelsByCrossLanguageDefinitionId = null; - private IReadOnlyDictionary InputModelsByCrossLanguageDefinitionId => _inputModelsByCrossLanguageDefinitionId ??= InputNamespace.Models.DistinctBy(x => x.CrossLanguageDefinitionId).ToDictionary(m => m.CrossLanguageDefinitionId, m => m); - - /// - public ManagementInputLibrary(string configPath) : base(configPath) - { - } - - internal InputModelType? GetModelByCrossLanguageDefinitionId(string crossLanguageDefinitionId) => InputModelsByCrossLanguageDefinitionId.TryGetValue(crossLanguageDefinitionId, out var model) ? model : null; - } -} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Azure.Generator.Mgmt.Tests.csproj b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Azure.Generator.Mgmt.Tests.csproj deleted file mode 100644 index fd8411b29918..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Azure.Generator.Mgmt.Tests.csproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - enable - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - PreserveNewest - - - - - - - - - - - PreserveNewest - - - - diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Common/InputResourceData.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Common/InputResourceData.cs deleted file mode 100644 index 7629cdb27358..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Common/InputResourceData.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Generator.Management.Primitives; -using Azure.Generator.Tests.Common; -using Microsoft.TypeSpec.Generator.Input; - -namespace Azure.Generator.Management.Tests.Common -{ - internal static class InputResourceData - { - public static (InputClient InputClient, IReadOnlyList InputModels) ClientWithResource() - { - const string TestClientName = "TestClient"; - const string ResourceModelName = "ResponseType"; - var responseModel = InputFactory.Model(ResourceModelName, - usage: InputModelTypeUsage.Output | InputModelTypeUsage.Json, - properties: - [ - InputFactory.Property("id", InputPrimitiveType.String), - InputFactory.Property("type", InputPrimitiveType.String), - InputFactory.Property("name", InputFactory.Primitive.String()), - ], - decorators: [new InputDecoratorInfo(KnownDecorators.ArmResourceInternal, null)]); - var responseType = InputFactory.OperationResponse(statusCodes: [200], bodytype: responseModel); - var testNameParameter = InputFactory.Parameter("testName", InputPrimitiveType.String, location: InputRequestLocation.Path); - var operation = InputFactory.Operation(name: "get", responses: [responseType], parameters: [testNameParameter], path: "/providers/a/test/{testName}", decorators: [new InputDecoratorInfo(KnownDecorators.ArmResourceRead, null)]); - var resourceMetadataArguments = new Dictionary - { - { KnownDecorators.ResourceModel, BinaryData.FromString($"\"{ResourceModelName}\"") }, - { KnownDecorators.ResourceType, BinaryData.FromString("\"a/test\"") } - }; - var client = InputFactory.Client(TestClientName, methods: [InputFactory.BasicServiceMethod("Get", operation, parameters: [testNameParameter])], decorators: [new InputDecoratorInfo(KnownDecorators.ResourceMetadata, resourceMetadataArguments), new InputDecoratorInfo(KnownDecorators.ArmProviderNamespace, null)]); - return (client, [responseModel]); - } - } -} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ManagementLongRunningOperationProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ManagementLongRunningOperationProviderTests.cs deleted file mode 100644 index ed063b654e90..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ManagementLongRunningOperationProviderTests.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Generator.Management.Providers; -using Azure.Generator.Management.Tests.TestHelpers; -using Azure.Generator.Tests.Common; -using Microsoft.TypeSpec.Generator.Primitives; -using NUnit.Framework; - -namespace Azure.Generator.Management.Tests.Providers -{ - internal class ManagementLongRunningOperationProviderTests - { - [SetUp] - public void SetUp() - { - ManagementMockHelpers.LoadMockPlugin(); - } - - [TestCase] - public void Verify_NonGeneric_LROProviderGeneration() - { - var nonGenericLROProvider = new ManagementLongRunningOperationProvider(false); - var codeFile = new TypeProviderWriter(nonGenericLROProvider).Write(); - var result = codeFile.Content; - - var exptected = Helpers.GetExpectedFromFile(); - - Assert.AreEqual(exptected, result); - } - - [TestCase] - public void Verify_Generic_LROProviderGeneration() - { - var genericLROProvider = new ManagementLongRunningOperationProvider(true); - var codeFile = new TypeProviderWriter(genericLROProvider).Write(); - var result = codeFile.Content; - - var exptected = Helpers.GetExpectedFromFile(); - - Assert.AreEqual(exptected, result); - } - } -} diff --git a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ResourceCollectionClientProviderTests.cs b/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ResourceCollectionClientProviderTests.cs deleted file mode 100644 index 3fe63b45c30b..000000000000 --- a/eng/packages/http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/test/Azure.Generator.Mgmt.Tests/Providers/ResourceCollectionClientProviderTests.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Generator.Management.Providers; -using Azure.Generator.Management.Tests.Common; -using Azure.Generator.Management.Tests.TestHelpers; -using Azure.Generator.Tests.Common; -using Microsoft.TypeSpec.Generator.Primitives; -using Microsoft.TypeSpec.Generator.Providers; -using NUnit.Framework; - -namespace Azure.Generator.Management.Tests.Providers -{ - internal class ResourceCollectionClientProviderTests - { - private static MethodProvider GetResourceCollectionClientProviderMethodByName(string methodName) - { - ResourceCollectionClientProvider resourceProvider = GetResourceCollectionClientProvider(); - var method = resourceProvider.Methods.FirstOrDefault(m => m.Signature.Name == methodName); - Assert.NotNull(method); - return method!; - } - - private static ResourceCollectionClientProvider GetResourceCollectionClientProvider() - { - var (client, models) = InputResourceData.ClientWithResource(); - var plugin = ManagementMockHelpers.LoadMockPlugin(inputModels: () => models, clients: () => [client]); - var resourceProvider = plugin.Object.OutputLibrary.TypeProviders.FirstOrDefault(p => p is ResourceCollectionClientProvider) as ResourceCollectionClientProvider; - Assert.NotNull(resourceProvider); - return resourceProvider!; - } - - [TestCase] - public void Verify_GetOperationMethod() - { - MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("Get"); - - // verify the method signature - var signature = getMethod.Signature; - Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual)); - Assert.IsTrue(signature.Parameters.Count == 2); - Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); - Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); - Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Response<>)); - - // verify the method body - var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); - Assert.NotNull(bodyStatements); - var exptected = Helpers.GetExpectedFromFile(); - Assert.AreEqual(exptected, bodyStatements); - } - - [TestCase] - public void Verify_GetAsyncOperationMethod() - { - MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("GetAsync"); - - // verify the method signature - var signature = getMethod.Signature; - Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual | MethodSignatureModifiers.Async)); - Assert.IsTrue(signature.Parameters.Count == 2); - Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); - Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); - Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Task<>)); - - // verify the method body - var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); - Assert.NotNull(bodyStatements); - var exptected = Helpers.GetExpectedFromFile(); - Assert.AreEqual(exptected, bodyStatements); - } - - [TestCase] - public void Verify_ExistsOperationMethod() - { - MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("Exists"); - - // verify the method signature - var signature = getMethod.Signature; - Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual)); - Assert.IsTrue(signature.Parameters.Count == 2); - Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); - Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); - Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Response<>)); - - // verify the method body - var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); - Assert.NotNull(bodyStatements); - var exptected = Helpers.GetExpectedFromFile(); - Assert.AreEqual(exptected, bodyStatements); - } - - [TestCase] - public void Verify_ExistsAsyncOperationMethod() - { - MethodProvider getMethod = GetResourceCollectionClientProviderMethodByName("ExistsAsync"); - - // verify the method signature - var signature = getMethod.Signature; - Assert.IsTrue(signature.Modifiers.Equals(MethodSignatureModifiers.Public | MethodSignatureModifiers.Virtual | MethodSignatureModifiers.Async)); - Assert.IsTrue(signature.Parameters.Count == 2); - Assert.IsTrue(signature.Parameters[0].Type.FrameworkType.Equals(typeof(string))); - Assert.IsTrue(signature.Parameters[1].Type.FrameworkType.Equals(typeof(CancellationToken))); - Assert.AreEqual(signature.ReturnType?.FrameworkType, typeof(Task<>)); - - // verify the method body - var bodyStatements = getMethod.BodyStatements?.ToDisplayString(); - Assert.NotNull(bodyStatements); - var exptected = Helpers.GetExpectedFromFile(); - Assert.AreEqual(exptected, bodyStatements); - } - } -} diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj index a69453483d2c..a45785ef6f37 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local.Tests/TestProjects.Local.Tests.csproj @@ -46,6 +46,7 @@ + diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs index 054dbbc3ea6a..07314169669d 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/FooCollection.cs @@ -292,7 +292,7 @@ public virtual async Task> GetIfExistsAsync(string Response response = Response.FromValue((FooData)result, result); if (response.Value == null) { - throw new RequestFailedException(response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); } return Response.FromValue(new FooResource(Client, response.Value), response.GetRawResponse()); } @@ -325,7 +325,7 @@ public virtual NullableResponse GetIfExists(string fooName, Cancell Response response = Response.FromValue((FooData)result, result); if (response.Value == null) { - throw new RequestFailedException(response.GetRawResponse()); + return new NoValueResponse(response.GetRawResponse()); } return Response.FromValue(new FooResource(Client, response.Value), response.GetRawResponse()); } 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 00b3cfc2980c..cbb1de893bf1 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 @@ -10,6 +10,7 @@ using Azure.Core; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources.Models; +using MgmtTypeSpec; namespace MgmtTypeSpec.Models { @@ -21,8 +22,11 @@ public partial class FooData : TrackedResourceData /// Initializes a new instance of . /// The geo-location where the resource lives. - internal FooData(string location) : base(location) + /// is null. + public FooData(string location) : base(location) { + Argument.AssertNotNull(location, nameof(location)); + } /// Initializes a new instance of . @@ -43,9 +47,9 @@ internal FooData(ResourceIdentifier id, string @type, SystemData systemData, IDi } /// The resource-specific properties for this resource. - public FooProperties Properties { get; } + public FooProperties Properties { get; set; } - /// Gets the ExtendedLocation. - public ExtendedLocation ExtendedLocation { get; } + /// Gets or sets the ExtendedLocation. + public ExtendedLocation ExtendedLocation { get; set; } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs index f83d7e8b4dd1..c894890064f7 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs @@ -13,14 +13,14 @@ namespace MgmtTypeSpec { internal static partial class RequestContextExtensions { - /// - public static ValueTuple Parse(this RequestContext requestContext) + /// 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 (requestContext == null) + if (context == null) { return (CancellationToken.None, ErrorOptions.Default); } - return (requestContext.CancellationToken, requestContext.ErrorOptions); + return (context.CancellationToken, context.ErrorOptions); } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooProperties.cs b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooProperties.cs index 6f2e9cf13231..6f0a403d25d9 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooProperties.cs +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/Generated/Models/FooProperties.cs @@ -17,7 +17,7 @@ public partial class FooProperties private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - internal FooProperties() + public FooProperties() { } @@ -39,18 +39,18 @@ internal FooProperties(Uri serviceUrl, string something, bool? boolValue, float? } /// the service url. - public Uri ServiceUrl { get; } + public Uri ServiceUrl { get; set; } /// something. - public string Something { get; } + public string Something { get; set; } /// boolean value. - public bool? BoolValue { get; } + public bool? BoolValue { get; set; } /// float value. - public float? FloatValue { get; } + public float? FloatValue { get; set; } /// double value. - public double? DoubleValue { get; } + public double? DoubleValue { get; set; } } } diff --git a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/MgmtTypeSpec.csproj b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/MgmtTypeSpec.csproj index f0a70959fe05..31899a3d8734 100644 --- a/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/MgmtTypeSpec.csproj +++ b/eng/packages/http-client-csharp-mgmt/generator/TestProjects/Local/Mgmt-TypeSpec/src/MgmtTypeSpec.csproj @@ -17,8 +17,10 @@ + + @@ -26,6 +28,8 @@ + + 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 2064ede228b3..1c2c58e708fc 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 @@ -477,9 +477,235 @@ "decorators": [] } ], - "models": [ + "constants": [ { "$id": "52", + "kind": "constant", + "name": "listContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "listByMongoClusterContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "startContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "startContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "startContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "startContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "createOrUpdateContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "createOrUpdateContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "createOrUpdateContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "createOrUpdateContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "deleteContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "deleteContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "listContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "80", "kind": "model", "name": "OperationListResult", "namespace": "Azure.ResourceManager.CommonTypes", @@ -489,17 +715,17 @@ "decorators": [], "properties": [ { - "$id": "53", + "$id": "81", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Operation items on this page", "type": { - "$id": "54", + "$id": "82", "kind": "array", "name": "ArrayOperation", "valueType": { - "$id": "55", + "$id": "83", "kind": "model", "name": "Operation", "namespace": "Azure.ResourceManager.CommonTypes", @@ -510,13 +736,13 @@ "decorators": [], "properties": [ { - "$id": "56", + "$id": "84", "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": "57", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -529,21 +755,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.name", "serializationOptions": { - "$id": "58", + "$id": "86", "json": { - "$id": "59", + "$id": "87", "name": "name" } } }, { - "$id": "60", + "$id": "88", "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": "61", + "$id": "89", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -556,21 +782,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.isDataAction", "serializationOptions": { - "$id": "62", + "$id": "90", "json": { - "$id": "63", + "$id": "91", "name": "isDataAction" } } }, { - "$id": "64", + "$id": "92", "kind": "property", "name": "display", "serializedName": "display", "doc": "Localized display information for this particular operation.", "type": { - "$id": "65", + "$id": "93", "kind": "model", "name": "OperationDisplay", "namespace": "Azure.ResourceManager.CommonTypes", @@ -580,13 +806,13 @@ "decorators": [], "properties": [ { - "$id": "66", + "$id": "94", "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": "67", + "$id": "95", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -599,21 +825,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.provider", "serializationOptions": { - "$id": "68", + "$id": "96", "json": { - "$id": "69", + "$id": "97", "name": "provider" } } }, { - "$id": "70", + "$id": "98", "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": "71", + "$id": "99", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -626,21 +852,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.resource", "serializationOptions": { - "$id": "72", + "$id": "100", "json": { - "$id": "73", + "$id": "101", "name": "resource" } } }, { - "$id": "74", + "$id": "102", "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": "75", + "$id": "103", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -653,21 +879,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.operation", "serializationOptions": { - "$id": "76", + "$id": "104", "json": { - "$id": "77", + "$id": "105", "name": "operation" } } }, { - "$id": "78", + "$id": "106", "kind": "property", "name": "description", "serializedName": "description", "doc": "The short, localized friendly description of the operation; suitable for tool tips and detailed views.", "type": { - "$id": "79", + "$id": "107", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -680,9 +906,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationDisplay.description", "serializationOptions": { - "$id": "80", + "$id": "108", "json": { - "$id": "81", + "$id": "109", "name": "description" } } @@ -696,15 +922,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.display", "serializationOptions": { - "$id": "82", + "$id": "110", "json": { - "$id": "83", + "$id": "111", "name": "display" } } }, { - "$id": "84", + "$id": "112", "kind": "property", "name": "origin", "serializedName": "origin", @@ -719,15 +945,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.origin", "serializationOptions": { - "$id": "85", + "$id": "113", "json": { - "$id": "86", + "$id": "114", "name": "origin" } } }, { - "$id": "87", + "$id": "115", "kind": "property", "name": "actionType", "serializedName": "actionType", @@ -742,9 +968,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Operation.actionType", "serializationOptions": { - "$id": "88", + "$id": "116", "json": { - "$id": "89", + "$id": "117", "name": "actionType" } } @@ -761,26 +987,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.value", "serializationOptions": { - "$id": "90", + "$id": "118", "json": { - "$id": "91", + "$id": "119", "name": "value" } } }, { - "$id": "92", + "$id": "120", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "93", + "$id": "121", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "94", + "$id": "122", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -795,9 +1021,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationListResult.nextLink", "serializationOptions": { - "$id": "95", + "$id": "123", "json": { - "$id": "96", + "$id": "124", "name": "nextLink" } } @@ -805,13 +1031,13 @@ ] }, { - "$ref": "55" + "$ref": "83" }, { - "$ref": "65" + "$ref": "93" }, { - "$id": "97", + "$id": "125", "kind": "model", "name": "ErrorResponse", "namespace": "Azure.ResourceManager.CommonTypes", @@ -822,13 +1048,13 @@ "decorators": [], "properties": [ { - "$id": "98", + "$id": "126", "kind": "property", "name": "error", "serializedName": "error", "doc": "The error object.", "type": { - "$id": "99", + "$id": "127", "kind": "model", "name": "ErrorDetail", "namespace": "Azure.ResourceManager.CommonTypes", @@ -838,13 +1064,13 @@ "decorators": [], "properties": [ { - "$id": "100", + "$id": "128", "kind": "property", "name": "code", "serializedName": "code", "doc": "The error code.", "type": { - "$id": "101", + "$id": "129", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -857,21 +1083,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.code", "serializationOptions": { - "$id": "102", + "$id": "130", "json": { - "$id": "103", + "$id": "131", "name": "code" } } }, { - "$id": "104", + "$id": "132", "kind": "property", "name": "message", "serializedName": "message", "doc": "The error message.", "type": { - "$id": "105", + "$id": "133", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -884,21 +1110,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.message", "serializationOptions": { - "$id": "106", + "$id": "134", "json": { - "$id": "107", + "$id": "135", "name": "message" } } }, { - "$id": "108", + "$id": "136", "kind": "property", "name": "target", "serializedName": "target", "doc": "The error target.", "type": { - "$id": "109", + "$id": "137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -911,25 +1137,25 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.target", "serializationOptions": { - "$id": "110", + "$id": "138", "json": { - "$id": "111", + "$id": "139", "name": "target" } } }, { - "$id": "112", + "$id": "140", "kind": "property", "name": "details", "serializedName": "details", "doc": "The error details.", "type": { - "$id": "113", + "$id": "141", "kind": "array", "name": "ArrayErrorDetail", "valueType": { - "$ref": "99" + "$ref": "127" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -941,25 +1167,25 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.details", "serializationOptions": { - "$id": "114", + "$id": "142", "json": { - "$id": "115", + "$id": "143", "name": "details" } } }, { - "$id": "116", + "$id": "144", "kind": "property", "name": "additionalInfo", "serializedName": "additionalInfo", "doc": "The error additional info.", "type": { - "$id": "117", + "$id": "145", "kind": "array", "name": "ArrayErrorAdditionalInfo", "valueType": { - "$id": "118", + "$id": "146", "kind": "model", "name": "ErrorAdditionalInfo", "namespace": "Azure.ResourceManager.CommonTypes", @@ -969,13 +1195,13 @@ "decorators": [], "properties": [ { - "$id": "119", + "$id": "147", "kind": "property", "name": "type", "serializedName": "type", "doc": "The additional info type.", "type": { - "$id": "120", + "$id": "148", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -988,21 +1214,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.type", "serializationOptions": { - "$id": "121", + "$id": "149", "json": { - "$id": "122", + "$id": "150", "name": "type" } } }, { - "$id": "123", + "$id": "151", "kind": "property", "name": "info", "serializedName": "info", "doc": "The additional info.", "type": { - "$id": "124", + "$id": "152", "kind": "model", "name": "ErrorAdditionalInfoInfo", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1018,9 +1244,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo.info", "serializationOptions": { - "$id": "125", + "$id": "153", "json": { - "$id": "126", + "$id": "154", "name": "info" } } @@ -1037,9 +1263,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorDetail.additionalInfo", "serializationOptions": { - "$id": "127", + "$id": "155", "json": { - "$id": "128", + "$id": "156", "name": "additionalInfo" } } @@ -1053,9 +1279,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ErrorResponse.error", "serializationOptions": { - "$id": "129", + "$id": "157", "json": { - "$id": "130", + "$id": "158", "name": "error" } } @@ -1063,16 +1289,16 @@ ] }, { - "$ref": "99" + "$ref": "127" }, { - "$ref": "118" + "$ref": "146" }, { - "$ref": "124" + "$ref": "152" }, { - "$id": "131", + "$id": "159", "kind": "model", "name": "PrivateLinkResourceListResult", "namespace": "Azure.ResourceManager", @@ -1082,17 +1308,17 @@ "decorators": [], "properties": [ { - "$id": "132", + "$id": "160", "kind": "property", "name": "value", "serializedName": "value", "doc": "The PrivateLinkResource items on this page", "type": { - "$id": "133", + "$id": "161", "kind": "array", "name": "ArrayPrivateLinkResource", "valueType": { - "$id": "134", + "$id": "162", "kind": "model", "name": "PrivateLinkResource", "namespace": "MgmtTypeSpec", @@ -1101,15 +1327,15 @@ "doc": "Concrete proxy resource types can be created by aliasing this type using a specific property type.", "decorators": [ { - "$id": "135", + "$id": "163", "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": { - "$id": "136" + "$id": "164" } } ], "baseModel": { - "$id": "137", + "$id": "165", "kind": "model", "name": "ProxyResource", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1119,7 +1345,7 @@ "summary": "Proxy Resource", "decorators": [], "baseModel": { - "$id": "138", + "$id": "166", "kind": "model", "name": "Resource", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1130,18 +1356,18 @@ "decorators": [], "properties": [ { - "$id": "139", + "$id": "167", "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": "140", + "$id": "168", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "141", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1156,21 +1382,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.id", "serializationOptions": { - "$id": "142", + "$id": "170", "json": { - "$id": "143", + "$id": "171", "name": "id" } } }, { - "$id": "144", + "$id": "172", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the resource", "type": { - "$id": "145", + "$id": "173", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1183,26 +1409,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.name", "serializationOptions": { - "$id": "146", + "$id": "174", "json": { - "$id": "147", + "$id": "175", "name": "name" } } }, { - "$id": "148", + "$id": "176", "kind": "property", "name": "type", "serializedName": "type", "doc": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"", "type": { - "$id": "149", + "$id": "177", "kind": "string", "name": "armResourceType", "crossLanguageDefinitionId": "Azure.Core.armResourceType", "baseType": { - "$id": "150", + "$id": "178", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1217,21 +1443,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.type", "serializationOptions": { - "$id": "151", + "$id": "179", "json": { - "$id": "152", + "$id": "180", "name": "type" } } }, { - "$id": "153", + "$id": "181", "kind": "property", "name": "systemData", "serializedName": "systemData", "doc": "Azure Resource Manager metadata containing createdBy and modifiedBy information.", "type": { - "$id": "154", + "$id": "182", "kind": "model", "name": "SystemData", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1241,13 +1467,13 @@ "decorators": [], "properties": [ { - "$id": "155", + "$id": "183", "kind": "property", "name": "createdBy", "serializedName": "createdBy", "doc": "The identity that created the resource.", "type": { - "$id": "156", + "$id": "184", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1260,15 +1486,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdBy", "serializationOptions": { - "$id": "157", + "$id": "185", "json": { - "$id": "158", + "$id": "186", "name": "createdBy" } } }, { - "$id": "159", + "$id": "187", "kind": "property", "name": "createdByType", "serializedName": "createdByType", @@ -1283,26 +1509,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdByType", "serializationOptions": { - "$id": "160", + "$id": "188", "json": { - "$id": "161", + "$id": "189", "name": "createdByType" } } }, { - "$id": "162", + "$id": "190", "kind": "property", "name": "createdAt", "serializedName": "createdAt", "doc": "The timestamp of resource creation (UTC).", "type": { - "$id": "163", + "$id": "191", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "164", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1318,21 +1544,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.createdAt", "serializationOptions": { - "$id": "165", + "$id": "193", "json": { - "$id": "166", + "$id": "194", "name": "createdAt" } } }, { - "$id": "167", + "$id": "195", "kind": "property", "name": "lastModifiedBy", "serializedName": "lastModifiedBy", "doc": "The identity that last modified the resource.", "type": { - "$id": "168", + "$id": "196", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1345,15 +1571,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedBy", "serializationOptions": { - "$id": "169", + "$id": "197", "json": { - "$id": "170", + "$id": "198", "name": "lastModifiedBy" } } }, { - "$id": "171", + "$id": "199", "kind": "property", "name": "lastModifiedByType", "serializedName": "lastModifiedByType", @@ -1368,26 +1594,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedByType", "serializationOptions": { - "$id": "172", + "$id": "200", "json": { - "$id": "173", + "$id": "201", "name": "lastModifiedByType" } } }, { - "$id": "174", + "$id": "202", "kind": "property", "name": "lastModifiedAt", "serializedName": "lastModifiedAt", "doc": "The timestamp of resource last modification (UTC)", "type": { - "$id": "175", + "$id": "203", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "176", + "$id": "204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1403,9 +1629,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.SystemData.lastModifiedAt", "serializationOptions": { - "$id": "177", + "$id": "205", "json": { - "$id": "178", + "$id": "206", "name": "lastModifiedAt" } } @@ -1419,9 +1645,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.Resource.systemData", "serializationOptions": { - "$id": "179", + "$id": "207", "json": { - "$id": "180", + "$id": "208", "name": "systemData" } } @@ -1432,13 +1658,13 @@ }, "properties": [ { - "$id": "181", + "$id": "209", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "182", + "$id": "210", "kind": "model", "name": "PrivateLinkResourceProperties", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1448,13 +1674,13 @@ "decorators": [], "properties": [ { - "$id": "183", + "$id": "211", "kind": "property", "name": "groupId", "serializedName": "groupId", "doc": "The private link resource group id.", "type": { - "$id": "184", + "$id": "212", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1467,25 +1693,25 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.groupId", "serializationOptions": { - "$id": "185", + "$id": "213", "json": { - "$id": "186", + "$id": "214", "name": "groupId" } } }, { - "$id": "187", + "$id": "215", "kind": "property", "name": "requiredMembers", "serializedName": "requiredMembers", "doc": "The private link resource required member names.", "type": { - "$id": "188", + "$id": "216", "kind": "array", "name": "Array", "valueType": { - "$id": "189", + "$id": "217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1501,25 +1727,25 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredMembers", "serializationOptions": { - "$id": "190", + "$id": "218", "json": { - "$id": "191", + "$id": "219", "name": "requiredMembers" } } }, { - "$id": "192", + "$id": "220", "kind": "property", "name": "requiredZoneNames", "serializedName": "requiredZoneNames", "doc": "The private link resource private link DNS zone name.", "type": { - "$id": "193", + "$id": "221", "kind": "array", "name": "Array", "valueType": { - "$id": "194", + "$id": "222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1535,9 +1761,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.PrivateLinkResourceProperties.requiredZoneNames", "serializationOptions": { - "$id": "195", + "$id": "223", "json": { - "$id": "196", + "$id": "224", "name": "requiredZoneNames" } } @@ -1551,21 +1777,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinkResource.properties", "serializationOptions": { - "$id": "197", + "$id": "225", "json": { - "$id": "198", + "$id": "226", "name": "properties" } } }, { - "$id": "199", + "$id": "227", "kind": "path", "name": "name", "serializedName": "name", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "200", + "$id": "228", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1575,17 +1801,19 @@ "readOnly": true, "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinkResource.name", - "discriminator": false, - "flatten": false + "explode": false, + "style": "simple", + "allowReserved": false, + "correspondingMethodParams": [] }, { - "$id": "201", + "$id": "229", "kind": "property", "name": "identity", "serializedName": "identity", "doc": "The managed service identities assigned to this resource.", "type": { - "$id": "202", + "$id": "230", "kind": "model", "name": "ManagedServiceIdentity", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1595,18 +1823,18 @@ "decorators": [], "properties": [ { - "$id": "203", + "$id": "231", "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": "204", + "$id": "232", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "205", + "$id": "233", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1621,26 +1849,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.principalId", "serializationOptions": { - "$id": "206", + "$id": "234", "json": { - "$id": "207", + "$id": "235", "name": "principalId" } } }, { - "$id": "208", + "$id": "236", "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": "209", + "$id": "237", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "210", + "$id": "238", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1655,15 +1883,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.tenantId", "serializationOptions": { - "$id": "211", + "$id": "239", "json": { - "$id": "212", + "$id": "240", "name": "tenantId" } } }, { - "$id": "213", + "$id": "241", "kind": "property", "name": "type", "serializedName": "type", @@ -1678,34 +1906,34 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.type", "serializationOptions": { - "$id": "214", + "$id": "242", "json": { - "$id": "215", + "$id": "243", "name": "type" } } }, { - "$id": "216", + "$id": "244", "kind": "property", "name": "userAssignedIdentities", "serializedName": "userAssignedIdentities", "doc": "The identities assigned to this resource by the user.", "type": { - "$id": "217", + "$id": "245", "kind": "dict", "keyType": { - "$id": "218", + "$id": "246", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "219", + "$id": "247", "kind": "nullable", "type": { - "$id": "220", + "$id": "248", "kind": "model", "name": "UserAssignedIdentity", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1715,18 +1943,18 @@ "decorators": [], "properties": [ { - "$id": "221", + "$id": "249", "kind": "property", "name": "principalId", "serializedName": "principalId", "doc": "The principal ID of the assigned identity.", "type": { - "$id": "222", + "$id": "250", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "223", + "$id": "251", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1741,26 +1969,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.principalId", "serializationOptions": { - "$id": "224", + "$id": "252", "json": { - "$id": "225", + "$id": "253", "name": "principalId" } } }, { - "$id": "226", + "$id": "254", "kind": "property", "name": "clientId", "serializedName": "clientId", "doc": "The client ID of the assigned identity.", "type": { - "$id": "227", + "$id": "255", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "228", + "$id": "256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1775,9 +2003,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.UserAssignedIdentity.clientId", "serializationOptions": { - "$id": "229", + "$id": "257", "json": { - "$id": "230", + "$id": "258", "name": "clientId" } } @@ -1795,9 +2023,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentity.userAssignedIdentities", "serializationOptions": { - "$id": "231", + "$id": "259", "json": { - "$id": "232", + "$id": "260", "name": "userAssignedIdentities" } } @@ -1811,9 +2039,9 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinkResource.identity", "serializationOptions": { - "$id": "233", + "$id": "261", "json": { - "$id": "234", + "$id": "262", "name": "identity" } } @@ -1830,26 +2058,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", "serializationOptions": { - "$id": "235", + "$id": "263", "json": { - "$id": "236", + "$id": "264", "name": "value" } } }, { - "$id": "237", + "$id": "265", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "238", + "$id": "266", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "239", + "$id": "267", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1864,9 +2092,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", "serializationOptions": { - "$id": "240", + "$id": "268", "json": { - "$id": "241", + "$id": "269", "name": "nextLink" } } @@ -1874,28 +2102,28 @@ ] }, { - "$ref": "134" + "$ref": "162" }, { - "$ref": "182" + "$ref": "210" }, { - "$ref": "202" + "$ref": "230" }, { - "$ref": "220" + "$ref": "248" }, { - "$ref": "137" + "$ref": "165" }, { - "$ref": "138" + "$ref": "166" }, { - "$ref": "154" + "$ref": "182" }, { - "$id": "242", + "$id": "270", "kind": "model", "name": "StartParameterBody", "namespace": "MgmtTypeSpec", @@ -1905,7 +2133,7 @@ "properties": [] }, { - "$id": "243", + "$id": "271", "kind": "model", "name": "StartRequest", "namespace": "MgmtTypeSpec", @@ -1915,13 +2143,13 @@ "decorators": [], "properties": [ { - "$id": "244", + "$id": "272", "kind": "property", "name": "startVm", "serializedName": "startVm", "doc": "The boolean value indicates whether to start the virtual machines before starting the SAP instances.", "type": { - "$id": "245", + "$id": "273", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1934,9 +2162,9 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.StartRequest.startVm", "serializationOptions": { - "$id": "246", + "$id": "274", "json": { - "$id": "247", + "$id": "275", "name": "startVm" } } @@ -1944,7 +2172,7 @@ ] }, { - "$id": "248", + "$id": "276", "kind": "model", "name": "OperationStatusResult", "namespace": "Azure.ResourceManager.CommonTypes", @@ -1954,18 +2182,18 @@ "decorators": [], "properties": [ { - "$id": "249", + "$id": "277", "kind": "property", "name": "id", "serializedName": "id", "doc": "Fully qualified ID for the async operation.", "type": { - "$id": "250", + "$id": "278", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "251", + "$id": "279", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1980,21 +2208,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.id", "serializationOptions": { - "$id": "252", + "$id": "280", "json": { - "$id": "253", + "$id": "281", "name": "id" } } }, { - "$id": "254", + "$id": "282", "kind": "property", "name": "name", "serializedName": "name", "doc": "Name of the async operation.", "type": { - "$id": "255", + "$id": "283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2007,21 +2235,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.name", "serializationOptions": { - "$id": "256", + "$id": "284", "json": { - "$id": "257", + "$id": "285", "name": "name" } } }, { - "$id": "258", + "$id": "286", "kind": "property", "name": "status", "serializedName": "status", "doc": "Operation status.", "type": { - "$id": "259", + "$id": "287", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2034,21 +2262,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.status", "serializationOptions": { - "$id": "260", + "$id": "288", "json": { - "$id": "261", + "$id": "289", "name": "status" } } }, { - "$id": "262", + "$id": "290", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "Percent of the operation that is complete.", "type": { - "$id": "263", + "$id": "291", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -2061,26 +2289,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.percentComplete", "serializationOptions": { - "$id": "264", + "$id": "292", "json": { - "$id": "265", + "$id": "293", "name": "percentComplete" } } }, { - "$id": "266", + "$id": "294", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "The start time of the operation.", "type": { - "$id": "267", + "$id": "295", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "268", + "$id": "296", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2096,26 +2324,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.startTime", "serializationOptions": { - "$id": "269", + "$id": "297", "json": { - "$id": "270", + "$id": "298", "name": "startTime" } } }, { - "$id": "271", + "$id": "299", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "The end time of the operation.", "type": { - "$id": "272", + "$id": "300", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "273", + "$id": "301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2131,25 +2359,25 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.endTime", "serializationOptions": { - "$id": "274", + "$id": "302", "json": { - "$id": "275", + "$id": "303", "name": "endTime" } } }, { - "$id": "276", + "$id": "304", "kind": "property", "name": "operations", "serializedName": "operations", "doc": "The operations list.", "type": { - "$id": "277", + "$id": "305", "kind": "array", "name": "ArrayOperationStatusResult", "valueType": { - "$ref": "248" + "$ref": "276" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2161,21 +2389,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.operations", "serializationOptions": { - "$id": "278", + "$id": "306", "json": { - "$id": "279", + "$id": "307", "name": "operations" } } }, { - "$id": "280", + "$id": "308", "kind": "property", "name": "error", "serializedName": "error", "doc": "If present, details of the operation error.", "type": { - "$ref": "99" + "$ref": "127" }, "optional": true, "readOnly": false, @@ -2184,26 +2412,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.error", "serializationOptions": { - "$id": "281", + "$id": "309", "json": { - "$id": "282", + "$id": "310", "name": "error" } } }, { - "$id": "283", + "$id": "311", "kind": "property", "name": "resourceId", "serializedName": "resourceId", "doc": "Fully qualified ID of the resource against which the original async operation was started.", "type": { - "$id": "284", + "$id": "312", "kind": "string", "name": "armResourceIdentifier", "crossLanguageDefinitionId": "Azure.Core.armResourceIdentifier", "baseType": { - "$id": "285", + "$id": "313", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2218,9 +2446,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.OperationStatusResult.resourceId", "serializationOptions": { - "$id": "286", + "$id": "314", "json": { - "$id": "287", + "$id": "315", "name": "resourceId" } } @@ -2228,7 +2456,7 @@ ] }, { - "$id": "288", + "$id": "316", "kind": "model", "name": "ArmOperationStatusResourceProvisioningState", "namespace": "Azure.ResourceManager", @@ -2238,7 +2466,7 @@ "decorators": [], "properties": [ { - "$id": "289", + "$id": "317", "kind": "property", "name": "status", "serializedName": "status", @@ -2253,21 +2481,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.status", "serializationOptions": { - "$id": "290", + "$id": "318", "json": { - "$id": "291", + "$id": "319", "name": "status" } } }, { - "$id": "292", + "$id": "320", "kind": "path", "name": "id", "serializedName": "id", "doc": "The unique identifier for the operationStatus resource", "type": { - "$id": "293", + "$id": "321", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2277,17 +2505,19 @@ "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.id", - "discriminator": false, - "flatten": false + "explode": false, + "style": "simple", + "allowReserved": false, + "correspondingMethodParams": [] }, { - "$id": "294", + "$id": "322", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the operationStatus resource", "type": { - "$id": "295", + "$id": "323", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2300,26 +2530,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.name", "serializationOptions": { - "$id": "296", + "$id": "324", "json": { - "$id": "297", + "$id": "325", "name": "name" } } }, { - "$id": "298", + "$id": "326", "kind": "property", "name": "startTime", "serializedName": "startTime", "doc": "Operation start time", "type": { - "$id": "299", + "$id": "327", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "300", + "$id": "328", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2335,26 +2565,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.startTime", "serializationOptions": { - "$id": "301", + "$id": "329", "json": { - "$id": "302", + "$id": "330", "name": "startTime" } } }, { - "$id": "303", + "$id": "331", "kind": "property", "name": "endTime", "serializedName": "endTime", "doc": "Operation complete time", "type": { - "$id": "304", + "$id": "332", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "305", + "$id": "333", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2370,21 +2600,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.endTime", "serializationOptions": { - "$id": "306", + "$id": "334", "json": { - "$id": "307", + "$id": "335", "name": "endTime" } } }, { - "$id": "308", + "$id": "336", "kind": "property", "name": "percentComplete", "serializedName": "percentComplete", "doc": "The progress made toward completing the operation", "type": { - "$id": "309", + "$id": "337", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -2397,21 +2627,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.percentComplete", "serializationOptions": { - "$id": "310", + "$id": "338", "json": { - "$id": "311", + "$id": "339", "name": "percentComplete" } } }, { - "$id": "312", + "$id": "340", "kind": "property", "name": "error", "serializedName": "error", "doc": "Errors that occurred if the operation ended with Canceled or Failed status", "type": { - "$ref": "99" + "$ref": "127" }, "optional": true, "readOnly": true, @@ -2420,9 +2650,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ArmOperationStatus.error", "serializationOptions": { - "$id": "313", + "$id": "341", "json": { - "$id": "314", + "$id": "342", "name": "error" } } @@ -2430,7 +2660,7 @@ ] }, { - "$id": "315", + "$id": "343", "kind": "model", "name": "Foo", "namespace": "MgmtTypeSpec", @@ -2439,15 +2669,15 @@ "doc": "Concrete tracked resource types can be created by aliasing this type using a specific property type.", "decorators": [ { - "$id": "316", + "$id": "344", "name": "Azure.ResourceManager.Private.@armResourceInternal", "arguments": { - "$id": "317" + "$id": "345" } } ], "baseModel": { - "$id": "318", + "$id": "346", "kind": "model", "name": "TrackedResource", "namespace": "Azure.ResourceManager.CommonTypes", @@ -2457,27 +2687,27 @@ "summary": "Tracked Resource", "decorators": [], "baseModel": { - "$ref": "138" + "$ref": "166" }, "properties": [ { - "$id": "319", + "$id": "347", "kind": "property", "name": "tags", "serializedName": "tags", "doc": "Resource tags.", "type": { - "$id": "320", + "$id": "348", "kind": "dict", "keyType": { - "$id": "321", + "$id": "349", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "322", + "$id": "350", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2492,21 +2722,21 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.tags", "serializationOptions": { - "$id": "323", + "$id": "351", "json": { - "$id": "324", + "$id": "352", "name": "tags" } } }, { - "$id": "325", + "$id": "353", "kind": "property", "name": "location", "serializedName": "location", "doc": "The geo-location where the resource lives", "type": { - "$id": "326", + "$id": "354", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2519,9 +2749,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.TrackedResource.location", "serializationOptions": { - "$id": "327", + "$id": "355", "json": { - "$id": "328", + "$id": "356", "name": "location" } } @@ -2530,13 +2760,13 @@ }, "properties": [ { - "$id": "329", + "$id": "357", "kind": "property", "name": "properties", "serializedName": "properties", "doc": "The resource-specific properties for this resource.", "type": { - "$id": "330", + "$id": "358", "kind": "model", "name": "FooProperties", "namespace": "MgmtTypeSpec", @@ -2544,23 +2774,23 @@ "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", "decorators": [ { - "$id": "331", + "$id": "359", "name": "Azure.ClientGenerator.Core.@useSystemTextJsonConverter", "arguments": { - "$id": "332", + "$id": "360", "scope": "csharp" } } ], "properties": [ { - "$id": "333", + "$id": "361", "kind": "property", "name": "serviceUrl", "serializedName": "serviceUrl", "doc": "the service url", "type": { - "$id": "334", + "$id": "362", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2573,21 +2803,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties.serviceUrl", "serializationOptions": { - "$id": "335", + "$id": "363", "json": { - "$id": "336", + "$id": "364", "name": "serviceUrl" } } }, { - "$id": "337", + "$id": "365", "kind": "property", "name": "something", "serializedName": "something", "doc": "something", "type": { - "$id": "338", + "$id": "366", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2600,21 +2830,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties.something", "serializationOptions": { - "$id": "339", + "$id": "367", "json": { - "$id": "340", + "$id": "368", "name": "something" } } }, { - "$id": "341", + "$id": "369", "kind": "property", "name": "boolValue", "serializedName": "boolValue", "doc": "boolean value", "type": { - "$id": "342", + "$id": "370", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -2627,21 +2857,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties.boolValue", "serializationOptions": { - "$id": "343", + "$id": "371", "json": { - "$id": "344", + "$id": "372", "name": "boolValue" } } }, { - "$id": "345", + "$id": "373", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "doc": "float value", "type": { - "$id": "346", + "$id": "374", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -2654,21 +2884,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties.floatValue", "serializationOptions": { - "$id": "347", + "$id": "375", "json": { - "$id": "348", + "$id": "376", "name": "floatValue" } } }, { - "$id": "349", + "$id": "377", "kind": "property", "name": "doubleValue", "serializedName": "doubleValue", "doc": "double value", "type": { - "$id": "350", + "$id": "378", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -2681,9 +2911,9 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.FooProperties.doubleValue", "serializationOptions": { - "$id": "351", + "$id": "379", "json": { - "$id": "352", + "$id": "380", "name": "doubleValue" } } @@ -2697,21 +2927,21 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.Foo.properties", "serializationOptions": { - "$id": "353", + "$id": "381", "json": { - "$id": "354", + "$id": "382", "name": "properties" } } }, { - "$id": "355", + "$id": "383", "kind": "path", "name": "name", "serializedName": "name", "doc": "The name of the Foo", "type": { - "$id": "356", + "$id": "384", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2721,16 +2951,18 @@ "readOnly": true, "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.Foo.name", - "discriminator": false, - "flatten": false + "explode": false, + "style": "simple", + "allowReserved": false, + "correspondingMethodParams": [] }, { - "$id": "357", + "$id": "385", "kind": "property", "name": "extendedLocation", "serializedName": "extendedLocation", "type": { - "$id": "358", + "$id": "386", "kind": "model", "name": "ExtendedLocation", "namespace": "Azure.ResourceManager.CommonTypes", @@ -2740,13 +2972,13 @@ "decorators": [], "properties": [ { - "$id": "359", + "$id": "387", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name of the extended location.", "type": { - "$id": "360", + "$id": "388", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2759,15 +2991,15 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ExtendedLocation.name", "serializationOptions": { - "$id": "361", + "$id": "389", "json": { - "$id": "362", + "$id": "390", "name": "name" } } }, { - "$id": "363", + "$id": "391", "kind": "property", "name": "type", "serializedName": "type", @@ -2782,9 +3014,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.CommonTypes.ExtendedLocation.type", "serializationOptions": { - "$id": "364", + "$id": "392", "json": { - "$id": "365", + "$id": "393", "name": "type" } } @@ -2798,9 +3030,9 @@ "decorators": [], "crossLanguageDefinitionId": "MgmtTypeSpec.Foo.extendedLocation", "serializationOptions": { - "$id": "366", + "$id": "394", "json": { - "$id": "367", + "$id": "395", "name": "extendedLocation" } } @@ -2808,16 +3040,16 @@ ] }, { - "$ref": "330" + "$ref": "358" }, { - "$ref": "358" + "$ref": "386" }, { - "$ref": "318" + "$ref": "346" }, { - "$id": "368", + "$id": "396", "kind": "model", "name": "FooListResult", "namespace": "Azure.ResourceManager", @@ -2827,17 +3059,17 @@ "decorators": [], "properties": [ { - "$id": "369", + "$id": "397", "kind": "property", "name": "value", "serializedName": "value", "doc": "The Foo items on this page", "type": { - "$id": "370", + "$id": "398", "kind": "array", "name": "ArrayFoo", "valueType": { - "$ref": "315" + "$ref": "343" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2849,26 +3081,26 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.value", "serializationOptions": { - "$id": "371", + "$id": "399", "json": { - "$id": "372", + "$id": "400", "name": "value" } } }, { - "$id": "373", + "$id": "401", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "doc": "The link to the next page of items", "type": { - "$id": "374", + "$id": "402", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "375", + "$id": "403", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2883,9 +3115,9 @@ "decorators": [], "crossLanguageDefinitionId": "Azure.ResourceManager.ResourceListResult.nextLink", "serializationOptions": { - "$id": "376", + "$id": "404", "json": { - "$id": "377", + "$id": "405", "name": "nextLink" } } @@ -2895,19 +3127,19 @@ ], "clients": [ { - "$id": "378", + "$id": "406", "kind": "client", "name": "MgmtTypeSpecClient", "namespace": "MgmtTypeSpec", "methods": [], "parameters": [ { - "$id": "379", + "$id": "407", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "380", + "$id": "408", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2921,9 +3153,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "381", + "$id": "409", "type": { - "$id": "382", + "$id": "410", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2934,10 +3166,10 @@ ], "decorators": [ { - "$id": "383", + "$id": "411", "name": "Azure.ResourceManager.@armProviderNamespace", "arguments": { - "$id": "384" + "$id": "412" } } ], @@ -2947,13 +3179,13 @@ ], "children": [ { - "$id": "385", + "$id": "413", "kind": "client", "name": "Operations", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "386", + "$id": "414", "kind": "paging", "name": "list", "accessibility": "public", @@ -2962,19 +3194,19 @@ ], "doc": "List the operations for the provider", "operation": { - "$id": "387", + "$id": "415", "name": "list", "resourceName": "Operations", "doc": "List the operations for the provider", "accessibility": "public", "parameters": [ { - "$id": "388", + "$id": "416", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "389", + "$id": "417", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2988,9 +3220,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "390", + "$id": "418", "type": { - "$id": "391", + "$id": "419", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3001,21 +3233,11 @@ "skipUrlEncoding": false }, { - "$id": "392", + "$id": "420", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "393", - "kind": "constant", - "valueType": { - "$id": "394", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -3030,12 +3252,12 @@ ], "responses": [ { - "$id": "395", + "$id": "421", "statusCodes": [ 200 ], "bodyType": { - "$ref": "52" + "$ref": "80" }, "headers": [], "isErrorResponse": false, @@ -3055,11 +3277,11 @@ }, "parameters": [ { - "$id": "396", + "$id": "422", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "393" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -3073,13 +3295,13 @@ } ], "response": { - "$id": "397", + "$id": "423", "type": { - "$id": "398", + "$id": "424", "kind": "array", "name": "ArrayOperation", "valueType": { - "$ref": "55" + "$ref": "83" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3093,12 +3315,12 @@ "generateProtocol": true, "crossLanguageDefinitionId": "Azure.ResourceManager.Operations.list", "pagingMetadata": { - "$id": "399", + "$id": "425", "itemPropertySegments": [ "value" ], "nextLink": { - "$id": "400", + "$id": "426", "responseSegments": [ "nextLink" ], @@ -3109,12 +3331,12 @@ ], "parameters": [ { - "$id": "401", + "$id": "427", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "402", + "$id": "428", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3128,9 +3350,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "403", + "$id": "429", "type": { - "$id": "404", + "$id": "430", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3145,17 +3367,17 @@ "2024-05-01" ], "parent": { - "$ref": "378" + "$ref": "406" } }, { - "$id": "405", + "$id": "431", "kind": "client", "name": "PrivateLinks", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "406", + "$id": "432", "kind": "paging", "name": "GetAllPrivateLinkResources", "accessibility": "public", @@ -3164,19 +3386,19 @@ ], "doc": "list private links on the given resource", "operation": { - "$id": "407", + "$id": "433", "name": "GetAllPrivateLinkResources", "resourceName": "PrivateLinkResource", "doc": "list private links on the given resource", "accessibility": "public", "parameters": [ { - "$id": "408", + "$id": "434", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "409", + "$id": "435", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3190,9 +3412,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "410", + "$id": "436", "type": { - "$id": "411", + "$id": "437", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3203,17 +3425,17 @@ "skipUrlEncoding": false }, { - "$id": "412", + "$id": "438", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "413", + "$id": "439", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "414", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3232,12 +3454,12 @@ "skipUrlEncoding": false }, { - "$id": "415", + "$id": "441", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "416", + "$id": "442", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3254,21 +3476,11 @@ "skipUrlEncoding": false }, { - "$id": "417", + "$id": "443", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "418", - "kind": "constant", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -3283,12 +3495,12 @@ ], "responses": [ { - "$id": "420", + "$id": "444", "statusCodes": [ 200 ], "bodyType": { - "$ref": "131" + "$ref": "159" }, "headers": [], "isErrorResponse": false, @@ -3308,12 +3520,12 @@ }, "parameters": [ { - "$id": "421", + "$id": "445", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "422", + "$id": "446", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3330,11 +3542,11 @@ "skipUrlEncoding": false }, { - "$id": "423", + "$id": "447", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "418" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -3348,13 +3560,13 @@ } ], "response": { - "$id": "424", + "$id": "448", "type": { - "$id": "425", + "$id": "449", "kind": "array", "name": "ArrayPrivateLinkResource", "valueType": { - "$ref": "134" + "$ref": "162" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3368,12 +3580,12 @@ "generateProtocol": true, "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.listByMongoCluster", "pagingMetadata": { - "$id": "426", + "$id": "450", "itemPropertySegments": [ "value" ], "nextLink": { - "$id": "427", + "$id": "451", "responseSegments": [ "nextLink" ], @@ -3382,7 +3594,7 @@ } }, { - "$id": "428", + "$id": "452", "kind": "lro", "name": "start", "accessibility": "public", @@ -3391,19 +3603,19 @@ ], "doc": "Starts the SAP Application Server Instance.", "operation": { - "$id": "429", + "$id": "453", "name": "start", "resourceName": "PrivateLinks", "doc": "Starts the SAP Application Server Instance.", "accessibility": "public", "parameters": [ { - "$id": "430", + "$id": "454", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "431", + "$id": "455", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3417,9 +3629,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "432", + "$id": "456", "type": { - "$id": "433", + "$id": "457", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3430,17 +3642,17 @@ "skipUrlEncoding": false }, { - "$id": "434", + "$id": "458", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "435", + "$id": "459", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "436", + "$id": "460", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3459,12 +3671,12 @@ "skipUrlEncoding": false }, { - "$id": "437", + "$id": "461", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "438", + "$id": "462", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3481,12 +3693,12 @@ "skipUrlEncoding": false }, { - "$id": "439", + "$id": "463", "name": "privateLinkResourceName", "nameInRequest": "privateLinkResourceName", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "440", + "$id": "464", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3503,22 +3715,12 @@ "skipUrlEncoding": false }, { - "$id": "441", + "$id": "465", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "442", - "kind": "constant", - "valueType": { - "$id": "443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -3531,21 +3733,11 @@ "skipUrlEncoding": false }, { - "$id": "444", + "$id": "466", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "445", - "kind": "constant", - "valueType": { - "$id": "446", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -3558,12 +3750,12 @@ "skipUrlEncoding": false }, { - "$id": "447", + "$id": "467", "name": "body", "nameInRequest": "body", "doc": "SAP Application server instance start request body.", "type": { - "$ref": "243" + "$ref": "271" }, "location": "Body", "isApiVersion": false, @@ -3578,18 +3770,18 @@ ], "responses": [ { - "$id": "448", + "$id": "468", "statusCodes": [ 202 ], "headers": [ { - "$id": "449", + "$id": "469", "name": "location", "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "450", + "$id": "470", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3597,12 +3789,12 @@ } }, { - "$id": "451", + "$id": "471", "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": "452", + "$id": "472", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3613,12 +3805,12 @@ "isErrorResponse": false }, { - "$id": "453", + "$id": "473", "statusCodes": [ 200 ], "bodyType": { - "$ref": "248" + "$ref": "276" }, "headers": [], "isErrorResponse": false, @@ -3641,12 +3833,12 @@ }, "parameters": [ { - "$id": "454", + "$id": "474", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "455", + "$id": "475", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3663,12 +3855,12 @@ "skipUrlEncoding": false }, { - "$id": "456", + "$id": "476", "name": "privateLinkResourceName", "nameInRequest": "privateLinkResourceName", "doc": "The name of the private link associated with the Azure resource.", "type": { - "$id": "457", + "$id": "477", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3685,12 +3877,12 @@ "skipUrlEncoding": false }, { - "$id": "458", + "$id": "478", "name": "body", "nameInRequest": "body", "doc": "The content of the action request", "type": { - "$ref": "242" + "$ref": "270" }, "location": "", "isApiVersion": false, @@ -3703,22 +3895,12 @@ "skipUrlEncoding": false }, { - "$id": "459", + "$id": "479", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "460", - "kind": "constant", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -3731,21 +3913,11 @@ "skipUrlEncoding": false }, { - "$id": "462", + "$id": "480", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "463", - "kind": "constant", - "valueType": { - "$id": "464", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -3759,9 +3931,9 @@ } ], "response": { - "$id": "465", + "$id": "481", "type": { - "$ref": "248" + "$ref": "276" } }, "isOverride": false, @@ -3769,15 +3941,15 @@ "generateProtocol": true, "crossLanguageDefinitionId": "MgmtTypeSpec.PrivateLinks.start", "lroMetadata": { - "$id": "466", + "$id": "482", "finalStateVia": 1, "finalResponse": { - "$id": "467", + "$id": "483", "statusCodes": [ 200 ], "bodyType": { - "$ref": "248" + "$ref": "276" } } } @@ -3785,12 +3957,12 @@ ], "parameters": [ { - "$id": "468", + "$id": "484", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "469", + "$id": "485", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3804,9 +3976,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "470", + "$id": "486", "type": { - "$id": "471", + "$id": "487", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3817,10 +3989,10 @@ ], "decorators": [ { - "$id": "472", + "$id": "488", "name": "Azure.ResourceManager.@armResourceOperations", "arguments": { - "$id": "473" + "$id": "489" } } ], @@ -3829,17 +4001,17 @@ "2024-05-01" ], "parent": { - "$ref": "378" + "$ref": "406" } }, { - "$id": "474", + "$id": "490", "kind": "client", "name": "Foos", "namespace": "MgmtTypeSpec", "methods": [ { - "$id": "475", + "$id": "491", "kind": "lro", "name": "createOrUpdate", "accessibility": "public", @@ -3848,19 +4020,19 @@ ], "doc": "Create a Foo", "operation": { - "$id": "476", + "$id": "492", "name": "createOrUpdate", "resourceName": "Foo", "doc": "Create a Foo", "accessibility": "public", "parameters": [ { - "$id": "477", + "$id": "493", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "478", + "$id": "494", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3874,9 +4046,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "479", + "$id": "495", "type": { - "$id": "480", + "$id": "496", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3887,17 +4059,17 @@ "skipUrlEncoding": false }, { - "$id": "481", + "$id": "497", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "482", + "$id": "498", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "483", + "$id": "499", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3916,12 +4088,12 @@ "skipUrlEncoding": false }, { - "$id": "484", + "$id": "500", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "485", + "$id": "501", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3938,12 +4110,12 @@ "skipUrlEncoding": false }, { - "$id": "486", + "$id": "502", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "487", + "$id": "503", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3960,22 +4132,12 @@ "skipUrlEncoding": false }, { - "$id": "488", + "$id": "504", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "489", - "kind": "constant", - "valueType": { - "$id": "490", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3988,21 +4150,11 @@ "skipUrlEncoding": false }, { - "$id": "491", + "$id": "505", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "492", - "kind": "constant", - "valueType": { - "$id": "493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -4015,12 +4167,12 @@ "skipUrlEncoding": false }, { - "$id": "494", + "$id": "506", "name": "resource", "nameInRequest": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "315" + "$ref": "343" }, "location": "Body", "isApiVersion": false, @@ -4035,12 +4187,12 @@ ], "responses": [ { - "$id": "495", + "$id": "507", "statusCodes": [ 200 ], "bodyType": { - "$ref": "315" + "$ref": "343" }, "headers": [], "isErrorResponse": false, @@ -4049,21 +4201,21 @@ ] }, { - "$id": "496", + "$id": "508", "statusCodes": [ 201 ], "bodyType": { - "$ref": "315" + "$ref": "343" }, "headers": [ { - "$id": "497", + "$id": "509", "name": "azureAsyncOperation", "nameInResponse": "Azure-AsyncOperation", "doc": "A link to the status monitor", "type": { - "$id": "498", + "$id": "510", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4071,12 +4223,12 @@ } }, { - "$id": "499", + "$id": "511", "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": "500", + "$id": "512", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4102,22 +4254,22 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", "decorators": [ { - "$id": "501", + "$id": "513", "name": "Azure.ResourceManager.@armResourceCreateOrUpdate", "arguments": { - "$id": "502" + "$id": "514" } } ] }, "parameters": [ { - "$id": "503", + "$id": "515", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "504", + "$id": "516", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4134,12 +4286,12 @@ "skipUrlEncoding": false }, { - "$id": "505", + "$id": "517", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "506", + "$id": "518", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4156,12 +4308,12 @@ "skipUrlEncoding": false }, { - "$id": "507", + "$id": "519", "name": "resource", "nameInRequest": "resource", "doc": "Resource create parameters.", "type": { - "$ref": "315" + "$ref": "343" }, "location": "Body", "isApiVersion": false, @@ -4174,22 +4326,12 @@ "skipUrlEncoding": false }, { - "$id": "508", + "$id": "520", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "509", - "kind": "constant", - "valueType": { - "$id": "510", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -4202,21 +4344,11 @@ "skipUrlEncoding": false }, { - "$id": "511", + "$id": "521", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "512", - "kind": "constant", - "valueType": { - "$id": "513", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -4230,9 +4362,9 @@ } ], "response": { - "$id": "514", + "$id": "522", "type": { - "$ref": "315" + "$ref": "343" } }, "isOverride": false, @@ -4240,21 +4372,21 @@ "generateProtocol": true, "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.createOrUpdate", "lroMetadata": { - "$id": "515", + "$id": "523", "finalStateVia": 0, "finalResponse": { - "$id": "516", + "$id": "524", "statusCodes": [ 200 ], "bodyType": { - "$ref": "315" + "$ref": "343" } } } }, { - "$id": "517", + "$id": "525", "kind": "basic", "name": "get", "accessibility": "public", @@ -4263,19 +4395,19 @@ ], "doc": "Get a Foo", "operation": { - "$id": "518", + "$id": "526", "name": "get", "resourceName": "Foo", "doc": "Get a Foo", "accessibility": "public", "parameters": [ { - "$id": "519", + "$id": "527", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "520", + "$id": "528", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4289,9 +4421,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "521", + "$id": "529", "type": { - "$id": "522", + "$id": "530", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4302,17 +4434,17 @@ "skipUrlEncoding": false }, { - "$id": "523", + "$id": "531", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "524", + "$id": "532", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "525", + "$id": "533", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4331,12 +4463,12 @@ "skipUrlEncoding": false }, { - "$id": "526", + "$id": "534", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "527", + "$id": "535", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4353,12 +4485,12 @@ "skipUrlEncoding": false }, { - "$id": "528", + "$id": "536", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "529", + "$id": "537", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4375,21 +4507,11 @@ "skipUrlEncoding": false }, { - "$id": "530", + "$id": "538", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "531", - "kind": "constant", - "valueType": { - "$id": "532", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -4404,12 +4526,12 @@ ], "responses": [ { - "$id": "533", + "$id": "539", "statusCodes": [ 200 ], "bodyType": { - "$ref": "315" + "$ref": "343" }, "headers": [], "isErrorResponse": false, @@ -4427,22 +4549,22 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get", "decorators": [ { - "$id": "534", + "$id": "540", "name": "Azure.ResourceManager.@armResourceRead", "arguments": { - "$id": "535" + "$id": "541" } } ] }, "parameters": [ { - "$id": "536", + "$id": "542", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "537", + "$id": "543", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4459,12 +4581,12 @@ "skipUrlEncoding": false }, { - "$id": "538", + "$id": "544", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "539", + "$id": "545", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4481,11 +4603,11 @@ "skipUrlEncoding": false }, { - "$id": "540", + "$id": "546", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "531" + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -4499,9 +4621,9 @@ } ], "response": { - "$id": "541", + "$id": "547", "type": { - "$ref": "315" + "$ref": "343" } }, "isOverride": false, @@ -4510,7 +4632,7 @@ "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.get" }, { - "$id": "542", + "$id": "548", "kind": "lro", "name": "delete", "accessibility": "public", @@ -4519,19 +4641,19 @@ ], "doc": "Delete a Foo", "operation": { - "$id": "543", + "$id": "549", "name": "delete", "resourceName": "Foo", "doc": "Delete a Foo", "accessibility": "public", "parameters": [ { - "$id": "544", + "$id": "550", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "545", + "$id": "551", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4545,9 +4667,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "546", + "$id": "552", "type": { - "$id": "547", + "$id": "553", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4558,17 +4680,17 @@ "skipUrlEncoding": false }, { - "$id": "548", + "$id": "554", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "549", + "$id": "555", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "550", + "$id": "556", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4587,12 +4709,12 @@ "skipUrlEncoding": false }, { - "$id": "551", + "$id": "557", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "552", + "$id": "558", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4609,12 +4731,12 @@ "skipUrlEncoding": false }, { - "$id": "553", + "$id": "559", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "554", + "$id": "560", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4631,21 +4753,11 @@ "skipUrlEncoding": false }, { - "$id": "555", + "$id": "561", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "556", - "kind": "constant", - "valueType": { - "$id": "557", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -4660,18 +4772,18 @@ ], "responses": [ { - "$id": "558", + "$id": "562", "statusCodes": [ 202 ], "headers": [ { - "$id": "559", + "$id": "563", "name": "location", "nameInResponse": "Location", "doc": "The Location header contains the URL where the status of the long running operation can be checked.", "type": { - "$id": "560", + "$id": "564", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4679,12 +4791,12 @@ } }, { - "$id": "561", + "$id": "565", "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": "562", + "$id": "566", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -4695,7 +4807,7 @@ "isErrorResponse": false }, { - "$id": "563", + "$id": "567", "statusCodes": [ 204 ], @@ -4714,12 +4826,12 @@ }, "parameters": [ { - "$id": "564", + "$id": "568", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "565", + "$id": "569", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4736,12 +4848,12 @@ "skipUrlEncoding": false }, { - "$id": "566", + "$id": "570", "name": "fooName", "nameInRequest": "fooName", "doc": "The name of the Foo", "type": { - "$id": "567", + "$id": "571", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4758,21 +4870,11 @@ "skipUrlEncoding": false }, { - "$id": "568", + "$id": "572", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "569", - "kind": "constant", - "valueType": { - "$id": "570", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -4786,17 +4888,17 @@ } ], "response": { - "$id": "571" + "$id": "573" }, "isOverride": false, "generateConvenient": true, "generateProtocol": true, "crossLanguageDefinitionId": "MgmtTypeSpec.Foos.delete", "lroMetadata": { - "$id": "572", + "$id": "574", "finalStateVia": 1, "finalResponse": { - "$id": "573", + "$id": "575", "statusCodes": [ 204 ] @@ -4804,7 +4906,7 @@ } }, { - "$id": "574", + "$id": "576", "kind": "paging", "name": "list", "accessibility": "public", @@ -4813,19 +4915,19 @@ ], "doc": "List Foo resources by resource group", "operation": { - "$id": "575", + "$id": "577", "name": "list", "resourceName": "Foo", "doc": "List Foo resources by resource group", "accessibility": "public", "parameters": [ { - "$id": "576", + "$id": "578", "name": "apiVersion", "nameInRequest": "api-version", "doc": "The API version to use for this operation.", "type": { - "$id": "577", + "$id": "579", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4839,9 +4941,9 @@ "isRequired": true, "kind": "Client", "defaultValue": { - "$id": "578", + "$id": "580", "type": { - "$id": "579", + "$id": "581", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4852,17 +4954,17 @@ "skipUrlEncoding": false }, { - "$id": "580", + "$id": "582", "name": "subscriptionId", "nameInRequest": "subscriptionId", "doc": "The ID of the target subscription. The value must be an UUID.", "type": { - "$id": "581", + "$id": "583", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "582", + "$id": "584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4881,12 +4983,12 @@ "skipUrlEncoding": false }, { - "$id": "583", + "$id": "585", "name": "resourceGroupName", "nameInRequest": "resourceGroupName", "doc": "The name of the resource group. The name is case insensitive.", "type": { - "$id": "584", + "$id": "586", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4903,21 +5005,11 @@ "skipUrlEncoding": false }, { - "$id": "585", + "$id": "587", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "586", - "kind": "constant", - "valueType": { - "$id": "587", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -4937,7 +5029,7 @@ 200 ], "bodyType": { - "$ref": "368" + "$ref": "396" }, "headers": [], "isErrorResponse": false, @@ -4983,7 +5075,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "586" + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -5003,7 +5095,7 @@ "kind": "array", "name": "ArrayFoo", "valueType": { - "$ref": "315" + "$ref": "343" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -5077,8 +5169,10 @@ "arguments": { "$id": "603", "resourceModel": "MgmtTypeSpec.Foo", + "resourceClient": "MgmtTypeSpec.Foos", "isSingleton": false, - "resourceType": "MgmtTypeSpec/foos" + "resourceType": "MgmtTypeSpec/foos", + "resourceScope": "ResourceGroup" } } ], @@ -5087,7 +5181,7 @@ "2024-05-01" ], "parent": { - "$ref": "378" + "$ref": "406" } } ] diff --git a/eng/packages/http-client-csharp-mgmt/package-lock.json b/eng/packages/http-client-csharp-mgmt/package-lock.json index 40ac8aebc448..b213454caac2 100644 --- a/eng/packages/http-client-csharp-mgmt/package-lock.json +++ b/eng/packages/http-client-csharp-mgmt/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250508.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250522.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.17", @@ -180,12 +180,12 @@ } }, "node_modules/@azure-typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250508.1", - "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250508.1.tgz", - "integrity": "sha512-hWpnbizoqcVTUUtXd2dQ17/g0G2sm6o96Ek2ruEafJuQNYKq83wI7zwediw0FA7zP7aAvf1A10dFSg0XzlyiWg==", + "version": "1.0.0-alpha.20250522.1", + "resolved": "https://registry.npmjs.org/@azure-typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250522.1.tgz", + "integrity": "sha512-AC2r1TwBQj/RELc5omytsGhiVjKjRU4v1f3hI8r04XCCUcX9TnIYnGJnZ9eDQxhZKBM4/pNAyn7UW7eOq/PRSQ==", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250508.3" + "@typespec/http-client-csharp": "1.0.0-alpha.20250521.6" } }, "node_modules/@azure/abort-controller": { @@ -2351,9 +2351,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250508.3", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250508.3.tgz", - "integrity": "sha512-0dUPs3PhoGo2+/7/80A/1gfXCL7SQr2NMSP7/zOm0Txdwp7lRfl9uCBwN7Cm5qN9nPDXn9U2eqpp+NH5HY2sjQ==", + "version": "1.0.0-alpha.20250521.6", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250521.6.tgz", + "integrity": "sha512-NneBk0xpDO1RzpNvf5aGHpxaDRMMpKHkwpeYvLV3njhHKdA1lQrv9I5rTLs7F4No30jglmAcV5EeZPGuB0JtUw==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/packages/http-client-csharp-mgmt/package.json b/eng/packages/http-client-csharp-mgmt/package.json index f0a4ba319bde..f58d7159e508 100644 --- a/eng/packages/http-client-csharp-mgmt/package.json +++ b/eng/packages/http-client-csharp-mgmt/package.json @@ -37,7 +37,7 @@ "dist/**" ], "dependencies": { - "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250508.1" + "@azure-typespec/http-client-csharp": "1.0.0-alpha.20250522.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.17", diff --git a/eng/packages/http-client-csharp/emitter/src/emitter.ts b/eng/packages/http-client-csharp/emitter/src/emitter.ts index 0685d5e03336..002c7887714d 100644 --- a/eng/packages/http-client-csharp/emitter/src/emitter.ts +++ b/eng/packages/http-client-csharp/emitter/src/emitter.ts @@ -14,6 +14,7 @@ export async function $onEmit(context: EmitContext) { name: "MIT License", company: "Microsoft Corporation" }; + context.options["package-name"] ??= context.options["namespace"]; // warn if use-model-namespaces is true, but namespace is not set if (context.options["model-namespace"] && !context.options["namespace"]) { diff --git a/eng/packages/http-client-csharp/emitter/test/Unit/options.test.ts b/eng/packages/http-client-csharp/emitter/test/Unit/options.test.ts index d042db121225..af89c4eb30c9 100644 --- a/eng/packages/http-client-csharp/emitter/test/Unit/options.test.ts +++ b/eng/packages/http-client-csharp/emitter/test/Unit/options.test.ts @@ -1,5 +1,5 @@ import { Program } from "@typespec/compiler"; -import { beforeEach, describe, it } from "vitest"; +import { beforeEach, describe, it, vi } from "vitest"; import { createEmitterContext, createEmitterTestHost, @@ -19,6 +19,15 @@ describe("Configuration tests", async () => { `, runner ); + vi.mock("@typespec/http-client-csharp", async (importOriginal) => { + const actual = await importOriginal(); + return { + ...actual, + $onEmit: async () => { + // do nothing + } + }; + }) }); it("Diagnostic is logged when model-namespace is set without namespace", async () => { @@ -47,4 +56,32 @@ describe("Configuration tests", async () => { $onEmit(context); strictEqual(program.diagnostics.length, 0); }); + it("package-name defaults to namespace", async () => { + const options: AzureEmitterOptions = { + "namespace": "Test.Namespace" + }; + const context = createEmitterContext(program, options); + $onEmit(context); + strictEqual(program.diagnostics.length, 0); + strictEqual(context.options.namespace, "Test.Namespace"); + strictEqual(context.options["package-name"], "Test.Namespace"); + }); + it("package-name undefined if namespace and package-name not set", async () => { + const context = createEmitterContext(program); + $onEmit(context); + strictEqual(program.diagnostics.length, 0); + strictEqual(context.options["package-name"], undefined); + }); + it("package-name value used if set", async () => { + const options: AzureEmitterOptions = { + "namespace": "Test.Namespace", + "package-name": "Test.Package" + }; + const context = createEmitterContext(program, options); + $onEmit(context); + strictEqual(program.diagnostics.length, 0); + strictEqual(context.options.namespace, "Test.Namespace"); + strictEqual(context.options["package-name"], "Test.Package"); + }); }); + diff --git a/eng/packages/http-client-csharp/emitter/test/Unit/test-util.ts b/eng/packages/http-client-csharp/emitter/test/Unit/test-util.ts index fcdc4337b5d3..460b00d7d2dd 100644 --- a/eng/packages/http-client-csharp/emitter/test/Unit/test-util.ts +++ b/eng/packages/http-client-csharp/emitter/test/Unit/test-util.ts @@ -8,7 +8,6 @@ import { CompilerOptions, EmitContext, Program } from "@typespec/compiler"; import { createTestHost, TestHost } from "@typespec/compiler/testing"; import { CSharpEmitterContext, - CSharpEmitterOptions, createCSharpEmitterContext, Logger, LoggerLevel, @@ -93,7 +92,7 @@ export async function typeSpecCompile( export function createEmitterContext( program: Program, options: AzureEmitterOptions = {} -): EmitContext { +): EmitContext { return { program: program, emitterOutputDir: "./", @@ -107,7 +106,7 @@ export function createEmitterContext( "generate-convenience-methods": true, "package-name": undefined } - } as EmitContext; + } as EmitContext; } /* We always need to pass in the emitter name now that it is required so making a helper to do this. */ diff --git a/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 b/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 index ec225b562a69..941530e1aa2e 100644 --- a/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 +++ b/eng/packages/http-client-csharp/eng/scripts/Generate.ps1 @@ -77,15 +77,13 @@ $failingSpecs = @( Join-Path 'http' 'azure' 'client-generator-core' 'api-version' 'path' Join-Path 'http' 'azure' 'client-generator-core' 'api-version' 'query' Join-Path 'http' 'azure' 'core' 'basic' - Join-Path 'http' 'azure' 'core' 'lro' 'rpc' - Join-Path 'http' 'azure' 'core' 'lro' 'standard' Join-Path 'http' 'azure' 'core' 'model' Join-Path 'http' 'azure' 'core' 'page' Join-Path 'http' 'azure' 'core' 'scalar' Join-Path 'http' 'azure' 'core' 'traits' Join-Path 'http' 'azure' 'encode' 'duration' Join-Path 'http' 'azure' 'payload' 'pageable' - # These scenarios will be covered in Azure.Generator.Mgmt + # These scenarios will be covered in Azure.Generator.Management Join-Path 'http' 'azure' 'resource-manager' 'common-properties' Join-Path 'http' 'azure' 'resource-manager' 'non-resource' Join-Path 'http' 'azure' 'resource-manager' 'operation-templates' diff --git a/eng/packages/http-client-csharp/eng/scripts/Generation.psm1 b/eng/packages/http-client-csharp/eng/scripts/Generation.psm1 index 254255cdd244..4d471d4b9aec 100644 --- a/eng/packages/http-client-csharp/eng/scripts/Generation.psm1 +++ b/eng/packages/http-client-csharp/eng/scripts/Generation.psm1 @@ -107,7 +107,7 @@ function Refresh-Mgmt-Build { } # we don't want to build the entire solution because the test projects might not build until after regeneration - Invoke "dotnet build $repoRoot/../../http-client-csharp-mgmt/generator/Azure.Generator.Mgmt/src" + Invoke "dotnet build $repoRoot/../../http-client-csharp-mgmt/generator/Azure.Generator.Management/src" # exit if the generation failed if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE 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 fd6f18f3a96d..e18aed131b93 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 @@ -2,8 +2,8 @@ // Licensed under the MIT License. using System; -using System.ClientModel.Primitives; using System.Linq; +using Azure.Core; using Microsoft.TypeSpec.Generator.ClientModel; using Microsoft.TypeSpec.Generator.ClientModel.Providers; using Microsoft.TypeSpec.Generator.Expressions; @@ -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(ClientPipelineOptions)))) + return field.Modifiers.HasFlag(FieldModifiers.Public) || field.EnclosingType.Implements.Any(i => i.Equals(typeof(ClientOptions))) ? field : null; } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj index d1c7e3c5744b..767a47d42685 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Azure.Generator.csproj @@ -26,35 +26,35 @@ - + - - Always - - - Always - - + + Shared/Core Always - - Always - - - Always - - - Always - - - Always - - - Always - - - Always - diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs index a3674fcab475..5257ddf4d80c 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/AzureClientGenerator.cs @@ -52,5 +52,6 @@ protected override void Configure() AddVisitor(new NamespaceVisitor()); AddVisitor(new DistributedTracingVisitor()); AddVisitor(new PipelinePropertyVisitor()); + AddVisitor(new LroVisitor()); } -} +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs new file mode 100644 index 000000000000..d933accdb2d5 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ClientProviderExtensions.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Linq; +using Azure.Core.Pipeline; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Providers; + +namespace Azure.Generator +{ + internal static class ClientProviderExtensions + { + public static ClientProvider GetClient(this ScmMethodProvider method) => (ClientProvider)method.EnclosingType; + + public static string GetScopeName(this ScmMethodProvider method) => $"{method.EnclosingType.Name}.{method.Signature.Name}"; + + public static bool IsLroMethod(this ScmMethodProvider method) => + method is { ServiceMethod: InputLongRunningServiceMethod, EnclosingType: ClientProvider }; + + public static PropertyProvider GetClientDiagnosticProperty(this ClientProvider client) + { + return client.CanonicalView.Properties + .First(p => p.Type.Equals(typeof(ClientDiagnostics))); + } + + public static PropertyProvider GetPipelineProperty(this ClientProvider client) + { + return client.CanonicalView.Properties + .First(p => p.Type.Equals(typeof(HttpPipeline))); + } + } +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/ConfigurationExtensions.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs similarity index 100% rename from eng/packages/http-client-csharp/generator/Azure.Generator/src/ConfigurationExtensions.cs rename to eng/packages/http-client-csharp/generator/Azure.Generator/src/Extensions/ConfigurationExtensions.cs diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/KnownAzureParameters.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/KnownAzureParameters.cs index 1389eceebbc4..618f1af9ac06 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/KnownAzureParameters.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/KnownAzureParameters.cs @@ -4,6 +4,7 @@ using Microsoft.TypeSpec.Generator.Primitives; using Microsoft.TypeSpec.Generator.Providers; using System.Threading; +using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Primitives { @@ -13,6 +14,9 @@ internal class KnownAzureParameters public static readonly ParameterProvider WaitUntil = new("waitUntil", $" 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.", new CSharpType(typeof(WaitUntil))); + public static readonly ParameterProvider RequestContext = new("context", $"The request context, which can override default behaviors of the client pipeline on a per-call basis.", new CSharpType(typeof(RequestContext))); + public static readonly ParameterProvider OptionalRequestContext = new("context", $"The request context, which can override default behaviors of the client pipeline on a per-call basis.", new CSharpType(typeof(RequestContext)).WithNullable(true), defaultValue: Null); + public static readonly ParameterProvider CancellationTokenWithoutDefault = new("cancellationToken", $"The cancellation token to use.", new CSharpType(typeof(CancellationToken))); } } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs index 8d1754cdd2b4..4ac93d022e38 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Primitives/NewAzureProjectScaffolding.cs @@ -81,12 +81,14 @@ protected override string GetSourceProjectFileContent() "DiagnosticScope.cs", "HttpMessageSanitizer.cs", "TrimmingAttribute.cs", + "NoValueResponseOfT.cs", ]; private static readonly IReadOnlyList _lroSharedFiles = [ "AsyncLockWithValue.cs", "FixedDelayWithNoJitterStrategy.cs", + "HttpPipelineExtensions.cs", "IOperationSource.cs", "NextLinkOperationImplementation.cs", "OperationFinalStateVia.cs", @@ -94,6 +96,8 @@ protected override string GetSourceProjectFileContent() "OperationInternalBase.cs", "OperationInternalOfT.cs", "OperationPoller.cs", + "ProtocolOperation.cs", + "ProtocolOperationHelpers.cs", "SequentialDelayStrategy.cs", "TaskExtensions.cs", "VoidValue.cs" diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json index de7fde1bc081..27c1c1db475d 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Properties/launchSettings.json @@ -35,6 +35,16 @@ "commandName": "Executable", "executablePath": "dotnet" }, + "http-azure-core-lro-rpc": { + "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/core/lro/rpc -g AzureStubGenerator", + "commandName": "Executable", + "executablePath": "dotnet" + }, + "http-azure-core-lro-standard": { + "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/core/lro/standard -g AzureStubGenerator", + "commandName": "Executable", + "executablePath": "dotnet" + }, "http-azure-special-headers-client-request-id": { "commandLineArgs": "$(SolutionDir)/../dist/generator/Microsoft.TypeSpec.Generator.dll $(SolutionDir)/TestProjects/Spector/http/azure/special-headers/client-request-id -g AzureStubGenerator", "commandName": "Executable", diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/RequestContextExtensionsDefinition.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/RequestContextExtensionsDefinition.cs index 9dc9c6b6526d..3be9c0761162 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/RequestContextExtensionsDefinition.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Providers/RequestContextExtensionsDefinition.cs @@ -7,6 +7,7 @@ using Microsoft.TypeSpec.Generator.Statements; using System.IO; using System.Threading; +using Azure.Generator.Primitives; using static Microsoft.TypeSpec.Generator.Snippets.Snippet; namespace Azure.Generator.Providers @@ -23,22 +24,21 @@ internal class RequestContextExtensionsDefinition : TypeProvider private MethodProvider BuildParse() { - var requestContextParameter = new ParameterProvider("requestContext", $"", typeof(RequestContext)); var signature = new MethodSignature( "Parse", null, MethodSignatureModifiers.Public | MethodSignatureModifiers.Static | MethodSignatureModifiers.Extension, new CSharpType(typeof((CancellationToken, ErrorOptions))), null, - [requestContextParameter]); + [KnownAzureParameters.RequestContext]); var method = new MethodProvider(signature, new MethodBodyStatement[] { - new IfStatement(requestContextParameter.Equal(Null)) + new IfStatement(KnownAzureParameters.RequestContext.Equal(Null)) { Return(new TupleExpression(Static().Property(nameof(CancellationToken.None)), Static().Property(nameof(ErrorOptions.Default)))) }, - Return(new TupleExpression(requestContextParameter.Property(nameof(RequestContext.CancellationToken)), requestContextParameter.Property(nameof(RequestContext.ErrorOptions)))) + Return(new TupleExpression(KnownAzureParameters.RequestContext.Property(nameof(RequestContext.CancellationToken)), KnownAzureParameters.RequestContext.Property(nameof(RequestContext.ErrorOptions)))) }, this); return method; } diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs index 045e10591322..41fbeb9fb192 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/DistributedTracingVisitor.cs @@ -131,7 +131,7 @@ private static void UpdateDistributedTracingRefInSubClientFactoryMethod( List updatedFactoryMethodStatements = []; var statementsToVisit = method.BodyStatements ?? new ExpressionStatement(method.BodyExpression!); - foreach (var statement in statementsToVisit.Flatten()) + foreach (var statement in statementsToVisit) { if (TryUpdateSubClientFactoryMethodReturnStatement( statement, @@ -156,15 +156,14 @@ private static void UpdateProtocolMethodsWithDistributedTracing(ScmMethodProvide return; } - string scopeName = $"{method.EnclosingType.Name}.{method.Signature.Name}"; + string scopeName = method.GetScopeName(); const string asyncSuffix = "Async"; if (scopeName.EndsWith(asyncSuffix)) { scopeName = scopeName[..^asyncSuffix.Length]; } - PropertyProvider clientDiagnosticsProperty = method.EnclosingType.CanonicalView.Properties - .First(p => p.Name == ClientDiagnosticsPropertyName || p.OriginalName?.Equals(ClientDiagnosticsPropertyName) == true); + PropertyProvider clientDiagnosticsProperty = method.GetClient().GetClientDiagnosticProperty(); // declare scope var scopeDeclaration = UsingDeclare( @@ -175,16 +174,15 @@ private static void UpdateProtocolMethodsWithDistributedTracing(ScmMethodProvide // start scope var scopeStart = scope.Invoke(nameof(DiagnosticScope.Start)).Terminate(); // wrap existing statements in try / catch - var tryStatement = new TryStatement - { + var tryStatement = new TryExpression + ( method.BodyStatements ?? new ExpressionStatement(method.BodyExpression!) - }; + ); - var catchBlock = new CatchStatement(Declare("e", typeof(Exception), out var exception)) - { - scope.Invoke(nameof(DiagnosticScope.Failed), [exception]).Terminate(), - Throw() - }; + var catchBlock = new CatchExpression( + Declare("e", typeof(Exception), out var exception), + scope.Invoke(nameof(DiagnosticScope.Failed), [exception]).Terminate(), + Throw()); var tryCatchRequestBlock = new TryCatchFinallyStatement(tryStatement, catchBlock); List updatedBodyStatements = [scopeDeclaration, scopeStart, tryCatchRequestBlock]; diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs new file mode 100644 index 000000000000..0f32d13a7dd3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/src/Visitors/LroVisitor.cs @@ -0,0 +1,241 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Generator.Providers; +using Microsoft.TypeSpec.Generator.ClientModel; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Expressions; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Statements; +using static Microsoft.TypeSpec.Generator.Snippets.Snippet; + +namespace Azure.Generator.Visitors +{ + internal class LroVisitor : ScmLibraryVisitor + { + protected override ScmMethodProviderCollection? Visit( + InputServiceMethod serviceMethod, + ClientProvider client, + ScmMethodProviderCollection? methods) + { + if (serviceMethod is InputLongRunningServiceMethod { Response.Type: InputModelType responseModel } lroServiceMethod) + { + UpdateExplicitOperatorMethod(responseModel, lroServiceMethod); + } + + return methods; + } + + private static void UpdateExplicitOperatorMethod( + InputModelType responseModel, + InputLongRunningServiceMethod lroServiceMethod) + { + var model = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); + if (model == null) + { + return; + } + + // Update the explicit cast from response in LRO models to use the result path + var explicitOperator = model.SerializationProviders[0].Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); + + var resultSegment = lroServiceMethod.LongRunningServiceMetadata.ResultPath; + if (explicitOperator == null || string.IsNullOrEmpty(resultSegment)) + { + return; + } + + foreach (var statement in explicitOperator.BodyStatements!) + { + if (statement is ExpressionStatement { Expression: KeywordExpression + { Keyword: "return", Expression: InvokeMethodExpression invokeMethodExpression } }) + { + invokeMethodExpression.Update( + arguments: + [ + invokeMethodExpression.Arguments[0] + .Invoke("GetProperty", Literal(resultSegment)), + ..invokeMethodExpression.Arguments.Skip(1) + ]); + } + } + } + + protected override ScmMethodProvider? VisitMethod(ScmMethodProvider method) + { + if (method.IsLroMethod()) + { + UpdateMethodSignature(method); + } + + return method; + } + + private static void UpdateMethodSignature(ScmMethodProvider method) + { + var responseType = method.ServiceMethod!.Response.Type; + + var returnType = (responseType, method.IsProtocolMethod) switch + { + (null, _) => typeof(Operation), + (not null, true) => new CSharpType(typeof(Operation), typeof(BinaryData)), + _ => new CSharpType(typeof(Operation<>), AzureClientGenerator.Instance.TypeFactory.CreateCSharpType(responseType)!), + }; + var isAsync = method.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Async); + + // Update the method signature + var parameters = new List(method.Signature.Parameters); + parameters.Insert(0, new ParameterProvider( + name: "waitUntil", + type: typeof(WaitUntil), + description: FormattableStringFactory.Create( + " 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."))); + + method.Signature.Update( + parameters: parameters, + returnType: isAsync + ? new CSharpType(typeof(Task<>), returnType!) + : returnType); + + // Needed to update the XML docs + method.Update(signature: method.Signature); + } + + protected override MethodBodyStatement? VisitExpressionStatement( + ExpressionStatement expressionStatement, + MethodProvider method) + { + if (method is ScmMethodProvider scmMethod && scmMethod.IsLroMethod() && !scmMethod.IsProtocolMethod) + { + return UpdateConvenienceMethod(expressionStatement, scmMethod); + } + + return expressionStatement; + } + + private static MethodBodyStatement? UpdateConvenienceMethod( + ExpressionStatement expressionStatement, + ScmMethodProvider scmMethod) + { + var expression = expressionStatement.Expression; + var serviceMethod = scmMethod.ServiceMethod!; + switch (expression) + { + case AssignmentExpression { Value: AzureClientResponseProvider } assignmentExpression: + { + var resultVariable = (assignmentExpression.Variable as DeclarationExpression)?.Variable!; + if (serviceMethod.Response.Type != null) + { + resultVariable.Update(type: new CSharpType(typeof(Operation), typeof(BinaryData))); + } + else + { + // Return the result of the protocol method directly for convenience methods having no response body + return new KeywordExpression("return", assignmentExpression.Value).Terminate(); + } + + break; + } + // Remove the extra return statement for convenience methods having no response body + case KeywordExpression { Keyword: "return", Expression: InvokeMethodExpression { MethodName: "FromValue" } } when serviceMethod.Response.Type == null: + return null; + case KeywordExpression { Keyword: "return", Expression: InvokeMethodExpression { MethodName: "FromValue" } invokeMethodExpression }: + { + var response = new VariableExpression(typeof(Response), "response"); + var responseType = AzureClientGenerator.Instance.TypeFactory.CreateCSharpType(serviceMethod.Response.Type)!; + var client = (ClientProvider)scmMethod.EnclosingType; + var diagnosticsProperty = client.GetClientDiagnosticProperty(); + var scopeName = scmMethod.GetScopeName(); + invokeMethodExpression.Update( + instanceReference: Static(typeof(ProtocolOperationHelpers)), + methodName: "Convert", + arguments: + [ + (invokeMethodExpression.Arguments[0] as CastExpression)!.Inner, + new FuncExpression([response.Declaration], new CastExpression(response, responseType)), + diagnosticsProperty, + Literal(scopeName), + ]); + break; + } + } + + return expressionStatement; + } + + protected override InvokeMethodExpression? VisitInvokeMethodExpression(InvokeMethodExpression expression, MethodProvider method) + { + if (method is ScmMethodProvider scmMethod && scmMethod.IsLroMethod()) + { + if (scmMethod.IsProtocolMethod) + { + return UpdateProcessCall(expression, scmMethod); + } + + return UpdateProtocolMethodCall(expression, scmMethod); + } + + return expression; + } + + private static InvokeMethodExpression UpdateProcessCall( + InvokeMethodExpression expression, + ScmMethodProvider scmMethod) + { + // Update the process call to call the operation helper method + if (expression.MethodName?.StartsWith("Process") == true) + { + var client = (ClientProvider)scmMethod.EnclosingType; + var serviceMethod = scmMethod.ServiceMethod as InputLongRunningServiceMethod; + var finalStateVia = (OperationFinalStateVia) serviceMethod!.LongRunningServiceMetadata.FinalStateVia; + var finalStateEnumName = Enum.GetName(typeof(OperationFinalStateVia), finalStateVia); + + expression.Update( + instanceReference: Static(typeof(ProtocolOperationHelpers)), + arguments: + [ + client.GetPipelineProperty(), + expression.Arguments[0], + client.GetClientDiagnosticProperty(), + Literal(scmMethod.GetScopeName()), + Static(typeof(OperationFinalStateVia)).Property(finalStateEnumName!), + expression.Arguments[1], + scmMethod.Signature.Parameters[0] + ]); + } + + return expression; + } + + private static InvokeMethodExpression UpdateProtocolMethodCall( + InvokeMethodExpression expression, + ScmMethodProvider scmMethod) + { + if (scmMethod.Signature.Name == expression.MethodName || scmMethod.Signature.Name == expression.MethodSignature?.Name) + { + expression.Update( + arguments: + [ + scmMethod.Signature.Parameters[0], + ..expression.Arguments, + ]); + } + + return expression; + } + } +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj index b6baa935bb08..a7b8bc9a6bd4 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Azure.Generator.Tests.csproj @@ -35,5 +35,5 @@ - + diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs index f6f7749aa2bf..5e42073ff751 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/TestHelpers/MockHelpers.cs @@ -28,6 +28,7 @@ public static Mock LoadMockPlugin( Func? apiKeyAuth = null, Func? oauth2Auth = null, Func>? apiVersions = null, + Func>? inputLiterals = null, Func>? inputEnums = null, Func>? inputModels = null, Func>? clients = null, @@ -37,6 +38,7 @@ public static Mock LoadMockPlugin( string? configurationJson = null) { IReadOnlyList inputNsApiVersions = apiVersions?.Invoke() ?? []; + IReadOnlyList inputNsLiterals = inputLiterals?.Invoke() ?? []; IReadOnlyList inputNsEnums = inputEnums?.Invoke() ?? []; IReadOnlyList inputNsClients = clients?.Invoke() ?? []; IReadOnlyList inputNsModels = inputModels?.Invoke() ?? []; @@ -44,6 +46,7 @@ public static Mock LoadMockPlugin( var mockInputNs = new Mock( "Samples", inputNsApiVersions, + inputNsLiterals, inputNsEnums, inputNsModels, inputNsClients, @@ -78,7 +81,7 @@ public static Mock LoadMockPlugin( mockPluginInstance.SetupGet(p => p.TypeFactory).Returns(mockTypeFactory.Object); } - var sourceInputModel = new Mock(() => new SourceInputModel(null)) { CallBase = true }; + var sourceInputModel = new Mock(() => new SourceInputModel(null, null)) { CallBase = true }; mockPluginInstance.Setup(p => p.SourceInputModel).Returns(sourceInputModel.Object); var configureMethod = typeof(CodeModelGenerator).GetMethod( "Configure", diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs index 432614fb0fe2..125a1af61db0 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/DistributedTracingVisitorTests.cs @@ -79,7 +79,7 @@ public void TestUpdatesConstructors(InputClient inputClient) var updatedConstructor = visitor.InvokeVisitConstructor(constructor!); Assert.IsNotNull(updatedConstructor?.BodyStatements); - Assert.IsTrue(updatedConstructor!.BodyStatements!.Flatten().Any()); + Assert.IsTrue(updatedConstructor!.BodyStatements!.Any()); var bodyText = updatedConstructor.BodyStatements!.ToDisplayString(); var expectedText = isSubClient diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs new file mode 100644 index 000000000000..bb6bff206e7a --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/LroVisitorTests.cs @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.Pipeline; +using Azure.Generator.Tests.Common; +using Azure.Generator.Tests.TestHelpers; +using Azure.Generator.Visitors; +using Microsoft.TypeSpec.Generator; +using Microsoft.TypeSpec.Generator.ClientModel.Providers; +using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Primitives; +using Microsoft.TypeSpec.Generator.Providers; +using Microsoft.TypeSpec.Generator.Statements; +using NUnit.Framework; + +namespace Azure.Generator.Tests.Visitors +{ + public class LroVisitorTests + { + [Test] + public void UpdatesLroSignatureNoResponseBody() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.Parameter( + "p1", + InputPrimitiveType.String, + kind: InputParameterKind.Method) + ]; + var lro = InputFactory.Operation( + "foo", + parameters: parameters); + var lroServiceMethod = InputFactory.LongRunningServiceMethod("foo", lro, parameters: parameters); + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + MockHelpers.LoadMockPlugin(clients: () => [inputClient]); + + var clientProvider = AzureClientGenerator.Instance.TypeFactory.CreateClient(inputClient); + Assert.IsNotNull(clientProvider); + + foreach (var method in clientProvider!.Methods) + { + var updatedMethod = visitor.InvokeVisitMethod(method); + Assert.IsNotNull(updatedMethod); + var scmMethod = method as ScmMethodProvider; + Assert.IsNotNull(scmMethod); + var waitUntilParameter = scmMethod!.Signature.Parameters[0]; + Assert.IsTrue(waitUntilParameter.Type.Equals(typeof(WaitUntil))); + Assert.AreEqual("waitUntil", waitUntilParameter.Name); + + Assert.IsTrue(scmMethod.Signature.ReturnType!.Equals(typeof(Operation)) || + scmMethod.Signature.ReturnType!.Equals(new CSharpType(typeof(Task<>), typeof(Operation)))); + + if (scmMethod.IsProtocolMethod) + { + var requestContextParameter = scmMethod.Signature.Parameters[^1]; + Assert.IsTrue(requestContextParameter.Type.Equals(typeof(RequestContext))); + Assert.AreEqual("context", requestContextParameter.Name); + } + else + { + var cancellationTokenParameter = scmMethod.Signature.Parameters[^1]; + Assert.IsTrue(cancellationTokenParameter.Type.Equals(typeof(CancellationToken))); + Assert.AreEqual("cancellationToken", cancellationTokenParameter.Name); + } + } + } + + [Test] + public void UpdatesLroSignatureWithResponseBody() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.Parameter( + "p1", + InputPrimitiveType.String, + kind: InputParameterKind.Method) + ]; + var lro = InputFactory.Operation( + "foo", + parameters: parameters); + var responseModel = InputFactory.Model("foo"); + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "foo", + lro, parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + MockHelpers.LoadMockPlugin(clients: () => [inputClient]); + + var clientProvider = AzureClientGenerator.Instance.TypeFactory.CreateClient(inputClient); + Assert.IsNotNull(clientProvider); + + var responseModelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); + Assert.IsNotNull(responseModelProvider); + + foreach (var method in clientProvider!.Methods) + { + var updatedMethod = visitor.InvokeVisitMethod(method); + Assert.IsNotNull(updatedMethod); + var scmMethod = method as ScmMethodProvider; + Assert.IsNotNull(scmMethod); + var waitUntilParameter = scmMethod!.Signature.Parameters[0]; + Assert.IsTrue(waitUntilParameter.Type.Equals(typeof(WaitUntil))); + Assert.AreEqual("waitUntil", waitUntilParameter.Name); + + if (scmMethod.IsProtocolMethod) + { + var requestContextParameter = scmMethod.Signature.Parameters[^1]; + Assert.IsTrue(requestContextParameter.Type.Equals(typeof(RequestContext))); + Assert.AreEqual("context", requestContextParameter.Name); + } + else + { + var cancellationTokenParameter = scmMethod.Signature.Parameters[^1]; + Assert.IsTrue(cancellationTokenParameter.Type.Equals(typeof(CancellationToken))); + Assert.AreEqual("cancellationToken", cancellationTokenParameter.Name); + Assert.IsTrue(scmMethod.Signature.ReturnType!.Equals(new CSharpType(typeof(Operation<>), responseModelProvider!.Type)) || + scmMethod.Signature.ReturnType!.Equals(new CSharpType(typeof(Task<>), new CSharpType(typeof(Operation<>), responseModelProvider.Type)))); + } + } + } + + [Test] + public void UpdatesExplicitOperatorToUseResultSegment() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.Parameter( + "p1", + InputPrimitiveType.String, + kind: InputParameterKind.Method) + ]; + var lro = InputFactory.Operation( + "foo", + parameters: parameters); + var responseModel = InputFactory.Model("foo"); + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "foo", + lro, + parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"]), + longRunningServiceMetadata: InputFactory.LongRunningServiceMetadata( + finalState: 1, + finalResponse: InputFactory.OperationResponse(), + resultPath: "someResultPath")); + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + MockHelpers.LoadMockPlugin(clients: () => [inputClient]); + + var clientProvider = AzureClientGenerator.Instance.TypeFactory.CreateClient(inputClient); + Assert.IsNotNull(clientProvider); + + var responseModelProvider = AzureClientGenerator.Instance.TypeFactory.CreateModel(responseModel); + Assert.IsNotNull(responseModelProvider); + + var methodCollection = new ScmMethodProviderCollection(lroServiceMethod, clientProvider!); + visitor.InvokeVisitServiceMethod(lroServiceMethod, clientProvider!, methodCollection); + + var serializationProvider = responseModelProvider!.SerializationProviders[0]; + var explicitOperator = serializationProvider.Methods + .FirstOrDefault(m => m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Explicit) && + m.Signature.Modifiers.HasFlag(MethodSignatureModifiers.Operator)); + + Assert.IsNotNull(explicitOperator); + Assert.IsNotNull(explicitOperator!.BodyStatements); + Assert.AreEqual(Helpers.GetExpectedFromFile(), explicitOperator!.BodyStatements!.ToDisplayString()); + } + + [Test] + public void UpdatesConvenienceMethodBody() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.Parameter( + "p1", + InputPrimitiveType.String, + kind: InputParameterKind.Method) + ]; + var lro = InputFactory.Operation( + "foo", + parameters: parameters); + var responseModel = InputFactory.Model("foo"); + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "foo", + lro, parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + var plugin = MockHelpers.LoadMockPlugin(clients: () => [inputClient]); + var outputLibrary = plugin.Object.OutputLibrary; + visitor.InvokeVisitLibrary(outputLibrary); + + var clientProvider = outputLibrary.TypeProviders.OfType().FirstOrDefault(); + Assert.IsNotNull(clientProvider); + var convenienceMethod = clientProvider!.Methods + .FirstOrDefault(m => m.Signature.Parameters.All(p => p.Name != "context")); + + Assert.IsNotNull(convenienceMethod); + var actual = convenienceMethod!.BodyStatements!.ToDisplayString(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), actual); + } + + [Test] + public void UpdatesProtocolMethodBody() + { + var visitor = new TestLroVisitor(); + List parameters = + [ + InputFactory.Parameter( + "p1", + InputPrimitiveType.String, + kind: InputParameterKind.Method) + ]; + var lro = InputFactory.Operation( + "foo", + parameters: parameters); + var responseModel = InputFactory.Model("foo"); + var lroServiceMethod = InputFactory.LongRunningServiceMethod( + "foo", + lro, parameters: parameters, + response: InputFactory.ServiceMethodResponse(responseModel, ["result"])); + var inputClient = InputFactory.Client("TestClient", methods: [lroServiceMethod]); + var plugin = MockHelpers.LoadMockPlugin(clients: () => [inputClient]); + var outputLibrary = plugin.Object.OutputLibrary; + visitor.InvokeVisitLibrary(outputLibrary); + + var clientProvider = outputLibrary.TypeProviders.OfType().FirstOrDefault(); + Assert.IsNotNull(clientProvider); + var protocolMethod = clientProvider!.Methods + .FirstOrDefault(m => m.Signature.Parameters.Any(p => p.Name == "context")); + + Assert.IsNotNull(protocolMethod); + var actual = protocolMethod!.BodyStatements!.ToDisplayString(); + Assert.AreEqual(Helpers.GetExpectedFromFile(), actual); + } + + private class TestLroVisitor : LroVisitor + { + public MethodProvider? InvokeVisitMethod(MethodProvider method) + { + return base.VisitMethod(method); + } + + public ScmMethodProviderCollection? InvokeVisitServiceMethod( + InputServiceMethod serviceMethod, + ClientProvider client, + ScmMethodProviderCollection? methodCollection) + { + return base.Visit(serviceMethod, client, methodCollection); + } + + public void InvokeVisitLibrary(OutputLibrary library) + { + base.VisitLibrary(library); + } + } + } +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesConvenienceMethodBody.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesConvenienceMethodBody.cs new file mode 100644 index 000000000000..17fb3238fa7a --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesConvenienceMethodBody.cs @@ -0,0 +1,2 @@ +using global::Azure.Core.RequestContent content = global::Azure.Core.RequestContent.Create(global::System.BinaryData.FromString(p1)); +return this.Foo(waitUntil, content, cancellationToken.CanBeCanceled ? new global::Azure.RequestContext { CancellationToken = cancellationToken } : null); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs new file mode 100644 index 000000000000..3982914e3957 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesExplicitOperatorToUseResultSegment.cs @@ -0,0 +1,3 @@ +using global::Azure.Response response = result; +using global::System.Text.Json.JsonDocument document = global::System.Text.Json.JsonDocument.Parse(response.Content); +return global::Samples.Models.Foo.DeserializeFoo(document.RootElement.GetProperty("someResultPath"), global::Samples.ModelSerializationExtensions.WireOptions); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesProtocolMethodBody.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesProtocolMethodBody.cs new file mode 100644 index 000000000000..4dadcafeba61 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/Visitors/TestData/LroVisitorTests/UpdatesProtocolMethodBody.cs @@ -0,0 +1,2 @@ +using global::Azure.Core.HttpMessage message = this.CreateFooRequest(content, context); +return global::Azure.Core.ProtocolOperationHelpers.ProcessMessage(Pipeline, message, ClientDiagnostics, "TestClient.Foo", global::Azure.Core.OperationFinalStateVia.Location, context, waitUntil); diff --git a/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs b/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs index e08f7fc51579..52b4e7fa9c6b 100644 --- a/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs +++ b/eng/packages/http-client-csharp/generator/Azure.Generator/test/common/InputFactory.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using Microsoft.TypeSpec.Generator.Input; +using Microsoft.TypeSpec.Generator.Input.Extensions; namespace Azure.Generator.Tests.Common { @@ -43,7 +44,7 @@ public static class EnumMember /// public static InputEnumTypeValue Int32(string name, int value) { - return new InputEnumTypeValue(name, value, InputPrimitiveType.Int32, null, $"{name} description"); + return new InputEnumTypeValue(name, value, InputPrimitiveType.Int32, "", $"{name} description"); } /// @@ -54,7 +55,7 @@ public static InputEnumTypeValue Int32(string name, int value) /// public static InputEnumTypeValue Float32(string name, float value) { - return new InputEnumTypeValue(name, value, InputPrimitiveType.Float32, null, $"{name} description"); + return new InputEnumTypeValue(name, value, InputPrimitiveType.Float32, "", $"{name} description"); } /// @@ -65,7 +66,7 @@ public static InputEnumTypeValue Float32(string name, float value) /// public static InputEnumTypeValue String(string name, string value) { - return new InputEnumTypeValue(name, value, InputPrimitiveType.String, null, $"{name} description"); + return new InputEnumTypeValue(name, value, InputPrimitiveType.String, "", $"{name} description"); } } @@ -78,20 +79,24 @@ public static class Literal /// Construct input literal type value for string /// /// + /// + /// /// - public static InputLiteralType String(string value) + public static InputLiteralType String(string value, string? name = null, string? @namespace = null) { - return new InputLiteralType(InputPrimitiveType.String, value); + return new InputLiteralType(name ?? string.Empty, @namespace ?? string.Empty, InputPrimitiveType.String, value); } /// /// Construct input enum type value for any /// /// + /// + /// /// - public static InputLiteralType Any(object value) + public static InputLiteralType Int32(int value, string? name = null, string? @namespace = null) { - return new InputLiteralType(InputPrimitiveType.Any, value); + return new InputLiteralType(name ?? string.Empty, @namespace ?? string.Empty, InputPrimitiveType.Int32, value); } } @@ -190,9 +195,8 @@ public static InputParameter Parameter( /// /// /// - /// /// - /// + /// /// public static InputModelProperty Property( string name, @@ -202,20 +206,19 @@ public static InputModelProperty Property( bool isDiscriminator = false, string? wireName = null, string? summary = null, - string? description = null, string? serializedName = null, - InputModelPropertyKind kind = InputModelPropertyKind.Property) + string? doc = null) { return new InputModelProperty( name, - kind, summary, - description ?? $"Description for {name}", + doc ?? $"Description for {name}", type, isRequired, isReadOnly, + access: null, isDiscriminator, - serializedName, + serializedName ?? wireName ?? name.ToVariableName(), new(json: new(wireName ?? name))); } @@ -371,6 +374,55 @@ public static InputPagingServiceMetadata PagingMetadata(IReadOnlyList it return new InputPagingServiceMetadata(itemPropertySegments, nextLink, continuationToken); } + /// + /// Construct paging service method + /// + /// + /// + /// + /// + /// + /// + /// + /// + public static InputLongRunningServiceMethod LongRunningServiceMethod( + string name, + InputOperation operation, + string access = "public", + IReadOnlyList? parameters = null, + InputServiceMethodResponse? response = null, + InputServiceMethodResponse? exception = null, + InputLongRunningServiceMetadata? longRunningServiceMetadata = null) + { + return new InputLongRunningServiceMethod( + name, + access, + [], + null, + null, + operation, + parameters ?? [], + response ?? ServiceMethodResponse(null, null), + exception, + false, + true, + true, + string.Empty, + longRunningServiceMetadata ?? LongRunningServiceMetadata(1, OperationResponse(), null)); + } + + /// + /// Construct paging metadata + /// + /// + /// + /// + /// + public static InputLongRunningServiceMetadata LongRunningServiceMetadata(int finalState, InputOperationResponse finalResponse, string? resultPath) + { + return new InputLongRunningServiceMetadata(finalState, finalResponse, resultPath); + } + /// /// Construct input operation /// diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj index 96622e110669..e7654ba03c25 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/BasicTypeSpec.csproj @@ -18,6 +18,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs index 43ccfd9a6891..ce28ea62b44d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecClient.cs @@ -865,12 +865,13 @@ public virtual async Task AnonymousBodyAsync(RequestContent content, R /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , or is null. + /// , , or is null. /// Service returned a non-success status code. - public virtual Response AnonymousBody(string name, BinaryData requiredUnion, ThingModelRequiredLiteralString requiredLiteralString, ThingModelRequiredLiteralInt requiredLiteralInt, ThingModelRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingModelOptionalLiteralString? optionalLiteralString = default, ThingModelOptionalLiteralInt? optionalLiteralInt = default, ThingModelOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual Response AnonymousBody(string name, BinaryData requiredUnion, string requiredLiteralString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); + Argument.AssertNotNull(requiredLiteralString, nameof(requiredLiteralString)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); ThingModel spreadModel = new ThingModel( @@ -907,12 +908,13 @@ public virtual Response AnonymousBody(string name, BinaryData requir /// optional literal bool. /// optional nullable collection. /// The cancellation token that can be used to cancel the operation. - /// , or is null. + /// , , or is null. /// Service returned a non-success status code. - public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, ThingModelRequiredLiteralString requiredLiteralString, ThingModelRequiredLiteralInt requiredLiteralInt, ThingModelRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, ThingModelOptionalLiteralString? optionalLiteralString = default, ThingModelOptionalLiteralInt? optionalLiteralInt = default, ThingModelOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) + public virtual async Task> AnonymousBodyAsync(string name, BinaryData requiredUnion, string requiredLiteralString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string requiredBadDescription, IEnumerable requiredNullableList, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, IEnumerable optionalNullableList = default, CancellationToken cancellationToken = default) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(requiredUnion, nameof(requiredUnion)); + Argument.AssertNotNull(requiredLiteralString, nameof(requiredLiteralString)); Argument.AssertNotNull(requiredBadDescription, nameof(requiredBadDescription)); ThingModel spreadModel = new ThingModel( diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecModelFactory.cs index 564d003e76a5..139f8fbf22e0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/BasicTypeSpecModelFactory.cs @@ -29,7 +29,7 @@ public static partial class BasicTypeSpecModelFactory /// optional nullable collection. /// required nullable collection. /// A new instance for mocking. - public static ThingModel ThingModel(string name = default, BinaryData requiredUnion = default, ThingModelRequiredLiteralString requiredLiteralString = default, ThingModelRequiredLiteralInt requiredLiteralInt = default, ThingModelRequiredLiteralFloat requiredLiteralFloat = default, bool requiredLiteralBool = default, ThingModelOptionalLiteralString? optionalLiteralString = default, ThingModelOptionalLiteralInt? optionalLiteralInt = default, ThingModelOptionalLiteralFloat? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default) + public static ThingModel ThingModel(string name = default, BinaryData requiredUnion = default, string requiredLiteralString = default, int requiredLiteralInt = default, float requiredLiteralFloat = default, bool requiredLiteralBool = default, string optionalLiteralString = default, int? optionalLiteralInt = default, float? optionalLiteralFloat = default, bool? optionalLiteralBool = default, string requiredBadDescription = default, IEnumerable optionalNullableList = default, IEnumerable requiredNullableList = default) { optionalNullableList ??= new ChangeTrackingList(); requiredNullableList ??= new ChangeTrackingList(); @@ -125,7 +125,6 @@ public static RoundTripModel RoundTripModel(string requiredString = default, int /// A new instance for mocking. public static ModelWithRequiredNullableProperties ModelWithRequiredNullableProperties(int? requiredNullablePrimitive = default, StringExtensibleEnum? requiredExtensibleEnum = default, StringFixedEnum? requiredFixedEnum = default) { - return new ModelWithRequiredNullableProperties(requiredNullablePrimitive, requiredExtensibleEnum, requiredFixedEnum, additionalBinaryDataProperties: null); } @@ -134,7 +133,6 @@ public static ModelWithRequiredNullableProperties ModelWithRequiredNullablePrope /// A new instance for mocking. public static FriendModel FriendModel(string name = default) { - return new FriendModel(name, additionalBinaryDataProperties: null); } @@ -143,7 +141,6 @@ public static FriendModel FriendModel(string name = default) /// A new instance for mocking. public static RenamedModel RenamedModel(string name = default) { - return new RenamedModel(name, additionalBinaryDataProperties: null); } @@ -151,7 +148,6 @@ public static RenamedModel RenamedModel(string name = default) /// A new instance for mocking. public static ReturnsAnonymousModelResponse ReturnsAnonymousModelResponse() { - return new ReturnsAnonymousModelResponse(additionalBinaryDataProperties: null); } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs index 3bf24c7cee31..c83a130ed811 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/RequestContextExtensions.cs @@ -13,14 +13,14 @@ namespace BasicTypeSpec { internal static partial class RequestContextExtensions { - /// - public static ValueTuple Parse(this RequestContext requestContext) + /// 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 (requestContext == null) + if (context == null) { return (CancellationToken.None, ErrorOptions.Default); } - return (requestContext.CancellationToken, requestContext.ErrorOptions); + return (context.CancellationToken, context.ErrorOptions); } } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/TypeFormatters.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/TypeFormatters.cs index 6cb37b3a0ad1..f737f82412f9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/TypeFormatters.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Internal/TypeFormatters.cs @@ -8,7 +8,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Xml; namespace BasicTypeSpec { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.Serialization.cs index f9cce1c889c8..5ddbb705140b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.Serialization.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.Serialization.cs @@ -52,27 +52,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } #endif writer.WritePropertyName("requiredLiteralString"u8); - writer.WriteStringValue(RequiredLiteralString.ToString()); + writer.WriteStringValue(RequiredLiteralString); writer.WritePropertyName("requiredLiteralInt"u8); - writer.WriteNumberValue(RequiredLiteralInt.ToSerialInt32()); + writer.WriteNumberValue(RequiredLiteralInt); writer.WritePropertyName("requiredLiteralFloat"u8); - writer.WriteNumberValue(RequiredLiteralFloat.ToSerialSingle()); + writer.WriteNumberValue(RequiredLiteralFloat); writer.WritePropertyName("requiredLiteralBool"u8); writer.WriteBooleanValue(RequiredLiteralBool); if (Optional.IsDefined(OptionalLiteralString)) { writer.WritePropertyName("optionalLiteralString"u8); - writer.WriteStringValue(OptionalLiteralString.Value.ToString()); + writer.WriteStringValue(OptionalLiteralString); } if (Optional.IsDefined(OptionalLiteralInt)) { writer.WritePropertyName("optionalLiteralInt"u8); - writer.WriteNumberValue(OptionalLiteralInt.Value.ToSerialInt32()); + writer.WriteNumberValue(OptionalLiteralInt.Value); } if (Optional.IsDefined(OptionalLiteralFloat)) { writer.WritePropertyName("optionalLiteralFloat"u8); - writer.WriteNumberValue(OptionalLiteralFloat.Value.ToSerialSingle()); + writer.WriteNumberValue(OptionalLiteralFloat.Value); } if (Optional.IsDefined(OptionalLiteralBool)) { @@ -149,13 +149,13 @@ internal static ThingModel DeserializeThingModel(JsonElement element, ModelReade } string name = default; BinaryData requiredUnion = default; - ThingModelRequiredLiteralString requiredLiteralString = default; - ThingModelRequiredLiteralInt requiredLiteralInt = default; - ThingModelRequiredLiteralFloat requiredLiteralFloat = default; + string requiredLiteralString = default; + int requiredLiteralInt = default; + float requiredLiteralFloat = default; bool requiredLiteralBool = default; - ThingModelOptionalLiteralString? optionalLiteralString = default; - ThingModelOptionalLiteralInt? optionalLiteralInt = default; - ThingModelOptionalLiteralFloat? optionalLiteralFloat = default; + string optionalLiteralString = default; + int? optionalLiteralInt = default; + float? optionalLiteralFloat = default; bool? optionalLiteralBool = default; string requiredBadDescription = default; IList optionalNullableList = default; @@ -175,17 +175,17 @@ internal static ThingModel DeserializeThingModel(JsonElement element, ModelReade } if (prop.NameEquals("requiredLiteralString"u8)) { - requiredLiteralString = new ThingModelRequiredLiteralString(prop.Value.GetString()); + requiredLiteralString = prop.Value.GetString(); continue; } if (prop.NameEquals("requiredLiteralInt"u8)) { - requiredLiteralInt = new ThingModelRequiredLiteralInt(prop.Value.GetInt32()); + requiredLiteralInt = prop.Value.GetInt32(); continue; } if (prop.NameEquals("requiredLiteralFloat"u8)) { - requiredLiteralFloat = new ThingModelRequiredLiteralFloat(prop.Value.GetSingle()); + requiredLiteralFloat = prop.Value.GetSingle(); continue; } if (prop.NameEquals("requiredLiteralBool"u8)) @@ -195,11 +195,7 @@ internal static ThingModel DeserializeThingModel(JsonElement element, ModelReade } if (prop.NameEquals("optionalLiteralString"u8)) { - if (prop.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - optionalLiteralString = new ThingModelOptionalLiteralString(prop.Value.GetString()); + optionalLiteralString = prop.Value.GetString(); continue; } if (prop.NameEquals("optionalLiteralInt"u8)) @@ -208,7 +204,7 @@ internal static ThingModel DeserializeThingModel(JsonElement element, ModelReade { continue; } - optionalLiteralInt = new ThingModelOptionalLiteralInt(prop.Value.GetInt32()); + optionalLiteralInt = prop.Value.GetInt32(); continue; } if (prop.NameEquals("optionalLiteralFloat"u8)) @@ -217,7 +213,7 @@ internal static ThingModel DeserializeThingModel(JsonElement element, ModelReade { continue; } - optionalLiteralFloat = new ThingModelOptionalLiteralFloat(prop.Value.GetSingle()); + optionalLiteralFloat = prop.Value.GetSingle(); continue; } if (prop.NameEquals("optionalLiteralBool"u8)) diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.cs index 472eeb446526..960e79411a5a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModel.cs @@ -52,7 +52,7 @@ public ThingModel(string name, BinaryData requiredUnion, string requiredBadDescr /// optional nullable collection. /// required nullable collection. /// Keeps track of any properties unknown to the library. - internal ThingModel(string name, BinaryData requiredUnion, ThingModelRequiredLiteralString requiredLiteralString, ThingModelRequiredLiteralInt requiredLiteralInt, ThingModelRequiredLiteralFloat requiredLiteralFloat, bool requiredLiteralBool, ThingModelOptionalLiteralString? optionalLiteralString, ThingModelOptionalLiteralInt? optionalLiteralInt, ThingModelOptionalLiteralFloat? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, IDictionary additionalBinaryDataProperties) + internal ThingModel(string name, BinaryData requiredUnion, string requiredLiteralString, int requiredLiteralInt, float requiredLiteralFloat, bool requiredLiteralBool, string optionalLiteralString, int? optionalLiteralInt, float? optionalLiteralFloat, bool? optionalLiteralBool, string requiredBadDescription, IList optionalNullableList, IList requiredNullableList, IDictionary additionalBinaryDataProperties) { Name = name; RequiredUnion = requiredUnion; @@ -118,25 +118,25 @@ internal ThingModel(string name, BinaryData requiredUnion, ThingModelRequiredLit public BinaryData RequiredUnion { get; set; } /// required literal string. - public ThingModelRequiredLiteralString RequiredLiteralString { get; } = "accept"; + public string RequiredLiteralString { get; } = "accept"; /// required literal int. - public ThingModelRequiredLiteralInt RequiredLiteralInt { get; } = 123; + public int RequiredLiteralInt { get; } = 123; /// required literal float. - public ThingModelRequiredLiteralFloat RequiredLiteralFloat { get; } = 1.23F; + public float RequiredLiteralFloat { get; } = 1.23F; /// required literal bool. public bool RequiredLiteralBool { get; } = false; /// optional literal string. - public ThingModelOptionalLiteralString? OptionalLiteralString { get; set; } + public string OptionalLiteralString { get; set; } /// optional literal int. - public ThingModelOptionalLiteralInt? OptionalLiteralInt { get; set; } + public int? OptionalLiteralInt { get; set; } /// optional literal float. - public ThingModelOptionalLiteralFloat? OptionalLiteralFloat { get; set; } + public float? OptionalLiteralFloat { get; set; } /// optional literal bool. public bool? OptionalLiteralBool { get; set; } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.Serialization.cs deleted file mode 100644 index 979acbef69b1..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec -{ - /// - public readonly partial struct ThingModelOptionalLiteralFloat - { - internal float ToSerialSingle() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.cs deleted file mode 100644 index cddb8393b790..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralFloat.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec -{ - /// The ThingModel_optionalLiteralFloat. - public readonly partial struct ThingModelOptionalLiteralFloat : IEquatable - { - private readonly float _value; - /// 4.56. - private const float _456Value = 4.56F; - - /// Initializes a new instance of . - /// The value. - public ThingModelOptionalLiteralFloat(float value) - { - _value = value; - } - - /// 4.56. - public static ThingModelOptionalLiteralFloat _456 { get; } = new ThingModelOptionalLiteralFloat(_456Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelOptionalLiteralFloat left, ThingModelOptionalLiteralFloat 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 !=(ThingModelOptionalLiteralFloat left, ThingModelOptionalLiteralFloat right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelOptionalLiteralFloat(float value) => new ThingModelOptionalLiteralFloat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelOptionalLiteralFloat other && Equals(other); - - /// - public bool Equals(ThingModelOptionalLiteralFloat other) => Equals(_value, other._value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.Serialization.cs deleted file mode 100644 index c3d97e54678f..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec -{ - /// - public readonly partial struct ThingModelOptionalLiteralInt - { - internal int ToSerialInt32() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.cs deleted file mode 100644 index 8c01b625d73b..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralInt.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec -{ - /// The ThingModel_optionalLiteralInt. - public readonly partial struct ThingModelOptionalLiteralInt : IEquatable - { - private readonly int _value; - /// 456. - private const int _456Value = 456; - - /// Initializes a new instance of . - /// The value. - public ThingModelOptionalLiteralInt(int value) - { - _value = value; - } - - /// 456. - public static ThingModelOptionalLiteralInt _456 { get; } = new ThingModelOptionalLiteralInt(_456Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelOptionalLiteralInt left, ThingModelOptionalLiteralInt 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 !=(ThingModelOptionalLiteralInt left, ThingModelOptionalLiteralInt right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelOptionalLiteralInt(int value) => new ThingModelOptionalLiteralInt(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelOptionalLiteralInt other && Equals(other); - - /// - public bool Equals(ThingModelOptionalLiteralInt other) => Equals(_value, other._value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralString.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralString.cs deleted file mode 100644 index 29d9c67646b2..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelOptionalLiteralString.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace BasicTypeSpec -{ - /// The ThingModel_optionalLiteralString. - public readonly partial struct ThingModelOptionalLiteralString : IEquatable - { - private readonly string _value; - /// reject. - private const string RejectValue = "reject"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public ThingModelOptionalLiteralString(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// reject. - public static ThingModelOptionalLiteralString Reject { get; } = new ThingModelOptionalLiteralString(RejectValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelOptionalLiteralString left, ThingModelOptionalLiteralString 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 !=(ThingModelOptionalLiteralString left, ThingModelOptionalLiteralString right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelOptionalLiteralString(string value) => new ThingModelOptionalLiteralString(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelOptionalLiteralString other && Equals(other); - - /// - public bool Equals(ThingModelOptionalLiteralString 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/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.Serialization.cs deleted file mode 100644 index 6b0d78b8fabe..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec -{ - /// - public readonly partial struct ThingModelRequiredLiteralFloat - { - internal float ToSerialSingle() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.cs deleted file mode 100644 index 4d08631cb6e9..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralFloat.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec -{ - /// The ThingModel_requiredLiteralFloat. - public readonly partial struct ThingModelRequiredLiteralFloat : IEquatable - { - private readonly float _value; - /// 1.23. - private const float _123Value = 1.23F; - - /// Initializes a new instance of . - /// The value. - public ThingModelRequiredLiteralFloat(float value) - { - _value = value; - } - - /// 1.23. - public static ThingModelRequiredLiteralFloat _123 { get; } = new ThingModelRequiredLiteralFloat(_123Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelRequiredLiteralFloat left, ThingModelRequiredLiteralFloat 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 !=(ThingModelRequiredLiteralFloat left, ThingModelRequiredLiteralFloat right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelRequiredLiteralFloat(float value) => new ThingModelRequiredLiteralFloat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelRequiredLiteralFloat other && Equals(other); - - /// - public bool Equals(ThingModelRequiredLiteralFloat other) => Equals(_value, other._value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.Serialization.cs deleted file mode 100644 index 98dcb9e2ff0c..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.Serialization.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace BasicTypeSpec -{ - /// - public readonly partial struct ThingModelRequiredLiteralInt - { - internal int ToSerialInt32() => _value; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.cs deleted file mode 100644 index 3c50b2bfb8b5..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralInt.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; -using System.Globalization; - -namespace BasicTypeSpec -{ - /// The ThingModel_requiredLiteralInt. - public readonly partial struct ThingModelRequiredLiteralInt : IEquatable - { - private readonly int _value; - /// 123. - private const int _123Value = 123; - - /// Initializes a new instance of . - /// The value. - public ThingModelRequiredLiteralInt(int value) - { - _value = value; - } - - /// 123. - public static ThingModelRequiredLiteralInt _123 { get; } = new ThingModelRequiredLiteralInt(_123Value); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelRequiredLiteralInt left, ThingModelRequiredLiteralInt 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 !=(ThingModelRequiredLiteralInt left, ThingModelRequiredLiteralInt right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelRequiredLiteralInt(int value) => new ThingModelRequiredLiteralInt(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelRequiredLiteralInt other && Equals(other); - - /// - public bool Equals(ThingModelRequiredLiteralInt other) => Equals(_value, other._value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value.GetHashCode(); - - /// - public override string ToString() => _value.ToString(CultureInfo.InvariantCulture); - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralString.cs b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralString.cs deleted file mode 100644 index 8c2ed1360460..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/src/Generated/Models/ThingModelRequiredLiteralString.cs +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace BasicTypeSpec -{ - /// The ThingModel_requiredLiteralString. - public readonly partial struct ThingModelRequiredLiteralString : IEquatable - { - private readonly string _value; - /// accept. - private const string AcceptValue = "accept"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public ThingModelRequiredLiteralString(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// accept. - public static ThingModelRequiredLiteralString Accept { get; } = new ThingModelRequiredLiteralString(AcceptValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(ThingModelRequiredLiteralString left, ThingModelRequiredLiteralString 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 !=(ThingModelRequiredLiteralString left, ThingModelRequiredLiteralString right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator ThingModelRequiredLiteralString(string value) => new ThingModelRequiredLiteralString(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThingModelRequiredLiteralString other && Equals(other); - - /// - public bool Equals(ThingModelRequiredLiteralString 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/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Local/Basic-TypeSpec/tspCodeModel.json index c381435699d7..619903aa0a61 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 @@ -9,214 +9,10 @@ { "$id": "2", "kind": "enum", - "name": "ThingModel_requiredLiteralString", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "accept", - "value": "accept", - "doc": "accept", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_requiredLiteralString", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "5", - "kind": "enum", - "name": "ThingModel_requiredLiteralInt", - "valueType": { - "$id": "6", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "values": [ - { - "$id": "7", - "kind": "enumvalue", - "name": "123", - "value": 123, - "doc": "123", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_requiredLiteralInt", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "8", - "kind": "enum", - "name": "ThingModel_requiredLiteralFloat", - "valueType": { - "$id": "9", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "values": [ - { - "$id": "10", - "kind": "enumvalue", - "name": "1.23", - "value": 1.23, - "doc": "1.23", - "valueType": { - "$ref": "9" - }, - "enumType": { - "$ref": "8" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_requiredLiteralFloat", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "11", - "kind": "enum", - "name": "ThingModel_optionalLiteralString", - "valueType": { - "$id": "12", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "13", - "kind": "enumvalue", - "name": "reject", - "value": "reject", - "doc": "reject", - "valueType": { - "$ref": "12" - }, - "enumType": { - "$ref": "11" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_optionalLiteralString", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "14", - "kind": "enum", - "name": "ThingModel_optionalLiteralInt", - "valueType": { - "$id": "15", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "values": [ - { - "$id": "16", - "kind": "enumvalue", - "name": "456", - "value": 456, - "doc": "456", - "valueType": { - "$ref": "15" - }, - "enumType": { - "$ref": "14" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_optionalLiteralInt", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "17", - "kind": "enum", - "name": "ThingModel_optionalLiteralFloat", - "valueType": { - "$id": "18", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "values": [ - { - "$id": "19", - "kind": "enumvalue", - "name": "4.56", - "value": 4.56, - "doc": "4.56", - "valueType": { - "$ref": "18" - }, - "enumType": { - "$ref": "17" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "BasicTypeSpec", - "doc": "The ThingModel_optionalLiteralFloat", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Spread,Json", - "decorators": [] - }, - { - "$id": "20", - "kind": "enum", "name": "StringFixedEnum", "crossLanguageDefinitionId": "BasicTypeSpec.StringFixedEnum", "valueType": { - "$id": "21", + "$id": "3", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -224,53 +20,53 @@ }, "values": [ { - "$id": "22", + "$id": "4", "kind": "enumvalue", "name": "One", "value": "1", "valueType": { - "$id": "23", + "$id": "5", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "20" + "$ref": "2" }, "decorators": [] }, { - "$id": "24", + "$id": "6", "kind": "enumvalue", "name": "Two", "value": "2", "valueType": { - "$id": "25", + "$id": "7", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "20" + "$ref": "2" }, "decorators": [] }, { - "$id": "26", + "$id": "8", "kind": "enumvalue", "name": "Four", "value": "4", "valueType": { - "$id": "27", + "$id": "9", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "20" + "$ref": "2" }, "decorators": [] } @@ -283,12 +79,12 @@ "decorators": [] }, { - "$id": "28", + "$id": "10", "kind": "enum", "name": "StringExtensibleEnum", "crossLanguageDefinitionId": "BasicTypeSpec.StringExtensibleEnum", "valueType": { - "$id": "29", + "$id": "11", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -296,53 +92,53 @@ }, "values": [ { - "$id": "30", + "$id": "12", "kind": "enumvalue", "name": "One", "value": "1", "valueType": { - "$id": "31", + "$id": "13", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "28" + "$ref": "10" }, "decorators": [] }, { - "$id": "32", + "$id": "14", "kind": "enumvalue", "name": "Two", "value": "2", "valueType": { - "$id": "33", + "$id": "15", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "28" + "$ref": "10" }, "decorators": [] }, { - "$id": "34", + "$id": "16", "kind": "enumvalue", "name": "Four", "value": "4", "valueType": { - "$id": "35", + "$id": "17", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "28" + "$ref": "10" }, "decorators": [] } @@ -355,12 +151,12 @@ "decorators": [] }, { - "$id": "36", + "$id": "18", "kind": "enum", "name": "IntExtensibleEnum", "crossLanguageDefinitionId": "BasicTypeSpec.IntExtensibleEnum", "valueType": { - "$id": "37", + "$id": "19", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -368,53 +164,53 @@ }, "values": [ { - "$id": "38", + "$id": "20", "kind": "enumvalue", "name": "One", "value": 1, "valueType": { - "$id": "39", + "$id": "21", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "36" + "$ref": "18" }, "decorators": [] }, { - "$id": "40", + "$id": "22", "kind": "enumvalue", "name": "Two", "value": 2, "valueType": { - "$id": "41", + "$id": "23", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "36" + "$ref": "18" }, "decorators": [] }, { - "$id": "42", + "$id": "24", "kind": "enumvalue", "name": "Four", "value": 4, "valueType": { - "$id": "43", + "$id": "25", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "36" + "$ref": "18" }, "decorators": [] } @@ -427,12 +223,12 @@ "decorators": [] }, { - "$id": "44", + "$id": "26", "kind": "enum", "name": "FloatExtensibleEnum", "crossLanguageDefinitionId": "BasicTypeSpec.FloatExtensibleEnum", "valueType": { - "$id": "45", + "$id": "27", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -440,53 +236,53 @@ }, "values": [ { - "$id": "46", + "$id": "28", "kind": "enumvalue", "name": "OneDotOne", "value": 1.1, "valueType": { - "$id": "47", + "$id": "29", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "44" + "$ref": "26" }, "decorators": [] }, { - "$id": "48", + "$id": "30", "kind": "enumvalue", "name": "TwoDotTwo", "value": 2.2, "valueType": { - "$id": "49", + "$id": "31", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "44" + "$ref": "26" }, "decorators": [] }, { - "$id": "50", + "$id": "32", "kind": "enumvalue", "name": "FourDotFour", "value": 4.4, "valueType": { - "$id": "51", + "$id": "33", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "44" + "$ref": "26" }, "decorators": [] } @@ -499,12 +295,12 @@ "decorators": [] }, { - "$id": "52", + "$id": "34", "kind": "enum", "name": "FloatExtensibleEnumWithIntValue", "crossLanguageDefinitionId": "BasicTypeSpec.FloatExtensibleEnumWithIntValue", "valueType": { - "$id": "53", + "$id": "35", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -512,53 +308,53 @@ }, "values": [ { - "$id": "54", + "$id": "36", "kind": "enumvalue", "name": "One", "value": 1, "valueType": { - "$id": "55", + "$id": "37", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "52" + "$ref": "34" }, "decorators": [] }, { - "$id": "56", + "$id": "38", "kind": "enumvalue", "name": "Two", "value": 2, "valueType": { - "$id": "57", + "$id": "39", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "52" + "$ref": "34" }, "decorators": [] }, { - "$id": "58", + "$id": "40", "kind": "enumvalue", "name": "Four", "value": 4, "valueType": { - "$id": "59", + "$id": "41", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "52" + "$ref": "34" }, "decorators": [] } @@ -571,12 +367,12 @@ "decorators": [] }, { - "$id": "60", + "$id": "42", "kind": "enum", "name": "FloatFixedEnum", "crossLanguageDefinitionId": "BasicTypeSpec.FloatFixedEnum", "valueType": { - "$id": "61", + "$id": "43", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -584,53 +380,53 @@ }, "values": [ { - "$id": "62", + "$id": "44", "kind": "enumvalue", "name": "OneDotOne", "value": 1.1, "valueType": { - "$id": "63", + "$id": "45", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "60" + "$ref": "42" }, "decorators": [] }, { - "$id": "64", + "$id": "46", "kind": "enumvalue", "name": "TwoDotTwo", "value": 2.2, "valueType": { - "$id": "65", + "$id": "47", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "60" + "$ref": "42" }, "decorators": [] }, { - "$id": "66", + "$id": "48", "kind": "enumvalue", "name": "FourDotFour", "value": 4.4, "valueType": { - "$id": "67", + "$id": "49", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "60" + "$ref": "42" }, "decorators": [] } @@ -643,12 +439,12 @@ "decorators": [] }, { - "$id": "68", + "$id": "50", "kind": "enum", "name": "FloatFixedEnumWithIntValue", "crossLanguageDefinitionId": "BasicTypeSpec.FloatFixedEnumWithIntValue", "valueType": { - "$id": "69", + "$id": "51", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -656,53 +452,53 @@ }, "values": [ { - "$id": "70", + "$id": "52", "kind": "enumvalue", "name": "One", "value": 1, "valueType": { - "$id": "71", + "$id": "53", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "68" + "$ref": "50" }, "decorators": [] }, { - "$id": "72", + "$id": "54", "kind": "enumvalue", "name": "Two", "value": 2, "valueType": { - "$id": "73", + "$id": "55", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "68" + "$ref": "50" }, "decorators": [] }, { - "$id": "74", + "$id": "56", "kind": "enumvalue", "name": "Four", "value": 4, "valueType": { - "$id": "75", + "$id": "57", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "68" + "$ref": "50" }, "decorators": [] } @@ -715,135 +511,873 @@ "decorators": [] }, { - "$id": "76", - "kind": "enum", - "name": "IntFixedEnum", - "crossLanguageDefinitionId": "BasicTypeSpec.IntFixedEnum", + "$id": "58", + "kind": "enum", + "name": "IntFixedEnum", + "crossLanguageDefinitionId": "BasicTypeSpec.IntFixedEnum", + "valueType": { + "$id": "59", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "values": [ + { + "$id": "60", + "kind": "enumvalue", + "name": "One", + "value": 1, + "valueType": { + "$id": "61", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "decorators": [] + }, + { + "$id": "62", + "kind": "enumvalue", + "name": "Two", + "value": 2, + "valueType": { + "$id": "63", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "decorators": [] + }, + { + "$id": "64", + "kind": "enumvalue", + "name": "Four", + "value": 4, + "valueType": { + "$id": "65", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "enumType": { + "$ref": "58" + }, + "decorators": [] + } + ], + "namespace": "BasicTypeSpec", + "doc": "int fixed enum", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "66", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "BasicTypeSpec.Versions", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "68", + "kind": "enumvalue", + "name": "2024-07-16-preview", + "value": "2024-07-16-preview", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "decorators": [] + }, + { + "$id": "70", + "kind": "enumvalue", + "name": "2024-08-16-preview", + "value": "2024-08-16-preview", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "66" + }, + "decorators": [] + } + ], + "namespace": "BasicTypeSpec", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + } + ], + "constants": [ + { + "$id": "72", + "kind": "constant", + "name": "ThingModelRequiredLiteralString", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "accept", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "ThingModelRequiredLiteralInt", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "75", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 123, + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "ThingModelRequiredLiteralFloat", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "77", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 1.23, + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "ThingModelRequiredLiteralBool", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "79", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": false, + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "ThingModelOptionalLiteralString", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "reject", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "ThingModelOptionalLiteralInt", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "83", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 456, + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "ThingModelOptionalLiteralFloat", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "85", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 4.56, + "decorators": [] + }, + { + "$id": "86", + "kind": "constant", + "name": "ThingModelOptionalLiteralBool", + "namespace": "BasicTypeSpec", + "usage": "Input,Output,Spread,Json", + "valueType": { + "$id": "87", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "88", + "kind": "constant", + "name": "sayHiContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "90", + "kind": "constant", + "name": "HelloAgainRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "92", + "kind": "constant", + "name": "helloAgainContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "94", + "kind": "constant", + "name": "HelloAgainRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "96", + "kind": "constant", + "name": "noContentTypeContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "98", + "kind": "constant", + "name": "noContentTypeContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "100", + "kind": "constant", + "name": "helloDemo2ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "102", + "kind": "constant", + "name": "createLiteralContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "104", + "kind": "constant", + "name": "createLiteralContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "106", + "kind": "constant", + "name": "HelloLiteralRequestP1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "test", + "decorators": [] + }, + { + "$id": "108", + "kind": "constant", + "name": "ThingModelRequiredLiteralInt1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "109", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 123, + "decorators": [] + }, + { + "$id": "110", + "kind": "constant", + "name": "ThingModelOptionalLiteralBool1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "111", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "112", + "kind": "constant", + "name": "helloLiteralContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "114", + "kind": "constant", + "name": "HelloLiteralRequestP11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "test", + "decorators": [] + }, + { + "$id": "116", + "kind": "constant", + "name": "ThingModelRequiredLiteralInt2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "117", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 123, + "decorators": [] + }, + { + "$id": "118", + "kind": "constant", + "name": "ThingModelOptionalLiteralBool2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "119", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "120", + "kind": "constant", + "name": "topActionContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "122", + "kind": "constant", + "name": "topAction2ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "124", + "kind": "constant", + "name": "patchActionContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "126", + "kind": "constant", + "name": "patchActionContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "128", + "kind": "constant", + "name": "anonymousBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "130", + "kind": "constant", + "name": "anonymousBodyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "132", + "kind": "constant", + "name": "ThingModelRequiredLiteralString1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "accept", + "decorators": [] + }, + { + "$id": "134", + "kind": "constant", + "name": "ThingModelRequiredLiteralInt3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "135", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 123, + "decorators": [] + }, + { + "$id": "136", + "kind": "constant", + "name": "ThingModelRequiredLiteralFloat1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "137", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 1.23, + "decorators": [] + }, + { + "$id": "138", + "kind": "constant", + "name": "ThingModelRequiredLiteralBool1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "139", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": false, + "decorators": [] + }, + { + "$id": "140", + "kind": "constant", + "name": "ThingModelOptionalLiteralString1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "reject", + "decorators": [] + }, + { + "$id": "142", + "kind": "constant", + "name": "ThingModelOptionalLiteralInt1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "143", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 456, + "decorators": [] + }, + { + "$id": "144", + "kind": "constant", + "name": "ThingModelOptionalLiteralFloat1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "145", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 4.56, + "decorators": [] + }, + { + "$id": "146", + "kind": "constant", + "name": "ThingModelOptionalLiteralBool3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "147", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "148", + "kind": "constant", + "name": "friendlyModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "150", + "kind": "constant", + "name": "friendlyModelContentType1", + "namespace": "", + "usage": "None", "valueType": { - "$id": "77", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "78", - "kind": "enumvalue", - "name": "One", - "value": 1, - "valueType": { - "$id": "79", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "80", - "kind": "enumvalue", - "name": "Two", - "value": 2, - "valueType": { - "$id": "81", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - }, - { - "$id": "82", - "kind": "enumvalue", - "name": "Four", - "value": 4, - "valueType": { - "$id": "83", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "enumType": { - "$ref": "76" - }, - "decorators": [] - } - ], - "namespace": "BasicTypeSpec", - "doc": "int fixed enum", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "84", - "kind": "enum", - "name": "Versions", - "crossLanguageDefinitionId": "BasicTypeSpec.Versions", + "$id": "152", + "kind": "constant", + "name": "projectedNameModelContentType", + "namespace": "", + "usage": "None", "valueType": { - "$id": "85", + "$id": "153", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "86", - "kind": "enumvalue", - "name": "2024-07-16-preview", - "value": "2024-07-16-preview", - "valueType": { - "$id": "87", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "84" - }, - "decorators": [] - }, - { - "$id": "88", - "kind": "enumvalue", - "name": "2024-08-16-preview", - "value": "2024-08-16-preview", - "valueType": { - "$id": "89", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "84" - }, - "decorators": [] - } - ], - "namespace": "BasicTypeSpec", - "isFixed": true, - "isFlags": false, - "usage": "ApiVersionEnum", + "value": "application/json", + "decorators": [] + }, + { + "$id": "154", + "kind": "constant", + "name": "projectedNameModelContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "156", + "kind": "constant", + "name": "returnsAnonymousModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "158", + "kind": "constant", + "name": "GetUnknownValueResponse6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "159", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "Sunday", + "decorators": [] + }, + { + "$id": "160", + "kind": "constant", + "name": "internalProtocolContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "162", + "kind": "constant", + "name": "internalProtocolContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "163", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "90", + "$id": "164", "kind": "model", "name": "ThingModel", "namespace": "BasicTypeSpec", @@ -853,13 +1387,13 @@ "decorators": [], "properties": [ { - "$id": "91", + "$id": "165", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ThingModel", "type": { - "$id": "92", + "$id": "166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -872,37 +1406,37 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.name", "serializationOptions": { - "$id": "93", + "$id": "167", "json": { - "$id": "94", + "$id": "168", "name": "name" } } }, { - "$id": "95", + "$id": "169", "kind": "property", "name": "requiredUnion", "serializedName": "requiredUnion", "doc": "required Union", "type": { - "$id": "96", + "$id": "170", "kind": "union", "name": "ThingModelRequiredUnion", "variantTypes": [ { - "$id": "97", + "$id": "171", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "98", + "$id": "172", "kind": "array", "name": "Array", "valueType": { - "$id": "99", + "$id": "173", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -912,7 +1446,7 @@ "decorators": [] }, { - "$id": "100", + "$id": "174", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -929,27 +1463,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredUnion", "serializationOptions": { - "$id": "101", + "$id": "175", "json": { - "$id": "102", + "$id": "176", "name": "requiredUnion" } } }, { - "$id": "103", + "$id": "177", "kind": "property", "name": "requiredLiteralString", "serializedName": "requiredLiteralString", "doc": "required literal string", "type": { - "$id": "104", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "accept", - "decorators": [] + "$ref": "72" }, "optional": false, "readOnly": false, @@ -958,27 +1486,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredLiteralString", "serializationOptions": { - "$id": "105", + "$id": "178", "json": { - "$id": "106", + "$id": "179", "name": "requiredLiteralString" } } }, { - "$id": "107", + "$id": "180", "kind": "property", "name": "requiredLiteralInt", "serializedName": "requiredLiteralInt", "doc": "required literal int", "type": { - "$id": "108", - "kind": "constant", - "valueType": { - "$ref": "5" - }, - "value": 123, - "decorators": [] + "$ref": "74" }, "optional": false, "readOnly": false, @@ -987,27 +1509,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredLiteralInt", "serializationOptions": { - "$id": "109", + "$id": "181", "json": { - "$id": "110", + "$id": "182", "name": "requiredLiteralInt" } } }, { - "$id": "111", + "$id": "183", "kind": "property", "name": "requiredLiteralFloat", "serializedName": "requiredLiteralFloat", "doc": "required literal float", "type": { - "$id": "112", - "kind": "constant", - "valueType": { - "$ref": "8" - }, - "value": 1.23, - "decorators": [] + "$ref": "76" }, "optional": false, "readOnly": false, @@ -1016,31 +1532,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredLiteralFloat", "serializationOptions": { - "$id": "113", + "$id": "184", "json": { - "$id": "114", + "$id": "185", "name": "requiredLiteralFloat" } } }, { - "$id": "115", + "$id": "186", "kind": "property", "name": "requiredLiteralBool", "serializedName": "requiredLiteralBool", "doc": "required literal bool", "type": { - "$id": "116", - "kind": "constant", - "valueType": { - "$id": "117", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": false, - "decorators": [] + "$ref": "78" }, "optional": false, "readOnly": false, @@ -1049,27 +1555,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredLiteralBool", "serializationOptions": { - "$id": "118", + "$id": "187", "json": { - "$id": "119", + "$id": "188", "name": "requiredLiteralBool" } } }, { - "$id": "120", + "$id": "189", "kind": "property", "name": "optionalLiteralString", "serializedName": "optionalLiteralString", "doc": "optional literal string", "type": { - "$id": "121", - "kind": "constant", - "valueType": { - "$ref": "11" - }, - "value": "reject", - "decorators": [] + "$ref": "80" }, "optional": true, "readOnly": false, @@ -1078,27 +1578,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.optionalLiteralString", "serializationOptions": { - "$id": "122", + "$id": "190", "json": { - "$id": "123", + "$id": "191", "name": "optionalLiteralString" } } }, { - "$id": "124", + "$id": "192", "kind": "property", "name": "optionalLiteralInt", "serializedName": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$id": "125", - "kind": "constant", - "valueType": { - "$ref": "14" - }, - "value": 456, - "decorators": [] + "$ref": "82" }, "optional": true, "readOnly": false, @@ -1107,27 +1601,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.optionalLiteralInt", "serializationOptions": { - "$id": "126", + "$id": "193", "json": { - "$id": "127", + "$id": "194", "name": "optionalLiteralInt" } } }, { - "$id": "128", + "$id": "195", "kind": "property", "name": "optionalLiteralFloat", "serializedName": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$id": "129", - "kind": "constant", - "valueType": { - "$ref": "17" - }, - "value": 4.56, - "decorators": [] + "$ref": "84" }, "optional": true, "readOnly": false, @@ -1136,31 +1624,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.optionalLiteralFloat", "serializationOptions": { - "$id": "130", + "$id": "196", "json": { - "$id": "131", + "$id": "197", "name": "optionalLiteralFloat" } } }, { - "$id": "132", + "$id": "198", "kind": "property", "name": "optionalLiteralBool", "serializedName": "optionalLiteralBool", "doc": "optional literal bool", "type": { - "$id": "133", - "kind": "constant", - "valueType": { - "$id": "134", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "86" }, "optional": true, "readOnly": false, @@ -1169,21 +1647,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.optionalLiteralBool", "serializationOptions": { - "$id": "135", + "$id": "199", "json": { - "$id": "136", + "$id": "200", "name": "optionalLiteralBool" } } }, { - "$id": "137", + "$id": "201", "kind": "property", "name": "requiredBadDescription", "serializedName": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "138", + "$id": "202", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1196,28 +1674,28 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredBadDescription", "serializationOptions": { - "$id": "139", + "$id": "203", "json": { - "$id": "140", + "$id": "204", "name": "requiredBadDescription" } } }, { - "$id": "141", + "$id": "205", "kind": "property", "name": "optionalNullableList", "serializedName": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$id": "142", + "$id": "206", "kind": "nullable", "type": { - "$id": "143", + "$id": "207", "kind": "array", "name": "Array1", "valueType": { - "$id": "144", + "$id": "208", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1235,28 +1713,28 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.optionalNullableList", "serializationOptions": { - "$id": "145", + "$id": "209", "json": { - "$id": "146", + "$id": "210", "name": "optionalNullableList" } } }, { - "$id": "147", + "$id": "211", "kind": "property", "name": "requiredNullableList", "serializedName": "requiredNullableList", "doc": "required nullable collection", "type": { - "$id": "148", + "$id": "212", "kind": "nullable", "type": { - "$id": "149", + "$id": "213", "kind": "array", "name": "Array1", "valueType": { - "$id": "150", + "$id": "214", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1274,9 +1752,9 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ThingModel.requiredNullableList", "serializationOptions": { - "$id": "151", + "$id": "215", "json": { - "$id": "152", + "$id": "216", "name": "requiredNullableList" } } @@ -1284,7 +1762,7 @@ ] }, { - "$id": "153", + "$id": "217", "kind": "model", "name": "RoundTripModel", "namespace": "BasicTypeSpec", @@ -1294,13 +1772,13 @@ "decorators": [], "properties": [ { - "$id": "154", + "$id": "218", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "Required string, illustrating a reference type property.", "type": { - "$id": "155", + "$id": "219", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1313,21 +1791,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredString", "serializationOptions": { - "$id": "156", + "$id": "220", "json": { - "$id": "157", + "$id": "221", "name": "requiredString" } } }, { - "$id": "158", + "$id": "222", "kind": "property", "name": "requiredInt", "serializedName": "requiredInt", "doc": "Required int, illustrating a value type property.", "type": { - "$id": "159", + "$id": "223", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1340,25 +1818,25 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredInt", "serializationOptions": { - "$id": "160", + "$id": "224", "json": { - "$id": "161", + "$id": "225", "name": "requiredInt" } } }, { - "$id": "162", + "$id": "226", "kind": "property", "name": "requiredCollection", "serializedName": "requiredCollection", "doc": "Required collection of enums", "type": { - "$id": "163", + "$id": "227", "kind": "array", "name": "ArrayStringFixedEnum", "valueType": { - "$ref": "20" + "$ref": "2" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1370,31 +1848,31 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredCollection", "serializationOptions": { - "$id": "164", + "$id": "228", "json": { - "$id": "165", + "$id": "229", "name": "requiredCollection" } } }, { - "$id": "166", + "$id": "230", "kind": "property", "name": "requiredDictionary", "serializedName": "requiredDictionary", "doc": "Required dictionary of enums", "type": { - "$id": "167", + "$id": "231", "kind": "dict", "keyType": { - "$id": "168", + "$id": "232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "28" + "$ref": "10" }, "decorators": [] }, @@ -1405,21 +1883,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredDictionary", "serializationOptions": { - "$id": "169", + "$id": "233", "json": { - "$id": "170", + "$id": "234", "name": "requiredDictionary" } } }, { - "$id": "171", + "$id": "235", "kind": "property", "name": "requiredModel", "serializedName": "requiredModel", "doc": "Required model", "type": { - "$ref": "90" + "$ref": "164" }, "optional": false, "readOnly": false, @@ -1428,21 +1906,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredModel", "serializationOptions": { - "$id": "172", + "$id": "236", "json": { - "$id": "173", + "$id": "237", "name": "requiredModel" } } }, { - "$id": "174", + "$id": "238", "kind": "property", "name": "intExtensibleEnum", "serializedName": "intExtensibleEnum", "doc": "this is an int based extensible enum", "type": { - "$ref": "36" + "$ref": "18" }, "optional": true, "readOnly": false, @@ -1451,25 +1929,25 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intExtensibleEnum", "serializationOptions": { - "$id": "175", + "$id": "239", "json": { - "$id": "176", + "$id": "240", "name": "intExtensibleEnum" } } }, { - "$id": "177", + "$id": "241", "kind": "property", "name": "intExtensibleEnumCollection", "serializedName": "intExtensibleEnumCollection", "doc": "this is a collection of int based extensible enum", "type": { - "$id": "178", + "$id": "242", "kind": "array", "name": "ArrayIntExtensibleEnum", "valueType": { - "$ref": "36" + "$ref": "18" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1481,21 +1959,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intExtensibleEnumCollection", "serializationOptions": { - "$id": "179", + "$id": "243", "json": { - "$id": "180", + "$id": "244", "name": "intExtensibleEnumCollection" } } }, { - "$id": "181", + "$id": "245", "kind": "property", "name": "floatExtensibleEnum", "serializedName": "floatExtensibleEnum", "doc": "this is a float based extensible enum", "type": { - "$ref": "44" + "$ref": "26" }, "optional": true, "readOnly": false, @@ -1504,21 +1982,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnum", "serializationOptions": { - "$id": "182", + "$id": "246", "json": { - "$id": "183", + "$id": "247", "name": "floatExtensibleEnum" } } }, { - "$id": "184", + "$id": "248", "kind": "property", "name": "floatExtensibleEnumWithIntValue", "serializedName": "floatExtensibleEnumWithIntValue", "doc": "this is a float based extensible enum", "type": { - "$ref": "52" + "$ref": "34" }, "optional": true, "readOnly": false, @@ -1527,25 +2005,25 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnumWithIntValue", "serializationOptions": { - "$id": "185", + "$id": "249", "json": { - "$id": "186", + "$id": "250", "name": "floatExtensibleEnumWithIntValue" } } }, { - "$id": "187", + "$id": "251", "kind": "property", "name": "floatExtensibleEnumCollection", "serializedName": "floatExtensibleEnumCollection", "doc": "this is a collection of float based extensible enum", "type": { - "$id": "188", + "$id": "252", "kind": "array", "name": "ArrayFloatExtensibleEnum", "valueType": { - "$ref": "44" + "$ref": "26" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1557,21 +2035,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatExtensibleEnumCollection", "serializationOptions": { - "$id": "189", + "$id": "253", "json": { - "$id": "190", + "$id": "254", "name": "floatExtensibleEnumCollection" } } }, { - "$id": "191", + "$id": "255", "kind": "property", "name": "floatFixedEnum", "serializedName": "floatFixedEnum", "doc": "this is a float based fixed enum", "type": { - "$ref": "60" + "$ref": "42" }, "optional": true, "readOnly": false, @@ -1580,21 +2058,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnum", "serializationOptions": { - "$id": "192", + "$id": "256", "json": { - "$id": "193", + "$id": "257", "name": "floatFixedEnum" } } }, { - "$id": "194", + "$id": "258", "kind": "property", "name": "floatFixedEnumWithIntValue", "serializedName": "floatFixedEnumWithIntValue", "doc": "this is a float based fixed enum", "type": { - "$ref": "68" + "$ref": "50" }, "optional": true, "readOnly": false, @@ -1603,25 +2081,25 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnumWithIntValue", "serializationOptions": { - "$id": "195", + "$id": "259", "json": { - "$id": "196", + "$id": "260", "name": "floatFixedEnumWithIntValue" } } }, { - "$id": "197", + "$id": "261", "kind": "property", "name": "floatFixedEnumCollection", "serializedName": "floatFixedEnumCollection", "doc": "this is a collection of float based fixed enum", "type": { - "$id": "198", + "$id": "262", "kind": "array", "name": "ArrayFloatFixedEnum", "valueType": { - "$ref": "60" + "$ref": "42" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1633,21 +2111,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.floatFixedEnumCollection", "serializationOptions": { - "$id": "199", + "$id": "263", "json": { - "$id": "200", + "$id": "264", "name": "floatFixedEnumCollection" } } }, { - "$id": "201", + "$id": "265", "kind": "property", "name": "intFixedEnum", "serializedName": "intFixedEnum", "doc": "this is a int based fixed enum", "type": { - "$ref": "76" + "$ref": "58" }, "optional": true, "readOnly": false, @@ -1656,25 +2134,25 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intFixedEnum", "serializationOptions": { - "$id": "202", + "$id": "266", "json": { - "$id": "203", + "$id": "267", "name": "intFixedEnum" } } }, { - "$id": "204", + "$id": "268", "kind": "property", "name": "intFixedEnumCollection", "serializedName": "intFixedEnumCollection", "doc": "this is a collection of int based fixed enum", "type": { - "$id": "205", + "$id": "269", "kind": "array", "name": "ArrayIntFixedEnum", "valueType": { - "$ref": "76" + "$ref": "58" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1686,21 +2164,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.intFixedEnumCollection", "serializationOptions": { - "$id": "206", + "$id": "270", "json": { - "$id": "207", + "$id": "271", "name": "intFixedEnumCollection" } } }, { - "$id": "208", + "$id": "272", "kind": "property", "name": "stringFixedEnum", "serializedName": "stringFixedEnum", "doc": "this is a string based fixed enum", "type": { - "$ref": "20" + "$ref": "2" }, "optional": true, "readOnly": false, @@ -1709,21 +2187,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.stringFixedEnum", "serializationOptions": { - "$id": "209", + "$id": "273", "json": { - "$id": "210", + "$id": "274", "name": "stringFixedEnum" } } }, { - "$id": "211", + "$id": "275", "kind": "property", "name": "requiredUnknown", "serializedName": "requiredUnknown", "doc": "required unknown", "type": { - "$id": "212", + "$id": "276", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1736,21 +2214,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredUnknown", "serializationOptions": { - "$id": "213", + "$id": "277", "json": { - "$id": "214", + "$id": "278", "name": "requiredUnknown" } } }, { - "$id": "215", + "$id": "279", "kind": "property", "name": "optionalUnknown", "serializedName": "optionalUnknown", "doc": "optional unknown", "type": { - "$id": "216", + "$id": "280", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1763,31 +2241,31 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.optionalUnknown", "serializationOptions": { - "$id": "217", + "$id": "281", "json": { - "$id": "218", + "$id": "282", "name": "optionalUnknown" } } }, { - "$id": "219", + "$id": "283", "kind": "property", "name": "requiredRecordUnknown", "serializedName": "requiredRecordUnknown", "doc": "required record of unknown", "type": { - "$id": "220", + "$id": "284", "kind": "dict", "keyType": { - "$id": "221", + "$id": "285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "222", + "$id": "286", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1802,31 +2280,31 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredRecordUnknown", "serializationOptions": { - "$id": "223", + "$id": "287", "json": { - "$id": "224", + "$id": "288", "name": "requiredRecordUnknown" } } }, { - "$id": "225", + "$id": "289", "kind": "property", "name": "optionalRecordUnknown", "serializedName": "optionalRecordUnknown", "doc": "optional record of unknown", "type": { - "$id": "226", + "$id": "290", "kind": "dict", "keyType": { - "$id": "227", + "$id": "291", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "228", + "$id": "292", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1841,31 +2319,31 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.optionalRecordUnknown", "serializationOptions": { - "$id": "229", + "$id": "293", "json": { - "$id": "230", + "$id": "294", "name": "optionalRecordUnknown" } } }, { - "$id": "231", + "$id": "295", "kind": "property", "name": "readOnlyRequiredRecordUnknown", "serializedName": "readOnlyRequiredRecordUnknown", "doc": "required readonly record of unknown", "type": { - "$id": "232", + "$id": "296", "kind": "dict", "keyType": { - "$id": "233", + "$id": "297", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "234", + "$id": "298", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1880,31 +2358,31 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyRequiredRecordUnknown", "serializationOptions": { - "$id": "235", + "$id": "299", "json": { - "$id": "236", + "$id": "300", "name": "readOnlyRequiredRecordUnknown" } } }, { - "$id": "237", + "$id": "301", "kind": "property", "name": "readOnlyOptionalRecordUnknown", "serializedName": "readOnlyOptionalRecordUnknown", "doc": "optional readonly record of unknown", "type": { - "$id": "238", + "$id": "302", "kind": "dict", "keyType": { - "$id": "239", + "$id": "303", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "240", + "$id": "304", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1919,21 +2397,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.readOnlyOptionalRecordUnknown", "serializationOptions": { - "$id": "241", + "$id": "305", "json": { - "$id": "242", + "$id": "306", "name": "readOnlyOptionalRecordUnknown" } } }, { - "$id": "243", + "$id": "307", "kind": "property", "name": "modelWithRequiredNullable", "serializedName": "modelWithRequiredNullable", "doc": "this is a model with required nullable properties", "type": { - "$id": "244", + "$id": "308", "kind": "model", "name": "ModelWithRequiredNullableProperties", "namespace": "BasicTypeSpec", @@ -1943,16 +2421,16 @@ "decorators": [], "properties": [ { - "$id": "245", + "$id": "309", "kind": "property", "name": "requiredNullablePrimitive", "serializedName": "requiredNullablePrimitive", "doc": "required nullable primitive type", "type": { - "$id": "246", + "$id": "310", "kind": "nullable", "type": { - "$id": "247", + "$id": "311", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1967,24 +2445,24 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredNullablePrimitive", "serializationOptions": { - "$id": "248", + "$id": "312", "json": { - "$id": "249", + "$id": "313", "name": "requiredNullablePrimitive" } } }, { - "$id": "250", + "$id": "314", "kind": "property", "name": "requiredExtensibleEnum", "serializedName": "requiredExtensibleEnum", "doc": "required nullable extensible enum type", "type": { - "$id": "251", + "$id": "315", "kind": "nullable", "type": { - "$ref": "28" + "$ref": "10" }, "namespace": "" }, @@ -1995,24 +2473,24 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredExtensibleEnum", "serializationOptions": { - "$id": "252", + "$id": "316", "json": { - "$id": "253", + "$id": "317", "name": "requiredExtensibleEnum" } } }, { - "$id": "254", + "$id": "318", "kind": "property", "name": "requiredFixedEnum", "serializedName": "requiredFixedEnum", "doc": "required nullable fixed enum type", "type": { - "$id": "255", + "$id": "319", "kind": "nullable", "type": { - "$ref": "20" + "$ref": "2" }, "namespace": "" }, @@ -2023,9 +2501,9 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithRequiredNullableProperties.requiredFixedEnum", "serializationOptions": { - "$id": "256", + "$id": "320", "json": { - "$id": "257", + "$id": "321", "name": "requiredFixedEnum" } } @@ -2039,21 +2517,21 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.modelWithRequiredNullable", "serializationOptions": { - "$id": "258", + "$id": "322", "json": { - "$id": "259", + "$id": "323", "name": "modelWithRequiredNullable" } } }, { - "$id": "260", + "$id": "324", "kind": "property", "name": "requiredBytes", "serializedName": "requiredBytes", "doc": "Required bytes", "type": { - "$id": "261", + "$id": "325", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2067,9 +2545,9 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.RoundTripModel.requiredBytes", "serializationOptions": { - "$id": "262", + "$id": "326", "json": { - "$id": "263", + "$id": "327", "name": "requiredBytes" } } @@ -2077,10 +2555,10 @@ ] }, { - "$ref": "244" + "$ref": "308" }, { - "$id": "264", + "$id": "328", "kind": "model", "name": "FriendModel", "namespace": "BasicTypeSpec", @@ -2090,13 +2568,13 @@ "decorators": [], "properties": [ { - "$id": "265", + "$id": "329", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the NotFriend", "type": { - "$id": "266", + "$id": "330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2109,9 +2587,9 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.NotFriend.name", "serializationOptions": { - "$id": "267", + "$id": "331", "json": { - "$id": "268", + "$id": "332", "name": "name" } } @@ -2119,7 +2597,7 @@ ] }, { - "$id": "269", + "$id": "333", "kind": "model", "name": "RenamedModel", "namespace": "BasicTypeSpec", @@ -2129,13 +2607,13 @@ "decorators": [], "properties": [ { - "$id": "270", + "$id": "334", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "271", + "$id": "335", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2148,9 +2626,9 @@ "decorators": [], "crossLanguageDefinitionId": "BasicTypeSpec.ModelWithClientName.name", "serializationOptions": { - "$id": "272", + "$id": "336", "json": { - "$id": "273", + "$id": "337", "name": "name" } } @@ -2158,7 +2636,7 @@ ] }, { - "$id": "274", + "$id": "338", "kind": "model", "name": "ReturnsAnonymousModelResponse", "namespace": "BasicTypeSpec", @@ -2170,14 +2648,14 @@ ], "clients": [ { - "$id": "275", + "$id": "339", "kind": "client", "name": "BasicTypeSpecClient", "namespace": "BasicTypeSpec", "doc": "This is a sample typespec project.", "methods": [ { - "$id": "276", + "$id": "340", "kind": "basic", "name": "sayHi", "accessibility": "public", @@ -2187,18 +2665,18 @@ ], "doc": "Return hi", "operation": { - "$id": "277", + "$id": "341", "name": "sayHi", "resourceName": "BasicTypeSpec", "doc": "Return hi", "accessibility": "public", "parameters": [ { - "$id": "278", + "$id": "342", "name": "headParameter", "nameInRequest": "head-parameter", "type": { - "$id": "279", + "$id": "343", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2215,11 +2693,11 @@ "skipUrlEncoding": false }, { - "$id": "280", + "$id": "344", "name": "queryParameter", "nameInRequest": "queryParameter", "type": { - "$id": "281", + "$id": "345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2236,11 +2714,11 @@ "skipUrlEncoding": false }, { - "$id": "282", + "$id": "346", "name": "optionalQuery", "nameInRequest": "optionalQuery", "type": { - "$id": "283", + "$id": "347", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2257,21 +2735,11 @@ "skipUrlEncoding": false }, { - "$id": "284", + "$id": "348", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "285", - "kind": "constant", - "valueType": { - "$id": "286", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -2286,12 +2754,12 @@ ], "responses": [ { - "$id": "287", + "$id": "349", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -2311,11 +2779,11 @@ }, "parameters": [ { - "$id": "288", + "$id": "350", "name": "headParameter", "nameInRequest": "head-parameter", "type": { - "$id": "289", + "$id": "351", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2332,11 +2800,11 @@ "skipUrlEncoding": false }, { - "$id": "290", + "$id": "352", "name": "queryParameter", "nameInRequest": "queryParameter", "type": { - "$id": "291", + "$id": "353", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2353,11 +2821,11 @@ "skipUrlEncoding": false }, { - "$id": "292", + "$id": "354", "name": "optionalQuery", "nameInRequest": "optionalQuery", "type": { - "$id": "293", + "$id": "355", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2374,11 +2842,11 @@ "skipUrlEncoding": false }, { - "$id": "294", + "$id": "356", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "285" + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -2392,9 +2860,9 @@ } ], "response": { - "$id": "295", + "$id": "357", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -2403,7 +2871,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.sayHi" }, { - "$id": "296", + "$id": "358", "kind": "basic", "name": "helloAgain", "accessibility": "public", @@ -2413,18 +2881,18 @@ ], "doc": "Return hi again", "operation": { - "$id": "297", + "$id": "359", "name": "helloAgain", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "298", + "$id": "360", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "299", + "$id": "361", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2441,21 +2909,11 @@ "skipUrlEncoding": false }, { - "$id": "300", + "$id": "362", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "301", - "kind": "constant", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -2468,11 +2926,11 @@ "skipUrlEncoding": false }, { - "$id": "303", + "$id": "363", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "304", + "$id": "364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2489,21 +2947,11 @@ "skipUrlEncoding": false }, { - "$id": "305", + "$id": "365", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "306", - "kind": "constant", - "valueType": { - "$id": "307", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -2516,11 +2964,11 @@ "skipUrlEncoding": false }, { - "$id": "308", + "$id": "366", "name": "action", "nameInRequest": "action", "type": { - "$ref": "153" + "$ref": "217" }, "location": "Body", "isApiVersion": false, @@ -2535,12 +2983,12 @@ ], "responses": [ { - "$id": "309", + "$id": "367", "statusCodes": [ 200 ], "bodyType": { - "$ref": "153" + "$ref": "217" }, "headers": [], "isErrorResponse": false, @@ -2563,11 +3011,11 @@ }, "parameters": [ { - "$id": "310", + "$id": "368", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "311", + "$id": "369", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2584,11 +3032,11 @@ "skipUrlEncoding": false }, { - "$id": "312", + "$id": "370", "name": "action", "nameInRequest": "action", "type": { - "$ref": "153" + "$ref": "217" }, "location": "Body", "isApiVersion": false, @@ -2601,21 +3049,11 @@ "skipUrlEncoding": false }, { - "$id": "313", + "$id": "371", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "314", - "kind": "constant", - "valueType": { - "$id": "315", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -2628,11 +3066,11 @@ "skipUrlEncoding": false }, { - "$id": "316", + "$id": "372", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "317", + "$id": "373", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2649,11 +3087,11 @@ "skipUrlEncoding": false }, { - "$id": "318", + "$id": "374", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "306" + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -2667,9 +3105,9 @@ } ], "response": { - "$id": "319", + "$id": "375", "type": { - "$ref": "153" + "$ref": "217" } }, "isOverride": false, @@ -2678,7 +3116,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloAgain" }, { - "$id": "320", + "$id": "376", "kind": "basic", "name": "noContentType", "accessibility": "public", @@ -2688,18 +3126,18 @@ ], "doc": "Return hi again", "operation": { - "$id": "321", + "$id": "377", "name": "noContentType", "resourceName": "BasicTypeSpec", "doc": "Return hi again", "accessibility": "public", "parameters": [ { - "$id": "322", + "$id": "378", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "323", + "$id": "379", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2716,11 +3154,11 @@ "skipUrlEncoding": false }, { - "$id": "324", + "$id": "380", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "325", + "$id": "381", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2737,22 +3175,12 @@ "skipUrlEncoding": false }, { - "$id": "326", + "$id": "382", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "327", - "kind": "constant", - "valueType": { - "$id": "328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -2765,21 +3193,11 @@ "skipUrlEncoding": false }, { - "$id": "329", + "$id": "383", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "330", - "kind": "constant", - "valueType": { - "$id": "331", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -2792,11 +3210,11 @@ "skipUrlEncoding": false }, { - "$id": "332", + "$id": "384", "name": "action", "nameInRequest": "action", "type": { - "$ref": "153" + "$ref": "217" }, "location": "Body", "isApiVersion": false, @@ -2811,12 +3229,12 @@ ], "responses": [ { - "$id": "333", + "$id": "385", "statusCodes": [ 200 ], "bodyType": { - "$ref": "153" + "$ref": "217" }, "headers": [], "isErrorResponse": false, @@ -2839,11 +3257,11 @@ }, "parameters": [ { - "$id": "334", + "$id": "386", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "335", + "$id": "387", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2860,11 +3278,11 @@ "skipUrlEncoding": false }, { - "$id": "336", + "$id": "388", "name": "action", "nameInRequest": "action", "type": { - "$ref": "153" + "$ref": "217" }, "location": "Body", "isApiVersion": false, @@ -2877,11 +3295,11 @@ "skipUrlEncoding": false }, { - "$id": "337", + "$id": "389", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "338", + "$id": "390", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2898,12 +3316,12 @@ "skipUrlEncoding": false }, { - "$id": "339", + "$id": "391", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "327" + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -2916,11 +3334,11 @@ "skipUrlEncoding": false }, { - "$id": "340", + "$id": "392", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "330" + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -2934,9 +3352,9 @@ } ], "response": { - "$id": "341", + "$id": "393", "type": { - "$ref": "153" + "$ref": "217" } }, "isOverride": false, @@ -2945,7 +3363,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.noContentType" }, { - "$id": "342", + "$id": "394", "kind": "basic", "name": "helloDemo2", "accessibility": "public", @@ -2955,28 +3373,18 @@ ], "doc": "Return hi in demo2", "operation": { - "$id": "343", + "$id": "395", "name": "helloDemo2", "resourceName": "BasicTypeSpec", "doc": "Return hi in demo2", "accessibility": "public", "parameters": [ { - "$id": "344", + "$id": "396", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "345", - "kind": "constant", - "valueType": { - "$id": "346", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -2991,12 +3399,12 @@ ], "responses": [ { - "$id": "347", + "$id": "397", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3016,11 +3424,11 @@ }, "parameters": [ { - "$id": "348", + "$id": "398", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "345" + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -3034,9 +3442,9 @@ } ], "response": { - "$id": "349", + "$id": "399", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3045,7 +3453,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloDemo2" }, { - "$id": "350", + "$id": "400", "kind": "basic", "name": "createLiteral", "accessibility": "public", @@ -3055,29 +3463,19 @@ ], "doc": "Create with literal value", "operation": { - "$id": "351", + "$id": "401", "name": "createLiteral", "resourceName": "BasicTypeSpec", "doc": "Create with literal value", "accessibility": "public", "parameters": [ { - "$id": "352", + "$id": "402", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "353", - "kind": "constant", - "valueType": { - "$id": "354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -3090,21 +3488,11 @@ "skipUrlEncoding": false }, { - "$id": "355", + "$id": "403", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "356", - "kind": "constant", - "valueType": { - "$id": "357", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -3117,11 +3505,11 @@ "skipUrlEncoding": false }, { - "$id": "358", + "$id": "404", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -3136,12 +3524,12 @@ ], "responses": [ { - "$id": "359", + "$id": "405", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3164,11 +3552,11 @@ }, "parameters": [ { - "$id": "360", + "$id": "406", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -3181,12 +3569,12 @@ "skipUrlEncoding": false }, { - "$id": "361", + "$id": "407", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "353" + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -3199,11 +3587,11 @@ "skipUrlEncoding": false }, { - "$id": "362", + "$id": "408", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "356" + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -3217,9 +3605,9 @@ } ], "response": { - "$id": "363", + "$id": "409", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3228,7 +3616,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.createLiteral" }, { - "$id": "364", + "$id": "410", "kind": "basic", "name": "helloLiteral", "accessibility": "public", @@ -3238,28 +3626,18 @@ ], "doc": "Send literal parameters", "operation": { - "$id": "365", + "$id": "411", "name": "helloLiteral", "resourceName": "BasicTypeSpec", "doc": "Send literal parameters", "accessibility": "public", "parameters": [ { - "$id": "366", + "$id": "412", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "367", - "kind": "constant", - "valueType": { - "$id": "368", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "test", - "decorators": [] + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -3272,21 +3650,11 @@ "skipUrlEncoding": false }, { - "$id": "369", + "$id": "413", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "370", - "kind": "constant", - "valueType": { - "$id": "371", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "value": 123, - "decorators": [] + "$ref": "108" }, "location": "Path", "isApiVersion": false, @@ -3299,21 +3667,11 @@ "skipUrlEncoding": false }, { - "$id": "372", + "$id": "414", "name": "p3", "nameInRequest": "p3", "type": { - "$id": "373", - "kind": "constant", - "valueType": { - "$id": "374", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "110" }, "location": "Query", "isApiVersion": false, @@ -3326,21 +3684,11 @@ "skipUrlEncoding": false }, { - "$id": "375", + "$id": "415", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "376", - "kind": "constant", - "valueType": { - "$id": "377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -3355,12 +3703,12 @@ ], "responses": [ { - "$id": "378", + "$id": "416", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3380,21 +3728,11 @@ }, "parameters": [ { - "$id": "379", + "$id": "417", "name": "p1", "nameInRequest": "p1", "type": { - "$id": "380", - "kind": "constant", - "valueType": { - "$id": "381", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "test", - "decorators": [] + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -3407,21 +3745,11 @@ "skipUrlEncoding": false }, { - "$id": "382", + "$id": "418", "name": "p2", "nameInRequest": "p2", "type": { - "$id": "383", - "kind": "constant", - "valueType": { - "$id": "384", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "value": 123, - "decorators": [] + "$ref": "116" }, "location": "Path", "isApiVersion": false, @@ -3434,21 +3762,11 @@ "skipUrlEncoding": false }, { - "$id": "385", + "$id": "419", "name": "p3", "nameInRequest": "p3", "type": { - "$id": "386", - "kind": "constant", - "valueType": { - "$id": "387", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "118" }, "location": "Query", "isApiVersion": false, @@ -3461,11 +3779,11 @@ "skipUrlEncoding": false }, { - "$id": "388", + "$id": "420", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "376" + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -3479,9 +3797,9 @@ } ], "response": { - "$id": "389", + "$id": "421", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3490,7 +3808,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.helloLiteral" }, { - "$id": "390", + "$id": "422", "kind": "basic", "name": "topAction", "accessibility": "public", @@ -3500,23 +3818,23 @@ ], "doc": "top level method", "operation": { - "$id": "391", + "$id": "423", "name": "topAction", "resourceName": "BasicTypeSpec", "doc": "top level method", "accessibility": "public", "parameters": [ { - "$id": "392", + "$id": "424", "name": "action", "nameInRequest": "action", "type": { - "$id": "393", + "$id": "425", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "394", + "$id": "426", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3536,21 +3854,11 @@ "skipUrlEncoding": false }, { - "$id": "395", + "$id": "427", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "396", - "kind": "constant", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -3565,12 +3873,12 @@ ], "responses": [ { - "$id": "398", + "$id": "428", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3590,16 +3898,16 @@ }, "parameters": [ { - "$id": "399", + "$id": "429", "name": "action", "nameInRequest": "action", "type": { - "$id": "400", + "$id": "430", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "401", + "$id": "431", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3619,11 +3927,11 @@ "skipUrlEncoding": false }, { - "$id": "402", + "$id": "432", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "396" + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -3637,9 +3945,9 @@ } ], "response": { - "$id": "403", + "$id": "433", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3648,7 +3956,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction" }, { - "$id": "404", + "$id": "434", "kind": "basic", "name": "topAction2", "accessibility": "public", @@ -3658,28 +3966,18 @@ ], "doc": "top level method2", "operation": { - "$id": "405", + "$id": "435", "name": "topAction2", "resourceName": "BasicTypeSpec", "doc": "top level method2", "accessibility": "public", "parameters": [ { - "$id": "406", + "$id": "436", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "407", - "kind": "constant", - "valueType": { - "$id": "408", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -3694,12 +3992,12 @@ ], "responses": [ { - "$id": "409", + "$id": "437", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3719,11 +4017,11 @@ }, "parameters": [ { - "$id": "410", + "$id": "438", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "407" + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -3737,9 +4035,9 @@ } ], "response": { - "$id": "411", + "$id": "439", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3748,7 +4046,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.topAction2" }, { - "$id": "412", + "$id": "440", "kind": "basic", "name": "patchAction", "accessibility": "public", @@ -3758,29 +4056,19 @@ ], "doc": "top level patch", "operation": { - "$id": "413", + "$id": "441", "name": "patchAction", "resourceName": "BasicTypeSpec", "doc": "top level patch", "accessibility": "public", "parameters": [ { - "$id": "414", + "$id": "442", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "415", - "kind": "constant", - "valueType": { - "$id": "416", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -3793,21 +4081,11 @@ "skipUrlEncoding": false }, { - "$id": "417", + "$id": "443", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "418", - "kind": "constant", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -3820,11 +4098,11 @@ "skipUrlEncoding": false }, { - "$id": "420", + "$id": "444", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -3839,12 +4117,12 @@ ], "responses": [ { - "$id": "421", + "$id": "445", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -3867,11 +4145,11 @@ }, "parameters": [ { - "$id": "422", + "$id": "446", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -3884,12 +4162,12 @@ "skipUrlEncoding": false }, { - "$id": "423", + "$id": "447", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "415" + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -3902,11 +4180,11 @@ "skipUrlEncoding": false }, { - "$id": "424", + "$id": "448", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "418" + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -3920,9 +4198,9 @@ } ], "response": { - "$id": "425", + "$id": "449", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -3931,7 +4209,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.patchAction" }, { - "$id": "426", + "$id": "450", "kind": "basic", "name": "anonymousBody", "accessibility": "public", @@ -3941,29 +4219,19 @@ ], "doc": "body parameter without body decorator", "operation": { - "$id": "427", + "$id": "451", "name": "anonymousBody", "resourceName": "BasicTypeSpec", "doc": "body parameter without body decorator", "accessibility": "public", "parameters": [ { - "$id": "428", + "$id": "452", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "429", - "kind": "constant", - "valueType": { - "$id": "430", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -3976,21 +4244,11 @@ "skipUrlEncoding": false }, { - "$id": "431", + "$id": "453", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "432", - "kind": "constant", - "valueType": { - "$id": "433", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -4003,11 +4261,11 @@ "skipUrlEncoding": false }, { - "$id": "434", + "$id": "454", "name": "thingModel", "nameInRequest": "thingModel", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -4022,12 +4280,12 @@ ], "responses": [ { - "$id": "435", + "$id": "455", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -4050,12 +4308,12 @@ }, "parameters": [ { - "$id": "436", + "$id": "456", "name": "name", "nameInRequest": "name", "doc": "name of the ThingModel", "type": { - "$id": "437", + "$id": "457", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4072,12 +4330,12 @@ "skipUrlEncoding": false }, { - "$id": "438", + "$id": "458", "name": "requiredUnion", "nameInRequest": "requiredUnion", "doc": "required Union", "type": { - "$ref": "96" + "$ref": "170" }, "location": "Body", "isApiVersion": false, @@ -4090,12 +4348,12 @@ "skipUrlEncoding": false }, { - "$id": "439", + "$id": "459", "name": "requiredLiteralString", "nameInRequest": "requiredLiteralString", "doc": "required literal string", "type": { - "$ref": "104" + "$ref": "72" }, "location": "Body", "isApiVersion": false, @@ -4108,12 +4366,12 @@ "skipUrlEncoding": false }, { - "$id": "440", + "$id": "460", "name": "requiredLiteralInt", "nameInRequest": "requiredLiteralInt", "doc": "required literal int", "type": { - "$ref": "108" + "$ref": "74" }, "location": "Body", "isApiVersion": false, @@ -4126,12 +4384,12 @@ "skipUrlEncoding": false }, { - "$id": "441", + "$id": "461", "name": "requiredLiteralFloat", "nameInRequest": "requiredLiteralFloat", "doc": "required literal float", "type": { - "$ref": "112" + "$ref": "76" }, "location": "Body", "isApiVersion": false, @@ -4144,12 +4402,12 @@ "skipUrlEncoding": false }, { - "$id": "442", + "$id": "462", "name": "requiredLiteralBool", "nameInRequest": "requiredLiteralBool", "doc": "required literal bool", "type": { - "$ref": "116" + "$ref": "78" }, "location": "Body", "isApiVersion": false, @@ -4162,12 +4420,12 @@ "skipUrlEncoding": false }, { - "$id": "443", + "$id": "463", "name": "optionalLiteralString", "nameInRequest": "optionalLiteralString", "doc": "optional literal string", "type": { - "$ref": "121" + "$ref": "80" }, "location": "Body", "isApiVersion": false, @@ -4180,12 +4438,12 @@ "skipUrlEncoding": false }, { - "$id": "444", + "$id": "464", "name": "optionalLiteralInt", "nameInRequest": "optionalLiteralInt", "doc": "optional literal int", "type": { - "$ref": "125" + "$ref": "82" }, "location": "Body", "isApiVersion": false, @@ -4198,12 +4456,12 @@ "skipUrlEncoding": false }, { - "$id": "445", + "$id": "465", "name": "optionalLiteralFloat", "nameInRequest": "optionalLiteralFloat", "doc": "optional literal float", "type": { - "$ref": "129" + "$ref": "84" }, "location": "Body", "isApiVersion": false, @@ -4216,12 +4474,12 @@ "skipUrlEncoding": false }, { - "$id": "446", + "$id": "466", "name": "optionalLiteralBool", "nameInRequest": "optionalLiteralBool", "doc": "optional literal bool", "type": { - "$ref": "133" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -4234,12 +4492,12 @@ "skipUrlEncoding": false }, { - "$id": "447", + "$id": "467", "name": "requiredBadDescription", "nameInRequest": "requiredBadDescription", "doc": "description with xml <|endoftext|>", "type": { - "$id": "448", + "$id": "468", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4256,12 +4514,12 @@ "skipUrlEncoding": false }, { - "$id": "449", + "$id": "469", "name": "optionalNullableList", "nameInRequest": "optionalNullableList", "doc": "optional nullable collection", "type": { - "$ref": "142" + "$ref": "206" }, "location": "Body", "isApiVersion": false, @@ -4274,12 +4532,12 @@ "skipUrlEncoding": false }, { - "$id": "450", + "$id": "470", "name": "requiredNullableList", "nameInRequest": "requiredNullableList", "doc": "required nullable collection", "type": { - "$ref": "148" + "$ref": "212" }, "location": "Body", "isApiVersion": false, @@ -4292,12 +4550,12 @@ "skipUrlEncoding": false }, { - "$id": "451", + "$id": "471", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "429" + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -4310,11 +4568,11 @@ "skipUrlEncoding": false }, { - "$id": "452", + "$id": "472", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "432" + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -4328,9 +4586,9 @@ } ], "response": { - "$id": "453", + "$id": "473", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -4339,7 +4597,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.anonymousBody" }, { - "$id": "454", + "$id": "474", "kind": "basic", "name": "friendlyModel", "accessibility": "public", @@ -4349,29 +4607,19 @@ ], "doc": "Model can have its friendly name", "operation": { - "$id": "455", + "$id": "475", "name": "friendlyModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its friendly name", "accessibility": "public", "parameters": [ { - "$id": "456", + "$id": "476", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "457", - "kind": "constant", - "valueType": { - "$id": "458", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -4384,21 +4632,11 @@ "skipUrlEncoding": false }, { - "$id": "459", + "$id": "477", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "460", - "kind": "constant", - "valueType": { - "$id": "461", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -4411,11 +4649,11 @@ "skipUrlEncoding": false }, { - "$id": "462", + "$id": "478", "name": "friendModel", "nameInRequest": "friendModel", "type": { - "$ref": "264" + "$ref": "328" }, "location": "Body", "isApiVersion": false, @@ -4430,12 +4668,12 @@ ], "responses": [ { - "$id": "463", + "$id": "479", "statusCodes": [ 200 ], "bodyType": { - "$ref": "264" + "$ref": "328" }, "headers": [], "isErrorResponse": false, @@ -4458,12 +4696,12 @@ }, "parameters": [ { - "$id": "464", + "$id": "480", "name": "name", "nameInRequest": "name", "doc": "name of the NotFriend", "type": { - "$id": "465", + "$id": "481", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4480,12 +4718,12 @@ "skipUrlEncoding": false }, { - "$id": "466", + "$id": "482", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "457" + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -4498,11 +4736,11 @@ "skipUrlEncoding": false }, { - "$id": "467", + "$id": "483", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "460" + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -4516,9 +4754,9 @@ } ], "response": { - "$id": "468", + "$id": "484", "type": { - "$ref": "264" + "$ref": "328" } }, "isOverride": false, @@ -4527,7 +4765,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.friendlyModel" }, { - "$id": "469", + "$id": "485", "kind": "basic", "name": "addTimeHeader", "accessibility": "public", @@ -4536,22 +4774,22 @@ "2024-08-16-preview" ], "operation": { - "$id": "470", + "$id": "486", "name": "addTimeHeader", "resourceName": "BasicTypeSpec", "accessibility": "public", "parameters": [ { - "$id": "471", + "$id": "487", "name": "repeatabilityFirstSent", "nameInRequest": "Repeatability-First-Sent", "type": { - "$id": "472", + "$id": "488", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "473", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4573,7 +4811,7 @@ ], "responses": [ { - "$id": "474", + "$id": "490", "statusCodes": [ 204 ], @@ -4592,16 +4830,16 @@ }, "parameters": [ { - "$id": "475", + "$id": "491", "name": "repeatabilityFirstSent", "nameInRequest": "Repeatability-First-Sent", "type": { - "$id": "476", + "$id": "492", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "477", + "$id": "493", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4622,7 +4860,7 @@ } ], "response": { - "$id": "478" + "$id": "494" }, "isOverride": false, "generateConvenient": true, @@ -4630,7 +4868,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.addTimeHeader" }, { - "$id": "479", + "$id": "495", "kind": "basic", "name": "projectedNameModel", "accessibility": "public", @@ -4640,29 +4878,19 @@ ], "doc": "Model can have its projected name", "operation": { - "$id": "480", + "$id": "496", "name": "projectedNameModel", "resourceName": "BasicTypeSpec", "doc": "Model can have its projected name", "accessibility": "public", "parameters": [ { - "$id": "481", + "$id": "497", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "482", - "kind": "constant", - "valueType": { - "$id": "483", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -4675,21 +4903,11 @@ "skipUrlEncoding": false }, { - "$id": "484", + "$id": "498", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "485", - "kind": "constant", - "valueType": { - "$id": "486", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -4702,11 +4920,11 @@ "skipUrlEncoding": false }, { - "$id": "487", + "$id": "499", "name": "renamedModel", "nameInRequest": "renamedModel", "type": { - "$ref": "269" + "$ref": "333" }, "location": "Body", "isApiVersion": false, @@ -4721,12 +4939,12 @@ ], "responses": [ { - "$id": "488", + "$id": "500", "statusCodes": [ 200 ], "bodyType": { - "$ref": "269" + "$ref": "333" }, "headers": [], "isErrorResponse": false, @@ -4749,12 +4967,12 @@ }, "parameters": [ { - "$id": "489", + "$id": "501", "name": "name", "nameInRequest": "name", "doc": "name of the ModelWithClientName", "type": { - "$id": "490", + "$id": "502", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4771,12 +4989,12 @@ "skipUrlEncoding": false }, { - "$id": "491", + "$id": "503", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "482" + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -4789,11 +5007,11 @@ "skipUrlEncoding": false }, { - "$id": "492", + "$id": "504", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "485" + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -4807,9 +5025,9 @@ } ], "response": { - "$id": "493", + "$id": "505", "type": { - "$ref": "269" + "$ref": "333" } }, "isOverride": false, @@ -4818,7 +5036,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.projectedNameModel" }, { - "$id": "494", + "$id": "506", "kind": "basic", "name": "returnsAnonymousModel", "accessibility": "public", @@ -4828,28 +5046,18 @@ ], "doc": "return anonymous model", "operation": { - "$id": "495", + "$id": "507", "name": "returnsAnonymousModel", "resourceName": "BasicTypeSpec", "doc": "return anonymous model", "accessibility": "public", "parameters": [ { - "$id": "496", + "$id": "508", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "497", - "kind": "constant", - "valueType": { - "$id": "498", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "156" }, "location": "Header", "isApiVersion": false, @@ -4864,12 +5072,12 @@ ], "responses": [ { - "$id": "499", + "$id": "509", "statusCodes": [ 200 ], "bodyType": { - "$ref": "274" + "$ref": "338" }, "headers": [], "isErrorResponse": false, @@ -4889,11 +5097,11 @@ }, "parameters": [ { - "$id": "500", + "$id": "510", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "497" + "$ref": "156" }, "location": "Header", "isApiVersion": false, @@ -4907,9 +5115,9 @@ } ], "response": { - "$id": "501", + "$id": "511", "type": { - "$ref": "274" + "$ref": "338" } }, "isOverride": false, @@ -4918,7 +5126,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.returnsAnonymousModel" }, { - "$id": "502", + "$id": "512", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", @@ -4928,18 +5136,18 @@ ], "doc": "get extensible enum", "operation": { - "$id": "503", + "$id": "513", "name": "getUnknownValue", "resourceName": "BasicTypeSpec", "doc": "get extensible enum", "accessibility": "public", "parameters": [ { - "$id": "504", + "$id": "514", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "505", + "$id": "515", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -4958,22 +5166,12 @@ ], "responses": [ { - "$id": "506", + "$id": "516", "statusCodes": [ 200 ], "bodyType": { - "$id": "507", - "kind": "constant", - "valueType": { - "$id": "508", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "Sunday", - "decorators": [] + "$ref": "158" }, "headers": [], "isErrorResponse": false, @@ -5000,11 +5198,11 @@ }, "parameters": [ { - "$id": "509", + "$id": "517", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "505" + "$ref": "515" }, "location": "Header", "isApiVersion": false, @@ -5018,9 +5216,9 @@ } ], "response": { - "$id": "510", + "$id": "518", "type": { - "$ref": "507" + "$ref": "158" } }, "isOverride": false, @@ -5029,7 +5227,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.getUnknownValue" }, { - "$id": "511", + "$id": "519", "kind": "basic", "name": "internalProtocol", "accessibility": "public", @@ -5039,29 +5237,19 @@ ], "doc": "When set protocol false and convenient true, then the protocol method should be internal", "operation": { - "$id": "512", + "$id": "520", "name": "internalProtocol", "resourceName": "BasicTypeSpec", "doc": "When set protocol false and convenient true, then the protocol method should be internal", "accessibility": "public", "parameters": [ { - "$id": "513", + "$id": "521", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "514", - "kind": "constant", - "valueType": { - "$id": "515", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "160" }, "location": "Header", "isApiVersion": false, @@ -5074,21 +5262,11 @@ "skipUrlEncoding": false }, { - "$id": "516", + "$id": "522", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "517", - "kind": "constant", - "valueType": { - "$id": "518", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "162" }, "location": "Header", "isApiVersion": false, @@ -5101,11 +5279,11 @@ "skipUrlEncoding": false }, { - "$id": "519", + "$id": "523", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -5120,12 +5298,12 @@ ], "responses": [ { - "$id": "520", + "$id": "524", "statusCodes": [ 200 ], "bodyType": { - "$ref": "90" + "$ref": "164" }, "headers": [], "isErrorResponse": false, @@ -5148,11 +5326,11 @@ }, "parameters": [ { - "$id": "521", + "$id": "525", "name": "body", "nameInRequest": "body", "type": { - "$ref": "90" + "$ref": "164" }, "location": "Body", "isApiVersion": false, @@ -5165,12 +5343,12 @@ "skipUrlEncoding": false }, { - "$id": "522", + "$id": "526", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "514" + "$ref": "160" }, "location": "Header", "isApiVersion": false, @@ -5183,11 +5361,11 @@ "skipUrlEncoding": false }, { - "$id": "523", + "$id": "527", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "517" + "$ref": "162" }, "location": "Header", "isApiVersion": false, @@ -5201,9 +5379,9 @@ } ], "response": { - "$id": "524", + "$id": "528", "type": { - "$ref": "90" + "$ref": "164" } }, "isOverride": false, @@ -5212,7 +5390,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.internalProtocol" }, { - "$id": "525", + "$id": "529", "kind": "basic", "name": "stillConvenient", "accessibility": "public", @@ -5222,7 +5400,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": "526", + "$id": "530", "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", @@ -5230,7 +5408,7 @@ "parameters": [], "responses": [ { - "$id": "527", + "$id": "531", "statusCodes": [ 204 ], @@ -5249,7 +5427,7 @@ }, "parameters": [], "response": { - "$id": "528" + "$id": "532" }, "isOverride": false, "generateConvenient": true, @@ -5257,7 +5435,7 @@ "crossLanguageDefinitionId": "BasicTypeSpec.stillConvenient" }, { - "$id": "529", + "$id": "533", "kind": "basic", "name": "headAsBoolean", "accessibility": "public", @@ -5267,18 +5445,18 @@ ], "doc": "head as boolean.", "operation": { - "$id": "530", + "$id": "534", "name": "headAsBoolean", "resourceName": "BasicTypeSpec", "doc": "head as boolean.", "accessibility": "public", "parameters": [ { - "$id": "531", + "$id": "535", "name": "id", "nameInRequest": "id", "type": { - "$id": "532", + "$id": "536", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5297,7 +5475,7 @@ ], "responses": [ { - "$id": "533", + "$id": "537", "statusCodes": [ 204 ], @@ -5316,11 +5494,11 @@ }, "parameters": [ { - "$id": "534", + "$id": "538", "name": "id", "nameInRequest": "id", "type": { - "$id": "535", + "$id": "539", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -5338,7 +5516,7 @@ } ], "response": { - "$id": "536" + "$id": "540" }, "isOverride": false, "generateConvenient": true, @@ -5348,11 +5526,11 @@ ], "parameters": [ { - "$id": "537", + "$id": "541", "name": "basicTypeSpecUrl", "nameInRequest": "basicTypeSpecUrl", "type": { - "$id": "538", + "$id": "542", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5376,14 +5554,14 @@ } ], "auth": { - "$id": "539", + "$id": "543", "apiKey": { - "$id": "540", + "$id": "544", "name": "my-api-key", "in": "header" }, "oAuth2": { - "$id": "541", + "$id": "545", "scopes": [ "https://theservice.azure.com/.default" ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs new file mode 100644 index 000000000000..918a862760e1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Rpc/LroRpcTests.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using _Specs_.Azure.Core.Lro.Rpc; +using Azure; +using NUnit.Framework; + +namespace TestProjects.Spector.Tests.Http.Azure.Core.Lro.Rpc +{ + public class LongRunningOperation : SpectorTestBase + { + [SpectorTest] + public Task LongRunningRpc_Completed() => Test(async (host) => + { + var option = new GenerationOptions("text"); + var response = await new RpcClient(host, null).LongRunningRpcAsync(WaitUntil.Completed, option); + Assert.AreEqual(200, response.GetRawResponse().Status); + Assert.AreEqual("text data", response.Value.Data); + }); + + [SpectorTest] + public Task LongRunningRpc_Started() => Test(async (host) => + { + var option = new GenerationOptions("text"); + var response = await new RpcClient(host, null).LongRunningRpcAsync(WaitUntil.Started, option); + Assert.AreEqual(202, response.GetRawResponse().Status); + Assert.AreEqual(true, response.GetRawResponse().Headers.TryGetValue("operation-location", out string? operationLocation)); + Assert.AreEqual(true, operationLocation!.Contains("/azure/core/lro/rpc/generations/operations/operation1")); + }); + + + } +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs new file mode 100644 index 000000000000..fe4811c6ffdf --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Azure/Core/Lro/Standard/LroStandardTests.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Net; +using System.Threading.Tasks; +using _Specs_.Azure.Core.Lro.Standard; +using Azure; +using NUnit.Framework; + +namespace TestProjects.Spector.Tests.Http.Azure.Core.Lro.Standard +{ + public class LroStandardTests : SpectorTestBase + { + [SpectorTest] + public Task CreateOrReplace() => Test(async (host) => + { + var operation = await new StandardClient(host, null).CreateOrReplaceAsync( + WaitUntil.Completed, + "madge", + new User("contributor")); + var user = operation.Value; + + Assert.AreEqual("madge", user.Name); + Assert.AreEqual("contributor", user.Role); + }); + + [SpectorTest] + public Task Delete() => Test(async (host) => + { + var operation = await new StandardClient(host, null).DeleteAsync(WaitUntil.Completed, "madge"); + + Assert.IsTrue(operation.HasCompleted); + Assert.AreEqual(((int)HttpStatusCode.OK), operation.GetRawResponse().Status); + }); + + [SpectorTest] + public Task Action() => Test(async (host) => + { + var operation = await new StandardClient(host, null).ExportAsync(WaitUntil.Completed, "madge", "json"); + Assert.IsTrue(operation.HasCompleted); + + var exportedUser = operation.Value; + Assert.AreEqual("madge", exportedUser.Name); + Assert.AreEqual("/users/madge", exportedUser.ResourceUri); + }); + } +} \ No newline at end of file diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Encode/Bytes/EncodeBytesTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Encode/Bytes/EncodeBytesTests.cs index c2adfde6d8d2..4059a219a3be 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Encode/Bytes/EncodeBytesTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/Encode/Bytes/EncodeBytesTests.cs @@ -4,6 +4,7 @@ using System; using System.IO; using System.Threading.Tasks; +using Azure; using Encode.Bytes; using NUnit.Framework; @@ -18,7 +19,7 @@ public Task QueryDefault() => Test(async (host) => { BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetQueryClient().DefaultAsync(data); + Response result = await new BytesClient(host, null).GetQueryClient().DefaultAsync(data); Assert.AreEqual(204, result.Status); }); @@ -26,7 +27,7 @@ public Task QueryDefault() => Test(async (host) => public Task QueryBase64() => Test(async (host) => { BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetQueryClient().Base64Async(data); + Response result = await new BytesClient(host, null).GetQueryClient().Base64Async(data); Assert.AreEqual(204, result.Status); }); @@ -34,7 +35,7 @@ public Task QueryBase64() => Test(async (host) => public Task QueryBase64url() => Test(async (host) => { BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetQueryClient().Base64urlAsync(data); + Response result = await new BytesClient(host, null).GetQueryClient().Base64urlAsync(data); Assert.AreEqual(204, result.Status); }); @@ -43,7 +44,7 @@ public Task QueryBase64urlArray() => Test(async (host) => { BinaryData data1 = BinaryData.FromString("test"); BinaryData data2 = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetQueryClient().Base64urlArrayAsync(new[] { data1, data2 }); + Response result = await new BytesClient(host, null).GetQueryClient().Base64urlArrayAsync(new[] { data1, data2 }); Assert.AreEqual(204, result.Status); }); @@ -90,16 +91,15 @@ public Task HeaderDefault() => Test(async (host) => { BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetHeaderClient().DefaultAsync(data); + Response result = await new BytesClient(host, null).GetHeaderClient().DefaultAsync(data); Assert.AreEqual(204, result.Status); }); [SpectorTest] public Task HeaderBase64() => Test(async (host) => { - BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetHeaderClient().Base64Async(data); + Response result = await new BytesClient(host, null).GetHeaderClient().Base64Async(data); Assert.AreEqual(204, result.Status); }); @@ -107,7 +107,7 @@ public Task HeaderBase64() => Test(async (host) => public Task HeaderBase64url() => Test(async (host) => { BinaryData data = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetHeaderClient().Base64urlAsync(data); + Response result = await new BytesClient(host, null).GetHeaderClient().Base64urlAsync(data); Assert.AreEqual(204, result.Status); }); @@ -116,7 +116,7 @@ public Task HeaderBase64urlArray() => Test(async (host) => { BinaryData data1 = BinaryData.FromString("test"); BinaryData data2 = BinaryData.FromString("test"); - Azure.Response result = await new BytesClient(host, null).GetHeaderClient().Base64urlArrayAsync(new[] { data1, data2 }); + Response result = await new BytesClient(host, null).GetHeaderClient().Base64urlArrayAsync(new[] { data1, data2 }); Assert.AreEqual(204, result.Status); }); @@ -124,7 +124,7 @@ public Task HeaderBase64urlArray() => Test(async (host) => public Task RequestBodyDefault() => Test(async (host) => { BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath)); - Azure.Response result = await new BytesClient(host, null).GetRequestBodyClient().DefaultAsync(data); + Response result = await new BytesClient(host, null).GetRequestBodyClient().DefaultAsync(data); Assert.AreEqual(204, result.Status); }); @@ -132,7 +132,7 @@ public Task RequestBodyDefault() => Test(async (host) => public Task RequestBodyOctetStream() => Test(async (host) => { BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath)); - Azure.Response result = await new BytesClient(host, null).GetRequestBodyClient().OctetStreamAsync(data); + Response result = await new BytesClient(host, null).GetRequestBodyClient().OctetStreamAsync(data); Assert.AreEqual(204, result.Status); }); @@ -140,7 +140,7 @@ public Task RequestBodyOctetStream() => Test(async (host) => public Task RequestBodyCustomContentType() => Test(async (host) => { BinaryData data = new BinaryData(File.ReadAllBytes(SamplePngPath)); - Azure.Response result = await new BytesClient(host, null).GetRequestBodyClient().CustomContentTypeAsync(data); + Response result = await new BytesClient(host, null).GetRequestBodyClient().CustomContentTypeAsync(data); Assert.AreEqual(204, result.Status); }); @@ -148,7 +148,7 @@ public Task RequestBodyCustomContentType() => Test(async (host) => public Task RequestBodyBase64() => Test(async (host) => { BinaryData data = new BinaryData($"\"{Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("test"))}\""); - Azure.Response result = await new BytesClient(host, null).GetRequestBodyClient().Base64Async(data); + Response result = await new BytesClient(host, null).GetRequestBodyClient().Base64Async(data); Assert.AreEqual(204, result.Status); }); @@ -156,7 +156,7 @@ public Task RequestBodyBase64() => Test(async (host) => public Task RequestBodyBase64url() => Test(async (host) => { BinaryData data = new BinaryData($"\"{Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes("test")).Replace('+', '-').Replace('/', '_').Replace("=", "")}\""); - Azure.Response result = await new BytesClient(host, null).GetRequestBodyClient().Base64urlAsync(data); + Response result = await new BytesClient(host, null).GetRequestBodyClient().Base64urlAsync(data); Assert.AreEqual(204, result.Status); }); diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs index 454dd1327539..93a70a15bb35 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/Optionality/OptionalityTests.cs @@ -353,7 +353,7 @@ public Task RequiredAndOptionalPutRequiredOnly() => Test(async (host) => public Task FloatLiteralGetAll() => Test(async (host) => { var response = await new OptionalClient(host, null).GetFloatLiteralClient().GetAllAsync(); - Assert.AreEqual(FloatLiteralPropertyProperty._125, response.Value.Property); + Assert.AreEqual(1.25f, response.Value.Property); }); [SpectorTest] @@ -368,7 +368,7 @@ public Task FloatLiteralPutAll() => Test(async (host) => { FloatLiteralProperty data = new() { - Property = new FloatLiteralPropertyProperty(1.25f) + Property = 1.25f }; var response = await new OptionalClient(host, null).GetFloatLiteralClient().PutAllAsync(data); Assert.AreEqual(204, response.Status); @@ -385,7 +385,7 @@ public Task FloatLiteralPutDefault() => Test(async (host) => public Task IntLiteralGetAll() => Test(async (host) => { var response = await new OptionalClient(host, null).GetIntLiteralClient().GetAllAsync(); - Assert.AreEqual(IntLiteralPropertyProperty._1, response.Value.Property); + Assert.AreEqual(1, response.Value.Property); }); [SpectorTest] @@ -417,7 +417,7 @@ public Task IntLiteralPutDefault() => Test(async (host) => public Task StringLiteralGetAll() => Test(async (host) => { var response = await new OptionalClient(host, null).GetStringLiteralClient().GetAllAsync(); - Assert.AreEqual(StringLiteralPropertyProperty.Hello, response.Value.Property); + Assert.AreEqual("hello", response.Value.Property); }); [SpectorTest] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/ValueTypes/ValueTypesTests.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/ValueTypes/ValueTypesTests.cs index d7f0b8a6cbd5..dc20e7a83551 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/ValueTypes/ValueTypesTests.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/Http/_Type/Property/ValueTypes/ValueTypesTests.cs @@ -61,7 +61,7 @@ public Task StringPut() => Test(async (host) => public Task StringLiteralGet() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetStringLiteralClient().GetAsync(); - Assert.AreEqual(StringLiteralPropertyProperty.Hello, response.Value.Property); + Assert.AreEqual(new StringLiteralProperty().Property, response.Value.Property); }); [SpectorTest] @@ -103,7 +103,7 @@ public Task IntPut() => Test(async (host) => public Task IntLiteralGet() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetIntLiteralClient().GetAsync(); - Assert.AreEqual(IntLiteralPropertyProperty._42, response.Value.Property); + Assert.AreEqual(new IntLiteralProperty().Property, response.Value.Property); }); [SpectorTest] @@ -130,7 +130,7 @@ public Task FloatPut() => Test(async (host) => public Task FloatLiteralGet() => Test(async (host) => { var response = await new ValueTypesClient(host, null).GetFloatLiteralClient().GetAsync(); - Assert.AreEqual(FloatLiteralPropertyProperty._43125, response.Value.Property); + Assert.AreEqual(new FloatLiteralProperty().Property, response.Value.Property); }); [SpectorTest] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj index 62ede0f611a8..1300fd1661e1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector.Tests/TestProjects.Spector.Tests.csproj @@ -18,6 +18,8 @@ + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj index 9ac5ee3eb00f..0078e5004f56 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/src/Authentication.ApiKey.csproj @@ -18,6 +18,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json index 2fdff1e080dc..ee9fa7332c2e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/api-key/tspCodeModel.json @@ -3,9 +3,27 @@ "name": "Authentication.ApiKey", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "invalidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "4", "kind": "model", "name": "InvalidAuth", "namespace": "Authentication.ApiKey", @@ -14,12 +32,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "5", "kind": "property", "name": "error", "serializedName": "error", "type": { - "$id": "4", + "$id": "6", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,9 +50,9 @@ "decorators": [], "crossLanguageDefinitionId": "Authentication.ApiKey.InvalidAuth.error", "serializationOptions": { - "$id": "5", + "$id": "7", "json": { - "$id": "6", + "$id": "8", "name": "error" } } @@ -44,21 +62,21 @@ ], "clients": [ { - "$id": "7", + "$id": "9", "kind": "client", "name": "ApiKeyClient", "namespace": "Authentication.ApiKey", "doc": "Illustrates clients generated with ApiKey authentication.", "methods": [ { - "$id": "8", + "$id": "10", "kind": "basic", "name": "valid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated", "operation": { - "$id": "9", + "$id": "11", "name": "valid", "resourceName": "ApiKey", "doc": "Check whether client is authenticated", @@ -66,7 +84,7 @@ "parameters": [], "responses": [ { - "$id": "10", + "$id": "12", "statusCodes": [ 204 ], @@ -85,7 +103,7 @@ }, "parameters": [], "response": { - "$id": "11" + "$id": "13" }, "isOverride": false, "generateConvenient": true, @@ -93,35 +111,25 @@ "crossLanguageDefinitionId": "Authentication.ApiKey.valid" }, { - "$id": "12", + "$id": "14", "kind": "basic", "name": "invalid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated.", "operation": { - "$id": "13", + "$id": "15", "name": "invalid", "resourceName": "ApiKey", "doc": "Check whether client is authenticated.", "accessibility": "public", "parameters": [ { - "$id": "14", + "$id": "16", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "15", - "kind": "constant", - "valueType": { - "$id": "16", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -159,7 +167,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "15" + "$ref": "2" }, "location": "Header", "isApiVersion": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj index 3f3a25e7d88c..527d8d3d03b7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/src/Authentication.Http.Custom.csproj @@ -18,6 +18,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json index 5e2941896def..22fb8f770936 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/http/custom/tspCodeModel.json @@ -3,9 +3,27 @@ "name": "Authentication.Http.Custom", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "invalidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "4", "kind": "model", "name": "InvalidAuth", "namespace": "Authentication.Http.Custom", @@ -14,12 +32,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "5", "kind": "property", "name": "error", "serializedName": "error", "type": { - "$id": "4", + "$id": "6", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,9 +50,9 @@ "decorators": [], "crossLanguageDefinitionId": "Authentication.Http.Custom.InvalidAuth.error", "serializationOptions": { - "$id": "5", + "$id": "7", "json": { - "$id": "6", + "$id": "8", "name": "error" } } @@ -44,21 +62,21 @@ ], "clients": [ { - "$id": "7", + "$id": "9", "kind": "client", "name": "CustomClient", "namespace": "Authentication.Http.Custom", "doc": "Illustrates clients generated with generic HTTP auth.", "methods": [ { - "$id": "8", + "$id": "10", "kind": "basic", "name": "valid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated", "operation": { - "$id": "9", + "$id": "11", "name": "valid", "resourceName": "Custom", "doc": "Check whether client is authenticated", @@ -66,7 +84,7 @@ "parameters": [], "responses": [ { - "$id": "10", + "$id": "12", "statusCodes": [ 204 ], @@ -85,7 +103,7 @@ }, "parameters": [], "response": { - "$id": "11" + "$id": "13" }, "isOverride": false, "generateConvenient": true, @@ -93,35 +111,25 @@ "crossLanguageDefinitionId": "Authentication.Http.Custom.valid" }, { - "$id": "12", + "$id": "14", "kind": "basic", "name": "invalid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated.", "operation": { - "$id": "13", + "$id": "15", "name": "invalid", "resourceName": "Custom", "doc": "Check whether client is authenticated.", "accessibility": "public", "parameters": [ { - "$id": "14", + "$id": "16", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "15", - "kind": "constant", - "valueType": { - "$id": "16", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -159,7 +167,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "15" + "$ref": "2" }, "location": "Header", "isApiVersion": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj index 633d29a6f926..75ac6e65c5be 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/src/Authentication.OAuth2.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json index a4ea7ba9be34..9004a1e03f07 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/oauth2/tspCodeModel.json @@ -3,9 +3,27 @@ "name": "Authentication.OAuth2", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "invalidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "4", "kind": "model", "name": "InvalidAuth", "namespace": "Authentication.OAuth2", @@ -14,12 +32,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "5", "kind": "property", "name": "error", "serializedName": "error", "type": { - "$id": "4", + "$id": "6", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,9 +50,9 @@ "decorators": [], "crossLanguageDefinitionId": "Authentication.OAuth2.InvalidAuth.error", "serializationOptions": { - "$id": "5", + "$id": "7", "json": { - "$id": "6", + "$id": "8", "name": "error" } } @@ -44,21 +62,21 @@ ], "clients": [ { - "$id": "7", + "$id": "9", "kind": "client", "name": "OAuth2Client", "namespace": "Authentication.OAuth2", "doc": "Illustrates clients generated with OAuth2 authentication.", "methods": [ { - "$id": "8", + "$id": "10", "kind": "basic", "name": "valid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated", "operation": { - "$id": "9", + "$id": "11", "name": "valid", "resourceName": "OAuth2", "doc": "Check whether client is authenticated", @@ -66,7 +84,7 @@ "parameters": [], "responses": [ { - "$id": "10", + "$id": "12", "statusCodes": [ 204 ], @@ -85,7 +103,7 @@ }, "parameters": [], "response": { - "$id": "11" + "$id": "13" }, "isOverride": false, "generateConvenient": true, @@ -93,35 +111,25 @@ "crossLanguageDefinitionId": "Authentication.OAuth2.valid" }, { - "$id": "12", + "$id": "14", "kind": "basic", "name": "invalid", "accessibility": "public", "apiVersions": [], "doc": "Check whether client is authenticated. Will return an invalid bearer error.", "operation": { - "$id": "13", + "$id": "15", "name": "invalid", "resourceName": "OAuth2", "doc": "Check whether client is authenticated. Will return an invalid bearer error.", "accessibility": "public", "parameters": [ { - "$id": "14", + "$id": "16", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "15", - "kind": "constant", - "valueType": { - "$id": "16", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -159,7 +167,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "15" + "$ref": "2" }, "location": "Header", "isApiVersion": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj index 4018e6294285..0c8555f8cba7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/src/Authentication.Union.csproj @@ -18,6 +18,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json index 6d58ca2f4f06..1161b88dcc65 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/authentication/union/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Authentication.Union", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj index 3bb5f904456e..9bbfd83a0258 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/src/_Specs_.Azure.ClientGenerator.Core.FlattenProperty.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json index ab936bf9a5aa..3d54498b4482 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/flatten-property/tspCodeModel.json @@ -3,9 +3,75 @@ "name": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "putFlattenModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "putFlattenModelContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "putNestedFlattenModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "putNestedFlattenModelContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "10", "kind": "model", "name": "FlattenModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", @@ -15,12 +81,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "11", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "12", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,20 +99,20 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.FlattenModel.name", "serializationOptions": { - "$id": "5", + "$id": "13", "json": { - "$id": "6", + "$id": "14", "name": "name" } } }, { - "$id": "7", + "$id": "15", "kind": "property", "name": "properties", "serializedName": "properties", "type": { - "$id": "8", + "$id": "16", "kind": "model", "name": "ChildModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", @@ -56,12 +122,12 @@ "decorators": [], "properties": [ { - "$id": "9", + "$id": "17", "kind": "property", "name": "description", "serializedName": "description", "type": { - "$id": "10", + "$id": "18", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -74,20 +140,20 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildModel.description", "serializationOptions": { - "$id": "11", + "$id": "19", "json": { - "$id": "12", + "$id": "20", "name": "description" } } }, { - "$id": "13", + "$id": "21", "kind": "property", "name": "age", "serializedName": "age", "type": { - "$id": "14", + "$id": "22", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -100,9 +166,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildModel.age", "serializationOptions": { - "$id": "15", + "$id": "23", "json": { - "$id": "16", + "$id": "24", "name": "age" } } @@ -116,9 +182,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.FlattenModel.properties", "serializationOptions": { - "$id": "17", + "$id": "25", "json": { - "$id": "18", + "$id": "26", "name": "properties" } } @@ -126,10 +192,10 @@ ] }, { - "$ref": "8" + "$ref": "16" }, { - "$id": "19", + "$id": "27", "kind": "model", "name": "NestedFlattenModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", @@ -139,12 +205,12 @@ "decorators": [], "properties": [ { - "$id": "20", + "$id": "28", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "21", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -157,20 +223,20 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.NestedFlattenModel.name", "serializationOptions": { - "$id": "22", + "$id": "30", "json": { - "$id": "23", + "$id": "31", "name": "name" } } }, { - "$id": "24", + "$id": "32", "kind": "property", "name": "properties", "serializedName": "properties", "type": { - "$id": "25", + "$id": "33", "kind": "model", "name": "ChildFlattenModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", @@ -180,12 +246,12 @@ "decorators": [], "properties": [ { - "$id": "26", + "$id": "34", "kind": "property", "name": "summary", "serializedName": "summary", "type": { - "$id": "27", + "$id": "35", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -198,20 +264,20 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildFlattenModel.summary", "serializationOptions": { - "$id": "28", + "$id": "36", "json": { - "$id": "29", + "$id": "37", "name": "summary" } } }, { - "$id": "30", + "$id": "38", "kind": "property", "name": "properties", "serializedName": "properties", "type": { - "$ref": "8" + "$ref": "16" }, "optional": false, "readOnly": false, @@ -220,9 +286,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.ChildFlattenModel.properties", "serializationOptions": { - "$id": "31", + "$id": "39", "json": { - "$id": "32", + "$id": "40", "name": "properties" } } @@ -236,9 +302,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.NestedFlattenModel.properties", "serializationOptions": { - "$id": "33", + "$id": "41", "json": { - "$id": "34", + "$id": "42", "name": "properties" } } @@ -246,46 +312,36 @@ ] }, { - "$ref": "25" + "$ref": "33" } ], "clients": [ { - "$id": "35", + "$id": "43", "kind": "client", "name": "FlattenPropertyClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty", "doc": "Illustrates the model flatten cases.", "methods": [ { - "$id": "36", + "$id": "44", "kind": "basic", "name": "putFlattenModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "37", + "$id": "45", "name": "putFlattenModel", "resourceName": "FlattenProperty", "accessibility": "public", "parameters": [ { - "$id": "38", + "$id": "46", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "39", - "kind": "constant", - "valueType": { - "$id": "40", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -298,21 +354,11 @@ "skipUrlEncoding": false }, { - "$id": "41", + "$id": "47", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -325,11 +371,11 @@ "skipUrlEncoding": false }, { - "$id": "44", + "$id": "48", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -344,12 +390,12 @@ ], "responses": [ { - "$id": "45", + "$id": "49", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "10" }, "headers": [], "isErrorResponse": false, @@ -372,11 +418,11 @@ }, "parameters": [ { - "$id": "46", + "$id": "50", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -389,12 +435,12 @@ "skipUrlEncoding": false }, { - "$id": "47", + "$id": "51", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "39" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -407,11 +453,11 @@ "skipUrlEncoding": false }, { - "$id": "48", + "$id": "52", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "42" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -425,9 +471,9 @@ } ], "response": { - "$id": "49", + "$id": "53", "type": { - "$ref": "2" + "$ref": "10" } }, "isOverride": false, @@ -436,34 +482,24 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.FlattenProperty.putFlattenModel" }, { - "$id": "50", + "$id": "54", "kind": "basic", "name": "putNestedFlattenModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "51", + "$id": "55", "name": "putNestedFlattenModel", "resourceName": "FlattenProperty", "accessibility": "public", "parameters": [ { - "$id": "52", + "$id": "56", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "53", - "kind": "constant", - "valueType": { - "$id": "54", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -476,21 +512,11 @@ "skipUrlEncoding": false }, { - "$id": "55", + "$id": "57", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "56", - "kind": "constant", - "valueType": { - "$id": "57", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -507,7 +533,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "19" + "$ref": "27" }, "location": "Body", "isApiVersion": false, @@ -527,7 +553,7 @@ 200 ], "bodyType": { - "$ref": "19" + "$ref": "27" }, "headers": [], "isErrorResponse": false, @@ -554,7 +580,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "19" + "$ref": "27" }, "location": "Body", "isApiVersion": false, @@ -572,7 +598,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "53" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -589,7 +615,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "56" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -605,7 +631,7 @@ "response": { "$id": "63", "type": { - "$ref": "19" + "$ref": "27" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj index 35b3695c3298..7c0a5873765c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/src/_Specs_.Azure.ClientGenerator.Core.Usage.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json index 5c3ab723b796..59cac0e53121 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/client-generator-core/usage/tspCodeModel.json @@ -3,9 +3,91 @@ "name": "_Specs_.Azure.ClientGenerator.Core.Usage", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "inputToInputOutputContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "outputToInputOutputContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "modelInReadOnlyPropertyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "modelInReadOnlyPropertyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "orphanModelSerializableContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "12", "kind": "model", "name": "InputModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", @@ -15,12 +97,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "13", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "14", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,9 +115,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.InputModel.name", "serializationOptions": { - "$id": "5", + "$id": "15", "json": { - "$id": "6", + "$id": "16", "name": "name" } } @@ -43,7 +125,7 @@ ] }, { - "$id": "7", + "$id": "17", "kind": "model", "name": "OutputModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", @@ -53,12 +135,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "18", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "9", + "$id": "19", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -71,9 +153,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.OutputModel.name", "serializationOptions": { - "$id": "10", + "$id": "20", "json": { - "$id": "11", + "$id": "21", "name": "name" } } @@ -81,7 +163,7 @@ ] }, { - "$id": "12", + "$id": "22", "kind": "model", "name": "RoundTripModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", @@ -90,12 +172,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "23", "kind": "property", "name": "result", "serializedName": "result", "type": { - "$id": "14", + "$id": "24", "kind": "model", "name": "ResultModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", @@ -104,12 +186,12 @@ "decorators": [], "properties": [ { - "$id": "15", + "$id": "25", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "16", + "$id": "26", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -122,9 +204,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.ResultModel.name", "serializationOptions": { - "$id": "17", + "$id": "27", "json": { - "$id": "18", + "$id": "28", "name": "name" } } @@ -138,9 +220,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.RoundTripModel.result", "serializationOptions": { - "$id": "19", + "$id": "29", "json": { - "$id": "20", + "$id": "30", "name": "result" } } @@ -148,10 +230,10 @@ ] }, { - "$ref": "14" + "$ref": "24" }, { - "$id": "21", + "$id": "31", "kind": "model", "name": "OrphanModel", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage", @@ -162,12 +244,12 @@ "decorators": [], "properties": [ { - "$id": "22", + "$id": "32", "kind": "property", "name": "modelName", "serializedName": "name", "type": { - "$id": "23", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -180,16 +262,16 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.OrphanModel.name", "serializationOptions": { - "$id": "24" + "$id": "34" } }, { - "$id": "25", + "$id": "35", "kind": "property", "name": "description", "serializedName": "desc", "type": { - "$id": "26", + "$id": "36", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -202,9 +284,9 @@ "decorators": [], "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.OrphanModel.description", "serializationOptions": { - "$id": "27", + "$id": "37", "json": { - "$id": "28", + "$id": "38", "name": "desc" } } @@ -214,7 +296,7 @@ ], "clients": [ { - "$id": "29", + "$id": "39", "kind": "client", "name": "UsageClient", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage", @@ -222,12 +304,12 @@ "methods": [], "parameters": [ { - "$id": "30", + "$id": "40", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "31", + "$id": "41", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -241,9 +323,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "32", + "$id": "42", "type": { - "$id": "33", + "$id": "43", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -257,42 +339,32 @@ "apiVersions": [], "children": [ { - "$id": "34", + "$id": "44", "kind": "client", "name": "ModelInOperation", "namespace": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", "methods": [ { - "$id": "35", + "$id": "45", "kind": "basic", "name": "inputToInputOutput", "accessibility": "public", "apiVersions": [], "doc": "Expected body parameter: \n```json\n{\n \"name\": \"Madge\"\n}\n```", "operation": { - "$id": "36", + "$id": "46", "name": "inputToInputOutput", "resourceName": "ModelInOperation", "doc": "Expected body parameter: \n```json\n{\n \"name\": \"Madge\"\n}\n```", "accessibility": "public", "parameters": [ { - "$id": "37", + "$id": "47", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "38", - "kind": "constant", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -305,11 +377,11 @@ "skipUrlEncoding": false }, { - "$id": "40", + "$id": "48", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "12" }, "location": "Body", "isApiVersion": false, @@ -324,7 +396,7 @@ ], "responses": [ { - "$id": "41", + "$id": "49", "statusCodes": [ 204 ], @@ -346,11 +418,11 @@ }, "parameters": [ { - "$id": "42", + "$id": "50", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "12" }, "location": "Body", "isApiVersion": false, @@ -363,12 +435,12 @@ "skipUrlEncoding": false }, { - "$id": "43", + "$id": "51", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "38" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -382,7 +454,7 @@ } ], "response": { - "$id": "44" + "$id": "52" }, "isOverride": false, "generateConvenient": true, @@ -390,35 +462,25 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.inputToInputOutput" }, { - "$id": "45", + "$id": "53", "kind": "basic", "name": "outputToInputOutput", "accessibility": "public", "apiVersions": [], "doc": "Expected response body: \n```json\n{\n \"name\": \"Madge\"\n}\n```", "operation": { - "$id": "46", + "$id": "54", "name": "outputToInputOutput", "resourceName": "ModelInOperation", "doc": "Expected response body: \n```json\n{\n \"name\": \"Madge\"\n}\n```", "accessibility": "public", "parameters": [ { - "$id": "47", + "$id": "55", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "48", - "kind": "constant", - "valueType": { - "$id": "49", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -433,12 +495,12 @@ ], "responses": [ { - "$id": "50", + "$id": "56", "statusCodes": [ 200 ], "bodyType": { - "$ref": "7" + "$ref": "17" }, "headers": [], "isErrorResponse": false, @@ -458,11 +520,11 @@ }, "parameters": [ { - "$id": "51", + "$id": "57", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "48" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -476,9 +538,9 @@ } ], "response": { - "$id": "52", + "$id": "58", "type": { - "$ref": "7" + "$ref": "17" } }, "isOverride": false, @@ -487,36 +549,26 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.outputToInputOutput" }, { - "$id": "53", + "$id": "59", "kind": "basic", "name": "modelInReadOnlyProperty", "accessibility": "public", "apiVersions": [], "doc": "\"ResultModel\" should be usage=output, as it is read-only and does not exist in request body.\n\nExpected body parameter: \n```json\n{\n}\n```\n\nExpected response body: \n```json\n{\n \"result\": {\n \"name\": \"Madge\"\n }\n}\n```", "operation": { - "$id": "54", + "$id": "60", "name": "modelInReadOnlyProperty", "resourceName": "ModelInOperation", "doc": "\"ResultModel\" should be usage=output, as it is read-only and does not exist in request body.\n\nExpected body parameter: \n```json\n{\n}\n```\n\nExpected response body: \n```json\n{\n \"result\": {\n \"name\": \"Madge\"\n }\n}\n```", "accessibility": "public", "parameters": [ { - "$id": "55", + "$id": "61", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "56", - "kind": "constant", - "valueType": { - "$id": "57", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -529,21 +581,11 @@ "skipUrlEncoding": false }, { - "$id": "58", + "$id": "62", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "59", - "kind": "constant", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -556,11 +598,11 @@ "skipUrlEncoding": false }, { - "$id": "61", + "$id": "63", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -575,12 +617,12 @@ ], "responses": [ { - "$id": "62", + "$id": "64", "statusCodes": [ 200 ], "bodyType": { - "$ref": "12" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -603,11 +645,11 @@ }, "parameters": [ { - "$id": "63", + "$id": "65", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -620,12 +662,12 @@ "skipUrlEncoding": false }, { - "$id": "64", + "$id": "66", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "56" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -638,11 +680,11 @@ "skipUrlEncoding": false }, { - "$id": "65", + "$id": "67", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "59" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -656,9 +698,9 @@ } ], "response": { - "$id": "66", + "$id": "68", "type": { - "$ref": "12" + "$ref": "22" } }, "isOverride": false, @@ -667,36 +709,26 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation.modelInReadOnlyProperty" }, { - "$id": "67", + "$id": "69", "kind": "basic", "name": "orphanModelSerializable", "accessibility": "public", "apiVersions": [], "doc": "Serialize the 'OrphanModel' as request body.\n\nExpected body parameter: \n```json\n{\n \"name\": \"name\",\n \"desc\": \"desc\"\n}\n```", "operation": { - "$id": "68", + "$id": "70", "name": "orphanModelSerializable", "resourceName": "ModelInOperation", "doc": "Serialize the 'OrphanModel' as request body.\n\nExpected body parameter: \n```json\n{\n \"name\": \"name\",\n \"desc\": \"desc\"\n}\n```", "accessibility": "public", "parameters": [ { - "$id": "69", + "$id": "71", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "70", - "kind": "constant", - "valueType": { - "$id": "71", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -780,7 +812,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "70" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -838,7 +870,7 @@ "crossLanguageDefinitionId": "_Specs_.Azure.ClientGenerator.Core.Usage.ModelInOperation", "apiVersions": [], "parent": { - "$ref": "29" + "$ref": "39" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/Configuration.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/Configuration.json new file mode 100644 index 000000000000..c6467b1bd6a1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/Configuration.json @@ -0,0 +1,10 @@ +{ + "package-name": "_Specs_.Azure.Core.Lro.Rpc", + "license": { + "name": "MIT License", + "company": "Microsoft Corporation", + "link": "https://mit-license.org", + "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", + "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/_Specs_.Azure.Core.Lro.Rpc.sln b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/_Specs_.Azure.Core.Lro.Rpc.sln new file mode 100644 index 000000000000..09aa480a9284 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/_Specs_.Azure.Core.Lro.Rpc.sln @@ -0,0 +1,48 @@ +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}") = "_Specs_.Azure.Core.Lro.Rpc", "src\_Specs_.Azure.Core.Lro.Rpc.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +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 + {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/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.Serialization.cs new file mode 100644 index 000000000000..7c837056e296 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.Serialization.cs @@ -0,0 +1,43 @@ +// 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; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class GenerationOptions : IJsonModel + { + internal GenerationOptions() => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + GenerationOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual GenerationOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + GenerationOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual GenerationOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(GenerationOptions generationOptions) => throw null; + + public static explicit operator GenerationOptions(Response result) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.cs new file mode 100644 index 000000000000..2cf1b2d1e6a1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationOptions.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class GenerationOptions + { + public GenerationOptions(string prompt) => throw null; + + public string Prompt => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.Serialization.cs new file mode 100644 index 000000000000..4de052d597cf --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.Serialization.cs @@ -0,0 +1,43 @@ +// 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; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class GenerationResult : IJsonModel + { + internal GenerationResult() => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + GenerationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual GenerationResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + GenerationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual GenerationResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(GenerationResult generationResult) => throw null; + + public static explicit operator GenerationResult(Response result) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.cs new file mode 100644 index 000000000000..31dddebeacd7 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/GenerationResult.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class GenerationResult + { + public string Data => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs new file mode 100644 index 000000000000..e5c796171a09 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/Models/_Specs_AzureCoreLroRpcContext.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class _Specs_AzureCoreLroRpcContext : ModelReaderWriterContext + { + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs new file mode 100644 index 000000000000..0a8f320d2b00 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClient.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class RpcClient + { + public RpcClient() : this(new Uri("http://localhost:3000"), new RpcClientOptions()) => throw null; + + public RpcClient(Uri endpoint, RpcClientOptions options) => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Operation LongRunningRpc(WaitUntil waitUntil, RequestContent content, RequestContext context = null) => throw null; + + public virtual Task> LongRunningRpcAsync(WaitUntil waitUntil, RequestContent content, RequestContext context = null) => throw null; + + public virtual Operation LongRunningRpc(WaitUntil waitUntil, GenerationOptions body, CancellationToken cancellationToken = default) => throw null; + + public virtual Task> LongRunningRpcAsync(WaitUntil waitUntil, GenerationOptions body, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs new file mode 100644 index 000000000000..2a397dd3a662 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/RpcClientOptions.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public partial class RpcClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2022_12_01_Preview; + + public RpcClientOptions(ServiceVersion version = LatestVersion) => throw null; + + public enum ServiceVersion + { + /// The 2022-12-01-preview version. + V2022_12_01_Preview = 1 + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs new file mode 100644 index 000000000000..5caf7f0bf220 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/Generated/_Specs_AzureCoreLroRpcModelFactory.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Rpc +{ + public static partial class _Specs_AzureCoreLroRpcModelFactory + { + public static GenerationOptions GenerationOptions(string prompt = default) => throw null; + + public static GenerationResult GenerationResult(string data = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj new file mode 100644 index 000000000000..51f52f699679 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/src/_Specs_.Azure.Core.Lro.Rpc.csproj @@ -0,0 +1,41 @@ + + + This is the _Specs_.Azure.Core.Lro.Rpc client library for developing .NET applications with rich experience. + SDK Code Generation _Specs_.Azure.Core.Lro.Rpc + 1.0.0-beta.1 + _Specs_.Azure.Core.Lro.Rpc + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json new file mode 100644 index 000000000000..39d7ce3e3c3b --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/rpc/tspCodeModel.json @@ -0,0 +1,1013 @@ +{ + "$id": "1", + "name": "_Specs_.Azure.Core.Lro.Rpc", + "apiVersions": [ + "2022-12-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.Versions", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "v2022_12_01_preview", + "value": "2022-12-01-preview", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The 2022-12-01-preview version.", + "decorators": [] + } + ], + "namespace": "_Specs_.Azure.Core.Lro.Rpc", + "doc": "The API version.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + }, + { + "$id": "6", + "kind": "enum", + "name": "OperationState", + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationState", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "8", + "kind": "enumvalue", + "name": "NotStarted", + "value": "NotStarted", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has not started.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation is in progress.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has completed successfully.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has failed.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has been canceled by the user.", + "decorators": [] + } + ], + "namespace": "Azure.Core.Foundations", + "doc": "Enum describing allowed operation states.", + "isFixed": false, + "isFlags": false, + "usage": "Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + } + ], + "constants": [ + { + "$id": "18", + "kind": "constant", + "name": "longRunningRpcContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "longRunningRpcContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "longRunningRpcContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "longRunningRpcContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "26", + "kind": "model", + "name": "GenerationOptions", + "namespace": "_Specs_.Azure.Core.Lro.Rpc", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.GenerationOptions", + "usage": "Input,Json", + "doc": "Options for the generation.", + "decorators": [], + "properties": [ + { + "$id": "27", + "kind": "property", + "name": "prompt", + "serializedName": "prompt", + "doc": "Prompt.", + "type": { + "$id": "28", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.GenerationOptions.prompt", + "serializationOptions": { + "$id": "29", + "json": { + "$id": "30", + "name": "prompt" + } + } + } + ] + }, + { + "$id": "31", + "kind": "model", + "name": "GenerationResult", + "namespace": "_Specs_.Azure.Core.Lro.Rpc", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.GenerationResult", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "Result of the generation.", + "decorators": [], + "properties": [ + { + "$id": "32", + "kind": "property", + "name": "data", + "serializedName": "data", + "doc": "The data.", + "type": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.GenerationResult.data", + "serializationOptions": { + "$id": "34", + "json": { + "$id": "35", + "name": "data" + } + } + } + ] + }, + { + "$id": "36", + "kind": "model", + "name": "ResourceOperationStatusGenerationResponseGenerationResultError", + "namespace": "Azure.Core", + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus", + "usage": "Json,LroInitial", + "doc": "Provides status details for long running operations.", + "decorators": [], + "properties": [ + { + "$id": "37", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique ID of the operation.", + "type": { + "$id": "38", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.id", + "serializationOptions": { + "$id": "39", + "json": { + "$id": "40", + "name": "id" + } + } + }, + { + "$id": "41", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation", + "type": { + "$ref": "6" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.status", + "serializationOptions": { + "$id": "42", + "json": { + "$id": "43", + "name": "status" + } + } + }, + { + "$id": "44", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error object that describes the error when status is \"Failed\".", + "type": { + "$id": "45", + "kind": "model", + "name": "Error", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", + "usage": "Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The error object.", + "decorators": [], + "properties": [ + { + "$id": "46", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "One of a server-defined set of error codes.", + "type": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.code", + "serializationOptions": { + "$id": "48", + "json": { + "$id": "49", + "name": "code" + } + } + }, + { + "$id": "50", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "A human-readable representation of the error.", + "type": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.message", + "serializationOptions": { + "$id": "52", + "json": { + "$id": "53", + "name": "message" + } + } + }, + { + "$id": "54", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the error.", + "type": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.target", + "serializationOptions": { + "$id": "56", + "json": { + "$id": "57", + "name": "target" + } + } + }, + { + "$id": "58", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "An array of details about specific errors that led to this reported error.", + "type": { + "$id": "59", + "kind": "array", + "name": "ArrayError", + "valueType": { + "$ref": "45" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.details", + "serializationOptions": { + "$id": "60", + "json": { + "$id": "61", + "name": "details" + } + } + }, + { + "$id": "62", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "An object containing more specific information than the current object about the error.", + "type": { + "$id": "63", + "kind": "model", + "name": "InnerError", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", + "usage": "Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.", + "decorators": [], + "properties": [ + { + "$id": "64", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "One of a server-defined set of error codes.", + "type": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.code", + "serializationOptions": { + "$id": "66", + "json": { + "$id": "67", + "name": "code" + } + } + }, + { + "$id": "68", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "Inner error.", + "type": { + "$ref": "63" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.innererror", + "serializationOptions": { + "$id": "69", + "json": { + "$id": "70", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.innererror", + "serializationOptions": { + "$id": "71", + "json": { + "$id": "72", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.error", + "serializationOptions": { + "$id": "73", + "json": { + "$id": "74", + "name": "error" + } + } + }, + { + "$id": "75", + "kind": "property", + "name": "result", + "serializedName": "result", + "doc": "The result of the operation.", + "type": { + "$ref": "31" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.result", + "serializationOptions": { + "$id": "76", + "json": { + "$id": "77", + "name": "result" + } + } + } + ] + }, + { + "$ref": "45" + }, + { + "$ref": "63" + }, + { + "$id": "78", + "kind": "model", + "name": "OperationStatusGenerationResultError", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus", + "usage": "LroPolling,LroFinalEnvelope", + "doc": "Provides status details for long running operations.", + "decorators": [], + "properties": [ + { + "$id": "79", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique ID of the operation.", + "type": { + "$id": "80", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.id", + "serializationOptions": { + "$id": "81", + "json": { + "$id": "82", + "name": "id" + } + } + }, + { + "$id": "83", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation", + "type": { + "$ref": "6" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.status", + "serializationOptions": { + "$id": "84", + "json": { + "$id": "85", + "name": "status" + } + } + }, + { + "$id": "86", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error object that describes the error when status is \"Failed\".", + "type": { + "$ref": "45" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.error", + "serializationOptions": { + "$id": "87", + "json": { + "$id": "88", + "name": "error" + } + } + }, + { + "$id": "89", + "kind": "property", + "name": "result", + "serializedName": "result", + "doc": "The result of the operation.", + "type": { + "$ref": "31" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.result", + "serializationOptions": { + "$id": "90", + "json": { + "$id": "91", + "name": "result" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "92", + "kind": "client", + "name": "RpcClient", + "namespace": "_Specs_.Azure.Core.Lro.Rpc", + "doc": "Illustrates bodies templated with Azure Core with long-running RPC operation", + "methods": [ + { + "$id": "93", + "kind": "lro", + "name": "longRunningRpc", + "accessibility": "public", + "apiVersions": [ + "2022-12-01-preview" + ], + "doc": "Generate data.", + "summary": "Generate data.", + "operation": { + "$id": "94", + "name": "longRunningRpc", + "resourceName": "Rpc", + "summary": "Generate data.", + "doc": "Generate data.", + "accessibility": "public", + "parameters": [ + { + "$id": "95", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "96", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "97", + "type": { + "$id": "98", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "99", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "18" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "100", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$ref": "20" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "101", + "name": "body", + "nameInRequest": "body", + "doc": "The body parameter.", + "type": { + "$ref": "26" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "102", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "36" + }, + "headers": [ + { + "$id": "103", + "name": "operationLocation", + "nameInResponse": "Operation-Location", + "doc": "The location for monitoring the operation state.", + "type": { + "$id": "104", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "105", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/azure/core/lro/rpc/generations:submit", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc", + "decorators": [] + }, + "parameters": [ + { + "$id": "106", + "name": "body", + "nameInRequest": "body", + "doc": "The body parameter.", + "type": { + "$ref": "26" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "107", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "22" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "108", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "24" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "109", + "type": { + "$ref": "31" + }, + "resultSegments": [ + "result" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc.longRunningRpc", + "lroMetadata": { + "$id": "110", + "finalStateVia": 3, + "finalResponse": { + "$id": "111", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "78" + } + }, + "resultPath": "result" + } + } + ], + "parameters": [ + { + "$id": "112", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "113", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "114", + "type": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Rpc", + "apiVersions": [ + "2022-12-01-preview" + ] + } + ] +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/Configuration.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/Configuration.json new file mode 100644 index 000000000000..34ec013de7ef --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/Configuration.json @@ -0,0 +1,10 @@ +{ + "package-name": "_Specs_.Azure.Core.Lro.Standard", + "license": { + "name": "MIT License", + "company": "Microsoft Corporation", + "link": "https://mit-license.org", + "header": "Copyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the MIT License.", + "description": "Copyright (c) Microsoft Corporation\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the “Software”), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE." + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/_Specs_.Azure.Core.Lro.Standard.sln b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/_Specs_.Azure.Core.Lro.Standard.sln new file mode 100644 index 000000000000..ead4253bf4aa --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/_Specs_.Azure.Core.Lro.Standard.sln @@ -0,0 +1,48 @@ +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}") = "_Specs_.Azure.Core.Lro.Standard", "src\_Specs_.Azure.Core.Lro.Standard.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +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 + {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/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.Serialization.cs new file mode 100644 index 000000000000..ef8cf489127f --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.Serialization.cs @@ -0,0 +1,43 @@ +// 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; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class ExportedUser : IJsonModel + { + internal ExportedUser() => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + ExportedUser IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual ExportedUser JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + ExportedUser IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual ExportedUser PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(ExportedUser exportedUser) => throw null; + + public static explicit operator ExportedUser(Response result) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.cs new file mode 100644 index 000000000000..ca2b91b23684 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/ExportedUser.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class ExportedUser + { + public string Name => throw null; + + public string ResourceUri => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.Serialization.cs new file mode 100644 index 000000000000..c6d6eeee7ce3 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.Serialization.cs @@ -0,0 +1,43 @@ +// 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; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class User : IJsonModel + { + internal User() => throw null; + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; + + User IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + protected virtual User JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; + + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; + + User IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; + + protected virtual User PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; + + /// The to serialize into . + public static implicit operator RequestContent(User user) => throw null; + + public static explicit operator User(Response result) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.cs new file mode 100644 index 000000000000..e3d7d72c3ce1 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/User.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class User + { + public User(string role) => throw null; + + public string Name => throw null; + + public string Role + { + get => throw null; + set => throw null; + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs new file mode 100644 index 000000000000..93b4cd39ec3e --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/Models/_Specs_AzureCoreLroStandardContext.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class _Specs_AzureCoreLroStandardContext : ModelReaderWriterContext + { + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs new file mode 100644 index 000000000000..580882f9ecd2 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class StandardClient + { + public StandardClient() : this(new Uri("http://localhost:3000"), new StandardClientOptions()) => throw null; + + public StandardClient(Uri endpoint, StandardClientOptions options) => throw null; + + public virtual HttpPipeline Pipeline => throw null; + + public virtual Operation CreateOrReplace(WaitUntil waitUntil, string name, RequestContent content, RequestContext context = null) => throw null; + + public virtual Task> CreateOrReplaceAsync(WaitUntil waitUntil, string name, RequestContent content, RequestContext context = null) => throw null; + + public virtual Operation CreateOrReplace(WaitUntil waitUntil, string name, User resource, CancellationToken cancellationToken = default) => throw null; + + public virtual Task> CreateOrReplaceAsync(WaitUntil waitUntil, string name, User resource, CancellationToken cancellationToken = default) => throw null; + + public virtual Operation Delete(WaitUntil waitUntil, string name, RequestContext context) => throw null; + + public virtual Task DeleteAsync(WaitUntil waitUntil, string name, RequestContext context) => throw null; + + public virtual Operation Delete(WaitUntil waitUntil, string name, CancellationToken cancellationToken = default) => throw null; + + public virtual Task DeleteAsync(WaitUntil waitUntil, string name, CancellationToken cancellationToken = default) => throw null; + + public virtual Operation Export(WaitUntil waitUntil, string name, string format, RequestContext context) => throw null; + + public virtual Task> ExportAsync(WaitUntil waitUntil, string name, string format, RequestContext context) => throw null; + + public virtual Operation Export(WaitUntil waitUntil, string name, string format, CancellationToken cancellationToken = default) => throw null; + + public virtual Task> ExportAsync(WaitUntil waitUntil, string name, string format, CancellationToken cancellationToken = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs new file mode 100644 index 000000000000..683db1815f22 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/StandardClientOptions.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public partial class StandardClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2022_12_01_Preview; + + public StandardClientOptions(ServiceVersion version = LatestVersion) => throw null; + + public enum ServiceVersion + { + /// The 2022-12-01-preview version. + V2022_12_01_Preview = 1 + } + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs new file mode 100644 index 000000000000..f09375539dab --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/Generated/_Specs_AzureCoreLroStandardModelFactory.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure; +using Azure.Core; + +namespace _Specs_.Azure.Core.Lro.Standard +{ + public static partial class _Specs_AzureCoreLroStandardModelFactory + { + public static User User(string name = default, string role = default) => throw null; + + public static ExportedUser ExportedUser(string name = default, string resourceUri = default) => throw null; + } +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj new file mode 100644 index 000000000000..d0a9740315d4 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/src/_Specs_.Azure.Core.Lro.Standard.csproj @@ -0,0 +1,41 @@ + + + This is the _Specs_.Azure.Core.Lro.Standard client library for developing .NET applications with rich experience. + SDK Code Generation _Specs_.Azure.Core.Lro.Standard + 1.0.0-beta.1 + _Specs_.Azure.Core.Lro.Standard + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json new file mode 100644 index 000000000000..12122d556e60 --- /dev/null +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/core/lro/standard/tspCodeModel.json @@ -0,0 +1,1735 @@ +{ + "$id": "1", + "name": "_Specs_.Azure.Core.Lro.Standard", + "apiVersions": [ + "2022-12-01-preview" + ], + "enums": [ + { + "$id": "2", + "kind": "enum", + "name": "Versions", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.Versions", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "4", + "kind": "enumvalue", + "name": "v2022_12_01_preview", + "value": "2022-12-01-preview", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "doc": "The 2022-12-01-preview version.", + "decorators": [] + } + ], + "namespace": "_Specs_.Azure.Core.Lro.Standard", + "doc": "The API version.", + "isFixed": true, + "isFlags": false, + "usage": "ApiVersionEnum", + "decorators": [] + }, + { + "$id": "6", + "kind": "enum", + "name": "OperationState", + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationState", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "8", + "kind": "enumvalue", + "name": "NotStarted", + "value": "NotStarted", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has not started.", + "decorators": [] + }, + { + "$id": "10", + "kind": "enumvalue", + "name": "Running", + "value": "Running", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation is in progress.", + "decorators": [] + }, + { + "$id": "12", + "kind": "enumvalue", + "name": "Succeeded", + "value": "Succeeded", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has completed successfully.", + "decorators": [] + }, + { + "$id": "14", + "kind": "enumvalue", + "name": "Failed", + "value": "Failed", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has failed.", + "decorators": [] + }, + { + "$id": "16", + "kind": "enumvalue", + "name": "Canceled", + "value": "Canceled", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "6" + }, + "doc": "The operation has been canceled by the user.", + "decorators": [] + } + ], + "namespace": "Azure.Core.Foundations", + "doc": "Enum describing allowed operation states.", + "isFixed": false, + "isFlags": false, + "usage": "Json,LroInitial,LroPolling,LroFinalEnvelope", + "decorators": [] + } + ], + "constants": [ + { + "$id": "18", + "kind": "constant", + "name": "createOrReplaceContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "createOrReplaceContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "createOrReplaceContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "createOrReplaceContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "deleteContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "deleteContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "exportContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "exportContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "34", + "kind": "model", + "name": "User", + "namespace": "_Specs_.Azure.Core.Lro.Standard", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.User", + "usage": "Input,Output,Json,LroInitial,LroFinalEnvelope", + "doc": "Details about a user.", + "decorators": [], + "properties": [ + { + "$id": "35", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of user.", + "type": { + "$id": "36", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": true, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.User.name", + "serializationOptions": { + "$id": "37", + "json": { + "$id": "38", + "name": "name" + } + } + }, + { + "$id": "39", + "kind": "property", + "name": "role", + "serializedName": "role", + "doc": "The role of user", + "type": { + "$id": "40", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.User.role", + "serializationOptions": { + "$id": "41", + "json": { + "$id": "42", + "name": "role" + } + } + } + ] + }, + { + "$id": "43", + "kind": "model", + "name": "ExportedUser", + "namespace": "_Specs_.Azure.Core.Lro.Standard", + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.ExportedUser", + "usage": "Output,Json,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The exported user data.", + "decorators": [], + "properties": [ + { + "$id": "44", + "kind": "property", + "name": "name", + "serializedName": "name", + "doc": "The name of user.", + "type": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.ExportedUser.name", + "serializationOptions": { + "$id": "46", + "json": { + "$id": "47", + "name": "name" + } + } + }, + { + "$id": "48", + "kind": "property", + "name": "resourceUri", + "serializedName": "resourceUri", + "doc": "The exported URI.", + "type": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.ExportedUser.resourceUri", + "serializationOptions": { + "$id": "50", + "json": { + "$id": "51", + "name": "resourceUri" + } + } + } + ] + }, + { + "$id": "52", + "kind": "model", + "name": "OperationStatusError", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus", + "usage": "Json,LroInitial,LroPolling", + "doc": "Provides status details for long running operations.", + "decorators": [], + "properties": [ + { + "$id": "53", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique ID of the operation.", + "type": { + "$id": "54", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.id", + "serializationOptions": { + "$id": "55", + "json": { + "$id": "56", + "name": "id" + } + } + }, + { + "$id": "57", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation", + "type": { + "$ref": "6" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.status", + "serializationOptions": { + "$id": "58", + "json": { + "$id": "59", + "name": "status" + } + } + }, + { + "$id": "60", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error object that describes the error when status is \"Failed\".", + "type": { + "$id": "61", + "kind": "model", + "name": "Error", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error", + "usage": "Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "The error object.", + "decorators": [], + "properties": [ + { + "$id": "62", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "One of a server-defined set of error codes.", + "type": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.code", + "serializationOptions": { + "$id": "64", + "json": { + "$id": "65", + "name": "code" + } + } + }, + { + "$id": "66", + "kind": "property", + "name": "message", + "serializedName": "message", + "doc": "A human-readable representation of the error.", + "type": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.message", + "serializationOptions": { + "$id": "68", + "json": { + "$id": "69", + "name": "message" + } + } + }, + { + "$id": "70", + "kind": "property", + "name": "target", + "serializedName": "target", + "doc": "The target of the error.", + "type": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.target", + "serializationOptions": { + "$id": "72", + "json": { + "$id": "73", + "name": "target" + } + } + }, + { + "$id": "74", + "kind": "property", + "name": "details", + "serializedName": "details", + "doc": "An array of details about specific errors that led to this reported error.", + "type": { + "$id": "75", + "kind": "array", + "name": "ArrayError", + "valueType": { + "$ref": "61" + }, + "crossLanguageDefinitionId": "TypeSpec.Array", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.details", + "serializationOptions": { + "$id": "76", + "json": { + "$id": "77", + "name": "details" + } + } + }, + { + "$id": "78", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "An object containing more specific information than the current object about the error.", + "type": { + "$id": "79", + "kind": "model", + "name": "InnerError", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError", + "usage": "Json,Exception,LroInitial,LroPolling,LroFinalEnvelope", + "doc": "An object containing more specific information about the error. As per Microsoft One API guidelines - https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors.", + "decorators": [], + "properties": [ + { + "$id": "80", + "kind": "property", + "name": "code", + "serializedName": "code", + "doc": "One of a server-defined set of error codes.", + "type": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.code", + "serializationOptions": { + "$id": "82", + "json": { + "$id": "83", + "name": "code" + } + } + }, + { + "$id": "84", + "kind": "property", + "name": "innererror", + "serializedName": "innererror", + "doc": "Inner error.", + "type": { + "$ref": "79" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.InnerError.innererror", + "serializationOptions": { + "$id": "85", + "json": { + "$id": "86", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.Error.innererror", + "serializationOptions": { + "$id": "87", + "json": { + "$id": "88", + "name": "innererror" + } + } + } + ] + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.error", + "serializationOptions": { + "$id": "89", + "json": { + "$id": "90", + "name": "error" + } + } + } + ] + }, + { + "$ref": "61" + }, + { + "$ref": "79" + }, + { + "$id": "91", + "kind": "model", + "name": "ResourceOperationStatusUserExportedUserError", + "namespace": "Azure.Core", + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus", + "usage": "Json,LroInitial", + "doc": "Provides status details for long running operations.", + "decorators": [], + "properties": [ + { + "$id": "92", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique ID of the operation.", + "type": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.id", + "serializationOptions": { + "$id": "94", + "json": { + "$id": "95", + "name": "id" + } + } + }, + { + "$id": "96", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation", + "type": { + "$ref": "6" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.status", + "serializationOptions": { + "$id": "97", + "json": { + "$id": "98", + "name": "status" + } + } + }, + { + "$id": "99", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error object that describes the error when status is \"Failed\".", + "type": { + "$ref": "61" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.error", + "serializationOptions": { + "$id": "100", + "json": { + "$id": "101", + "name": "error" + } + } + }, + { + "$id": "102", + "kind": "property", + "name": "result", + "serializedName": "result", + "doc": "The result of the operation.", + "type": { + "$ref": "43" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.ResourceOperationStatus.result", + "serializationOptions": { + "$id": "103", + "json": { + "$id": "104", + "name": "result" + } + } + } + ] + }, + { + "$id": "105", + "kind": "model", + "name": "OperationStatusExportedUserError", + "namespace": "Azure.Core.Foundations", + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus", + "usage": "LroPolling,LroFinalEnvelope", + "doc": "Provides status details for long running operations.", + "decorators": [], + "properties": [ + { + "$id": "106", + "kind": "property", + "name": "id", + "serializedName": "id", + "doc": "The unique ID of the operation.", + "type": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.id", + "serializationOptions": { + "$id": "108", + "json": { + "$id": "109", + "name": "id" + } + } + }, + { + "$id": "110", + "kind": "property", + "name": "status", + "serializedName": "status", + "doc": "The status of the operation", + "type": { + "$ref": "6" + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.status", + "serializationOptions": { + "$id": "111", + "json": { + "$id": "112", + "name": "status" + } + } + }, + { + "$id": "113", + "kind": "property", + "name": "error", + "serializedName": "error", + "doc": "Error object that describes the error when status is \"Failed\".", + "type": { + "$ref": "61" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.error", + "serializationOptions": { + "$id": "114", + "json": { + "$id": "115", + "name": "error" + } + } + }, + { + "$id": "116", + "kind": "property", + "name": "result", + "serializedName": "result", + "doc": "The result of the operation.", + "type": { + "$ref": "43" + }, + "optional": true, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Core.Foundations.OperationStatus.result", + "serializationOptions": { + "$id": "117", + "json": { + "$id": "118", + "name": "result" + } + } + } + ] + } + ], + "clients": [ + { + "$id": "119", + "kind": "client", + "name": "StandardClient", + "namespace": "_Specs_.Azure.Core.Lro.Standard", + "doc": "Illustrates bodies templated with Azure Core with long-running operation", + "methods": [ + { + "$id": "120", + "kind": "lro", + "name": "createOrReplace", + "accessibility": "public", + "apiVersions": [ + "2022-12-01-preview" + ], + "doc": "Creates or replaces a User", + "summary": "Adds a user or replaces a user's fields.", + "operation": { + "$id": "121", + "name": "createOrReplace", + "resourceName": "User", + "summary": "Adds a user or replaces a user's fields.", + "doc": "Creates or replaces a User", + "accessibility": "public", + "parameters": [ + { + "$id": "122", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "124", + "type": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "126", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "128", + "name": "contentType", + "nameInRequest": "Content-Type", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "18" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": true, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "129", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$ref": "20" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "130", + "name": "resource", + "nameInRequest": "resource", + "doc": "The resource instance.", + "type": { + "$ref": "34" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "131", + "statusCodes": [ + 201 + ], + "bodyType": { + "$ref": "34" + }, + "headers": [ + { + "$id": "132", + "name": "operationLocation", + "nameInResponse": "Operation-Location", + "doc": "The location for monitoring the operation state.", + "type": { + "$id": "133", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "134", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + }, + { + "$id": "135", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "34" + }, + "headers": [ + { + "$id": "136", + "name": "operationLocation", + "nameInResponse": "Operation-Location", + "doc": "The location for monitoring the operation state.", + "type": { + "$id": "137", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "138", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "PUT", + "uri": "{endpoint}", + "path": "/azure/core/lro/standard/users/{name}", + "requestMediaTypes": [ + "application/json" + ], + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", + "decorators": [] + }, + "parameters": [ + { + "$id": "139", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "141", + "name": "resource", + "nameInRequest": "resource", + "doc": "The resource instance.", + "type": { + "$ref": "34" + }, + "location": "Body", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "142", + "name": "contentType", + "nameInRequest": "contentType", + "doc": "Body parameter's content type. Known values are application/json", + "type": { + "$ref": "22" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "143", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "24" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "144", + "type": { + "$ref": "34" + } + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.createOrReplace", + "lroMetadata": { + "$id": "145", + "finalStateVia": 2, + "finalResponse": { + "$id": "146", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "34" + } + } + } + }, + { + "$id": "147", + "kind": "lro", + "name": "delete", + "accessibility": "public", + "apiVersions": [ + "2022-12-01-preview" + ], + "doc": "Deletes a User", + "summary": "Deletes a user.", + "operation": { + "$id": "148", + "name": "delete", + "resourceName": "User", + "summary": "Deletes a user.", + "doc": "Deletes a User", + "accessibility": "public", + "parameters": [ + { + "$id": "149", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "150", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "151", + "type": { + "$id": "152", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "153", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "154", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "155", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$ref": "26" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "156", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "52" + }, + "headers": [ + { + "$id": "157", + "name": "operationLocation", + "nameInResponse": "Operation-Location", + "doc": "The location for monitoring the operation state.", + "type": { + "$id": "158", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "159", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "DELETE", + "uri": "{endpoint}", + "path": "/azure/core/lro/standard/users/{name}", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.delete", + "decorators": [] + }, + "parameters": [ + { + "$id": "160", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "161", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "162", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "28" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "163" + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.delete", + "lroMetadata": { + "$id": "164", + "finalStateVia": 3, + "finalResponse": { + "$id": "165", + "statusCodes": [ + 204 + ] + } + } + }, + { + "$id": "166", + "kind": "lro", + "name": "export", + "accessibility": "public", + "apiVersions": [ + "2022-12-01-preview" + ], + "doc": "Exports a User", + "summary": "Exports a user.", + "operation": { + "$id": "167", + "name": "export", + "resourceName": "Standard", + "summary": "Exports a user.", + "doc": "Exports a User", + "accessibility": "public", + "parameters": [ + { + "$id": "168", + "name": "apiVersion", + "nameInRequest": "api-version", + "doc": "The API version to use for this operation.", + "type": { + "$id": "169", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": true, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Client", + "defaultValue": { + "$id": "170", + "type": { + "$id": "171", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "2022-12-01-preview" + }, + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "172", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "173", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "174", + "name": "format", + "nameInRequest": "format", + "doc": "The format of the data.", + "type": { + "$id": "175", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "176", + "name": "accept", + "nameInRequest": "Accept", + "type": { + "$ref": "30" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "responses": [ + { + "$id": "177", + "statusCodes": [ + 202 + ], + "bodyType": { + "$ref": "91" + }, + "headers": [ + { + "$id": "178", + "name": "operationLocation", + "nameInResponse": "Operation-Location", + "doc": "The location for monitoring the operation state.", + "type": { + "$id": "179", + "kind": "url", + "name": "ResourceLocation", + "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", + "baseType": { + "$id": "180", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "decorators": [] + } + } + ], + "isErrorResponse": false, + "contentTypes": [ + "application/json" + ] + } + ], + "httpMethod": "POST", + "uri": "{endpoint}", + "path": "/azure/core/lro/standard/users/{name}:export", + "bufferResponse": true, + "generateProtocolMethod": true, + "generateConvenienceMethod": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.export", + "decorators": [] + }, + "parameters": [ + { + "$id": "181", + "name": "name", + "nameInRequest": "name", + "doc": "The name of user.", + "type": { + "$id": "182", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Path", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "183", + "name": "format", + "nameInRequest": "format", + "doc": "The format of the data.", + "type": { + "$id": "184", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "location": "Query", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Method", + "decorators": [], + "skipUrlEncoding": false + }, + { + "$id": "185", + "name": "accept", + "nameInRequest": "accept", + "type": { + "$ref": "32" + }, + "location": "Header", + "isApiVersion": false, + "isContentType": false, + "isEndpoint": false, + "explode": false, + "isRequired": true, + "kind": "Constant", + "decorators": [], + "skipUrlEncoding": false + } + ], + "response": { + "$id": "186", + "type": { + "$ref": "43" + }, + "resultSegments": [ + "result" + ] + }, + "isOverride": false, + "generateConvenient": true, + "generateProtocol": true, + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard.export", + "lroMetadata": { + "$id": "187", + "finalStateVia": 3, + "finalResponse": { + "$id": "188", + "statusCodes": [ + 200 + ], + "bodyType": { + "$ref": "105" + } + }, + "resultPath": "result" + } + } + ], + "parameters": [ + { + "$id": "189", + "name": "endpoint", + "nameInRequest": "endpoint", + "doc": "Service host", + "type": { + "$id": "190", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url" + }, + "location": "Uri", + "isApiVersion": false, + "isContentType": false, + "isRequired": true, + "isEndpoint": true, + "skipUrlEncoding": false, + "explode": false, + "kind": "Client", + "defaultValue": { + "$id": "191", + "type": { + "$id": "192", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string" + }, + "value": "http://localhost:3000" + } + } + ], + "decorators": [], + "crossLanguageDefinitionId": "_Specs_.Azure.Core.Lro.Standard", + "apiVersions": [ + "2022-12-01-preview" + ] + } + ] +} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/src/Azure.SpecialHeaders.XmsClientRequestId.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/src/Azure.SpecialHeaders.XmsClientRequestId.csproj index f782016d5386..ff64531d0c98 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/src/Azure.SpecialHeaders.XmsClientRequestId.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/src/Azure.SpecialHeaders.XmsClientRequestId.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json index c8ccc8168a36..846a00812cc1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/azure/special-headers/client-request-id/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Azure.SpecialHeaders.XmsClientRequestId", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.csproj index 316747881622..3e154927e676 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/src/Client.Structure.Service.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json index 1eefc8728f45..b2130556ebf6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/client/structure/default/tspCodeModel.json @@ -109,6 +109,7 @@ "decorators": [] } ], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj index f0b4bf9705f5..dce9844f416d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/src/Encode.Bytes.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json index 3a4072ec5b46..fddcdbf51879 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/bytes/tspCodeModel.json @@ -3,9 +3,427 @@ "name": "Encode.Bytes", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "defaultContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "defaultContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "base64ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "base64ContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "base64urlContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "base64urlContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "base64urlArrayContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "base64urlArrayContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "defaultContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "OctetStreamRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "OctetStreamRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "CustomContentTypeRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "CustomContentTypeRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "Base64RequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "Base64RequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "Base64RequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "Base64RequestContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "defaultContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "octetStreamContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "OctetStreamRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/octet-stream", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "customContentTypeContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "CustomContentTypeRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "base64ContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "Base64RequestContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "base64urlContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "Base64RequestContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "54", "kind": "model", "name": "DefaultBytesProperty", "namespace": "Encode.Bytes", @@ -14,12 +432,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "55", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "4", + "$id": "56", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -33,9 +451,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.DefaultBytesProperty.value", "serializationOptions": { - "$id": "5", + "$id": "57", "json": { - "$id": "6", + "$id": "58", "name": "value" } } @@ -43,7 +461,7 @@ ] }, { - "$id": "7", + "$id": "59", "kind": "model", "name": "Base64BytesProperty", "namespace": "Encode.Bytes", @@ -52,12 +470,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "60", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "9", + "$id": "61", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -71,9 +489,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Base64BytesProperty.value", "serializationOptions": { - "$id": "10", + "$id": "62", "json": { - "$id": "11", + "$id": "63", "name": "value" } } @@ -81,7 +499,7 @@ ] }, { - "$id": "12", + "$id": "64", "kind": "model", "name": "Base64urlBytesProperty", "namespace": "Encode.Bytes", @@ -90,12 +508,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "65", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "14", + "$id": "66", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -109,9 +527,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Base64urlBytesProperty.value", "serializationOptions": { - "$id": "15", + "$id": "67", "json": { - "$id": "16", + "$id": "68", "name": "value" } } @@ -119,7 +537,7 @@ ] }, { - "$id": "17", + "$id": "69", "kind": "model", "name": "Base64urlArrayBytesProperty", "namespace": "Encode.Bytes", @@ -128,22 +546,22 @@ "decorators": [], "properties": [ { - "$id": "18", + "$id": "70", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "19", + "$id": "71", "kind": "array", "name": "Array", "valueType": { - "$id": "20", + "$id": "72", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "21", + "$id": "73", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -162,9 +580,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Bytes.Base64urlArrayBytesProperty.value", "serializationOptions": { - "$id": "22", + "$id": "74", "json": { - "$id": "23", + "$id": "75", "name": "value" } } @@ -174,7 +592,7 @@ ], "clients": [ { - "$id": "24", + "$id": "76", "kind": "client", "name": "BytesClient", "namespace": "Encode.Bytes", @@ -182,12 +600,12 @@ "methods": [], "parameters": [ { - "$id": "25", + "$id": "77", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "26", + "$id": "78", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -201,9 +619,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "27", + "$id": "79", "type": { - "$id": "28", + "$id": "80", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -217,29 +635,29 @@ "apiVersions": [], "children": [ { - "$id": "29", + "$id": "81", "kind": "client", "name": "Query", "namespace": "Encode.Bytes.Query", "methods": [ { - "$id": "30", + "$id": "82", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "31", + "$id": "83", "name": "default", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "32", + "$id": "84", "name": "value", "nameInRequest": "value", "type": { - "$id": "33", + "$id": "85", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -259,7 +677,7 @@ ], "responses": [ { - "$id": "34", + "$id": "86", "statusCodes": [ 204 ], @@ -278,11 +696,11 @@ }, "parameters": [ { - "$id": "35", + "$id": "87", "name": "value", "nameInRequest": "value", "type": { - "$id": "36", + "$id": "88", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -301,7 +719,7 @@ } ], "response": { - "$id": "37" + "$id": "89" }, "isOverride": false, "generateConvenient": true, @@ -309,23 +727,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.Query.default" }, { - "$id": "38", + "$id": "90", "kind": "basic", "name": "base64", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "39", + "$id": "91", "name": "base64", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "40", + "$id": "92", "name": "value", "nameInRequest": "value", "type": { - "$id": "41", + "$id": "93", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -345,7 +763,7 @@ ], "responses": [ { - "$id": "42", + "$id": "94", "statusCodes": [ 204 ], @@ -364,11 +782,11 @@ }, "parameters": [ { - "$id": "43", + "$id": "95", "name": "value", "nameInRequest": "value", "type": { - "$id": "44", + "$id": "96", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -387,7 +805,7 @@ } ], "response": { - "$id": "45" + "$id": "97" }, "isOverride": false, "generateConvenient": true, @@ -395,23 +813,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.Query.base64" }, { - "$id": "46", + "$id": "98", "kind": "basic", "name": "base64url", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "47", + "$id": "99", "name": "base64url", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "48", + "$id": "100", "name": "value", "nameInRequest": "value", "type": { - "$id": "49", + "$id": "101", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -431,7 +849,7 @@ ], "responses": [ { - "$id": "50", + "$id": "102", "statusCodes": [ 204 ], @@ -450,11 +868,11 @@ }, "parameters": [ { - "$id": "51", + "$id": "103", "name": "value", "nameInRequest": "value", "type": { - "$id": "52", + "$id": "104", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -473,7 +891,7 @@ } ], "response": { - "$id": "53" + "$id": "105" }, "isOverride": false, "generateConvenient": true, @@ -481,33 +899,33 @@ "crossLanguageDefinitionId": "Encode.Bytes.Query.base64url" }, { - "$id": "54", + "$id": "106", "kind": "basic", "name": "base64urlArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "55", + "$id": "107", "name": "base64urlArray", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "56", + "$id": "108", "name": "value", "nameInRequest": "value", "type": { - "$id": "57", + "$id": "109", "kind": "array", "name": "Array", "valueType": { - "$id": "58", + "$id": "110", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "59", + "$id": "111", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -533,7 +951,7 @@ ], "responses": [ { - "$id": "60", + "$id": "112", "statusCodes": [ 204 ], @@ -552,21 +970,21 @@ }, "parameters": [ { - "$id": "61", + "$id": "113", "name": "value", "nameInRequest": "value", "type": { - "$id": "62", + "$id": "114", "kind": "array", "name": "Array", "valueType": { - "$id": "63", + "$id": "115", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "64", + "$id": "116", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -590,7 +1008,7 @@ } ], "response": { - "$id": "65" + "$id": "117" }, "isOverride": false, "generateConvenient": true, @@ -600,12 +1018,12 @@ ], "parameters": [ { - "$id": "66", + "$id": "118", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "67", + "$id": "119", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -619,9 +1037,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "68", + "$id": "120", "type": { - "$id": "69", + "$id": "121", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -634,44 +1052,34 @@ "crossLanguageDefinitionId": "Encode.Bytes.Query", "apiVersions": [], "parent": { - "$ref": "24" + "$ref": "76" } }, { - "$id": "70", + "$id": "122", "kind": "client", "name": "Property", "namespace": "Encode.Bytes.Property", "methods": [ { - "$id": "71", + "$id": "123", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "72", + "$id": "124", "name": "default", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "73", + "$id": "125", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "74", - "kind": "constant", - "valueType": { - "$id": "75", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -684,21 +1092,11 @@ "skipUrlEncoding": false }, { - "$id": "76", + "$id": "126", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "77", - "kind": "constant", - "valueType": { - "$id": "78", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -711,11 +1109,11 @@ "skipUrlEncoding": false }, { - "$id": "79", + "$id": "127", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -730,12 +1128,12 @@ ], "responses": [ { - "$id": "80", + "$id": "128", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "54" }, "headers": [], "isErrorResponse": false, @@ -758,11 +1156,11 @@ }, "parameters": [ { - "$id": "81", + "$id": "129", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -775,12 +1173,12 @@ "skipUrlEncoding": false }, { - "$id": "82", + "$id": "130", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "74" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -793,11 +1191,11 @@ "skipUrlEncoding": false }, { - "$id": "83", + "$id": "131", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "77" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -811,9 +1209,9 @@ } ], "response": { - "$id": "84", + "$id": "132", "type": { - "$ref": "2" + "$ref": "54" } }, "isOverride": false, @@ -822,34 +1220,24 @@ "crossLanguageDefinitionId": "Encode.Bytes.Property.default" }, { - "$id": "85", + "$id": "133", "kind": "basic", "name": "base64", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "86", + "$id": "134", "name": "base64", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "87", + "$id": "135", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "88", - "kind": "constant", - "valueType": { - "$id": "89", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -862,21 +1250,11 @@ "skipUrlEncoding": false }, { - "$id": "90", + "$id": "136", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "91", - "kind": "constant", - "valueType": { - "$id": "92", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -889,11 +1267,11 @@ "skipUrlEncoding": false }, { - "$id": "93", + "$id": "137", "name": "body", "nameInRequest": "body", "type": { - "$ref": "7" + "$ref": "59" }, "location": "Body", "isApiVersion": false, @@ -908,12 +1286,12 @@ ], "responses": [ { - "$id": "94", + "$id": "138", "statusCodes": [ 200 ], "bodyType": { - "$ref": "7" + "$ref": "59" }, "headers": [], "isErrorResponse": false, @@ -936,11 +1314,11 @@ }, "parameters": [ { - "$id": "95", + "$id": "139", "name": "body", "nameInRequest": "body", "type": { - "$ref": "7" + "$ref": "59" }, "location": "Body", "isApiVersion": false, @@ -953,12 +1331,12 @@ "skipUrlEncoding": false }, { - "$id": "96", + "$id": "140", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "88" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -971,11 +1349,11 @@ "skipUrlEncoding": false }, { - "$id": "97", + "$id": "141", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "91" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -989,9 +1367,9 @@ } ], "response": { - "$id": "98", + "$id": "142", "type": { - "$ref": "7" + "$ref": "59" } }, "isOverride": false, @@ -1000,34 +1378,24 @@ "crossLanguageDefinitionId": "Encode.Bytes.Property.base64" }, { - "$id": "99", + "$id": "143", "kind": "basic", "name": "base64url", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "100", + "$id": "144", "name": "base64url", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "101", + "$id": "145", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "102", - "kind": "constant", - "valueType": { - "$id": "103", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1040,21 +1408,11 @@ "skipUrlEncoding": false }, { - "$id": "104", + "$id": "146", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "105", - "kind": "constant", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1067,11 +1425,11 @@ "skipUrlEncoding": false }, { - "$id": "107", + "$id": "147", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "64" }, "location": "Body", "isApiVersion": false, @@ -1086,12 +1444,12 @@ ], "responses": [ { - "$id": "108", + "$id": "148", "statusCodes": [ 200 ], "bodyType": { - "$ref": "12" + "$ref": "64" }, "headers": [], "isErrorResponse": false, @@ -1114,11 +1472,11 @@ }, "parameters": [ { - "$id": "109", + "$id": "149", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "64" }, "location": "Body", "isApiVersion": false, @@ -1131,12 +1489,12 @@ "skipUrlEncoding": false }, { - "$id": "110", + "$id": "150", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "102" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1149,11 +1507,11 @@ "skipUrlEncoding": false }, { - "$id": "111", + "$id": "151", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "105" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1167,9 +1525,9 @@ } ], "response": { - "$id": "112", + "$id": "152", "type": { - "$ref": "12" + "$ref": "64" } }, "isOverride": false, @@ -1178,34 +1536,24 @@ "crossLanguageDefinitionId": "Encode.Bytes.Property.base64url" }, { - "$id": "113", + "$id": "153", "kind": "basic", "name": "base64urlArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "114", + "$id": "154", "name": "base64urlArray", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "115", + "$id": "155", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "116", - "kind": "constant", - "valueType": { - "$id": "117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1218,21 +1566,11 @@ "skipUrlEncoding": false }, { - "$id": "118", + "$id": "156", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "119", - "kind": "constant", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1245,11 +1583,11 @@ "skipUrlEncoding": false }, { - "$id": "121", + "$id": "157", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "69" }, "location": "Body", "isApiVersion": false, @@ -1264,12 +1602,12 @@ ], "responses": [ { - "$id": "122", + "$id": "158", "statusCodes": [ 200 ], "bodyType": { - "$ref": "17" + "$ref": "69" }, "headers": [], "isErrorResponse": false, @@ -1292,11 +1630,11 @@ }, "parameters": [ { - "$id": "123", + "$id": "159", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "69" }, "location": "Body", "isApiVersion": false, @@ -1309,12 +1647,12 @@ "skipUrlEncoding": false }, { - "$id": "124", + "$id": "160", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "116" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1327,11 +1665,11 @@ "skipUrlEncoding": false }, { - "$id": "125", + "$id": "161", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "119" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1345,9 +1683,9 @@ } ], "response": { - "$id": "126", + "$id": "162", "type": { - "$ref": "17" + "$ref": "69" } }, "isOverride": false, @@ -1358,12 +1696,12 @@ ], "parameters": [ { - "$id": "127", + "$id": "163", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "128", + "$id": "164", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1377,9 +1715,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "129", + "$id": "165", "type": { - "$id": "130", + "$id": "166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1392,33 +1730,33 @@ "crossLanguageDefinitionId": "Encode.Bytes.Property", "apiVersions": [], "parent": { - "$ref": "24" + "$ref": "76" } }, { - "$id": "131", + "$id": "167", "kind": "client", "name": "Header", "namespace": "Encode.Bytes.Header", "methods": [ { - "$id": "132", + "$id": "168", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "133", + "$id": "169", "name": "default", "resourceName": "Header", "accessibility": "public", "parameters": [ { - "$id": "134", + "$id": "170", "name": "value", "nameInRequest": "value", "type": { - "$id": "135", + "$id": "171", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1438,7 +1776,7 @@ ], "responses": [ { - "$id": "136", + "$id": "172", "statusCodes": [ 204 ], @@ -1457,11 +1795,11 @@ }, "parameters": [ { - "$id": "137", + "$id": "173", "name": "value", "nameInRequest": "value", "type": { - "$id": "138", + "$id": "174", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1480,7 +1818,7 @@ } ], "response": { - "$id": "139" + "$id": "175" }, "isOverride": false, "generateConvenient": true, @@ -1488,23 +1826,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.Header.default" }, { - "$id": "140", + "$id": "176", "kind": "basic", "name": "base64", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "141", + "$id": "177", "name": "base64", "resourceName": "Header", "accessibility": "public", "parameters": [ { - "$id": "142", + "$id": "178", "name": "value", "nameInRequest": "value", "type": { - "$id": "143", + "$id": "179", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1524,7 +1862,7 @@ ], "responses": [ { - "$id": "144", + "$id": "180", "statusCodes": [ 204 ], @@ -1543,11 +1881,11 @@ }, "parameters": [ { - "$id": "145", + "$id": "181", "name": "value", "nameInRequest": "value", "type": { - "$id": "146", + "$id": "182", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1566,7 +1904,7 @@ } ], "response": { - "$id": "147" + "$id": "183" }, "isOverride": false, "generateConvenient": true, @@ -1574,23 +1912,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.Header.base64" }, { - "$id": "148", + "$id": "184", "kind": "basic", "name": "base64url", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "149", + "$id": "185", "name": "base64url", "resourceName": "Header", "accessibility": "public", "parameters": [ { - "$id": "150", + "$id": "186", "name": "value", "nameInRequest": "value", "type": { - "$id": "151", + "$id": "187", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -1610,7 +1948,7 @@ ], "responses": [ { - "$id": "152", + "$id": "188", "statusCodes": [ 204 ], @@ -1629,11 +1967,11 @@ }, "parameters": [ { - "$id": "153", + "$id": "189", "name": "value", "nameInRequest": "value", "type": { - "$id": "154", + "$id": "190", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -1652,7 +1990,7 @@ } ], "response": { - "$id": "155" + "$id": "191" }, "isOverride": false, "generateConvenient": true, @@ -1660,33 +1998,33 @@ "crossLanguageDefinitionId": "Encode.Bytes.Header.base64url" }, { - "$id": "156", + "$id": "192", "kind": "basic", "name": "base64urlArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "157", + "$id": "193", "name": "base64urlArray", "resourceName": "Header", "accessibility": "public", "parameters": [ { - "$id": "158", + "$id": "194", "name": "value", "nameInRequest": "value", "type": { - "$id": "159", + "$id": "195", "kind": "array", "name": "Array", "valueType": { - "$id": "160", + "$id": "196", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "161", + "$id": "197", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1712,7 +2050,7 @@ ], "responses": [ { - "$id": "162", + "$id": "198", "statusCodes": [ 204 ], @@ -1731,21 +2069,21 @@ }, "parameters": [ { - "$id": "163", + "$id": "199", "name": "value", "nameInRequest": "value", "type": { - "$id": "164", + "$id": "200", "kind": "array", "name": "Array", "valueType": { - "$id": "165", + "$id": "201", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "166", + "$id": "202", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -1769,7 +2107,7 @@ } ], "response": { - "$id": "167" + "$id": "203" }, "isOverride": false, "generateConvenient": true, @@ -1779,12 +2117,12 @@ ], "parameters": [ { - "$id": "168", + "$id": "204", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "169", + "$id": "205", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1798,9 +2136,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "170", + "$id": "206", "type": { - "$id": "171", + "$id": "207", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1813,44 +2151,34 @@ "crossLanguageDefinitionId": "Encode.Bytes.Header", "apiVersions": [], "parent": { - "$ref": "24" + "$ref": "76" } }, { - "$id": "172", + "$id": "208", "kind": "client", "name": "RequestBody", "namespace": "Encode.Bytes.RequestBody", "methods": [ { - "$id": "173", + "$id": "209", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "174", + "$id": "210", "name": "default", "resourceName": "RequestBody", "accessibility": "public", "parameters": [ { - "$id": "175", + "$id": "211", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/octet-stream", "type": { - "$id": "176", - "kind": "constant", - "valueType": { - "$id": "177", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1863,11 +2191,11 @@ "skipUrlEncoding": false }, { - "$id": "178", + "$id": "212", "name": "value", "nameInRequest": "value", "type": { - "$id": "179", + "$id": "213", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -1886,7 +2214,7 @@ ], "responses": [ { - "$id": "180", + "$id": "214", "statusCodes": [ 204 ], @@ -1908,11 +2236,11 @@ }, "parameters": [ { - "$id": "181", + "$id": "215", "name": "value", "nameInRequest": "value", "type": { - "$id": "182", + "$id": "216", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -1929,12 +2257,12 @@ "skipUrlEncoding": false }, { - "$id": "183", + "$id": "217", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/octet-stream", "type": { - "$ref": "176" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1948,7 +2276,7 @@ } ], "response": { - "$id": "184" + "$id": "218" }, "isOverride": false, "generateConvenient": true, @@ -1956,33 +2284,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.RequestBody.default" }, { - "$id": "185", + "$id": "219", "kind": "basic", "name": "octetStream", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "186", + "$id": "220", "name": "octetStream", "resourceName": "RequestBody", "accessibility": "public", "parameters": [ { - "$id": "187", + "$id": "221", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "188", - "kind": "constant", - "valueType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1995,11 +2313,11 @@ "skipUrlEncoding": false }, { - "$id": "190", + "$id": "222", "name": "value", "nameInRequest": "value", "type": { - "$id": "191", + "$id": "223", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2018,7 +2336,7 @@ ], "responses": [ { - "$id": "192", + "$id": "224", "statusCodes": [ 204 ], @@ -2040,21 +2358,11 @@ }, "parameters": [ { - "$id": "193", + "$id": "225", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "194", - "kind": "constant", - "valueType": { - "$id": "195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2067,11 +2375,11 @@ "skipUrlEncoding": false }, { - "$id": "196", + "$id": "226", "name": "value", "nameInRequest": "value", "type": { - "$id": "197", + "$id": "227", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2089,7 +2397,7 @@ } ], "response": { - "$id": "198" + "$id": "228" }, "isOverride": false, "generateConvenient": true, @@ -2097,33 +2405,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.RequestBody.octetStream" }, { - "$id": "199", + "$id": "229", "kind": "basic", "name": "customContentType", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "200", + "$id": "230", "name": "customContentType", "resourceName": "RequestBody", "accessibility": "public", "parameters": [ { - "$id": "201", + "$id": "231", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "202", - "kind": "constant", - "valueType": { - "$id": "203", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2136,11 +2434,11 @@ "skipUrlEncoding": false }, { - "$id": "204", + "$id": "232", "name": "value", "nameInRequest": "value", "type": { - "$id": "205", + "$id": "233", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2159,7 +2457,7 @@ ], "responses": [ { - "$id": "206", + "$id": "234", "statusCodes": [ 204 ], @@ -2181,21 +2479,11 @@ }, "parameters": [ { - "$id": "207", + "$id": "235", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "208", - "kind": "constant", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2208,11 +2496,11 @@ "skipUrlEncoding": false }, { - "$id": "210", + "$id": "236", "name": "value", "nameInRequest": "value", "type": { - "$id": "211", + "$id": "237", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2230,7 +2518,7 @@ } ], "response": { - "$id": "212" + "$id": "238" }, "isOverride": false, "generateConvenient": true, @@ -2238,33 +2526,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.RequestBody.customContentType" }, { - "$id": "213", + "$id": "239", "kind": "basic", "name": "base64", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "214", + "$id": "240", "name": "base64", "resourceName": "RequestBody", "accessibility": "public", "parameters": [ { - "$id": "215", + "$id": "241", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "216", - "kind": "constant", - "valueType": { - "$id": "217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2277,11 +2555,11 @@ "skipUrlEncoding": false }, { - "$id": "218", + "$id": "242", "name": "value", "nameInRequest": "value", "type": { - "$id": "219", + "$id": "243", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2301,7 +2579,7 @@ ], "responses": [ { - "$id": "220", + "$id": "244", "statusCodes": [ 204 ], @@ -2323,21 +2601,11 @@ }, "parameters": [ { - "$id": "221", + "$id": "245", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "222", - "kind": "constant", - "valueType": { - "$id": "223", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2350,11 +2618,11 @@ "skipUrlEncoding": false }, { - "$id": "224", + "$id": "246", "name": "value", "nameInRequest": "value", "type": { - "$id": "225", + "$id": "247", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2373,7 +2641,7 @@ } ], "response": { - "$id": "226" + "$id": "248" }, "isOverride": false, "generateConvenient": true, @@ -2381,33 +2649,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.RequestBody.base64" }, { - "$id": "227", + "$id": "249", "kind": "basic", "name": "base64url", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "228", + "$id": "250", "name": "base64url", "resourceName": "RequestBody", "accessibility": "public", "parameters": [ { - "$id": "229", + "$id": "251", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "230", - "kind": "constant", - "valueType": { - "$id": "231", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2420,11 +2678,11 @@ "skipUrlEncoding": false }, { - "$id": "232", + "$id": "252", "name": "value", "nameInRequest": "value", "type": { - "$id": "233", + "$id": "253", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -2444,7 +2702,7 @@ ], "responses": [ { - "$id": "234", + "$id": "254", "statusCodes": [ 204 ], @@ -2466,21 +2724,11 @@ }, "parameters": [ { - "$id": "235", + "$id": "255", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "236", - "kind": "constant", - "valueType": { - "$id": "237", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2493,11 +2741,11 @@ "skipUrlEncoding": false }, { - "$id": "238", + "$id": "256", "name": "value", "nameInRequest": "value", "type": { - "$id": "239", + "$id": "257", "kind": "bytes", "name": "bytes", "encode": "base64url", @@ -2516,7 +2764,7 @@ } ], "response": { - "$id": "240" + "$id": "258" }, "isOverride": false, "generateConvenient": true, @@ -2526,12 +2774,12 @@ ], "parameters": [ { - "$id": "241", + "$id": "259", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "242", + "$id": "260", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2545,9 +2793,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "243", + "$id": "261", "type": { - "$id": "244", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2560,43 +2808,33 @@ "crossLanguageDefinitionId": "Encode.Bytes.RequestBody", "apiVersions": [], "parent": { - "$ref": "24" + "$ref": "76" } }, { - "$id": "245", + "$id": "263", "kind": "client", "name": "ResponseBody", "namespace": "Encode.Bytes.ResponseBody", "methods": [ { - "$id": "246", + "$id": "264", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "247", + "$id": "265", "name": "default", "resourceName": "ResponseBody", "accessibility": "public", "parameters": [ { - "$id": "248", + "$id": "266", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "249", - "kind": "constant", - "valueType": { - "$id": "250", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2611,12 +2849,12 @@ ], "responses": [ { - "$id": "251", + "$id": "267", "statusCodes": [ 200 ], "bodyType": { - "$id": "252", + "$id": "268", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2640,11 +2878,11 @@ }, "parameters": [ { - "$id": "253", + "$id": "269", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "249" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2658,9 +2896,9 @@ } ], "response": { - "$id": "254", + "$id": "270", "type": { - "$ref": "252" + "$ref": "268" } }, "isOverride": false, @@ -2669,33 +2907,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody.default" }, { - "$id": "255", + "$id": "271", "kind": "basic", "name": "octetStream", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "256", + "$id": "272", "name": "octetStream", "resourceName": "ResponseBody", "accessibility": "public", "parameters": [ { - "$id": "257", + "$id": "273", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "258", - "kind": "constant", - "valueType": { - "$id": "259", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2710,12 +2938,12 @@ ], "responses": [ { - "$id": "260", + "$id": "274", "statusCodes": [ 200 ], "bodyType": { - "$id": "261", + "$id": "275", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2723,21 +2951,11 @@ }, "headers": [ { - "$id": "262", + "$id": "276", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "263", - "kind": "constant", - "valueType": { - "$id": "264", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/octet-stream", - "decorators": [] + "$ref": "40" } } ], @@ -2758,11 +2976,11 @@ }, "parameters": [ { - "$id": "265", + "$id": "277", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "258" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2776,9 +2994,9 @@ } ], "response": { - "$id": "266", + "$id": "278", "type": { - "$ref": "261" + "$ref": "275" } }, "isOverride": false, @@ -2787,33 +3005,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody.octetStream" }, { - "$id": "267", + "$id": "279", "kind": "basic", "name": "customContentType", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "268", + "$id": "280", "name": "customContentType", "resourceName": "ResponseBody", "accessibility": "public", "parameters": [ { - "$id": "269", + "$id": "281", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "270", - "kind": "constant", - "valueType": { - "$id": "271", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -2828,12 +3036,12 @@ ], "responses": [ { - "$id": "272", + "$id": "282", "statusCodes": [ 200 ], "bodyType": { - "$id": "273", + "$id": "283", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -2841,21 +3049,11 @@ }, "headers": [ { - "$id": "274", + "$id": "284", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "275", - "kind": "constant", - "valueType": { - "$id": "276", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "44" } } ], @@ -2876,11 +3074,11 @@ }, "parameters": [ { - "$id": "277", + "$id": "285", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "270" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -2894,9 +3092,9 @@ } ], "response": { - "$id": "278", + "$id": "286", "type": { - "$ref": "273" + "$ref": "283" } }, "isOverride": false, @@ -2905,33 +3103,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody.customContentType" }, { - "$id": "279", + "$id": "287", "kind": "basic", "name": "base64", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "280", + "$id": "288", "name": "base64", "resourceName": "ResponseBody", "accessibility": "public", "parameters": [ { - "$id": "281", + "$id": "289", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "282", - "kind": "constant", - "valueType": { - "$id": "283", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -2946,12 +3134,12 @@ ], "responses": [ { - "$id": "284", + "$id": "290", "statusCodes": [ 200 ], "bodyType": { - "$id": "285", + "$id": "291", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2960,21 +3148,11 @@ }, "headers": [ { - "$id": "286", + "$id": "292", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "287", - "kind": "constant", - "valueType": { - "$id": "288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" } } ], @@ -2995,11 +3173,11 @@ }, "parameters": [ { - "$id": "289", + "$id": "293", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "282" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -3013,9 +3191,9 @@ } ], "response": { - "$id": "290", + "$id": "294", "type": { - "$ref": "285" + "$ref": "291" } }, "isOverride": false, @@ -3024,33 +3202,23 @@ "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody.base64" }, { - "$id": "291", + "$id": "295", "kind": "basic", "name": "base64url", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "292", + "$id": "296", "name": "base64url", "resourceName": "ResponseBody", "accessibility": "public", "parameters": [ { - "$id": "293", + "$id": "297", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "294", - "kind": "constant", - "valueType": { - "$id": "295", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -3065,18 +3233,18 @@ ], "responses": [ { - "$id": "296", + "$id": "298", "statusCodes": [ 200 ], "bodyType": { - "$id": "297", + "$id": "299", "kind": "bytes", "name": "base64urlBytes", "encode": "base64url", "crossLanguageDefinitionId": "Encode.Bytes.base64urlBytes", "baseType": { - "$id": "298", + "$id": "300", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -3087,21 +3255,11 @@ }, "headers": [ { - "$id": "299", + "$id": "301", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "300", - "kind": "constant", - "valueType": { - "$id": "301", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" } } ], @@ -3126,7 +3284,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "294" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -3142,7 +3300,7 @@ "response": { "$id": "303", "type": { - "$ref": "297" + "$ref": "299" } }, "isOverride": false, @@ -3187,7 +3345,7 @@ "crossLanguageDefinitionId": "Encode.Bytes.ResponseBody", "apiVersions": [], "parent": { - "$ref": "24" + "$ref": "76" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj index 8495253fb07f..ee85371d2cf0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/src/Encode.Datetime.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json index 8d4d66affeb8..1a5045e883f1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/datetime/tspCodeModel.json @@ -3,9 +3,171 @@ "name": "Encode.Datetime", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "defaultContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "defaultContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "rfc3339ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "rfc3339ContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "rfc7231ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "rfc7231ContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "unixTimestampContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "unixTimestampContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "unixTimestampArrayContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "unixTimestampArrayContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "22", "kind": "model", "name": "DefaultDatetimeProperty", "namespace": "Encode.Datetime", @@ -14,17 +176,17 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "23", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "4", + "$id": "24", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "5", + "$id": "25", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40,9 +202,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.DefaultDatetimeProperty.value", "serializationOptions": { - "$id": "6", + "$id": "26", "json": { - "$id": "7", + "$id": "27", "name": "value" } } @@ -50,7 +212,7 @@ ] }, { - "$id": "8", + "$id": "28", "kind": "model", "name": "Rfc3339DatetimeProperty", "namespace": "Encode.Datetime", @@ -59,17 +221,17 @@ "decorators": [], "properties": [ { - "$id": "9", + "$id": "29", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "10", + "$id": "30", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "11", + "$id": "31", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -85,9 +247,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.Rfc3339DatetimeProperty.value", "serializationOptions": { - "$id": "12", + "$id": "32", "json": { - "$id": "13", + "$id": "33", "name": "value" } } @@ -95,7 +257,7 @@ ] }, { - "$id": "14", + "$id": "34", "kind": "model", "name": "Rfc7231DatetimeProperty", "namespace": "Encode.Datetime", @@ -104,17 +266,17 @@ "decorators": [], "properties": [ { - "$id": "15", + "$id": "35", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "16", + "$id": "36", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "17", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -130,9 +292,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.Rfc7231DatetimeProperty.value", "serializationOptions": { - "$id": "18", + "$id": "38", "json": { - "$id": "19", + "$id": "39", "name": "value" } } @@ -140,7 +302,7 @@ ] }, { - "$id": "20", + "$id": "40", "kind": "model", "name": "UnixTimestampDatetimeProperty", "namespace": "Encode.Datetime", @@ -149,17 +311,17 @@ "decorators": [], "properties": [ { - "$id": "21", + "$id": "41", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "22", + "$id": "42", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "23", + "$id": "43", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -175,9 +337,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.UnixTimestampDatetimeProperty.value", "serializationOptions": { - "$id": "24", + "$id": "44", "json": { - "$id": "25", + "$id": "45", "name": "value" } } @@ -185,7 +347,7 @@ ] }, { - "$id": "26", + "$id": "46", "kind": "model", "name": "UnixTimestampArrayDatetimeProperty", "namespace": "Encode.Datetime", @@ -194,21 +356,21 @@ "decorators": [], "properties": [ { - "$id": "27", + "$id": "47", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "28", + "$id": "48", "kind": "array", "name": "Array", "valueType": { - "$id": "29", + "$id": "49", "kind": "utcDateTime", "name": "unixTimestampDatetime", "encode": "unixTimestamp", "wireType": { - "$id": "30", + "$id": "50", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -216,12 +378,12 @@ }, "crossLanguageDefinitionId": "Encode.Datetime.unixTimestampDatetime", "baseType": { - "$id": "31", + "$id": "51", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "32", + "$id": "52", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -242,9 +404,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Datetime.UnixTimestampArrayDatetimeProperty.value", "serializationOptions": { - "$id": "33", + "$id": "53", "json": { - "$id": "34", + "$id": "54", "name": "value" } } @@ -254,7 +416,7 @@ ], "clients": [ { - "$id": "35", + "$id": "55", "kind": "client", "name": "DatetimeClient", "namespace": "Encode.Datetime", @@ -262,12 +424,12 @@ "methods": [], "parameters": [ { - "$id": "36", + "$id": "56", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "37", + "$id": "57", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -281,9 +443,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "38", + "$id": "58", "type": { - "$id": "39", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -297,34 +459,34 @@ "apiVersions": [], "children": [ { - "$id": "40", + "$id": "60", "kind": "client", "name": "Query", "namespace": "Encode.Datetime.Query", "methods": [ { - "$id": "41", + "$id": "61", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "42", + "$id": "62", "name": "default", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "43", + "$id": "63", "name": "value", "nameInRequest": "value", "type": { - "$id": "44", + "$id": "64", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "45", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -346,7 +508,7 @@ ], "responses": [ { - "$id": "46", + "$id": "66", "statusCodes": [ 204 ], @@ -365,16 +527,16 @@ }, "parameters": [ { - "$id": "47", + "$id": "67", "name": "value", "nameInRequest": "value", "type": { - "$id": "48", + "$id": "68", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "49", + "$id": "69", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -395,7 +557,7 @@ } ], "response": { - "$id": "50" + "$id": "70" }, "isOverride": false, "generateConvenient": true, @@ -403,28 +565,28 @@ "crossLanguageDefinitionId": "Encode.Datetime.Query.default" }, { - "$id": "51", + "$id": "71", "kind": "basic", "name": "rfc3339", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "52", + "$id": "72", "name": "rfc3339", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "53", + "$id": "73", "name": "value", "nameInRequest": "value", "type": { - "$id": "54", + "$id": "74", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "55", + "$id": "75", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -446,7 +608,7 @@ ], "responses": [ { - "$id": "56", + "$id": "76", "statusCodes": [ 204 ], @@ -465,16 +627,16 @@ }, "parameters": [ { - "$id": "57", + "$id": "77", "name": "value", "nameInRequest": "value", "type": { - "$id": "58", + "$id": "78", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "59", + "$id": "79", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -495,7 +657,7 @@ } ], "response": { - "$id": "60" + "$id": "80" }, "isOverride": false, "generateConvenient": true, @@ -503,28 +665,28 @@ "crossLanguageDefinitionId": "Encode.Datetime.Query.rfc3339" }, { - "$id": "61", + "$id": "81", "kind": "basic", "name": "rfc7231", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "62", + "$id": "82", "name": "rfc7231", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "63", + "$id": "83", "name": "value", "nameInRequest": "value", "type": { - "$id": "64", + "$id": "84", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "65", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -546,7 +708,7 @@ ], "responses": [ { - "$id": "66", + "$id": "86", "statusCodes": [ 204 ], @@ -565,16 +727,16 @@ }, "parameters": [ { - "$id": "67", + "$id": "87", "name": "value", "nameInRequest": "value", "type": { - "$id": "68", + "$id": "88", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "69", + "$id": "89", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -595,7 +757,7 @@ } ], "response": { - "$id": "70" + "$id": "90" }, "isOverride": false, "generateConvenient": true, @@ -603,28 +765,28 @@ "crossLanguageDefinitionId": "Encode.Datetime.Query.rfc7231" }, { - "$id": "71", + "$id": "91", "kind": "basic", "name": "unixTimestamp", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "72", + "$id": "92", "name": "unixTimestamp", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "73", + "$id": "93", "name": "value", "nameInRequest": "value", "type": { - "$id": "74", + "$id": "94", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "75", + "$id": "95", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -646,7 +808,7 @@ ], "responses": [ { - "$id": "76", + "$id": "96", "statusCodes": [ 204 ], @@ -665,16 +827,16 @@ }, "parameters": [ { - "$id": "77", + "$id": "97", "name": "value", "nameInRequest": "value", "type": { - "$id": "78", + "$id": "98", "kind": "utcDateTime", "name": "utcDateTime", "encode": "unixTimestamp", "wireType": { - "$id": "79", + "$id": "99", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -695,7 +857,7 @@ } ], "response": { - "$id": "80" + "$id": "100" }, "isOverride": false, "generateConvenient": true, @@ -703,32 +865,32 @@ "crossLanguageDefinitionId": "Encode.Datetime.Query.unixTimestamp" }, { - "$id": "81", + "$id": "101", "kind": "basic", "name": "unixTimestampArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "82", + "$id": "102", "name": "unixTimestampArray", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "83", + "$id": "103", "name": "value", "nameInRequest": "value", "type": { - "$id": "84", + "$id": "104", "kind": "array", "name": "Array", "valueType": { - "$id": "85", + "$id": "105", "kind": "utcDateTime", "name": "unixTimestampDatetime", "encode": "unixTimestamp", "wireType": { - "$id": "86", + "$id": "106", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -736,12 +898,12 @@ }, "crossLanguageDefinitionId": "Encode.Datetime.unixTimestampDatetime", "baseType": { - "$id": "87", + "$id": "107", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "88", + "$id": "108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -769,7 +931,7 @@ ], "responses": [ { - "$id": "89", + "$id": "109", "statusCodes": [ 204 ], @@ -788,20 +950,20 @@ }, "parameters": [ { - "$id": "90", + "$id": "110", "name": "value", "nameInRequest": "value", "type": { - "$id": "91", + "$id": "111", "kind": "array", "name": "Array", "valueType": { - "$id": "92", + "$id": "112", "kind": "utcDateTime", "name": "unixTimestampDatetime", "encode": "unixTimestamp", "wireType": { - "$id": "93", + "$id": "113", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -809,12 +971,12 @@ }, "crossLanguageDefinitionId": "Encode.Datetime.unixTimestampDatetime", "baseType": { - "$id": "94", + "$id": "114", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "95", + "$id": "115", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -840,7 +1002,7 @@ } ], "response": { - "$id": "96" + "$id": "116" }, "isOverride": false, "generateConvenient": true, @@ -850,12 +1012,12 @@ ], "parameters": [ { - "$id": "97", + "$id": "117", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "98", + "$id": "118", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -869,9 +1031,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "99", + "$id": "119", "type": { - "$id": "100", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -884,44 +1046,34 @@ "crossLanguageDefinitionId": "Encode.Datetime.Query", "apiVersions": [], "parent": { - "$ref": "35" + "$ref": "55" } }, { - "$id": "101", + "$id": "121", "kind": "client", "name": "Property", "namespace": "Encode.Datetime.Property", "methods": [ { - "$id": "102", + "$id": "122", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "103", + "$id": "123", "name": "default", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "104", + "$id": "124", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "105", - "kind": "constant", - "valueType": { - "$id": "106", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -934,21 +1086,11 @@ "skipUrlEncoding": false }, { - "$id": "107", + "$id": "125", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "108", - "kind": "constant", - "valueType": { - "$id": "109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -961,11 +1103,11 @@ "skipUrlEncoding": false }, { - "$id": "110", + "$id": "126", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -980,12 +1122,12 @@ ], "responses": [ { - "$id": "111", + "$id": "127", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -1008,11 +1150,11 @@ }, "parameters": [ { - "$id": "112", + "$id": "128", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -1025,12 +1167,12 @@ "skipUrlEncoding": false }, { - "$id": "113", + "$id": "129", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "105" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -1043,11 +1185,11 @@ "skipUrlEncoding": false }, { - "$id": "114", + "$id": "130", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "108" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -1061,9 +1203,9 @@ } ], "response": { - "$id": "115", + "$id": "131", "type": { - "$ref": "2" + "$ref": "22" } }, "isOverride": false, @@ -1072,34 +1214,24 @@ "crossLanguageDefinitionId": "Encode.Datetime.Property.default" }, { - "$id": "116", + "$id": "132", "kind": "basic", "name": "rfc3339", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "117", + "$id": "133", "name": "rfc3339", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "118", + "$id": "134", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "119", - "kind": "constant", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1112,21 +1244,11 @@ "skipUrlEncoding": false }, { - "$id": "121", + "$id": "135", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "122", - "kind": "constant", - "valueType": { - "$id": "123", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1139,11 +1261,11 @@ "skipUrlEncoding": false }, { - "$id": "124", + "$id": "136", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "28" }, "location": "Body", "isApiVersion": false, @@ -1158,12 +1280,12 @@ ], "responses": [ { - "$id": "125", + "$id": "137", "statusCodes": [ 200 ], "bodyType": { - "$ref": "8" + "$ref": "28" }, "headers": [], "isErrorResponse": false, @@ -1186,11 +1308,11 @@ }, "parameters": [ { - "$id": "126", + "$id": "138", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "28" }, "location": "Body", "isApiVersion": false, @@ -1203,12 +1325,12 @@ "skipUrlEncoding": false }, { - "$id": "127", + "$id": "139", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "119" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1221,11 +1343,11 @@ "skipUrlEncoding": false }, { - "$id": "128", + "$id": "140", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "122" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1239,9 +1361,9 @@ } ], "response": { - "$id": "129", + "$id": "141", "type": { - "$ref": "8" + "$ref": "28" } }, "isOverride": false, @@ -1250,34 +1372,24 @@ "crossLanguageDefinitionId": "Encode.Datetime.Property.rfc3339" }, { - "$id": "130", + "$id": "142", "kind": "basic", "name": "rfc7231", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "131", + "$id": "143", "name": "rfc7231", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "132", + "$id": "144", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "133", - "kind": "constant", - "valueType": { - "$id": "134", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1290,21 +1402,11 @@ "skipUrlEncoding": false }, { - "$id": "135", + "$id": "145", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "136", - "kind": "constant", - "valueType": { - "$id": "137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1317,11 +1419,11 @@ "skipUrlEncoding": false }, { - "$id": "138", + "$id": "146", "name": "body", "nameInRequest": "body", "type": { - "$ref": "14" + "$ref": "34" }, "location": "Body", "isApiVersion": false, @@ -1336,12 +1438,12 @@ ], "responses": [ { - "$id": "139", + "$id": "147", "statusCodes": [ 200 ], "bodyType": { - "$ref": "14" + "$ref": "34" }, "headers": [], "isErrorResponse": false, @@ -1364,11 +1466,11 @@ }, "parameters": [ { - "$id": "140", + "$id": "148", "name": "body", "nameInRequest": "body", "type": { - "$ref": "14" + "$ref": "34" }, "location": "Body", "isApiVersion": false, @@ -1381,12 +1483,12 @@ "skipUrlEncoding": false }, { - "$id": "141", + "$id": "149", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "133" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1399,11 +1501,11 @@ "skipUrlEncoding": false }, { - "$id": "142", + "$id": "150", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "136" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1417,9 +1519,9 @@ } ], "response": { - "$id": "143", + "$id": "151", "type": { - "$ref": "14" + "$ref": "34" } }, "isOverride": false, @@ -1428,34 +1530,24 @@ "crossLanguageDefinitionId": "Encode.Datetime.Property.rfc7231" }, { - "$id": "144", + "$id": "152", "kind": "basic", "name": "unixTimestamp", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "145", + "$id": "153", "name": "unixTimestamp", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "146", + "$id": "154", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "147", - "kind": "constant", - "valueType": { - "$id": "148", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1468,21 +1560,11 @@ "skipUrlEncoding": false }, { - "$id": "149", + "$id": "155", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "150", - "kind": "constant", - "valueType": { - "$id": "151", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1495,11 +1577,11 @@ "skipUrlEncoding": false }, { - "$id": "152", + "$id": "156", "name": "body", "nameInRequest": "body", "type": { - "$ref": "20" + "$ref": "40" }, "location": "Body", "isApiVersion": false, @@ -1514,12 +1596,12 @@ ], "responses": [ { - "$id": "153", + "$id": "157", "statusCodes": [ 200 ], "bodyType": { - "$ref": "20" + "$ref": "40" }, "headers": [], "isErrorResponse": false, @@ -1542,11 +1624,11 @@ }, "parameters": [ { - "$id": "154", + "$id": "158", "name": "body", "nameInRequest": "body", "type": { - "$ref": "20" + "$ref": "40" }, "location": "Body", "isApiVersion": false, @@ -1559,12 +1641,12 @@ "skipUrlEncoding": false }, { - "$id": "155", + "$id": "159", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "147" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1577,11 +1659,11 @@ "skipUrlEncoding": false }, { - "$id": "156", + "$id": "160", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "150" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1595,9 +1677,9 @@ } ], "response": { - "$id": "157", + "$id": "161", "type": { - "$ref": "20" + "$ref": "40" } }, "isOverride": false, @@ -1606,34 +1688,24 @@ "crossLanguageDefinitionId": "Encode.Datetime.Property.unixTimestamp" }, { - "$id": "158", + "$id": "162", "kind": "basic", "name": "unixTimestampArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "159", + "$id": "163", "name": "unixTimestampArray", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "160", + "$id": "164", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "161", - "kind": "constant", - "valueType": { - "$id": "162", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1646,21 +1718,11 @@ "skipUrlEncoding": false }, { - "$id": "163", + "$id": "165", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "164", - "kind": "constant", - "valueType": { - "$id": "165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1677,7 +1739,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "26" + "$ref": "46" }, "location": "Body", "isApiVersion": false, @@ -1697,7 +1759,7 @@ 200 ], "bodyType": { - "$ref": "26" + "$ref": "46" }, "headers": [], "isErrorResponse": false, @@ -1724,7 +1786,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "26" + "$ref": "46" }, "location": "Body", "isApiVersion": false, @@ -1742,7 +1804,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "161" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1759,7 +1821,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "164" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1775,7 +1837,7 @@ "response": { "$id": "171", "type": { - "$ref": "26" + "$ref": "46" } }, "isOverride": false, @@ -1820,7 +1882,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.Property", "apiVersions": [], "parent": { - "$ref": "35" + "$ref": "55" } }, { @@ -2411,7 +2473,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.Header", "apiVersions": [], "parent": { - "$ref": "35" + "$ref": "55" } }, { @@ -2701,7 +2763,7 @@ "crossLanguageDefinitionId": "Encode.Datetime.ResponseHeader", "apiVersions": [], "parent": { - "$ref": "35" + "$ref": "55" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj index c713f22897d3..0d9dfa38bd4e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/src/Encode.Duration.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json index a50a680bbc3e..ef1ed847bda0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/duration/tspCodeModel.json @@ -3,9 +3,203 @@ "name": "Encode.Duration", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "defaultContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "defaultContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "iso8601ContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "iso8601ContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "int32SecondsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "int32SecondsContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "floatSecondsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "floatSecondsContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "float64SecondsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "float64SecondsContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "floatSecondsArrayContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "floatSecondsArrayContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "26", "kind": "model", "name": "DefaultDurationProperty", "namespace": "Encode.Duration.Property", @@ -14,17 +208,17 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "27", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "4", + "$id": "28", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "5", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -40,9 +234,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.DefaultDurationProperty.value", "serializationOptions": { - "$id": "6", + "$id": "30", "json": { - "$id": "7", + "$id": "31", "name": "value" } } @@ -50,7 +244,7 @@ ] }, { - "$id": "8", + "$id": "32", "kind": "model", "name": "ISO8601DurationProperty", "namespace": "Encode.Duration.Property", @@ -59,17 +253,17 @@ "decorators": [], "properties": [ { - "$id": "9", + "$id": "33", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "10", + "$id": "34", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "11", + "$id": "35", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -85,9 +279,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.ISO8601DurationProperty.value", "serializationOptions": { - "$id": "12", + "$id": "36", "json": { - "$id": "13", + "$id": "37", "name": "value" } } @@ -95,7 +289,7 @@ ] }, { - "$id": "14", + "$id": "38", "kind": "model", "name": "Int32SecondsDurationProperty", "namespace": "Encode.Duration.Property", @@ -104,17 +298,17 @@ "decorators": [], "properties": [ { - "$id": "15", + "$id": "39", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "16", + "$id": "40", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "17", + "$id": "41", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -130,9 +324,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.Int32SecondsDurationProperty.value", "serializationOptions": { - "$id": "18", + "$id": "42", "json": { - "$id": "19", + "$id": "43", "name": "value" } } @@ -140,7 +334,7 @@ ] }, { - "$id": "20", + "$id": "44", "kind": "model", "name": "FloatSecondsDurationProperty", "namespace": "Encode.Duration.Property", @@ -149,17 +343,17 @@ "decorators": [], "properties": [ { - "$id": "21", + "$id": "45", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "22", + "$id": "46", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "23", + "$id": "47", "kind": "float", "name": "float", "crossLanguageDefinitionId": "TypeSpec.float", @@ -175,9 +369,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.FloatSecondsDurationProperty.value", "serializationOptions": { - "$id": "24", + "$id": "48", "json": { - "$id": "25", + "$id": "49", "name": "value" } } @@ -185,7 +379,7 @@ ] }, { - "$id": "26", + "$id": "50", "kind": "model", "name": "Float64SecondsDurationProperty", "namespace": "Encode.Duration.Property", @@ -194,17 +388,17 @@ "decorators": [], "properties": [ { - "$id": "27", + "$id": "51", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "28", + "$id": "52", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "29", + "$id": "53", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -220,9 +414,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.Float64SecondsDurationProperty.value", "serializationOptions": { - "$id": "30", + "$id": "54", "json": { - "$id": "31", + "$id": "55", "name": "value" } } @@ -230,7 +424,7 @@ ] }, { - "$id": "32", + "$id": "56", "kind": "model", "name": "FloatSecondsDurationArrayProperty", "namespace": "Encode.Duration.Property", @@ -239,21 +433,21 @@ "decorators": [], "properties": [ { - "$id": "33", + "$id": "57", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "34", + "$id": "58", "kind": "array", "name": "Array1", "valueType": { - "$id": "35", + "$id": "59", "kind": "duration", "name": "Float32Duration", "encode": "seconds", "wireType": { - "$id": "36", + "$id": "60", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -261,12 +455,12 @@ }, "crossLanguageDefinitionId": "Encode.Duration.Property.Float32Duration", "baseType": { - "$id": "37", + "$id": "61", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "38", + "$id": "62", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -287,9 +481,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Duration.Property.FloatSecondsDurationArrayProperty.value", "serializationOptions": { - "$id": "39", + "$id": "63", "json": { - "$id": "40", + "$id": "64", "name": "value" } } @@ -299,7 +493,7 @@ ], "clients": [ { - "$id": "41", + "$id": "65", "kind": "client", "name": "DurationClient", "namespace": "Encode.Duration", @@ -307,12 +501,12 @@ "methods": [], "parameters": [ { - "$id": "42", + "$id": "66", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "43", + "$id": "67", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -326,9 +520,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "44", + "$id": "68", "type": { - "$id": "45", + "$id": "69", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -342,34 +536,34 @@ "apiVersions": [], "children": [ { - "$id": "46", + "$id": "70", "kind": "client", "name": "Query", "namespace": "Encode.Duration.Query", "methods": [ { - "$id": "47", + "$id": "71", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "48", + "$id": "72", "name": "default", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "49", + "$id": "73", "name": "input", "nameInRequest": "input", "type": { - "$id": "50", + "$id": "74", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "51", + "$id": "75", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -391,7 +585,7 @@ ], "responses": [ { - "$id": "52", + "$id": "76", "statusCodes": [ 204 ], @@ -410,16 +604,16 @@ }, "parameters": [ { - "$id": "53", + "$id": "77", "name": "input", "nameInRequest": "input", "type": { - "$id": "54", + "$id": "78", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "55", + "$id": "79", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -440,7 +634,7 @@ } ], "response": { - "$id": "56" + "$id": "80" }, "isOverride": false, "generateConvenient": true, @@ -448,28 +642,28 @@ "crossLanguageDefinitionId": "Encode.Duration.Query.default" }, { - "$id": "57", + "$id": "81", "kind": "basic", "name": "iso8601", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "58", + "$id": "82", "name": "iso8601", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "59", + "$id": "83", "name": "input", "nameInRequest": "input", "type": { - "$id": "60", + "$id": "84", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "61", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -491,7 +685,7 @@ ], "responses": [ { - "$id": "62", + "$id": "86", "statusCodes": [ 204 ], @@ -510,16 +704,16 @@ }, "parameters": [ { - "$id": "63", + "$id": "87", "name": "input", "nameInRequest": "input", "type": { - "$id": "64", + "$id": "88", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "65", + "$id": "89", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -540,7 +734,7 @@ } ], "response": { - "$id": "66" + "$id": "90" }, "isOverride": false, "generateConvenient": true, @@ -548,28 +742,28 @@ "crossLanguageDefinitionId": "Encode.Duration.Query.iso8601" }, { - "$id": "67", + "$id": "91", "kind": "basic", "name": "int32Seconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "68", + "$id": "92", "name": "int32Seconds", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "69", + "$id": "93", "name": "input", "nameInRequest": "input", "type": { - "$id": "70", + "$id": "94", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "71", + "$id": "95", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -591,7 +785,7 @@ ], "responses": [ { - "$id": "72", + "$id": "96", "statusCodes": [ 204 ], @@ -610,16 +804,16 @@ }, "parameters": [ { - "$id": "73", + "$id": "97", "name": "input", "nameInRequest": "input", "type": { - "$id": "74", + "$id": "98", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "75", + "$id": "99", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -640,7 +834,7 @@ } ], "response": { - "$id": "76" + "$id": "100" }, "isOverride": false, "generateConvenient": true, @@ -648,28 +842,28 @@ "crossLanguageDefinitionId": "Encode.Duration.Query.int32Seconds" }, { - "$id": "77", + "$id": "101", "kind": "basic", "name": "floatSeconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "78", + "$id": "102", "name": "floatSeconds", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "79", + "$id": "103", "name": "input", "nameInRequest": "input", "type": { - "$id": "80", + "$id": "104", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "81", + "$id": "105", "kind": "float", "name": "float", "crossLanguageDefinitionId": "TypeSpec.float", @@ -691,7 +885,7 @@ ], "responses": [ { - "$id": "82", + "$id": "106", "statusCodes": [ 204 ], @@ -710,16 +904,16 @@ }, "parameters": [ { - "$id": "83", + "$id": "107", "name": "input", "nameInRequest": "input", "type": { - "$id": "84", + "$id": "108", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "85", + "$id": "109", "kind": "float", "name": "float", "crossLanguageDefinitionId": "TypeSpec.float", @@ -740,7 +934,7 @@ } ], "response": { - "$id": "86" + "$id": "110" }, "isOverride": false, "generateConvenient": true, @@ -748,28 +942,28 @@ "crossLanguageDefinitionId": "Encode.Duration.Query.floatSeconds" }, { - "$id": "87", + "$id": "111", "kind": "basic", "name": "float64Seconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "88", + "$id": "112", "name": "float64Seconds", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "89", + "$id": "113", "name": "input", "nameInRequest": "input", "type": { - "$id": "90", + "$id": "114", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "91", + "$id": "115", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -791,7 +985,7 @@ ], "responses": [ { - "$id": "92", + "$id": "116", "statusCodes": [ 204 ], @@ -810,16 +1004,16 @@ }, "parameters": [ { - "$id": "93", + "$id": "117", "name": "input", "nameInRequest": "input", "type": { - "$id": "94", + "$id": "118", "kind": "duration", "name": "duration", "encode": "seconds", "wireType": { - "$id": "95", + "$id": "119", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -840,7 +1034,7 @@ } ], "response": { - "$id": "96" + "$id": "120" }, "isOverride": false, "generateConvenient": true, @@ -848,32 +1042,32 @@ "crossLanguageDefinitionId": "Encode.Duration.Query.float64Seconds" }, { - "$id": "97", + "$id": "121", "kind": "basic", "name": "int32SecondsArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "98", + "$id": "122", "name": "int32SecondsArray", "resourceName": "Query", "accessibility": "public", "parameters": [ { - "$id": "99", + "$id": "123", "name": "input", "nameInRequest": "input", "type": { - "$id": "100", + "$id": "124", "kind": "array", "name": "Array", "valueType": { - "$id": "101", + "$id": "125", "kind": "duration", "name": "Int32Duration", "encode": "seconds", "wireType": { - "$id": "102", + "$id": "126", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -881,12 +1075,12 @@ }, "crossLanguageDefinitionId": "Encode.Duration.Query.Int32Duration", "baseType": { - "$id": "103", + "$id": "127", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "104", + "$id": "128", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -914,7 +1108,7 @@ ], "responses": [ { - "$id": "105", + "$id": "129", "statusCodes": [ 204 ], @@ -933,20 +1127,20 @@ }, "parameters": [ { - "$id": "106", + "$id": "130", "name": "input", "nameInRequest": "input", "type": { - "$id": "107", + "$id": "131", "kind": "array", "name": "Array", "valueType": { - "$id": "108", + "$id": "132", "kind": "duration", "name": "Int32Duration", "encode": "seconds", "wireType": { - "$id": "109", + "$id": "133", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -954,12 +1148,12 @@ }, "crossLanguageDefinitionId": "Encode.Duration.Query.Int32Duration", "baseType": { - "$id": "110", + "$id": "134", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "111", + "$id": "135", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -985,7 +1179,7 @@ } ], "response": { - "$id": "112" + "$id": "136" }, "isOverride": false, "generateConvenient": true, @@ -995,12 +1189,12 @@ ], "parameters": [ { - "$id": "113", + "$id": "137", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "114", + "$id": "138", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1014,9 +1208,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "115", + "$id": "139", "type": { - "$id": "116", + "$id": "140", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1029,44 +1223,34 @@ "crossLanguageDefinitionId": "Encode.Duration.Query", "apiVersions": [], "parent": { - "$ref": "41" + "$ref": "65" } }, { - "$id": "117", + "$id": "141", "kind": "client", "name": "Property", "namespace": "Encode.Duration.Property", "methods": [ { - "$id": "118", + "$id": "142", "kind": "basic", "name": "default", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "119", + "$id": "143", "name": "default", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "120", + "$id": "144", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "121", - "kind": "constant", - "valueType": { - "$id": "122", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -1079,21 +1263,11 @@ "skipUrlEncoding": false }, { - "$id": "123", + "$id": "145", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "124", - "kind": "constant", - "valueType": { - "$id": "125", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -1106,11 +1280,11 @@ "skipUrlEncoding": false }, { - "$id": "126", + "$id": "146", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -1125,12 +1299,12 @@ ], "responses": [ { - "$id": "127", + "$id": "147", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -1153,11 +1327,11 @@ }, "parameters": [ { - "$id": "128", + "$id": "148", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -1170,12 +1344,12 @@ "skipUrlEncoding": false }, { - "$id": "129", + "$id": "149", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "121" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -1188,11 +1362,11 @@ "skipUrlEncoding": false }, { - "$id": "130", + "$id": "150", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "124" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -1206,9 +1380,9 @@ } ], "response": { - "$id": "131", + "$id": "151", "type": { - "$ref": "2" + "$ref": "26" } }, "isOverride": false, @@ -1217,34 +1391,24 @@ "crossLanguageDefinitionId": "Encode.Duration.Property.default" }, { - "$id": "132", + "$id": "152", "kind": "basic", "name": "iso8601", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "133", + "$id": "153", "name": "iso8601", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "134", + "$id": "154", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "135", - "kind": "constant", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1257,21 +1421,11 @@ "skipUrlEncoding": false }, { - "$id": "137", + "$id": "155", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "138", - "kind": "constant", - "valueType": { - "$id": "139", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1284,11 +1438,11 @@ "skipUrlEncoding": false }, { - "$id": "140", + "$id": "156", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "32" }, "location": "Body", "isApiVersion": false, @@ -1303,12 +1457,12 @@ ], "responses": [ { - "$id": "141", + "$id": "157", "statusCodes": [ 200 ], "bodyType": { - "$ref": "8" + "$ref": "32" }, "headers": [], "isErrorResponse": false, @@ -1331,11 +1485,11 @@ }, "parameters": [ { - "$id": "142", + "$id": "158", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "32" }, "location": "Body", "isApiVersion": false, @@ -1348,12 +1502,12 @@ "skipUrlEncoding": false }, { - "$id": "143", + "$id": "159", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "135" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1366,11 +1520,11 @@ "skipUrlEncoding": false }, { - "$id": "144", + "$id": "160", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "138" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1384,9 +1538,9 @@ } ], "response": { - "$id": "145", + "$id": "161", "type": { - "$ref": "8" + "$ref": "32" } }, "isOverride": false, @@ -1395,34 +1549,24 @@ "crossLanguageDefinitionId": "Encode.Duration.Property.iso8601" }, { - "$id": "146", + "$id": "162", "kind": "basic", "name": "int32Seconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "147", + "$id": "163", "name": "int32Seconds", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "148", + "$id": "164", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "149", - "kind": "constant", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1435,21 +1579,11 @@ "skipUrlEncoding": false }, { - "$id": "151", + "$id": "165", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "152", - "kind": "constant", - "valueType": { - "$id": "153", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1462,11 +1596,11 @@ "skipUrlEncoding": false }, { - "$id": "154", + "$id": "166", "name": "body", "nameInRequest": "body", "type": { - "$ref": "14" + "$ref": "38" }, "location": "Body", "isApiVersion": false, @@ -1481,12 +1615,12 @@ ], "responses": [ { - "$id": "155", + "$id": "167", "statusCodes": [ 200 ], "bodyType": { - "$ref": "14" + "$ref": "38" }, "headers": [], "isErrorResponse": false, @@ -1509,11 +1643,11 @@ }, "parameters": [ { - "$id": "156", + "$id": "168", "name": "body", "nameInRequest": "body", "type": { - "$ref": "14" + "$ref": "38" }, "location": "Body", "isApiVersion": false, @@ -1526,12 +1660,12 @@ "skipUrlEncoding": false }, { - "$id": "157", + "$id": "169", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "149" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1544,11 +1678,11 @@ "skipUrlEncoding": false }, { - "$id": "158", + "$id": "170", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "152" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1562,9 +1696,9 @@ } ], "response": { - "$id": "159", + "$id": "171", "type": { - "$ref": "14" + "$ref": "38" } }, "isOverride": false, @@ -1573,34 +1707,24 @@ "crossLanguageDefinitionId": "Encode.Duration.Property.int32Seconds" }, { - "$id": "160", + "$id": "172", "kind": "basic", "name": "floatSeconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "161", + "$id": "173", "name": "floatSeconds", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "162", + "$id": "174", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "163", - "kind": "constant", - "valueType": { - "$id": "164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1613,21 +1737,11 @@ "skipUrlEncoding": false }, { - "$id": "165", + "$id": "175", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "166", - "kind": "constant", - "valueType": { - "$id": "167", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1640,11 +1754,11 @@ "skipUrlEncoding": false }, { - "$id": "168", + "$id": "176", "name": "body", "nameInRequest": "body", "type": { - "$ref": "20" + "$ref": "44" }, "location": "Body", "isApiVersion": false, @@ -1659,12 +1773,12 @@ ], "responses": [ { - "$id": "169", + "$id": "177", "statusCodes": [ 200 ], "bodyType": { - "$ref": "20" + "$ref": "44" }, "headers": [], "isErrorResponse": false, @@ -1687,11 +1801,11 @@ }, "parameters": [ { - "$id": "170", + "$id": "178", "name": "body", "nameInRequest": "body", "type": { - "$ref": "20" + "$ref": "44" }, "location": "Body", "isApiVersion": false, @@ -1704,12 +1818,12 @@ "skipUrlEncoding": false }, { - "$id": "171", + "$id": "179", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "163" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1722,11 +1836,11 @@ "skipUrlEncoding": false }, { - "$id": "172", + "$id": "180", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "166" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1740,9 +1854,9 @@ } ], "response": { - "$id": "173", + "$id": "181", "type": { - "$ref": "20" + "$ref": "44" } }, "isOverride": false, @@ -1751,34 +1865,24 @@ "crossLanguageDefinitionId": "Encode.Duration.Property.floatSeconds" }, { - "$id": "174", + "$id": "182", "kind": "basic", "name": "float64Seconds", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "175", + "$id": "183", "name": "float64Seconds", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "176", + "$id": "184", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "177", - "kind": "constant", - "valueType": { - "$id": "178", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1791,21 +1895,11 @@ "skipUrlEncoding": false }, { - "$id": "179", + "$id": "185", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "180", - "kind": "constant", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1818,11 +1912,11 @@ "skipUrlEncoding": false }, { - "$id": "182", + "$id": "186", "name": "body", "nameInRequest": "body", "type": { - "$ref": "26" + "$ref": "50" }, "location": "Body", "isApiVersion": false, @@ -1837,12 +1931,12 @@ ], "responses": [ { - "$id": "183", + "$id": "187", "statusCodes": [ 200 ], "bodyType": { - "$ref": "26" + "$ref": "50" }, "headers": [], "isErrorResponse": false, @@ -1865,11 +1959,11 @@ }, "parameters": [ { - "$id": "184", + "$id": "188", "name": "body", "nameInRequest": "body", "type": { - "$ref": "26" + "$ref": "50" }, "location": "Body", "isApiVersion": false, @@ -1882,12 +1976,12 @@ "skipUrlEncoding": false }, { - "$id": "185", + "$id": "189", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "177" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1900,11 +1994,11 @@ "skipUrlEncoding": false }, { - "$id": "186", + "$id": "190", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "180" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1918,9 +2012,9 @@ } ], "response": { - "$id": "187", + "$id": "191", "type": { - "$ref": "26" + "$ref": "50" } }, "isOverride": false, @@ -1929,34 +2023,24 @@ "crossLanguageDefinitionId": "Encode.Duration.Property.float64Seconds" }, { - "$id": "188", + "$id": "192", "kind": "basic", "name": "floatSecondsArray", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "189", + "$id": "193", "name": "floatSecondsArray", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "190", + "$id": "194", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "191", - "kind": "constant", - "valueType": { - "$id": "192", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1969,21 +2053,11 @@ "skipUrlEncoding": false }, { - "$id": "193", + "$id": "195", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "194", - "kind": "constant", - "valueType": { - "$id": "195", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2000,7 +2074,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "32" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -2020,7 +2094,7 @@ 200 ], "bodyType": { - "$ref": "32" + "$ref": "56" }, "headers": [], "isErrorResponse": false, @@ -2047,7 +2121,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "32" + "$ref": "56" }, "location": "Body", "isApiVersion": false, @@ -2065,7 +2139,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "191" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2082,7 +2156,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "194" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2098,7 +2172,7 @@ "response": { "$id": "201", "type": { - "$ref": "32" + "$ref": "56" } }, "isOverride": false, @@ -2143,7 +2217,7 @@ "crossLanguageDefinitionId": "Encode.Duration.Property", "apiVersions": [], "parent": { - "$ref": "41" + "$ref": "65" } }, { @@ -2834,7 +2908,7 @@ "crossLanguageDefinitionId": "Encode.Duration.Header", "apiVersions": [], "parent": { - "$ref": "41" + "$ref": "65" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj index 25ea805fa0dc..4bc332cf25e4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/src/Encode.Numeric.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json index b4b60c2ce173..8fb79bb7ac71 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/encode/numeric/tspCodeModel.json @@ -3,9 +3,107 @@ "name": "Encode.Numeric", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "safeintAsStringContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "safeintAsStringContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "uint32AsStringOptionalContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "uint32AsStringOptionalContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "uint8AsStringContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "uint8AsStringContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "14", "kind": "model", "name": "SafeintAsStringProperty", "namespace": "Encode.Numeric.Property", @@ -14,12 +112,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "15", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "4", + "$id": "16", "kind": "safeint", "name": "safeint", "encode": "string", @@ -33,9 +131,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Numeric.Property.SafeintAsStringProperty.value", "serializationOptions": { - "$id": "5", + "$id": "17", "json": { - "$id": "6", + "$id": "18", "name": "value" } } @@ -43,7 +141,7 @@ ] }, { - "$id": "7", + "$id": "19", "kind": "model", "name": "Uint32AsStringProperty", "namespace": "Encode.Numeric.Property", @@ -52,12 +150,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "20", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "9", + "$id": "21", "kind": "uint32", "name": "uint32", "encode": "string", @@ -71,9 +169,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Numeric.Property.Uint32AsStringProperty.value", "serializationOptions": { - "$id": "10", + "$id": "22", "json": { - "$id": "11", + "$id": "23", "name": "value" } } @@ -81,7 +179,7 @@ ] }, { - "$id": "12", + "$id": "24", "kind": "model", "name": "Uint8AsStringProperty", "namespace": "Encode.Numeric.Property", @@ -90,12 +188,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "25", "kind": "property", "name": "value", "serializedName": "value", "type": { - "$id": "14", + "$id": "26", "kind": "uint8", "name": "uint8", "encode": "string", @@ -109,9 +207,9 @@ "decorators": [], "crossLanguageDefinitionId": "Encode.Numeric.Property.Uint8AsStringProperty.value", "serializationOptions": { - "$id": "15", + "$id": "27", "json": { - "$id": "16", + "$id": "28", "name": "value" } } @@ -121,7 +219,7 @@ ], "clients": [ { - "$id": "17", + "$id": "29", "kind": "client", "name": "NumericClient", "namespace": "Encode.Numeric", @@ -129,12 +227,12 @@ "methods": [], "parameters": [ { - "$id": "18", + "$id": "30", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "19", + "$id": "31", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -148,9 +246,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "20", + "$id": "32", "type": { - "$id": "21", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -164,40 +262,30 @@ "apiVersions": [], "children": [ { - "$id": "22", + "$id": "34", "kind": "client", "name": "Property", "namespace": "Encode.Numeric.Property", "methods": [ { - "$id": "23", + "$id": "35", "kind": "basic", "name": "safeintAsString", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "24", + "$id": "36", "name": "safeintAsString", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "25", + "$id": "37", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "26", - "kind": "constant", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -210,21 +298,11 @@ "skipUrlEncoding": false }, { - "$id": "28", + "$id": "38", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "29", - "kind": "constant", - "valueType": { - "$id": "30", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -237,11 +315,11 @@ "skipUrlEncoding": false }, { - "$id": "31", + "$id": "39", "name": "value", "nameInRequest": "value", "type": { - "$ref": "2" + "$ref": "14" }, "location": "Body", "isApiVersion": false, @@ -256,12 +334,12 @@ ], "responses": [ { - "$id": "32", + "$id": "40", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "14" }, "headers": [], "isErrorResponse": false, @@ -284,11 +362,11 @@ }, "parameters": [ { - "$id": "33", + "$id": "41", "name": "value", "nameInRequest": "value", "type": { - "$ref": "2" + "$ref": "14" }, "location": "Body", "isApiVersion": false, @@ -301,12 +379,12 @@ "skipUrlEncoding": false }, { - "$id": "34", + "$id": "42", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "26" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -319,11 +397,11 @@ "skipUrlEncoding": false }, { - "$id": "35", + "$id": "43", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "29" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -337,9 +415,9 @@ } ], "response": { - "$id": "36", + "$id": "44", "type": { - "$ref": "2" + "$ref": "14" } }, "isOverride": false, @@ -348,34 +426,24 @@ "crossLanguageDefinitionId": "Encode.Numeric.Property.safeintAsString" }, { - "$id": "37", + "$id": "45", "kind": "basic", "name": "uint32AsStringOptional", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "38", + "$id": "46", "name": "uint32AsStringOptional", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "39", + "$id": "47", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "40", - "kind": "constant", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -388,21 +456,11 @@ "skipUrlEncoding": false }, { - "$id": "42", + "$id": "48", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "43", - "kind": "constant", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -415,11 +473,11 @@ "skipUrlEncoding": false }, { - "$id": "45", + "$id": "49", "name": "value", "nameInRequest": "value", "type": { - "$ref": "7" + "$ref": "19" }, "location": "Body", "isApiVersion": false, @@ -434,12 +492,12 @@ ], "responses": [ { - "$id": "46", + "$id": "50", "statusCodes": [ 200 ], "bodyType": { - "$ref": "7" + "$ref": "19" }, "headers": [], "isErrorResponse": false, @@ -462,11 +520,11 @@ }, "parameters": [ { - "$id": "47", + "$id": "51", "name": "value", "nameInRequest": "value", "type": { - "$ref": "7" + "$ref": "19" }, "location": "Body", "isApiVersion": false, @@ -479,12 +537,12 @@ "skipUrlEncoding": false }, { - "$id": "48", + "$id": "52", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "40" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -497,11 +555,11 @@ "skipUrlEncoding": false }, { - "$id": "49", + "$id": "53", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "43" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -515,9 +573,9 @@ } ], "response": { - "$id": "50", + "$id": "54", "type": { - "$ref": "7" + "$ref": "19" } }, "isOverride": false, @@ -526,34 +584,24 @@ "crossLanguageDefinitionId": "Encode.Numeric.Property.uint32AsStringOptional" }, { - "$id": "51", + "$id": "55", "kind": "basic", "name": "uint8AsString", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "52", + "$id": "56", "name": "uint8AsString", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "53", + "$id": "57", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "54", - "kind": "constant", - "valueType": { - "$id": "55", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -566,21 +614,11 @@ "skipUrlEncoding": false }, { - "$id": "56", + "$id": "58", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "57", - "kind": "constant", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -597,7 +635,7 @@ "name": "value", "nameInRequest": "value", "type": { - "$ref": "12" + "$ref": "24" }, "location": "Body", "isApiVersion": false, @@ -617,7 +655,7 @@ 200 ], "bodyType": { - "$ref": "12" + "$ref": "24" }, "headers": [], "isErrorResponse": false, @@ -644,7 +682,7 @@ "name": "value", "nameInRequest": "value", "type": { - "$ref": "12" + "$ref": "24" }, "location": "Body", "isApiVersion": false, @@ -662,7 +700,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "54" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -679,7 +717,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "57" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -695,7 +733,7 @@ "response": { "$id": "64", "type": { - "$ref": "12" + "$ref": "24" } }, "isOverride": false, @@ -740,7 +778,7 @@ "crossLanguageDefinitionId": "Encode.Numeric.Property", "apiVersions": [], "parent": { - "$ref": "17" + "$ref": "29" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj index 04c3cb1d7b88..0aad98e42703 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/src/Parameters.Basic.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json index 8424661c8545..1b35728153e3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/basic/tspCodeModel.json @@ -3,9 +3,43 @@ "name": "Parameters.Basic", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "simpleContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "simpleContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "6", "kind": "model", "name": "User", "namespace": "Parameters.Basic", @@ -15,12 +49,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "7", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "8", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,9 +67,9 @@ "decorators": [], "crossLanguageDefinitionId": "Parameters.Basic.ExplicitBody.User.name", "serializationOptions": { - "$id": "5", + "$id": "9", "json": { - "$id": "6", + "$id": "10", "name": "name" } } @@ -43,7 +77,7 @@ ] }, { - "$id": "7", + "$id": "11", "kind": "model", "name": "SimpleRequest", "namespace": "Parameters.Basic", @@ -52,12 +86,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "12", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "9", + "$id": "13", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -70,9 +104,9 @@ "decorators": [], "crossLanguageDefinitionId": "Parameters.Basic.ImplicitBody.simple.name", "serializationOptions": { - "$id": "10", + "$id": "14", "json": { - "$id": "11", + "$id": "15", "name": "name" } } @@ -82,7 +116,7 @@ ], "clients": [ { - "$id": "12", + "$id": "16", "kind": "client", "name": "BasicClient", "namespace": "Parameters.Basic", @@ -90,12 +124,12 @@ "methods": [], "parameters": [ { - "$id": "13", + "$id": "17", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "14", + "$id": "18", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -109,9 +143,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "15", + "$id": "19", "type": { - "$id": "16", + "$id": "20", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -125,40 +159,30 @@ "apiVersions": [], "children": [ { - "$id": "17", + "$id": "21", "kind": "client", "name": "ExplicitBody", "namespace": "Parameters.Basic", "methods": [ { - "$id": "18", + "$id": "22", "kind": "basic", "name": "simple", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "23", "name": "simple", "resourceName": "ExplicitBody", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "24", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -171,11 +195,11 @@ "skipUrlEncoding": false }, { - "$id": "23", + "$id": "25", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -190,7 +214,7 @@ ], "responses": [ { - "$id": "24", + "$id": "26", "statusCodes": [ 204 ], @@ -212,11 +236,11 @@ }, "parameters": [ { - "$id": "25", + "$id": "27", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -229,12 +253,12 @@ "skipUrlEncoding": false }, { - "$id": "26", + "$id": "28", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "21" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -248,7 +272,7 @@ } ], "response": { - "$id": "27" + "$id": "29" }, "isOverride": false, "generateConvenient": true, @@ -258,12 +282,12 @@ ], "parameters": [ { - "$id": "28", + "$id": "30", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "29", + "$id": "31", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -277,9 +301,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "30", + "$id": "32", "type": { - "$id": "31", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -292,44 +316,34 @@ "crossLanguageDefinitionId": "Parameters.Basic.ExplicitBody", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "16" } }, { - "$id": "32", + "$id": "34", "kind": "client", "name": "ImplicitBody", "namespace": "Parameters.Basic", "methods": [ { - "$id": "33", + "$id": "35", "kind": "basic", "name": "simple", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "34", + "$id": "36", "name": "simple", "resourceName": "ImplicitBody", "accessibility": "public", "parameters": [ { - "$id": "35", + "$id": "37", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "36", - "kind": "constant", - "valueType": { - "$id": "37", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -346,7 +360,7 @@ "name": "simpleRequest", "nameInRequest": "simpleRequest", "type": { - "$ref": "7" + "$ref": "11" }, "location": "Body", "isApiVersion": false, @@ -387,7 +401,7 @@ "name": "name", "nameInRequest": "name", "type": { - "$ref": "9" + "$ref": "13" }, "location": "Body", "isApiVersion": false, @@ -405,7 +419,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "36" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -463,7 +477,7 @@ "crossLanguageDefinitionId": "Parameters.Basic.ImplicitBody", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "16" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj index 4ee515ff2cc9..a6e2700d2f41 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/src/Parameters.BodyOptionality.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json index 4e39ded1399d..e098ca9f18dc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/body-optionality/tspCodeModel.json @@ -3,9 +3,75 @@ "name": "Parameters.BodyOptionality", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "requiredExplicitContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "requiredImplicitContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "setContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "omitContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "10", "kind": "model", "name": "BodyModel", "namespace": "Parameters.BodyOptionality", @@ -14,12 +80,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "11", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "12", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,9 +98,9 @@ "decorators": [], "crossLanguageDefinitionId": "Parameters.BodyOptionality.BodyModel.name", "serializationOptions": { - "$id": "5", + "$id": "13", "json": { - "$id": "6", + "$id": "14", "name": "name" } } @@ -44,41 +110,31 @@ ], "clients": [ { - "$id": "7", + "$id": "15", "kind": "client", "name": "BodyOptionalityClient", "namespace": "Parameters.BodyOptionality", "doc": "Test describing optionality of the request body.", "methods": [ { - "$id": "8", + "$id": "16", "kind": "basic", "name": "requiredExplicit", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "9", + "$id": "17", "name": "requiredExplicit", "resourceName": "BodyOptionality", "accessibility": "public", "parameters": [ { - "$id": "10", + "$id": "18", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "11", - "kind": "constant", - "valueType": { - "$id": "12", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -91,11 +147,11 @@ "skipUrlEncoding": false }, { - "$id": "13", + "$id": "19", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -110,7 +166,7 @@ ], "responses": [ { - "$id": "14", + "$id": "20", "statusCodes": [ 204 ], @@ -132,11 +188,11 @@ }, "parameters": [ { - "$id": "15", + "$id": "21", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -149,12 +205,12 @@ "skipUrlEncoding": false }, { - "$id": "16", + "$id": "22", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "11" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -168,7 +224,7 @@ } ], "response": { - "$id": "17" + "$id": "23" }, "isOverride": false, "generateConvenient": true, @@ -176,34 +232,24 @@ "crossLanguageDefinitionId": "Parameters.BodyOptionality.requiredExplicit" }, { - "$id": "18", + "$id": "24", "kind": "basic", "name": "requiredImplicit", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "25", "name": "requiredImplicit", "resourceName": "BodyOptionality", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "26", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -216,11 +262,11 @@ "skipUrlEncoding": false }, { - "$id": "23", + "$id": "27", "name": "bodyModel", "nameInRequest": "bodyModel", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -235,7 +281,7 @@ ], "responses": [ { - "$id": "24", + "$id": "28", "statusCodes": [ 204 ], @@ -257,11 +303,11 @@ }, "parameters": [ { - "$id": "25", + "$id": "29", "name": "name", "nameInRequest": "name", "type": { - "$id": "26", + "$id": "30", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -278,12 +324,12 @@ "skipUrlEncoding": false }, { - "$id": "27", + "$id": "31", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "21" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -297,7 +343,7 @@ } ], "response": { - "$id": "28" + "$id": "32" }, "isOverride": false, "generateConvenient": true, @@ -307,12 +353,12 @@ ], "parameters": [ { - "$id": "29", + "$id": "33", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "30", + "$id": "34", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -326,9 +372,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "31", + "$id": "35", "type": { - "$id": "32", + "$id": "36", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -342,40 +388,30 @@ "apiVersions": [], "children": [ { - "$id": "33", + "$id": "37", "kind": "client", "name": "OptionalExplicit", "namespace": "Parameters.BodyOptionality.OptionalExplicit", "methods": [ { - "$id": "34", + "$id": "38", "kind": "basic", "name": "set", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "35", + "$id": "39", "name": "set", "resourceName": "OptionalExplicit", "accessibility": "public", "parameters": [ { - "$id": "36", + "$id": "40", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "37", - "kind": "constant", - "valueType": { - "$id": "38", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -388,11 +424,11 @@ "skipUrlEncoding": false }, { - "$id": "39", + "$id": "41", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -407,7 +443,7 @@ ], "responses": [ { - "$id": "40", + "$id": "42", "statusCodes": [ 204 ], @@ -429,11 +465,11 @@ }, "parameters": [ { - "$id": "41", + "$id": "43", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -446,12 +482,12 @@ "skipUrlEncoding": false }, { - "$id": "42", + "$id": "44", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "37" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -465,7 +501,7 @@ } ], "response": { - "$id": "43" + "$id": "45" }, "isOverride": false, "generateConvenient": true, @@ -473,34 +509,24 @@ "crossLanguageDefinitionId": "Parameters.BodyOptionality.OptionalExplicit.set" }, { - "$id": "44", + "$id": "46", "kind": "basic", "name": "omit", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "45", + "$id": "47", "name": "omit", "resourceName": "OptionalExplicit", "accessibility": "public", "parameters": [ { - "$id": "46", + "$id": "48", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "47", - "kind": "constant", - "valueType": { - "$id": "48", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -517,7 +543,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -558,7 +584,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -576,7 +602,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "47" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -634,7 +660,7 @@ "crossLanguageDefinitionId": "Parameters.BodyOptionality.OptionalExplicit", "apiVersions": [], "parent": { - "$ref": "7" + "$ref": "15" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj index 2541107eac37..d99b865cf4d1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/src/Parameters.CollectionFormat.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json index 79c99f01707a..59a5830e94e7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/collection-format/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Parameters.CollectionFormat", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj index 22cd077f688f..f64be2e184e2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/src/Parameters.Path.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json index f49b49d482cf..37f66722a03e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/path/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Parameters.Path", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj index 3c9ddc1fb374..c664fb161527 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/src/Parameters.Spread.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json index a306166a8995..7c9a22f3a254 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/parameters/spread/tspCodeModel.json @@ -3,9 +3,155 @@ "name": "Parameters.Spread", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "spreadAsRequestBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "spreadCompositeRequestOnlyWithBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "spreadCompositeRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "spreadCompositeRequestMixContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "spreadAsRequestBodyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "spreadParameterWithInnerModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "spreadAsRequestParameterContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "spreadWithMultipleParametersContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "spreadParameterWithInnerAliasContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "20", "kind": "model", "name": "BodyParameter", "namespace": "Parameters.Spread", @@ -15,12 +161,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "21", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "22", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,9 +179,9 @@ "decorators": [], "crossLanguageDefinitionId": "Parameters.Spread.Model.BodyParameter.name", "serializationOptions": { - "$id": "5", + "$id": "23", "json": { - "$id": "6", + "$id": "24", "name": "name" } } @@ -43,7 +189,7 @@ ] }, { - "$id": "7", + "$id": "25", "kind": "model", "name": "SpreadCompositeRequestMixRequest", "namespace": "", @@ -52,12 +198,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "26", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "9", + "$id": "27", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -70,9 +216,9 @@ "decorators": [], "crossLanguageDefinitionId": "spreadCompositeRequestMix.Request.anonymous.prop", "serializationOptions": { - "$id": "10", + "$id": "28", "json": { - "$id": "11", + "$id": "29", "name": "prop" } } @@ -80,7 +226,7 @@ ] }, { - "$id": "12", + "$id": "30", "kind": "model", "name": "SpreadAsRequestBodyRequest", "namespace": "Parameters.Spread", @@ -89,12 +235,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "31", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "14", + "$id": "32", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -107,9 +253,9 @@ "decorators": [], "crossLanguageDefinitionId": "Parameters.Spread.Alias.spreadAsRequestBody.name", "serializationOptions": { - "$id": "15", + "$id": "33", "json": { - "$id": "16", + "$id": "34", "name": "name" } } @@ -117,7 +263,7 @@ ] }, { - "$id": "17", + "$id": "35", "kind": "model", "name": "SpreadParameterWithInnerModelRequest", "namespace": "", @@ -126,12 +272,12 @@ "decorators": [], "properties": [ { - "$id": "18", + "$id": "36", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "19", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -144,9 +290,9 @@ "decorators": [], "crossLanguageDefinitionId": "spreadParameterWithInnerModel.Request.anonymous.name", "serializationOptions": { - "$id": "20", + "$id": "38", "json": { - "$id": "21", + "$id": "39", "name": "name" } } @@ -154,7 +300,7 @@ ] }, { - "$id": "22", + "$id": "40", "kind": "model", "name": "SpreadAsRequestParameterRequest", "namespace": "", @@ -163,12 +309,12 @@ "decorators": [], "properties": [ { - "$id": "23", + "$id": "41", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "24", + "$id": "42", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -181,9 +327,9 @@ "decorators": [], "crossLanguageDefinitionId": "spreadAsRequestParameter.Request.anonymous.name", "serializationOptions": { - "$id": "25", + "$id": "43", "json": { - "$id": "26", + "$id": "44", "name": "name" } } @@ -191,7 +337,7 @@ ] }, { - "$id": "27", + "$id": "45", "kind": "model", "name": "SpreadWithMultipleParametersRequest", "namespace": "", @@ -200,13 +346,13 @@ "decorators": [], "properties": [ { - "$id": "28", + "$id": "46", "kind": "property", "name": "requiredString", "serializedName": "requiredString", "doc": "required string", "type": { - "$id": "29", + "$id": "47", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -219,21 +365,21 @@ "decorators": [], "crossLanguageDefinitionId": "spreadWithMultipleParameters.Request.anonymous.requiredString", "serializationOptions": { - "$id": "30", + "$id": "48", "json": { - "$id": "31", + "$id": "49", "name": "requiredString" } } }, { - "$id": "32", + "$id": "50", "kind": "property", "name": "optionalInt", "serializedName": "optionalInt", "doc": "optional int", "type": { - "$id": "33", + "$id": "51", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -246,25 +392,25 @@ "decorators": [], "crossLanguageDefinitionId": "spreadWithMultipleParameters.Request.anonymous.optionalInt", "serializationOptions": { - "$id": "34", + "$id": "52", "json": { - "$id": "35", + "$id": "53", "name": "optionalInt" } } }, { - "$id": "36", + "$id": "54", "kind": "property", "name": "requiredIntList", "serializedName": "requiredIntList", "doc": "required int", "type": { - "$id": "37", + "$id": "55", "kind": "array", "name": "Array", "valueType": { - "$id": "38", + "$id": "56", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -280,25 +426,25 @@ "decorators": [], "crossLanguageDefinitionId": "spreadWithMultipleParameters.Request.anonymous.requiredIntList", "serializationOptions": { - "$id": "39", + "$id": "57", "json": { - "$id": "40", + "$id": "58", "name": "requiredIntList" } } }, { - "$id": "41", + "$id": "59", "kind": "property", "name": "optionalStringList", "serializedName": "optionalStringList", "doc": "optional string", "type": { - "$id": "42", + "$id": "60", "kind": "array", "name": "Array1", "valueType": { - "$id": "43", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -314,9 +460,9 @@ "decorators": [], "crossLanguageDefinitionId": "spreadWithMultipleParameters.Request.anonymous.optionalStringList", "serializationOptions": { - "$id": "44", + "$id": "62", "json": { - "$id": "45", + "$id": "63", "name": "optionalStringList" } } @@ -324,7 +470,7 @@ ] }, { - "$id": "46", + "$id": "64", "kind": "model", "name": "SpreadParameterWithInnerAliasRequest", "namespace": "", @@ -333,13 +479,13 @@ "decorators": [], "properties": [ { - "$id": "47", + "$id": "65", "kind": "property", "name": "name", "serializedName": "name", "doc": "name of the Thing", "type": { - "$id": "48", + "$id": "66", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -352,21 +498,21 @@ "decorators": [], "crossLanguageDefinitionId": "spreadParameterWithInnerAlias.Request.anonymous.name", "serializationOptions": { - "$id": "49", + "$id": "67", "json": { - "$id": "50", + "$id": "68", "name": "name" } } }, { - "$id": "51", + "$id": "69", "kind": "property", "name": "age", "serializedName": "age", "doc": "age of the Thing", "type": { - "$id": "52", + "$id": "70", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -379,9 +525,9 @@ "decorators": [], "crossLanguageDefinitionId": "spreadParameterWithInnerAlias.Request.anonymous.age", "serializationOptions": { - "$id": "53", + "$id": "71", "json": { - "$id": "54", + "$id": "72", "name": "age" } } @@ -391,7 +537,7 @@ ], "clients": [ { - "$id": "55", + "$id": "73", "kind": "client", "name": "SpreadClient", "namespace": "Parameters.Spread", @@ -399,12 +545,12 @@ "methods": [], "parameters": [ { - "$id": "56", + "$id": "74", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "57", + "$id": "75", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -418,9 +564,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "58", + "$id": "76", "type": { - "$id": "59", + "$id": "77", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -434,40 +580,30 @@ "apiVersions": [], "children": [ { - "$id": "60", + "$id": "78", "kind": "client", "name": "Model", "namespace": "Parameters.Spread", "methods": [ { - "$id": "61", + "$id": "79", "kind": "basic", "name": "spreadAsRequestBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "62", + "$id": "80", "name": "spreadAsRequestBody", "resourceName": "Model", "accessibility": "public", "parameters": [ { - "$id": "63", + "$id": "81", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "64", - "kind": "constant", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -480,11 +616,11 @@ "skipUrlEncoding": false }, { - "$id": "66", + "$id": "82", "name": "bodyParameter", "nameInRequest": "bodyParameter", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -499,7 +635,7 @@ ], "responses": [ { - "$id": "67", + "$id": "83", "statusCodes": [ 204 ], @@ -521,11 +657,11 @@ }, "parameters": [ { - "$id": "68", + "$id": "84", "name": "name", "nameInRequest": "name", "type": { - "$id": "69", + "$id": "85", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -542,12 +678,12 @@ "skipUrlEncoding": false }, { - "$id": "70", + "$id": "86", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "64" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -561,7 +697,7 @@ } ], "response": { - "$id": "71" + "$id": "87" }, "isOverride": false, "generateConvenient": true, @@ -569,34 +705,24 @@ "crossLanguageDefinitionId": "Parameters.Spread.Model.spreadAsRequestBody" }, { - "$id": "72", + "$id": "88", "kind": "basic", "name": "spreadCompositeRequestOnlyWithBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "73", + "$id": "89", "name": "spreadCompositeRequestOnlyWithBody", "resourceName": "Model", "accessibility": "public", "parameters": [ { - "$id": "74", + "$id": "90", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "75", - "kind": "constant", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -609,11 +735,11 @@ "skipUrlEncoding": false }, { - "$id": "77", + "$id": "91", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -628,7 +754,7 @@ ], "responses": [ { - "$id": "78", + "$id": "92", "statusCodes": [ 204 ], @@ -650,11 +776,11 @@ }, "parameters": [ { - "$id": "79", + "$id": "93", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -667,12 +793,12 @@ "skipUrlEncoding": false }, { - "$id": "80", + "$id": "94", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "75" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -686,7 +812,7 @@ } ], "response": { - "$id": "81" + "$id": "95" }, "isOverride": false, "generateConvenient": true, @@ -694,23 +820,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Model.spreadCompositeRequestOnlyWithBody" }, { - "$id": "82", + "$id": "96", "kind": "basic", "name": "spreadCompositeRequestWithoutBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "83", + "$id": "97", "name": "spreadCompositeRequestWithoutBody", "resourceName": "Model", "accessibility": "public", "parameters": [ { - "$id": "84", + "$id": "98", "name": "name", "nameInRequest": "name", "type": { - "$id": "85", + "$id": "99", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -727,11 +853,11 @@ "skipUrlEncoding": false }, { - "$id": "86", + "$id": "100", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "87", + "$id": "101", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -750,7 +876,7 @@ ], "responses": [ { - "$id": "88", + "$id": "102", "statusCodes": [ 204 ], @@ -769,11 +895,11 @@ }, "parameters": [ { - "$id": "89", + "$id": "103", "name": "name", "nameInRequest": "name", "type": { - "$id": "90", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -790,11 +916,11 @@ "skipUrlEncoding": false }, { - "$id": "91", + "$id": "105", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "92", + "$id": "106", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -812,7 +938,7 @@ } ], "response": { - "$id": "93" + "$id": "107" }, "isOverride": false, "generateConvenient": true, @@ -820,23 +946,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Model.spreadCompositeRequestWithoutBody" }, { - "$id": "94", + "$id": "108", "kind": "basic", "name": "spreadCompositeRequest", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "95", + "$id": "109", "name": "spreadCompositeRequest", "resourceName": "Model", "accessibility": "public", "parameters": [ { - "$id": "96", + "$id": "110", "name": "name", "nameInRequest": "name", "type": { - "$id": "97", + "$id": "111", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -853,11 +979,11 @@ "skipUrlEncoding": false }, { - "$id": "98", + "$id": "112", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "99", + "$id": "113", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -874,22 +1000,12 @@ "skipUrlEncoding": false }, { - "$id": "100", + "$id": "114", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "101", - "kind": "constant", - "valueType": { - "$id": "102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -902,11 +1018,11 @@ "skipUrlEncoding": false }, { - "$id": "103", + "$id": "115", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -921,7 +1037,7 @@ ], "responses": [ { - "$id": "104", + "$id": "116", "statusCodes": [ 204 ], @@ -943,11 +1059,11 @@ }, "parameters": [ { - "$id": "105", + "$id": "117", "name": "name", "nameInRequest": "name", "type": { - "$id": "106", + "$id": "118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -964,11 +1080,11 @@ "skipUrlEncoding": false }, { - "$id": "107", + "$id": "119", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "108", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -985,11 +1101,11 @@ "skipUrlEncoding": false }, { - "$id": "109", + "$id": "121", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -1002,12 +1118,12 @@ "skipUrlEncoding": false }, { - "$id": "110", + "$id": "122", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "101" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1021,7 +1137,7 @@ } ], "response": { - "$id": "111" + "$id": "123" }, "isOverride": false, "generateConvenient": true, @@ -1029,23 +1145,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Model.spreadCompositeRequest" }, { - "$id": "112", + "$id": "124", "kind": "basic", "name": "spreadCompositeRequestMix", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "113", + "$id": "125", "name": "spreadCompositeRequestMix", "resourceName": "Model", "accessibility": "public", "parameters": [ { - "$id": "114", + "$id": "126", "name": "name", "nameInRequest": "name", "type": { - "$id": "115", + "$id": "127", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1062,11 +1178,11 @@ "skipUrlEncoding": false }, { - "$id": "116", + "$id": "128", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "117", + "$id": "129", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1083,22 +1199,12 @@ "skipUrlEncoding": false }, { - "$id": "118", + "$id": "130", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "119", - "kind": "constant", - "valueType": { - "$id": "120", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1111,11 +1217,11 @@ "skipUrlEncoding": false }, { - "$id": "121", + "$id": "131", "name": "spreadCompositeRequestMixRequest", "nameInRequest": "spreadCompositeRequestMixRequest", "type": { - "$ref": "7" + "$ref": "25" }, "location": "Body", "isApiVersion": false, @@ -1130,7 +1236,7 @@ ], "responses": [ { - "$id": "122", + "$id": "132", "statusCodes": [ 204 ], @@ -1152,11 +1258,11 @@ }, "parameters": [ { - "$id": "123", + "$id": "133", "name": "name", "nameInRequest": "name", "type": { - "$id": "124", + "$id": "134", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1173,11 +1279,11 @@ "skipUrlEncoding": false }, { - "$id": "125", + "$id": "135", "name": "testHeader", "nameInRequest": "test-header", "type": { - "$id": "126", + "$id": "136", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1194,11 +1300,11 @@ "skipUrlEncoding": false }, { - "$id": "127", + "$id": "137", "name": "prop", "nameInRequest": "prop", "type": { - "$id": "128", + "$id": "138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1215,12 +1321,12 @@ "skipUrlEncoding": false }, { - "$id": "129", + "$id": "139", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "119" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1234,7 +1340,7 @@ } ], "response": { - "$id": "130" + "$id": "140" }, "isOverride": false, "generateConvenient": true, @@ -1244,12 +1350,12 @@ ], "parameters": [ { - "$id": "131", + "$id": "141", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "132", + "$id": "142", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1263,9 +1369,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "133", + "$id": "143", "type": { - "$id": "134", + "$id": "144", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1278,44 +1384,34 @@ "crossLanguageDefinitionId": "Parameters.Spread.Model", "apiVersions": [], "parent": { - "$ref": "55" + "$ref": "73" } }, { - "$id": "135", + "$id": "145", "kind": "client", "name": "Alias", "namespace": "Parameters.Spread", "methods": [ { - "$id": "136", + "$id": "146", "kind": "basic", "name": "spreadAsRequestBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "137", + "$id": "147", "name": "spreadAsRequestBody", "resourceName": "Alias", "accessibility": "public", "parameters": [ { - "$id": "138", + "$id": "148", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "139", - "kind": "constant", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1328,11 +1424,11 @@ "skipUrlEncoding": false }, { - "$id": "141", + "$id": "149", "name": "spreadAsRequestBodyRequest", "nameInRequest": "spreadAsRequestBodyRequest", "type": { - "$ref": "12" + "$ref": "30" }, "location": "Body", "isApiVersion": false, @@ -1347,7 +1443,7 @@ ], "responses": [ { - "$id": "142", + "$id": "150", "statusCodes": [ 204 ], @@ -1369,11 +1465,11 @@ }, "parameters": [ { - "$id": "143", + "$id": "151", "name": "name", "nameInRequest": "name", "type": { - "$ref": "14" + "$ref": "32" }, "location": "Body", "isApiVersion": false, @@ -1386,12 +1482,12 @@ "skipUrlEncoding": false }, { - "$id": "144", + "$id": "152", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "139" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1405,7 +1501,7 @@ } ], "response": { - "$id": "145" + "$id": "153" }, "isOverride": false, "generateConvenient": true, @@ -1413,23 +1509,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Alias.spreadAsRequestBody" }, { - "$id": "146", + "$id": "154", "kind": "basic", "name": "spreadParameterWithInnerModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "147", + "$id": "155", "name": "spreadParameterWithInnerModel", "resourceName": "Alias", "accessibility": "public", "parameters": [ { - "$id": "148", + "$id": "156", "name": "id", "nameInRequest": "id", "type": { - "$id": "149", + "$id": "157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1446,11 +1542,11 @@ "skipUrlEncoding": false }, { - "$id": "150", + "$id": "158", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "151", + "$id": "159", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1467,22 +1563,12 @@ "skipUrlEncoding": false }, { - "$id": "152", + "$id": "160", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "153", - "kind": "constant", - "valueType": { - "$id": "154", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1495,11 +1581,11 @@ "skipUrlEncoding": false }, { - "$id": "155", + "$id": "161", "name": "spreadParameterWithInnerModelRequest", "nameInRequest": "spreadParameterWithInnerModelRequest", "type": { - "$ref": "17" + "$ref": "35" }, "location": "Body", "isApiVersion": false, @@ -1514,7 +1600,7 @@ ], "responses": [ { - "$id": "156", + "$id": "162", "statusCodes": [ 204 ], @@ -1536,11 +1622,11 @@ }, "parameters": [ { - "$id": "157", + "$id": "163", "name": "id", "nameInRequest": "id", "type": { - "$id": "158", + "$id": "164", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1557,11 +1643,11 @@ "skipUrlEncoding": false }, { - "$id": "159", + "$id": "165", "name": "name", "nameInRequest": "name", "type": { - "$id": "160", + "$id": "166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1578,11 +1664,11 @@ "skipUrlEncoding": false }, { - "$id": "161", + "$id": "167", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "162", + "$id": "168", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1599,12 +1685,12 @@ "skipUrlEncoding": false }, { - "$id": "163", + "$id": "169", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "153" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1618,7 +1704,7 @@ } ], "response": { - "$id": "164" + "$id": "170" }, "isOverride": false, "generateConvenient": true, @@ -1626,23 +1712,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Alias.spreadParameterWithInnerModel" }, { - "$id": "165", + "$id": "171", "kind": "basic", "name": "spreadAsRequestParameter", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "166", + "$id": "172", "name": "spreadAsRequestParameter", "resourceName": "Alias", "accessibility": "public", "parameters": [ { - "$id": "167", + "$id": "173", "name": "id", "nameInRequest": "id", "type": { - "$id": "168", + "$id": "174", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1659,11 +1745,11 @@ "skipUrlEncoding": false }, { - "$id": "169", + "$id": "175", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "170", + "$id": "176", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1680,22 +1766,12 @@ "skipUrlEncoding": false }, { - "$id": "171", + "$id": "177", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "172", - "kind": "constant", - "valueType": { - "$id": "173", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1708,11 +1784,11 @@ "skipUrlEncoding": false }, { - "$id": "174", + "$id": "178", "name": "spreadAsRequestParameterRequest", "nameInRequest": "spreadAsRequestParameterRequest", "type": { - "$ref": "22" + "$ref": "40" }, "location": "Body", "isApiVersion": false, @@ -1727,7 +1803,7 @@ ], "responses": [ { - "$id": "175", + "$id": "179", "statusCodes": [ 204 ], @@ -1749,11 +1825,11 @@ }, "parameters": [ { - "$id": "176", + "$id": "180", "name": "id", "nameInRequest": "id", "type": { - "$id": "177", + "$id": "181", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1770,11 +1846,11 @@ "skipUrlEncoding": false }, { - "$id": "178", + "$id": "182", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "179", + "$id": "183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1791,11 +1867,11 @@ "skipUrlEncoding": false }, { - "$id": "180", + "$id": "184", "name": "name", "nameInRequest": "name", "type": { - "$id": "181", + "$id": "185", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1812,12 +1888,12 @@ "skipUrlEncoding": false }, { - "$id": "182", + "$id": "186", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "172" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1831,7 +1907,7 @@ } ], "response": { - "$id": "183" + "$id": "187" }, "isOverride": false, "generateConvenient": true, @@ -1839,23 +1915,23 @@ "crossLanguageDefinitionId": "Parameters.Spread.Alias.spreadAsRequestParameter" }, { - "$id": "184", + "$id": "188", "kind": "basic", "name": "spreadWithMultipleParameters", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "185", + "$id": "189", "name": "spreadWithMultipleParameters", "resourceName": "Alias", "accessibility": "public", "parameters": [ { - "$id": "186", + "$id": "190", "name": "id", "nameInRequest": "id", "type": { - "$id": "187", + "$id": "191", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1872,11 +1948,11 @@ "skipUrlEncoding": false }, { - "$id": "188", + "$id": "192", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "189", + "$id": "193", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1893,22 +1969,12 @@ "skipUrlEncoding": false }, { - "$id": "190", + "$id": "194", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "191", - "kind": "constant", - "valueType": { - "$id": "192", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1921,11 +1987,11 @@ "skipUrlEncoding": false }, { - "$id": "193", + "$id": "195", "name": "spreadWithMultipleParametersRequest", "nameInRequest": "spreadWithMultipleParametersRequest", "type": { - "$ref": "27" + "$ref": "45" }, "location": "Body", "isApiVersion": false, @@ -1940,7 +2006,7 @@ ], "responses": [ { - "$id": "194", + "$id": "196", "statusCodes": [ 204 ], @@ -1962,11 +2028,11 @@ }, "parameters": [ { - "$id": "195", + "$id": "197", "name": "id", "nameInRequest": "id", "type": { - "$id": "196", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1983,11 +2049,11 @@ "skipUrlEncoding": false }, { - "$id": "197", + "$id": "199", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "198", + "$id": "200", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2004,12 +2070,12 @@ "skipUrlEncoding": false }, { - "$id": "199", + "$id": "201", "name": "requiredString", "nameInRequest": "requiredString", "doc": "required string", "type": { - "$id": "200", + "$id": "202", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2026,12 +2092,12 @@ "skipUrlEncoding": false }, { - "$id": "201", + "$id": "203", "name": "optionalInt", "nameInRequest": "optionalInt", "doc": "optional int", "type": { - "$id": "202", + "$id": "204", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2048,16 +2114,16 @@ "skipUrlEncoding": false }, { - "$id": "203", + "$id": "205", "name": "requiredIntList", "nameInRequest": "requiredIntList", "doc": "required int", "type": { - "$id": "204", + "$id": "206", "kind": "array", "name": "Array", "valueType": { - "$id": "205", + "$id": "207", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -2077,16 +2143,16 @@ "skipUrlEncoding": false }, { - "$id": "206", + "$id": "208", "name": "optionalStringList", "nameInRequest": "optionalStringList", "doc": "optional string", "type": { - "$id": "207", + "$id": "209", "kind": "array", "name": "Array1", "valueType": { - "$id": "208", + "$id": "210", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2106,12 +2172,12 @@ "skipUrlEncoding": false }, { - "$id": "209", + "$id": "211", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "191" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -2125,7 +2191,7 @@ } ], "response": { - "$id": "210" + "$id": "212" }, "isOverride": false, "generateConvenient": true, @@ -2133,25 +2199,25 @@ "crossLanguageDefinitionId": "Parameters.Spread.Alias.spreadWithMultipleParameters" }, { - "$id": "211", + "$id": "213", "kind": "basic", "name": "spreadParameterWithInnerAlias", "accessibility": "public", "apiVersions": [], "doc": "spread an alias with contains another alias property as body.", "operation": { - "$id": "212", + "$id": "214", "name": "spreadParameterWithInnerAlias", "resourceName": "Alias", "doc": "spread an alias with contains another alias property as body.", "accessibility": "public", "parameters": [ { - "$id": "213", + "$id": "215", "name": "id", "nameInRequest": "id", "type": { - "$id": "214", + "$id": "216", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2168,11 +2234,11 @@ "skipUrlEncoding": false }, { - "$id": "215", + "$id": "217", "name": "x-ms-test-header", "nameInRequest": "x-ms-test-header", "type": { - "$id": "216", + "$id": "218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2189,22 +2255,12 @@ "skipUrlEncoding": false }, { - "$id": "217", + "$id": "219", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "218", - "kind": "constant", - "valueType": { - "$id": "219", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2221,7 +2277,7 @@ "name": "spreadParameterWithInnerAliasRequest", "nameInRequest": "spreadParameterWithInnerAliasRequest", "type": { - "$ref": "46" + "$ref": "64" }, "location": "Body", "isApiVersion": false, @@ -2349,7 +2405,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "218" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2407,7 +2463,7 @@ "crossLanguageDefinitionId": "Parameters.Spread.Alias", "apiVersions": [], "parent": { - "$ref": "55" + "$ref": "73" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJson.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJson.cs index d4bb0f35cb35..a14faabb6e7f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJson.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJson.cs @@ -11,7 +11,7 @@ namespace Payload.ContentNegotiation._DifferentBody { public partial class PngImageAsJson { - public PngImageAsJsonContentType ContentType => throw null; + public string ContentType => throw null; public BinaryData Content => throw null; } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJsonContentType.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJsonContentType.cs deleted file mode 100644 index cd5d3027ec7d..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/Models/PngImageAsJsonContentType.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Payload.ContentNegotiation._DifferentBody -{ - public readonly partial struct PngImageAsJsonContentType : IEquatable - { - public PngImageAsJsonContentType(string value) => throw null; - - public static PngImageAsJsonContentType ApplicationJson => throw null; - - public static bool operator ==(PngImageAsJsonContentType left, PngImageAsJsonContentType right) => throw null; - - public static bool operator !=(PngImageAsJsonContentType left, PngImageAsJsonContentType right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator PngImageAsJsonContentType(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(PngImageAsJsonContentType other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/PayloadContentNegotiationModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/PayloadContentNegotiationModelFactory.cs index b3dc0a521f95..2814b61f9579 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/PayloadContentNegotiationModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Generated/PayloadContentNegotiationModelFactory.cs @@ -12,6 +12,6 @@ namespace Payload.ContentNegotiation { public static partial class PayloadContentNegotiationModelFactory { - public static PngImageAsJson PngImageAsJson(PngImageAsJsonContentType contentType = default, BinaryData content = default) => throw null; + public static PngImageAsJson PngImageAsJson(string contentType = default, BinaryData content = default) => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj index c644c4891a04..4949def38e20 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/src/Payload.ContentNegotiation.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json index 0064745e5f0f..08ee18779fcf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/content-negotiation/tspCodeModel.json @@ -2,11 +2,14 @@ "$id": "1", "name": "Payload.ContentNegotiation", "apiVersions": [], - "enums": [ + "enums": [], + "constants": [ { "$id": "2", - "kind": "enum", - "name": "PngImageAsJson_content-type", + "kind": "constant", + "name": "PngImageAsJsonContentType", + "namespace": "Payload.ContentNegotiation.DifferentBody", + "usage": "Output,Json", "valueType": { "$id": "3", "kind": "string", @@ -14,33 +17,205 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "application/json", - "value": "application/json", - "doc": "application/json", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Payload.ContentNegotiation.DifferentBody", - "doc": "The PngImageAsJson_content-type", - "isFixed": false, - "isFlags": false, - "usage": "Output,Json", + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "PngImageContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "PngImageContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "PngImageContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "JpegImageContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/jpeg", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "JpegImageContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/jpeg", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "JpegImageContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/jpeg", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "PngImageContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "PngImageContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "PngImageContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "image/png", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "PngImageAsJsonContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "PngImageAsJsonContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "PngImageAsJsonContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "5", + "$id": "28", "kind": "model", "name": "PngImageAsJson", "namespace": "Payload.ContentNegotiation.DifferentBody", @@ -49,33 +224,26 @@ "decorators": [], "properties": [ { - "$id": "6", + "$id": "29", "kind": "header", "name": "contentType", "serializedName": "content-type", "type": { - "$id": "7", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "optional": false, "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Payload.ContentNegotiation.DifferentBody.PngImageAsJson.contentType", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] }, { - "$id": "8", + "$id": "30", "kind": "property", "name": "content", "serializedName": "content", "type": { - "$id": "9", + "$id": "31", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -89,9 +257,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.ContentNegotiation.DifferentBody.PngImageAsJson.content", "serializationOptions": { - "$id": "10", + "$id": "32", "json": { - "$id": "11", + "$id": "33", "name": "content" } } @@ -101,7 +269,7 @@ ], "clients": [ { - "$id": "12", + "$id": "34", "kind": "client", "name": "ContentNegotiationClient", "namespace": "Payload.ContentNegotiation", @@ -109,12 +277,12 @@ "methods": [], "parameters": [ { - "$id": "13", + "$id": "35", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "14", + "$id": "36", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -128,9 +296,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "15", + "$id": "37", "type": { - "$id": "16", + "$id": "38", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -144,39 +312,29 @@ "apiVersions": [], "children": [ { - "$id": "17", + "$id": "39", "kind": "client", "name": "SameBody", "namespace": "Payload.ContentNegotiation.SameBody", "methods": [ { - "$id": "18", + "$id": "40", "kind": "basic", "name": "getAvatarAsPng", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "41", "name": "getAvatarAsPng", "resourceName": "SameBody", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "42", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -191,12 +349,12 @@ ], "responses": [ { - "$id": "23", + "$id": "43", "statusCodes": [ 200 ], "bodyType": { - "$id": "24", + "$id": "44", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -204,21 +362,11 @@ }, "headers": [ { - "$id": "25", + "$id": "45", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "26", - "kind": "constant", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "6" } } ], @@ -239,21 +387,11 @@ }, "parameters": [ { - "$id": "28", + "$id": "46", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "29", - "kind": "constant", - "valueType": { - "$id": "30", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -267,9 +405,9 @@ } ], "response": { - "$id": "31", + "$id": "47", "type": { - "$ref": "24" + "$ref": "44" } }, "isOverride": false, @@ -278,33 +416,23 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.SameBody.getAvatarAsPng" }, { - "$id": "32", + "$id": "48", "kind": "basic", "name": "getAvatarAsJpeg", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "33", + "$id": "49", "name": "getAvatarAsJpeg", "resourceName": "SameBody", "accessibility": "public", "parameters": [ { - "$id": "34", + "$id": "50", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "35", - "kind": "constant", - "valueType": { - "$id": "36", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/jpeg", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -319,12 +447,12 @@ ], "responses": [ { - "$id": "37", + "$id": "51", "statusCodes": [ 200 ], "bodyType": { - "$id": "38", + "$id": "52", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -332,21 +460,11 @@ }, "headers": [ { - "$id": "39", + "$id": "53", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "40", - "kind": "constant", - "valueType": { - "$id": "41", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/jpeg", - "decorators": [] + "$ref": "12" } } ], @@ -367,21 +485,11 @@ }, "parameters": [ { - "$id": "42", + "$id": "54", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "43", - "kind": "constant", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/jpeg", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -395,9 +503,9 @@ } ], "response": { - "$id": "45", + "$id": "55", "type": { - "$ref": "38" + "$ref": "52" } }, "isOverride": false, @@ -408,12 +516,12 @@ ], "parameters": [ { - "$id": "46", + "$id": "56", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "47", + "$id": "57", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -427,9 +535,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "48", + "$id": "58", "type": { - "$id": "49", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -442,43 +550,33 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.SameBody", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "34" } }, { - "$id": "50", + "$id": "60", "kind": "client", "name": "DifferentBody", "namespace": "Payload.ContentNegotiation.DifferentBody", "methods": [ { - "$id": "51", + "$id": "61", "kind": "basic", "name": "getAvatarAsPng", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "52", + "$id": "62", "name": "getAvatarAsPng", "resourceName": "DifferentBody", "accessibility": "public", "parameters": [ { - "$id": "53", + "$id": "63", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "54", - "kind": "constant", - "valueType": { - "$id": "55", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -493,12 +591,12 @@ ], "responses": [ { - "$id": "56", + "$id": "64", "statusCodes": [ 200 ], "bodyType": { - "$id": "57", + "$id": "65", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "TypeSpec.bytes", @@ -506,21 +604,11 @@ }, "headers": [ { - "$id": "58", + "$id": "66", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "59", - "kind": "constant", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "18" } } ], @@ -541,21 +629,11 @@ }, "parameters": [ { - "$id": "61", + "$id": "67", "name": "accept", "nameInRequest": "accept", "type": { - "$id": "62", - "kind": "constant", - "valueType": { - "$id": "63", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "image/png", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -569,9 +647,9 @@ } ], "response": { - "$id": "64", + "$id": "68", "type": { - "$ref": "57" + "$ref": "65" } }, "isOverride": false, @@ -580,33 +658,23 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.DifferentBody.getAvatarAsPng" }, { - "$id": "65", + "$id": "69", "kind": "basic", "name": "getAvatarAsJson", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "66", + "$id": "70", "name": "getAvatarAsJson", "resourceName": "DifferentBody", "accessibility": "public", "parameters": [ { - "$id": "67", + "$id": "71", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "68", - "kind": "constant", - "valueType": { - "$id": "69", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -621,30 +689,20 @@ ], "responses": [ { - "$id": "70", + "$id": "72", "statusCodes": [ 200 ], "bodyType": { - "$ref": "5" + "$ref": "28" }, "headers": [ { - "$id": "71", + "$id": "73", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "72", - "kind": "constant", - "valueType": { - "$id": "73", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" } } ], @@ -669,17 +727,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$id": "75", - "kind": "constant", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -693,9 +741,9 @@ } ], "response": { - "$id": "77", + "$id": "75", "type": { - "$ref": "5" + "$ref": "28" } }, "isOverride": false, @@ -706,12 +754,12 @@ ], "parameters": [ { - "$id": "78", + "$id": "76", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "79", + "$id": "77", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -725,9 +773,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "80", + "$id": "78", "type": { - "$id": "81", + "$id": "79", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -740,7 +788,7 @@ "crossLanguageDefinitionId": "Payload.ContentNegotiation.DifferentBody", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "34" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj index 3ef41acc03d7..1e6865f5805a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/src/Payload.JsonMergePatch.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json index edc8e5fcca86..b2f8eac47b6d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/json-merge-patch/tspCodeModel.json @@ -3,9 +3,139 @@ "name": "Payload.JsonMergePatch", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "createResourceContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "createResourceContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "UpdateResourceRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "updateResourceContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "UpdateResourceRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "UpdateResourceRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "updateOptionalResourceContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "UpdateResourceRequestContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + } + ], + "models": [ + { + "$id": "18", "kind": "model", "name": "Resource", "namespace": "Payload.JsonMergePatch", @@ -15,12 +145,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "19", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "20", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,20 +163,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.name", "serializationOptions": { - "$id": "5", + "$id": "21", "json": { - "$id": "6", + "$id": "22", "name": "name" } } }, { - "$id": "7", + "$id": "23", "kind": "property", "name": "description", "serializedName": "description", "type": { - "$id": "8", + "$id": "24", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -59,30 +189,30 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.description", "serializationOptions": { - "$id": "9", + "$id": "25", "json": { - "$id": "10", + "$id": "26", "name": "description" } } }, { - "$id": "11", + "$id": "27", "kind": "property", "name": "map", "serializedName": "map", "type": { - "$id": "12", + "$id": "28", "kind": "dict", "keyType": { - "$id": "13", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "14", + "$id": "30", "kind": "model", "name": "InnerModel", "namespace": "Payload.JsonMergePatch", @@ -92,12 +222,12 @@ "decorators": [], "properties": [ { - "$id": "15", + "$id": "31", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "16", + "$id": "32", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -110,20 +240,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.InnerModel.name", "serializationOptions": { - "$id": "17", + "$id": "33", "json": { - "$id": "18", + "$id": "34", "name": "name" } } }, { - "$id": "19", + "$id": "35", "kind": "property", "name": "description", "serializedName": "description", "type": { - "$id": "20", + "$id": "36", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -136,9 +266,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.InnerModel.description", "serializationOptions": { - "$id": "21", + "$id": "37", "json": { - "$id": "22", + "$id": "38", "name": "description" } } @@ -154,24 +284,24 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.map", "serializationOptions": { - "$id": "23", + "$id": "39", "json": { - "$id": "24", + "$id": "40", "name": "map" } } }, { - "$id": "25", + "$id": "41", "kind": "property", "name": "array", "serializedName": "array", "type": { - "$id": "26", + "$id": "42", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "14" + "$ref": "30" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -183,20 +313,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.array", "serializationOptions": { - "$id": "27", + "$id": "43", "json": { - "$id": "28", + "$id": "44", "name": "array" } } }, { - "$id": "29", + "$id": "45", "kind": "property", "name": "intValue", "serializedName": "intValue", "type": { - "$id": "30", + "$id": "46", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -209,20 +339,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.intValue", "serializationOptions": { - "$id": "31", + "$id": "47", "json": { - "$id": "32", + "$id": "48", "name": "intValue" } } }, { - "$id": "33", + "$id": "49", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "type": { - "$id": "34", + "$id": "50", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -235,20 +365,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.floatValue", "serializationOptions": { - "$id": "35", + "$id": "51", "json": { - "$id": "36", + "$id": "52", "name": "floatValue" } } }, { - "$id": "37", + "$id": "53", "kind": "property", "name": "innerModel", "serializedName": "innerModel", "type": { - "$ref": "14" + "$ref": "30" }, "optional": true, "readOnly": false, @@ -257,24 +387,24 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.innerModel", "serializationOptions": { - "$id": "38", + "$id": "54", "json": { - "$id": "39", + "$id": "55", "name": "innerModel" } } }, { - "$id": "40", + "$id": "56", "kind": "property", "name": "intArray", "serializedName": "intArray", "type": { - "$id": "41", + "$id": "57", "kind": "array", "name": "Array", "valueType": { - "$id": "42", + "$id": "58", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -290,9 +420,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.Resource.intArray", "serializationOptions": { - "$id": "43", + "$id": "59", "json": { - "$id": "44", + "$id": "60", "name": "intArray" } } @@ -300,10 +430,10 @@ ] }, { - "$ref": "14" + "$ref": "30" }, { - "$id": "45", + "$id": "61", "kind": "model", "name": "ResourcePatch", "namespace": "Payload.JsonMergePatch", @@ -313,12 +443,12 @@ "decorators": [], "properties": [ { - "$id": "46", + "$id": "62", "kind": "property", "name": "description", "serializedName": "description", "type": { - "$id": "47", + "$id": "63", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -331,30 +461,30 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.description", "serializationOptions": { - "$id": "48", + "$id": "64", "json": { - "$id": "49", + "$id": "65", "name": "description" } } }, { - "$id": "50", + "$id": "66", "kind": "property", "name": "map", "serializedName": "map", "type": { - "$id": "51", + "$id": "67", "kind": "dict", "keyType": { - "$id": "52", + "$id": "68", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "14" + "$ref": "30" }, "decorators": [] }, @@ -365,24 +495,24 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.map", "serializationOptions": { - "$id": "53", + "$id": "69", "json": { - "$id": "54", + "$id": "70", "name": "map" } } }, { - "$id": "55", + "$id": "71", "kind": "property", "name": "array", "serializedName": "array", "type": { - "$id": "56", + "$id": "72", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "14" + "$ref": "30" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -394,20 +524,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.array", "serializationOptions": { - "$id": "57", + "$id": "73", "json": { - "$id": "58", + "$id": "74", "name": "array" } } }, { - "$id": "59", + "$id": "75", "kind": "property", "name": "intValue", "serializedName": "intValue", "type": { - "$id": "60", + "$id": "76", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -420,20 +550,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.intValue", "serializationOptions": { - "$id": "61", + "$id": "77", "json": { - "$id": "62", + "$id": "78", "name": "intValue" } } }, { - "$id": "63", + "$id": "79", "kind": "property", "name": "floatValue", "serializedName": "floatValue", "type": { - "$id": "64", + "$id": "80", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -446,20 +576,20 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.floatValue", "serializationOptions": { - "$id": "65", + "$id": "81", "json": { - "$id": "66", + "$id": "82", "name": "floatValue" } } }, { - "$id": "67", + "$id": "83", "kind": "property", "name": "innerModel", "serializedName": "innerModel", "type": { - "$ref": "14" + "$ref": "30" }, "optional": true, "readOnly": false, @@ -468,24 +598,24 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.innerModel", "serializationOptions": { - "$id": "68", + "$id": "84", "json": { - "$id": "69", + "$id": "85", "name": "innerModel" } } }, { - "$id": "70", + "$id": "86", "kind": "property", "name": "intArray", "serializedName": "intArray", "type": { - "$id": "71", + "$id": "87", "kind": "array", "name": "Array", "valueType": { - "$id": "72", + "$id": "88", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -501,9 +631,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.JsonMergePatch.ResourcePatch.intArray", "serializationOptions": { - "$id": "73", + "$id": "89", "json": { - "$id": "74", + "$id": "90", "name": "intArray" } } @@ -513,43 +643,33 @@ ], "clients": [ { - "$id": "75", + "$id": "91", "kind": "client", "name": "JsonMergePatchClient", "namespace": "Payload.JsonMergePatch", "doc": "Test for merge-patch+json content-type", "methods": [ { - "$id": "76", + "$id": "92", "kind": "basic", "name": "createResource", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: application/merge-patch+json with required body", "operation": { - "$id": "77", + "$id": "93", "name": "createResource", "resourceName": "JsonMergePatch", "doc": "Test content-type: application/merge-patch+json with required body", "accessibility": "public", "parameters": [ { - "$id": "78", + "$id": "94", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "79", - "kind": "constant", - "valueType": { - "$id": "80", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -562,21 +682,11 @@ "skipUrlEncoding": false }, { - "$id": "81", + "$id": "95", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "82", - "kind": "constant", - "valueType": { - "$id": "83", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -589,11 +699,11 @@ "skipUrlEncoding": false }, { - "$id": "84", + "$id": "96", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "18" }, "location": "Body", "isApiVersion": false, @@ -608,12 +718,12 @@ ], "responses": [ { - "$id": "85", + "$id": "97", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "18" }, "headers": [], "isErrorResponse": false, @@ -636,11 +746,11 @@ }, "parameters": [ { - "$id": "86", + "$id": "98", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "18" }, "location": "Body", "isApiVersion": false, @@ -653,12 +763,12 @@ "skipUrlEncoding": false }, { - "$id": "87", + "$id": "99", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "79" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -671,11 +781,11 @@ "skipUrlEncoding": false }, { - "$id": "88", + "$id": "100", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "82" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -689,9 +799,9 @@ } ], "response": { - "$id": "89", + "$id": "101", "type": { - "$ref": "2" + "$ref": "18" } }, "isOverride": false, @@ -700,35 +810,25 @@ "crossLanguageDefinitionId": "Payload.JsonMergePatch.createResource" }, { - "$id": "90", + "$id": "102", "kind": "basic", "name": "updateResource", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: application/merge-patch+json with required body", "operation": { - "$id": "91", + "$id": "103", "name": "updateResource", "resourceName": "JsonMergePatch", "doc": "Test content-type: application/merge-patch+json with required body", "accessibility": "public", "parameters": [ { - "$id": "92", + "$id": "104", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "93", - "kind": "constant", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -741,21 +841,11 @@ "skipUrlEncoding": false }, { - "$id": "95", + "$id": "105", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "96", - "kind": "constant", - "valueType": { - "$id": "97", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -768,11 +858,11 @@ "skipUrlEncoding": false }, { - "$id": "98", + "$id": "106", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "61" }, "location": "Body", "isApiVersion": false, @@ -787,12 +877,12 @@ ], "responses": [ { - "$id": "99", + "$id": "107", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "18" }, "headers": [], "isErrorResponse": false, @@ -815,21 +905,11 @@ }, "parameters": [ { - "$id": "100", + "$id": "108", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "101", - "kind": "constant", - "valueType": { - "$id": "102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -842,11 +922,11 @@ "skipUrlEncoding": false }, { - "$id": "103", + "$id": "109", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "61" }, "location": "Body", "isApiVersion": false, @@ -859,11 +939,11 @@ "skipUrlEncoding": false }, { - "$id": "104", + "$id": "110", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "96" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -877,9 +957,9 @@ } ], "response": { - "$id": "105", + "$id": "111", "type": { - "$ref": "2" + "$ref": "18" } }, "isOverride": false, @@ -888,35 +968,25 @@ "crossLanguageDefinitionId": "Payload.JsonMergePatch.updateResource" }, { - "$id": "106", + "$id": "112", "kind": "basic", "name": "updateOptionalResource", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: application/merge-patch+json with optional body", "operation": { - "$id": "107", + "$id": "113", "name": "updateOptionalResource", "resourceName": "JsonMergePatch", "doc": "Test content-type: application/merge-patch+json with optional body", "accessibility": "public", "parameters": [ { - "$id": "108", + "$id": "114", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "109", - "kind": "constant", - "valueType": { - "$id": "110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -929,21 +999,11 @@ "skipUrlEncoding": false }, { - "$id": "111", + "$id": "115", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "112", - "kind": "constant", - "valueType": { - "$id": "113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -956,11 +1016,11 @@ "skipUrlEncoding": false }, { - "$id": "114", + "$id": "116", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "61" }, "location": "Body", "isApiVersion": false, @@ -975,12 +1035,12 @@ ], "responses": [ { - "$id": "115", + "$id": "117", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "18" }, "headers": [], "isErrorResponse": false, @@ -1003,21 +1063,11 @@ }, "parameters": [ { - "$id": "116", + "$id": "118", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "117", - "kind": "constant", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1034,7 +1084,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "61" }, "location": "Body", "isApiVersion": false, @@ -1051,7 +1101,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "112" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1067,7 +1117,7 @@ "response": { "$id": "121", "type": { - "$ref": "2" + "$ref": "18" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj index 7377ef3df6e8..4ae897dd3903 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/src/Payload.MediaType.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json index cc8fb01498e8..92a29b8d4880 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/media-type/tspCodeModel.json @@ -3,10 +3,140 @@ "name": "Payload.MediaType", "apiVersions": [], "enums": [], + "constants": [ + { + "$id": "2", + "kind": "constant", + "name": "SendAsTextRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "SendAsTextRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "getAsTextContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "SendAsTextRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "SendAsJsonRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "SendAsJsonRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getAsJsonContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "SendAsJsonRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], "models": [], "clients": [ { - "$id": "2", + "$id": "18", "kind": "client", "name": "MediaTypeClient", "namespace": "Payload.MediaType", @@ -14,12 +144,12 @@ "methods": [], "parameters": [ { - "$id": "3", + "$id": "19", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "4", + "$id": "20", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -33,9 +163,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "5", + "$id": "21", "type": { - "$id": "6", + "$id": "22", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -49,39 +179,29 @@ "apiVersions": [], "children": [ { - "$id": "7", + "$id": "23", "kind": "client", "name": "StringBody", "namespace": "Payload.MediaType.StringBody", "methods": [ { - "$id": "8", + "$id": "24", "kind": "basic", "name": "sendAsText", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "9", + "$id": "25", "name": "sendAsText", "resourceName": "StringBody", "accessibility": "public", "parameters": [ { - "$id": "10", + "$id": "26", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "11", - "kind": "constant", - "valueType": { - "$id": "12", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -94,11 +214,11 @@ "skipUrlEncoding": false }, { - "$id": "13", + "$id": "27", "name": "text", "nameInRequest": "text", "type": { - "$id": "14", + "$id": "28", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -117,7 +237,7 @@ ], "responses": [ { - "$id": "15", + "$id": "29", "statusCodes": [ 200 ], @@ -139,21 +259,11 @@ }, "parameters": [ { - "$id": "16", + "$id": "30", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "17", - "kind": "constant", - "valueType": { - "$id": "18", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -166,11 +276,11 @@ "skipUrlEncoding": false }, { - "$id": "19", + "$id": "31", "name": "text", "nameInRequest": "text", "type": { - "$id": "20", + "$id": "32", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -188,7 +298,7 @@ } ], "response": { - "$id": "21" + "$id": "33" }, "isOverride": false, "generateConvenient": true, @@ -196,33 +306,23 @@ "crossLanguageDefinitionId": "Payload.MediaType.StringBody.sendAsText" }, { - "$id": "22", + "$id": "34", "kind": "basic", "name": "getAsText", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "23", + "$id": "35", "name": "getAsText", "resourceName": "StringBody", "accessibility": "public", "parameters": [ { - "$id": "24", + "$id": "36", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "25", - "kind": "constant", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -237,12 +337,12 @@ ], "responses": [ { - "$id": "27", + "$id": "37", "statusCodes": [ 200 ], "bodyType": { - "$id": "28", + "$id": "38", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -250,21 +350,11 @@ }, "headers": [ { - "$id": "29", + "$id": "39", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "30", - "kind": "constant", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "text/plain", - "decorators": [] + "$ref": "8" } } ], @@ -285,11 +375,11 @@ }, "parameters": [ { - "$id": "32", + "$id": "40", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "25" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -303,9 +393,9 @@ } ], "response": { - "$id": "33", + "$id": "41", "type": { - "$ref": "28" + "$ref": "38" } }, "isOverride": false, @@ -314,33 +404,23 @@ "crossLanguageDefinitionId": "Payload.MediaType.StringBody.getAsText" }, { - "$id": "34", + "$id": "42", "kind": "basic", "name": "sendAsJson", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "35", + "$id": "43", "name": "sendAsJson", "resourceName": "StringBody", "accessibility": "public", "parameters": [ { - "$id": "36", + "$id": "44", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "37", - "kind": "constant", - "valueType": { - "$id": "38", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -353,11 +433,11 @@ "skipUrlEncoding": false }, { - "$id": "39", + "$id": "45", "name": "text", "nameInRequest": "text", "type": { - "$id": "40", + "$id": "46", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -376,7 +456,7 @@ ], "responses": [ { - "$id": "41", + "$id": "47", "statusCodes": [ 200 ], @@ -398,21 +478,11 @@ }, "parameters": [ { - "$id": "42", + "$id": "48", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "43", - "kind": "constant", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -425,11 +495,11 @@ "skipUrlEncoding": false }, { - "$id": "45", + "$id": "49", "name": "text", "nameInRequest": "text", "type": { - "$id": "46", + "$id": "50", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -447,7 +517,7 @@ } ], "response": { - "$id": "47" + "$id": "51" }, "isOverride": false, "generateConvenient": true, @@ -455,33 +525,23 @@ "crossLanguageDefinitionId": "Payload.MediaType.StringBody.sendAsJson" }, { - "$id": "48", + "$id": "52", "kind": "basic", "name": "getAsJson", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "49", + "$id": "53", "name": "getAsJson", "resourceName": "StringBody", "accessibility": "public", "parameters": [ { - "$id": "50", + "$id": "54", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "51", - "kind": "constant", - "valueType": { - "$id": "52", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -496,12 +556,12 @@ ], "responses": [ { - "$id": "53", + "$id": "55", "statusCodes": [ 200 ], "bodyType": { - "$id": "54", + "$id": "56", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -509,21 +569,11 @@ }, "headers": [ { - "$id": "55", + "$id": "57", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "56", - "kind": "constant", - "valueType": { - "$id": "57", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" } } ], @@ -548,7 +598,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "51" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -564,7 +614,7 @@ "response": { "$id": "59", "type": { - "$ref": "54" + "$ref": "56" } }, "isOverride": false, @@ -609,7 +659,7 @@ "crossLanguageDefinitionId": "Payload.MediaType.StringBody", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "18" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj index ff54d119cba7..74e6cee11657 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/src/Payload.MultiPart.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json index 09ba3deb9fef..8e0fa0c3ca52 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/payload/multipart/tspCodeModel.json @@ -2,11 +2,14 @@ "$id": "1", "name": "Payload.MultiPart", "apiVersions": [], - "enums": [ + "enums": [], + "constants": [ { "$id": "2", - "kind": "enum", - "name": "FileSpecificContentType_contentType", + "kind": "constant", + "name": "FileSpecificContentTypeContentType", + "namespace": "Payload.MultiPart", + "usage": "Input", "valueType": { "$id": "3", "kind": "string", @@ -14,67 +17,413 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "image/jpg", - "value": "image/jpg", - "doc": "image/jpg", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Payload.MultiPart", - "doc": "The FileSpecificContentType_contentType", - "isFixed": false, - "isFlags": false, + "value": "image/jpg", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "FloatRequestTemperatureContentType", + "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", "usage": "Input", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "text/plain", "decorators": [] }, { - "$id": "5", - "kind": "enum", - "name": "FloatRequestTemperature_content-type", + "$id": "6", + "kind": "constant", + "name": "BasicRequestContentType", + "namespace": "", + "usage": "None", "valueType": { - "$id": "6", + "$id": "7", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "7", - "kind": "enumvalue", - "name": "text/plain", - "value": "text/plain", - "doc": "text/plain", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", - "doc": "The FloatRequestTemperature_content-type", - "isFixed": false, - "isFlags": false, - "usage": "Input", + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "BasicRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "BasicRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "BasicRequestContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "BasicRequestContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "BasicRequestContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "BasicRequestContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "BasicRequestContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "BasicRequestContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "BasicRequestContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "BasicRequestContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "BasicRequestContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "BasicRequestContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "BasicRequestContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "BasicRequestContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "BasicRequestContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "BasicRequestContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "BasicRequestContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "BasicRequestContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "BasicRequestContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "BasicRequestContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "BasicRequestContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "BasicRequestContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "BasicRequestContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "multipart/form-data", "decorators": [] } ], "models": [ { - "$id": "8", + "$id": "54", "kind": "model", "name": "MultiPartRequest", "namespace": "Payload.MultiPart", @@ -83,12 +432,12 @@ "decorators": [], "properties": [ { - "$id": "9", + "$id": "55", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "10", + "$id": "56", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -101,9 +450,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequest.id", "serializationOptions": { - "$id": "11", + "$id": "57", "multipart": { - "$id": "12", + "$id": "58", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -114,12 +463,12 @@ } }, { - "$id": "13", + "$id": "59", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "14", + "$id": "60", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -133,9 +482,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.MultiPartRequest.profileImage", "serializationOptions": { - "$id": "15", + "$id": "61", "multipart": { - "$id": "16", + "$id": "62", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -148,7 +497,7 @@ ] }, { - "$id": "17", + "$id": "63", "kind": "model", "name": "ComplexPartsRequest", "namespace": "Payload.MultiPart", @@ -157,12 +506,12 @@ "decorators": [], "properties": [ { - "$id": "18", + "$id": "64", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "19", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -175,9 +524,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexPartsRequest.id", "serializationOptions": { - "$id": "20", + "$id": "66", "multipart": { - "$id": "21", + "$id": "67", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -188,12 +537,12 @@ } }, { - "$id": "22", + "$id": "68", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$id": "23", + "$id": "69", "kind": "model", "name": "Address", "namespace": "Payload.MultiPart", @@ -202,12 +551,12 @@ "decorators": [], "properties": [ { - "$id": "24", + "$id": "70", "kind": "property", "name": "city", "serializedName": "city", "type": { - "$id": "25", + "$id": "71", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -220,9 +569,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.Address.city", "serializationOptions": { - "$id": "26", + "$id": "72", "json": { - "$id": "27", + "$id": "73", "name": "city" } } @@ -236,9 +585,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexPartsRequest.address", "serializationOptions": { - "$id": "28", + "$id": "74", "multipart": { - "$id": "29", + "$id": "75", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -249,12 +598,12 @@ } }, { - "$id": "30", + "$id": "76", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "31", + "$id": "77", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -268,9 +617,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexPartsRequest.profileImage", "serializationOptions": { - "$id": "32", + "$id": "78", "multipart": { - "$id": "33", + "$id": "79", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -281,16 +630,16 @@ } }, { - "$id": "34", + "$id": "80", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "35", + "$id": "81", "kind": "array", "name": "ArrayHttpPart", "valueType": { - "$id": "36", + "$id": "82", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -307,9 +656,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexPartsRequest.pictures", "serializationOptions": { - "$id": "37", + "$id": "83", "multipart": { - "$id": "38", + "$id": "84", "isFilePart": true, "isMulti": true, "defaultContentTypes": [ @@ -322,10 +671,10 @@ ] }, { - "$ref": "23" + "$ref": "69" }, { - "$id": "39", + "$id": "85", "kind": "model", "name": "JsonPartRequest", "namespace": "Payload.MultiPart", @@ -334,12 +683,12 @@ "decorators": [], "properties": [ { - "$id": "40", + "$id": "86", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "23" + "$ref": "69" }, "optional": false, "readOnly": false, @@ -348,9 +697,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.JsonPartRequest.address", "serializationOptions": { - "$id": "41", + "$id": "87", "multipart": { - "$id": "42", + "$id": "88", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -361,12 +710,12 @@ } }, { - "$id": "43", + "$id": "89", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "44", + "$id": "90", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -380,9 +729,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.JsonPartRequest.profileImage", "serializationOptions": { - "$id": "45", + "$id": "91", "multipart": { - "$id": "46", + "$id": "92", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -395,7 +744,7 @@ ] }, { - "$id": "47", + "$id": "93", "kind": "model", "name": "BinaryArrayPartsRequest", "namespace": "Payload.MultiPart", @@ -404,12 +753,12 @@ "decorators": [], "properties": [ { - "$id": "48", + "$id": "94", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "49", + "$id": "95", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -422,9 +771,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.BinaryArrayPartsRequest.id", "serializationOptions": { - "$id": "50", + "$id": "96", "multipart": { - "$id": "51", + "$id": "97", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -435,16 +784,16 @@ } }, { - "$id": "52", + "$id": "98", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "53", + "$id": "99", "kind": "array", "name": "ArrayHttpPart1", "valueType": { - "$id": "54", + "$id": "100", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -461,9 +810,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.BinaryArrayPartsRequest.pictures", "serializationOptions": { - "$id": "55", + "$id": "101", "multipart": { - "$id": "56", + "$id": "102", "isFilePart": true, "isMulti": true, "defaultContentTypes": [ @@ -476,7 +825,7 @@ ] }, { - "$id": "57", + "$id": "103", "kind": "model", "name": "MultiBinaryPartsRequest", "namespace": "Payload.MultiPart", @@ -485,12 +834,12 @@ "decorators": [], "properties": [ { - "$id": "58", + "$id": "104", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "59", + "$id": "105", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -504,9 +853,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.MultiBinaryPartsRequest.profileImage", "serializationOptions": { - "$id": "60", + "$id": "106", "multipart": { - "$id": "61", + "$id": "107", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -517,12 +866,12 @@ } }, { - "$id": "62", + "$id": "108", "kind": "property", "name": "picture", "serializedName": "picture", "type": { - "$id": "63", + "$id": "109", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -536,9 +885,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.MultiBinaryPartsRequest.picture", "serializationOptions": { - "$id": "64", + "$id": "110", "multipart": { - "$id": "65", + "$id": "111", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -551,7 +900,7 @@ ] }, { - "$id": "66", + "$id": "112", "kind": "model", "name": "AnonymousModelRequest", "namespace": "Payload.MultiPart.FormData", @@ -560,12 +909,12 @@ "decorators": [], "properties": [ { - "$id": "67", + "$id": "113", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "68", + "$id": "114", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -579,9 +928,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.anonymousModel.Request.anonymous.profileImage", "serializationOptions": { - "$id": "69", + "$id": "115", "multipart": { - "$id": "70", + "$id": "116", "isFilePart": true, "isMulti": false, "defaultContentTypes": [ @@ -594,7 +943,7 @@ ] }, { - "$id": "71", + "$id": "117", "kind": "model", "name": "ComplexHttpPartsModelRequest", "namespace": "Payload.MultiPart", @@ -603,12 +952,12 @@ "decorators": [], "properties": [ { - "$id": "72", + "$id": "118", "kind": "property", "name": "id", "serializedName": "id", "type": { - "$id": "73", + "$id": "119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -621,9 +970,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexHttpPartsModelRequest.id", "serializationOptions": { - "$id": "74", + "$id": "120", "multipart": { - "$id": "75", + "$id": "121", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -634,12 +983,12 @@ } }, { - "$id": "76", + "$id": "122", "kind": "property", "name": "address", "serializedName": "address", "type": { - "$ref": "23" + "$ref": "69" }, "optional": false, "readOnly": false, @@ -648,9 +997,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexHttpPartsModelRequest.address", "serializationOptions": { - "$id": "77", + "$id": "123", "multipart": { - "$id": "78", + "$id": "124", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -661,12 +1010,12 @@ } }, { - "$id": "79", + "$id": "125", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "80", + "$id": "126", "kind": "model", "name": "FileRequiredMetaData", "namespace": "Payload.MultiPart", @@ -674,7 +1023,7 @@ "usage": "Input", "decorators": [], "baseModel": { - "$id": "81", + "$id": "127", "kind": "model", "name": "File", "namespace": "TypeSpec.Http", @@ -685,14 +1034,14 @@ "decorators": [], "properties": [ { - "$id": "82", + "$id": "128", "kind": "property", "name": "contentType", "serializedName": "contentType", "summary": "The allowed media (MIME) types of the file contents.", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "type": { - "$id": "83", + "$id": "129", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -705,18 +1054,18 @@ "decorators": [], "crossLanguageDefinitionId": "TypeSpec.Http.File.contentType", "serializationOptions": { - "$id": "84" + "$id": "130" } }, { - "$id": "85", + "$id": "131", "kind": "property", "name": "filename", "serializedName": "filename", "summary": "The name of the file, if any.", "doc": "The name of the file, if any.\n\nIn file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response\nor multipart payload. In JSON bodies, this value is serialized as a field in the response.\n\nNOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart\npayloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request,\nyou must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata\ndecorators.", "type": { - "$id": "86", + "$id": "132", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -729,18 +1078,18 @@ "decorators": [], "crossLanguageDefinitionId": "TypeSpec.Http.File.filename", "serializationOptions": { - "$id": "87" + "$id": "133" } }, { - "$id": "88", + "$id": "134", "kind": "property", "name": "contents", "serializedName": "contents", "summary": "The contents of the file.", "doc": "The contents of the file.\n\nIn file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies,\nthis value is serialized as a field in the response.", "type": { - "$id": "89", + "$id": "135", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -754,19 +1103,19 @@ "decorators": [], "crossLanguageDefinitionId": "TypeSpec.Http.File.contents", "serializationOptions": { - "$id": "90" + "$id": "136" } } ] }, "properties": [ { - "$id": "91", + "$id": "137", "kind": "property", "name": "filename", "serializedName": "filename", "type": { - "$id": "92", + "$id": "138", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -779,16 +1128,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileRequiredMetaData.filename", "serializationOptions": { - "$id": "93" + "$id": "139" } }, { - "$id": "94", + "$id": "140", "kind": "property", "name": "contentType", "serializedName": "contentType", "type": { - "$id": "95", + "$id": "141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -801,7 +1150,7 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileRequiredMetaData.contentType", "serializationOptions": { - "$id": "96" + "$id": "142" } } ] @@ -813,16 +1162,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexHttpPartsModelRequest.profileImage", "serializationOptions": { - "$id": "97", + "$id": "143", "multipart": { - "$id": "98", + "$id": "144", "isFilePart": true, "isMulti": false, "filename": { - "$id": "99", + "$id": "145", "apiVersions": [], "type": { - "$id": "5244", + "$id": "5290", "kind": "string", "decorators": [], "name": "string", @@ -850,14 +1199,14 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "93" + "$ref": "139" } }, "contentType": { - "$id": "5245", + "$id": "5291", "apiVersions": [], "type": { - "$id": "5247", + "$id": "5293", "kind": "string", "decorators": [], "name": "string", @@ -885,7 +1234,7 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "96" + "$ref": "142" } }, "defaultContentTypes": [ @@ -896,16 +1245,16 @@ } }, { - "$id": "5248", + "$id": "5294", "kind": "property", "name": "previousAddresses", "serializedName": "previousAddresses", "type": { - "$id": "5249", + "$id": "5295", "kind": "array", "name": "ArrayAddress", "valueType": { - "$ref": "23" + "$ref": "69" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -917,9 +1266,9 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexHttpPartsModelRequest.previousAddresses", "serializationOptions": { - "$id": "5250", + "$id": "5296", "multipart": { - "$id": "5251", + "$id": "5297", "isFilePart": false, "isMulti": false, "defaultContentTypes": [ @@ -930,16 +1279,16 @@ } }, { - "$id": "5252", + "$id": "5298", "kind": "property", "name": "pictures", "serializedName": "pictures", "type": { - "$id": "5253", + "$id": "5299", "kind": "array", "name": "ArrayHttpPart2", "valueType": { - "$ref": "80" + "$ref": "126" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -951,16 +1300,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.ComplexHttpPartsModelRequest.pictures", "serializationOptions": { - "$id": "5254", + "$id": "5300", "multipart": { - "$id": "5255", + "$id": "5301", "isFilePart": true, "isMulti": true, "filename": { - "$ref": "99" + "$ref": "145" }, "contentType": { - "$ref": "5245" + "$ref": "5291" }, "defaultContentTypes": [ "*/*" @@ -972,13 +1321,13 @@ ] }, { - "$ref": "80" + "$ref": "126" }, { - "$ref": "81" + "$ref": "127" }, { - "$id": "5256", + "$id": "5302", "kind": "model", "name": "FileWithHttpPartSpecificContentTypeRequest", "namespace": "Payload.MultiPart", @@ -987,12 +1336,12 @@ "decorators": [], "properties": [ { - "$id": "5257", + "$id": "5303", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "5258", + "$id": "5304", "kind": "model", "name": "FileSpecificContentType", "namespace": "Payload.MultiPart", @@ -1000,16 +1349,16 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "81" + "$ref": "127" }, "properties": [ { - "$id": "5259", + "$id": "5305", "kind": "property", "name": "filename", "serializedName": "filename", "type": { - "$id": "5260", + "$id": "5306", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1022,22 +1371,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileSpecificContentType.filename", "serializationOptions": { - "$id": "5261" + "$id": "5307" } }, { - "$id": "5262", + "$id": "5308", "kind": "property", "name": "contentType", "serializedName": "contentType", "type": { - "$id": "5263", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "image/jpg", - "decorators": [] + "$ref": "2" }, "optional": false, "readOnly": false, @@ -1046,7 +1389,7 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileSpecificContentType.contentType", "serializationOptions": { - "$id": "5264" + "$id": "5309" } } ] @@ -1058,16 +1401,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileWithHttpPartSpecificContentTypeRequest.profileImage", "serializationOptions": { - "$id": "5265", + "$id": "5310", "multipart": { - "$id": "5266", + "$id": "5311", "isFilePart": true, "isMulti": false, "filename": { - "$id": "5267", + "$id": "5312", "apiVersions": [], "type": { - "$id": "5269", + "$id": "5314", "kind": "string", "decorators": [], "name": "string", @@ -1095,19 +1438,19 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "5261" + "$ref": "5307" } }, "contentType": { - "$id": "5270", + "$id": "5315", "apiVersions": [], "type": { - "$id": "5273", + "$id": "5318", "kind": "constant", "decorators": [], "value": "image/jpg", "valueType": { - "$id": "5274", + "$id": "5319", "kind": "string", "decorators": [], "name": "string", @@ -1138,7 +1481,7 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "5264" + "$ref": "5309" } }, "defaultContentTypes": [ @@ -1151,10 +1494,10 @@ ] }, { - "$ref": "5258" + "$ref": "5304" }, { - "$id": "5275", + "$id": "5320", "kind": "model", "name": "FileWithHttpPartRequiredContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1163,12 +1506,12 @@ "decorators": [], "properties": [ { - "$id": "5276", + "$id": "5321", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$ref": "80" + "$ref": "126" }, "optional": false, "readOnly": false, @@ -1177,16 +1520,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileWithHttpPartRequiredContentTypeRequest.profileImage", "serializationOptions": { - "$id": "5277", + "$id": "5322", "multipart": { - "$id": "5278", + "$id": "5323", "isFilePart": true, "isMulti": false, "filename": { - "$ref": "99" + "$ref": "145" }, "contentType": { - "$ref": "5245" + "$ref": "5291" }, "defaultContentTypes": [ "*/*" @@ -1198,7 +1541,7 @@ ] }, { - "$id": "5279", + "$id": "5324", "kind": "model", "name": "FileWithHttpPartOptionalContentTypeRequest", "namespace": "Payload.MultiPart", @@ -1207,12 +1550,12 @@ "decorators": [], "properties": [ { - "$id": "5280", + "$id": "5325", "kind": "property", "name": "profileImage", "serializedName": "profileImage", "type": { - "$id": "5281", + "$id": "5326", "kind": "model", "name": "FileOptionalContentType", "namespace": "Payload.MultiPart", @@ -1220,16 +1563,16 @@ "usage": "Input", "decorators": [], "baseModel": { - "$ref": "81" + "$ref": "127" }, "properties": [ { - "$id": "5282", + "$id": "5327", "kind": "property", "name": "filename", "serializedName": "filename", "type": { - "$id": "5283", + "$id": "5328", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1242,7 +1585,7 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileOptionalContentType.filename", "serializationOptions": { - "$id": "5284" + "$id": "5329" } } ] @@ -1254,16 +1597,16 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FileWithHttpPartOptionalContentTypeRequest.profileImage", "serializationOptions": { - "$id": "5285", + "$id": "5330", "multipart": { - "$id": "5286", + "$id": "5331", "isFilePart": true, "isMulti": false, "filename": { - "$id": "5287", + "$id": "5332", "apiVersions": [], "type": { - "$id": "5289", + "$id": "5334", "kind": "string", "decorators": [], "name": "string", @@ -1291,16 +1634,16 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "5284" + "$ref": "5329" } }, "contentType": { - "$id": "5290", + "$id": "5335", "doc": "The allowed media (MIME) types of the file contents.\n\nIn file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies,\nthis value is serialized as a field in the response.\n\nNOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but\nit will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the\n_contents_ of the file, and not necessarily the way the file itself is transmitted or serialized.", "summary": "The allowed media (MIME) types of the file contents.", "apiVersions": [], "type": { - "$id": "5299", + "$id": "5344", "kind": "string", "decorators": [], "name": "string", @@ -1328,7 +1671,7 @@ "isMultipartFileInput": false, "flatten": false, "serializationOptions": { - "$ref": "84" + "$ref": "130" } }, "defaultContentTypes": [ @@ -1341,10 +1684,10 @@ ] }, { - "$ref": "5281" + "$ref": "5326" }, { - "$id": "5300", + "$id": "5345", "kind": "model", "name": "FloatRequest", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", @@ -1353,12 +1696,12 @@ "decorators": [], "properties": [ { - "$id": "5301", + "$id": "5346", "kind": "property", "name": "temperature", "serializedName": "temperature", "type": { - "$id": "5302", + "$id": "5347", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1371,21 +1714,21 @@ "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString.float.Request.anonymous.temperature", "serializationOptions": { - "$id": "5303", + "$id": "5348", "multipart": { - "$id": "5304", + "$id": "5349", "isFilePart": false, "isMulti": false, "contentType": { - "$id": "5305", + "$id": "5350", "apiVersions": [], "type": { - "$id": "6101", + "$id": "6146", "kind": "constant", "decorators": [], "value": "text/plain", "valueType": { - "$id": "6102", + "$id": "6147", "kind": "string", "decorators": [], "name": "string", @@ -1424,7 +1767,7 @@ ] }, { - "$id": "6103", + "$id": "6148", "kind": "model", "name": "FloatRequestTemperature", "namespace": "Payload.MultiPart.FormData.HttpParts.NonString", @@ -1433,32 +1776,25 @@ "decorators": [], "properties": [ { - "$id": "6104", + "$id": "6149", "kind": "header", "name": "contentType", "serializedName": "content-type", "type": { - "$id": "6105", - "kind": "constant", - "valueType": { - "$ref": "5" - }, - "value": "text/plain", - "decorators": [] + "$ref": "4" }, "optional": false, "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString.float.Request.temperature.anonymous.contentType", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] } ] } ], "clients": [ { - "$id": "6106", + "$id": "6150", "kind": "client", "name": "MultiPartClient", "namespace": "Payload.MultiPart", @@ -1466,12 +1802,12 @@ "methods": [], "parameters": [ { - "$id": "6107", + "$id": "6151", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "6108", + "$id": "6152", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1485,9 +1821,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "6109", + "$id": "6153", "type": { - "$id": "6110", + "$id": "6154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1501,41 +1837,31 @@ "apiVersions": [], "children": [ { - "$id": "6111", + "$id": "6155", "kind": "client", "name": "FormData", "namespace": "Payload.MultiPart.FormData", "methods": [ { - "$id": "6112", + "$id": "6156", "kind": "basic", "name": "basic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "6113", + "$id": "6157", "name": "basic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "6114", + "$id": "6158", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6115", - "kind": "constant", - "valueType": { - "$id": "6116", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1548,11 +1874,11 @@ "skipUrlEncoding": false }, { - "$id": "6117", + "$id": "6159", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -1567,7 +1893,7 @@ ], "responses": [ { - "$id": "6118", + "$id": "6160", "statusCodes": [ 204 ], @@ -1589,21 +1915,11 @@ }, "parameters": [ { - "$id": "6119", + "$id": "6161", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6120", - "kind": "constant", - "valueType": { - "$id": "6121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1616,11 +1932,11 @@ "skipUrlEncoding": false }, { - "$id": "6122", + "$id": "6162", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -1634,7 +1950,7 @@ } ], "response": { - "$id": "6123" + "$id": "6163" }, "isOverride": false, "generateConvenient": true, @@ -1642,35 +1958,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.basic" }, { - "$id": "6124", + "$id": "6164", "kind": "basic", "name": "fileArrayAndBasic", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "6125", + "$id": "6165", "name": "fileArrayAndBasic", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "6126", + "$id": "6166", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6127", - "kind": "constant", - "valueType": { - "$id": "6128", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1683,11 +1989,11 @@ "skipUrlEncoding": false }, { - "$id": "6129", + "$id": "6167", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "63" }, "location": "Body", "isApiVersion": false, @@ -1702,7 +2008,7 @@ ], "responses": [ { - "$id": "6130", + "$id": "6168", "statusCodes": [ 204 ], @@ -1724,21 +2030,11 @@ }, "parameters": [ { - "$id": "6131", + "$id": "6169", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6132", - "kind": "constant", - "valueType": { - "$id": "6133", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1751,11 +2047,11 @@ "skipUrlEncoding": false }, { - "$id": "6134", + "$id": "6170", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "63" }, "location": "Body", "isApiVersion": false, @@ -1769,7 +2065,7 @@ } ], "response": { - "$id": "6135" + "$id": "6171" }, "isOverride": false, "generateConvenient": true, @@ -1777,35 +2073,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.fileArrayAndBasic" }, { - "$id": "6136", + "$id": "6172", "kind": "basic", "name": "jsonPart", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "operation": { - "$id": "6137", + "$id": "6173", "name": "jsonPart", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains json part and binary part ", "accessibility": "public", "parameters": [ { - "$id": "6138", + "$id": "6174", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6139", - "kind": "constant", - "valueType": { - "$id": "6140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1818,11 +2104,11 @@ "skipUrlEncoding": false }, { - "$id": "6141", + "$id": "6175", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "85" }, "location": "Body", "isApiVersion": false, @@ -1837,7 +2123,7 @@ ], "responses": [ { - "$id": "6142", + "$id": "6176", "statusCodes": [ 204 ], @@ -1859,21 +2145,11 @@ }, "parameters": [ { - "$id": "6143", + "$id": "6177", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6144", - "kind": "constant", - "valueType": { - "$id": "6145", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1886,11 +2162,11 @@ "skipUrlEncoding": false }, { - "$id": "6146", + "$id": "6178", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "85" }, "location": "Body", "isApiVersion": false, @@ -1904,7 +2180,7 @@ } ], "response": { - "$id": "6147" + "$id": "6179" }, "isOverride": false, "generateConvenient": true, @@ -1912,35 +2188,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.jsonPart" }, { - "$id": "6148", + "$id": "6180", "kind": "basic", "name": "binaryArrayParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "6149", + "$id": "6181", "name": "binaryArrayParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "6150", + "$id": "6182", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6151", - "kind": "constant", - "valueType": { - "$id": "6152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1953,11 +2219,11 @@ "skipUrlEncoding": false }, { - "$id": "6153", + "$id": "6183", "name": "body", "nameInRequest": "body", "type": { - "$ref": "47" + "$ref": "93" }, "location": "Body", "isApiVersion": false, @@ -1972,7 +2238,7 @@ ], "responses": [ { - "$id": "6154", + "$id": "6184", "statusCodes": [ 204 ], @@ -1994,21 +2260,11 @@ }, "parameters": [ { - "$id": "6155", + "$id": "6185", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6156", - "kind": "constant", - "valueType": { - "$id": "6157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -2021,11 +2277,11 @@ "skipUrlEncoding": false }, { - "$id": "6158", + "$id": "6186", "name": "body", "nameInRequest": "body", "type": { - "$ref": "47" + "$ref": "93" }, "location": "Body", "isApiVersion": false, @@ -2039,7 +2295,7 @@ } ], "response": { - "$id": "6159" + "$id": "6187" }, "isOverride": false, "generateConvenient": true, @@ -2047,35 +2303,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.binaryArrayParts" }, { - "$id": "6160", + "$id": "6188", "kind": "basic", "name": "multiBinaryParts", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "operation": { - "$id": "6161", + "$id": "6189", "name": "multiBinaryParts", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data for scenario contains multi binary parts", "accessibility": "public", "parameters": [ { - "$id": "6162", + "$id": "6190", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6163", - "kind": "constant", - "valueType": { - "$id": "6164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2088,11 +2334,11 @@ "skipUrlEncoding": false }, { - "$id": "6165", + "$id": "6191", "name": "body", "nameInRequest": "body", "type": { - "$ref": "57" + "$ref": "103" }, "location": "Body", "isApiVersion": false, @@ -2107,7 +2353,7 @@ ], "responses": [ { - "$id": "6166", + "$id": "6192", "statusCodes": [ 204 ], @@ -2129,21 +2375,11 @@ }, "parameters": [ { - "$id": "6167", + "$id": "6193", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6168", - "kind": "constant", - "valueType": { - "$id": "6169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2156,11 +2392,11 @@ "skipUrlEncoding": false }, { - "$id": "6170", + "$id": "6194", "name": "body", "nameInRequest": "body", "type": { - "$ref": "57" + "$ref": "103" }, "location": "Body", "isApiVersion": false, @@ -2174,7 +2410,7 @@ } ], "response": { - "$id": "6171" + "$id": "6195" }, "isOverride": false, "generateConvenient": true, @@ -2182,35 +2418,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.multiBinaryParts" }, { - "$id": "6172", + "$id": "6196", "kind": "basic", "name": "checkFileNameAndContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "6173", + "$id": "6197", "name": "checkFileNameAndContentType", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "6174", + "$id": "6198", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6175", - "kind": "constant", - "valueType": { - "$id": "6176", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2223,11 +2449,11 @@ "skipUrlEncoding": false }, { - "$id": "6177", + "$id": "6199", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -2242,7 +2468,7 @@ ], "responses": [ { - "$id": "6178", + "$id": "6200", "statusCodes": [ 204 ], @@ -2264,21 +2490,11 @@ }, "parameters": [ { - "$id": "6179", + "$id": "6201", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6180", - "kind": "constant", - "valueType": { - "$id": "6181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2291,11 +2507,11 @@ "skipUrlEncoding": false }, { - "$id": "6182", + "$id": "6202", "name": "body", "nameInRequest": "body", "type": { - "$ref": "8" + "$ref": "54" }, "location": "Body", "isApiVersion": false, @@ -2309,7 +2525,7 @@ } ], "response": { - "$id": "6183" + "$id": "6203" }, "isOverride": false, "generateConvenient": true, @@ -2317,35 +2533,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.checkFileNameAndContentType" }, { - "$id": "6184", + "$id": "6204", "kind": "basic", "name": "anonymousModel", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "6185", + "$id": "6205", "name": "anonymousModel", "resourceName": "FormData", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "6186", + "$id": "6206", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6187", - "kind": "constant", - "valueType": { - "$id": "6188", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2358,11 +2564,11 @@ "skipUrlEncoding": false }, { - "$id": "6189", + "$id": "6207", "name": "body", "nameInRequest": "body", "type": { - "$ref": "66" + "$ref": "112" }, "location": "Body", "isApiVersion": false, @@ -2377,7 +2583,7 @@ ], "responses": [ { - "$id": "6190", + "$id": "6208", "statusCodes": [ 204 ], @@ -2399,21 +2605,11 @@ }, "parameters": [ { - "$id": "6191", + "$id": "6209", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6192", - "kind": "constant", - "valueType": { - "$id": "6193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2426,11 +2622,11 @@ "skipUrlEncoding": false }, { - "$id": "6194", + "$id": "6210", "name": "body", "nameInRequest": "body", "type": { - "$ref": "66" + "$ref": "112" }, "location": "Body", "isApiVersion": false, @@ -2444,7 +2640,7 @@ } ], "response": { - "$id": "6195" + "$id": "6211" }, "isOverride": false, "generateConvenient": true, @@ -2454,12 +2650,12 @@ ], "parameters": [ { - "$id": "6196", + "$id": "6212", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "6197", + "$id": "6213", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2473,9 +2669,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "6198", + "$id": "6214", "type": { - "$id": "6199", + "$id": "6215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2488,45 +2684,35 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData", "apiVersions": [], "parent": { - "$ref": "6106" + "$ref": "6150" }, "children": [ { - "$id": "6200", + "$id": "6216", "kind": "client", "name": "HttpParts", "namespace": "Payload.MultiPart.FormData.HttpParts", "methods": [ { - "$id": "6201", + "$id": "6217", "kind": "basic", "name": "jsonArrayAndFileArray", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for mixed scenarios", "operation": { - "$id": "6202", + "$id": "6218", "name": "jsonArrayAndFileArray", "resourceName": "HttpParts", "doc": "Test content-type: multipart/form-data for mixed scenarios", "accessibility": "public", "parameters": [ { - "$id": "6203", + "$id": "6219", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6204", - "kind": "constant", - "valueType": { - "$id": "6205", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2539,11 +2725,11 @@ "skipUrlEncoding": false }, { - "$id": "6206", + "$id": "6220", "name": "body", "nameInRequest": "body", "type": { - "$ref": "71" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2558,7 +2744,7 @@ ], "responses": [ { - "$id": "6207", + "$id": "6221", "statusCodes": [ 204 ], @@ -2580,21 +2766,11 @@ }, "parameters": [ { - "$id": "6208", + "$id": "6222", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6209", - "kind": "constant", - "valueType": { - "$id": "6210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2607,11 +2783,11 @@ "skipUrlEncoding": false }, { - "$id": "6211", + "$id": "6223", "name": "body", "nameInRequest": "body", "type": { - "$ref": "71" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2625,7 +2801,7 @@ } ], "response": { - "$id": "6212" + "$id": "6224" }, "isOverride": false, "generateConvenient": true, @@ -2635,12 +2811,12 @@ ], "parameters": [ { - "$id": "6213", + "$id": "6225", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "6214", + "$id": "6226", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2654,9 +2830,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "6215", + "$id": "6227", "type": { - "$id": "6216", + "$id": "6228", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2669,45 +2845,35 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts", "apiVersions": [], "parent": { - "$ref": "6111" + "$ref": "6155" }, "children": [ { - "$id": "6217", + "$id": "6229", "kind": "client", "name": "ContentType", "namespace": "Payload.MultiPart.FormData.HttpParts.ContentType", "methods": [ { - "$id": "6218", + "$id": "6230", "kind": "basic", "name": "imageJpegContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "6219", + "$id": "6231", "name": "imageJpegContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "6220", + "$id": "6232", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6221", - "kind": "constant", - "valueType": { - "$id": "6222", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2720,11 +2886,11 @@ "skipUrlEncoding": false }, { - "$id": "6223", + "$id": "6233", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5256" + "$ref": "5302" }, "location": "Body", "isApiVersion": false, @@ -2739,7 +2905,7 @@ ], "responses": [ { - "$id": "6224", + "$id": "6234", "statusCodes": [ 204 ], @@ -2761,21 +2927,11 @@ }, "parameters": [ { - "$id": "6225", + "$id": "6235", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6226", - "kind": "constant", - "valueType": { - "$id": "6227", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -2788,11 +2944,11 @@ "skipUrlEncoding": false }, { - "$id": "6228", + "$id": "6236", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5256" + "$ref": "5302" }, "location": "Body", "isApiVersion": false, @@ -2806,7 +2962,7 @@ } ], "response": { - "$id": "6229" + "$id": "6237" }, "isOverride": false, "generateConvenient": true, @@ -2814,35 +2970,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.imageJpegContentType" }, { - "$id": "6230", + "$id": "6238", "kind": "basic", "name": "requiredContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data", "operation": { - "$id": "6231", + "$id": "6239", "name": "requiredContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data", "accessibility": "public", "parameters": [ { - "$id": "6232", + "$id": "6240", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6233", - "kind": "constant", - "valueType": { - "$id": "6234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -2855,11 +3001,11 @@ "skipUrlEncoding": false }, { - "$id": "6235", + "$id": "6241", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5275" + "$ref": "5320" }, "location": "Body", "isApiVersion": false, @@ -2874,7 +3020,7 @@ ], "responses": [ { - "$id": "6236", + "$id": "6242", "statusCodes": [ 204 ], @@ -2896,21 +3042,11 @@ }, "parameters": [ { - "$id": "6237", + "$id": "6243", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6238", - "kind": "constant", - "valueType": { - "$id": "6239", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -2923,11 +3059,11 @@ "skipUrlEncoding": false }, { - "$id": "6240", + "$id": "6244", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5275" + "$ref": "5320" }, "location": "Body", "isApiVersion": false, @@ -2941,7 +3077,7 @@ } ], "response": { - "$id": "6241" + "$id": "6245" }, "isOverride": false, "generateConvenient": true, @@ -2949,35 +3085,25 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType.requiredContentType" }, { - "$id": "6242", + "$id": "6246", "kind": "basic", "name": "optionalContentType", "accessibility": "public", "apiVersions": [], "doc": "Test content-type: multipart/form-data for optional content type", "operation": { - "$id": "6243", + "$id": "6247", "name": "optionalContentType", "resourceName": "ContentType", "doc": "Test content-type: multipart/form-data for optional content type", "accessibility": "public", "parameters": [ { - "$id": "6244", + "$id": "6248", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6245", - "kind": "constant", - "valueType": { - "$id": "6246", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -2990,11 +3116,11 @@ "skipUrlEncoding": false }, { - "$id": "6247", + "$id": "6249", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5279" + "$ref": "5324" }, "location": "Body", "isApiVersion": false, @@ -3009,7 +3135,7 @@ ], "responses": [ { - "$id": "6248", + "$id": "6250", "statusCodes": [ 204 ], @@ -3031,21 +3157,11 @@ }, "parameters": [ { - "$id": "6249", + "$id": "6251", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6250", - "kind": "constant", - "valueType": { - "$id": "6251", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -3062,7 +3178,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "5279" + "$ref": "5324" }, "location": "Body", "isApiVersion": false, @@ -3120,7 +3236,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.ContentType", "apiVersions": [], "parent": { - "$ref": "6200" + "$ref": "6216" } }, { @@ -3148,17 +3264,7 @@ "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "6262", - "kind": "constant", - "valueType": { - "$id": "6263", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -3171,11 +3277,11 @@ "skipUrlEncoding": false }, { - "$id": "6264", + "$id": "6262", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5300" + "$ref": "5345" }, "location": "Body", "isApiVersion": false, @@ -3190,7 +3296,7 @@ ], "responses": [ { - "$id": "6265", + "$id": "6263", "statusCodes": [ 204 ], @@ -3212,21 +3318,11 @@ }, "parameters": [ { - "$id": "6266", + "$id": "6264", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "6267", - "kind": "constant", - "valueType": { - "$id": "6268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "multipart/form-data", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -3239,11 +3335,11 @@ "skipUrlEncoding": false }, { - "$id": "6269", + "$id": "6265", "name": "body", "nameInRequest": "body", "type": { - "$ref": "5300" + "$ref": "5345" }, "location": "Body", "isApiVersion": false, @@ -3257,7 +3353,7 @@ } ], "response": { - "$id": "6270" + "$id": "6266" }, "isOverride": false, "generateConvenient": true, @@ -3267,12 +3363,12 @@ ], "parameters": [ { - "$id": "6271", + "$id": "6267", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "6272", + "$id": "6268", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3286,9 +3382,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "6273", + "$id": "6269", "type": { - "$id": "6274", + "$id": "6270", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3301,7 +3397,7 @@ "crossLanguageDefinitionId": "Payload.MultiPart.FormData.HttpParts.NonString", "apiVersions": [], "parent": { - "$ref": "6200" + "$ref": "6216" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj index a224da1a05d5..e585657e1db3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/src/Routes.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json index a6bf25c207e4..8ec47b42fd74 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/routes/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Routes", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj index 15f93b953ddd..ca576dd59fa6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/src/Serialization.EncodedName.Json.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json index e2777134e590..d3c8fadb2ca0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/serialization/encoded-name/json/tspCodeModel.json @@ -3,9 +3,43 @@ "name": "Serialization.EncodedName.Json", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "sendContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "6", "kind": "model", "name": "JsonEncodedNameModel", "namespace": "Serialization.EncodedName.Json.Property", @@ -14,13 +48,13 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "7", "kind": "property", "name": "defaultName", "serializedName": "wireName", "doc": "Pass in true", "type": { - "$id": "4", + "$id": "8", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -33,9 +67,9 @@ "decorators": [], "crossLanguageDefinitionId": "Serialization.EncodedName.Json.Property.JsonEncodedNameModel.defaultName", "serializationOptions": { - "$id": "5", + "$id": "9", "json": { - "$id": "6", + "$id": "10", "name": "wireName" } } @@ -45,7 +79,7 @@ ], "clients": [ { - "$id": "7", + "$id": "11", "kind": "client", "name": "JsonClient", "namespace": "Serialization.EncodedName.Json", @@ -53,12 +87,12 @@ "methods": [], "parameters": [ { - "$id": "8", + "$id": "12", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "9", + "$id": "13", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -72,9 +106,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "10", + "$id": "14", "type": { - "$id": "11", + "$id": "15", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -88,40 +122,30 @@ "apiVersions": [], "children": [ { - "$id": "12", + "$id": "16", "kind": "client", "name": "Property", "namespace": "Serialization.EncodedName.Json.Property", "methods": [ { - "$id": "13", + "$id": "17", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "14", + "$id": "18", "name": "send", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "15", + "$id": "19", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "16", - "kind": "constant", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -134,11 +158,11 @@ "skipUrlEncoding": false }, { - "$id": "18", + "$id": "20", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -153,7 +177,7 @@ ], "responses": [ { - "$id": "19", + "$id": "21", "statusCodes": [ 204 ], @@ -175,11 +199,11 @@ }, "parameters": [ { - "$id": "20", + "$id": "22", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -192,12 +216,12 @@ "skipUrlEncoding": false }, { - "$id": "21", + "$id": "23", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "16" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -211,7 +235,7 @@ } ], "response": { - "$id": "22" + "$id": "24" }, "isOverride": false, "generateConvenient": true, @@ -219,33 +243,23 @@ "crossLanguageDefinitionId": "Serialization.EncodedName.Json.Property.send" }, { - "$id": "23", + "$id": "25", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "24", + "$id": "26", "name": "get", "resourceName": "Property", "accessibility": "public", "parameters": [ { - "$id": "25", + "$id": "27", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "26", - "kind": "constant", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -265,7 +279,7 @@ 200 ], "bodyType": { - "$ref": "2" + "$ref": "6" }, "headers": [], "isErrorResponse": false, @@ -289,7 +303,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "26" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -305,7 +319,7 @@ "response": { "$id": "30", "type": { - "$ref": "2" + "$ref": "6" } }, "isOverride": false, @@ -350,7 +364,7 @@ "crossLanguageDefinitionId": "Serialization.EncodedName.Json.Property", "apiVersions": [], "parent": { - "$ref": "7" + "$ref": "11" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj index cb5a88a1406f..23aac72f03df 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/src/Server.Endpoint.NotDefined.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json index 1501b35f23f2..a449e20b6d25 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/endpoint/not-defined/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Server.Endpoint.NotDefined", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj index 9c4ca9003c4d..e57c1d8e493c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/src/Server.Path.Single.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json index cec4ece0ed55..6d2c845ede7c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/path/single/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Server.Path.Single", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj index 34a9b1ed450b..94f367f3b8c2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/src/Server.Versions.NotVersioned.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json index 1e559c0c3d0c..a769583bafa6 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/server/versions/not-versioned/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "Server.Versions.NotVersioned", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj index 407df16f85e8..0b8fbbd27bcd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/src/SpecialHeaders.ConditionalRequest.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json index 749ff820616a..5b98c1b15c2a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/conditional-request/tspCodeModel.json @@ -3,6 +3,7 @@ "name": "SpecialHeaders.ConditionalRequest", "apiVersions": [], "enums": [], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj index 9427ccd4fce1..d3b14bc84779 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/src/SpecialHeaders.Repeatability.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json index 92eb86e983e1..03de2eb27202 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-headers/repeatability/tspCodeModel.json @@ -58,6 +58,7 @@ "decorators": [] } ], + "constants": [], "models": [], "clients": [ { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj index d68c7d6ed547..61a9ebaa2e71 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/src/SpecialWords.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json index 2ad5e63ddcb8..c0ec2fe6126b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/special-words/tspCodeModel.json @@ -3,9 +3,555 @@ "name": "SpecialWords", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "withAndContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "withAsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "withAssertContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "withAsyncContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "withAwaitContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "withBreakContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "withClassContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "withConstructorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "withContinueContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "withDefContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "withDelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "withElifContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "withElseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "withExceptContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "withExecContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "withFinallyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "withForContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "withFromContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "withGlobalContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "withIfContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "withImportContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "withInContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "withIsContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "withLambdaContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "withNotContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "withOrContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "withPassContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "withRaiseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "withReturnContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "withTryContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "withWhileContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "withWithContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "withYieldContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "sameAsModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "70", "kind": "model", "name": "and", "namespace": "SpecialWords.Models", @@ -14,12 +560,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "71", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "4", + "$id": "72", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,9 +578,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.and.name", "serializationOptions": { - "$id": "5", + "$id": "73", "json": { - "$id": "6", + "$id": "74", "name": "name" } } @@ -42,7 +588,7 @@ ] }, { - "$id": "7", + "$id": "75", "kind": "model", "name": "as", "namespace": "SpecialWords.Models", @@ -51,12 +597,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "76", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "9", + "$id": "77", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -69,9 +615,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.as.name", "serializationOptions": { - "$id": "10", + "$id": "78", "json": { - "$id": "11", + "$id": "79", "name": "name" } } @@ -79,7 +625,7 @@ ] }, { - "$id": "12", + "$id": "80", "kind": "model", "name": "assert", "namespace": "SpecialWords.Models", @@ -88,12 +634,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "81", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "14", + "$id": "82", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -106,9 +652,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.assert.name", "serializationOptions": { - "$id": "15", + "$id": "83", "json": { - "$id": "16", + "$id": "84", "name": "name" } } @@ -116,7 +662,7 @@ ] }, { - "$id": "17", + "$id": "85", "kind": "model", "name": "async", "namespace": "SpecialWords.Models", @@ -125,12 +671,12 @@ "decorators": [], "properties": [ { - "$id": "18", + "$id": "86", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "19", + "$id": "87", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -143,9 +689,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.async.name", "serializationOptions": { - "$id": "20", + "$id": "88", "json": { - "$id": "21", + "$id": "89", "name": "name" } } @@ -153,7 +699,7 @@ ] }, { - "$id": "22", + "$id": "90", "kind": "model", "name": "await", "namespace": "SpecialWords.Models", @@ -162,12 +708,12 @@ "decorators": [], "properties": [ { - "$id": "23", + "$id": "91", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "24", + "$id": "92", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -180,9 +726,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.await.name", "serializationOptions": { - "$id": "25", + "$id": "93", "json": { - "$id": "26", + "$id": "94", "name": "name" } } @@ -190,7 +736,7 @@ ] }, { - "$id": "27", + "$id": "95", "kind": "model", "name": "break", "namespace": "SpecialWords.Models", @@ -199,12 +745,12 @@ "decorators": [], "properties": [ { - "$id": "28", + "$id": "96", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "29", + "$id": "97", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -217,9 +763,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.break.name", "serializationOptions": { - "$id": "30", + "$id": "98", "json": { - "$id": "31", + "$id": "99", "name": "name" } } @@ -227,7 +773,7 @@ ] }, { - "$id": "32", + "$id": "100", "kind": "model", "name": "class", "namespace": "SpecialWords.Models", @@ -236,12 +782,12 @@ "decorators": [], "properties": [ { - "$id": "33", + "$id": "101", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "34", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -254,9 +800,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.class.name", "serializationOptions": { - "$id": "35", + "$id": "103", "json": { - "$id": "36", + "$id": "104", "name": "name" } } @@ -264,7 +810,7 @@ ] }, { - "$id": "37", + "$id": "105", "kind": "model", "name": "constructor", "namespace": "SpecialWords.Models", @@ -273,12 +819,12 @@ "decorators": [], "properties": [ { - "$id": "38", + "$id": "106", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "39", + "$id": "107", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -291,9 +837,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.constructor.name", "serializationOptions": { - "$id": "40", + "$id": "108", "json": { - "$id": "41", + "$id": "109", "name": "name" } } @@ -301,7 +847,7 @@ ] }, { - "$id": "42", + "$id": "110", "kind": "model", "name": "continue", "namespace": "SpecialWords.Models", @@ -310,12 +856,12 @@ "decorators": [], "properties": [ { - "$id": "43", + "$id": "111", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "44", + "$id": "112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -328,9 +874,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.continue.name", "serializationOptions": { - "$id": "45", + "$id": "113", "json": { - "$id": "46", + "$id": "114", "name": "name" } } @@ -338,7 +884,7 @@ ] }, { - "$id": "47", + "$id": "115", "kind": "model", "name": "def", "namespace": "SpecialWords.Models", @@ -347,12 +893,12 @@ "decorators": [], "properties": [ { - "$id": "48", + "$id": "116", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "49", + "$id": "117", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -365,9 +911,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.def.name", "serializationOptions": { - "$id": "50", + "$id": "118", "json": { - "$id": "51", + "$id": "119", "name": "name" } } @@ -375,7 +921,7 @@ ] }, { - "$id": "52", + "$id": "120", "kind": "model", "name": "del", "namespace": "SpecialWords.Models", @@ -384,12 +930,12 @@ "decorators": [], "properties": [ { - "$id": "53", + "$id": "121", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "54", + "$id": "122", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -402,9 +948,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.del.name", "serializationOptions": { - "$id": "55", + "$id": "123", "json": { - "$id": "56", + "$id": "124", "name": "name" } } @@ -412,7 +958,7 @@ ] }, { - "$id": "57", + "$id": "125", "kind": "model", "name": "elif", "namespace": "SpecialWords.Models", @@ -421,12 +967,12 @@ "decorators": [], "properties": [ { - "$id": "58", + "$id": "126", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "59", + "$id": "127", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -439,9 +985,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.elif.name", "serializationOptions": { - "$id": "60", + "$id": "128", "json": { - "$id": "61", + "$id": "129", "name": "name" } } @@ -449,7 +995,7 @@ ] }, { - "$id": "62", + "$id": "130", "kind": "model", "name": "else", "namespace": "SpecialWords.Models", @@ -458,12 +1004,12 @@ "decorators": [], "properties": [ { - "$id": "63", + "$id": "131", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "64", + "$id": "132", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -476,9 +1022,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.else.name", "serializationOptions": { - "$id": "65", + "$id": "133", "json": { - "$id": "66", + "$id": "134", "name": "name" } } @@ -486,7 +1032,7 @@ ] }, { - "$id": "67", + "$id": "135", "kind": "model", "name": "except", "namespace": "SpecialWords.Models", @@ -495,12 +1041,12 @@ "decorators": [], "properties": [ { - "$id": "68", + "$id": "136", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "69", + "$id": "137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -513,9 +1059,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.except.name", "serializationOptions": { - "$id": "70", + "$id": "138", "json": { - "$id": "71", + "$id": "139", "name": "name" } } @@ -523,7 +1069,7 @@ ] }, { - "$id": "72", + "$id": "140", "kind": "model", "name": "exec", "namespace": "SpecialWords.Models", @@ -532,12 +1078,12 @@ "decorators": [], "properties": [ { - "$id": "73", + "$id": "141", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "74", + "$id": "142", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -550,9 +1096,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.exec.name", "serializationOptions": { - "$id": "75", + "$id": "143", "json": { - "$id": "76", + "$id": "144", "name": "name" } } @@ -560,7 +1106,7 @@ ] }, { - "$id": "77", + "$id": "145", "kind": "model", "name": "finally", "namespace": "SpecialWords.Models", @@ -569,12 +1115,12 @@ "decorators": [], "properties": [ { - "$id": "78", + "$id": "146", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "79", + "$id": "147", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -587,9 +1133,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.finally.name", "serializationOptions": { - "$id": "80", + "$id": "148", "json": { - "$id": "81", + "$id": "149", "name": "name" } } @@ -597,7 +1143,7 @@ ] }, { - "$id": "82", + "$id": "150", "kind": "model", "name": "for", "namespace": "SpecialWords.Models", @@ -606,12 +1152,12 @@ "decorators": [], "properties": [ { - "$id": "83", + "$id": "151", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "84", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -624,9 +1170,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.for.name", "serializationOptions": { - "$id": "85", + "$id": "153", "json": { - "$id": "86", + "$id": "154", "name": "name" } } @@ -634,7 +1180,7 @@ ] }, { - "$id": "87", + "$id": "155", "kind": "model", "name": "from", "namespace": "SpecialWords.Models", @@ -643,12 +1189,12 @@ "decorators": [], "properties": [ { - "$id": "88", + "$id": "156", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "89", + "$id": "157", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -661,9 +1207,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.from.name", "serializationOptions": { - "$id": "90", + "$id": "158", "json": { - "$id": "91", + "$id": "159", "name": "name" } } @@ -671,7 +1217,7 @@ ] }, { - "$id": "92", + "$id": "160", "kind": "model", "name": "global", "namespace": "SpecialWords.Models", @@ -680,12 +1226,12 @@ "decorators": [], "properties": [ { - "$id": "93", + "$id": "161", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "94", + "$id": "162", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -698,9 +1244,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.global.name", "serializationOptions": { - "$id": "95", + "$id": "163", "json": { - "$id": "96", + "$id": "164", "name": "name" } } @@ -708,7 +1254,7 @@ ] }, { - "$id": "97", + "$id": "165", "kind": "model", "name": "if", "namespace": "SpecialWords.Models", @@ -717,12 +1263,12 @@ "decorators": [], "properties": [ { - "$id": "98", + "$id": "166", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "99", + "$id": "167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -735,9 +1281,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.if.name", "serializationOptions": { - "$id": "100", + "$id": "168", "json": { - "$id": "101", + "$id": "169", "name": "name" } } @@ -745,7 +1291,7 @@ ] }, { - "$id": "102", + "$id": "170", "kind": "model", "name": "import", "namespace": "SpecialWords.Models", @@ -754,12 +1300,12 @@ "decorators": [], "properties": [ { - "$id": "103", + "$id": "171", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "104", + "$id": "172", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -772,9 +1318,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.import.name", "serializationOptions": { - "$id": "105", + "$id": "173", "json": { - "$id": "106", + "$id": "174", "name": "name" } } @@ -782,7 +1328,7 @@ ] }, { - "$id": "107", + "$id": "175", "kind": "model", "name": "in", "namespace": "SpecialWords.Models", @@ -791,12 +1337,12 @@ "decorators": [], "properties": [ { - "$id": "108", + "$id": "176", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "109", + "$id": "177", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -809,9 +1355,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.in.name", "serializationOptions": { - "$id": "110", + "$id": "178", "json": { - "$id": "111", + "$id": "179", "name": "name" } } @@ -819,7 +1365,7 @@ ] }, { - "$id": "112", + "$id": "180", "kind": "model", "name": "is", "namespace": "SpecialWords.Models", @@ -828,12 +1374,12 @@ "decorators": [], "properties": [ { - "$id": "113", + "$id": "181", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "114", + "$id": "182", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -846,9 +1392,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.is.name", "serializationOptions": { - "$id": "115", + "$id": "183", "json": { - "$id": "116", + "$id": "184", "name": "name" } } @@ -856,7 +1402,7 @@ ] }, { - "$id": "117", + "$id": "185", "kind": "model", "name": "lambda", "namespace": "SpecialWords.Models", @@ -865,12 +1411,12 @@ "decorators": [], "properties": [ { - "$id": "118", + "$id": "186", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "119", + "$id": "187", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -883,9 +1429,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.lambda.name", "serializationOptions": { - "$id": "120", + "$id": "188", "json": { - "$id": "121", + "$id": "189", "name": "name" } } @@ -893,7 +1439,7 @@ ] }, { - "$id": "122", + "$id": "190", "kind": "model", "name": "not", "namespace": "SpecialWords.Models", @@ -902,12 +1448,12 @@ "decorators": [], "properties": [ { - "$id": "123", + "$id": "191", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "124", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -920,9 +1466,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.not.name", "serializationOptions": { - "$id": "125", + "$id": "193", "json": { - "$id": "126", + "$id": "194", "name": "name" } } @@ -930,7 +1476,7 @@ ] }, { - "$id": "127", + "$id": "195", "kind": "model", "name": "or", "namespace": "SpecialWords.Models", @@ -939,12 +1485,12 @@ "decorators": [], "properties": [ { - "$id": "128", + "$id": "196", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "129", + "$id": "197", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -957,9 +1503,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.or.name", "serializationOptions": { - "$id": "130", + "$id": "198", "json": { - "$id": "131", + "$id": "199", "name": "name" } } @@ -967,7 +1513,7 @@ ] }, { - "$id": "132", + "$id": "200", "kind": "model", "name": "pass", "namespace": "SpecialWords.Models", @@ -976,12 +1522,12 @@ "decorators": [], "properties": [ { - "$id": "133", + "$id": "201", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "134", + "$id": "202", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -994,9 +1540,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.pass.name", "serializationOptions": { - "$id": "135", + "$id": "203", "json": { - "$id": "136", + "$id": "204", "name": "name" } } @@ -1004,7 +1550,7 @@ ] }, { - "$id": "137", + "$id": "205", "kind": "model", "name": "raise", "namespace": "SpecialWords.Models", @@ -1013,12 +1559,12 @@ "decorators": [], "properties": [ { - "$id": "138", + "$id": "206", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "139", + "$id": "207", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1031,9 +1577,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.raise.name", "serializationOptions": { - "$id": "140", + "$id": "208", "json": { - "$id": "141", + "$id": "209", "name": "name" } } @@ -1041,7 +1587,7 @@ ] }, { - "$id": "142", + "$id": "210", "kind": "model", "name": "return", "namespace": "SpecialWords.Models", @@ -1050,12 +1596,12 @@ "decorators": [], "properties": [ { - "$id": "143", + "$id": "211", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "144", + "$id": "212", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1068,9 +1614,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.return.name", "serializationOptions": { - "$id": "145", + "$id": "213", "json": { - "$id": "146", + "$id": "214", "name": "name" } } @@ -1078,7 +1624,7 @@ ] }, { - "$id": "147", + "$id": "215", "kind": "model", "name": "try", "namespace": "SpecialWords.Models", @@ -1087,12 +1633,12 @@ "decorators": [], "properties": [ { - "$id": "148", + "$id": "216", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "149", + "$id": "217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1105,9 +1651,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.try.name", "serializationOptions": { - "$id": "150", + "$id": "218", "json": { - "$id": "151", + "$id": "219", "name": "name" } } @@ -1115,7 +1661,7 @@ ] }, { - "$id": "152", + "$id": "220", "kind": "model", "name": "while", "namespace": "SpecialWords.Models", @@ -1124,12 +1670,12 @@ "decorators": [], "properties": [ { - "$id": "153", + "$id": "221", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "154", + "$id": "222", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1142,9 +1688,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.while.name", "serializationOptions": { - "$id": "155", + "$id": "223", "json": { - "$id": "156", + "$id": "224", "name": "name" } } @@ -1152,7 +1698,7 @@ ] }, { - "$id": "157", + "$id": "225", "kind": "model", "name": "with", "namespace": "SpecialWords.Models", @@ -1161,12 +1707,12 @@ "decorators": [], "properties": [ { - "$id": "158", + "$id": "226", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "159", + "$id": "227", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1179,9 +1725,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.with.name", "serializationOptions": { - "$id": "160", + "$id": "228", "json": { - "$id": "161", + "$id": "229", "name": "name" } } @@ -1189,7 +1735,7 @@ ] }, { - "$id": "162", + "$id": "230", "kind": "model", "name": "yield", "namespace": "SpecialWords.Models", @@ -1198,12 +1744,12 @@ "decorators": [], "properties": [ { - "$id": "163", + "$id": "231", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "164", + "$id": "232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1216,9 +1762,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.Models.yield.name", "serializationOptions": { - "$id": "165", + "$id": "233", "json": { - "$id": "166", + "$id": "234", "name": "name" } } @@ -1226,7 +1772,7 @@ ] }, { - "$id": "167", + "$id": "235", "kind": "model", "name": "SameAsModel", "namespace": "SpecialWords.ModelProperties", @@ -1235,12 +1781,12 @@ "decorators": [], "properties": [ { - "$id": "168", + "$id": "236", "kind": "property", "name": "SameAsModel", "serializedName": "SameAsModel", "type": { - "$id": "169", + "$id": "237", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1253,9 +1799,9 @@ "decorators": [], "crossLanguageDefinitionId": "SpecialWords.ModelProperties.SameAsModel.SameAsModel", "serializationOptions": { - "$id": "170", + "$id": "238", "json": { - "$id": "171", + "$id": "239", "name": "SameAsModel" } } @@ -1265,7 +1811,7 @@ ], "clients": [ { - "$id": "172", + "$id": "240", "kind": "client", "name": "SpecialWordsClient", "namespace": "SpecialWords", @@ -1273,12 +1819,12 @@ "methods": [], "parameters": [ { - "$id": "173", + "$id": "241", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "174", + "$id": "242", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1292,9 +1838,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "175", + "$id": "243", "type": { - "$id": "176", + "$id": "244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1308,41 +1854,31 @@ "apiVersions": [], "children": [ { - "$id": "177", + "$id": "245", "kind": "client", "name": "Models", "namespace": "SpecialWords.Models", "doc": "Verify model names", "methods": [ { - "$id": "178", + "$id": "246", "kind": "basic", "name": "withAnd", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "179", + "$id": "247", "name": "withAnd", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "180", + "$id": "248", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "181", - "kind": "constant", - "valueType": { - "$id": "182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -1355,11 +1891,11 @@ "skipUrlEncoding": false }, { - "$id": "183", + "$id": "249", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "70" }, "location": "Body", "isApiVersion": false, @@ -1374,7 +1910,7 @@ ], "responses": [ { - "$id": "184", + "$id": "250", "statusCodes": [ 204 ], @@ -1396,11 +1932,11 @@ }, "parameters": [ { - "$id": "185", + "$id": "251", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "70" }, "location": "Body", "isApiVersion": false, @@ -1413,12 +1949,12 @@ "skipUrlEncoding": false }, { - "$id": "186", + "$id": "252", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "181" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -1432,7 +1968,7 @@ } ], "response": { - "$id": "187" + "$id": "253" }, "isOverride": false, "generateConvenient": true, @@ -1440,34 +1976,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withAnd" }, { - "$id": "188", + "$id": "254", "kind": "basic", "name": "withAs", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "189", + "$id": "255", "name": "withAs", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "190", + "$id": "256", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "191", - "kind": "constant", - "valueType": { - "$id": "192", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -1480,11 +2006,11 @@ "skipUrlEncoding": false }, { - "$id": "193", + "$id": "257", "name": "body", "nameInRequest": "body", "type": { - "$ref": "7" + "$ref": "75" }, "location": "Body", "isApiVersion": false, @@ -1499,7 +2025,7 @@ ], "responses": [ { - "$id": "194", + "$id": "258", "statusCodes": [ 204 ], @@ -1521,11 +2047,11 @@ }, "parameters": [ { - "$id": "195", + "$id": "259", "name": "body", "nameInRequest": "body", "type": { - "$ref": "7" + "$ref": "75" }, "location": "Body", "isApiVersion": false, @@ -1538,12 +2064,12 @@ "skipUrlEncoding": false }, { - "$id": "196", + "$id": "260", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "191" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -1557,7 +2083,7 @@ } ], "response": { - "$id": "197" + "$id": "261" }, "isOverride": false, "generateConvenient": true, @@ -1565,34 +2091,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withAs" }, { - "$id": "198", + "$id": "262", "kind": "basic", "name": "withAssert", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "199", + "$id": "263", "name": "withAssert", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "200", + "$id": "264", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "201", - "kind": "constant", - "valueType": { - "$id": "202", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1605,11 +2121,11 @@ "skipUrlEncoding": false }, { - "$id": "203", + "$id": "265", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "80" }, "location": "Body", "isApiVersion": false, @@ -1624,7 +2140,7 @@ ], "responses": [ { - "$id": "204", + "$id": "266", "statusCodes": [ 204 ], @@ -1646,11 +2162,11 @@ }, "parameters": [ { - "$id": "205", + "$id": "267", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "80" }, "location": "Body", "isApiVersion": false, @@ -1663,12 +2179,12 @@ "skipUrlEncoding": false }, { - "$id": "206", + "$id": "268", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "201" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -1682,7 +2198,7 @@ } ], "response": { - "$id": "207" + "$id": "269" }, "isOverride": false, "generateConvenient": true, @@ -1690,34 +2206,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withAssert" }, { - "$id": "208", + "$id": "270", "kind": "basic", "name": "withAsync", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "209", + "$id": "271", "name": "withAsync", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "210", + "$id": "272", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "211", - "kind": "constant", - "valueType": { - "$id": "212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1730,11 +2236,11 @@ "skipUrlEncoding": false }, { - "$id": "213", + "$id": "273", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "85" }, "location": "Body", "isApiVersion": false, @@ -1749,7 +2255,7 @@ ], "responses": [ { - "$id": "214", + "$id": "274", "statusCodes": [ 204 ], @@ -1771,11 +2277,11 @@ }, "parameters": [ { - "$id": "215", + "$id": "275", "name": "body", "nameInRequest": "body", "type": { - "$ref": "17" + "$ref": "85" }, "location": "Body", "isApiVersion": false, @@ -1788,12 +2294,12 @@ "skipUrlEncoding": false }, { - "$id": "216", + "$id": "276", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "211" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -1807,7 +2313,7 @@ } ], "response": { - "$id": "217" + "$id": "277" }, "isOverride": false, "generateConvenient": true, @@ -1815,34 +2321,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withAsync" }, { - "$id": "218", + "$id": "278", "kind": "basic", "name": "withAwait", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "219", + "$id": "279", "name": "withAwait", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "220", + "$id": "280", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "221", - "kind": "constant", - "valueType": { - "$id": "222", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1855,11 +2351,11 @@ "skipUrlEncoding": false }, { - "$id": "223", + "$id": "281", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "90" }, "location": "Body", "isApiVersion": false, @@ -1874,7 +2370,7 @@ ], "responses": [ { - "$id": "224", + "$id": "282", "statusCodes": [ 204 ], @@ -1896,11 +2392,11 @@ }, "parameters": [ { - "$id": "225", + "$id": "283", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "90" }, "location": "Body", "isApiVersion": false, @@ -1913,12 +2409,12 @@ "skipUrlEncoding": false }, { - "$id": "226", + "$id": "284", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "221" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1932,7 +2428,7 @@ } ], "response": { - "$id": "227" + "$id": "285" }, "isOverride": false, "generateConvenient": true, @@ -1940,34 +2436,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withAwait" }, { - "$id": "228", + "$id": "286", "kind": "basic", "name": "withBreak", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "229", + "$id": "287", "name": "withBreak", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "230", + "$id": "288", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "231", - "kind": "constant", - "valueType": { - "$id": "232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1980,11 +2466,11 @@ "skipUrlEncoding": false }, { - "$id": "233", + "$id": "289", "name": "body", "nameInRequest": "body", "type": { - "$ref": "27" + "$ref": "95" }, "location": "Body", "isApiVersion": false, @@ -1999,7 +2485,7 @@ ], "responses": [ { - "$id": "234", + "$id": "290", "statusCodes": [ 204 ], @@ -2021,11 +2507,11 @@ }, "parameters": [ { - "$id": "235", + "$id": "291", "name": "body", "nameInRequest": "body", "type": { - "$ref": "27" + "$ref": "95" }, "location": "Body", "isApiVersion": false, @@ -2038,12 +2524,12 @@ "skipUrlEncoding": false }, { - "$id": "236", + "$id": "292", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "231" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -2057,7 +2543,7 @@ } ], "response": { - "$id": "237" + "$id": "293" }, "isOverride": false, "generateConvenient": true, @@ -2065,34 +2551,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withBreak" }, { - "$id": "238", + "$id": "294", "kind": "basic", "name": "withClass", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "239", + "$id": "295", "name": "withClass", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "240", + "$id": "296", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "241", - "kind": "constant", - "valueType": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -2105,11 +2581,11 @@ "skipUrlEncoding": false }, { - "$id": "243", + "$id": "297", "name": "body", "nameInRequest": "body", "type": { - "$ref": "32" + "$ref": "100" }, "location": "Body", "isApiVersion": false, @@ -2124,7 +2600,7 @@ ], "responses": [ { - "$id": "244", + "$id": "298", "statusCodes": [ 204 ], @@ -2146,11 +2622,11 @@ }, "parameters": [ { - "$id": "245", + "$id": "299", "name": "body", "nameInRequest": "body", "type": { - "$ref": "32" + "$ref": "100" }, "location": "Body", "isApiVersion": false, @@ -2163,12 +2639,12 @@ "skipUrlEncoding": false }, { - "$id": "246", + "$id": "300", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "241" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -2182,7 +2658,7 @@ } ], "response": { - "$id": "247" + "$id": "301" }, "isOverride": false, "generateConvenient": true, @@ -2190,34 +2666,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withClass" }, { - "$id": "248", + "$id": "302", "kind": "basic", "name": "withConstructor", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "249", + "$id": "303", "name": "withConstructor", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "250", + "$id": "304", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "251", - "kind": "constant", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -2230,11 +2696,11 @@ "skipUrlEncoding": false }, { - "$id": "253", + "$id": "305", "name": "body", "nameInRequest": "body", "type": { - "$ref": "37" + "$ref": "105" }, "location": "Body", "isApiVersion": false, @@ -2249,7 +2715,7 @@ ], "responses": [ { - "$id": "254", + "$id": "306", "statusCodes": [ 204 ], @@ -2271,11 +2737,11 @@ }, "parameters": [ { - "$id": "255", + "$id": "307", "name": "body", "nameInRequest": "body", "type": { - "$ref": "37" + "$ref": "105" }, "location": "Body", "isApiVersion": false, @@ -2288,12 +2754,12 @@ "skipUrlEncoding": false }, { - "$id": "256", + "$id": "308", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "251" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -2307,7 +2773,7 @@ } ], "response": { - "$id": "257" + "$id": "309" }, "isOverride": false, "generateConvenient": true, @@ -2315,34 +2781,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withConstructor" }, { - "$id": "258", + "$id": "310", "kind": "basic", "name": "withContinue", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "259", + "$id": "311", "name": "withContinue", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "260", + "$id": "312", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "261", - "kind": "constant", - "valueType": { - "$id": "262", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2355,11 +2811,11 @@ "skipUrlEncoding": false }, { - "$id": "263", + "$id": "313", "name": "body", "nameInRequest": "body", "type": { - "$ref": "42" + "$ref": "110" }, "location": "Body", "isApiVersion": false, @@ -2374,7 +2830,7 @@ ], "responses": [ { - "$id": "264", + "$id": "314", "statusCodes": [ 204 ], @@ -2396,11 +2852,11 @@ }, "parameters": [ { - "$id": "265", + "$id": "315", "name": "body", "nameInRequest": "body", "type": { - "$ref": "42" + "$ref": "110" }, "location": "Body", "isApiVersion": false, @@ -2413,12 +2869,12 @@ "skipUrlEncoding": false }, { - "$id": "266", + "$id": "316", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "261" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2432,7 +2888,7 @@ } ], "response": { - "$id": "267" + "$id": "317" }, "isOverride": false, "generateConvenient": true, @@ -2440,34 +2896,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withContinue" }, { - "$id": "268", + "$id": "318", "kind": "basic", "name": "withDef", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "269", + "$id": "319", "name": "withDef", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "270", + "$id": "320", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "271", - "kind": "constant", - "valueType": { - "$id": "272", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -2480,11 +2926,11 @@ "skipUrlEncoding": false }, { - "$id": "273", + "$id": "321", "name": "body", "nameInRequest": "body", "type": { - "$ref": "47" + "$ref": "115" }, "location": "Body", "isApiVersion": false, @@ -2499,7 +2945,7 @@ ], "responses": [ { - "$id": "274", + "$id": "322", "statusCodes": [ 204 ], @@ -2521,11 +2967,11 @@ }, "parameters": [ { - "$id": "275", + "$id": "323", "name": "body", "nameInRequest": "body", "type": { - "$ref": "47" + "$ref": "115" }, "location": "Body", "isApiVersion": false, @@ -2538,12 +2984,12 @@ "skipUrlEncoding": false }, { - "$id": "276", + "$id": "324", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "271" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -2557,7 +3003,7 @@ } ], "response": { - "$id": "277" + "$id": "325" }, "isOverride": false, "generateConvenient": true, @@ -2565,34 +3011,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withDef" }, { - "$id": "278", + "$id": "326", "kind": "basic", "name": "withDel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "279", + "$id": "327", "name": "withDel", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "280", + "$id": "328", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "281", - "kind": "constant", - "valueType": { - "$id": "282", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2605,11 +3041,11 @@ "skipUrlEncoding": false }, { - "$id": "283", + "$id": "329", "name": "body", "nameInRequest": "body", "type": { - "$ref": "52" + "$ref": "120" }, "location": "Body", "isApiVersion": false, @@ -2624,7 +3060,7 @@ ], "responses": [ { - "$id": "284", + "$id": "330", "statusCodes": [ 204 ], @@ -2646,11 +3082,11 @@ }, "parameters": [ { - "$id": "285", + "$id": "331", "name": "body", "nameInRequest": "body", "type": { - "$ref": "52" + "$ref": "120" }, "location": "Body", "isApiVersion": false, @@ -2663,12 +3099,12 @@ "skipUrlEncoding": false }, { - "$id": "286", + "$id": "332", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "281" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2682,7 +3118,7 @@ } ], "response": { - "$id": "287" + "$id": "333" }, "isOverride": false, "generateConvenient": true, @@ -2690,34 +3126,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withDel" }, { - "$id": "288", + "$id": "334", "kind": "basic", "name": "withElif", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "289", + "$id": "335", "name": "withElif", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "290", + "$id": "336", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "291", - "kind": "constant", - "valueType": { - "$id": "292", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2730,11 +3156,11 @@ "skipUrlEncoding": false }, { - "$id": "293", + "$id": "337", "name": "body", "nameInRequest": "body", "type": { - "$ref": "57" + "$ref": "125" }, "location": "Body", "isApiVersion": false, @@ -2749,7 +3175,7 @@ ], "responses": [ { - "$id": "294", + "$id": "338", "statusCodes": [ 204 ], @@ -2771,11 +3197,11 @@ }, "parameters": [ { - "$id": "295", + "$id": "339", "name": "body", "nameInRequest": "body", "type": { - "$ref": "57" + "$ref": "125" }, "location": "Body", "isApiVersion": false, @@ -2788,12 +3214,12 @@ "skipUrlEncoding": false }, { - "$id": "296", + "$id": "340", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "291" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -2807,7 +3233,7 @@ } ], "response": { - "$id": "297" + "$id": "341" }, "isOverride": false, "generateConvenient": true, @@ -2815,34 +3241,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withElif" }, { - "$id": "298", + "$id": "342", "kind": "basic", "name": "withElse", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "299", + "$id": "343", "name": "withElse", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "300", + "$id": "344", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "301", - "kind": "constant", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2855,11 +3271,11 @@ "skipUrlEncoding": false }, { - "$id": "303", + "$id": "345", "name": "body", "nameInRequest": "body", "type": { - "$ref": "62" + "$ref": "130" }, "location": "Body", "isApiVersion": false, @@ -2874,7 +3290,7 @@ ], "responses": [ { - "$id": "304", + "$id": "346", "statusCodes": [ 204 ], @@ -2896,11 +3312,11 @@ }, "parameters": [ { - "$id": "305", + "$id": "347", "name": "body", "nameInRequest": "body", "type": { - "$ref": "62" + "$ref": "130" }, "location": "Body", "isApiVersion": false, @@ -2913,12 +3329,12 @@ "skipUrlEncoding": false }, { - "$id": "306", + "$id": "348", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "301" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2932,7 +3348,7 @@ } ], "response": { - "$id": "307" + "$id": "349" }, "isOverride": false, "generateConvenient": true, @@ -2940,34 +3356,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withElse" }, { - "$id": "308", + "$id": "350", "kind": "basic", "name": "withExcept", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "309", + "$id": "351", "name": "withExcept", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "310", + "$id": "352", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "311", - "kind": "constant", - "valueType": { - "$id": "312", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2980,11 +3386,11 @@ "skipUrlEncoding": false }, { - "$id": "313", + "$id": "353", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "135" }, "location": "Body", "isApiVersion": false, @@ -2999,7 +3405,7 @@ ], "responses": [ { - "$id": "314", + "$id": "354", "statusCodes": [ 204 ], @@ -3021,11 +3427,11 @@ }, "parameters": [ { - "$id": "315", + "$id": "355", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "135" }, "location": "Body", "isApiVersion": false, @@ -3038,12 +3444,12 @@ "skipUrlEncoding": false }, { - "$id": "316", + "$id": "356", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "311" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -3057,7 +3463,7 @@ } ], "response": { - "$id": "317" + "$id": "357" }, "isOverride": false, "generateConvenient": true, @@ -3065,34 +3471,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withExcept" }, { - "$id": "318", + "$id": "358", "kind": "basic", "name": "withExec", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "319", + "$id": "359", "name": "withExec", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "320", + "$id": "360", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "321", - "kind": "constant", - "valueType": { - "$id": "322", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -3105,11 +3501,11 @@ "skipUrlEncoding": false }, { - "$id": "323", + "$id": "361", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "140" }, "location": "Body", "isApiVersion": false, @@ -3124,7 +3520,7 @@ ], "responses": [ { - "$id": "324", + "$id": "362", "statusCodes": [ 204 ], @@ -3146,11 +3542,11 @@ }, "parameters": [ { - "$id": "325", + "$id": "363", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "140" }, "location": "Body", "isApiVersion": false, @@ -3163,12 +3559,12 @@ "skipUrlEncoding": false }, { - "$id": "326", + "$id": "364", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "321" + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -3182,7 +3578,7 @@ } ], "response": { - "$id": "327" + "$id": "365" }, "isOverride": false, "generateConvenient": true, @@ -3190,34 +3586,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withExec" }, { - "$id": "328", + "$id": "366", "kind": "basic", "name": "withFinally", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "329", + "$id": "367", "name": "withFinally", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "330", + "$id": "368", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "331", - "kind": "constant", - "valueType": { - "$id": "332", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -3230,11 +3616,11 @@ "skipUrlEncoding": false }, { - "$id": "333", + "$id": "369", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "145" }, "location": "Body", "isApiVersion": false, @@ -3249,7 +3635,7 @@ ], "responses": [ { - "$id": "334", + "$id": "370", "statusCodes": [ 204 ], @@ -3271,11 +3657,11 @@ }, "parameters": [ { - "$id": "335", + "$id": "371", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "145" }, "location": "Body", "isApiVersion": false, @@ -3288,12 +3674,12 @@ "skipUrlEncoding": false }, { - "$id": "336", + "$id": "372", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "331" + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -3307,7 +3693,7 @@ } ], "response": { - "$id": "337" + "$id": "373" }, "isOverride": false, "generateConvenient": true, @@ -3315,34 +3701,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withFinally" }, { - "$id": "338", + "$id": "374", "kind": "basic", "name": "withFor", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "339", + "$id": "375", "name": "withFor", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "340", + "$id": "376", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "341", - "kind": "constant", - "valueType": { - "$id": "342", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -3355,11 +3731,11 @@ "skipUrlEncoding": false }, { - "$id": "343", + "$id": "377", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "150" }, "location": "Body", "isApiVersion": false, @@ -3374,7 +3750,7 @@ ], "responses": [ { - "$id": "344", + "$id": "378", "statusCodes": [ 204 ], @@ -3396,11 +3772,11 @@ }, "parameters": [ { - "$id": "345", + "$id": "379", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "150" }, "location": "Body", "isApiVersion": false, @@ -3413,12 +3789,12 @@ "skipUrlEncoding": false }, { - "$id": "346", + "$id": "380", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "341" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -3432,7 +3808,7 @@ } ], "response": { - "$id": "347" + "$id": "381" }, "isOverride": false, "generateConvenient": true, @@ -3440,34 +3816,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withFor" }, { - "$id": "348", + "$id": "382", "kind": "basic", "name": "withFrom", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "349", + "$id": "383", "name": "withFrom", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "350", + "$id": "384", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "351", - "kind": "constant", - "valueType": { - "$id": "352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -3480,11 +3846,11 @@ "skipUrlEncoding": false }, { - "$id": "353", + "$id": "385", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "155" }, "location": "Body", "isApiVersion": false, @@ -3499,7 +3865,7 @@ ], "responses": [ { - "$id": "354", + "$id": "386", "statusCodes": [ 204 ], @@ -3521,11 +3887,11 @@ }, "parameters": [ { - "$id": "355", + "$id": "387", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "155" }, "location": "Body", "isApiVersion": false, @@ -3538,12 +3904,12 @@ "skipUrlEncoding": false }, { - "$id": "356", + "$id": "388", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "351" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -3557,7 +3923,7 @@ } ], "response": { - "$id": "357" + "$id": "389" }, "isOverride": false, "generateConvenient": true, @@ -3565,34 +3931,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withFrom" }, { - "$id": "358", + "$id": "390", "kind": "basic", "name": "withGlobal", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "359", + "$id": "391", "name": "withGlobal", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "360", + "$id": "392", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "361", - "kind": "constant", - "valueType": { - "$id": "362", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -3605,11 +3961,11 @@ "skipUrlEncoding": false }, { - "$id": "363", + "$id": "393", "name": "body", "nameInRequest": "body", "type": { - "$ref": "92" + "$ref": "160" }, "location": "Body", "isApiVersion": false, @@ -3624,7 +3980,7 @@ ], "responses": [ { - "$id": "364", + "$id": "394", "statusCodes": [ 204 ], @@ -3646,11 +4002,11 @@ }, "parameters": [ { - "$id": "365", + "$id": "395", "name": "body", "nameInRequest": "body", "type": { - "$ref": "92" + "$ref": "160" }, "location": "Body", "isApiVersion": false, @@ -3663,12 +4019,12 @@ "skipUrlEncoding": false }, { - "$id": "366", + "$id": "396", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "361" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -3682,7 +4038,7 @@ } ], "response": { - "$id": "367" + "$id": "397" }, "isOverride": false, "generateConvenient": true, @@ -3690,34 +4046,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withGlobal" }, { - "$id": "368", + "$id": "398", "kind": "basic", "name": "withIf", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "369", + "$id": "399", "name": "withIf", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "370", + "$id": "400", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "371", - "kind": "constant", - "valueType": { - "$id": "372", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3730,11 +4076,11 @@ "skipUrlEncoding": false }, { - "$id": "373", + "$id": "401", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "165" }, "location": "Body", "isApiVersion": false, @@ -3749,7 +4095,7 @@ ], "responses": [ { - "$id": "374", + "$id": "402", "statusCodes": [ 204 ], @@ -3771,11 +4117,11 @@ }, "parameters": [ { - "$id": "375", + "$id": "403", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "165" }, "location": "Body", "isApiVersion": false, @@ -3788,12 +4134,12 @@ "skipUrlEncoding": false }, { - "$id": "376", + "$id": "404", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "371" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3807,7 +4153,7 @@ } ], "response": { - "$id": "377" + "$id": "405" }, "isOverride": false, "generateConvenient": true, @@ -3815,34 +4161,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withIf" }, { - "$id": "378", + "$id": "406", "kind": "basic", "name": "withImport", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "379", + "$id": "407", "name": "withImport", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "380", + "$id": "408", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "381", - "kind": "constant", - "valueType": { - "$id": "382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3855,11 +4191,11 @@ "skipUrlEncoding": false }, { - "$id": "383", + "$id": "409", "name": "body", "nameInRequest": "body", "type": { - "$ref": "102" + "$ref": "170" }, "location": "Body", "isApiVersion": false, @@ -3874,7 +4210,7 @@ ], "responses": [ { - "$id": "384", + "$id": "410", "statusCodes": [ 204 ], @@ -3896,11 +4232,11 @@ }, "parameters": [ { - "$id": "385", + "$id": "411", "name": "body", "nameInRequest": "body", "type": { - "$ref": "102" + "$ref": "170" }, "location": "Body", "isApiVersion": false, @@ -3913,12 +4249,12 @@ "skipUrlEncoding": false }, { - "$id": "386", + "$id": "412", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "381" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3932,7 +4268,7 @@ } ], "response": { - "$id": "387" + "$id": "413" }, "isOverride": false, "generateConvenient": true, @@ -3940,34 +4276,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withImport" }, { - "$id": "388", + "$id": "414", "kind": "basic", "name": "withIn", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "389", + "$id": "415", "name": "withIn", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "390", + "$id": "416", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "391", - "kind": "constant", - "valueType": { - "$id": "392", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -3980,11 +4306,11 @@ "skipUrlEncoding": false }, { - "$id": "393", + "$id": "417", "name": "body", "nameInRequest": "body", "type": { - "$ref": "107" + "$ref": "175" }, "location": "Body", "isApiVersion": false, @@ -3999,7 +4325,7 @@ ], "responses": [ { - "$id": "394", + "$id": "418", "statusCodes": [ 204 ], @@ -4021,11 +4347,11 @@ }, "parameters": [ { - "$id": "395", + "$id": "419", "name": "body", "nameInRequest": "body", "type": { - "$ref": "107" + "$ref": "175" }, "location": "Body", "isApiVersion": false, @@ -4038,12 +4364,12 @@ "skipUrlEncoding": false }, { - "$id": "396", + "$id": "420", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "391" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -4057,7 +4383,7 @@ } ], "response": { - "$id": "397" + "$id": "421" }, "isOverride": false, "generateConvenient": true, @@ -4065,34 +4391,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withIn" }, { - "$id": "398", + "$id": "422", "kind": "basic", "name": "withIs", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "399", + "$id": "423", "name": "withIs", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "400", + "$id": "424", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "401", - "kind": "constant", - "valueType": { - "$id": "402", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -4105,11 +4421,11 @@ "skipUrlEncoding": false }, { - "$id": "403", + "$id": "425", "name": "body", "nameInRequest": "body", "type": { - "$ref": "112" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -4124,7 +4440,7 @@ ], "responses": [ { - "$id": "404", + "$id": "426", "statusCodes": [ 204 ], @@ -4146,11 +4462,11 @@ }, "parameters": [ { - "$id": "405", + "$id": "427", "name": "body", "nameInRequest": "body", "type": { - "$ref": "112" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -4163,12 +4479,12 @@ "skipUrlEncoding": false }, { - "$id": "406", + "$id": "428", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "401" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -4182,7 +4498,7 @@ } ], "response": { - "$id": "407" + "$id": "429" }, "isOverride": false, "generateConvenient": true, @@ -4190,34 +4506,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withIs" }, { - "$id": "408", + "$id": "430", "kind": "basic", "name": "withLambda", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "409", + "$id": "431", "name": "withLambda", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "410", + "$id": "432", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "411", - "kind": "constant", - "valueType": { - "$id": "412", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -4230,11 +4536,11 @@ "skipUrlEncoding": false }, { - "$id": "413", + "$id": "433", "name": "body", "nameInRequest": "body", "type": { - "$ref": "117" + "$ref": "185" }, "location": "Body", "isApiVersion": false, @@ -4249,7 +4555,7 @@ ], "responses": [ { - "$id": "414", + "$id": "434", "statusCodes": [ 204 ], @@ -4271,11 +4577,11 @@ }, "parameters": [ { - "$id": "415", + "$id": "435", "name": "body", "nameInRequest": "body", "type": { - "$ref": "117" + "$ref": "185" }, "location": "Body", "isApiVersion": false, @@ -4288,12 +4594,12 @@ "skipUrlEncoding": false }, { - "$id": "416", + "$id": "436", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "411" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -4307,7 +4613,7 @@ } ], "response": { - "$id": "417" + "$id": "437" }, "isOverride": false, "generateConvenient": true, @@ -4315,34 +4621,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withLambda" }, { - "$id": "418", + "$id": "438", "kind": "basic", "name": "withNot", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "419", + "$id": "439", "name": "withNot", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "420", + "$id": "440", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "421", - "kind": "constant", - "valueType": { - "$id": "422", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -4355,11 +4651,11 @@ "skipUrlEncoding": false }, { - "$id": "423", + "$id": "441", "name": "body", "nameInRequest": "body", "type": { - "$ref": "122" + "$ref": "190" }, "location": "Body", "isApiVersion": false, @@ -4374,7 +4670,7 @@ ], "responses": [ { - "$id": "424", + "$id": "442", "statusCodes": [ 204 ], @@ -4396,11 +4692,11 @@ }, "parameters": [ { - "$id": "425", + "$id": "443", "name": "body", "nameInRequest": "body", "type": { - "$ref": "122" + "$ref": "190" }, "location": "Body", "isApiVersion": false, @@ -4413,12 +4709,12 @@ "skipUrlEncoding": false }, { - "$id": "426", + "$id": "444", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "421" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -4432,7 +4728,7 @@ } ], "response": { - "$id": "427" + "$id": "445" }, "isOverride": false, "generateConvenient": true, @@ -4440,34 +4736,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withNot" }, { - "$id": "428", + "$id": "446", "kind": "basic", "name": "withOr", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "429", + "$id": "447", "name": "withOr", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "430", + "$id": "448", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "431", - "kind": "constant", - "valueType": { - "$id": "432", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -4480,11 +4766,11 @@ "skipUrlEncoding": false }, { - "$id": "433", + "$id": "449", "name": "body", "nameInRequest": "body", "type": { - "$ref": "127" + "$ref": "195" }, "location": "Body", "isApiVersion": false, @@ -4499,7 +4785,7 @@ ], "responses": [ { - "$id": "434", + "$id": "450", "statusCodes": [ 204 ], @@ -4521,11 +4807,11 @@ }, "parameters": [ { - "$id": "435", + "$id": "451", "name": "body", "nameInRequest": "body", "type": { - "$ref": "127" + "$ref": "195" }, "location": "Body", "isApiVersion": false, @@ -4538,12 +4824,12 @@ "skipUrlEncoding": false }, { - "$id": "436", + "$id": "452", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "431" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -4557,7 +4843,7 @@ } ], "response": { - "$id": "437" + "$id": "453" }, "isOverride": false, "generateConvenient": true, @@ -4565,34 +4851,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withOr" }, { - "$id": "438", + "$id": "454", "kind": "basic", "name": "withPass", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "439", + "$id": "455", "name": "withPass", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "440", + "$id": "456", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "441", - "kind": "constant", - "valueType": { - "$id": "442", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -4605,11 +4881,11 @@ "skipUrlEncoding": false }, { - "$id": "443", + "$id": "457", "name": "body", "nameInRequest": "body", "type": { - "$ref": "132" + "$ref": "200" }, "location": "Body", "isApiVersion": false, @@ -4624,7 +4900,7 @@ ], "responses": [ { - "$id": "444", + "$id": "458", "statusCodes": [ 204 ], @@ -4646,11 +4922,11 @@ }, "parameters": [ { - "$id": "445", + "$id": "459", "name": "body", "nameInRequest": "body", "type": { - "$ref": "132" + "$ref": "200" }, "location": "Body", "isApiVersion": false, @@ -4663,12 +4939,12 @@ "skipUrlEncoding": false }, { - "$id": "446", + "$id": "460", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "441" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -4682,7 +4958,7 @@ } ], "response": { - "$id": "447" + "$id": "461" }, "isOverride": false, "generateConvenient": true, @@ -4690,34 +4966,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withPass" }, { - "$id": "448", + "$id": "462", "kind": "basic", "name": "withRaise", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "449", + "$id": "463", "name": "withRaise", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "450", + "$id": "464", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "451", - "kind": "constant", - "valueType": { - "$id": "452", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -4730,11 +4996,11 @@ "skipUrlEncoding": false }, { - "$id": "453", + "$id": "465", "name": "body", "nameInRequest": "body", "type": { - "$ref": "137" + "$ref": "205" }, "location": "Body", "isApiVersion": false, @@ -4749,7 +5015,7 @@ ], "responses": [ { - "$id": "454", + "$id": "466", "statusCodes": [ 204 ], @@ -4771,11 +5037,11 @@ }, "parameters": [ { - "$id": "455", + "$id": "467", "name": "body", "nameInRequest": "body", "type": { - "$ref": "137" + "$ref": "205" }, "location": "Body", "isApiVersion": false, @@ -4788,12 +5054,12 @@ "skipUrlEncoding": false }, { - "$id": "456", + "$id": "468", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "451" + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -4807,7 +5073,7 @@ } ], "response": { - "$id": "457" + "$id": "469" }, "isOverride": false, "generateConvenient": true, @@ -4815,34 +5081,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withRaise" }, { - "$id": "458", + "$id": "470", "kind": "basic", "name": "withReturn", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "459", + "$id": "471", "name": "withReturn", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "460", + "$id": "472", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "461", - "kind": "constant", - "valueType": { - "$id": "462", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -4855,11 +5111,11 @@ "skipUrlEncoding": false }, { - "$id": "463", + "$id": "473", "name": "body", "nameInRequest": "body", "type": { - "$ref": "142" + "$ref": "210" }, "location": "Body", "isApiVersion": false, @@ -4874,7 +5130,7 @@ ], "responses": [ { - "$id": "464", + "$id": "474", "statusCodes": [ 204 ], @@ -4896,11 +5152,11 @@ }, "parameters": [ { - "$id": "465", + "$id": "475", "name": "body", "nameInRequest": "body", "type": { - "$ref": "142" + "$ref": "210" }, "location": "Body", "isApiVersion": false, @@ -4913,12 +5169,12 @@ "skipUrlEncoding": false }, { - "$id": "466", + "$id": "476", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "461" + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -4932,7 +5188,7 @@ } ], "response": { - "$id": "467" + "$id": "477" }, "isOverride": false, "generateConvenient": true, @@ -4940,34 +5196,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withReturn" }, { - "$id": "468", + "$id": "478", "kind": "basic", "name": "withTry", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "469", + "$id": "479", "name": "withTry", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "470", + "$id": "480", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "471", - "kind": "constant", - "valueType": { - "$id": "472", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -4980,11 +5226,11 @@ "skipUrlEncoding": false }, { - "$id": "473", + "$id": "481", "name": "body", "nameInRequest": "body", "type": { - "$ref": "147" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -4999,7 +5245,7 @@ ], "responses": [ { - "$id": "474", + "$id": "482", "statusCodes": [ 204 ], @@ -5021,11 +5267,11 @@ }, "parameters": [ { - "$id": "475", + "$id": "483", "name": "body", "nameInRequest": "body", "type": { - "$ref": "147" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -5038,12 +5284,12 @@ "skipUrlEncoding": false }, { - "$id": "476", + "$id": "484", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "471" + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -5057,7 +5303,7 @@ } ], "response": { - "$id": "477" + "$id": "485" }, "isOverride": false, "generateConvenient": true, @@ -5065,34 +5311,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withTry" }, { - "$id": "478", + "$id": "486", "kind": "basic", "name": "withWhile", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "479", + "$id": "487", "name": "withWhile", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "480", + "$id": "488", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "481", - "kind": "constant", - "valueType": { - "$id": "482", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -5105,11 +5341,11 @@ "skipUrlEncoding": false }, { - "$id": "483", + "$id": "489", "name": "body", "nameInRequest": "body", "type": { - "$ref": "152" + "$ref": "220" }, "location": "Body", "isApiVersion": false, @@ -5124,7 +5360,7 @@ ], "responses": [ { - "$id": "484", + "$id": "490", "statusCodes": [ 204 ], @@ -5146,11 +5382,11 @@ }, "parameters": [ { - "$id": "485", + "$id": "491", "name": "body", "nameInRequest": "body", "type": { - "$ref": "152" + "$ref": "220" }, "location": "Body", "isApiVersion": false, @@ -5163,12 +5399,12 @@ "skipUrlEncoding": false }, { - "$id": "486", + "$id": "492", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "481" + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -5182,7 +5418,7 @@ } ], "response": { - "$id": "487" + "$id": "493" }, "isOverride": false, "generateConvenient": true, @@ -5190,34 +5426,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withWhile" }, { - "$id": "488", + "$id": "494", "kind": "basic", "name": "withWith", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "489", + "$id": "495", "name": "withWith", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "490", + "$id": "496", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "491", - "kind": "constant", - "valueType": { - "$id": "492", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -5230,11 +5456,11 @@ "skipUrlEncoding": false }, { - "$id": "493", + "$id": "497", "name": "body", "nameInRequest": "body", "type": { - "$ref": "157" + "$ref": "225" }, "location": "Body", "isApiVersion": false, @@ -5249,7 +5475,7 @@ ], "responses": [ { - "$id": "494", + "$id": "498", "statusCodes": [ 204 ], @@ -5271,11 +5497,11 @@ }, "parameters": [ { - "$id": "495", + "$id": "499", "name": "body", "nameInRequest": "body", "type": { - "$ref": "157" + "$ref": "225" }, "location": "Body", "isApiVersion": false, @@ -5288,12 +5514,12 @@ "skipUrlEncoding": false }, { - "$id": "496", + "$id": "500", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "491" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -5307,7 +5533,7 @@ } ], "response": { - "$id": "497" + "$id": "501" }, "isOverride": false, "generateConvenient": true, @@ -5315,34 +5541,24 @@ "crossLanguageDefinitionId": "SpecialWords.Models.withWith" }, { - "$id": "498", + "$id": "502", "kind": "basic", "name": "withYield", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "499", + "$id": "503", "name": "withYield", "resourceName": "Models", "accessibility": "public", "parameters": [ { - "$id": "500", + "$id": "504", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "501", - "kind": "constant", - "valueType": { - "$id": "502", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -5355,11 +5571,11 @@ "skipUrlEncoding": false }, { - "$id": "503", + "$id": "505", "name": "body", "nameInRequest": "body", "type": { - "$ref": "162" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -5374,7 +5590,7 @@ ], "responses": [ { - "$id": "504", + "$id": "506", "statusCodes": [ 204 ], @@ -5396,11 +5612,11 @@ }, "parameters": [ { - "$id": "505", + "$id": "507", "name": "body", "nameInRequest": "body", "type": { - "$ref": "162" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -5413,12 +5629,12 @@ "skipUrlEncoding": false }, { - "$id": "506", + "$id": "508", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "501" + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -5432,7 +5648,7 @@ } ], "response": { - "$id": "507" + "$id": "509" }, "isOverride": false, "generateConvenient": true, @@ -5442,12 +5658,12 @@ ], "parameters": [ { - "$id": "508", + "$id": "510", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "509", + "$id": "511", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5461,9 +5677,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "510", + "$id": "512", "type": { - "$id": "511", + "$id": "513", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5476,45 +5692,35 @@ "crossLanguageDefinitionId": "SpecialWords.Models", "apiVersions": [], "parent": { - "$ref": "172" + "$ref": "240" } }, { - "$id": "512", + "$id": "514", "kind": "client", "name": "ModelProperties", "namespace": "SpecialWords.ModelProperties", "doc": "Verify model names", "methods": [ { - "$id": "513", + "$id": "515", "kind": "basic", "name": "sameAsModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "514", + "$id": "516", "name": "sameAsModel", "resourceName": "ModelProperties", "accessibility": "public", "parameters": [ { - "$id": "515", + "$id": "517", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "516", - "kind": "constant", - "valueType": { - "$id": "517", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -5531,7 +5737,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "167" + "$ref": "235" }, "location": "Body", "isApiVersion": false, @@ -5572,7 +5778,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "167" + "$ref": "235" }, "location": "Body", "isApiVersion": false, @@ -5590,7 +5796,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "516" + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -5648,7 +5854,7 @@ "crossLanguageDefinitionId": "SpecialWords.ModelProperties", "apiVersions": [], "parent": { - "$ref": "172" + "$ref": "240" } }, { @@ -7015,7 +7221,7 @@ "crossLanguageDefinitionId": "SpecialWords.Operations", "apiVersions": [], "parent": { - "$ref": "172" + "$ref": "240" } }, { @@ -9918,7 +10124,7 @@ "crossLanguageDefinitionId": "SpecialWords.Parameters", "apiVersions": [], "parent": { - "$ref": "172" + "$ref": "240" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.Serialization.cs deleted file mode 100644 index 10c485d7f757..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.Serialization.cs +++ /dev/null @@ -1,41 +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 Azure; -using Azure.Core; - -namespace TypeSpec.Http.Streams -{ - public partial class JsonlStreamInfo : IJsonModel - { - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) => throw null; - - JsonlStreamInfo IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - protected virtual JsonlStreamInfo JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => throw null; - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => throw null; - - protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) => throw null; - - JsonlStreamInfo IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => throw null; - - protected virtual JsonlStreamInfo PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) => throw null; - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => throw null; - - /// The to serialize into . - public static implicit operator RequestContent(JsonlStreamInfo jsonlStreamInfo) => throw null; - - public static explicit operator JsonlStreamInfo(Response result) => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.cs index fc0b5bd0eed1..ff7c2f07f5a3 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfo.cs @@ -9,6 +9,6 @@ namespace TypeSpec.Http.Streams { public partial class JsonlStreamInfo { - public JsonlStreamInfoContentType ContentType => throw null; + public string ContentType => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfoContentType.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfoContentType.cs deleted file mode 100644 index b977cc4aa41d..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/Models/JsonlStreamInfoContentType.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace TypeSpec.Http.Streams -{ - public readonly partial struct JsonlStreamInfoContentType : IEquatable - { - public JsonlStreamInfoContentType(string value) => throw null; - - public static JsonlStreamInfoContentType ApplicationJsonl => throw null; - - public static bool operator ==(JsonlStreamInfoContentType left, JsonlStreamInfoContentType right) => throw null; - - public static bool operator !=(JsonlStreamInfoContentType left, JsonlStreamInfoContentType right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator JsonlStreamInfoContentType(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(JsonlStreamInfoContentType other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/StreamingJsonlModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/StreamingJsonlModelFactory.cs index 5134f3a8dd61..fc0cb0b04783 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/StreamingJsonlModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Generated/StreamingJsonlModelFactory.cs @@ -11,6 +11,6 @@ namespace Streaming.Jsonl { public static partial class StreamingJsonlModelFactory { - public static JsonlStreamInfo JsonlStreamInfo(JsonlStreamInfoContentType contentType = default) => throw null; + public static JsonlStreamInfo JsonlStreamInfo(string contentType = default) => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj index 3a5dad3ca1b6..89ee8566535c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/src/Streaming.Jsonl.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/tspCodeModel.json index e369aab31b33..ab7530e2cf28 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/streaming/jsonl/tspCodeModel.json @@ -2,11 +2,14 @@ "$id": "1", "name": "Streaming.Jsonl", "apiVersions": [], - "enums": [ + "enums": [], + "constants": [ { "$id": "2", - "kind": "enum", - "name": "JsonlStreamInfo_content-type", + "kind": "constant", + "name": "SendRequestContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "3", "kind": "string", @@ -14,33 +17,61 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "application/jsonl", - "value": "application/jsonl", - "doc": "application/jsonl", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", + "value": "application/jsonl", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "JsonlStreamInfoContentType", "namespace": "TypeSpec.Http.Streams", - "doc": "The JsonlStreamInfo_content-type", - "isFixed": false, - "isFlags": false, "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/jsonl", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "receiveContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/jsonl", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "SendRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/jsonl", "decorators": [] } ], "models": [ { - "$id": "5", + "$id": "10", "kind": "model", "name": "JsonlStreamInfo", "namespace": "TypeSpec.Http.Streams", @@ -50,32 +81,25 @@ "decorators": [], "properties": [ { - "$id": "6", + "$id": "11", "kind": "header", "name": "contentType", "serializedName": "content-type", "type": { - "$id": "7", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "application/jsonl", - "decorators": [] + "$ref": "4" }, "optional": false, "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "TypeSpec.Http.Streams.JsonlStream.contentType", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] } ] } ], "clients": [ { - "$id": "8", + "$id": "12", "kind": "client", "name": "JsonlClient", "namespace": "Streaming.Jsonl", @@ -83,12 +107,12 @@ "methods": [], "parameters": [ { - "$id": "9", + "$id": "13", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "10", + "$id": "14", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -102,9 +126,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "11", + "$id": "15", "type": { - "$id": "12", + "$id": "16", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -118,39 +142,29 @@ "apiVersions": [], "children": [ { - "$id": "13", + "$id": "17", "kind": "client", "name": "Basic", "namespace": "Streaming.Jsonl.Basic", "methods": [ { - "$id": "14", + "$id": "18", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "15", + "$id": "19", "name": "send", "resourceName": "Basic", "accessibility": "public", "parameters": [ { - "$id": "16", + "$id": "20", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "17", - "kind": "constant", - "valueType": { - "$id": "18", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/jsonl", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -163,11 +177,11 @@ "skipUrlEncoding": false }, { - "$id": "19", + "$id": "21", "name": "body", "nameInRequest": "body", "type": { - "$id": "20", + "$id": "22", "kind": "bytes", "name": "bytes", "crossLanguageDefinitionId": "", @@ -186,7 +200,7 @@ ], "responses": [ { - "$id": "21", + "$id": "23", "statusCodes": [ 204 ], @@ -208,11 +222,11 @@ }, "parameters": [ { - "$id": "22", + "$id": "24", "name": "stream", "nameInRequest": "stream", "type": { - "$ref": "5" + "$ref": "10" }, "location": "", "isApiVersion": false, @@ -226,7 +240,7 @@ } ], "response": { - "$id": "23" + "$id": "25" }, "isOverride": false, "generateConvenient": true, @@ -234,33 +248,23 @@ "crossLanguageDefinitionId": "Streaming.Jsonl.Basic.send" }, { - "$id": "24", + "$id": "26", "kind": "basic", "name": "receive", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "25", + "$id": "27", "name": "receive", "resourceName": "Basic", "accessibility": "public", "parameters": [ { - "$id": "26", + "$id": "28", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "27", - "kind": "constant", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/jsonl", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -292,17 +296,7 @@ "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "32", - "kind": "constant", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/jsonl", - "decorators": [] + "$ref": "8" } } ], @@ -323,11 +317,11 @@ }, "parameters": [ { - "$id": "34", + "$id": "32", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "27" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -341,7 +335,7 @@ } ], "response": { - "$id": "35", + "$id": "33", "type": { "$ref": "30" } @@ -354,12 +348,12 @@ ], "parameters": [ { - "$id": "36", + "$id": "34", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "37", + "$id": "35", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -373,9 +367,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "38", + "$id": "36", "type": { - "$id": "39", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -388,7 +382,7 @@ "crossLanguageDefinitionId": "Streaming.Jsonl.Basic", "apiVersions": [], "parent": { - "$ref": "8" + "$ref": "12" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj index 7279fbf892a0..7c2c5464ffcd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/src/Type.Array.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json index b47c8a36431e..00194c9bd37e 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/array/tspCodeModel.json @@ -3,9 +3,459 @@ "name": "Type.Array", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "putContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "putContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "putContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "putContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "putContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "putContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "putContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "putContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "putContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "putContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "putContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "getContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "putContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "getContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "putContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "getContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "putContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "58", "kind": "model", "name": "InnerModel", "namespace": "Type.Array", @@ -15,13 +465,13 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "59", "kind": "property", "name": "property", "serializedName": "property", "doc": "Required string property", "type": { - "$id": "4", + "$id": "60", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34,24 +484,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Array.InnerModel.property", "serializationOptions": { - "$id": "5", + "$id": "61", "json": { - "$id": "6", + "$id": "62", "name": "property" } } }, { - "$id": "7", + "$id": "63", "kind": "property", "name": "children", "serializedName": "children", "type": { - "$id": "8", + "$id": "64", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "2" + "$ref": "58" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -63,9 +513,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Array.InnerModel.children", "serializationOptions": { - "$id": "9", + "$id": "65", "json": { - "$id": "10", + "$id": "66", "name": "children" } } @@ -75,7 +525,7 @@ ], "clients": [ { - "$id": "11", + "$id": "67", "kind": "client", "name": "ArrayClient", "namespace": "Type.Array", @@ -83,12 +533,12 @@ "methods": [], "parameters": [ { - "$id": "12", + "$id": "68", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "13", + "$id": "69", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -102,9 +552,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "14", + "$id": "70", "type": { - "$id": "15", + "$id": "71", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -118,40 +568,30 @@ "apiVersions": [], "children": [ { - "$id": "16", + "$id": "72", "kind": "client", "name": "Int32Value", "namespace": "Type.Array", "doc": "Array of int32 values", "methods": [ { - "$id": "17", + "$id": "73", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "18", + "$id": "74", "name": "get", "resourceName": "Int32Value", "accessibility": "public", "parameters": [ { - "$id": "19", + "$id": "75", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "20", - "kind": "constant", - "valueType": { - "$id": "21", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -166,16 +606,16 @@ ], "responses": [ { - "$id": "22", + "$id": "76", "statusCodes": [ 200 ], "bodyType": { - "$id": "23", + "$id": "77", "kind": "array", "name": "Array", "valueType": { - "$id": "24", + "$id": "78", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -202,11 +642,11 @@ }, "parameters": [ { - "$id": "25", + "$id": "79", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "20" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -220,9 +660,9 @@ } ], "response": { - "$id": "26", + "$id": "80", "type": { - "$ref": "23" + "$ref": "77" } }, "isOverride": false, @@ -231,34 +671,24 @@ "crossLanguageDefinitionId": "Type.Array.Int32Value.get" }, { - "$id": "27", + "$id": "81", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "28", + "$id": "82", "name": "put", "resourceName": "Int32Value", "accessibility": "public", "parameters": [ { - "$id": "29", + "$id": "83", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "30", - "kind": "constant", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -271,15 +701,15 @@ "skipUrlEncoding": false }, { - "$id": "32", + "$id": "84", "name": "body", "nameInRequest": "body", "type": { - "$id": "33", + "$id": "85", "kind": "array", "name": "Array", "valueType": { - "$id": "34", + "$id": "86", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -301,7 +731,7 @@ ], "responses": [ { - "$id": "35", + "$id": "87", "statusCodes": [ 204 ], @@ -323,15 +753,15 @@ }, "parameters": [ { - "$id": "36", + "$id": "88", "name": "body", "nameInRequest": "body", "type": { - "$id": "37", + "$id": "89", "kind": "array", "name": "Array", "valueType": { - "$id": "38", + "$id": "90", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -351,12 +781,12 @@ "skipUrlEncoding": false }, { - "$id": "39", + "$id": "91", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "30" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -370,7 +800,7 @@ } ], "response": { - "$id": "40" + "$id": "92" }, "isOverride": false, "generateConvenient": true, @@ -380,12 +810,12 @@ ], "parameters": [ { - "$id": "41", + "$id": "93", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "42", + "$id": "94", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -399,9 +829,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "43", + "$id": "95", "type": { - "$id": "44", + "$id": "96", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -414,44 +844,34 @@ "crossLanguageDefinitionId": "Type.Array.Int32Value", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "45", + "$id": "97", "kind": "client", "name": "Int64Value", "namespace": "Type.Array", "doc": "Array of int64 values", "methods": [ { - "$id": "46", + "$id": "98", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "47", + "$id": "99", "name": "get", "resourceName": "Int64Value", "accessibility": "public", "parameters": [ { - "$id": "48", + "$id": "100", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "49", - "kind": "constant", - "valueType": { - "$id": "50", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -466,16 +886,16 @@ ], "responses": [ { - "$id": "51", + "$id": "101", "statusCodes": [ 200 ], "bodyType": { - "$id": "52", + "$id": "102", "kind": "array", "name": "Array1", "valueType": { - "$id": "53", + "$id": "103", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -502,11 +922,11 @@ }, "parameters": [ { - "$id": "54", + "$id": "104", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "49" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -520,9 +940,9 @@ } ], "response": { - "$id": "55", + "$id": "105", "type": { - "$ref": "52" + "$ref": "102" } }, "isOverride": false, @@ -531,34 +951,24 @@ "crossLanguageDefinitionId": "Type.Array.Int64Value.get" }, { - "$id": "56", + "$id": "106", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "57", + "$id": "107", "name": "put", "resourceName": "Int64Value", "accessibility": "public", "parameters": [ { - "$id": "58", + "$id": "108", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "59", - "kind": "constant", - "valueType": { - "$id": "60", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -571,15 +981,15 @@ "skipUrlEncoding": false }, { - "$id": "61", + "$id": "109", "name": "body", "nameInRequest": "body", "type": { - "$id": "62", + "$id": "110", "kind": "array", "name": "Array1", "valueType": { - "$id": "63", + "$id": "111", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -601,7 +1011,7 @@ ], "responses": [ { - "$id": "64", + "$id": "112", "statusCodes": [ 204 ], @@ -623,15 +1033,15 @@ }, "parameters": [ { - "$id": "65", + "$id": "113", "name": "body", "nameInRequest": "body", "type": { - "$id": "66", + "$id": "114", "kind": "array", "name": "Array1", "valueType": { - "$id": "67", + "$id": "115", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -651,12 +1061,12 @@ "skipUrlEncoding": false }, { - "$id": "68", + "$id": "116", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "59" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -670,7 +1080,7 @@ } ], "response": { - "$id": "69" + "$id": "117" }, "isOverride": false, "generateConvenient": true, @@ -680,12 +1090,12 @@ ], "parameters": [ { - "$id": "70", + "$id": "118", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "71", + "$id": "119", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -699,9 +1109,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "72", + "$id": "120", "type": { - "$id": "73", + "$id": "121", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -714,44 +1124,34 @@ "crossLanguageDefinitionId": "Type.Array.Int64Value", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "74", + "$id": "122", "kind": "client", "name": "BooleanValue", "namespace": "Type.Array", "doc": "Array of boolean values", "methods": [ { - "$id": "75", + "$id": "123", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "76", + "$id": "124", "name": "get", "resourceName": "BooleanValue", "accessibility": "public", "parameters": [ { - "$id": "77", + "$id": "125", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "78", - "kind": "constant", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -766,16 +1166,16 @@ ], "responses": [ { - "$id": "80", + "$id": "126", "statusCodes": [ 200 ], "bodyType": { - "$id": "81", + "$id": "127", "kind": "array", "name": "Array2", "valueType": { - "$id": "82", + "$id": "128", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -802,11 +1202,11 @@ }, "parameters": [ { - "$id": "83", + "$id": "129", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "78" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -820,9 +1220,9 @@ } ], "response": { - "$id": "84", + "$id": "130", "type": { - "$ref": "81" + "$ref": "127" } }, "isOverride": false, @@ -831,34 +1231,24 @@ "crossLanguageDefinitionId": "Type.Array.BooleanValue.get" }, { - "$id": "85", + "$id": "131", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "86", + "$id": "132", "name": "put", "resourceName": "BooleanValue", "accessibility": "public", "parameters": [ { - "$id": "87", + "$id": "133", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "88", - "kind": "constant", - "valueType": { - "$id": "89", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -871,15 +1261,15 @@ "skipUrlEncoding": false }, { - "$id": "90", + "$id": "134", "name": "body", "nameInRequest": "body", "type": { - "$id": "91", + "$id": "135", "kind": "array", "name": "Array2", "valueType": { - "$id": "92", + "$id": "136", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -901,7 +1291,7 @@ ], "responses": [ { - "$id": "93", + "$id": "137", "statusCodes": [ 204 ], @@ -923,15 +1313,15 @@ }, "parameters": [ { - "$id": "94", + "$id": "138", "name": "body", "nameInRequest": "body", "type": { - "$id": "95", + "$id": "139", "kind": "array", "name": "Array2", "valueType": { - "$id": "96", + "$id": "140", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -951,12 +1341,12 @@ "skipUrlEncoding": false }, { - "$id": "97", + "$id": "141", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "88" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -970,7 +1360,7 @@ } ], "response": { - "$id": "98" + "$id": "142" }, "isOverride": false, "generateConvenient": true, @@ -980,12 +1370,12 @@ ], "parameters": [ { - "$id": "99", + "$id": "143", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "100", + "$id": "144", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -999,9 +1389,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "101", + "$id": "145", "type": { - "$id": "102", + "$id": "146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1014,44 +1404,34 @@ "crossLanguageDefinitionId": "Type.Array.BooleanValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "103", + "$id": "147", "kind": "client", "name": "StringValue", "namespace": "Type.Array", "doc": "Array of string values", "methods": [ { - "$id": "104", + "$id": "148", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "105", + "$id": "149", "name": "get", "resourceName": "StringValue", "accessibility": "public", "parameters": [ { - "$id": "106", + "$id": "150", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "107", - "kind": "constant", - "valueType": { - "$id": "108", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1066,16 +1446,16 @@ ], "responses": [ { - "$id": "109", + "$id": "151", "statusCodes": [ 200 ], "bodyType": { - "$id": "110", + "$id": "152", "kind": "array", "name": "Array3", "valueType": { - "$id": "111", + "$id": "153", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1102,11 +1482,11 @@ }, "parameters": [ { - "$id": "112", + "$id": "154", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "107" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1120,9 +1500,9 @@ } ], "response": { - "$id": "113", + "$id": "155", "type": { - "$ref": "110" + "$ref": "152" } }, "isOverride": false, @@ -1131,34 +1511,24 @@ "crossLanguageDefinitionId": "Type.Array.StringValue.get" }, { - "$id": "114", + "$id": "156", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "115", + "$id": "157", "name": "put", "resourceName": "StringValue", "accessibility": "public", "parameters": [ { - "$id": "116", + "$id": "158", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "117", - "kind": "constant", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1171,15 +1541,15 @@ "skipUrlEncoding": false }, { - "$id": "119", + "$id": "159", "name": "body", "nameInRequest": "body", "type": { - "$id": "120", + "$id": "160", "kind": "array", "name": "Array3", "valueType": { - "$id": "121", + "$id": "161", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1201,7 +1571,7 @@ ], "responses": [ { - "$id": "122", + "$id": "162", "statusCodes": [ 204 ], @@ -1223,15 +1593,15 @@ }, "parameters": [ { - "$id": "123", + "$id": "163", "name": "body", "nameInRequest": "body", "type": { - "$id": "124", + "$id": "164", "kind": "array", "name": "Array3", "valueType": { - "$id": "125", + "$id": "165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1251,12 +1621,12 @@ "skipUrlEncoding": false }, { - "$id": "126", + "$id": "166", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "117" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1270,7 +1640,7 @@ } ], "response": { - "$id": "127" + "$id": "167" }, "isOverride": false, "generateConvenient": true, @@ -1280,12 +1650,12 @@ ], "parameters": [ { - "$id": "128", + "$id": "168", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "129", + "$id": "169", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1299,9 +1669,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "130", + "$id": "170", "type": { - "$id": "131", + "$id": "171", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1314,44 +1684,34 @@ "crossLanguageDefinitionId": "Type.Array.StringValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "132", + "$id": "172", "kind": "client", "name": "Float32Value", "namespace": "Type.Array", "doc": "Array of float values", "methods": [ { - "$id": "133", + "$id": "173", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "134", + "$id": "174", "name": "get", "resourceName": "Float32Value", "accessibility": "public", "parameters": [ { - "$id": "135", + "$id": "175", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "136", - "kind": "constant", - "valueType": { - "$id": "137", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1366,16 +1726,16 @@ ], "responses": [ { - "$id": "138", + "$id": "176", "statusCodes": [ 200 ], "bodyType": { - "$id": "139", + "$id": "177", "kind": "array", "name": "Array4", "valueType": { - "$id": "140", + "$id": "178", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1402,11 +1762,11 @@ }, "parameters": [ { - "$id": "141", + "$id": "179", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "136" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1420,9 +1780,9 @@ } ], "response": { - "$id": "142", + "$id": "180", "type": { - "$ref": "139" + "$ref": "177" } }, "isOverride": false, @@ -1431,34 +1791,24 @@ "crossLanguageDefinitionId": "Type.Array.Float32Value.get" }, { - "$id": "143", + "$id": "181", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "144", + "$id": "182", "name": "put", "resourceName": "Float32Value", "accessibility": "public", "parameters": [ { - "$id": "145", + "$id": "183", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "146", - "kind": "constant", - "valueType": { - "$id": "147", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1471,15 +1821,15 @@ "skipUrlEncoding": false }, { - "$id": "148", + "$id": "184", "name": "body", "nameInRequest": "body", "type": { - "$id": "149", + "$id": "185", "kind": "array", "name": "Array4", "valueType": { - "$id": "150", + "$id": "186", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1501,7 +1851,7 @@ ], "responses": [ { - "$id": "151", + "$id": "187", "statusCodes": [ 204 ], @@ -1523,15 +1873,15 @@ }, "parameters": [ { - "$id": "152", + "$id": "188", "name": "body", "nameInRequest": "body", "type": { - "$id": "153", + "$id": "189", "kind": "array", "name": "Array4", "valueType": { - "$id": "154", + "$id": "190", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1551,12 +1901,12 @@ "skipUrlEncoding": false }, { - "$id": "155", + "$id": "191", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "146" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1570,7 +1920,7 @@ } ], "response": { - "$id": "156" + "$id": "192" }, "isOverride": false, "generateConvenient": true, @@ -1580,12 +1930,12 @@ ], "parameters": [ { - "$id": "157", + "$id": "193", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "158", + "$id": "194", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1599,9 +1949,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "159", + "$id": "195", "type": { - "$id": "160", + "$id": "196", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1614,44 +1964,34 @@ "crossLanguageDefinitionId": "Type.Array.Float32Value", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "161", + "$id": "197", "kind": "client", "name": "DatetimeValue", "namespace": "Type.Array", "doc": "Array of datetime values", "methods": [ { - "$id": "162", + "$id": "198", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "163", + "$id": "199", "name": "get", "resourceName": "DatetimeValue", "accessibility": "public", "parameters": [ { - "$id": "164", + "$id": "200", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "165", - "kind": "constant", - "valueType": { - "$id": "166", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1666,21 +2006,21 @@ ], "responses": [ { - "$id": "167", + "$id": "201", "statusCodes": [ 200 ], "bodyType": { - "$id": "168", + "$id": "202", "kind": "array", "name": "Array5", "valueType": { - "$id": "169", + "$id": "203", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "170", + "$id": "204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1710,11 +2050,11 @@ }, "parameters": [ { - "$id": "171", + "$id": "205", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "165" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1728,9 +2068,9 @@ } ], "response": { - "$id": "172", + "$id": "206", "type": { - "$ref": "168" + "$ref": "202" } }, "isOverride": false, @@ -1739,34 +2079,24 @@ "crossLanguageDefinitionId": "Type.Array.DatetimeValue.get" }, { - "$id": "173", + "$id": "207", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "174", + "$id": "208", "name": "put", "resourceName": "DatetimeValue", "accessibility": "public", "parameters": [ { - "$id": "175", + "$id": "209", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "176", - "kind": "constant", - "valueType": { - "$id": "177", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1779,20 +2109,20 @@ "skipUrlEncoding": false }, { - "$id": "178", + "$id": "210", "name": "body", "nameInRequest": "body", "type": { - "$id": "179", + "$id": "211", "kind": "array", "name": "Array5", "valueType": { - "$id": "180", + "$id": "212", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "181", + "$id": "213", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1817,7 +2147,7 @@ ], "responses": [ { - "$id": "182", + "$id": "214", "statusCodes": [ 204 ], @@ -1839,20 +2169,20 @@ }, "parameters": [ { - "$id": "183", + "$id": "215", "name": "body", "nameInRequest": "body", "type": { - "$id": "184", + "$id": "216", "kind": "array", "name": "Array5", "valueType": { - "$id": "185", + "$id": "217", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "186", + "$id": "218", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1875,12 +2205,12 @@ "skipUrlEncoding": false }, { - "$id": "187", + "$id": "219", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "176" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1894,7 +2224,7 @@ } ], "response": { - "$id": "188" + "$id": "220" }, "isOverride": false, "generateConvenient": true, @@ -1904,12 +2234,12 @@ ], "parameters": [ { - "$id": "189", + "$id": "221", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "190", + "$id": "222", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1923,9 +2253,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "191", + "$id": "223", "type": { - "$id": "192", + "$id": "224", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1938,44 +2268,34 @@ "crossLanguageDefinitionId": "Type.Array.DatetimeValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "193", + "$id": "225", "kind": "client", "name": "DurationValue", "namespace": "Type.Array", "doc": "Array of duration values", "methods": [ { - "$id": "194", + "$id": "226", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "195", + "$id": "227", "name": "get", "resourceName": "DurationValue", "accessibility": "public", "parameters": [ { - "$id": "196", + "$id": "228", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "197", - "kind": "constant", - "valueType": { - "$id": "198", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -1990,21 +2310,21 @@ ], "responses": [ { - "$id": "199", + "$id": "229", "statusCodes": [ 200 ], "bodyType": { - "$id": "200", + "$id": "230", "kind": "array", "name": "Array6", "valueType": { - "$id": "201", + "$id": "231", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "202", + "$id": "232", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2034,11 +2354,11 @@ }, "parameters": [ { - "$id": "203", + "$id": "233", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "197" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2052,9 +2372,9 @@ } ], "response": { - "$id": "204", + "$id": "234", "type": { - "$ref": "200" + "$ref": "230" } }, "isOverride": false, @@ -2063,34 +2383,24 @@ "crossLanguageDefinitionId": "Type.Array.DurationValue.get" }, { - "$id": "205", + "$id": "235", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "206", + "$id": "236", "name": "put", "resourceName": "DurationValue", "accessibility": "public", "parameters": [ { - "$id": "207", + "$id": "237", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "208", - "kind": "constant", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2103,20 +2413,20 @@ "skipUrlEncoding": false }, { - "$id": "210", + "$id": "238", "name": "body", "nameInRequest": "body", "type": { - "$id": "211", + "$id": "239", "kind": "array", "name": "Array6", "valueType": { - "$id": "212", + "$id": "240", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "213", + "$id": "241", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2141,7 +2451,7 @@ ], "responses": [ { - "$id": "214", + "$id": "242", "statusCodes": [ 204 ], @@ -2163,20 +2473,20 @@ }, "parameters": [ { - "$id": "215", + "$id": "243", "name": "body", "nameInRequest": "body", "type": { - "$id": "216", + "$id": "244", "kind": "array", "name": "Array6", "valueType": { - "$id": "217", + "$id": "245", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "218", + "$id": "246", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2199,12 +2509,12 @@ "skipUrlEncoding": false }, { - "$id": "219", + "$id": "247", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "208" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2218,7 +2528,7 @@ } ], "response": { - "$id": "220" + "$id": "248" }, "isOverride": false, "generateConvenient": true, @@ -2228,12 +2538,12 @@ ], "parameters": [ { - "$id": "221", + "$id": "249", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "222", + "$id": "250", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2247,9 +2557,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "223", + "$id": "251", "type": { - "$id": "224", + "$id": "252", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2262,44 +2572,34 @@ "crossLanguageDefinitionId": "Type.Array.DurationValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "225", + "$id": "253", "kind": "client", "name": "UnknownValue", "namespace": "Type.Array", "doc": "Array of unknown values", "methods": [ { - "$id": "226", + "$id": "254", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "227", + "$id": "255", "name": "get", "resourceName": "UnknownValue", "accessibility": "public", "parameters": [ { - "$id": "228", + "$id": "256", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "229", - "kind": "constant", - "valueType": { - "$id": "230", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2314,16 +2614,16 @@ ], "responses": [ { - "$id": "231", + "$id": "257", "statusCodes": [ 200 ], "bodyType": { - "$id": "232", + "$id": "258", "kind": "array", "name": "Array7", "valueType": { - "$id": "233", + "$id": "259", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2350,11 +2650,11 @@ }, "parameters": [ { - "$id": "234", + "$id": "260", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "229" + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2368,9 +2668,9 @@ } ], "response": { - "$id": "235", + "$id": "261", "type": { - "$ref": "232" + "$ref": "258" } }, "isOverride": false, @@ -2379,34 +2679,24 @@ "crossLanguageDefinitionId": "Type.Array.UnknownValue.get" }, { - "$id": "236", + "$id": "262", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "237", + "$id": "263", "name": "put", "resourceName": "UnknownValue", "accessibility": "public", "parameters": [ { - "$id": "238", + "$id": "264", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "239", - "kind": "constant", - "valueType": { - "$id": "240", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2419,15 +2709,15 @@ "skipUrlEncoding": false }, { - "$id": "241", + "$id": "265", "name": "body", "nameInRequest": "body", "type": { - "$id": "242", + "$id": "266", "kind": "array", "name": "Array7", "valueType": { - "$id": "243", + "$id": "267", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2449,7 +2739,7 @@ ], "responses": [ { - "$id": "244", + "$id": "268", "statusCodes": [ 204 ], @@ -2471,15 +2761,15 @@ }, "parameters": [ { - "$id": "245", + "$id": "269", "name": "body", "nameInRequest": "body", "type": { - "$id": "246", + "$id": "270", "kind": "array", "name": "Array7", "valueType": { - "$id": "247", + "$id": "271", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2499,12 +2789,12 @@ "skipUrlEncoding": false }, { - "$id": "248", + "$id": "272", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "239" + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2518,7 +2808,7 @@ } ], "response": { - "$id": "249" + "$id": "273" }, "isOverride": false, "generateConvenient": true, @@ -2528,12 +2818,12 @@ ], "parameters": [ { - "$id": "250", + "$id": "274", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "251", + "$id": "275", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2547,9 +2837,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "252", + "$id": "276", "type": { - "$id": "253", + "$id": "277", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2562,44 +2852,34 @@ "crossLanguageDefinitionId": "Type.Array.UnknownValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "254", + "$id": "278", "kind": "client", "name": "ModelValue", "namespace": "Type.Array", "doc": "Array of model values", "methods": [ { - "$id": "255", + "$id": "279", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "256", + "$id": "280", "name": "get", "resourceName": "ModelValue", "accessibility": "public", "parameters": [ { - "$id": "257", + "$id": "281", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "258", - "kind": "constant", - "valueType": { - "$id": "259", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2614,16 +2894,16 @@ ], "responses": [ { - "$id": "260", + "$id": "282", "statusCodes": [ 200 ], "bodyType": { - "$id": "261", + "$id": "283", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "2" + "$ref": "58" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2646,11 +2926,11 @@ }, "parameters": [ { - "$id": "262", + "$id": "284", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "258" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2664,9 +2944,9 @@ } ], "response": { - "$id": "263", + "$id": "285", "type": { - "$ref": "261" + "$ref": "283" } }, "isOverride": false, @@ -2675,34 +2955,24 @@ "crossLanguageDefinitionId": "Type.Array.ModelValue.get" }, { - "$id": "264", + "$id": "286", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "265", + "$id": "287", "name": "put", "resourceName": "ModelValue", "accessibility": "public", "parameters": [ { - "$id": "266", + "$id": "288", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "267", - "kind": "constant", - "valueType": { - "$id": "268", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2715,15 +2985,15 @@ "skipUrlEncoding": false }, { - "$id": "269", + "$id": "289", "name": "body", "nameInRequest": "body", "type": { - "$id": "270", + "$id": "290", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "2" + "$ref": "58" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2741,7 +3011,7 @@ ], "responses": [ { - "$id": "271", + "$id": "291", "statusCodes": [ 204 ], @@ -2763,15 +3033,15 @@ }, "parameters": [ { - "$id": "272", + "$id": "292", "name": "body", "nameInRequest": "body", "type": { - "$id": "273", + "$id": "293", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "2" + "$ref": "58" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2787,12 +3057,12 @@ "skipUrlEncoding": false }, { - "$id": "274", + "$id": "294", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "267" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2806,7 +3076,7 @@ } ], "response": { - "$id": "275" + "$id": "295" }, "isOverride": false, "generateConvenient": true, @@ -2816,12 +3086,12 @@ ], "parameters": [ { - "$id": "276", + "$id": "296", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "277", + "$id": "297", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2835,9 +3105,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "278", + "$id": "298", "type": { - "$id": "279", + "$id": "299", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2850,44 +3120,34 @@ "crossLanguageDefinitionId": "Type.Array.ModelValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "280", + "$id": "300", "kind": "client", "name": "NullableFloatValue", "namespace": "Type.Array", "doc": "Array of nullable float values", "methods": [ { - "$id": "281", + "$id": "301", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "282", + "$id": "302", "name": "get", "resourceName": "NullableFloatValue", "accessibility": "public", "parameters": [ { - "$id": "283", + "$id": "303", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "284", - "kind": "constant", - "valueType": { - "$id": "285", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2902,19 +3162,19 @@ ], "responses": [ { - "$id": "286", + "$id": "304", "statusCodes": [ 200 ], "bodyType": { - "$id": "287", + "$id": "305", "kind": "array", "name": "Array8", "valueType": { - "$id": "288", + "$id": "306", "kind": "nullable", "type": { - "$id": "289", + "$id": "307", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -2943,11 +3203,11 @@ }, "parameters": [ { - "$id": "290", + "$id": "308", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "284" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2961,9 +3221,9 @@ } ], "response": { - "$id": "291", + "$id": "309", "type": { - "$ref": "287" + "$ref": "305" } }, "isOverride": false, @@ -2972,34 +3232,24 @@ "crossLanguageDefinitionId": "Type.Array.NullableFloatValue.get" }, { - "$id": "292", + "$id": "310", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "293", + "$id": "311", "name": "put", "resourceName": "NullableFloatValue", "accessibility": "public", "parameters": [ { - "$id": "294", + "$id": "312", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "295", - "kind": "constant", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3012,15 +3262,15 @@ "skipUrlEncoding": false }, { - "$id": "297", + "$id": "313", "name": "body", "nameInRequest": "body", "type": { - "$id": "298", + "$id": "314", "kind": "array", "name": "Array8", "valueType": { - "$ref": "288" + "$ref": "306" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3038,7 +3288,7 @@ ], "responses": [ { - "$id": "299", + "$id": "315", "statusCodes": [ 204 ], @@ -3060,15 +3310,15 @@ }, "parameters": [ { - "$id": "300", + "$id": "316", "name": "body", "nameInRequest": "body", "type": { - "$id": "301", + "$id": "317", "kind": "array", "name": "Array8", "valueType": { - "$ref": "288" + "$ref": "306" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3084,12 +3334,12 @@ "skipUrlEncoding": false }, { - "$id": "302", + "$id": "318", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "295" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3103,7 +3353,7 @@ } ], "response": { - "$id": "303" + "$id": "319" }, "isOverride": false, "generateConvenient": true, @@ -3113,12 +3363,12 @@ ], "parameters": [ { - "$id": "304", + "$id": "320", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "305", + "$id": "321", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3132,9 +3382,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "306", + "$id": "322", "type": { - "$id": "307", + "$id": "323", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3147,44 +3397,34 @@ "crossLanguageDefinitionId": "Type.Array.NullableFloatValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "308", + "$id": "324", "kind": "client", "name": "NullableInt32Value", "namespace": "Type.Array", "doc": "Array of nullable int32 values", "methods": [ { - "$id": "309", + "$id": "325", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "310", + "$id": "326", "name": "get", "resourceName": "NullableInt32Value", "accessibility": "public", "parameters": [ { - "$id": "311", + "$id": "327", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "312", - "kind": "constant", - "valueType": { - "$id": "313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3199,19 +3439,19 @@ ], "responses": [ { - "$id": "314", + "$id": "328", "statusCodes": [ 200 ], "bodyType": { - "$id": "315", + "$id": "329", "kind": "array", "name": "Array9", "valueType": { - "$id": "316", + "$id": "330", "kind": "nullable", "type": { - "$id": "317", + "$id": "331", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3240,11 +3480,11 @@ }, "parameters": [ { - "$id": "318", + "$id": "332", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "312" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3258,9 +3498,9 @@ } ], "response": { - "$id": "319", + "$id": "333", "type": { - "$ref": "315" + "$ref": "329" } }, "isOverride": false, @@ -3269,34 +3509,24 @@ "crossLanguageDefinitionId": "Type.Array.NullableInt32Value.get" }, { - "$id": "320", + "$id": "334", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "321", + "$id": "335", "name": "put", "resourceName": "NullableInt32Value", "accessibility": "public", "parameters": [ { - "$id": "322", + "$id": "336", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "323", - "kind": "constant", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -3309,15 +3539,15 @@ "skipUrlEncoding": false }, { - "$id": "325", + "$id": "337", "name": "body", "nameInRequest": "body", "type": { - "$id": "326", + "$id": "338", "kind": "array", "name": "Array9", "valueType": { - "$ref": "316" + "$ref": "330" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3335,7 +3565,7 @@ ], "responses": [ { - "$id": "327", + "$id": "339", "statusCodes": [ 204 ], @@ -3357,15 +3587,15 @@ }, "parameters": [ { - "$id": "328", + "$id": "340", "name": "body", "nameInRequest": "body", "type": { - "$id": "329", + "$id": "341", "kind": "array", "name": "Array9", "valueType": { - "$ref": "316" + "$ref": "330" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3381,12 +3611,12 @@ "skipUrlEncoding": false }, { - "$id": "330", + "$id": "342", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "323" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -3400,7 +3630,7 @@ } ], "response": { - "$id": "331" + "$id": "343" }, "isOverride": false, "generateConvenient": true, @@ -3410,12 +3640,12 @@ ], "parameters": [ { - "$id": "332", + "$id": "344", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "333", + "$id": "345", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3429,9 +3659,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "334", + "$id": "346", "type": { - "$id": "335", + "$id": "347", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3444,44 +3674,34 @@ "crossLanguageDefinitionId": "Type.Array.NullableInt32Value", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "336", + "$id": "348", "kind": "client", "name": "NullableBooleanValue", "namespace": "Type.Array", "doc": "Array of nullable boolean values", "methods": [ { - "$id": "337", + "$id": "349", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "338", + "$id": "350", "name": "get", "resourceName": "NullableBooleanValue", "accessibility": "public", "parameters": [ { - "$id": "339", + "$id": "351", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "340", - "kind": "constant", - "valueType": { - "$id": "341", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -3496,19 +3716,19 @@ ], "responses": [ { - "$id": "342", + "$id": "352", "statusCodes": [ 200 ], "bodyType": { - "$id": "343", + "$id": "353", "kind": "array", "name": "Array10", "valueType": { - "$id": "344", + "$id": "354", "kind": "nullable", "type": { - "$id": "345", + "$id": "355", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -3537,11 +3757,11 @@ }, "parameters": [ { - "$id": "346", + "$id": "356", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "340" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -3555,9 +3775,9 @@ } ], "response": { - "$id": "347", + "$id": "357", "type": { - "$ref": "343" + "$ref": "353" } }, "isOverride": false, @@ -3566,34 +3786,24 @@ "crossLanguageDefinitionId": "Type.Array.NullableBooleanValue.get" }, { - "$id": "348", + "$id": "358", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "349", + "$id": "359", "name": "put", "resourceName": "NullableBooleanValue", "accessibility": "public", "parameters": [ { - "$id": "350", + "$id": "360", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "351", - "kind": "constant", - "valueType": { - "$id": "352", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -3606,15 +3816,15 @@ "skipUrlEncoding": false }, { - "$id": "353", + "$id": "361", "name": "body", "nameInRequest": "body", "type": { - "$id": "354", + "$id": "362", "kind": "array", "name": "Array10", "valueType": { - "$ref": "344" + "$ref": "354" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3632,7 +3842,7 @@ ], "responses": [ { - "$id": "355", + "$id": "363", "statusCodes": [ 204 ], @@ -3654,15 +3864,15 @@ }, "parameters": [ { - "$id": "356", + "$id": "364", "name": "body", "nameInRequest": "body", "type": { - "$id": "357", + "$id": "365", "kind": "array", "name": "Array10", "valueType": { - "$ref": "344" + "$ref": "354" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3678,12 +3888,12 @@ "skipUrlEncoding": false }, { - "$id": "358", + "$id": "366", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "351" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -3697,7 +3907,7 @@ } ], "response": { - "$id": "359" + "$id": "367" }, "isOverride": false, "generateConvenient": true, @@ -3707,12 +3917,12 @@ ], "parameters": [ { - "$id": "360", + "$id": "368", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "361", + "$id": "369", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3726,9 +3936,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "362", + "$id": "370", "type": { - "$id": "363", + "$id": "371", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3741,44 +3951,34 @@ "crossLanguageDefinitionId": "Type.Array.NullableBooleanValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "364", + "$id": "372", "kind": "client", "name": "NullableStringValue", "namespace": "Type.Array", "doc": "Array of nullable string values", "methods": [ { - "$id": "365", + "$id": "373", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "366", + "$id": "374", "name": "get", "resourceName": "NullableStringValue", "accessibility": "public", "parameters": [ { - "$id": "367", + "$id": "375", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "368", - "kind": "constant", - "valueType": { - "$id": "369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -3793,19 +3993,19 @@ ], "responses": [ { - "$id": "370", + "$id": "376", "statusCodes": [ 200 ], "bodyType": { - "$id": "371", + "$id": "377", "kind": "array", "name": "Array11", "valueType": { - "$id": "372", + "$id": "378", "kind": "nullable", "type": { - "$id": "373", + "$id": "379", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3834,11 +4034,11 @@ }, "parameters": [ { - "$id": "374", + "$id": "380", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "368" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -3852,9 +4052,9 @@ } ], "response": { - "$id": "375", + "$id": "381", "type": { - "$ref": "371" + "$ref": "377" } }, "isOverride": false, @@ -3863,34 +4063,24 @@ "crossLanguageDefinitionId": "Type.Array.NullableStringValue.get" }, { - "$id": "376", + "$id": "382", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "377", + "$id": "383", "name": "put", "resourceName": "NullableStringValue", "accessibility": "public", "parameters": [ { - "$id": "378", + "$id": "384", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "379", - "kind": "constant", - "valueType": { - "$id": "380", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -3903,15 +4093,15 @@ "skipUrlEncoding": false }, { - "$id": "381", + "$id": "385", "name": "body", "nameInRequest": "body", "type": { - "$id": "382", + "$id": "386", "kind": "array", "name": "Array11", "valueType": { - "$ref": "372" + "$ref": "378" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3929,7 +4119,7 @@ ], "responses": [ { - "$id": "383", + "$id": "387", "statusCodes": [ 204 ], @@ -3951,15 +4141,15 @@ }, "parameters": [ { - "$id": "384", + "$id": "388", "name": "body", "nameInRequest": "body", "type": { - "$id": "385", + "$id": "389", "kind": "array", "name": "Array11", "valueType": { - "$ref": "372" + "$ref": "378" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -3975,12 +4165,12 @@ "skipUrlEncoding": false }, { - "$id": "386", + "$id": "390", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "379" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -3994,7 +4184,7 @@ } ], "response": { - "$id": "387" + "$id": "391" }, "isOverride": false, "generateConvenient": true, @@ -4004,12 +4194,12 @@ ], "parameters": [ { - "$id": "388", + "$id": "392", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "389", + "$id": "393", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4023,9 +4213,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "390", + "$id": "394", "type": { - "$id": "391", + "$id": "395", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4038,44 +4228,34 @@ "crossLanguageDefinitionId": "Type.Array.NullableStringValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } }, { - "$id": "392", + "$id": "396", "kind": "client", "name": "NullableModelValue", "namespace": "Type.Array", "doc": "Array of nullable model values", "methods": [ { - "$id": "393", + "$id": "397", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "394", + "$id": "398", "name": "get", "resourceName": "NullableModelValue", "accessibility": "public", "parameters": [ { - "$id": "395", + "$id": "399", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "396", - "kind": "constant", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -4090,19 +4270,19 @@ ], "responses": [ { - "$id": "398", + "$id": "400", "statusCodes": [ 200 ], "bodyType": { - "$id": "399", + "$id": "401", "kind": "array", "name": "Array12", "valueType": { - "$id": "400", + "$id": "402", "kind": "nullable", "type": { - "$ref": "2" + "$ref": "58" }, "namespace": "" }, @@ -4127,11 +4307,11 @@ }, "parameters": [ { - "$id": "401", + "$id": "403", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "396" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -4145,9 +4325,9 @@ } ], "response": { - "$id": "402", + "$id": "404", "type": { - "$ref": "399" + "$ref": "401" } }, "isOverride": false, @@ -4156,34 +4336,24 @@ "crossLanguageDefinitionId": "Type.Array.NullableModelValue.get" }, { - "$id": "403", + "$id": "405", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "404", + "$id": "406", "name": "put", "resourceName": "NullableModelValue", "accessibility": "public", "parameters": [ { - "$id": "405", + "$id": "407", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "406", - "kind": "constant", - "valueType": { - "$id": "407", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -4204,7 +4374,7 @@ "kind": "array", "name": "Array12", "valueType": { - "$ref": "400" + "$ref": "402" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4252,7 +4422,7 @@ "kind": "array", "name": "Array12", "valueType": { - "$ref": "400" + "$ref": "402" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -4273,7 +4443,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "406" + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -4331,7 +4501,7 @@ "crossLanguageDefinitionId": "Type.Array.NullableModelValue", "apiVersions": [], "parent": { - "$ref": "11" + "$ref": "67" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj index 108516b5908c..3e979d203920 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/src/Type.Dictionary.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json index 433b1c831b77..10de09189edf 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/dictionary/tspCodeModel.json @@ -3,9 +3,363 @@ "name": "Type.Dictionary", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "putContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "putContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "putContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "putContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "putContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "putContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "putContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "putContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "putContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "putContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "putContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "46", "kind": "model", "name": "InnerModel", "namespace": "Type.Dictionary", @@ -15,13 +369,13 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "47", "kind": "property", "name": "property", "serializedName": "property", "doc": "Required string property", "type": { - "$id": "4", + "$id": "48", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34,30 +388,30 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.InnerModel.property", "serializationOptions": { - "$id": "5", + "$id": "49", "json": { - "$id": "6", + "$id": "50", "name": "property" } } }, { - "$id": "7", + "$id": "51", "kind": "property", "name": "children", "serializedName": "children", "type": { - "$id": "8", + "$id": "52", "kind": "dict", "keyType": { - "$id": "9", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -68,9 +422,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Dictionary.InnerModel.children", "serializationOptions": { - "$id": "10", + "$id": "54", "json": { - "$id": "11", + "$id": "55", "name": "children" } } @@ -80,7 +434,7 @@ ], "clients": [ { - "$id": "12", + "$id": "56", "kind": "client", "name": "DictionaryClient", "namespace": "Type.Dictionary", @@ -88,12 +442,12 @@ "methods": [], "parameters": [ { - "$id": "13", + "$id": "57", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "14", + "$id": "58", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -107,9 +461,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "15", + "$id": "59", "type": { - "$id": "16", + "$id": "60", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -123,40 +477,30 @@ "apiVersions": [], "children": [ { - "$id": "17", + "$id": "61", "kind": "client", "name": "Int32Value", "namespace": "Type.Dictionary", "doc": "Dictionary of int32 values", "methods": [ { - "$id": "18", + "$id": "62", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "63", "name": "get", "resourceName": "Int32Value", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "64", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -171,22 +515,22 @@ ], "responses": [ { - "$id": "23", + "$id": "65", "statusCodes": [ 200 ], "bodyType": { - "$id": "24", + "$id": "66", "kind": "dict", "keyType": { - "$id": "25", + "$id": "67", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "26", + "$id": "68", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -212,11 +556,11 @@ }, "parameters": [ { - "$id": "27", + "$id": "69", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "21" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -230,9 +574,9 @@ } ], "response": { - "$id": "28", + "$id": "70", "type": { - "$ref": "24" + "$ref": "66" } }, "isOverride": false, @@ -241,34 +585,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.Int32Value.get" }, { - "$id": "29", + "$id": "71", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "30", + "$id": "72", "name": "put", "resourceName": "Int32Value", "accessibility": "public", "parameters": [ { - "$id": "31", + "$id": "73", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "32", - "kind": "constant", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -281,21 +615,21 @@ "skipUrlEncoding": false }, { - "$id": "34", + "$id": "74", "name": "body", "nameInRequest": "body", "type": { - "$id": "35", + "$id": "75", "kind": "dict", "keyType": { - "$id": "36", + "$id": "76", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "37", + "$id": "77", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -316,7 +650,7 @@ ], "responses": [ { - "$id": "38", + "$id": "78", "statusCodes": [ 204 ], @@ -338,21 +672,21 @@ }, "parameters": [ { - "$id": "39", + "$id": "79", "name": "body", "nameInRequest": "body", "type": { - "$id": "40", + "$id": "80", "kind": "dict", "keyType": { - "$id": "41", + "$id": "81", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "42", + "$id": "82", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -371,12 +705,12 @@ "skipUrlEncoding": false }, { - "$id": "43", + "$id": "83", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "32" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -390,7 +724,7 @@ } ], "response": { - "$id": "44" + "$id": "84" }, "isOverride": false, "generateConvenient": true, @@ -400,12 +734,12 @@ ], "parameters": [ { - "$id": "45", + "$id": "85", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "46", + "$id": "86", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -419,9 +753,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "47", + "$id": "87", "type": { - "$id": "48", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -434,44 +768,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.Int32Value", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "49", + "$id": "89", "kind": "client", "name": "Int64Value", "namespace": "Type.Dictionary", "doc": "Dictionary of int64 values", "methods": [ { - "$id": "50", + "$id": "90", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "51", + "$id": "91", "name": "get", "resourceName": "Int64Value", "accessibility": "public", "parameters": [ { - "$id": "52", + "$id": "92", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "53", - "kind": "constant", - "valueType": { - "$id": "54", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -486,22 +810,22 @@ ], "responses": [ { - "$id": "55", + "$id": "93", "statusCodes": [ 200 ], "bodyType": { - "$id": "56", + "$id": "94", "kind": "dict", "keyType": { - "$id": "57", + "$id": "95", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "58", + "$id": "96", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -527,11 +851,11 @@ }, "parameters": [ { - "$id": "59", + "$id": "97", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "53" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -545,9 +869,9 @@ } ], "response": { - "$id": "60", + "$id": "98", "type": { - "$ref": "56" + "$ref": "94" } }, "isOverride": false, @@ -556,34 +880,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.Int64Value.get" }, { - "$id": "61", + "$id": "99", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "62", + "$id": "100", "name": "put", "resourceName": "Int64Value", "accessibility": "public", "parameters": [ { - "$id": "63", + "$id": "101", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "64", - "kind": "constant", - "valueType": { - "$id": "65", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -596,21 +910,21 @@ "skipUrlEncoding": false }, { - "$id": "66", + "$id": "102", "name": "body", "nameInRequest": "body", "type": { - "$id": "67", + "$id": "103", "kind": "dict", "keyType": { - "$id": "68", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "69", + "$id": "105", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -631,7 +945,7 @@ ], "responses": [ { - "$id": "70", + "$id": "106", "statusCodes": [ 204 ], @@ -653,21 +967,21 @@ }, "parameters": [ { - "$id": "71", + "$id": "107", "name": "body", "nameInRequest": "body", "type": { - "$id": "72", + "$id": "108", "kind": "dict", "keyType": { - "$id": "73", + "$id": "109", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "74", + "$id": "110", "kind": "int64", "name": "int64", "crossLanguageDefinitionId": "TypeSpec.int64", @@ -686,12 +1000,12 @@ "skipUrlEncoding": false }, { - "$id": "75", + "$id": "111", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "64" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -705,7 +1019,7 @@ } ], "response": { - "$id": "76" + "$id": "112" }, "isOverride": false, "generateConvenient": true, @@ -715,12 +1029,12 @@ ], "parameters": [ { - "$id": "77", + "$id": "113", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "78", + "$id": "114", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -734,9 +1048,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "79", + "$id": "115", "type": { - "$id": "80", + "$id": "116", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -749,44 +1063,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.Int64Value", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "81", + "$id": "117", "kind": "client", "name": "BooleanValue", "namespace": "Type.Dictionary", "doc": "Dictionary of boolean values", "methods": [ { - "$id": "82", + "$id": "118", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "83", + "$id": "119", "name": "get", "resourceName": "BooleanValue", "accessibility": "public", "parameters": [ { - "$id": "84", + "$id": "120", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "85", - "kind": "constant", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -801,22 +1105,22 @@ ], "responses": [ { - "$id": "87", + "$id": "121", "statusCodes": [ 200 ], "bodyType": { - "$id": "88", + "$id": "122", "kind": "dict", "keyType": { - "$id": "89", + "$id": "123", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "90", + "$id": "124", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -842,11 +1146,11 @@ }, "parameters": [ { - "$id": "91", + "$id": "125", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "85" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -860,9 +1164,9 @@ } ], "response": { - "$id": "92", + "$id": "126", "type": { - "$ref": "88" + "$ref": "122" } }, "isOverride": false, @@ -871,34 +1175,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.BooleanValue.get" }, { - "$id": "93", + "$id": "127", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "94", + "$id": "128", "name": "put", "resourceName": "BooleanValue", "accessibility": "public", "parameters": [ { - "$id": "95", + "$id": "129", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "96", - "kind": "constant", - "valueType": { - "$id": "97", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -911,21 +1205,21 @@ "skipUrlEncoding": false }, { - "$id": "98", + "$id": "130", "name": "body", "nameInRequest": "body", "type": { - "$id": "99", + "$id": "131", "kind": "dict", "keyType": { - "$id": "100", + "$id": "132", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "101", + "$id": "133", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -946,7 +1240,7 @@ ], "responses": [ { - "$id": "102", + "$id": "134", "statusCodes": [ 204 ], @@ -968,21 +1262,21 @@ }, "parameters": [ { - "$id": "103", + "$id": "135", "name": "body", "nameInRequest": "body", "type": { - "$id": "104", + "$id": "136", "kind": "dict", "keyType": { - "$id": "105", + "$id": "137", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "106", + "$id": "138", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1001,12 +1295,12 @@ "skipUrlEncoding": false }, { - "$id": "107", + "$id": "139", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "96" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1020,7 +1314,7 @@ } ], "response": { - "$id": "108" + "$id": "140" }, "isOverride": false, "generateConvenient": true, @@ -1030,12 +1324,12 @@ ], "parameters": [ { - "$id": "109", + "$id": "141", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "110", + "$id": "142", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1049,9 +1343,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "111", + "$id": "143", "type": { - "$id": "112", + "$id": "144", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1064,44 +1358,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.BooleanValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "113", + "$id": "145", "kind": "client", "name": "StringValue", "namespace": "Type.Dictionary", "doc": "Dictionary of string values", "methods": [ { - "$id": "114", + "$id": "146", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "115", + "$id": "147", "name": "get", "resourceName": "StringValue", "accessibility": "public", "parameters": [ { - "$id": "116", + "$id": "148", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "117", - "kind": "constant", - "valueType": { - "$id": "118", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1116,22 +1400,22 @@ ], "responses": [ { - "$id": "119", + "$id": "149", "statusCodes": [ 200 ], "bodyType": { - "$id": "120", + "$id": "150", "kind": "dict", "keyType": { - "$id": "121", + "$id": "151", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "122", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1157,11 +1441,11 @@ }, "parameters": [ { - "$id": "123", + "$id": "153", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "117" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1175,9 +1459,9 @@ } ], "response": { - "$id": "124", + "$id": "154", "type": { - "$ref": "120" + "$ref": "150" } }, "isOverride": false, @@ -1186,34 +1470,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.StringValue.get" }, { - "$id": "125", + "$id": "155", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "126", + "$id": "156", "name": "put", "resourceName": "StringValue", "accessibility": "public", "parameters": [ { - "$id": "127", + "$id": "157", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "128", - "kind": "constant", - "valueType": { - "$id": "129", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1226,21 +1500,21 @@ "skipUrlEncoding": false }, { - "$id": "130", + "$id": "158", "name": "body", "nameInRequest": "body", "type": { - "$id": "131", + "$id": "159", "kind": "dict", "keyType": { - "$id": "132", + "$id": "160", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "133", + "$id": "161", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1261,7 +1535,7 @@ ], "responses": [ { - "$id": "134", + "$id": "162", "statusCodes": [ 204 ], @@ -1283,21 +1557,21 @@ }, "parameters": [ { - "$id": "135", + "$id": "163", "name": "body", "nameInRequest": "body", "type": { - "$id": "136", + "$id": "164", "kind": "dict", "keyType": { - "$id": "137", + "$id": "165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "138", + "$id": "166", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1316,12 +1590,12 @@ "skipUrlEncoding": false }, { - "$id": "139", + "$id": "167", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "128" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1335,7 +1609,7 @@ } ], "response": { - "$id": "140" + "$id": "168" }, "isOverride": false, "generateConvenient": true, @@ -1345,12 +1619,12 @@ ], "parameters": [ { - "$id": "141", + "$id": "169", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "142", + "$id": "170", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1364,9 +1638,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "143", + "$id": "171", "type": { - "$id": "144", + "$id": "172", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1379,44 +1653,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.StringValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "145", + "$id": "173", "kind": "client", "name": "Float32Value", "namespace": "Type.Dictionary", "doc": "Dictionary of float values", "methods": [ { - "$id": "146", + "$id": "174", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "147", + "$id": "175", "name": "get", "resourceName": "Float32Value", "accessibility": "public", "parameters": [ { - "$id": "148", + "$id": "176", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "149", - "kind": "constant", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1431,22 +1695,22 @@ ], "responses": [ { - "$id": "151", + "$id": "177", "statusCodes": [ 200 ], "bodyType": { - "$id": "152", + "$id": "178", "kind": "dict", "keyType": { - "$id": "153", + "$id": "179", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "154", + "$id": "180", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1472,11 +1736,11 @@ }, "parameters": [ { - "$id": "155", + "$id": "181", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "149" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1490,9 +1754,9 @@ } ], "response": { - "$id": "156", + "$id": "182", "type": { - "$ref": "152" + "$ref": "178" } }, "isOverride": false, @@ -1501,34 +1765,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.Float32Value.get" }, { - "$id": "157", + "$id": "183", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "158", + "$id": "184", "name": "put", "resourceName": "Float32Value", "accessibility": "public", "parameters": [ { - "$id": "159", + "$id": "185", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "160", - "kind": "constant", - "valueType": { - "$id": "161", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1541,21 +1795,21 @@ "skipUrlEncoding": false }, { - "$id": "162", + "$id": "186", "name": "body", "nameInRequest": "body", "type": { - "$id": "163", + "$id": "187", "kind": "dict", "keyType": { - "$id": "164", + "$id": "188", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "165", + "$id": "189", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1576,7 +1830,7 @@ ], "responses": [ { - "$id": "166", + "$id": "190", "statusCodes": [ 204 ], @@ -1598,21 +1852,21 @@ }, "parameters": [ { - "$id": "167", + "$id": "191", "name": "body", "nameInRequest": "body", "type": { - "$id": "168", + "$id": "192", "kind": "dict", "keyType": { - "$id": "169", + "$id": "193", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "170", + "$id": "194", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1631,12 +1885,12 @@ "skipUrlEncoding": false }, { - "$id": "171", + "$id": "195", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "160" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1650,7 +1904,7 @@ } ], "response": { - "$id": "172" + "$id": "196" }, "isOverride": false, "generateConvenient": true, @@ -1660,12 +1914,12 @@ ], "parameters": [ { - "$id": "173", + "$id": "197", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "174", + "$id": "198", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1679,9 +1933,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "175", + "$id": "199", "type": { - "$id": "176", + "$id": "200", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1694,44 +1948,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.Float32Value", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "177", + "$id": "201", "kind": "client", "name": "DatetimeValue", "namespace": "Type.Dictionary", "doc": "Dictionary of datetime values", "methods": [ { - "$id": "178", + "$id": "202", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "179", + "$id": "203", "name": "get", "resourceName": "DatetimeValue", "accessibility": "public", "parameters": [ { - "$id": "180", + "$id": "204", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "181", - "kind": "constant", - "valueType": { - "$id": "182", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1746,27 +1990,27 @@ ], "responses": [ { - "$id": "183", + "$id": "205", "statusCodes": [ 200 ], "bodyType": { - "$id": "184", + "$id": "206", "kind": "dict", "keyType": { - "$id": "185", + "$id": "207", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "186", + "$id": "208", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "187", + "$id": "209", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1795,11 +2039,11 @@ }, "parameters": [ { - "$id": "188", + "$id": "210", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "181" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1813,9 +2057,9 @@ } ], "response": { - "$id": "189", + "$id": "211", "type": { - "$ref": "184" + "$ref": "206" } }, "isOverride": false, @@ -1824,34 +2068,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.DatetimeValue.get" }, { - "$id": "190", + "$id": "212", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "191", + "$id": "213", "name": "put", "resourceName": "DatetimeValue", "accessibility": "public", "parameters": [ { - "$id": "192", + "$id": "214", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "193", - "kind": "constant", - "valueType": { - "$id": "194", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1864,26 +2098,26 @@ "skipUrlEncoding": false }, { - "$id": "195", + "$id": "215", "name": "body", "nameInRequest": "body", "type": { - "$id": "196", + "$id": "216", "kind": "dict", "keyType": { - "$id": "197", + "$id": "217", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "198", + "$id": "218", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "199", + "$id": "219", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1907,7 +2141,7 @@ ], "responses": [ { - "$id": "200", + "$id": "220", "statusCodes": [ 204 ], @@ -1929,26 +2163,26 @@ }, "parameters": [ { - "$id": "201", + "$id": "221", "name": "body", "nameInRequest": "body", "type": { - "$id": "202", + "$id": "222", "kind": "dict", "keyType": { - "$id": "203", + "$id": "223", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "204", + "$id": "224", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "205", + "$id": "225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1970,12 +2204,12 @@ "skipUrlEncoding": false }, { - "$id": "206", + "$id": "226", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "193" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1989,7 +2223,7 @@ } ], "response": { - "$id": "207" + "$id": "227" }, "isOverride": false, "generateConvenient": true, @@ -1999,12 +2233,12 @@ ], "parameters": [ { - "$id": "208", + "$id": "228", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "209", + "$id": "229", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2018,9 +2252,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "210", + "$id": "230", "type": { - "$id": "211", + "$id": "231", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2033,44 +2267,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.DatetimeValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "212", + "$id": "232", "kind": "client", "name": "DurationValue", "namespace": "Type.Dictionary", "doc": "Dictionary of duration values", "methods": [ { - "$id": "213", + "$id": "233", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "214", + "$id": "234", "name": "get", "resourceName": "DurationValue", "accessibility": "public", "parameters": [ { - "$id": "215", + "$id": "235", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "216", - "kind": "constant", - "valueType": { - "$id": "217", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2085,27 +2309,27 @@ ], "responses": [ { - "$id": "218", + "$id": "236", "statusCodes": [ 200 ], "bodyType": { - "$id": "219", + "$id": "237", "kind": "dict", "keyType": { - "$id": "220", + "$id": "238", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "221", + "$id": "239", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "222", + "$id": "240", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2134,11 +2358,11 @@ }, "parameters": [ { - "$id": "223", + "$id": "241", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "216" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -2152,9 +2376,9 @@ } ], "response": { - "$id": "224", + "$id": "242", "type": { - "$ref": "219" + "$ref": "237" } }, "isOverride": false, @@ -2163,34 +2387,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.DurationValue.get" }, { - "$id": "225", + "$id": "243", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "226", + "$id": "244", "name": "put", "resourceName": "DurationValue", "accessibility": "public", "parameters": [ { - "$id": "227", + "$id": "245", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "228", - "kind": "constant", - "valueType": { - "$id": "229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2203,26 +2417,26 @@ "skipUrlEncoding": false }, { - "$id": "230", + "$id": "246", "name": "body", "nameInRequest": "body", "type": { - "$id": "231", + "$id": "247", "kind": "dict", "keyType": { - "$id": "232", + "$id": "248", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "233", + "$id": "249", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "234", + "$id": "250", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2246,7 +2460,7 @@ ], "responses": [ { - "$id": "235", + "$id": "251", "statusCodes": [ 204 ], @@ -2268,26 +2482,26 @@ }, "parameters": [ { - "$id": "236", + "$id": "252", "name": "body", "nameInRequest": "body", "type": { - "$id": "237", + "$id": "253", "kind": "dict", "keyType": { - "$id": "238", + "$id": "254", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "239", + "$id": "255", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "240", + "$id": "256", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2309,12 +2523,12 @@ "skipUrlEncoding": false }, { - "$id": "241", + "$id": "257", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "228" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -2328,7 +2542,7 @@ } ], "response": { - "$id": "242" + "$id": "258" }, "isOverride": false, "generateConvenient": true, @@ -2338,12 +2552,12 @@ ], "parameters": [ { - "$id": "243", + "$id": "259", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "244", + "$id": "260", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2357,9 +2571,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "245", + "$id": "261", "type": { - "$id": "246", + "$id": "262", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2372,44 +2586,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.DurationValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "247", + "$id": "263", "kind": "client", "name": "UnknownValue", "namespace": "Type.Dictionary", "doc": "Dictionary of unknown values", "methods": [ { - "$id": "248", + "$id": "264", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "249", + "$id": "265", "name": "get", "resourceName": "UnknownValue", "accessibility": "public", "parameters": [ { - "$id": "250", + "$id": "266", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "251", - "kind": "constant", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2424,22 +2628,22 @@ ], "responses": [ { - "$id": "253", + "$id": "267", "statusCodes": [ 200 ], "bodyType": { - "$id": "254", + "$id": "268", "kind": "dict", "keyType": { - "$id": "255", + "$id": "269", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "256", + "$id": "270", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2465,11 +2669,11 @@ }, "parameters": [ { - "$id": "257", + "$id": "271", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "251" + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -2483,9 +2687,9 @@ } ], "response": { - "$id": "258", + "$id": "272", "type": { - "$ref": "254" + "$ref": "268" } }, "isOverride": false, @@ -2494,34 +2698,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.UnknownValue.get" }, { - "$id": "259", + "$id": "273", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "260", + "$id": "274", "name": "put", "resourceName": "UnknownValue", "accessibility": "public", "parameters": [ { - "$id": "261", + "$id": "275", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "262", - "kind": "constant", - "valueType": { - "$id": "263", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2534,21 +2728,21 @@ "skipUrlEncoding": false }, { - "$id": "264", + "$id": "276", "name": "body", "nameInRequest": "body", "type": { - "$id": "265", + "$id": "277", "kind": "dict", "keyType": { - "$id": "266", + "$id": "278", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "267", + "$id": "279", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2569,7 +2763,7 @@ ], "responses": [ { - "$id": "268", + "$id": "280", "statusCodes": [ 204 ], @@ -2591,21 +2785,21 @@ }, "parameters": [ { - "$id": "269", + "$id": "281", "name": "body", "nameInRequest": "body", "type": { - "$id": "270", + "$id": "282", "kind": "dict", "keyType": { - "$id": "271", + "$id": "283", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "272", + "$id": "284", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2624,12 +2818,12 @@ "skipUrlEncoding": false }, { - "$id": "273", + "$id": "285", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "262" + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -2643,7 +2837,7 @@ } ], "response": { - "$id": "274" + "$id": "286" }, "isOverride": false, "generateConvenient": true, @@ -2653,12 +2847,12 @@ ], "parameters": [ { - "$id": "275", + "$id": "287", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "276", + "$id": "288", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2672,9 +2866,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "277", + "$id": "289", "type": { - "$id": "278", + "$id": "290", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2687,44 +2881,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.UnknownValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "279", + "$id": "291", "kind": "client", "name": "ModelValue", "namespace": "Type.Dictionary", "doc": "Dictionary of model values", "methods": [ { - "$id": "280", + "$id": "292", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "281", + "$id": "293", "name": "get", "resourceName": "ModelValue", "accessibility": "public", "parameters": [ { - "$id": "282", + "$id": "294", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "283", - "kind": "constant", - "valueType": { - "$id": "284", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2739,22 +2923,22 @@ ], "responses": [ { - "$id": "285", + "$id": "295", "statusCodes": [ 200 ], "bodyType": { - "$id": "286", + "$id": "296", "kind": "dict", "keyType": { - "$id": "287", + "$id": "297", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -2776,11 +2960,11 @@ }, "parameters": [ { - "$id": "288", + "$id": "298", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "283" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2794,9 +2978,9 @@ } ], "response": { - "$id": "289", + "$id": "299", "type": { - "$ref": "286" + "$ref": "296" } }, "isOverride": false, @@ -2805,34 +2989,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.ModelValue.get" }, { - "$id": "290", + "$id": "300", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "291", + "$id": "301", "name": "put", "resourceName": "ModelValue", "accessibility": "public", "parameters": [ { - "$id": "292", + "$id": "302", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "293", - "kind": "constant", - "valueType": { - "$id": "294", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2845,21 +3019,21 @@ "skipUrlEncoding": false }, { - "$id": "295", + "$id": "303", "name": "body", "nameInRequest": "body", "type": { - "$id": "296", + "$id": "304", "kind": "dict", "keyType": { - "$id": "297", + "$id": "305", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -2876,7 +3050,7 @@ ], "responses": [ { - "$id": "298", + "$id": "306", "statusCodes": [ 204 ], @@ -2898,21 +3072,21 @@ }, "parameters": [ { - "$id": "299", + "$id": "307", "name": "body", "nameInRequest": "body", "type": { - "$id": "300", + "$id": "308", "kind": "dict", "keyType": { - "$id": "301", + "$id": "309", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -2927,12 +3101,12 @@ "skipUrlEncoding": false }, { - "$id": "302", + "$id": "310", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "293" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2946,7 +3120,7 @@ } ], "response": { - "$id": "303" + "$id": "311" }, "isOverride": false, "generateConvenient": true, @@ -2956,12 +3130,12 @@ ], "parameters": [ { - "$id": "304", + "$id": "312", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "305", + "$id": "313", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2975,9 +3149,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "306", + "$id": "314", "type": { - "$id": "307", + "$id": "315", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2990,44 +3164,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.ModelValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "308", + "$id": "316", "kind": "client", "name": "RecursiveModelValue", "namespace": "Type.Dictionary", "doc": "Dictionary of model values", "methods": [ { - "$id": "309", + "$id": "317", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "310", + "$id": "318", "name": "get", "resourceName": "RecursiveModelValue", "accessibility": "public", "parameters": [ { - "$id": "311", + "$id": "319", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "312", - "kind": "constant", - "valueType": { - "$id": "313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -3042,22 +3206,22 @@ ], "responses": [ { - "$id": "314", + "$id": "320", "statusCodes": [ 200 ], "bodyType": { - "$id": "315", + "$id": "321", "kind": "dict", "keyType": { - "$id": "316", + "$id": "322", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -3079,11 +3243,11 @@ }, "parameters": [ { - "$id": "317", + "$id": "323", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "312" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -3097,9 +3261,9 @@ } ], "response": { - "$id": "318", + "$id": "324", "type": { - "$ref": "315" + "$ref": "321" } }, "isOverride": false, @@ -3108,34 +3272,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.RecursiveModelValue.get" }, { - "$id": "319", + "$id": "325", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "320", + "$id": "326", "name": "put", "resourceName": "RecursiveModelValue", "accessibility": "public", "parameters": [ { - "$id": "321", + "$id": "327", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "322", - "kind": "constant", - "valueType": { - "$id": "323", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3148,21 +3302,21 @@ "skipUrlEncoding": false }, { - "$id": "324", + "$id": "328", "name": "body", "nameInRequest": "body", "type": { - "$id": "325", + "$id": "329", "kind": "dict", "keyType": { - "$id": "326", + "$id": "330", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -3179,7 +3333,7 @@ ], "responses": [ { - "$id": "327", + "$id": "331", "statusCodes": [ 204 ], @@ -3201,21 +3355,21 @@ }, "parameters": [ { - "$id": "328", + "$id": "332", "name": "body", "nameInRequest": "body", "type": { - "$id": "329", + "$id": "333", "kind": "dict", "keyType": { - "$id": "330", + "$id": "334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "46" }, "decorators": [] }, @@ -3230,12 +3384,12 @@ "skipUrlEncoding": false }, { - "$id": "331", + "$id": "335", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "322" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -3249,7 +3403,7 @@ } ], "response": { - "$id": "332" + "$id": "336" }, "isOverride": false, "generateConvenient": true, @@ -3259,12 +3413,12 @@ ], "parameters": [ { - "$id": "333", + "$id": "337", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "334", + "$id": "338", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3278,9 +3432,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "335", + "$id": "339", "type": { - "$id": "336", + "$id": "340", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3293,44 +3447,34 @@ "crossLanguageDefinitionId": "Type.Dictionary.RecursiveModelValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } }, { - "$id": "337", + "$id": "341", "kind": "client", "name": "NullableFloatValue", "namespace": "Type.Dictionary", "doc": "Dictionary of nullable float values", "methods": [ { - "$id": "338", + "$id": "342", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "339", + "$id": "343", "name": "get", "resourceName": "NullableFloatValue", "accessibility": "public", "parameters": [ { - "$id": "340", + "$id": "344", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "341", - "kind": "constant", - "valueType": { - "$id": "342", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3345,25 +3489,25 @@ ], "responses": [ { - "$id": "343", + "$id": "345", "statusCodes": [ 200 ], "bodyType": { - "$id": "344", + "$id": "346", "kind": "dict", "keyType": { - "$id": "345", + "$id": "347", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "346", + "$id": "348", "kind": "nullable", "type": { - "$id": "347", + "$id": "349", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -3391,11 +3535,11 @@ }, "parameters": [ { - "$id": "348", + "$id": "350", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "341" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -3409,9 +3553,9 @@ } ], "response": { - "$id": "349", + "$id": "351", "type": { - "$ref": "344" + "$ref": "346" } }, "isOverride": false, @@ -3420,34 +3564,24 @@ "crossLanguageDefinitionId": "Type.Dictionary.NullableFloatValue.get" }, { - "$id": "350", + "$id": "352", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "351", + "$id": "353", "name": "put", "resourceName": "NullableFloatValue", "accessibility": "public", "parameters": [ { - "$id": "352", + "$id": "354", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "353", - "kind": "constant", - "valueType": { - "$id": "354", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -3474,7 +3608,7 @@ "decorators": [] }, "valueType": { - "$ref": "346" + "$ref": "348" }, "decorators": [] }, @@ -3527,7 +3661,7 @@ "decorators": [] }, "valueType": { - "$ref": "346" + "$ref": "348" }, "decorators": [] }, @@ -3547,7 +3681,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "353" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -3605,7 +3739,7 @@ "crossLanguageDefinitionId": "Type.Dictionary.NullableFloatValue", "apiVersions": [], "parent": { - "$ref": "12" + "$ref": "56" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj index 6029e8b36bdb..f51e7b586bf1 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/src/Type.Enum.Extensible.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json index 186541f1529a..2491aed7aaa7 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/extensible/tspCodeModel.json @@ -151,22 +151,152 @@ "decorators": [] } ], + "constants": [ + { + "$id": "18", + "kind": "constant", + "name": "getKnownValueContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "GetKnownValueResponseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "getUnknownValueContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "GetKnownValueResponseContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "GetKnownValueResponseContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "GetKnownValueResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "GetKnownValueResponseContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "GetKnownValueResponseContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], "models": [], "clients": [ { - "$id": "18", + "$id": "34", "kind": "client", "name": "ExtensibleClient", "namespace": "Type.Enum.Extensible", "methods": [], "parameters": [ { - "$id": "19", + "$id": "35", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "20", + "$id": "36", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -180,9 +310,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "21", + "$id": "37", "type": { - "$id": "22", + "$id": "38", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -196,39 +326,29 @@ "apiVersions": [], "children": [ { - "$id": "23", + "$id": "39", "kind": "client", "name": "String", "namespace": "Type.Enum.Extensible", "methods": [ { - "$id": "24", + "$id": "40", "kind": "basic", "name": "getKnownValue", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "25", + "$id": "41", "name": "getKnownValue", "resourceName": "String", "accessibility": "public", "parameters": [ { - "$id": "26", + "$id": "42", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "27", - "kind": "constant", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -243,7 +363,7 @@ ], "responses": [ { - "$id": "29", + "$id": "43", "statusCodes": [ 200 ], @@ -252,21 +372,11 @@ }, "headers": [ { - "$id": "30", + "$id": "44", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "31", - "kind": "constant", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" } } ], @@ -287,11 +397,11 @@ }, "parameters": [ { - "$id": "33", + "$id": "45", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "27" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -305,7 +415,7 @@ } ], "response": { - "$id": "34", + "$id": "46", "type": { "$ref": "2" } @@ -316,33 +426,23 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.String.getKnownValue" }, { - "$id": "35", + "$id": "47", "kind": "basic", "name": "getUnknownValue", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "36", + "$id": "48", "name": "getUnknownValue", "resourceName": "String", "accessibility": "public", "parameters": [ { - "$id": "37", + "$id": "49", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "38", - "kind": "constant", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -357,7 +457,7 @@ ], "responses": [ { - "$id": "40", + "$id": "50", "statusCodes": [ 200 ], @@ -366,21 +466,11 @@ }, "headers": [ { - "$id": "41", + "$id": "51", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" } } ], @@ -401,11 +491,11 @@ }, "parameters": [ { - "$id": "44", + "$id": "52", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "38" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -419,7 +509,7 @@ } ], "response": { - "$id": "45", + "$id": "53", "type": { "$ref": "2" } @@ -430,33 +520,23 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.String.getUnknownValue" }, { - "$id": "46", + "$id": "54", "kind": "basic", "name": "putKnownValue", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "47", + "$id": "55", "name": "putKnownValue", "resourceName": "String", "accessibility": "public", "parameters": [ { - "$id": "48", + "$id": "56", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "49", - "kind": "constant", - "valueType": { - "$id": "50", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -469,7 +549,7 @@ "skipUrlEncoding": false }, { - "$id": "51", + "$id": "57", "name": "body", "nameInRequest": "body", "type": { @@ -488,7 +568,7 @@ ], "responses": [ { - "$id": "52", + "$id": "58", "statusCodes": [ 204 ], @@ -510,21 +590,11 @@ }, "parameters": [ { - "$id": "53", + "$id": "59", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "54", - "kind": "constant", - "valueType": { - "$id": "55", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -537,7 +607,7 @@ "skipUrlEncoding": false }, { - "$id": "56", + "$id": "60", "name": "body", "nameInRequest": "body", "type": { @@ -555,7 +625,7 @@ } ], "response": { - "$id": "57" + "$id": "61" }, "isOverride": false, "generateConvenient": true, @@ -563,33 +633,23 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.String.putKnownValue" }, { - "$id": "58", + "$id": "62", "kind": "basic", "name": "putUnknownValue", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "59", + "$id": "63", "name": "putUnknownValue", "resourceName": "String", "accessibility": "public", "parameters": [ { - "$id": "60", + "$id": "64", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "61", - "kind": "constant", - "valueType": { - "$id": "62", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -602,7 +662,7 @@ "skipUrlEncoding": false }, { - "$id": "63", + "$id": "65", "name": "body", "nameInRequest": "body", "type": { @@ -621,7 +681,7 @@ ], "responses": [ { - "$id": "64", + "$id": "66", "statusCodes": [ 204 ], @@ -643,21 +703,11 @@ }, "parameters": [ { - "$id": "65", + "$id": "67", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "66", - "kind": "constant", - "valueType": { - "$id": "67", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -732,7 +782,7 @@ "crossLanguageDefinitionId": "Type.Enum.Extensible.String", "apiVersions": [], "parent": { - "$ref": "18" + "$ref": "34" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj index 5549883aa7a4..014cc2bf1fa4 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/src/Type.Enum.Fixed.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json index f5c2fedd46ea..414cb9626804 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/enum/fixed/tspCodeModel.json @@ -151,22 +151,120 @@ "decorators": [] } ], + "constants": [ + { + "$id": "18", + "kind": "constant", + "name": "getKnownValueContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "GetKnownValueResponseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "GetKnownValueResponseContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "GetKnownValueResponseContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "GetKnownValueResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "GetKnownValueResponseContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], "models": [], "clients": [ { - "$id": "18", + "$id": "30", "kind": "client", "name": "FixedClient", "namespace": "Type.Enum.Fixed", "methods": [], "parameters": [ { - "$id": "19", + "$id": "31", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "20", + "$id": "32", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -180,9 +278,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "21", + "$id": "33", "type": { - "$id": "22", + "$id": "34", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -196,41 +294,31 @@ "apiVersions": [], "children": [ { - "$id": "23", + "$id": "35", "kind": "client", "name": "String", "namespace": "Type.Enum.Fixed", "methods": [ { - "$id": "24", + "$id": "36", "kind": "basic", "name": "getKnownValue", "accessibility": "public", "apiVersions": [], "doc": "getKnownValue", "operation": { - "$id": "25", + "$id": "37", "name": "getKnownValue", "resourceName": "String", "doc": "getKnownValue", "accessibility": "public", "parameters": [ { - "$id": "26", + "$id": "38", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "27", - "kind": "constant", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -245,7 +333,7 @@ ], "responses": [ { - "$id": "29", + "$id": "39", "statusCodes": [ 200 ], @@ -254,21 +342,11 @@ }, "headers": [ { - "$id": "30", + "$id": "40", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "31", - "kind": "constant", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" } } ], @@ -289,11 +367,11 @@ }, "parameters": [ { - "$id": "33", + "$id": "41", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "27" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -307,7 +385,7 @@ } ], "response": { - "$id": "34", + "$id": "42", "type": { "$ref": "2" } @@ -318,35 +396,25 @@ "crossLanguageDefinitionId": "Type.Enum.Fixed.String.getKnownValue" }, { - "$id": "35", + "$id": "43", "kind": "basic", "name": "putKnownValue", "accessibility": "public", "apiVersions": [], "doc": "putKnownValue", "operation": { - "$id": "36", + "$id": "44", "name": "putKnownValue", "resourceName": "String", "doc": "putKnownValue", "accessibility": "public", "parameters": [ { - "$id": "37", + "$id": "45", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "38", - "kind": "constant", - "valueType": { - "$id": "39", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -359,7 +427,7 @@ "skipUrlEncoding": false }, { - "$id": "40", + "$id": "46", "name": "body", "nameInRequest": "body", "doc": "_", @@ -379,7 +447,7 @@ ], "responses": [ { - "$id": "41", + "$id": "47", "statusCodes": [ 204 ], @@ -401,21 +469,11 @@ }, "parameters": [ { - "$id": "42", + "$id": "48", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "43", - "kind": "constant", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -428,7 +486,7 @@ "skipUrlEncoding": false }, { - "$id": "45", + "$id": "49", "name": "body", "nameInRequest": "body", "doc": "_", @@ -447,7 +505,7 @@ } ], "response": { - "$id": "46" + "$id": "50" }, "isOverride": false, "generateConvenient": true, @@ -455,35 +513,25 @@ "crossLanguageDefinitionId": "Type.Enum.Fixed.String.putKnownValue" }, { - "$id": "47", + "$id": "51", "kind": "basic", "name": "putUnknownValue", "accessibility": "public", "apiVersions": [], "doc": "putUnknownValue", "operation": { - "$id": "48", + "$id": "52", "name": "putUnknownValue", "resourceName": "String", "doc": "putUnknownValue", "accessibility": "public", "parameters": [ { - "$id": "49", + "$id": "53", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "50", - "kind": "constant", - "valueType": { - "$id": "51", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -496,7 +544,7 @@ "skipUrlEncoding": false }, { - "$id": "52", + "$id": "54", "name": "body", "nameInRequest": "body", "doc": "_", @@ -516,7 +564,7 @@ ], "responses": [ { - "$id": "53", + "$id": "55", "statusCodes": [ 204 ], @@ -538,21 +586,11 @@ }, "parameters": [ { - "$id": "54", + "$id": "56", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "55", - "kind": "constant", - "valueType": { - "$id": "56", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -628,7 +666,7 @@ "crossLanguageDefinitionId": "Type.Enum.Fixed.String", "apiVersions": [], "parent": { - "$ref": "18" + "$ref": "30" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj index b44c61cb7625..81f58610e311 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/src/Type.Model.Empty.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json index ef04e26566d7..3c5079404a58 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/empty/tspCodeModel.json @@ -3,9 +3,75 @@ "name": "Type.Model.Empty", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "putEmptyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getEmptyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "postRoundTripEmptyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "postRoundTripEmptyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "10", "kind": "model", "name": "EmptyInput", "namespace": "Type.Model.Empty", @@ -16,7 +82,7 @@ "properties": [] }, { - "$id": "3", + "$id": "11", "kind": "model", "name": "EmptyOutput", "namespace": "Type.Model.Empty", @@ -27,7 +93,7 @@ "properties": [] }, { - "$id": "4", + "$id": "12", "kind": "model", "name": "EmptyInputOutput", "namespace": "Type.Model.Empty", @@ -40,41 +106,31 @@ ], "clients": [ { - "$id": "5", + "$id": "13", "kind": "client", "name": "EmptyClient", "namespace": "Type.Model.Empty", "doc": "Illustrates usage of empty model used in operation's parameters and responses.", "methods": [ { - "$id": "6", + "$id": "14", "kind": "basic", "name": "putEmpty", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "7", + "$id": "15", "name": "putEmpty", "resourceName": "Empty", "accessibility": "public", "parameters": [ { - "$id": "8", + "$id": "16", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "9", - "kind": "constant", - "valueType": { - "$id": "10", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -87,11 +143,11 @@ "skipUrlEncoding": false }, { - "$id": "11", + "$id": "17", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -106,7 +162,7 @@ ], "responses": [ { - "$id": "12", + "$id": "18", "statusCodes": [ 204 ], @@ -128,11 +184,11 @@ }, "parameters": [ { - "$id": "13", + "$id": "19", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -145,12 +201,12 @@ "skipUrlEncoding": false }, { - "$id": "14", + "$id": "20", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "9" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -164,7 +220,7 @@ } ], "response": { - "$id": "15" + "$id": "21" }, "isOverride": false, "generateConvenient": true, @@ -172,33 +228,23 @@ "crossLanguageDefinitionId": "Type.Model.Empty.putEmpty" }, { - "$id": "16", + "$id": "22", "kind": "basic", "name": "getEmpty", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "17", + "$id": "23", "name": "getEmpty", "resourceName": "Empty", "accessibility": "public", "parameters": [ { - "$id": "18", + "$id": "24", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "19", - "kind": "constant", - "valueType": { - "$id": "20", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -213,12 +259,12 @@ ], "responses": [ { - "$id": "21", + "$id": "25", "statusCodes": [ 200 ], "bodyType": { - "$ref": "3" + "$ref": "11" }, "headers": [], "isErrorResponse": false, @@ -238,11 +284,11 @@ }, "parameters": [ { - "$id": "22", + "$id": "26", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "19" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -256,9 +302,9 @@ } ], "response": { - "$id": "23", + "$id": "27", "type": { - "$ref": "3" + "$ref": "11" } }, "isOverride": false, @@ -267,34 +313,24 @@ "crossLanguageDefinitionId": "Type.Model.Empty.getEmpty" }, { - "$id": "24", + "$id": "28", "kind": "basic", "name": "postRoundTripEmpty", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "25", + "$id": "29", "name": "postRoundTripEmpty", "resourceName": "Empty", "accessibility": "public", "parameters": [ { - "$id": "26", + "$id": "30", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "27", - "kind": "constant", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -307,21 +343,11 @@ "skipUrlEncoding": false }, { - "$id": "29", + "$id": "31", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "30", - "kind": "constant", - "valueType": { - "$id": "31", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -338,7 +364,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "4" + "$ref": "12" }, "location": "Body", "isApiVersion": false, @@ -358,7 +384,7 @@ 200 ], "bodyType": { - "$ref": "4" + "$ref": "12" }, "headers": [], "isErrorResponse": false, @@ -385,7 +411,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "4" + "$ref": "12" }, "location": "Body", "isApiVersion": false, @@ -403,7 +429,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "27" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -420,7 +446,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "30" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -436,7 +462,7 @@ "response": { "$id": "37", "type": { - "$ref": "4" + "$ref": "12" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj index 841fc68da047..c88d0d725347 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/src/Type.Model.Inheritance.EnumDiscriminator.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json index 4e3bc1005062..31c2b5eae900 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/enum-discriminator/tspCodeModel.json @@ -82,9 +82,139 @@ "decorators": [] } ], - "models": [ + "constants": [ { "$id": "10", + "kind": "constant", + "name": "getExtensibleModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "putExtensibleModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getExtensibleModelMissingDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "getExtensibleModelWrongDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "getFixedModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "putFixedModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "getFixedModelMissingDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "getFixedModelWrongDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "26", "kind": "model", "name": "Dog", "namespace": "Type.Model.Inheritance.EnumDiscriminator", @@ -93,7 +223,7 @@ "doc": "Test extensible enum type for discriminator", "decorators": [], "discriminatorProperty": { - "$id": "11", + "$id": "27", "kind": "property", "name": "kind", "serializedName": "kind", @@ -108,25 +238,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Dog.kind", "serializationOptions": { - "$id": "12", + "$id": "28", "json": { - "$id": "13", + "$id": "29", "name": "kind" } } }, "properties": [ { - "$ref": "11" + "$ref": "27" }, { - "$id": "14", + "$id": "30", "kind": "property", "name": "weight", "serializedName": "weight", "doc": "Weight of the dog", "type": { - "$id": "15", + "$id": "31", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -139,18 +269,18 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Dog.weight", "serializationOptions": { - "$id": "16", + "$id": "32", "json": { - "$id": "17", + "$id": "33", "name": "weight" } } } ], "discriminatedSubtypes": { - "$id": "18", + "$id": "34", "golden": { - "$id": "19", + "$id": "35", "kind": "model", "name": "Golden", "namespace": "Type.Model.Inheritance.EnumDiscriminator", @@ -160,26 +290,31 @@ "discriminatorValue": "golden", "decorators": [], "baseModel": { - "$ref": "10" + "$ref": "26" }, "properties": [ { - "$id": "20", + "$id": "36", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "discriminator property", "type": { - "$id": "21", - "kind": "constant", + "$id": "37", + "kind": "enumvalue", + "name": "Golden", + "value": "golden", "valueType": { - "$id": "22", + "$id": "38", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "golden", + "enumType": { + "$ref": "2" + }, + "doc": "Species golden", "decorators": [] }, "optional": false, @@ -189,9 +324,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Golden.kind", "serializationOptions": { - "$id": "23", + "$id": "39", "json": { - "$id": "24", + "$id": "40", "name": "kind" } } @@ -201,10 +336,10 @@ } }, { - "$ref": "19" + "$ref": "35" }, { - "$id": "25", + "$id": "41", "kind": "model", "name": "Snake", "namespace": "Type.Model.Inheritance.EnumDiscriminator", @@ -213,7 +348,7 @@ "doc": "Test fixed enum type for discriminator", "decorators": [], "discriminatorProperty": { - "$id": "26", + "$id": "42", "kind": "property", "name": "kind", "serializedName": "kind", @@ -228,25 +363,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Snake.kind", "serializationOptions": { - "$id": "27", + "$id": "43", "json": { - "$id": "28", + "$id": "44", "name": "kind" } } }, "properties": [ { - "$ref": "26" + "$ref": "42" }, { - "$id": "29", + "$id": "45", "kind": "property", "name": "length", "serializedName": "length", "doc": "Length of the snake", "type": { - "$id": "30", + "$id": "46", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -259,18 +394,18 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Snake.length", "serializationOptions": { - "$id": "31", + "$id": "47", "json": { - "$id": "32", + "$id": "48", "name": "length" } } } ], "discriminatedSubtypes": { - "$id": "33", + "$id": "49", "cobra": { - "$id": "34", + "$id": "50", "kind": "model", "name": "Cobra", "namespace": "Type.Model.Inheritance.EnumDiscriminator", @@ -280,26 +415,31 @@ "discriminatorValue": "cobra", "decorators": [], "baseModel": { - "$ref": "25" + "$ref": "41" }, "properties": [ { - "$id": "35", + "$id": "51", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "discriminator property", "type": { - "$id": "36", - "kind": "constant", + "$id": "52", + "kind": "enumvalue", + "name": "Cobra", + "value": "cobra", "valueType": { - "$id": "37", + "$id": "53", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "cobra", + "enumType": { + "$ref": "6" + }, + "doc": "Species cobra", "decorators": [] }, "optional": false, @@ -309,9 +449,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.Cobra.kind", "serializationOptions": { - "$id": "38", + "$id": "54", "json": { - "$id": "39", + "$id": "55", "name": "kind" } } @@ -321,47 +461,37 @@ } }, { - "$ref": "34" + "$ref": "50" } ], "clients": [ { - "$id": "40", + "$id": "56", "kind": "client", "name": "EnumDiscriminatorClient", "namespace": "Type.Model.Inheritance.EnumDiscriminator", "doc": "Illustrates inheritance with enum discriminator.", "methods": [ { - "$id": "41", + "$id": "57", "kind": "basic", "name": "getExtensibleModel", "accessibility": "public", "apiVersions": [], "doc": "Receive model with extensible enum discriminator type.", "operation": { - "$id": "42", + "$id": "58", "name": "getExtensibleModel", "resourceName": "EnumDiscriminator", "doc": "Receive model with extensible enum discriminator type.", "accessibility": "public", "parameters": [ { - "$id": "43", + "$id": "59", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "44", - "kind": "constant", - "valueType": { - "$id": "45", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -376,12 +506,12 @@ ], "responses": [ { - "$id": "46", + "$id": "60", "statusCodes": [ 200 ], "bodyType": { - "$ref": "10" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -401,11 +531,11 @@ }, "parameters": [ { - "$id": "47", + "$id": "61", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "44" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -419,9 +549,9 @@ } ], "response": { - "$id": "48", + "$id": "62", "type": { - "$ref": "10" + "$ref": "26" } }, "isOverride": false, @@ -430,36 +560,26 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.getExtensibleModel" }, { - "$id": "49", + "$id": "63", "kind": "basic", "name": "putExtensibleModel", "accessibility": "public", "apiVersions": [], "doc": "Send model with extensible enum discriminator type.", "operation": { - "$id": "50", + "$id": "64", "name": "putExtensibleModel", "resourceName": "EnumDiscriminator", "doc": "Send model with extensible enum discriminator type.", "accessibility": "public", "parameters": [ { - "$id": "51", + "$id": "65", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "52", - "kind": "constant", - "valueType": { - "$id": "53", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -472,12 +592,12 @@ "skipUrlEncoding": false }, { - "$id": "54", + "$id": "66", "name": "input", "nameInRequest": "input", "doc": "Dog to create", "type": { - "$ref": "10" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -492,7 +612,7 @@ ], "responses": [ { - "$id": "55", + "$id": "67", "statusCodes": [ 204 ], @@ -514,12 +634,12 @@ }, "parameters": [ { - "$id": "56", + "$id": "68", "name": "input", "nameInRequest": "input", "doc": "Dog to create", "type": { - "$ref": "10" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -532,12 +652,12 @@ "skipUrlEncoding": false }, { - "$id": "57", + "$id": "69", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "52" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -551,7 +671,7 @@ } ], "response": { - "$id": "58" + "$id": "70" }, "isOverride": false, "generateConvenient": true, @@ -559,35 +679,25 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.putExtensibleModel" }, { - "$id": "59", + "$id": "71", "kind": "basic", "name": "getExtensibleModelMissingDiscriminator", "accessibility": "public", "apiVersions": [], "doc": "Get a model omitting the discriminator.", "operation": { - "$id": "60", + "$id": "72", "name": "getExtensibleModelMissingDiscriminator", "resourceName": "EnumDiscriminator", "doc": "Get a model omitting the discriminator.", "accessibility": "public", "parameters": [ { - "$id": "61", + "$id": "73", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "62", - "kind": "constant", - "valueType": { - "$id": "63", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -602,12 +712,12 @@ ], "responses": [ { - "$id": "64", + "$id": "74", "statusCodes": [ 200 ], "bodyType": { - "$ref": "10" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -627,11 +737,11 @@ }, "parameters": [ { - "$id": "65", + "$id": "75", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "62" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -645,9 +755,9 @@ } ], "response": { - "$id": "66", + "$id": "76", "type": { - "$ref": "10" + "$ref": "26" } }, "isOverride": false, @@ -656,35 +766,25 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.getExtensibleModelMissingDiscriminator" }, { - "$id": "67", + "$id": "77", "kind": "basic", "name": "getExtensibleModelWrongDiscriminator", "accessibility": "public", "apiVersions": [], "doc": "Get a model containing discriminator value never defined.", "operation": { - "$id": "68", + "$id": "78", "name": "getExtensibleModelWrongDiscriminator", "resourceName": "EnumDiscriminator", "doc": "Get a model containing discriminator value never defined.", "accessibility": "public", "parameters": [ { - "$id": "69", + "$id": "79", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "70", - "kind": "constant", - "valueType": { - "$id": "71", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -699,12 +799,12 @@ ], "responses": [ { - "$id": "72", + "$id": "80", "statusCodes": [ 200 ], "bodyType": { - "$ref": "10" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -724,11 +824,11 @@ }, "parameters": [ { - "$id": "73", + "$id": "81", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "70" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -742,9 +842,9 @@ } ], "response": { - "$id": "74", + "$id": "82", "type": { - "$ref": "10" + "$ref": "26" } }, "isOverride": false, @@ -753,35 +853,25 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.getExtensibleModelWrongDiscriminator" }, { - "$id": "75", + "$id": "83", "kind": "basic", "name": "getFixedModel", "accessibility": "public", "apiVersions": [], "doc": "Receive model with fixed enum discriminator type.", "operation": { - "$id": "76", + "$id": "84", "name": "getFixedModel", "resourceName": "EnumDiscriminator", "doc": "Receive model with fixed enum discriminator type.", "accessibility": "public", "parameters": [ { - "$id": "77", + "$id": "85", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "78", - "kind": "constant", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -796,12 +886,12 @@ ], "responses": [ { - "$id": "80", + "$id": "86", "statusCodes": [ 200 ], "bodyType": { - "$ref": "25" + "$ref": "41" }, "headers": [], "isErrorResponse": false, @@ -821,11 +911,11 @@ }, "parameters": [ { - "$id": "81", + "$id": "87", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "78" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -839,9 +929,9 @@ } ], "response": { - "$id": "82", + "$id": "88", "type": { - "$ref": "25" + "$ref": "41" } }, "isOverride": false, @@ -850,36 +940,26 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.getFixedModel" }, { - "$id": "83", + "$id": "89", "kind": "basic", "name": "putFixedModel", "accessibility": "public", "apiVersions": [], "doc": "Send model with fixed enum discriminator type.", "operation": { - "$id": "84", + "$id": "90", "name": "putFixedModel", "resourceName": "EnumDiscriminator", "doc": "Send model with fixed enum discriminator type.", "accessibility": "public", "parameters": [ { - "$id": "85", + "$id": "91", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "86", - "kind": "constant", - "valueType": { - "$id": "87", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -892,12 +972,12 @@ "skipUrlEncoding": false }, { - "$id": "88", + "$id": "92", "name": "input", "nameInRequest": "input", "doc": "Snake to create", "type": { - "$ref": "25" + "$ref": "41" }, "location": "Body", "isApiVersion": false, @@ -912,7 +992,7 @@ ], "responses": [ { - "$id": "89", + "$id": "93", "statusCodes": [ 204 ], @@ -934,12 +1014,12 @@ }, "parameters": [ { - "$id": "90", + "$id": "94", "name": "input", "nameInRequest": "input", "doc": "Snake to create", "type": { - "$ref": "25" + "$ref": "41" }, "location": "Body", "isApiVersion": false, @@ -952,12 +1032,12 @@ "skipUrlEncoding": false }, { - "$id": "91", + "$id": "95", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "86" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -971,7 +1051,7 @@ } ], "response": { - "$id": "92" + "$id": "96" }, "isOverride": false, "generateConvenient": true, @@ -979,35 +1059,25 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.putFixedModel" }, { - "$id": "93", + "$id": "97", "kind": "basic", "name": "getFixedModelMissingDiscriminator", "accessibility": "public", "apiVersions": [], "doc": "Get a model omitting the discriminator.", "operation": { - "$id": "94", + "$id": "98", "name": "getFixedModelMissingDiscriminator", "resourceName": "EnumDiscriminator", "doc": "Get a model omitting the discriminator.", "accessibility": "public", "parameters": [ { - "$id": "95", + "$id": "99", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "96", - "kind": "constant", - "valueType": { - "$id": "97", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1022,12 +1092,12 @@ ], "responses": [ { - "$id": "98", + "$id": "100", "statusCodes": [ 200 ], "bodyType": { - "$ref": "25" + "$ref": "41" }, "headers": [], "isErrorResponse": false, @@ -1047,11 +1117,11 @@ }, "parameters": [ { - "$id": "99", + "$id": "101", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "96" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1065,9 +1135,9 @@ } ], "response": { - "$id": "100", + "$id": "102", "type": { - "$ref": "25" + "$ref": "41" } }, "isOverride": false, @@ -1076,35 +1146,25 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.EnumDiscriminator.getFixedModelMissingDiscriminator" }, { - "$id": "101", + "$id": "103", "kind": "basic", "name": "getFixedModelWrongDiscriminator", "accessibility": "public", "apiVersions": [], "doc": "Get a model containing discriminator value never defined.", "operation": { - "$id": "102", + "$id": "104", "name": "getFixedModelWrongDiscriminator", "resourceName": "EnumDiscriminator", "doc": "Get a model containing discriminator value never defined.", "accessibility": "public", "parameters": [ { - "$id": "103", + "$id": "105", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "104", - "kind": "constant", - "valueType": { - "$id": "105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1124,7 +1184,7 @@ 200 ], "bodyType": { - "$ref": "25" + "$ref": "41" }, "headers": [], "isErrorResponse": false, @@ -1148,7 +1208,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "104" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1164,7 +1224,7 @@ "response": { "$id": "108", "type": { - "$ref": "25" + "$ref": "41" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj index b499a9d11b81..76774d5f31db 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/src/Type.Model.Inheritance.NestedDiscriminator.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json index 767a21167415..a9f85f8cb7ee 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/nested-discriminator/tspCodeModel.json @@ -3,9 +3,171 @@ "name": "Type.Model.Inheritance.NestedDiscriminator", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "SharkKind", + "namespace": "Type.Model.Inheritance.NestedDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "shark", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "SawSharkSharktype", + "namespace": "Type.Model.Inheritance.NestedDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "saw", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "GoblinSharkSharktype", + "namespace": "Type.Model.Inheritance.NestedDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "goblin", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "SalmonKind", + "namespace": "Type.Model.Inheritance.NestedDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "salmon", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "getModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "putModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getRecursiveModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "putRecursiveModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "getMissingDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "getWrongDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "22", "kind": "model", "name": "Fish", "namespace": "Type.Model.Inheritance.NestedDiscriminator", @@ -14,13 +176,13 @@ "doc": "This is base model for polymorphic multiple levels inheritance with a discriminator.", "decorators": [], "discriminatorProperty": { - "$id": "3", + "$id": "23", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "Discriminator property for Fish.", "type": { - "$id": "4", + "$id": "24", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,24 +195,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Fish.kind", "serializationOptions": { - "$id": "5", + "$id": "25", "json": { - "$id": "6", + "$id": "26", "name": "kind" } } }, "properties": [ { - "$ref": "3" + "$ref": "23" }, { - "$id": "7", + "$id": "27", "kind": "property", "name": "age", "serializedName": "age", "type": { - "$id": "8", + "$id": "28", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -63,18 +225,18 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Fish.age", "serializationOptions": { - "$id": "9", + "$id": "29", "json": { - "$id": "10", + "$id": "30", "name": "age" } } } ], "discriminatedSubtypes": { - "$id": "11", + "$id": "31", "shark": { - "$id": "12", + "$id": "32", "kind": "model", "name": "Shark", "namespace": "Type.Model.Inheritance.NestedDiscriminator", @@ -84,12 +246,12 @@ "discriminatorValue": "shark", "decorators": [], "discriminatorProperty": { - "$id": "13", + "$id": "33", "kind": "property", "name": "sharktype", "serializedName": "sharktype", "type": { - "$id": "14", + "$id": "34", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -102,34 +264,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Shark.sharktype", "serializationOptions": { - "$id": "15", + "$id": "35", "json": { - "$id": "16", + "$id": "36", "name": "sharktype" } } }, "baseModel": { - "$ref": "2" + "$ref": "22" }, "properties": [ { - "$id": "17", + "$id": "37", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "18", - "kind": "constant", - "valueType": { - "$id": "19", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "shark", - "decorators": [] + "$ref": "2" }, "optional": false, "readOnly": false, @@ -138,21 +290,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Shark.kind", "serializationOptions": { - "$id": "20", + "$id": "38", "json": { - "$id": "21", + "$id": "39", "name": "kind" } } }, { - "$ref": "13" + "$ref": "33" } ], "discriminatedSubtypes": { - "$id": "22", + "$id": "40", "saw": { - "$id": "23", + "$id": "41", "kind": "model", "name": "SawShark", "namespace": "Type.Model.Inheritance.NestedDiscriminator", @@ -162,26 +314,16 @@ "discriminatorValue": "saw", "decorators": [], "baseModel": { - "$ref": "12" + "$ref": "32" }, "properties": [ { - "$id": "24", + "$id": "42", "kind": "property", "name": "sharktype", "serializedName": "sharktype", "type": { - "$id": "25", - "kind": "constant", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "saw", - "decorators": [] + "$ref": "4" }, "optional": false, "readOnly": false, @@ -190,9 +332,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.SawShark.sharktype", "serializationOptions": { - "$id": "27", + "$id": "43", "json": { - "$id": "28", + "$id": "44", "name": "sharktype" } } @@ -200,7 +342,7 @@ ] }, "goblin": { - "$id": "29", + "$id": "45", "kind": "model", "name": "GoblinShark", "namespace": "Type.Model.Inheritance.NestedDiscriminator", @@ -210,26 +352,16 @@ "discriminatorValue": "goblin", "decorators": [], "baseModel": { - "$ref": "12" + "$ref": "32" }, "properties": [ { - "$id": "30", + "$id": "46", "kind": "property", "name": "sharktype", "serializedName": "sharktype", "type": { - "$id": "31", - "kind": "constant", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "goblin", - "decorators": [] + "$ref": "6" }, "optional": false, "readOnly": false, @@ -238,9 +370,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.GoblinShark.sharktype", "serializationOptions": { - "$id": "33", + "$id": "47", "json": { - "$id": "34", + "$id": "48", "name": "sharktype" } } @@ -250,7 +382,7 @@ } }, "salmon": { - "$id": "35", + "$id": "49", "kind": "model", "name": "Salmon", "namespace": "Type.Model.Inheritance.NestedDiscriminator", @@ -260,26 +392,16 @@ "discriminatorValue": "salmon", "decorators": [], "baseModel": { - "$ref": "2" + "$ref": "22" }, "properties": [ { - "$id": "36", + "$id": "50", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "37", - "kind": "constant", - "valueType": { - "$id": "38", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "salmon", - "decorators": [] + "$ref": "8" }, "optional": false, "readOnly": false, @@ -288,24 +410,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Salmon.kind", "serializationOptions": { - "$id": "39", + "$id": "51", "json": { - "$id": "40", + "$id": "52", "name": "kind" } } }, { - "$id": "41", + "$id": "53", "kind": "property", "name": "friends", "serializedName": "friends", "type": { - "$id": "42", + "$id": "54", "kind": "array", "name": "ArrayFish", "valueType": { - "$ref": "2" + "$ref": "22" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -317,30 +439,30 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Salmon.friends", "serializationOptions": { - "$id": "43", + "$id": "55", "json": { - "$id": "44", + "$id": "56", "name": "friends" } } }, { - "$id": "45", + "$id": "57", "kind": "property", "name": "hate", "serializedName": "hate", "type": { - "$id": "46", + "$id": "58", "kind": "dict", "keyType": { - "$id": "47", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "22" }, "decorators": [] }, @@ -351,20 +473,20 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Salmon.hate", "serializationOptions": { - "$id": "48", + "$id": "60", "json": { - "$id": "49", + "$id": "61", "name": "hate" } } }, { - "$id": "50", + "$id": "62", "kind": "property", "name": "partner", "serializedName": "partner", "type": { - "$ref": "2" + "$ref": "22" }, "optional": true, "readOnly": false, @@ -373,9 +495,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.Salmon.partner", "serializationOptions": { - "$id": "51", + "$id": "63", "json": { - "$id": "52", + "$id": "64", "name": "partner" } } @@ -385,54 +507,44 @@ } }, { - "$ref": "12" + "$ref": "32" }, { - "$ref": "23" + "$ref": "41" }, { - "$ref": "29" + "$ref": "45" }, { - "$ref": "35" + "$ref": "49" } ], "clients": [ { - "$id": "53", + "$id": "65", "kind": "client", "name": "NestedDiscriminatorClient", "namespace": "Type.Model.Inheritance.NestedDiscriminator", "doc": "Illustrates multiple level inheritance with multiple discriminators.", "methods": [ { - "$id": "54", + "$id": "66", "kind": "basic", "name": "getModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "55", + "$id": "67", "name": "getModel", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "56", + "$id": "68", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "57", - "kind": "constant", - "valueType": { - "$id": "58", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -447,12 +559,12 @@ ], "responses": [ { - "$id": "59", + "$id": "69", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -472,11 +584,11 @@ }, "parameters": [ { - "$id": "60", + "$id": "70", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "57" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -490,9 +602,9 @@ } ], "response": { - "$id": "61", + "$id": "71", "type": { - "$ref": "2" + "$ref": "22" } }, "isOverride": false, @@ -501,34 +613,24 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.getModel" }, { - "$id": "62", + "$id": "72", "kind": "basic", "name": "putModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "63", + "$id": "73", "name": "putModel", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "64", + "$id": "74", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "65", - "kind": "constant", - "valueType": { - "$id": "66", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -541,11 +643,11 @@ "skipUrlEncoding": false }, { - "$id": "67", + "$id": "75", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -560,7 +662,7 @@ ], "responses": [ { - "$id": "68", + "$id": "76", "statusCodes": [ 204 ], @@ -582,11 +684,11 @@ }, "parameters": [ { - "$id": "69", + "$id": "77", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -599,12 +701,12 @@ "skipUrlEncoding": false }, { - "$id": "70", + "$id": "78", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "65" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -618,7 +720,7 @@ } ], "response": { - "$id": "71" + "$id": "79" }, "isOverride": false, "generateConvenient": true, @@ -626,33 +728,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.putModel" }, { - "$id": "72", + "$id": "80", "kind": "basic", "name": "getRecursiveModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "73", + "$id": "81", "name": "getRecursiveModel", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "74", + "$id": "82", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "75", - "kind": "constant", - "valueType": { - "$id": "76", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -667,12 +759,12 @@ ], "responses": [ { - "$id": "77", + "$id": "83", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -692,11 +784,11 @@ }, "parameters": [ { - "$id": "78", + "$id": "84", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "75" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -710,9 +802,9 @@ } ], "response": { - "$id": "79", + "$id": "85", "type": { - "$ref": "2" + "$ref": "22" } }, "isOverride": false, @@ -721,34 +813,24 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.getRecursiveModel" }, { - "$id": "80", + "$id": "86", "kind": "basic", "name": "putRecursiveModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "81", + "$id": "87", "name": "putRecursiveModel", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "82", + "$id": "88", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "83", - "kind": "constant", - "valueType": { - "$id": "84", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -761,11 +843,11 @@ "skipUrlEncoding": false }, { - "$id": "85", + "$id": "89", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -780,7 +862,7 @@ ], "responses": [ { - "$id": "86", + "$id": "90", "statusCodes": [ 204 ], @@ -802,11 +884,11 @@ }, "parameters": [ { - "$id": "87", + "$id": "91", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "22" }, "location": "Body", "isApiVersion": false, @@ -819,12 +901,12 @@ "skipUrlEncoding": false }, { - "$id": "88", + "$id": "92", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "83" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -838,7 +920,7 @@ } ], "response": { - "$id": "89" + "$id": "93" }, "isOverride": false, "generateConvenient": true, @@ -846,33 +928,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.putRecursiveModel" }, { - "$id": "90", + "$id": "94", "kind": "basic", "name": "getMissingDiscriminator", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "91", + "$id": "95", "name": "getMissingDiscriminator", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "92", + "$id": "96", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "93", - "kind": "constant", - "valueType": { - "$id": "94", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -887,12 +959,12 @@ ], "responses": [ { - "$id": "95", + "$id": "97", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -912,11 +984,11 @@ }, "parameters": [ { - "$id": "96", + "$id": "98", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "93" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -930,9 +1002,9 @@ } ], "response": { - "$id": "97", + "$id": "99", "type": { - "$ref": "2" + "$ref": "22" } }, "isOverride": false, @@ -941,33 +1013,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NestedDiscriminator.getMissingDiscriminator" }, { - "$id": "98", + "$id": "100", "kind": "basic", "name": "getWrongDiscriminator", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "99", + "$id": "101", "name": "getWrongDiscriminator", "resourceName": "NestedDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "100", + "$id": "102", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "101", - "kind": "constant", - "valueType": { - "$id": "102", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -987,7 +1049,7 @@ 200 ], "bodyType": { - "$ref": "2" + "$ref": "22" }, "headers": [], "isErrorResponse": false, @@ -1011,7 +1073,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "101" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1027,7 +1089,7 @@ "response": { "$id": "105", "type": { - "$ref": "2" + "$ref": "22" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj index ba3a209f617e..6612c546c14f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/src/Type.Model.Inheritance.NotDiscriminated.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json index efb013dd1fb0..cee1315b390d 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/not-discriminated/tspCodeModel.json @@ -3,9 +3,75 @@ "name": "Type.Model.Inheritance.NotDiscriminated", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "postValidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getValidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "putValidContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "putValidContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "10", "kind": "model", "name": "Siamese", "namespace": "Type.Model.Inheritance.NotDiscriminated", @@ -14,7 +80,7 @@ "doc": "The third level model in the normal multiple levels inheritance.", "decorators": [], "baseModel": { - "$id": "3", + "$id": "11", "kind": "model", "name": "Cat", "namespace": "Type.Model.Inheritance.NotDiscriminated", @@ -23,7 +89,7 @@ "doc": "The second level model in the normal multiple levels inheritance.", "decorators": [], "baseModel": { - "$id": "4", + "$id": "12", "kind": "model", "name": "Pet", "namespace": "Type.Model.Inheritance.NotDiscriminated", @@ -33,12 +99,12 @@ "decorators": [], "properties": [ { - "$id": "5", + "$id": "13", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "6", + "$id": "14", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -51,9 +117,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.Pet.name", "serializationOptions": { - "$id": "7", + "$id": "15", "json": { - "$id": "8", + "$id": "16", "name": "name" } } @@ -62,12 +128,12 @@ }, "properties": [ { - "$id": "9", + "$id": "17", "kind": "property", "name": "age", "serializedName": "age", "type": { - "$id": "10", + "$id": "18", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -80,9 +146,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.Cat.age", "serializationOptions": { - "$id": "11", + "$id": "19", "json": { - "$id": "12", + "$id": "20", "name": "age" } } @@ -91,12 +157,12 @@ }, "properties": [ { - "$id": "13", + "$id": "21", "kind": "property", "name": "smart", "serializedName": "smart", "type": { - "$id": "14", + "$id": "22", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -109,9 +175,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.Siamese.smart", "serializationOptions": { - "$id": "15", + "$id": "23", "json": { - "$id": "16", + "$id": "24", "name": "smart" } } @@ -119,49 +185,39 @@ ] }, { - "$ref": "3" + "$ref": "11" }, { - "$ref": "4" + "$ref": "12" } ], "clients": [ { - "$id": "17", + "$id": "25", "kind": "client", "name": "NotDiscriminatedClient", "namespace": "Type.Model.Inheritance.NotDiscriminated", "doc": "Illustrates not-discriminated inheritance model.", "methods": [ { - "$id": "18", + "$id": "26", "kind": "basic", "name": "postValid", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "27", "name": "postValid", "resourceName": "NotDiscriminated", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "28", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -174,11 +230,11 @@ "skipUrlEncoding": false }, { - "$id": "23", + "$id": "29", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -193,7 +249,7 @@ ], "responses": [ { - "$id": "24", + "$id": "30", "statusCodes": [ 204 ], @@ -215,11 +271,11 @@ }, "parameters": [ { - "$id": "25", + "$id": "31", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -232,12 +288,12 @@ "skipUrlEncoding": false }, { - "$id": "26", + "$id": "32", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "21" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -251,7 +307,7 @@ } ], "response": { - "$id": "27" + "$id": "33" }, "isOverride": false, "generateConvenient": true, @@ -259,33 +315,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.postValid" }, { - "$id": "28", + "$id": "34", "kind": "basic", "name": "getValid", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "29", + "$id": "35", "name": "getValid", "resourceName": "NotDiscriminated", "accessibility": "public", "parameters": [ { - "$id": "30", + "$id": "36", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "31", - "kind": "constant", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -300,12 +346,12 @@ ], "responses": [ { - "$id": "33", + "$id": "37", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "10" }, "headers": [], "isErrorResponse": false, @@ -325,11 +371,11 @@ }, "parameters": [ { - "$id": "34", + "$id": "38", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "31" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -343,9 +389,9 @@ } ], "response": { - "$id": "35", + "$id": "39", "type": { - "$ref": "2" + "$ref": "10" } }, "isOverride": false, @@ -354,34 +400,24 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.NotDiscriminated.getValid" }, { - "$id": "36", + "$id": "40", "kind": "basic", "name": "putValid", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "37", + "$id": "41", "name": "putValid", "resourceName": "NotDiscriminated", "accessibility": "public", "parameters": [ { - "$id": "38", + "$id": "42", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "39", - "kind": "constant", - "valueType": { - "$id": "40", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -394,21 +430,11 @@ "skipUrlEncoding": false }, { - "$id": "41", + "$id": "43", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -425,7 +451,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -445,7 +471,7 @@ 200 ], "bodyType": { - "$ref": "2" + "$ref": "10" }, "headers": [], "isErrorResponse": false, @@ -472,7 +498,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -490,7 +516,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "39" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -507,7 +533,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "42" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -523,7 +549,7 @@ "response": { "$id": "49", "type": { - "$ref": "2" + "$ref": "10" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj index cd7239aa6856..506e5a2b29dc 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/src/Type.Model.Inheritance.Recursive.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json index c6de786c50f5..e80cc520d10b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/recursive/tspCodeModel.json @@ -3,9 +3,43 @@ "name": "Type.Model.Inheritance.Recursive", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "putContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "6", "kind": "model", "name": "Extension", "namespace": "Type.Model.Inheritance.Recursive", @@ -14,7 +48,7 @@ "doc": "extension", "decorators": [], "baseModel": { - "$id": "3", + "$id": "7", "kind": "model", "name": "Element", "namespace": "Type.Model.Inheritance.Recursive", @@ -24,16 +58,16 @@ "decorators": [], "properties": [ { - "$id": "4", + "$id": "8", "kind": "property", "name": "extension", "serializedName": "extension", "type": { - "$id": "5", + "$id": "9", "kind": "array", "name": "ArrayExtension", "valueType": { - "$ref": "2" + "$ref": "6" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -45,9 +79,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.Recursive.Element.extension", "serializationOptions": { - "$id": "6", + "$id": "10", "json": { - "$id": "7", + "$id": "11", "name": "extension" } } @@ -56,12 +90,12 @@ }, "properties": [ { - "$id": "8", + "$id": "12", "kind": "property", "name": "level", "serializedName": "level", "type": { - "$id": "9", + "$id": "13", "kind": "int8", "name": "int8", "crossLanguageDefinitionId": "TypeSpec.int8", @@ -74,9 +108,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.Recursive.Extension.level", "serializationOptions": { - "$id": "10", + "$id": "14", "json": { - "$id": "11", + "$id": "15", "name": "level" } } @@ -84,46 +118,36 @@ ] }, { - "$ref": "3" + "$ref": "7" } ], "clients": [ { - "$id": "12", + "$id": "16", "kind": "client", "name": "RecursiveClient", "namespace": "Type.Model.Inheritance.Recursive", "doc": "Illustrates inheritance recursion", "methods": [ { - "$id": "13", + "$id": "17", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "14", + "$id": "18", "name": "put", "resourceName": "Recursive", "accessibility": "public", "parameters": [ { - "$id": "15", + "$id": "19", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "16", - "kind": "constant", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -136,11 +160,11 @@ "skipUrlEncoding": false }, { - "$id": "18", + "$id": "20", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -155,7 +179,7 @@ ], "responses": [ { - "$id": "19", + "$id": "21", "statusCodes": [ 204 ], @@ -177,11 +201,11 @@ }, "parameters": [ { - "$id": "20", + "$id": "22", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "6" }, "location": "Body", "isApiVersion": false, @@ -194,12 +218,12 @@ "skipUrlEncoding": false }, { - "$id": "21", + "$id": "23", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "16" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -213,7 +237,7 @@ } ], "response": { - "$id": "22" + "$id": "24" }, "isOverride": false, "generateConvenient": true, @@ -221,33 +245,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.Recursive.put" }, { - "$id": "23", + "$id": "25", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "24", + "$id": "26", "name": "get", "resourceName": "Recursive", "accessibility": "public", "parameters": [ { - "$id": "25", + "$id": "27", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "26", - "kind": "constant", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -267,7 +281,7 @@ 200 ], "bodyType": { - "$ref": "2" + "$ref": "6" }, "headers": [], "isErrorResponse": false, @@ -291,7 +305,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "26" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -307,7 +321,7 @@ "response": { "$id": "30", "type": { - "$ref": "2" + "$ref": "6" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj index 2d640c1f34bc..c6a7f1332f33 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/src/Type.Model.Inheritance.SingleDiscriminator.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json index a2b8c1bfbd84..48e4812dff89 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/inheritance/single-discriminator/tspCodeModel.json @@ -3,9 +3,203 @@ "name": "Type.Model.Inheritance.SingleDiscriminator", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "SeaGullKind", + "namespace": "Type.Model.Inheritance.SingleDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "seagull", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "SparrowKind", + "namespace": "Type.Model.Inheritance.SingleDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "sparrow", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "GooseKind", + "namespace": "Type.Model.Inheritance.SingleDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "goose", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "EagleKind", + "namespace": "Type.Model.Inheritance.SingleDiscriminator", + "usage": "Input,Output,Json", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "eagle", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "TRexKind", + "namespace": "Type.Model.Inheritance.SingleDiscriminator", + "usage": "Output,Json", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "t-rex", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "getModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "putModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "getRecursiveModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "putRecursiveModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "getMissingDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "getWrongDiscriminatorContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "getLegacyModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "26", "kind": "model", "name": "Bird", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -14,12 +208,12 @@ "doc": "This is base model for polymorphic single level inheritance with a discriminator.", "decorators": [], "discriminatorProperty": { - "$id": "3", + "$id": "27", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "4", + "$id": "28", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -32,24 +226,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Bird.kind", "serializationOptions": { - "$id": "5", + "$id": "29", "json": { - "$id": "6", + "$id": "30", "name": "kind" } } }, "properties": [ { - "$ref": "3" + "$ref": "27" }, { - "$id": "7", + "$id": "31", "kind": "property", "name": "wingspan", "serializedName": "wingspan", "type": { - "$id": "8", + "$id": "32", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -62,18 +256,18 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Bird.wingspan", "serializationOptions": { - "$id": "9", + "$id": "33", "json": { - "$id": "10", + "$id": "34", "name": "wingspan" } } } ], "discriminatedSubtypes": { - "$id": "11", + "$id": "35", "seagull": { - "$id": "12", + "$id": "36", "kind": "model", "name": "SeaGull", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -83,26 +277,16 @@ "discriminatorValue": "seagull", "decorators": [], "baseModel": { - "$ref": "2" + "$ref": "26" }, "properties": [ { - "$id": "13", + "$id": "37", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "14", - "kind": "constant", - "valueType": { - "$id": "15", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "seagull", - "decorators": [] + "$ref": "2" }, "optional": false, "readOnly": false, @@ -111,9 +295,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.SeaGull.kind", "serializationOptions": { - "$id": "16", + "$id": "38", "json": { - "$id": "17", + "$id": "39", "name": "kind" } } @@ -121,7 +305,7 @@ ] }, "sparrow": { - "$id": "18", + "$id": "40", "kind": "model", "name": "Sparrow", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -131,26 +315,16 @@ "discriminatorValue": "sparrow", "decorators": [], "baseModel": { - "$ref": "2" + "$ref": "26" }, "properties": [ { - "$id": "19", + "$id": "41", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "20", - "kind": "constant", - "valueType": { - "$id": "21", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "sparrow", - "decorators": [] + "$ref": "4" }, "optional": false, "readOnly": false, @@ -159,9 +333,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Sparrow.kind", "serializationOptions": { - "$id": "22", + "$id": "42", "json": { - "$id": "23", + "$id": "43", "name": "kind" } } @@ -169,7 +343,7 @@ ] }, "goose": { - "$id": "24", + "$id": "44", "kind": "model", "name": "Goose", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -179,26 +353,16 @@ "discriminatorValue": "goose", "decorators": [], "baseModel": { - "$ref": "2" + "$ref": "26" }, "properties": [ { - "$id": "25", + "$id": "45", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "26", - "kind": "constant", - "valueType": { - "$id": "27", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "goose", - "decorators": [] + "$ref": "6" }, "optional": false, "readOnly": false, @@ -207,9 +371,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Goose.kind", "serializationOptions": { - "$id": "28", + "$id": "46", "json": { - "$id": "29", + "$id": "47", "name": "kind" } } @@ -217,7 +381,7 @@ ] }, "eagle": { - "$id": "30", + "$id": "48", "kind": "model", "name": "Eagle", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -227,26 +391,16 @@ "discriminatorValue": "eagle", "decorators": [], "baseModel": { - "$ref": "2" + "$ref": "26" }, "properties": [ { - "$id": "31", + "$id": "49", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "32", - "kind": "constant", - "valueType": { - "$id": "33", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "eagle", - "decorators": [] + "$ref": "8" }, "optional": false, "readOnly": false, @@ -255,24 +409,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Eagle.kind", "serializationOptions": { - "$id": "34", + "$id": "50", "json": { - "$id": "35", + "$id": "51", "name": "kind" } } }, { - "$id": "36", + "$id": "52", "kind": "property", "name": "friends", "serializedName": "friends", "type": { - "$id": "37", + "$id": "53", "kind": "array", "name": "ArrayBird", "valueType": { - "$ref": "2" + "$ref": "26" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -284,30 +438,30 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Eagle.friends", "serializationOptions": { - "$id": "38", + "$id": "54", "json": { - "$id": "39", + "$id": "55", "name": "friends" } } }, { - "$id": "40", + "$id": "56", "kind": "property", "name": "hate", "serializedName": "hate", "type": { - "$id": "41", + "$id": "57", "kind": "dict", "keyType": { - "$id": "42", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$ref": "2" + "$ref": "26" }, "decorators": [] }, @@ -318,20 +472,20 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Eagle.hate", "serializationOptions": { - "$id": "43", + "$id": "59", "json": { - "$id": "44", + "$id": "60", "name": "hate" } } }, { - "$id": "45", + "$id": "61", "kind": "property", "name": "partner", "serializedName": "partner", "type": { - "$ref": "2" + "$ref": "26" }, "optional": true, "readOnly": false, @@ -340,9 +494,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Eagle.partner", "serializationOptions": { - "$id": "46", + "$id": "62", "json": { - "$id": "47", + "$id": "63", "name": "partner" } } @@ -352,19 +506,19 @@ } }, { - "$ref": "12" + "$ref": "36" }, { - "$ref": "18" + "$ref": "40" }, { - "$ref": "24" + "$ref": "44" }, { - "$ref": "30" + "$ref": "48" }, { - "$id": "48", + "$id": "64", "kind": "model", "name": "Dinosaur", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -373,13 +527,13 @@ "doc": "Define a base class in the legacy way. Discriminator property is not explicitly defined in the model.", "decorators": [], "discriminatorProperty": { - "$id": "49", + "$id": "65", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "Discriminator property for Dinosaur.", "type": { - "$id": "50", + "$id": "66", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -392,24 +546,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Dinosaur.kind", "serializationOptions": { - "$id": "51", + "$id": "67", "json": { - "$id": "52", + "$id": "68", "name": "kind" } } }, "properties": [ { - "$ref": "49" + "$ref": "65" }, { - "$id": "53", + "$id": "69", "kind": "property", "name": "size", "serializedName": "size", "type": { - "$id": "54", + "$id": "70", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -422,18 +576,18 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.Dinosaur.size", "serializationOptions": { - "$id": "55", + "$id": "71", "json": { - "$id": "56", + "$id": "72", "name": "size" } } } ], "discriminatedSubtypes": { - "$id": "57", + "$id": "73", "t-rex": { - "$id": "58", + "$id": "74", "kind": "model", "name": "TRex", "namespace": "Type.Model.Inheritance.SingleDiscriminator", @@ -443,26 +597,16 @@ "discriminatorValue": "t-rex", "decorators": [], "baseModel": { - "$ref": "48" + "$ref": "64" }, "properties": [ { - "$id": "59", + "$id": "75", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "60", - "kind": "constant", - "valueType": { - "$id": "61", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "t-rex", - "decorators": [] + "$ref": "10" }, "optional": false, "readOnly": false, @@ -471,9 +615,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.TRex.kind", "serializationOptions": { - "$id": "62", + "$id": "76", "json": { - "$id": "63", + "$id": "77", "name": "kind" } } @@ -483,45 +627,35 @@ } }, { - "$ref": "58" + "$ref": "74" } ], "clients": [ { - "$id": "64", + "$id": "78", "kind": "client", "name": "SingleDiscriminatorClient", "namespace": "Type.Model.Inheritance.SingleDiscriminator", "doc": "Illustrates inheritance with single discriminator.", "methods": [ { - "$id": "65", + "$id": "79", "kind": "basic", "name": "getModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "66", + "$id": "80", "name": "getModel", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "67", + "$id": "81", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "68", - "kind": "constant", - "valueType": { - "$id": "69", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -536,12 +670,12 @@ ], "responses": [ { - "$id": "70", + "$id": "82", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -561,11 +695,11 @@ }, "parameters": [ { - "$id": "71", + "$id": "83", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "68" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -579,9 +713,9 @@ } ], "response": { - "$id": "72", + "$id": "84", "type": { - "$ref": "2" + "$ref": "26" } }, "isOverride": false, @@ -590,34 +724,24 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.getModel" }, { - "$id": "73", + "$id": "85", "kind": "basic", "name": "putModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "74", + "$id": "86", "name": "putModel", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "75", + "$id": "87", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "76", - "kind": "constant", - "valueType": { - "$id": "77", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -630,11 +754,11 @@ "skipUrlEncoding": false }, { - "$id": "78", + "$id": "88", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -649,7 +773,7 @@ ], "responses": [ { - "$id": "79", + "$id": "89", "statusCodes": [ 204 ], @@ -671,11 +795,11 @@ }, "parameters": [ { - "$id": "80", + "$id": "90", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -688,12 +812,12 @@ "skipUrlEncoding": false }, { - "$id": "81", + "$id": "91", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "76" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -707,7 +831,7 @@ } ], "response": { - "$id": "82" + "$id": "92" }, "isOverride": false, "generateConvenient": true, @@ -715,33 +839,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.putModel" }, { - "$id": "83", + "$id": "93", "kind": "basic", "name": "getRecursiveModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "84", + "$id": "94", "name": "getRecursiveModel", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "85", + "$id": "95", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "86", - "kind": "constant", - "valueType": { - "$id": "87", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -756,12 +870,12 @@ ], "responses": [ { - "$id": "88", + "$id": "96", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -781,11 +895,11 @@ }, "parameters": [ { - "$id": "89", + "$id": "97", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "86" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -799,9 +913,9 @@ } ], "response": { - "$id": "90", + "$id": "98", "type": { - "$ref": "2" + "$ref": "26" } }, "isOverride": false, @@ -810,34 +924,24 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.getRecursiveModel" }, { - "$id": "91", + "$id": "99", "kind": "basic", "name": "putRecursiveModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "92", + "$id": "100", "name": "putRecursiveModel", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "93", + "$id": "101", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "94", - "kind": "constant", - "valueType": { - "$id": "95", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -850,11 +954,11 @@ "skipUrlEncoding": false }, { - "$id": "96", + "$id": "102", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -869,7 +973,7 @@ ], "responses": [ { - "$id": "97", + "$id": "103", "statusCodes": [ 204 ], @@ -891,11 +995,11 @@ }, "parameters": [ { - "$id": "98", + "$id": "104", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "26" }, "location": "Body", "isApiVersion": false, @@ -908,12 +1012,12 @@ "skipUrlEncoding": false }, { - "$id": "99", + "$id": "105", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "94" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -927,7 +1031,7 @@ } ], "response": { - "$id": "100" + "$id": "106" }, "isOverride": false, "generateConvenient": true, @@ -935,33 +1039,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.putRecursiveModel" }, { - "$id": "101", + "$id": "107", "kind": "basic", "name": "getMissingDiscriminator", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "102", + "$id": "108", "name": "getMissingDiscriminator", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "103", + "$id": "109", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "104", - "kind": "constant", - "valueType": { - "$id": "105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -976,12 +1070,12 @@ ], "responses": [ { - "$id": "106", + "$id": "110", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -1001,11 +1095,11 @@ }, "parameters": [ { - "$id": "107", + "$id": "111", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "104" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1019,9 +1113,9 @@ } ], "response": { - "$id": "108", + "$id": "112", "type": { - "$ref": "2" + "$ref": "26" } }, "isOverride": false, @@ -1030,33 +1124,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.getMissingDiscriminator" }, { - "$id": "109", + "$id": "113", "kind": "basic", "name": "getWrongDiscriminator", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "110", + "$id": "114", "name": "getWrongDiscriminator", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "111", + "$id": "115", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "112", - "kind": "constant", - "valueType": { - "$id": "113", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1071,12 +1155,12 @@ ], "responses": [ { - "$id": "114", + "$id": "116", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "26" }, "headers": [], "isErrorResponse": false, @@ -1096,11 +1180,11 @@ }, "parameters": [ { - "$id": "115", + "$id": "117", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "112" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1114,9 +1198,9 @@ } ], "response": { - "$id": "116", + "$id": "118", "type": { - "$ref": "2" + "$ref": "26" } }, "isOverride": false, @@ -1125,33 +1209,23 @@ "crossLanguageDefinitionId": "Type.Model.Inheritance.SingleDiscriminator.getWrongDiscriminator" }, { - "$id": "117", + "$id": "119", "kind": "basic", "name": "getLegacyModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "118", + "$id": "120", "name": "getLegacyModel", "resourceName": "SingleDiscriminator", "accessibility": "public", "parameters": [ { - "$id": "119", + "$id": "121", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "120", - "kind": "constant", - "valueType": { - "$id": "121", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1171,7 +1245,7 @@ 200 ], "bodyType": { - "$ref": "48" + "$ref": "64" }, "headers": [], "isErrorResponse": false, @@ -1195,7 +1269,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "120" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1211,7 +1285,7 @@ "response": { "$id": "124", "type": { - "$ref": "48" + "$ref": "64" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj index b49c6551930d..062d72fbcf87 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/src/Type.Model.Usage.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json index 58e626d957d5..152b88361ce2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/usage/tspCodeModel.json @@ -3,9 +3,75 @@ "name": "Type.Model.Usage", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "inputContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "outputContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "inputAndOutputContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "inputAndOutputContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "10", "kind": "model", "name": "InputRecord", "namespace": "Type.Model.Usage", @@ -15,12 +81,12 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "11", "kind": "property", "name": "requiredProp", "serializedName": "requiredProp", "type": { - "$id": "4", + "$id": "12", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -33,9 +99,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Usage.InputRecord.requiredProp", "serializationOptions": { - "$id": "5", + "$id": "13", "json": { - "$id": "6", + "$id": "14", "name": "requiredProp" } } @@ -43,7 +109,7 @@ ] }, { - "$id": "7", + "$id": "15", "kind": "model", "name": "OutputRecord", "namespace": "Type.Model.Usage", @@ -53,12 +119,12 @@ "decorators": [], "properties": [ { - "$id": "8", + "$id": "16", "kind": "property", "name": "requiredProp", "serializedName": "requiredProp", "type": { - "$id": "9", + "$id": "17", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -71,9 +137,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Usage.OutputRecord.requiredProp", "serializationOptions": { - "$id": "10", + "$id": "18", "json": { - "$id": "11", + "$id": "19", "name": "requiredProp" } } @@ -81,7 +147,7 @@ ] }, { - "$id": "12", + "$id": "20", "kind": "model", "name": "InputOutputRecord", "namespace": "Type.Model.Usage", @@ -91,12 +157,12 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "21", "kind": "property", "name": "requiredProp", "serializedName": "requiredProp", "type": { - "$id": "14", + "$id": "22", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -109,9 +175,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Usage.InputOutputRecord.requiredProp", "serializationOptions": { - "$id": "15", + "$id": "23", "json": { - "$id": "16", + "$id": "24", "name": "requiredProp" } } @@ -121,41 +187,31 @@ ], "clients": [ { - "$id": "17", + "$id": "25", "kind": "client", "name": "UsageClient", "namespace": "Type.Model.Usage", "doc": "Illustrates usage of Record in different places(Operation parameters, return type or both).", "methods": [ { - "$id": "18", + "$id": "26", "kind": "basic", "name": "input", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "19", + "$id": "27", "name": "input", "resourceName": "Usage", "accessibility": "public", "parameters": [ { - "$id": "20", + "$id": "28", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "21", - "kind": "constant", - "valueType": { - "$id": "22", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -168,11 +224,11 @@ "skipUrlEncoding": false }, { - "$id": "23", + "$id": "29", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -187,7 +243,7 @@ ], "responses": [ { - "$id": "24", + "$id": "30", "statusCodes": [ 204 ], @@ -209,11 +265,11 @@ }, "parameters": [ { - "$id": "25", + "$id": "31", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "10" }, "location": "Body", "isApiVersion": false, @@ -226,12 +282,12 @@ "skipUrlEncoding": false }, { - "$id": "26", + "$id": "32", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "21" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -245,7 +301,7 @@ } ], "response": { - "$id": "27" + "$id": "33" }, "isOverride": false, "generateConvenient": true, @@ -253,33 +309,23 @@ "crossLanguageDefinitionId": "Type.Model.Usage.input" }, { - "$id": "28", + "$id": "34", "kind": "basic", "name": "output", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "29", + "$id": "35", "name": "output", "resourceName": "Usage", "accessibility": "public", "parameters": [ { - "$id": "30", + "$id": "36", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "31", - "kind": "constant", - "valueType": { - "$id": "32", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -294,12 +340,12 @@ ], "responses": [ { - "$id": "33", + "$id": "37", "statusCodes": [ 200 ], "bodyType": { - "$ref": "7" + "$ref": "15" }, "headers": [], "isErrorResponse": false, @@ -319,11 +365,11 @@ }, "parameters": [ { - "$id": "34", + "$id": "38", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "31" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -337,9 +383,9 @@ } ], "response": { - "$id": "35", + "$id": "39", "type": { - "$ref": "7" + "$ref": "15" } }, "isOverride": false, @@ -348,34 +394,24 @@ "crossLanguageDefinitionId": "Type.Model.Usage.output" }, { - "$id": "36", + "$id": "40", "kind": "basic", "name": "inputAndOutput", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "37", + "$id": "41", "name": "inputAndOutput", "resourceName": "Usage", "accessibility": "public", "parameters": [ { - "$id": "38", + "$id": "42", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "39", - "kind": "constant", - "valueType": { - "$id": "40", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -388,21 +424,11 @@ "skipUrlEncoding": false }, { - "$id": "41", + "$id": "43", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -419,7 +445,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -439,7 +465,7 @@ 200 ], "bodyType": { - "$ref": "12" + "$ref": "20" }, "headers": [], "isErrorResponse": false, @@ -466,7 +492,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -484,7 +510,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "39" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -501,7 +527,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "42" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -517,7 +543,7 @@ "response": { "$id": "49", "type": { - "$ref": "12" + "$ref": "20" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj index dc889b85de57..56cdd693a90b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/src/Type.Model.Visibility.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json index f9aa18c70a5c..794a0ce37039 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/model/visibility/tspCodeModel.json @@ -3,9 +3,155 @@ "name": "Type.Model.Visibility", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "getModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getModelContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "headModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "putModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "patchModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "postModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "deleteModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "putReadOnlyModelContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "putReadOnlyModelContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "20", "kind": "model", "name": "VisibilityModel", "namespace": "Type.Model.Visibility", @@ -15,13 +161,13 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "21", "kind": "property", "name": "readProp", "serializedName": "readProp", "doc": "Required string, illustrating a readonly property.", "type": { - "$id": "4", + "$id": "22", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34,21 +180,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.VisibilityModel.readProp", "serializationOptions": { - "$id": "5", + "$id": "23", "json": { - "$id": "6", + "$id": "24", "name": "readProp" } } }, { - "$id": "7", + "$id": "25", "kind": "query", "name": "queryProp", "serializedName": "queryProp", "doc": "Required int32, illustrating a query property.", "type": { - "$id": "8", + "$id": "26", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -58,21 +204,20 @@ "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.VisibilityModel.queryProp", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] }, { - "$id": "9", + "$id": "27", "kind": "property", "name": "createProp", "serializedName": "createProp", "doc": "Required string[], illustrating a create property.", "type": { - "$id": "10", + "$id": "28", "kind": "array", "name": "Array", "valueType": { - "$id": "11", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -88,25 +233,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.VisibilityModel.createProp", "serializationOptions": { - "$id": "12", + "$id": "30", "json": { - "$id": "13", + "$id": "31", "name": "createProp" } } }, { - "$id": "14", + "$id": "32", "kind": "property", "name": "updateProp", "serializedName": "updateProp", "doc": "Required int32[], illustrating a update property.", "type": { - "$id": "15", + "$id": "33", "kind": "array", "name": "Array1", "valueType": { - "$id": "16", + "$id": "34", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -122,21 +267,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.VisibilityModel.updateProp", "serializationOptions": { - "$id": "17", + "$id": "35", "json": { - "$id": "18", + "$id": "36", "name": "updateProp" } } }, { - "$id": "19", + "$id": "37", "kind": "property", "name": "deleteProp", "serializedName": "deleteProp", "doc": "Required bool, illustrating a delete property.", "type": { - "$id": "20", + "$id": "38", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -149,9 +294,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.VisibilityModel.deleteProp", "serializationOptions": { - "$id": "21", + "$id": "39", "json": { - "$id": "22", + "$id": "40", "name": "deleteProp" } } @@ -159,7 +304,7 @@ ] }, { - "$id": "23", + "$id": "41", "kind": "model", "name": "ReadOnlyModel", "namespace": "Type.Model.Visibility", @@ -169,20 +314,20 @@ "decorators": [], "properties": [ { - "$id": "24", + "$id": "42", "kind": "property", "name": "optionalNullableIntList", "serializedName": "optionalNullableIntList", "doc": "Optional readonly nullable int list.", "type": { - "$id": "25", + "$id": "43", "kind": "nullable", "type": { - "$id": "26", + "$id": "44", "kind": "array", "name": "Array1", "valueType": { - "$id": "27", + "$id": "45", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -200,31 +345,31 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.ReadOnlyModel.optionalNullableIntList", "serializationOptions": { - "$id": "28", + "$id": "46", "json": { - "$id": "29", + "$id": "47", "name": "optionalNullableIntList" } } }, { - "$id": "30", + "$id": "48", "kind": "property", "name": "optionalStringRecord", "serializedName": "optionalStringRecord", "doc": "Optional readonly string dictionary.", "type": { - "$id": "31", + "$id": "49", "kind": "dict", "keyType": { - "$id": "32", + "$id": "50", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "33", + "$id": "51", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -239,9 +384,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Model.Visibility.ReadOnlyModel.optionalStringRecord", "serializationOptions": { - "$id": "34", + "$id": "52", "json": { - "$id": "35", + "$id": "53", "name": "optionalStringRecord" } } @@ -251,31 +396,31 @@ ], "clients": [ { - "$id": "36", + "$id": "54", "kind": "client", "name": "VisibilityClient", "namespace": "Type.Model.Visibility", "doc": "Illustrates models with visibility properties.", "methods": [ { - "$id": "37", + "$id": "55", "kind": "basic", "name": "getModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "38", + "$id": "56", "name": "getModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "39", + "$id": "57", "name": "queryProp", "nameInRequest": "queryProp", "doc": "Required int32, illustrating a query property.", "type": { - "$id": "40", + "$id": "58", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -292,22 +437,12 @@ "skipUrlEncoding": false }, { - "$id": "41", + "$id": "59", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -320,21 +455,11 @@ "skipUrlEncoding": false }, { - "$id": "44", + "$id": "60", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "45", - "kind": "constant", - "valueType": { - "$id": "46", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -347,11 +472,11 @@ "skipUrlEncoding": false }, { - "$id": "47", + "$id": "61", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -366,12 +491,12 @@ ], "responses": [ { - "$id": "48", + "$id": "62", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "20" }, "headers": [], "isErrorResponse": false, @@ -394,11 +519,11 @@ }, "parameters": [ { - "$id": "49", + "$id": "63", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -411,12 +536,12 @@ "skipUrlEncoding": false }, { - "$id": "50", + "$id": "64", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "42" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -429,11 +554,11 @@ "skipUrlEncoding": false }, { - "$id": "51", + "$id": "65", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "45" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -447,9 +572,9 @@ } ], "response": { - "$id": "52", + "$id": "66", "type": { - "$ref": "2" + "$ref": "20" } }, "isOverride": false, @@ -458,24 +583,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.getModel" }, { - "$id": "53", + "$id": "67", "kind": "basic", "name": "headModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "54", + "$id": "68", "name": "headModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "55", + "$id": "69", "name": "queryProp", "nameInRequest": "queryProp", "doc": "Required int32, illustrating a query property.", "type": { - "$id": "56", + "$id": "70", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -492,22 +617,12 @@ "skipUrlEncoding": false }, { - "$id": "57", + "$id": "71", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "58", - "kind": "constant", - "valueType": { - "$id": "59", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -520,11 +635,11 @@ "skipUrlEncoding": false }, { - "$id": "60", + "$id": "72", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -539,7 +654,7 @@ ], "responses": [ { - "$id": "61", + "$id": "73", "statusCodes": [ 200 ], @@ -561,11 +676,11 @@ }, "parameters": [ { - "$id": "62", + "$id": "74", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -578,12 +693,12 @@ "skipUrlEncoding": false }, { - "$id": "63", + "$id": "75", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "58" + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -597,7 +712,7 @@ } ], "response": { - "$id": "64" + "$id": "76" }, "isOverride": false, "generateConvenient": true, @@ -605,34 +720,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.headModel" }, { - "$id": "65", + "$id": "77", "kind": "basic", "name": "putModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "66", + "$id": "78", "name": "putModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "67", + "$id": "79", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "68", - "kind": "constant", - "valueType": { - "$id": "69", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -645,11 +750,11 @@ "skipUrlEncoding": false }, { - "$id": "70", + "$id": "80", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -664,7 +769,7 @@ ], "responses": [ { - "$id": "71", + "$id": "81", "statusCodes": [ 204 ], @@ -686,11 +791,11 @@ }, "parameters": [ { - "$id": "72", + "$id": "82", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -703,12 +808,12 @@ "skipUrlEncoding": false }, { - "$id": "73", + "$id": "83", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "68" + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -722,7 +827,7 @@ } ], "response": { - "$id": "74" + "$id": "84" }, "isOverride": false, "generateConvenient": true, @@ -730,34 +835,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.putModel" }, { - "$id": "75", + "$id": "85", "kind": "basic", "name": "patchModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "76", + "$id": "86", "name": "patchModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "77", + "$id": "87", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "78", - "kind": "constant", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -770,11 +865,11 @@ "skipUrlEncoding": false }, { - "$id": "80", + "$id": "88", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -789,7 +884,7 @@ ], "responses": [ { - "$id": "81", + "$id": "89", "statusCodes": [ 204 ], @@ -811,11 +906,11 @@ }, "parameters": [ { - "$id": "82", + "$id": "90", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -828,12 +923,12 @@ "skipUrlEncoding": false }, { - "$id": "83", + "$id": "91", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "78" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -847,7 +942,7 @@ } ], "response": { - "$id": "84" + "$id": "92" }, "isOverride": false, "generateConvenient": true, @@ -855,34 +950,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.patchModel" }, { - "$id": "85", + "$id": "93", "kind": "basic", "name": "postModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "86", + "$id": "94", "name": "postModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "87", + "$id": "95", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "88", - "kind": "constant", - "valueType": { - "$id": "89", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -895,11 +980,11 @@ "skipUrlEncoding": false }, { - "$id": "90", + "$id": "96", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -914,7 +999,7 @@ ], "responses": [ { - "$id": "91", + "$id": "97", "statusCodes": [ 204 ], @@ -936,11 +1021,11 @@ }, "parameters": [ { - "$id": "92", + "$id": "98", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -953,12 +1038,12 @@ "skipUrlEncoding": false }, { - "$id": "93", + "$id": "99", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "88" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -972,7 +1057,7 @@ } ], "response": { - "$id": "94" + "$id": "100" }, "isOverride": false, "generateConvenient": true, @@ -980,34 +1065,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.postModel" }, { - "$id": "95", + "$id": "101", "kind": "basic", "name": "deleteModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "96", + "$id": "102", "name": "deleteModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "97", + "$id": "103", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "98", - "kind": "constant", - "valueType": { - "$id": "99", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1020,11 +1095,11 @@ "skipUrlEncoding": false }, { - "$id": "100", + "$id": "104", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -1039,7 +1114,7 @@ ], "responses": [ { - "$id": "101", + "$id": "105", "statusCodes": [ 204 ], @@ -1061,11 +1136,11 @@ }, "parameters": [ { - "$id": "102", + "$id": "106", "name": "input", "nameInRequest": "input", "type": { - "$ref": "2" + "$ref": "20" }, "location": "Body", "isApiVersion": false, @@ -1078,12 +1153,12 @@ "skipUrlEncoding": false }, { - "$id": "103", + "$id": "107", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "98" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1097,7 +1172,7 @@ } ], "response": { - "$id": "104" + "$id": "108" }, "isOverride": false, "generateConvenient": true, @@ -1105,34 +1180,24 @@ "crossLanguageDefinitionId": "Type.Model.Visibility.deleteModel" }, { - "$id": "105", + "$id": "109", "kind": "basic", "name": "putReadOnlyModel", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "106", + "$id": "110", "name": "putReadOnlyModel", "resourceName": "Visibility", "accessibility": "public", "parameters": [ { - "$id": "107", + "$id": "111", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "108", - "kind": "constant", - "valueType": { - "$id": "109", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1145,21 +1210,11 @@ "skipUrlEncoding": false }, { - "$id": "110", + "$id": "112", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "111", - "kind": "constant", - "valueType": { - "$id": "112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1176,7 +1231,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "23" + "$ref": "41" }, "location": "Body", "isApiVersion": false, @@ -1196,7 +1251,7 @@ 200 ], "bodyType": { - "$ref": "23" + "$ref": "41" }, "headers": [], "isErrorResponse": false, @@ -1223,7 +1278,7 @@ "name": "input", "nameInRequest": "input", "type": { - "$ref": "23" + "$ref": "41" }, "location": "Body", "isApiVersion": false, @@ -1241,7 +1296,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "108" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1258,7 +1313,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "111" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1274,7 +1329,7 @@ "response": { "$id": "118", "type": { - "$ref": "23" + "$ref": "41" } }, "isOverride": false, diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs index 65375f5d0e03..d1cc0ac63d6a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0.cs @@ -11,7 +11,7 @@ public partial class WidgetData0 { public WidgetData0(string fooProp) => throw null; - public WidgetData0Kind Kind => throw null; + public string Kind => throw null; public string FooProp { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs deleted file mode 100644 index 162bb19ec119..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData0Kind.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.AdditionalProperties -{ - public readonly partial struct WidgetData0Kind : IEquatable - { - public WidgetData0Kind(string value) => throw null; - - public static WidgetData0Kind Kind0 => throw null; - - public static bool operator ==(WidgetData0Kind left, WidgetData0Kind right) => throw null; - - public static bool operator !=(WidgetData0Kind left, WidgetData0Kind right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator WidgetData0Kind(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(WidgetData0Kind other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs index 6777a117f7fc..fd9adfb8309a 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1.cs @@ -13,7 +13,7 @@ public partial class WidgetData1 { public WidgetData1(DateTimeOffset start) => throw null; - public WidgetData1Kind Kind => throw null; + public string Kind => throw null; public DateTimeOffset Start { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs deleted file mode 100644 index 7b742f2f3a2a..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData1Kind.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.AdditionalProperties -{ - public readonly partial struct WidgetData1Kind : IEquatable - { - public WidgetData1Kind(string value) => throw null; - - public static WidgetData1Kind Kind1 => throw null; - - public static bool operator ==(WidgetData1Kind left, WidgetData1Kind right) => throw null; - - public static bool operator !=(WidgetData1Kind left, WidgetData1Kind right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator WidgetData1Kind(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(WidgetData1Kind other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs index 3c0c2c327165..d920d7339276 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2.cs @@ -11,7 +11,7 @@ public partial class WidgetData2 { public WidgetData2(string start) => throw null; - public WidgetData2Kind Kind => throw null; + public string Kind => throw null; public string Start { diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs deleted file mode 100644 index 34de432c3ff5..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/Models/WidgetData2Kind.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.AdditionalProperties -{ - public readonly partial struct WidgetData2Kind : IEquatable - { - public WidgetData2Kind(string value) => throw null; - - public static WidgetData2Kind Kind1 => throw null; - - public static bool operator ==(WidgetData2Kind left, WidgetData2Kind right) => throw null; - - public static bool operator !=(WidgetData2Kind left, WidgetData2Kind right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator WidgetData2Kind(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(WidgetData2Kind other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs index b2aa73469ed8..84db2ff0ab71 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Generated/TypePropertyAdditionalPropertiesModelFactory.cs @@ -76,13 +76,13 @@ public static partial class TypePropertyAdditionalPropertiesModelFactory public static SpreadRecordForNonDiscriminatedUnion SpreadRecordForNonDiscriminatedUnion(string name = default, IDictionary additionalProperties = default) => throw null; - public static WidgetData0 WidgetData0(WidgetData0Kind kind = default, string fooProp = default) => throw null; + public static WidgetData0 WidgetData0(string kind = default, string fooProp = default) => throw null; - public static WidgetData1 WidgetData1(WidgetData1Kind kind = default, DateTimeOffset start = default, DateTimeOffset? end = default) => throw null; + public static WidgetData1 WidgetData1(string kind = default, DateTimeOffset start = default, DateTimeOffset? end = default) => throw null; public static SpreadRecordForNonDiscriminatedUnion2 SpreadRecordForNonDiscriminatedUnion2(string name = default, IDictionary additionalProperties = default) => throw null; - public static WidgetData2 WidgetData2(WidgetData2Kind kind = default, string start = default) => throw null; + public static WidgetData2 WidgetData2(string kind = default, string start = default) => throw null; public static SpreadRecordForNonDiscriminatedUnion3 SpreadRecordForNonDiscriminatedUnion3(string name = default, IDictionary additionalProperties = default) => throw null; } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj index 172eaffddc35..8779afa68c25 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/src/Type.Property.AdditionalProperties.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json index 1f7f2f6a87f4..bf7aa86d6272 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/additional-properties/tspCodeModel.json @@ -2,113 +2,1084 @@ "$id": "1", "name": "Type.Property.AdditionalProperties", "apiVersions": [], - "enums": [ + "enums": [], + "constants": [ { "$id": "2", - "kind": "enum", - "name": "WidgetData0_kind", + "kind": "constant", + "name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerivedKind", + "namespace": "Type.Property.AdditionalProperties", + "usage": "Input,Output,Json", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "derived", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "IsUnknownAdditionalPropertiesDiscriminatedDerivedKind", + "namespace": "Type.Property.AdditionalProperties", + "usage": "Input,Output,Json", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "derived", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "WidgetData0Kind", + "namespace": "Type.Property.AdditionalProperties", + "usage": "Input,Output,Json", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "kind0", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "WidgetData1Kind", + "namespace": "Type.Property.AdditionalProperties", + "usage": "Input,Output,Json", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "kind1", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "WidgetData2Kind", + "namespace": "Type.Property.AdditionalProperties", + "usage": "Input,Output,Json", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "kind1", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "putContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "putContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "putContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "putContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "putContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "putContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "putContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "putContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "putContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "putContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "putContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "getContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "putContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "getContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "putContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "getContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "putContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "getContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "putContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "getContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "putContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "getContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "putContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "getContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "putContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "getContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "86", + "kind": "constant", + "name": "putContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "88", + "kind": "constant", + "name": "getContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "90", + "kind": "constant", + "name": "putContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "92", + "kind": "constant", + "name": "getContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "94", + "kind": "constant", + "name": "putContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "96", + "kind": "constant", + "name": "getContentType21", + "namespace": "", + "usage": "None", "valueType": { - "$id": "3", + "$id": "97", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "kind0", - "value": "kind0", - "doc": "kind0", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.AdditionalProperties", - "doc": "The WidgetData0_kind", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "5", - "kind": "enum", - "name": "WidgetData1_kind", + "$id": "98", + "kind": "constant", + "name": "putContentType21", + "namespace": "", + "usage": "None", "valueType": { - "$id": "6", + "$id": "99", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "7", - "kind": "enumvalue", - "name": "kind1", - "value": "kind1", - "doc": "kind1", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.AdditionalProperties", - "doc": "The WidgetData1_kind", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "8", - "kind": "enum", - "name": "WidgetData2_kind", + "$id": "100", + "kind": "constant", + "name": "getContentType22", + "namespace": "", + "usage": "None", "valueType": { - "$id": "9", + "$id": "101", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "10", - "kind": "enumvalue", - "name": "kind1", - "value": "kind1", - "doc": "kind1", - "valueType": { - "$ref": "9" - }, - "enumType": { - "$ref": "8" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.AdditionalProperties", - "doc": "The WidgetData2_kind", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", + "decorators": [] + }, + { + "$id": "102", + "kind": "constant", + "name": "putContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "104", + "kind": "constant", + "name": "getContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "106", + "kind": "constant", + "name": "putContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "108", + "kind": "constant", + "name": "getContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "110", + "kind": "constant", + "name": "putContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "112", + "kind": "constant", + "name": "getContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "114", + "kind": "constant", + "name": "putContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "116", + "kind": "constant", + "name": "getContentType26", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "118", + "kind": "constant", + "name": "putContentType26", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "120", + "kind": "constant", + "name": "getContentType27", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "122", + "kind": "constant", + "name": "putContentType27", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "124", + "kind": "constant", + "name": "getContentType28", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "126", + "kind": "constant", + "name": "putContentType28", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "128", + "kind": "constant", + "name": "getContentType29", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "130", + "kind": "constant", + "name": "putContentType29", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "132", + "kind": "constant", + "name": "getContentType30", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "134", + "kind": "constant", + "name": "putContentType30", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "11", + "$id": "136", "kind": "model", "name": "ExtendsUnknownAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -117,7 +1088,7 @@ "doc": "The model extends from Record type.", "decorators": [], "additionalProperties": { - "$id": "12", + "$id": "137", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -125,13 +1096,13 @@ }, "properties": [ { - "$id": "13", + "$id": "138", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "14", + "$id": "139", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -144,9 +1115,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalProperties.name", "serializationOptions": { - "$id": "15", + "$id": "140", "json": { - "$id": "16", + "$id": "141", "name": "name" } } @@ -154,7 +1125,7 @@ ] }, { - "$id": "17", + "$id": "142", "kind": "model", "name": "ExtendsUnknownAdditionalPropertiesDerived", "namespace": "Type.Property.AdditionalProperties", @@ -163,17 +1134,17 @@ "doc": "The model extends from a type that extends from Record.", "decorators": [], "baseModel": { - "$ref": "11" + "$ref": "136" }, "properties": [ { - "$id": "18", + "$id": "143", "kind": "property", "name": "index", "serializedName": "index", "doc": "The index property", "type": { - "$id": "19", + "$id": "144", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -186,21 +1157,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDerived.index", "serializationOptions": { - "$id": "20", + "$id": "145", "json": { - "$id": "21", + "$id": "146", "name": "index" } } }, { - "$id": "22", + "$id": "147", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age property", "type": { - "$id": "23", + "$id": "148", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -213,9 +1184,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDerived.age", "serializationOptions": { - "$id": "24", + "$id": "149", "json": { - "$id": "25", + "$id": "150", "name": "age" } } @@ -223,7 +1194,7 @@ ] }, { - "$id": "26", + "$id": "151", "kind": "model", "name": "ExtendsUnknownAdditionalPropertiesDiscriminated", "namespace": "Type.Property.AdditionalProperties", @@ -232,20 +1203,20 @@ "doc": "The model extends from Record with a discriminator.", "decorators": [], "additionalProperties": { - "$id": "27", + "$id": "152", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] }, "discriminatorProperty": { - "$id": "28", + "$id": "153", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "The discriminator", "type": { - "$id": "29", + "$id": "154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -258,22 +1229,22 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminated.kind", "serializationOptions": { - "$id": "30", + "$id": "155", "json": { - "$id": "31", + "$id": "156", "name": "kind" } } }, "properties": [ { - "$id": "32", + "$id": "157", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "33", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -286,21 +1257,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminated.name", "serializationOptions": { - "$id": "34", + "$id": "159", "json": { - "$id": "35", + "$id": "160", "name": "name" } } }, { - "$ref": "28" + "$ref": "153" } ], "discriminatedSubtypes": { - "$id": "36", + "$id": "161", "derived": { - "$id": "37", + "$id": "162", "kind": "model", "name": "ExtendsUnknownAdditionalPropertiesDiscriminatedDerived", "namespace": "Type.Property.AdditionalProperties", @@ -310,26 +1281,16 @@ "discriminatorValue": "derived", "decorators": [], "baseModel": { - "$ref": "26" + "$ref": "151" }, "properties": [ { - "$id": "38", + "$id": "163", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "39", - "kind": "constant", - "valueType": { - "$id": "40", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "derived", - "decorators": [] + "$ref": "2" }, "optional": false, "readOnly": false, @@ -338,21 +1299,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.kind", "serializationOptions": { - "$id": "41", + "$id": "164", "json": { - "$id": "42", + "$id": "165", "name": "kind" } } }, { - "$id": "43", + "$id": "166", "kind": "property", "name": "index", "serializedName": "index", "doc": "The index property", "type": { - "$id": "44", + "$id": "167", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -365,21 +1326,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.index", "serializationOptions": { - "$id": "45", + "$id": "168", "json": { - "$id": "46", + "$id": "169", "name": "index" } } }, { - "$id": "47", + "$id": "170", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age property", "type": { - "$id": "48", + "$id": "171", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -392,9 +1353,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownAdditionalPropertiesDiscriminatedDerived.age", "serializationOptions": { - "$id": "49", + "$id": "172", "json": { - "$id": "50", + "$id": "173", "name": "age" } } @@ -404,10 +1365,10 @@ } }, { - "$ref": "37" + "$ref": "162" }, { - "$id": "51", + "$id": "174", "kind": "model", "name": "IsUnknownAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -416,7 +1377,7 @@ "doc": "The model is from Record type.", "decorators": [], "additionalProperties": { - "$id": "52", + "$id": "175", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -424,13 +1385,13 @@ }, "properties": [ { - "$id": "53", + "$id": "176", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "54", + "$id": "177", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -443,9 +1404,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalProperties.name", "serializationOptions": { - "$id": "55", + "$id": "178", "json": { - "$id": "56", + "$id": "179", "name": "name" } } @@ -453,7 +1414,7 @@ ] }, { - "$id": "57", + "$id": "180", "kind": "model", "name": "IsUnknownAdditionalPropertiesDerived", "namespace": "Type.Property.AdditionalProperties", @@ -462,17 +1423,17 @@ "doc": "The model extends from a type that is Record type", "decorators": [], "baseModel": { - "$ref": "51" + "$ref": "174" }, "properties": [ { - "$id": "58", + "$id": "181", "kind": "property", "name": "index", "serializedName": "index", "doc": "The index property", "type": { - "$id": "59", + "$id": "182", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -485,21 +1446,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDerived.index", "serializationOptions": { - "$id": "60", + "$id": "183", "json": { - "$id": "61", + "$id": "184", "name": "index" } } }, { - "$id": "62", + "$id": "185", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age property", "type": { - "$id": "63", + "$id": "186", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -512,9 +1473,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDerived.age", "serializationOptions": { - "$id": "64", + "$id": "187", "json": { - "$id": "65", + "$id": "188", "name": "age" } } @@ -522,7 +1483,7 @@ ] }, { - "$id": "66", + "$id": "189", "kind": "model", "name": "IsUnknownAdditionalPropertiesDiscriminated", "namespace": "Type.Property.AdditionalProperties", @@ -531,20 +1492,20 @@ "doc": "The model is Record with a discriminator.", "decorators": [], "additionalProperties": { - "$id": "67", + "$id": "190", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", "decorators": [] }, "discriminatorProperty": { - "$id": "68", + "$id": "191", "kind": "property", "name": "kind", "serializedName": "kind", "doc": "The discriminator", "type": { - "$id": "69", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -557,22 +1518,22 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminated.kind", "serializationOptions": { - "$id": "70", + "$id": "193", "json": { - "$id": "71", + "$id": "194", "name": "kind" } } }, "properties": [ { - "$id": "72", + "$id": "195", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "73", + "$id": "196", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -585,21 +1546,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminated.name", "serializationOptions": { - "$id": "74", + "$id": "197", "json": { - "$id": "75", + "$id": "198", "name": "name" } } }, { - "$ref": "68" + "$ref": "191" } ], "discriminatedSubtypes": { - "$id": "76", + "$id": "199", "derived": { - "$id": "77", + "$id": "200", "kind": "model", "name": "IsUnknownAdditionalPropertiesDiscriminatedDerived", "namespace": "Type.Property.AdditionalProperties", @@ -609,26 +1570,16 @@ "discriminatorValue": "derived", "decorators": [], "baseModel": { - "$ref": "66" + "$ref": "189" }, "properties": [ { - "$id": "78", + "$id": "201", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "79", - "kind": "constant", - "valueType": { - "$id": "80", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "derived", - "decorators": [] + "$ref": "4" }, "optional": false, "readOnly": false, @@ -637,21 +1588,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.kind", "serializationOptions": { - "$id": "81", + "$id": "202", "json": { - "$id": "82", + "$id": "203", "name": "kind" } } }, { - "$id": "83", + "$id": "204", "kind": "property", "name": "index", "serializedName": "index", "doc": "The index property", "type": { - "$id": "84", + "$id": "205", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -664,21 +1615,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.index", "serializationOptions": { - "$id": "85", + "$id": "206", "json": { - "$id": "86", + "$id": "207", "name": "index" } } }, { - "$id": "87", + "$id": "208", "kind": "property", "name": "age", "serializedName": "age", "doc": "The age property", "type": { - "$id": "88", + "$id": "209", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -691,9 +1642,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownAdditionalPropertiesDiscriminatedDerived.age", "serializationOptions": { - "$id": "89", + "$id": "210", "json": { - "$id": "90", + "$id": "211", "name": "age" } } @@ -703,10 +1654,10 @@ } }, { - "$ref": "77" + "$ref": "200" }, { - "$id": "91", + "$id": "212", "kind": "model", "name": "ExtendsStringAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -715,7 +1666,7 @@ "doc": "The model extends from Record type.", "decorators": [], "additionalProperties": { - "$id": "92", + "$id": "213", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -723,13 +1674,13 @@ }, "properties": [ { - "$id": "93", + "$id": "214", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "94", + "$id": "215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -742,9 +1693,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsStringAdditionalProperties.name", "serializationOptions": { - "$id": "95", + "$id": "216", "json": { - "$id": "96", + "$id": "217", "name": "name" } } @@ -752,7 +1703,7 @@ ] }, { - "$id": "97", + "$id": "218", "kind": "model", "name": "IsStringAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -761,7 +1712,7 @@ "doc": "The model is from Record type.", "decorators": [], "additionalProperties": { - "$id": "98", + "$id": "219", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -769,13 +1720,13 @@ }, "properties": [ { - "$id": "99", + "$id": "220", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "100", + "$id": "221", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -788,9 +1739,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsStringAdditionalProperties.name", "serializationOptions": { - "$id": "101", + "$id": "222", "json": { - "$id": "102", + "$id": "223", "name": "name" } } @@ -798,7 +1749,7 @@ ] }, { - "$id": "103", + "$id": "224", "kind": "model", "name": "SpreadStringRecord", "namespace": "Type.Property.AdditionalProperties", @@ -807,7 +1758,7 @@ "doc": "The model spread Record with the same known property type", "decorators": [], "additionalProperties": { - "$id": "104", + "$id": "225", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -815,13 +1766,13 @@ }, "properties": [ { - "$id": "105", + "$id": "226", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "106", + "$id": "227", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -834,9 +1785,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadStringRecord.name", "serializationOptions": { - "$id": "107", + "$id": "228", "json": { - "$id": "108", + "$id": "229", "name": "name" } } @@ -844,7 +1795,7 @@ ] }, { - "$id": "109", + "$id": "230", "kind": "model", "name": "ExtendsFloatAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -853,7 +1804,7 @@ "doc": "The model extends from Record type.", "decorators": [], "additionalProperties": { - "$id": "110", + "$id": "231", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -861,13 +1812,13 @@ }, "properties": [ { - "$id": "111", + "$id": "232", "kind": "property", "name": "id", "serializedName": "id", "doc": "The id property", "type": { - "$id": "112", + "$id": "233", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -880,9 +1831,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloatAdditionalProperties.id", "serializationOptions": { - "$id": "113", + "$id": "234", "json": { - "$id": "114", + "$id": "235", "name": "id" } } @@ -890,7 +1841,7 @@ ] }, { - "$id": "115", + "$id": "236", "kind": "model", "name": "IsFloatAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -899,7 +1850,7 @@ "doc": "The model is from Record type.", "decorators": [], "additionalProperties": { - "$id": "116", + "$id": "237", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -907,13 +1858,13 @@ }, "properties": [ { - "$id": "117", + "$id": "238", "kind": "property", "name": "id", "serializedName": "id", "doc": "The id property", "type": { - "$id": "118", + "$id": "239", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -926,9 +1877,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloatAdditionalProperties.id", "serializationOptions": { - "$id": "119", + "$id": "240", "json": { - "$id": "120", + "$id": "241", "name": "id" } } @@ -936,7 +1887,7 @@ ] }, { - "$id": "121", + "$id": "242", "kind": "model", "name": "SpreadFloatRecord", "namespace": "Type.Property.AdditionalProperties", @@ -945,7 +1896,7 @@ "doc": "The model spread Record with the same known property type", "decorators": [], "additionalProperties": { - "$id": "122", + "$id": "243", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -953,13 +1904,13 @@ }, "properties": [ { - "$id": "123", + "$id": "244", "kind": "property", "name": "id", "serializedName": "id", "doc": "The id property", "type": { - "$id": "124", + "$id": "245", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -972,9 +1923,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloatRecord.id", "serializationOptions": { - "$id": "125", + "$id": "246", "json": { - "$id": "126", + "$id": "247", "name": "id" } } @@ -982,7 +1933,7 @@ ] }, { - "$id": "127", + "$id": "248", "kind": "model", "name": "ExtendsModelAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -991,7 +1942,7 @@ "doc": "The model extends from Record type.", "decorators": [], "additionalProperties": { - "$id": "128", + "$id": "249", "kind": "model", "name": "ModelForRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1001,13 +1952,13 @@ "decorators": [], "properties": [ { - "$id": "129", + "$id": "250", "kind": "property", "name": "state", "serializedName": "state", "doc": "The state property", "type": { - "$id": "130", + "$id": "251", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1020,9 +1971,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ModelForRecord.state", "serializationOptions": { - "$id": "131", + "$id": "252", "json": { - "$id": "132", + "$id": "253", "name": "state" } } @@ -1031,12 +1982,12 @@ }, "properties": [ { - "$id": "133", + "$id": "254", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$ref": "128" + "$ref": "249" }, "optional": false, "readOnly": false, @@ -1045,9 +1996,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelAdditionalProperties.knownProp", "serializationOptions": { - "$id": "134", + "$id": "255", "json": { - "$id": "135", + "$id": "256", "name": "knownProp" } } @@ -1055,10 +2006,10 @@ ] }, { - "$ref": "128" + "$ref": "249" }, { - "$id": "136", + "$id": "257", "kind": "model", "name": "IsModelAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -1067,16 +2018,16 @@ "doc": "The model is from Record type.", "decorators": [], "additionalProperties": { - "$ref": "128" + "$ref": "249" }, "properties": [ { - "$id": "137", + "$id": "258", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$ref": "128" + "$ref": "249" }, "optional": false, "readOnly": false, @@ -1085,9 +2036,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelAdditionalProperties.knownProp", "serializationOptions": { - "$id": "138", + "$id": "259", "json": { - "$id": "139", + "$id": "260", "name": "knownProp" } } @@ -1095,7 +2046,7 @@ ] }, { - "$id": "140", + "$id": "261", "kind": "model", "name": "SpreadModelRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1104,16 +2055,16 @@ "doc": "The model spread Record with the same known property type", "decorators": [], "additionalProperties": { - "$ref": "128" + "$ref": "249" }, "properties": [ { - "$id": "141", + "$id": "262", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$ref": "128" + "$ref": "249" }, "optional": false, "readOnly": false, @@ -1122,9 +2073,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelRecord.knownProp", "serializationOptions": { - "$id": "142", + "$id": "263", "json": { - "$id": "143", + "$id": "264", "name": "knownProp" } } @@ -1132,7 +2083,7 @@ ] }, { - "$id": "144", + "$id": "265", "kind": "model", "name": "ExtendsModelArrayAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -1141,27 +2092,27 @@ "doc": "The model extends from Record type.", "decorators": [], "additionalProperties": { - "$id": "145", + "$id": "266", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, "properties": [ { - "$id": "146", + "$id": "267", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$id": "147", + "$id": "268", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1173,9 +2124,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArrayAdditionalProperties.knownProp", "serializationOptions": { - "$id": "148", + "$id": "269", "json": { - "$id": "149", + "$id": "270", "name": "knownProp" } } @@ -1183,7 +2134,7 @@ ] }, { - "$id": "150", + "$id": "271", "kind": "model", "name": "IsModelArrayAdditionalProperties", "namespace": "Type.Property.AdditionalProperties", @@ -1192,27 +2143,27 @@ "doc": "The model is from Record type.", "decorators": [], "additionalProperties": { - "$id": "151", + "$id": "272", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, "properties": [ { - "$id": "152", + "$id": "273", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$id": "153", + "$id": "274", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1224,9 +2175,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArrayAdditionalProperties.knownProp", "serializationOptions": { - "$id": "154", + "$id": "275", "json": { - "$id": "155", + "$id": "276", "name": "knownProp" } } @@ -1234,7 +2185,7 @@ ] }, { - "$id": "156", + "$id": "277", "kind": "model", "name": "SpreadModelArrayRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1242,27 +2193,27 @@ "usage": "Input,Output,Json", "decorators": [], "additionalProperties": { - "$id": "157", + "$id": "278", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, "properties": [ { - "$id": "158", + "$id": "279", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$id": "159", + "$id": "280", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1274,9 +2225,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArrayRecord.knownProp", "serializationOptions": { - "$id": "160", + "$id": "281", "json": { - "$id": "161", + "$id": "282", "name": "knownProp" } } @@ -1284,7 +2235,7 @@ ] }, { - "$id": "162", + "$id": "283", "kind": "model", "name": "DifferentSpreadStringRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1293,7 +2244,7 @@ "doc": "The model spread Record with the different known property type", "decorators": [], "additionalProperties": { - "$id": "163", + "$id": "284", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1301,13 +2252,13 @@ }, "properties": [ { - "$id": "164", + "$id": "285", "kind": "property", "name": "id", "serializedName": "id", "doc": "The name property", "type": { - "$id": "165", + "$id": "286", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1320,9 +2271,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringRecord.id", "serializationOptions": { - "$id": "166", + "$id": "287", "json": { - "$id": "167", + "$id": "288", "name": "id" } } @@ -1330,7 +2281,7 @@ ] }, { - "$id": "168", + "$id": "289", "kind": "model", "name": "DifferentSpreadFloatRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1339,7 +2290,7 @@ "doc": "The model spread Record with the different known property type", "decorators": [], "additionalProperties": { - "$id": "169", + "$id": "290", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1347,13 +2298,13 @@ }, "properties": [ { - "$id": "170", + "$id": "291", "kind": "property", "name": "name", "serializedName": "name", "doc": "The id property", "type": { - "$id": "171", + "$id": "292", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1366,9 +2317,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatRecord.name", "serializationOptions": { - "$id": "172", + "$id": "293", "json": { - "$id": "173", + "$id": "294", "name": "name" } } @@ -1376,7 +2327,7 @@ ] }, { - "$id": "174", + "$id": "295", "kind": "model", "name": "DifferentSpreadModelRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1385,16 +2336,16 @@ "doc": "The model spread Record with the different known property type", "decorators": [], "additionalProperties": { - "$ref": "128" + "$ref": "249" }, "properties": [ { - "$id": "175", + "$id": "296", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$id": "176", + "$id": "297", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1407,9 +2358,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelRecord.knownProp", "serializationOptions": { - "$id": "177", + "$id": "298", "json": { - "$id": "178", + "$id": "299", "name": "knownProp" } } @@ -1417,7 +2368,7 @@ ] }, { - "$id": "179", + "$id": "300", "kind": "model", "name": "DifferentSpreadModelArrayRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1426,23 +2377,23 @@ "doc": "The model spread Record with the different known property type", "decorators": [], "additionalProperties": { - "$id": "180", + "$id": "301", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, "properties": [ { - "$id": "181", + "$id": "302", "kind": "property", "name": "knownProp", "serializedName": "knownProp", "type": { - "$id": "182", + "$id": "303", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1455,9 +2406,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayRecord.knownProp", "serializationOptions": { - "$id": "183", + "$id": "304", "json": { - "$id": "184", + "$id": "305", "name": "knownProp" } } @@ -1465,7 +2416,7 @@ ] }, { - "$id": "185", + "$id": "306", "kind": "model", "name": "DifferentSpreadStringDerived", "namespace": "Type.Property.AdditionalProperties", @@ -1474,17 +2425,17 @@ "doc": "The model extends from a model that spread Record with the different known property type", "decorators": [], "baseModel": { - "$ref": "162" + "$ref": "283" }, "properties": [ { - "$id": "186", + "$id": "307", "kind": "property", "name": "derivedProp", "serializedName": "derivedProp", "doc": "The index property", "type": { - "$id": "187", + "$id": "308", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1497,9 +2448,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadStringDerived.derivedProp", "serializationOptions": { - "$id": "188", + "$id": "309", "json": { - "$id": "189", + "$id": "310", "name": "derivedProp" } } @@ -1507,7 +2458,7 @@ ] }, { - "$id": "190", + "$id": "311", "kind": "model", "name": "DifferentSpreadFloatDerived", "namespace": "Type.Property.AdditionalProperties", @@ -1516,17 +2467,17 @@ "doc": "The model extends from a model that spread Record with the different known property type", "decorators": [], "baseModel": { - "$ref": "168" + "$ref": "289" }, "properties": [ { - "$id": "191", + "$id": "312", "kind": "property", "name": "derivedProp", "serializedName": "derivedProp", "doc": "The index property", "type": { - "$id": "192", + "$id": "313", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1539,9 +2490,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadFloatDerived.derivedProp", "serializationOptions": { - "$id": "193", + "$id": "314", "json": { - "$id": "194", + "$id": "315", "name": "derivedProp" } } @@ -1549,7 +2500,7 @@ ] }, { - "$id": "195", + "$id": "316", "kind": "model", "name": "DifferentSpreadModelDerived", "namespace": "Type.Property.AdditionalProperties", @@ -1558,17 +2509,17 @@ "doc": "The model extends from a model that spread Record with the different known property type", "decorators": [], "baseModel": { - "$ref": "174" + "$ref": "295" }, "properties": [ { - "$id": "196", + "$id": "317", "kind": "property", "name": "derivedProp", "serializedName": "derivedProp", "doc": "The index property", "type": { - "$ref": "128" + "$ref": "249" }, "optional": false, "readOnly": false, @@ -1577,9 +2528,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelDerived.derivedProp", "serializationOptions": { - "$id": "197", + "$id": "318", "json": { - "$id": "198", + "$id": "319", "name": "derivedProp" } } @@ -1587,7 +2538,7 @@ ] }, { - "$id": "199", + "$id": "320", "kind": "model", "name": "DifferentSpreadModelArrayDerived", "namespace": "Type.Property.AdditionalProperties", @@ -1596,21 +2547,21 @@ "doc": "The model extends from a model that spread Record with the different known property type", "decorators": [], "baseModel": { - "$ref": "179" + "$ref": "300" }, "properties": [ { - "$id": "200", + "$id": "321", "kind": "property", "name": "derivedProp", "serializedName": "derivedProp", "doc": "The index property", "type": { - "$id": "201", + "$id": "322", "kind": "array", "name": "ArrayModelForRecord", "valueType": { - "$ref": "128" + "$ref": "249" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1622,9 +2573,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.DifferentSpreadModelArrayDerived.derivedProp", "serializationOptions": { - "$id": "202", + "$id": "323", "json": { - "$id": "203", + "$id": "324", "name": "derivedProp" } } @@ -1632,7 +2583,7 @@ ] }, { - "$id": "204", + "$id": "325", "kind": "model", "name": "MultipleSpreadRecord", "namespace": "Type.Property.AdditionalProperties", @@ -1641,19 +2592,19 @@ "doc": "The model spread Record and Record", "decorators": [], "additionalProperties": { - "$id": "205", + "$id": "326", "kind": "union", "name": "MultipleSpreadRecordAdditionalProperty", "variantTypes": [ { - "$id": "206", + "$id": "327", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "207", + "$id": "328", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1665,13 +2616,13 @@ }, "properties": [ { - "$id": "208", + "$id": "329", "kind": "property", "name": "flag", "serializedName": "flag", "doc": "The name property", "type": { - "$id": "209", + "$id": "330", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1684,9 +2635,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpreadRecord.flag", "serializationOptions": { - "$id": "210", + "$id": "331", "json": { - "$id": "211", + "$id": "332", "name": "flag" } } @@ -1694,7 +2645,7 @@ ] }, { - "$id": "212", + "$id": "333", "kind": "model", "name": "SpreadRecordForUnion", "namespace": "Type.Property.AdditionalProperties", @@ -1703,19 +2654,19 @@ "doc": "The model spread Record", "decorators": [], "additionalProperties": { - "$id": "213", + "$id": "334", "kind": "union", "name": "SpreadRecordForUnionAdditionalProperty", "variantTypes": [ { - "$id": "214", + "$id": "335", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "215", + "$id": "336", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -1727,13 +2678,13 @@ }, "properties": [ { - "$id": "216", + "$id": "337", "kind": "property", "name": "flag", "serializedName": "flag", "doc": "The name property", "type": { - "$id": "217", + "$id": "338", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1746,9 +2697,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForUnion.flag", "serializationOptions": { - "$id": "218", + "$id": "339", "json": { - "$id": "219", + "$id": "340", "name": "flag" } } @@ -1756,7 +2707,7 @@ ] }, { - "$id": "220", + "$id": "341", "kind": "model", "name": "SpreadRecordForNonDiscriminatedUnion", "namespace": "Type.Property.AdditionalProperties", @@ -1765,12 +2716,12 @@ "doc": "The model spread Record", "decorators": [], "additionalProperties": { - "$id": "221", + "$id": "342", "kind": "union", "name": "SpreadRecordForNonDiscriminatedUnionAdditionalProperty", "variantTypes": [ { - "$id": "222", + "$id": "343", "kind": "model", "name": "WidgetData0", "namespace": "Type.Property.AdditionalProperties", @@ -1779,18 +2730,12 @@ "decorators": [], "properties": [ { - "$id": "223", + "$id": "344", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "224", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "kind0", - "decorators": [] + "$ref": "6" }, "optional": false, "readOnly": false, @@ -1799,20 +2744,20 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData0.kind", "serializationOptions": { - "$id": "225", + "$id": "345", "json": { - "$id": "226", + "$id": "346", "name": "kind" } } }, { - "$id": "227", + "$id": "347", "kind": "property", "name": "fooProp", "serializedName": "fooProp", "type": { - "$id": "228", + "$id": "348", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1825,9 +2770,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData0.fooProp", "serializationOptions": { - "$id": "229", + "$id": "349", "json": { - "$id": "230", + "$id": "350", "name": "fooProp" } } @@ -1835,7 +2780,7 @@ ] }, { - "$id": "231", + "$id": "351", "kind": "model", "name": "WidgetData1", "namespace": "Type.Property.AdditionalProperties", @@ -1844,18 +2789,12 @@ "decorators": [], "properties": [ { - "$id": "232", + "$id": "352", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "233", - "kind": "constant", - "valueType": { - "$ref": "5" - }, - "value": "kind1", - "decorators": [] + "$ref": "8" }, "optional": false, "readOnly": false, @@ -1864,25 +2803,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.kind", "serializationOptions": { - "$id": "234", + "$id": "353", "json": { - "$id": "235", + "$id": "354", "name": "kind" } } }, { - "$id": "236", + "$id": "355", "kind": "property", "name": "start", "serializedName": "start", "type": { - "$id": "237", + "$id": "356", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "238", + "$id": "357", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1898,25 +2837,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.start", "serializationOptions": { - "$id": "239", + "$id": "358", "json": { - "$id": "240", + "$id": "359", "name": "start" } } }, { - "$id": "241", + "$id": "360", "kind": "property", "name": "end", "serializedName": "end", "type": { - "$id": "242", + "$id": "361", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "243", + "$id": "362", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1932,9 +2871,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData1.end", "serializationOptions": { - "$id": "244", + "$id": "363", "json": { - "$id": "245", + "$id": "364", "name": "end" } } @@ -1947,13 +2886,13 @@ }, "properties": [ { - "$id": "246", + "$id": "365", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "247", + "$id": "366", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1966,9 +2905,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion.name", "serializationOptions": { - "$id": "248", + "$id": "367", "json": { - "$id": "249", + "$id": "368", "name": "name" } } @@ -1976,13 +2915,13 @@ ] }, { - "$ref": "222" + "$ref": "343" }, { - "$ref": "231" + "$ref": "351" }, { - "$id": "250", + "$id": "369", "kind": "model", "name": "SpreadRecordForNonDiscriminatedUnion2", "namespace": "Type.Property.AdditionalProperties", @@ -1991,12 +2930,12 @@ "doc": "The model spread Record", "decorators": [], "additionalProperties": { - "$id": "251", + "$id": "370", "kind": "union", "name": "SpreadRecordForNonDiscriminatedUnion2AdditionalProperty", "variantTypes": [ { - "$id": "252", + "$id": "371", "kind": "model", "name": "WidgetData2", "namespace": "Type.Property.AdditionalProperties", @@ -2005,18 +2944,12 @@ "decorators": [], "properties": [ { - "$id": "253", + "$id": "372", "kind": "property", "name": "kind", "serializedName": "kind", "type": { - "$id": "254", - "kind": "constant", - "valueType": { - "$ref": "8" - }, - "value": "kind1", - "decorators": [] + "$ref": "10" }, "optional": false, "readOnly": false, @@ -2025,20 +2958,20 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData2.kind", "serializationOptions": { - "$id": "255", + "$id": "373", "json": { - "$id": "256", + "$id": "374", "name": "kind" } } }, { - "$id": "257", + "$id": "375", "kind": "property", "name": "start", "serializedName": "start", "type": { - "$id": "258", + "$id": "376", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2051,9 +2984,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.WidgetData2.start", "serializationOptions": { - "$id": "259", + "$id": "377", "json": { - "$id": "260", + "$id": "378", "name": "start" } } @@ -2061,7 +2994,7 @@ ] }, { - "$ref": "231" + "$ref": "351" } ], "namespace": "", @@ -2069,13 +3002,13 @@ }, "properties": [ { - "$id": "261", + "$id": "379", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "262", + "$id": "380", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2088,9 +3021,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion2.name", "serializationOptions": { - "$id": "263", + "$id": "381", "json": { - "$id": "264", + "$id": "382", "name": "name" } } @@ -2098,10 +3031,10 @@ ] }, { - "$ref": "252" + "$ref": "371" }, { - "$id": "265", + "$id": "383", "kind": "model", "name": "SpreadRecordForNonDiscriminatedUnion3", "namespace": "Type.Property.AdditionalProperties", @@ -2110,22 +3043,22 @@ "doc": "The model spread Record", "decorators": [], "additionalProperties": { - "$id": "266", + "$id": "384", "kind": "union", "name": "SpreadRecordForNonDiscriminatedUnion3AdditionalProperty", "variantTypes": [ { - "$id": "267", + "$id": "385", "kind": "array", "name": "ArrayWidgetData2", "valueType": { - "$ref": "252" + "$ref": "371" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] }, { - "$ref": "231" + "$ref": "351" } ], "namespace": "", @@ -2133,13 +3066,13 @@ }, "properties": [ { - "$id": "268", + "$id": "386", "kind": "property", "name": "name", "serializedName": "name", "doc": "The name property", "type": { - "$id": "269", + "$id": "387", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2152,9 +3085,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordForNonDiscriminatedUnion3.name", "serializationOptions": { - "$id": "270", + "$id": "388", "json": { - "$id": "271", + "$id": "389", "name": "name" } } @@ -2164,7 +3097,7 @@ ], "clients": [ { - "$id": "272", + "$id": "390", "kind": "client", "name": "AdditionalPropertiesClient", "namespace": "Type.Property.AdditionalProperties", @@ -2172,12 +3105,12 @@ "methods": [], "parameters": [ { - "$id": "273", + "$id": "391", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "274", + "$id": "392", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2191,9 +3124,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "275", + "$id": "393", "type": { - "$id": "276", + "$id": "394", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2207,41 +3140,31 @@ "apiVersions": [], "children": [ { - "$id": "277", + "$id": "395", "kind": "client", "name": "ExtendsUnknown", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "278", + "$id": "396", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "279", + "$id": "397", "name": "get", "resourceName": "ExtendsUnknown", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "280", + "$id": "398", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "281", - "kind": "constant", - "valueType": { - "$id": "282", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -2256,12 +3179,12 @@ ], "responses": [ { - "$id": "283", + "$id": "399", "statusCodes": [ 200 ], "bodyType": { - "$ref": "11" + "$ref": "136" }, "headers": [], "isErrorResponse": false, @@ -2281,11 +3204,11 @@ }, "parameters": [ { - "$id": "284", + "$id": "400", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "281" + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -2299,9 +3222,9 @@ } ], "response": { - "$id": "285", + "$id": "401", "type": { - "$ref": "11" + "$ref": "136" } }, "isOverride": false, @@ -2310,36 +3233,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknown.get" }, { - "$id": "286", + "$id": "402", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "287", + "$id": "403", "name": "put", "resourceName": "ExtendsUnknown", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "288", + "$id": "404", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "289", - "kind": "constant", - "valueType": { - "$id": "290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -2352,12 +3265,12 @@ "skipUrlEncoding": false }, { - "$id": "291", + "$id": "405", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "11" + "$ref": "136" }, "location": "Body", "isApiVersion": false, @@ -2372,7 +3285,7 @@ ], "responses": [ { - "$id": "292", + "$id": "406", "statusCodes": [ 204 ], @@ -2394,12 +3307,12 @@ }, "parameters": [ { - "$id": "293", + "$id": "407", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "11" + "$ref": "136" }, "location": "Body", "isApiVersion": false, @@ -2412,12 +3325,12 @@ "skipUrlEncoding": false }, { - "$id": "294", + "$id": "408", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "289" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -2431,7 +3344,7 @@ } ], "response": { - "$id": "295" + "$id": "409" }, "isOverride": false, "generateConvenient": true, @@ -2441,12 +3354,12 @@ ], "parameters": [ { - "$id": "296", + "$id": "410", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "297", + "$id": "411", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2460,9 +3373,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "298", + "$id": "412", "type": { - "$id": "299", + "$id": "413", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2475,45 +3388,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknown", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "300", + "$id": "414", "kind": "client", "name": "ExtendsUnknownDerived", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "301", + "$id": "415", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "302", + "$id": "416", "name": "get", "resourceName": "ExtendsUnknownDerived", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "303", + "$id": "417", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "304", - "kind": "constant", - "valueType": { - "$id": "305", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -2528,12 +3431,12 @@ ], "responses": [ { - "$id": "306", + "$id": "418", "statusCodes": [ 200 ], "bodyType": { - "$ref": "17" + "$ref": "142" }, "headers": [], "isErrorResponse": false, @@ -2553,11 +3456,11 @@ }, "parameters": [ { - "$id": "307", + "$id": "419", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "304" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -2571,9 +3474,9 @@ } ], "response": { - "$id": "308", + "$id": "420", "type": { - "$ref": "17" + "$ref": "142" } }, "isOverride": false, @@ -2582,36 +3485,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDerived.get" }, { - "$id": "309", + "$id": "421", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "310", + "$id": "422", "name": "put", "resourceName": "ExtendsUnknownDerived", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "311", + "$id": "423", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "312", - "kind": "constant", - "valueType": { - "$id": "313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2624,12 +3517,12 @@ "skipUrlEncoding": false }, { - "$id": "314", + "$id": "424", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "17" + "$ref": "142" }, "location": "Body", "isApiVersion": false, @@ -2644,7 +3537,7 @@ ], "responses": [ { - "$id": "315", + "$id": "425", "statusCodes": [ 204 ], @@ -2666,12 +3559,12 @@ }, "parameters": [ { - "$id": "316", + "$id": "426", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "17" + "$ref": "142" }, "location": "Body", "isApiVersion": false, @@ -2684,12 +3577,12 @@ "skipUrlEncoding": false }, { - "$id": "317", + "$id": "427", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "312" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -2703,7 +3596,7 @@ } ], "response": { - "$id": "318" + "$id": "428" }, "isOverride": false, "generateConvenient": true, @@ -2713,12 +3606,12 @@ ], "parameters": [ { - "$id": "319", + "$id": "429", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "320", + "$id": "430", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2732,9 +3625,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "321", + "$id": "431", "type": { - "$id": "322", + "$id": "432", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2747,45 +3640,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDerived", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "323", + "$id": "433", "kind": "client", "name": "ExtendsUnknownDiscriminated", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "324", + "$id": "434", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "325", + "$id": "435", "name": "get", "resourceName": "ExtendsUnknownDiscriminated", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "326", + "$id": "436", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "327", - "kind": "constant", - "valueType": { - "$id": "328", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -2800,12 +3683,12 @@ ], "responses": [ { - "$id": "329", + "$id": "437", "statusCodes": [ 200 ], "bodyType": { - "$ref": "26" + "$ref": "151" }, "headers": [], "isErrorResponse": false, @@ -2825,11 +3708,11 @@ }, "parameters": [ { - "$id": "330", + "$id": "438", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "327" + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -2843,9 +3726,9 @@ } ], "response": { - "$id": "331", + "$id": "439", "type": { - "$ref": "26" + "$ref": "151" } }, "isOverride": false, @@ -2854,36 +3737,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated.get" }, { - "$id": "332", + "$id": "440", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "333", + "$id": "441", "name": "put", "resourceName": "ExtendsUnknownDiscriminated", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "334", + "$id": "442", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "335", - "kind": "constant", - "valueType": { - "$id": "336", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2896,12 +3769,12 @@ "skipUrlEncoding": false }, { - "$id": "337", + "$id": "443", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "26" + "$ref": "151" }, "location": "Body", "isApiVersion": false, @@ -2916,7 +3789,7 @@ ], "responses": [ { - "$id": "338", + "$id": "444", "statusCodes": [ 204 ], @@ -2938,12 +3811,12 @@ }, "parameters": [ { - "$id": "339", + "$id": "445", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "26" + "$ref": "151" }, "location": "Body", "isApiVersion": false, @@ -2956,12 +3829,12 @@ "skipUrlEncoding": false }, { - "$id": "340", + "$id": "446", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "335" + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -2975,7 +3848,7 @@ } ], "response": { - "$id": "341" + "$id": "447" }, "isOverride": false, "generateConvenient": true, @@ -2985,12 +3858,12 @@ ], "parameters": [ { - "$id": "342", + "$id": "448", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "343", + "$id": "449", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3004,9 +3877,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "344", + "$id": "450", "type": { - "$id": "345", + "$id": "451", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3019,45 +3892,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsUnknownDiscriminated", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "346", + "$id": "452", "kind": "client", "name": "IsUnknown", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "347", + "$id": "453", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "348", + "$id": "454", "name": "get", "resourceName": "IsUnknown", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "349", + "$id": "455", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "350", - "kind": "constant", - "valueType": { - "$id": "351", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -3072,12 +3935,12 @@ ], "responses": [ { - "$id": "352", + "$id": "456", "statusCodes": [ 200 ], "bodyType": { - "$ref": "51" + "$ref": "174" }, "headers": [], "isErrorResponse": false, @@ -3097,11 +3960,11 @@ }, "parameters": [ { - "$id": "353", + "$id": "457", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "350" + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -3115,9 +3978,9 @@ } ], "response": { - "$id": "354", + "$id": "458", "type": { - "$ref": "51" + "$ref": "174" } }, "isOverride": false, @@ -3126,36 +3989,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknown.get" }, { - "$id": "355", + "$id": "459", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "356", + "$id": "460", "name": "put", "resourceName": "IsUnknown", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "357", + "$id": "461", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "358", - "kind": "constant", - "valueType": { - "$id": "359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -3168,12 +4021,12 @@ "skipUrlEncoding": false }, { - "$id": "360", + "$id": "462", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "51" + "$ref": "174" }, "location": "Body", "isApiVersion": false, @@ -3188,7 +4041,7 @@ ], "responses": [ { - "$id": "361", + "$id": "463", "statusCodes": [ 204 ], @@ -3210,12 +4063,12 @@ }, "parameters": [ { - "$id": "362", + "$id": "464", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "51" + "$ref": "174" }, "location": "Body", "isApiVersion": false, @@ -3228,12 +4081,12 @@ "skipUrlEncoding": false }, { - "$id": "363", + "$id": "465", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "358" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -3247,7 +4100,7 @@ } ], "response": { - "$id": "364" + "$id": "466" }, "isOverride": false, "generateConvenient": true, @@ -3257,12 +4110,12 @@ ], "parameters": [ { - "$id": "365", + "$id": "467", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "366", + "$id": "468", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3276,9 +4129,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "367", + "$id": "469", "type": { - "$id": "368", + "$id": "470", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3291,45 +4144,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknown", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "369", + "$id": "471", "kind": "client", "name": "IsUnknownDerived", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "370", + "$id": "472", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "371", + "$id": "473", "name": "get", "resourceName": "IsUnknownDerived", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "372", + "$id": "474", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "373", - "kind": "constant", - "valueType": { - "$id": "374", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -3344,12 +4187,12 @@ ], "responses": [ { - "$id": "375", + "$id": "475", "statusCodes": [ 200 ], "bodyType": { - "$ref": "57" + "$ref": "180" }, "headers": [], "isErrorResponse": false, @@ -3369,11 +4212,11 @@ }, "parameters": [ { - "$id": "376", + "$id": "476", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "373" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -3387,9 +4230,9 @@ } ], "response": { - "$id": "377", + "$id": "477", "type": { - "$ref": "57" + "$ref": "180" } }, "isOverride": false, @@ -3398,36 +4241,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDerived.get" }, { - "$id": "378", + "$id": "478", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "379", + "$id": "479", "name": "put", "resourceName": "IsUnknownDerived", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "380", + "$id": "480", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "381", - "kind": "constant", - "valueType": { - "$id": "382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -3440,12 +4273,12 @@ "skipUrlEncoding": false }, { - "$id": "383", + "$id": "481", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "57" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -3460,7 +4293,7 @@ ], "responses": [ { - "$id": "384", + "$id": "482", "statusCodes": [ 204 ], @@ -3482,12 +4315,12 @@ }, "parameters": [ { - "$id": "385", + "$id": "483", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "57" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -3500,12 +4333,12 @@ "skipUrlEncoding": false }, { - "$id": "386", + "$id": "484", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "381" + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -3519,7 +4352,7 @@ } ], "response": { - "$id": "387" + "$id": "485" }, "isOverride": false, "generateConvenient": true, @@ -3529,12 +4362,12 @@ ], "parameters": [ { - "$id": "388", + "$id": "486", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "389", + "$id": "487", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3548,9 +4381,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "390", + "$id": "488", "type": { - "$id": "391", + "$id": "489", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3563,45 +4396,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDerived", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "392", + "$id": "490", "kind": "client", "name": "IsUnknownDiscriminated", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "393", + "$id": "491", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "394", + "$id": "492", "name": "get", "resourceName": "IsUnknownDiscriminated", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "395", + "$id": "493", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "396", - "kind": "constant", - "valueType": { - "$id": "397", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -3616,12 +4439,12 @@ ], "responses": [ { - "$id": "398", + "$id": "494", "statusCodes": [ 200 ], "bodyType": { - "$ref": "66" + "$ref": "189" }, "headers": [], "isErrorResponse": false, @@ -3641,11 +4464,11 @@ }, "parameters": [ { - "$id": "399", + "$id": "495", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "396" + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -3659,9 +4482,9 @@ } ], "response": { - "$id": "400", + "$id": "496", "type": { - "$ref": "66" + "$ref": "189" } }, "isOverride": false, @@ -3670,36 +4493,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDiscriminated.get" }, { - "$id": "401", + "$id": "497", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "402", + "$id": "498", "name": "put", "resourceName": "IsUnknownDiscriminated", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "403", + "$id": "499", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "404", - "kind": "constant", - "valueType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -3712,12 +4525,12 @@ "skipUrlEncoding": false }, { - "$id": "406", + "$id": "500", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "66" + "$ref": "189" }, "location": "Body", "isApiVersion": false, @@ -3732,7 +4545,7 @@ ], "responses": [ { - "$id": "407", + "$id": "501", "statusCodes": [ 204 ], @@ -3754,12 +4567,12 @@ }, "parameters": [ { - "$id": "408", + "$id": "502", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "66" + "$ref": "189" }, "location": "Body", "isApiVersion": false, @@ -3772,12 +4585,12 @@ "skipUrlEncoding": false }, { - "$id": "409", + "$id": "503", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "404" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -3791,7 +4604,7 @@ } ], "response": { - "$id": "410" + "$id": "504" }, "isOverride": false, "generateConvenient": true, @@ -3801,12 +4614,12 @@ ], "parameters": [ { - "$id": "411", + "$id": "505", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "412", + "$id": "506", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3820,9 +4633,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "413", + "$id": "507", "type": { - "$id": "414", + "$id": "508", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3835,45 +4648,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsUnknownDiscriminated", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "415", + "$id": "509", "kind": "client", "name": "ExtendsString", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "416", + "$id": "510", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "417", + "$id": "511", "name": "get", "resourceName": "ExtendsString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "418", + "$id": "512", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "419", - "kind": "constant", - "valueType": { - "$id": "420", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -3888,12 +4691,12 @@ ], "responses": [ { - "$id": "421", + "$id": "513", "statusCodes": [ 200 ], "bodyType": { - "$ref": "91" + "$ref": "212" }, "headers": [], "isErrorResponse": false, @@ -3913,11 +4716,11 @@ }, "parameters": [ { - "$id": "422", + "$id": "514", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "419" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -3931,9 +4734,9 @@ } ], "response": { - "$id": "423", + "$id": "515", "type": { - "$ref": "91" + "$ref": "212" } }, "isOverride": false, @@ -3942,36 +4745,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsString.get" }, { - "$id": "424", + "$id": "516", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "425", + "$id": "517", "name": "put", "resourceName": "ExtendsString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "426", + "$id": "518", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "427", - "kind": "constant", - "valueType": { - "$id": "428", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -3984,12 +4777,12 @@ "skipUrlEncoding": false }, { - "$id": "429", + "$id": "519", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "91" + "$ref": "212" }, "location": "Body", "isApiVersion": false, @@ -4004,7 +4797,7 @@ ], "responses": [ { - "$id": "430", + "$id": "520", "statusCodes": [ 204 ], @@ -4026,12 +4819,12 @@ }, "parameters": [ { - "$id": "431", + "$id": "521", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "91" + "$ref": "212" }, "location": "Body", "isApiVersion": false, @@ -4044,12 +4837,12 @@ "skipUrlEncoding": false }, { - "$id": "432", + "$id": "522", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "427" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -4063,7 +4856,7 @@ } ], "response": { - "$id": "433" + "$id": "523" }, "isOverride": false, "generateConvenient": true, @@ -4073,12 +4866,12 @@ ], "parameters": [ { - "$id": "434", + "$id": "524", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "435", + "$id": "525", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4092,9 +4885,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "436", + "$id": "526", "type": { - "$id": "437", + "$id": "527", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4107,45 +4900,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsString", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "438", + "$id": "528", "kind": "client", "name": "IsString", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "439", + "$id": "529", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "440", + "$id": "530", "name": "get", "resourceName": "IsString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "441", + "$id": "531", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "442", - "kind": "constant", - "valueType": { - "$id": "443", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -4160,12 +4943,12 @@ ], "responses": [ { - "$id": "444", + "$id": "532", "statusCodes": [ 200 ], "bodyType": { - "$ref": "97" + "$ref": "218" }, "headers": [], "isErrorResponse": false, @@ -4185,11 +4968,11 @@ }, "parameters": [ { - "$id": "445", + "$id": "533", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "442" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -4203,9 +4986,9 @@ } ], "response": { - "$id": "446", + "$id": "534", "type": { - "$ref": "97" + "$ref": "218" } }, "isOverride": false, @@ -4214,36 +4997,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsString.get" }, { - "$id": "447", + "$id": "535", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "448", + "$id": "536", "name": "put", "resourceName": "IsString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "449", + "$id": "537", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "450", - "kind": "constant", - "valueType": { - "$id": "451", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -4256,12 +5029,12 @@ "skipUrlEncoding": false }, { - "$id": "452", + "$id": "538", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "97" + "$ref": "218" }, "location": "Body", "isApiVersion": false, @@ -4276,7 +5049,7 @@ ], "responses": [ { - "$id": "453", + "$id": "539", "statusCodes": [ 204 ], @@ -4298,12 +5071,12 @@ }, "parameters": [ { - "$id": "454", + "$id": "540", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "97" + "$ref": "218" }, "location": "Body", "isApiVersion": false, @@ -4316,12 +5089,12 @@ "skipUrlEncoding": false }, { - "$id": "455", + "$id": "541", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "450" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -4335,7 +5108,7 @@ } ], "response": { - "$id": "456" + "$id": "542" }, "isOverride": false, "generateConvenient": true, @@ -4345,12 +5118,12 @@ ], "parameters": [ { - "$id": "457", + "$id": "543", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "458", + "$id": "544", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4364,9 +5137,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "459", + "$id": "545", "type": { - "$id": "460", + "$id": "546", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4379,45 +5152,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsString", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "461", + "$id": "547", "kind": "client", "name": "SpreadString", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "462", + "$id": "548", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "463", + "$id": "549", "name": "get", "resourceName": "SpreadString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "464", + "$id": "550", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "465", - "kind": "constant", - "valueType": { - "$id": "466", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -4432,12 +5195,12 @@ ], "responses": [ { - "$id": "467", + "$id": "551", "statusCodes": [ 200 ], "bodyType": { - "$ref": "103" + "$ref": "224" }, "headers": [], "isErrorResponse": false, @@ -4457,11 +5220,11 @@ }, "parameters": [ { - "$id": "468", + "$id": "552", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "465" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -4475,9 +5238,9 @@ } ], "response": { - "$id": "469", + "$id": "553", "type": { - "$ref": "103" + "$ref": "224" } }, "isOverride": false, @@ -4486,36 +5249,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadString.get" }, { - "$id": "470", + "$id": "554", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "471", + "$id": "555", "name": "put", "resourceName": "SpreadString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "472", + "$id": "556", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "473", - "kind": "constant", - "valueType": { - "$id": "474", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -4528,12 +5281,12 @@ "skipUrlEncoding": false }, { - "$id": "475", + "$id": "557", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "103" + "$ref": "224" }, "location": "Body", "isApiVersion": false, @@ -4548,7 +5301,7 @@ ], "responses": [ { - "$id": "476", + "$id": "558", "statusCodes": [ 204 ], @@ -4570,12 +5323,12 @@ }, "parameters": [ { - "$id": "477", + "$id": "559", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "103" + "$ref": "224" }, "location": "Body", "isApiVersion": false, @@ -4588,12 +5341,12 @@ "skipUrlEncoding": false }, { - "$id": "478", + "$id": "560", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "473" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -4607,7 +5360,7 @@ } ], "response": { - "$id": "479" + "$id": "561" }, "isOverride": false, "generateConvenient": true, @@ -4617,12 +5370,12 @@ ], "parameters": [ { - "$id": "480", + "$id": "562", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "481", + "$id": "563", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4636,9 +5389,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "482", + "$id": "564", "type": { - "$id": "483", + "$id": "565", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4651,45 +5404,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadString", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "484", + "$id": "566", "kind": "client", "name": "ExtendsFloat", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "485", + "$id": "567", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "486", + "$id": "568", "name": "get", "resourceName": "ExtendsFloat", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "487", + "$id": "569", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "488", - "kind": "constant", - "valueType": { - "$id": "489", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -4704,12 +5447,12 @@ ], "responses": [ { - "$id": "490", + "$id": "570", "statusCodes": [ 200 ], "bodyType": { - "$ref": "109" + "$ref": "230" }, "headers": [], "isErrorResponse": false, @@ -4729,11 +5472,11 @@ }, "parameters": [ { - "$id": "491", + "$id": "571", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "488" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -4747,9 +5490,9 @@ } ], "response": { - "$id": "492", + "$id": "572", "type": { - "$ref": "109" + "$ref": "230" } }, "isOverride": false, @@ -4758,36 +5501,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloat.get" }, { - "$id": "493", + "$id": "573", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "494", + "$id": "574", "name": "put", "resourceName": "ExtendsFloat", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "495", + "$id": "575", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "496", - "kind": "constant", - "valueType": { - "$id": "497", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -4800,12 +5533,12 @@ "skipUrlEncoding": false }, { - "$id": "498", + "$id": "576", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "109" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -4820,7 +5553,7 @@ ], "responses": [ { - "$id": "499", + "$id": "577", "statusCodes": [ 204 ], @@ -4842,12 +5575,12 @@ }, "parameters": [ { - "$id": "500", + "$id": "578", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "109" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -4860,12 +5593,12 @@ "skipUrlEncoding": false }, { - "$id": "501", + "$id": "579", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "496" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -4879,7 +5612,7 @@ } ], "response": { - "$id": "502" + "$id": "580" }, "isOverride": false, "generateConvenient": true, @@ -4889,12 +5622,12 @@ ], "parameters": [ { - "$id": "503", + "$id": "581", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "504", + "$id": "582", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4908,9 +5641,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "505", + "$id": "583", "type": { - "$id": "506", + "$id": "584", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4923,45 +5656,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsFloat", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "507", + "$id": "585", "kind": "client", "name": "IsFloat", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "508", + "$id": "586", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "509", + "$id": "587", "name": "get", "resourceName": "IsFloat", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "510", + "$id": "588", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "511", - "kind": "constant", - "valueType": { - "$id": "512", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -4976,12 +5699,12 @@ ], "responses": [ { - "$id": "513", + "$id": "589", "statusCodes": [ 200 ], "bodyType": { - "$ref": "115" + "$ref": "236" }, "headers": [], "isErrorResponse": false, @@ -5001,11 +5724,11 @@ }, "parameters": [ { - "$id": "514", + "$id": "590", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "511" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -5019,9 +5742,9 @@ } ], "response": { - "$id": "515", + "$id": "591", "type": { - "$ref": "115" + "$ref": "236" } }, "isOverride": false, @@ -5030,36 +5753,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloat.get" }, { - "$id": "516", + "$id": "592", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "517", + "$id": "593", "name": "put", "resourceName": "IsFloat", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "518", + "$id": "594", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "519", - "kind": "constant", - "valueType": { - "$id": "520", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -5072,12 +5785,12 @@ "skipUrlEncoding": false }, { - "$id": "521", + "$id": "595", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "115" + "$ref": "236" }, "location": "Body", "isApiVersion": false, @@ -5092,7 +5805,7 @@ ], "responses": [ { - "$id": "522", + "$id": "596", "statusCodes": [ 204 ], @@ -5114,12 +5827,12 @@ }, "parameters": [ { - "$id": "523", + "$id": "597", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "115" + "$ref": "236" }, "location": "Body", "isApiVersion": false, @@ -5132,12 +5845,12 @@ "skipUrlEncoding": false }, { - "$id": "524", + "$id": "598", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "519" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -5151,7 +5864,7 @@ } ], "response": { - "$id": "525" + "$id": "599" }, "isOverride": false, "generateConvenient": true, @@ -5161,12 +5874,12 @@ ], "parameters": [ { - "$id": "526", + "$id": "600", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "527", + "$id": "601", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5180,9 +5893,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "528", + "$id": "602", "type": { - "$id": "529", + "$id": "603", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5195,45 +5908,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsFloat", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "530", + "$id": "604", "kind": "client", "name": "SpreadFloat", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "531", + "$id": "605", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "532", + "$id": "606", "name": "get", "resourceName": "SpreadFloat", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "533", + "$id": "607", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "534", - "kind": "constant", - "valueType": { - "$id": "535", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -5248,12 +5951,12 @@ ], "responses": [ { - "$id": "536", + "$id": "608", "statusCodes": [ 200 ], "bodyType": { - "$ref": "121" + "$ref": "242" }, "headers": [], "isErrorResponse": false, @@ -5273,11 +5976,11 @@ }, "parameters": [ { - "$id": "537", + "$id": "609", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "534" + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -5291,9 +5994,9 @@ } ], "response": { - "$id": "538", + "$id": "610", "type": { - "$ref": "121" + "$ref": "242" } }, "isOverride": false, @@ -5302,36 +6005,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloat.get" }, { - "$id": "539", + "$id": "611", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "540", + "$id": "612", "name": "put", "resourceName": "SpreadFloat", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "541", + "$id": "613", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "542", - "kind": "constant", - "valueType": { - "$id": "543", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -5344,12 +6037,12 @@ "skipUrlEncoding": false }, { - "$id": "544", + "$id": "614", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "121" + "$ref": "242" }, "location": "Body", "isApiVersion": false, @@ -5364,7 +6057,7 @@ ], "responses": [ { - "$id": "545", + "$id": "615", "statusCodes": [ 204 ], @@ -5386,12 +6079,12 @@ }, "parameters": [ { - "$id": "546", + "$id": "616", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "121" + "$ref": "242" }, "location": "Body", "isApiVersion": false, @@ -5404,12 +6097,12 @@ "skipUrlEncoding": false }, { - "$id": "547", + "$id": "617", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "542" + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -5423,7 +6116,7 @@ } ], "response": { - "$id": "548" + "$id": "618" }, "isOverride": false, "generateConvenient": true, @@ -5433,12 +6126,12 @@ ], "parameters": [ { - "$id": "549", + "$id": "619", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "550", + "$id": "620", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5452,9 +6145,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "551", + "$id": "621", "type": { - "$id": "552", + "$id": "622", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5467,45 +6160,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadFloat", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "553", + "$id": "623", "kind": "client", "name": "ExtendsModel", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "554", + "$id": "624", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "555", + "$id": "625", "name": "get", "resourceName": "ExtendsModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "556", + "$id": "626", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "557", - "kind": "constant", - "valueType": { - "$id": "558", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -5520,12 +6203,12 @@ ], "responses": [ { - "$id": "559", + "$id": "627", "statusCodes": [ 200 ], "bodyType": { - "$ref": "127" + "$ref": "248" }, "headers": [], "isErrorResponse": false, @@ -5545,11 +6228,11 @@ }, "parameters": [ { - "$id": "560", + "$id": "628", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "557" + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -5563,9 +6246,9 @@ } ], "response": { - "$id": "561", + "$id": "629", "type": { - "$ref": "127" + "$ref": "248" } }, "isOverride": false, @@ -5574,36 +6257,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModel.get" }, { - "$id": "562", + "$id": "630", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "563", + "$id": "631", "name": "put", "resourceName": "ExtendsModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "564", + "$id": "632", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "565", - "kind": "constant", - "valueType": { - "$id": "566", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -5616,12 +6289,12 @@ "skipUrlEncoding": false }, { - "$id": "567", + "$id": "633", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "127" + "$ref": "248" }, "location": "Body", "isApiVersion": false, @@ -5636,7 +6309,7 @@ ], "responses": [ { - "$id": "568", + "$id": "634", "statusCodes": [ 204 ], @@ -5658,12 +6331,12 @@ }, "parameters": [ { - "$id": "569", + "$id": "635", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "127" + "$ref": "248" }, "location": "Body", "isApiVersion": false, @@ -5676,12 +6349,12 @@ "skipUrlEncoding": false }, { - "$id": "570", + "$id": "636", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "565" + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -5695,7 +6368,7 @@ } ], "response": { - "$id": "571" + "$id": "637" }, "isOverride": false, "generateConvenient": true, @@ -5705,12 +6378,12 @@ ], "parameters": [ { - "$id": "572", + "$id": "638", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "573", + "$id": "639", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5724,9 +6397,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "574", + "$id": "640", "type": { - "$id": "575", + "$id": "641", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5739,45 +6412,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModel", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "576", + "$id": "642", "kind": "client", "name": "IsModel", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "577", + "$id": "643", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "578", + "$id": "644", "name": "get", "resourceName": "IsModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "579", + "$id": "645", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "580", - "kind": "constant", - "valueType": { - "$id": "581", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -5792,12 +6455,12 @@ ], "responses": [ { - "$id": "582", + "$id": "646", "statusCodes": [ 200 ], "bodyType": { - "$ref": "136" + "$ref": "257" }, "headers": [], "isErrorResponse": false, @@ -5817,11 +6480,11 @@ }, "parameters": [ { - "$id": "583", + "$id": "647", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "580" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -5835,9 +6498,9 @@ } ], "response": { - "$id": "584", + "$id": "648", "type": { - "$ref": "136" + "$ref": "257" } }, "isOverride": false, @@ -5846,36 +6509,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModel.get" }, { - "$id": "585", + "$id": "649", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "586", + "$id": "650", "name": "put", "resourceName": "IsModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "587", + "$id": "651", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "588", - "kind": "constant", - "valueType": { - "$id": "589", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -5888,12 +6541,12 @@ "skipUrlEncoding": false }, { - "$id": "590", + "$id": "652", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "136" + "$ref": "257" }, "location": "Body", "isApiVersion": false, @@ -5908,7 +6561,7 @@ ], "responses": [ { - "$id": "591", + "$id": "653", "statusCodes": [ 204 ], @@ -5930,12 +6583,12 @@ }, "parameters": [ { - "$id": "592", + "$id": "654", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "136" + "$ref": "257" }, "location": "Body", "isApiVersion": false, @@ -5948,12 +6601,12 @@ "skipUrlEncoding": false }, { - "$id": "593", + "$id": "655", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "588" + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -5967,7 +6620,7 @@ } ], "response": { - "$id": "594" + "$id": "656" }, "isOverride": false, "generateConvenient": true, @@ -5977,12 +6630,12 @@ ], "parameters": [ { - "$id": "595", + "$id": "657", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "596", + "$id": "658", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5996,9 +6649,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "597", + "$id": "659", "type": { - "$id": "598", + "$id": "660", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6011,45 +6664,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModel", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "599", + "$id": "661", "kind": "client", "name": "SpreadModel", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "600", + "$id": "662", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "601", + "$id": "663", "name": "get", "resourceName": "SpreadModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "602", + "$id": "664", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "603", - "kind": "constant", - "valueType": { - "$id": "604", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -6064,12 +6707,12 @@ ], "responses": [ { - "$id": "605", + "$id": "665", "statusCodes": [ 200 ], "bodyType": { - "$ref": "140" + "$ref": "261" }, "headers": [], "isErrorResponse": false, @@ -6089,11 +6732,11 @@ }, "parameters": [ { - "$id": "606", + "$id": "666", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "603" + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -6107,9 +6750,9 @@ } ], "response": { - "$id": "607", + "$id": "667", "type": { - "$ref": "140" + "$ref": "261" } }, "isOverride": false, @@ -6118,36 +6761,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModel.get" }, { - "$id": "608", + "$id": "668", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "609", + "$id": "669", "name": "put", "resourceName": "SpreadModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "610", + "$id": "670", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "611", - "kind": "constant", - "valueType": { - "$id": "612", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -6160,12 +6793,12 @@ "skipUrlEncoding": false }, { - "$id": "613", + "$id": "671", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "140" + "$ref": "261" }, "location": "Body", "isApiVersion": false, @@ -6180,7 +6813,7 @@ ], "responses": [ { - "$id": "614", + "$id": "672", "statusCodes": [ 204 ], @@ -6202,12 +6835,12 @@ }, "parameters": [ { - "$id": "615", + "$id": "673", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "140" + "$ref": "261" }, "location": "Body", "isApiVersion": false, @@ -6220,12 +6853,12 @@ "skipUrlEncoding": false }, { - "$id": "616", + "$id": "674", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "611" + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -6239,7 +6872,7 @@ } ], "response": { - "$id": "617" + "$id": "675" }, "isOverride": false, "generateConvenient": true, @@ -6249,12 +6882,12 @@ ], "parameters": [ { - "$id": "618", + "$id": "676", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "619", + "$id": "677", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6268,9 +6901,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "620", + "$id": "678", "type": { - "$id": "621", + "$id": "679", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6283,45 +6916,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModel", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "622", + "$id": "680", "kind": "client", "name": "ExtendsModelArray", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "623", + "$id": "681", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "624", + "$id": "682", "name": "get", "resourceName": "ExtendsModelArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "625", + "$id": "683", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "626", - "kind": "constant", - "valueType": { - "$id": "627", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -6336,12 +6959,12 @@ ], "responses": [ { - "$id": "628", + "$id": "684", "statusCodes": [ 200 ], "bodyType": { - "$ref": "144" + "$ref": "265" }, "headers": [], "isErrorResponse": false, @@ -6361,11 +6984,11 @@ }, "parameters": [ { - "$id": "629", + "$id": "685", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "626" + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -6379,9 +7002,9 @@ } ], "response": { - "$id": "630", + "$id": "686", "type": { - "$ref": "144" + "$ref": "265" } }, "isOverride": false, @@ -6390,36 +7013,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArray.get" }, { - "$id": "631", + "$id": "687", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "632", + "$id": "688", "name": "put", "resourceName": "ExtendsModelArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "633", + "$id": "689", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "634", - "kind": "constant", - "valueType": { - "$id": "635", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -6432,12 +7045,12 @@ "skipUrlEncoding": false }, { - "$id": "636", + "$id": "690", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "144" + "$ref": "265" }, "location": "Body", "isApiVersion": false, @@ -6452,7 +7065,7 @@ ], "responses": [ { - "$id": "637", + "$id": "691", "statusCodes": [ 204 ], @@ -6474,12 +7087,12 @@ }, "parameters": [ { - "$id": "638", + "$id": "692", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "144" + "$ref": "265" }, "location": "Body", "isApiVersion": false, @@ -6492,12 +7105,12 @@ "skipUrlEncoding": false }, { - "$id": "639", + "$id": "693", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "634" + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -6511,7 +7124,7 @@ } ], "response": { - "$id": "640" + "$id": "694" }, "isOverride": false, "generateConvenient": true, @@ -6521,12 +7134,12 @@ ], "parameters": [ { - "$id": "641", + "$id": "695", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "642", + "$id": "696", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6540,9 +7153,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "643", + "$id": "697", "type": { - "$id": "644", + "$id": "698", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6555,45 +7168,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsModelArray", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "645", + "$id": "699", "kind": "client", "name": "IsModelArray", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "646", + "$id": "700", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "647", + "$id": "701", "name": "get", "resourceName": "IsModelArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "648", + "$id": "702", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "649", - "kind": "constant", - "valueType": { - "$id": "650", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -6608,12 +7211,12 @@ ], "responses": [ { - "$id": "651", + "$id": "703", "statusCodes": [ 200 ], "bodyType": { - "$ref": "150" + "$ref": "271" }, "headers": [], "isErrorResponse": false, @@ -6633,11 +7236,11 @@ }, "parameters": [ { - "$id": "652", + "$id": "704", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "649" + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -6651,9 +7254,9 @@ } ], "response": { - "$id": "653", + "$id": "705", "type": { - "$ref": "150" + "$ref": "271" } }, "isOverride": false, @@ -6662,36 +7265,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArray.get" }, { - "$id": "654", + "$id": "706", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "655", + "$id": "707", "name": "put", "resourceName": "IsModelArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "656", + "$id": "708", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "657", - "kind": "constant", - "valueType": { - "$id": "658", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -6704,12 +7297,12 @@ "skipUrlEncoding": false }, { - "$id": "659", + "$id": "709", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "150" + "$ref": "271" }, "location": "Body", "isApiVersion": false, @@ -6724,7 +7317,7 @@ ], "responses": [ { - "$id": "660", + "$id": "710", "statusCodes": [ 204 ], @@ -6746,12 +7339,12 @@ }, "parameters": [ { - "$id": "661", + "$id": "711", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "150" + "$ref": "271" }, "location": "Body", "isApiVersion": false, @@ -6764,12 +7357,12 @@ "skipUrlEncoding": false }, { - "$id": "662", + "$id": "712", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "657" + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -6783,7 +7376,7 @@ } ], "response": { - "$id": "663" + "$id": "713" }, "isOverride": false, "generateConvenient": true, @@ -6793,12 +7386,12 @@ ], "parameters": [ { - "$id": "664", + "$id": "714", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "665", + "$id": "715", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6812,9 +7405,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "666", + "$id": "716", "type": { - "$id": "667", + "$id": "717", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6827,45 +7420,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.IsModelArray", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "668", + "$id": "718", "kind": "client", "name": "SpreadModelArray", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "669", + "$id": "719", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "670", + "$id": "720", "name": "get", "resourceName": "SpreadModelArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "671", + "$id": "721", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "672", - "kind": "constant", - "valueType": { - "$id": "673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -6880,12 +7463,12 @@ ], "responses": [ { - "$id": "674", + "$id": "722", "statusCodes": [ 200 ], "bodyType": { - "$ref": "156" + "$ref": "277" }, "headers": [], "isErrorResponse": false, @@ -6905,11 +7488,11 @@ }, "parameters": [ { - "$id": "675", + "$id": "723", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "672" + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -6923,9 +7506,9 @@ } ], "response": { - "$id": "676", + "$id": "724", "type": { - "$ref": "156" + "$ref": "277" } }, "isOverride": false, @@ -6934,36 +7517,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArray.get" }, { - "$id": "677", + "$id": "725", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "678", + "$id": "726", "name": "put", "resourceName": "SpreadModelArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "679", + "$id": "727", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "680", - "kind": "constant", - "valueType": { - "$id": "681", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -6976,12 +7549,12 @@ "skipUrlEncoding": false }, { - "$id": "682", + "$id": "728", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "156" + "$ref": "277" }, "location": "Body", "isApiVersion": false, @@ -6996,7 +7569,7 @@ ], "responses": [ { - "$id": "683", + "$id": "729", "statusCodes": [ 204 ], @@ -7018,12 +7591,12 @@ }, "parameters": [ { - "$id": "684", + "$id": "730", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "156" + "$ref": "277" }, "location": "Body", "isApiVersion": false, @@ -7036,12 +7609,12 @@ "skipUrlEncoding": false }, { - "$id": "685", + "$id": "731", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "680" + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -7055,7 +7628,7 @@ } ], "response": { - "$id": "686" + "$id": "732" }, "isOverride": false, "generateConvenient": true, @@ -7065,12 +7638,12 @@ ], "parameters": [ { - "$id": "687", + "$id": "733", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "688", + "$id": "734", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7084,9 +7657,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "689", + "$id": "735", "type": { - "$id": "690", + "$id": "736", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7099,45 +7672,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadModelArray", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "691", + "$id": "737", "kind": "client", "name": "SpreadDifferentString", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "692", + "$id": "738", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "693", + "$id": "739", "name": "get", "resourceName": "SpreadDifferentString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "694", + "$id": "740", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "695", - "kind": "constant", - "valueType": { - "$id": "696", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -7152,12 +7715,12 @@ ], "responses": [ { - "$id": "697", + "$id": "741", "statusCodes": [ 200 ], "bodyType": { - "$ref": "162" + "$ref": "283" }, "headers": [], "isErrorResponse": false, @@ -7177,11 +7740,11 @@ }, "parameters": [ { - "$id": "698", + "$id": "742", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "695" + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -7195,9 +7758,9 @@ } ], "response": { - "$id": "699", + "$id": "743", "type": { - "$ref": "162" + "$ref": "283" } }, "isOverride": false, @@ -7206,36 +7769,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentString.get" }, { - "$id": "700", + "$id": "744", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "701", + "$id": "745", "name": "put", "resourceName": "SpreadDifferentString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "702", + "$id": "746", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "703", - "kind": "constant", - "valueType": { - "$id": "704", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -7248,12 +7801,12 @@ "skipUrlEncoding": false }, { - "$id": "705", + "$id": "747", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "162" + "$ref": "283" }, "location": "Body", "isApiVersion": false, @@ -7268,7 +7821,7 @@ ], "responses": [ { - "$id": "706", + "$id": "748", "statusCodes": [ 204 ], @@ -7290,12 +7843,12 @@ }, "parameters": [ { - "$id": "707", + "$id": "749", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "162" + "$ref": "283" }, "location": "Body", "isApiVersion": false, @@ -7308,12 +7861,12 @@ "skipUrlEncoding": false }, { - "$id": "708", + "$id": "750", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "703" + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -7327,7 +7880,7 @@ } ], "response": { - "$id": "709" + "$id": "751" }, "isOverride": false, "generateConvenient": true, @@ -7337,12 +7890,12 @@ ], "parameters": [ { - "$id": "710", + "$id": "752", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "711", + "$id": "753", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7356,9 +7909,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "712", + "$id": "754", "type": { - "$id": "713", + "$id": "755", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7371,45 +7924,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentString", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "714", + "$id": "756", "kind": "client", "name": "SpreadDifferentFloat", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "715", + "$id": "757", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "716", + "$id": "758", "name": "get", "resourceName": "SpreadDifferentFloat", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "717", + "$id": "759", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "718", - "kind": "constant", - "valueType": { - "$id": "719", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -7424,12 +7967,12 @@ ], "responses": [ { - "$id": "720", + "$id": "760", "statusCodes": [ 200 ], "bodyType": { - "$ref": "168" + "$ref": "289" }, "headers": [], "isErrorResponse": false, @@ -7449,11 +7992,11 @@ }, "parameters": [ { - "$id": "721", + "$id": "761", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "718" + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -7467,9 +8010,9 @@ } ], "response": { - "$id": "722", + "$id": "762", "type": { - "$ref": "168" + "$ref": "289" } }, "isOverride": false, @@ -7478,36 +8021,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentFloat.get" }, { - "$id": "723", + "$id": "763", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "724", + "$id": "764", "name": "put", "resourceName": "SpreadDifferentFloat", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "725", + "$id": "765", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "726", - "kind": "constant", - "valueType": { - "$id": "727", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -7520,12 +8053,12 @@ "skipUrlEncoding": false }, { - "$id": "728", + "$id": "766", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "168" + "$ref": "289" }, "location": "Body", "isApiVersion": false, @@ -7540,7 +8073,7 @@ ], "responses": [ { - "$id": "729", + "$id": "767", "statusCodes": [ 204 ], @@ -7562,12 +8095,12 @@ }, "parameters": [ { - "$id": "730", + "$id": "768", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "168" + "$ref": "289" }, "location": "Body", "isApiVersion": false, @@ -7580,12 +8113,12 @@ "skipUrlEncoding": false }, { - "$id": "731", + "$id": "769", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "726" + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -7599,7 +8132,7 @@ } ], "response": { - "$id": "732" + "$id": "770" }, "isOverride": false, "generateConvenient": true, @@ -7609,12 +8142,12 @@ ], "parameters": [ { - "$id": "733", + "$id": "771", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "734", + "$id": "772", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7628,9 +8161,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "735", + "$id": "773", "type": { - "$id": "736", + "$id": "774", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7643,45 +8176,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentFloat", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "737", + "$id": "775", "kind": "client", "name": "SpreadDifferentModel", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "738", + "$id": "776", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "739", + "$id": "777", "name": "get", "resourceName": "SpreadDifferentModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "740", + "$id": "778", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "741", - "kind": "constant", - "valueType": { - "$id": "742", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -7696,12 +8219,12 @@ ], "responses": [ { - "$id": "743", + "$id": "779", "statusCodes": [ 200 ], "bodyType": { - "$ref": "174" + "$ref": "295" }, "headers": [], "isErrorResponse": false, @@ -7721,11 +8244,11 @@ }, "parameters": [ { - "$id": "744", + "$id": "780", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "741" + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -7739,9 +8262,9 @@ } ], "response": { - "$id": "745", + "$id": "781", "type": { - "$ref": "174" + "$ref": "295" } }, "isOverride": false, @@ -7750,36 +8273,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModel.get" }, { - "$id": "746", + "$id": "782", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "747", + "$id": "783", "name": "put", "resourceName": "SpreadDifferentModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "748", + "$id": "784", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "749", - "kind": "constant", - "valueType": { - "$id": "750", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -7792,12 +8305,12 @@ "skipUrlEncoding": false }, { - "$id": "751", + "$id": "785", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "174" + "$ref": "295" }, "location": "Body", "isApiVersion": false, @@ -7812,7 +8325,7 @@ ], "responses": [ { - "$id": "752", + "$id": "786", "statusCodes": [ 204 ], @@ -7834,12 +8347,12 @@ }, "parameters": [ { - "$id": "753", + "$id": "787", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "174" + "$ref": "295" }, "location": "Body", "isApiVersion": false, @@ -7852,12 +8365,12 @@ "skipUrlEncoding": false }, { - "$id": "754", + "$id": "788", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "749" + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -7871,7 +8384,7 @@ } ], "response": { - "$id": "755" + "$id": "789" }, "isOverride": false, "generateConvenient": true, @@ -7881,12 +8394,12 @@ ], "parameters": [ { - "$id": "756", + "$id": "790", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "757", + "$id": "791", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7900,9 +8413,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "758", + "$id": "792", "type": { - "$id": "759", + "$id": "793", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7915,45 +8428,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModel", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "760", + "$id": "794", "kind": "client", "name": "SpreadDifferentModelArray", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "761", + "$id": "795", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "762", + "$id": "796", "name": "get", "resourceName": "SpreadDifferentModelArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "763", + "$id": "797", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "764", - "kind": "constant", - "valueType": { - "$id": "765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -7968,12 +8471,12 @@ ], "responses": [ { - "$id": "766", + "$id": "798", "statusCodes": [ 200 ], "bodyType": { - "$ref": "179" + "$ref": "300" }, "headers": [], "isErrorResponse": false, @@ -7993,11 +8496,11 @@ }, "parameters": [ { - "$id": "767", + "$id": "799", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "764" + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -8011,9 +8514,9 @@ } ], "response": { - "$id": "768", + "$id": "800", "type": { - "$ref": "179" + "$ref": "300" } }, "isOverride": false, @@ -8022,36 +8525,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModelArray.get" }, { - "$id": "769", + "$id": "801", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "770", + "$id": "802", "name": "put", "resourceName": "SpreadDifferentModelArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "771", + "$id": "803", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "772", - "kind": "constant", - "valueType": { - "$id": "773", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -8064,12 +8557,12 @@ "skipUrlEncoding": false }, { - "$id": "774", + "$id": "804", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "179" + "$ref": "300" }, "location": "Body", "isApiVersion": false, @@ -8084,7 +8577,7 @@ ], "responses": [ { - "$id": "775", + "$id": "805", "statusCodes": [ 204 ], @@ -8106,12 +8599,12 @@ }, "parameters": [ { - "$id": "776", + "$id": "806", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "179" + "$ref": "300" }, "location": "Body", "isApiVersion": false, @@ -8124,12 +8617,12 @@ "skipUrlEncoding": false }, { - "$id": "777", + "$id": "807", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "772" + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -8143,7 +8636,7 @@ } ], "response": { - "$id": "778" + "$id": "808" }, "isOverride": false, "generateConvenient": true, @@ -8153,12 +8646,12 @@ ], "parameters": [ { - "$id": "779", + "$id": "809", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "780", + "$id": "810", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8172,9 +8665,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "781", + "$id": "811", "type": { - "$id": "782", + "$id": "812", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8187,45 +8680,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadDifferentModelArray", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "783", + "$id": "813", "kind": "client", "name": "ExtendsDifferentSpreadString", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "784", + "$id": "814", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "785", + "$id": "815", "name": "get", "resourceName": "ExtendsDifferentSpreadString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "786", + "$id": "816", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "787", - "kind": "constant", - "valueType": { - "$id": "788", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -8240,12 +8723,12 @@ ], "responses": [ { - "$id": "789", + "$id": "817", "statusCodes": [ 200 ], "bodyType": { - "$ref": "185" + "$ref": "306" }, "headers": [], "isErrorResponse": false, @@ -8265,11 +8748,11 @@ }, "parameters": [ { - "$id": "790", + "$id": "818", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "787" + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -8283,9 +8766,9 @@ } ], "response": { - "$id": "791", + "$id": "819", "type": { - "$ref": "185" + "$ref": "306" } }, "isOverride": false, @@ -8294,36 +8777,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString.get" }, { - "$id": "792", + "$id": "820", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "793", + "$id": "821", "name": "put", "resourceName": "ExtendsDifferentSpreadString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "794", + "$id": "822", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "795", - "kind": "constant", - "valueType": { - "$id": "796", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -8336,12 +8809,12 @@ "skipUrlEncoding": false }, { - "$id": "797", + "$id": "823", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "185" + "$ref": "306" }, "location": "Body", "isApiVersion": false, @@ -8356,7 +8829,7 @@ ], "responses": [ { - "$id": "798", + "$id": "824", "statusCodes": [ 204 ], @@ -8378,12 +8851,12 @@ }, "parameters": [ { - "$id": "799", + "$id": "825", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "185" + "$ref": "306" }, "location": "Body", "isApiVersion": false, @@ -8396,12 +8869,12 @@ "skipUrlEncoding": false }, { - "$id": "800", + "$id": "826", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "795" + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -8415,7 +8888,7 @@ } ], "response": { - "$id": "801" + "$id": "827" }, "isOverride": false, "generateConvenient": true, @@ -8425,12 +8898,12 @@ ], "parameters": [ { - "$id": "802", + "$id": "828", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "803", + "$id": "829", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8444,9 +8917,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "804", + "$id": "830", "type": { - "$id": "805", + "$id": "831", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8459,45 +8932,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadString", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "806", + "$id": "832", "kind": "client", "name": "ExtendsDifferentSpreadFloat", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "807", + "$id": "833", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "808", + "$id": "834", "name": "get", "resourceName": "ExtendsDifferentSpreadFloat", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "809", + "$id": "835", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "810", - "kind": "constant", - "valueType": { - "$id": "811", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -8512,12 +8975,12 @@ ], "responses": [ { - "$id": "812", + "$id": "836", "statusCodes": [ 200 ], "bodyType": { - "$ref": "190" + "$ref": "311" }, "headers": [], "isErrorResponse": false, @@ -8537,11 +9000,11 @@ }, "parameters": [ { - "$id": "813", + "$id": "837", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "810" + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -8555,9 +9018,9 @@ } ], "response": { - "$id": "814", + "$id": "838", "type": { - "$ref": "190" + "$ref": "311" } }, "isOverride": false, @@ -8566,36 +9029,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat.get" }, { - "$id": "815", + "$id": "839", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "816", + "$id": "840", "name": "put", "resourceName": "ExtendsDifferentSpreadFloat", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "817", + "$id": "841", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "818", - "kind": "constant", - "valueType": { - "$id": "819", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -8608,12 +9061,12 @@ "skipUrlEncoding": false }, { - "$id": "820", + "$id": "842", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "190" + "$ref": "311" }, "location": "Body", "isApiVersion": false, @@ -8628,7 +9081,7 @@ ], "responses": [ { - "$id": "821", + "$id": "843", "statusCodes": [ 204 ], @@ -8650,12 +9103,12 @@ }, "parameters": [ { - "$id": "822", + "$id": "844", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "190" + "$ref": "311" }, "location": "Body", "isApiVersion": false, @@ -8668,12 +9121,12 @@ "skipUrlEncoding": false }, { - "$id": "823", + "$id": "845", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "818" + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -8687,7 +9140,7 @@ } ], "response": { - "$id": "824" + "$id": "846" }, "isOverride": false, "generateConvenient": true, @@ -8697,12 +9150,12 @@ ], "parameters": [ { - "$id": "825", + "$id": "847", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "826", + "$id": "848", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8716,9 +9169,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "827", + "$id": "849", "type": { - "$id": "828", + "$id": "850", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8731,45 +9184,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadFloat", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "829", + "$id": "851", "kind": "client", "name": "ExtendsDifferentSpreadModel", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "830", + "$id": "852", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "831", + "$id": "853", "name": "get", "resourceName": "ExtendsDifferentSpreadModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "832", + "$id": "854", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "833", - "kind": "constant", - "valueType": { - "$id": "834", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -8784,12 +9227,12 @@ ], "responses": [ { - "$id": "835", + "$id": "855", "statusCodes": [ 200 ], "bodyType": { - "$ref": "195" + "$ref": "316" }, "headers": [], "isErrorResponse": false, @@ -8809,11 +9252,11 @@ }, "parameters": [ { - "$id": "836", + "$id": "856", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "833" + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -8827,9 +9270,9 @@ } ], "response": { - "$id": "837", + "$id": "857", "type": { - "$ref": "195" + "$ref": "316" } }, "isOverride": false, @@ -8838,36 +9281,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel.get" }, { - "$id": "838", + "$id": "858", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "839", + "$id": "859", "name": "put", "resourceName": "ExtendsDifferentSpreadModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "840", + "$id": "860", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "841", - "kind": "constant", - "valueType": { - "$id": "842", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -8880,12 +9313,12 @@ "skipUrlEncoding": false }, { - "$id": "843", + "$id": "861", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "195" + "$ref": "316" }, "location": "Body", "isApiVersion": false, @@ -8900,7 +9333,7 @@ ], "responses": [ { - "$id": "844", + "$id": "862", "statusCodes": [ 204 ], @@ -8922,12 +9355,12 @@ }, "parameters": [ { - "$id": "845", + "$id": "863", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "195" + "$ref": "316" }, "location": "Body", "isApiVersion": false, @@ -8940,12 +9373,12 @@ "skipUrlEncoding": false }, { - "$id": "846", + "$id": "864", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "841" + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -8959,7 +9392,7 @@ } ], "response": { - "$id": "847" + "$id": "865" }, "isOverride": false, "generateConvenient": true, @@ -8969,12 +9402,12 @@ ], "parameters": [ { - "$id": "848", + "$id": "866", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "849", + "$id": "867", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8988,9 +9421,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "850", + "$id": "868", "type": { - "$id": "851", + "$id": "869", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9003,45 +9436,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModel", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "852", + "$id": "870", "kind": "client", "name": "ExtendsDifferentSpreadModelArray", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "853", + "$id": "871", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "854", + "$id": "872", "name": "get", "resourceName": "ExtendsDifferentSpreadModelArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "855", + "$id": "873", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "856", - "kind": "constant", - "valueType": { - "$id": "857", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -9056,12 +9479,12 @@ ], "responses": [ { - "$id": "858", + "$id": "874", "statusCodes": [ 200 ], "bodyType": { - "$ref": "199" + "$ref": "320" }, "headers": [], "isErrorResponse": false, @@ -9081,11 +9504,11 @@ }, "parameters": [ { - "$id": "859", + "$id": "875", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "856" + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -9099,9 +9522,9 @@ } ], "response": { - "$id": "860", + "$id": "876", "type": { - "$ref": "199" + "$ref": "320" } }, "isOverride": false, @@ -9110,36 +9533,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray.get" }, { - "$id": "861", + "$id": "877", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "862", + "$id": "878", "name": "put", "resourceName": "ExtendsDifferentSpreadModelArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "863", + "$id": "879", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "864", - "kind": "constant", - "valueType": { - "$id": "865", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -9152,12 +9565,12 @@ "skipUrlEncoding": false }, { - "$id": "866", + "$id": "880", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "199" + "$ref": "320" }, "location": "Body", "isApiVersion": false, @@ -9172,7 +9585,7 @@ ], "responses": [ { - "$id": "867", + "$id": "881", "statusCodes": [ 204 ], @@ -9194,12 +9607,12 @@ }, "parameters": [ { - "$id": "868", + "$id": "882", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "199" + "$ref": "320" }, "location": "Body", "isApiVersion": false, @@ -9212,12 +9625,12 @@ "skipUrlEncoding": false }, { - "$id": "869", + "$id": "883", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "864" + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -9231,7 +9644,7 @@ } ], "response": { - "$id": "870" + "$id": "884" }, "isOverride": false, "generateConvenient": true, @@ -9241,12 +9654,12 @@ ], "parameters": [ { - "$id": "871", + "$id": "885", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "872", + "$id": "886", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9260,9 +9673,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "873", + "$id": "887", "type": { - "$id": "874", + "$id": "888", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9275,45 +9688,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.ExtendsDifferentSpreadModelArray", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "875", + "$id": "889", "kind": "client", "name": "MultipleSpread", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "876", + "$id": "890", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "877", + "$id": "891", "name": "get", "resourceName": "MultipleSpread", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "878", + "$id": "892", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "879", - "kind": "constant", - "valueType": { - "$id": "880", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -9328,12 +9731,12 @@ ], "responses": [ { - "$id": "881", + "$id": "893", "statusCodes": [ 200 ], "bodyType": { - "$ref": "204" + "$ref": "325" }, "headers": [], "isErrorResponse": false, @@ -9353,11 +9756,11 @@ }, "parameters": [ { - "$id": "882", + "$id": "894", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "879" + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -9371,9 +9774,9 @@ } ], "response": { - "$id": "883", + "$id": "895", "type": { - "$ref": "204" + "$ref": "325" } }, "isOverride": false, @@ -9382,36 +9785,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpread.get" }, { - "$id": "884", + "$id": "896", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "885", + "$id": "897", "name": "put", "resourceName": "MultipleSpread", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "886", + "$id": "898", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "887", - "kind": "constant", - "valueType": { - "$id": "888", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -9424,12 +9817,12 @@ "skipUrlEncoding": false }, { - "$id": "889", + "$id": "899", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "204" + "$ref": "325" }, "location": "Body", "isApiVersion": false, @@ -9444,7 +9837,7 @@ ], "responses": [ { - "$id": "890", + "$id": "900", "statusCodes": [ 204 ], @@ -9466,12 +9859,12 @@ }, "parameters": [ { - "$id": "891", + "$id": "901", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "204" + "$ref": "325" }, "location": "Body", "isApiVersion": false, @@ -9484,12 +9877,12 @@ "skipUrlEncoding": false }, { - "$id": "892", + "$id": "902", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "887" + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -9503,7 +9896,7 @@ } ], "response": { - "$id": "893" + "$id": "903" }, "isOverride": false, "generateConvenient": true, @@ -9513,12 +9906,12 @@ ], "parameters": [ { - "$id": "894", + "$id": "904", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "895", + "$id": "905", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9532,9 +9925,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "896", + "$id": "906", "type": { - "$id": "897", + "$id": "907", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9547,45 +9940,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.MultipleSpread", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "898", + "$id": "908", "kind": "client", "name": "SpreadRecordUnion", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "899", + "$id": "909", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "900", + "$id": "910", "name": "get", "resourceName": "SpreadRecordUnion", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "901", + "$id": "911", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "902", - "kind": "constant", - "valueType": { - "$id": "903", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -9600,12 +9983,12 @@ ], "responses": [ { - "$id": "904", + "$id": "912", "statusCodes": [ 200 ], "bodyType": { - "$ref": "212" + "$ref": "333" }, "headers": [], "isErrorResponse": false, @@ -9625,11 +10008,11 @@ }, "parameters": [ { - "$id": "905", + "$id": "913", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "902" + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -9643,9 +10026,9 @@ } ], "response": { - "$id": "906", + "$id": "914", "type": { - "$ref": "212" + "$ref": "333" } }, "isOverride": false, @@ -9654,36 +10037,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordUnion.get" }, { - "$id": "907", + "$id": "915", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "908", + "$id": "916", "name": "put", "resourceName": "SpreadRecordUnion", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "909", + "$id": "917", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "910", - "kind": "constant", - "valueType": { - "$id": "911", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -9696,12 +10069,12 @@ "skipUrlEncoding": false }, { - "$id": "912", + "$id": "918", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "212" + "$ref": "333" }, "location": "Body", "isApiVersion": false, @@ -9716,7 +10089,7 @@ ], "responses": [ { - "$id": "913", + "$id": "919", "statusCodes": [ 204 ], @@ -9738,12 +10111,12 @@ }, "parameters": [ { - "$id": "914", + "$id": "920", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "212" + "$ref": "333" }, "location": "Body", "isApiVersion": false, @@ -9756,12 +10129,12 @@ "skipUrlEncoding": false }, { - "$id": "915", + "$id": "921", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "910" + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -9775,7 +10148,7 @@ } ], "response": { - "$id": "916" + "$id": "922" }, "isOverride": false, "generateConvenient": true, @@ -9785,12 +10158,12 @@ ], "parameters": [ { - "$id": "917", + "$id": "923", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "918", + "$id": "924", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9804,9 +10177,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "919", + "$id": "925", "type": { - "$id": "920", + "$id": "926", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9819,45 +10192,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordUnion", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "921", + "$id": "927", "kind": "client", "name": "SpreadRecordNonDiscriminatedUnion", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "922", + "$id": "928", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "923", + "$id": "929", "name": "get", "resourceName": "SpreadRecordNonDiscriminatedUnion", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "924", + "$id": "930", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "925", - "kind": "constant", - "valueType": { - "$id": "926", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -9872,12 +10235,12 @@ ], "responses": [ { - "$id": "927", + "$id": "931", "statusCodes": [ 200 ], "bodyType": { - "$ref": "220" + "$ref": "341" }, "headers": [], "isErrorResponse": false, @@ -9897,11 +10260,11 @@ }, "parameters": [ { - "$id": "928", + "$id": "932", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "925" + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -9915,9 +10278,9 @@ } ], "response": { - "$id": "929", + "$id": "933", "type": { - "$ref": "220" + "$ref": "341" } }, "isOverride": false, @@ -9926,36 +10289,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion.get" }, { - "$id": "930", + "$id": "934", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "931", + "$id": "935", "name": "put", "resourceName": "SpreadRecordNonDiscriminatedUnion", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "932", + "$id": "936", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "933", - "kind": "constant", - "valueType": { - "$id": "934", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -9968,12 +10321,12 @@ "skipUrlEncoding": false }, { - "$id": "935", + "$id": "937", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "220" + "$ref": "341" }, "location": "Body", "isApiVersion": false, @@ -9988,7 +10341,7 @@ ], "responses": [ { - "$id": "936", + "$id": "938", "statusCodes": [ 204 ], @@ -10010,12 +10363,12 @@ }, "parameters": [ { - "$id": "937", + "$id": "939", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "220" + "$ref": "341" }, "location": "Body", "isApiVersion": false, @@ -10028,12 +10381,12 @@ "skipUrlEncoding": false }, { - "$id": "938", + "$id": "940", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "933" + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -10047,7 +10400,7 @@ } ], "response": { - "$id": "939" + "$id": "941" }, "isOverride": false, "generateConvenient": true, @@ -10057,12 +10410,12 @@ ], "parameters": [ { - "$id": "940", + "$id": "942", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "941", + "$id": "943", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10076,9 +10429,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "942", + "$id": "944", "type": { - "$id": "943", + "$id": "945", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10091,45 +10444,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "944", + "$id": "946", "kind": "client", "name": "SpreadRecordNonDiscriminatedUnion2", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "945", + "$id": "947", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "946", + "$id": "948", "name": "get", "resourceName": "SpreadRecordNonDiscriminatedUnion2", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "947", + "$id": "949", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "948", - "kind": "constant", - "valueType": { - "$id": "949", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -10149,7 +10492,7 @@ 200 ], "bodyType": { - "$ref": "250" + "$ref": "369" }, "headers": [], "isErrorResponse": false, @@ -10173,7 +10516,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "948" + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -10189,7 +10532,7 @@ "response": { "$id": "952", "type": { - "$ref": "250" + "$ref": "369" } }, "isOverride": false, @@ -10217,17 +10560,7 @@ "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "956", - "kind": "constant", - "valueType": { - "$id": "957", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -10240,12 +10573,12 @@ "skipUrlEncoding": false }, { - "$id": "958", + "$id": "956", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "250" + "$ref": "369" }, "location": "Body", "isApiVersion": false, @@ -10260,7 +10593,7 @@ ], "responses": [ { - "$id": "959", + "$id": "957", "statusCodes": [ 204 ], @@ -10282,12 +10615,12 @@ }, "parameters": [ { - "$id": "960", + "$id": "958", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "250" + "$ref": "369" }, "location": "Body", "isApiVersion": false, @@ -10300,12 +10633,12 @@ "skipUrlEncoding": false }, { - "$id": "961", + "$id": "959", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "956" + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -10319,7 +10652,7 @@ } ], "response": { - "$id": "962" + "$id": "960" }, "isOverride": false, "generateConvenient": true, @@ -10329,12 +10662,12 @@ ], "parameters": [ { - "$id": "963", + "$id": "961", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "964", + "$id": "962", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10348,9 +10681,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "965", + "$id": "963", "type": { - "$id": "966", + "$id": "964", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10363,45 +10696,35 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion2", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } }, { - "$id": "967", + "$id": "965", "kind": "client", "name": "SpreadRecordNonDiscriminatedUnion3", "namespace": "Type.Property.AdditionalProperties", "methods": [ { - "$id": "968", + "$id": "966", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "969", + "$id": "967", "name": "get", "resourceName": "SpreadRecordNonDiscriminatedUnion3", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "970", + "$id": "968", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "971", - "kind": "constant", - "valueType": { - "$id": "972", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -10416,12 +10739,12 @@ ], "responses": [ { - "$id": "973", + "$id": "969", "statusCodes": [ 200 ], "bodyType": { - "$ref": "265" + "$ref": "383" }, "headers": [], "isErrorResponse": false, @@ -10441,11 +10764,11 @@ }, "parameters": [ { - "$id": "974", + "$id": "970", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "971" + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -10459,9 +10782,9 @@ } ], "response": { - "$id": "975", + "$id": "971", "type": { - "$ref": "265" + "$ref": "383" } }, "isOverride": false, @@ -10470,36 +10793,26 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3.get" }, { - "$id": "976", + "$id": "972", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "977", + "$id": "973", "name": "put", "resourceName": "SpreadRecordNonDiscriminatedUnion3", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "978", + "$id": "974", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "979", - "kind": "constant", - "valueType": { - "$id": "980", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -10512,12 +10825,12 @@ "skipUrlEncoding": false }, { - "$id": "981", + "$id": "975", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "265" + "$ref": "383" }, "location": "Body", "isApiVersion": false, @@ -10532,7 +10845,7 @@ ], "responses": [ { - "$id": "982", + "$id": "976", "statusCodes": [ 204 ], @@ -10554,12 +10867,12 @@ }, "parameters": [ { - "$id": "983", + "$id": "977", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "265" + "$ref": "383" }, "location": "Body", "isApiVersion": false, @@ -10572,12 +10885,12 @@ "skipUrlEncoding": false }, { - "$id": "984", + "$id": "978", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "979" + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -10591,7 +10904,7 @@ } ], "response": { - "$id": "985" + "$id": "979" }, "isOverride": false, "generateConvenient": true, @@ -10601,12 +10914,12 @@ ], "parameters": [ { - "$id": "986", + "$id": "980", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "987", + "$id": "981", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -10620,9 +10933,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "988", + "$id": "982", "type": { - "$id": "989", + "$id": "983", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -10635,7 +10948,7 @@ "crossLanguageDefinitionId": "Type.Property.AdditionalProperties.SpreadRecordNonDiscriminatedUnion3", "apiVersions": [], "parent": { - "$ref": "272" + "$ref": "390" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj index 4b0b98d84052..770bafcf8264 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/src/Type.Property.Nullable.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json index 6ff694c4dcee..eb675bd24f5f 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/nullable/tspCodeModel.json @@ -3,9 +3,683 @@ "name": "Type.Property.Nullable", "apiVersions": [], "enums": [], - "models": [ + "constants": [ { "$id": "2", + "kind": "constant", + "name": "getNonNullContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "getNullContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "PatchNonNullRequestContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "PatchNonNullRequestContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "PatchNonNullRequestContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "PatchNonNullRequestContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "getNonNullContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "getNullContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "PatchNonNullRequestContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "PatchNonNullRequestContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "PatchNonNullRequestContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "PatchNonNullRequestContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "getNonNullContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "getNullContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "PatchNonNullRequestContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "PatchNonNullRequestContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "PatchNonNullRequestContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "PatchNonNullRequestContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "getNonNullContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "getNullContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "PatchNonNullRequestContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "PatchNonNullRequestContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "PatchNonNullRequestContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "PatchNonNullRequestContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "getNonNullContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "getNullContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "PatchNonNullRequestContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "PatchNonNullRequestContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "PatchNonNullRequestContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "PatchNonNullRequestContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "getNonNullContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "getNullContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "PatchNonNullRequestContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "PatchNonNullRequestContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "PatchNonNullRequestContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "PatchNonNullRequestContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "getNonNullContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "getNullContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "PatchNonNullRequestContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "PatchNonNullRequestContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "PatchNonNullRequestContentType26", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "PatchNonNullRequestContentType27", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/merge-patch+json", + "decorators": [] + } + ], + "models": [ + { + "$id": "86", "kind": "model", "name": "StringProperty", "namespace": "Type.Property.Nullable", @@ -15,13 +689,13 @@ "decorators": [], "properties": [ { - "$id": "3", + "$id": "87", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "4", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -34,24 +708,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.StringProperty.requiredProperty", "serializationOptions": { - "$id": "5", + "$id": "89", "json": { - "$id": "6", + "$id": "90", "name": "requiredProperty" } } }, { - "$id": "7", + "$id": "91", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "8", + "$id": "92", "kind": "nullable", "type": { - "$id": "9", + "$id": "93", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -66,9 +740,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.StringProperty.nullableProperty", "serializationOptions": { - "$id": "10", + "$id": "94", "json": { - "$id": "11", + "$id": "95", "name": "nullableProperty" } } @@ -76,7 +750,7 @@ ] }, { - "$id": "12", + "$id": "96", "kind": "model", "name": "BytesProperty", "namespace": "Type.Property.Nullable", @@ -86,13 +760,13 @@ "decorators": [], "properties": [ { - "$id": "13", + "$id": "97", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "14", + "$id": "98", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -105,24 +779,24 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.BytesProperty.requiredProperty", "serializationOptions": { - "$id": "15", + "$id": "99", "json": { - "$id": "16", + "$id": "100", "name": "requiredProperty" } } }, { - "$id": "17", + "$id": "101", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "18", + "$id": "102", "kind": "nullable", "type": { - "$id": "19", + "$id": "103", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -138,9 +812,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.BytesProperty.nullableProperty", "serializationOptions": { - "$id": "20", + "$id": "104", "json": { - "$id": "21", + "$id": "105", "name": "nullableProperty" } } @@ -148,7 +822,7 @@ ] }, { - "$id": "22", + "$id": "106", "kind": "model", "name": "DatetimeProperty", "namespace": "Type.Property.Nullable", @@ -158,13 +832,13 @@ "decorators": [], "properties": [ { - "$id": "23", + "$id": "107", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "24", + "$id": "108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -177,29 +851,29 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.DatetimeProperty.requiredProperty", "serializationOptions": { - "$id": "25", + "$id": "109", "json": { - "$id": "26", + "$id": "110", "name": "requiredProperty" } } }, { - "$id": "27", + "$id": "111", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "28", + "$id": "112", "kind": "nullable", "type": { - "$id": "29", + "$id": "113", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "30", + "$id": "114", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -217,9 +891,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.DatetimeProperty.nullableProperty", "serializationOptions": { - "$id": "31", + "$id": "115", "json": { - "$id": "32", + "$id": "116", "name": "nullableProperty" } } @@ -227,7 +901,7 @@ ] }, { - "$id": "33", + "$id": "117", "kind": "model", "name": "DurationProperty", "namespace": "Type.Property.Nullable", @@ -237,13 +911,13 @@ "decorators": [], "properties": [ { - "$id": "34", + "$id": "118", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "35", + "$id": "119", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -256,29 +930,29 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.DurationProperty.requiredProperty", "serializationOptions": { - "$id": "36", + "$id": "120", "json": { - "$id": "37", + "$id": "121", "name": "requiredProperty" } } }, { - "$id": "38", + "$id": "122", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "39", + "$id": "123", "kind": "nullable", "type": { - "$id": "40", + "$id": "124", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "41", + "$id": "125", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -296,9 +970,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.DurationProperty.nullableProperty", "serializationOptions": { - "$id": "42", + "$id": "126", "json": { - "$id": "43", + "$id": "127", "name": "nullableProperty" } } @@ -306,7 +980,7 @@ ] }, { - "$id": "44", + "$id": "128", "kind": "model", "name": "CollectionsByteProperty", "namespace": "Type.Property.Nullable", @@ -316,13 +990,13 @@ "decorators": [], "properties": [ { - "$id": "45", + "$id": "129", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "46", + "$id": "130", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -335,28 +1009,28 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByteProperty.requiredProperty", "serializationOptions": { - "$id": "47", + "$id": "131", "json": { - "$id": "48", + "$id": "132", "name": "requiredProperty" } } }, { - "$id": "49", + "$id": "133", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "50", + "$id": "134", "kind": "nullable", "type": { - "$id": "51", + "$id": "135", "kind": "array", "name": "Array", "valueType": { - "$id": "52", + "$id": "136", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -375,9 +1049,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByteProperty.nullableProperty", "serializationOptions": { - "$id": "53", + "$id": "137", "json": { - "$id": "54", + "$id": "138", "name": "nullableProperty" } } @@ -385,7 +1059,7 @@ ] }, { - "$id": "55", + "$id": "139", "kind": "model", "name": "CollectionsModelProperty", "namespace": "Type.Property.Nullable", @@ -395,13 +1069,13 @@ "decorators": [], "properties": [ { - "$id": "56", + "$id": "140", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "57", + "$id": "141", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -414,28 +1088,28 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModelProperty.requiredProperty", "serializationOptions": { - "$id": "58", + "$id": "142", "json": { - "$id": "59", + "$id": "143", "name": "requiredProperty" } } }, { - "$id": "60", + "$id": "144", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "61", + "$id": "145", "kind": "nullable", "type": { - "$id": "62", + "$id": "146", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$id": "63", + "$id": "147", "kind": "model", "name": "InnerModel", "namespace": "Type.Property.Nullable", @@ -445,13 +1119,13 @@ "decorators": [], "properties": [ { - "$id": "64", + "$id": "148", "kind": "property", "name": "property", "serializedName": "property", "doc": "Inner model property", "type": { - "$id": "65", + "$id": "149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -464,9 +1138,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.InnerModel.property", "serializationOptions": { - "$id": "66", + "$id": "150", "json": { - "$id": "67", + "$id": "151", "name": "property" } } @@ -485,9 +1159,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModelProperty.nullableProperty", "serializationOptions": { - "$id": "68", + "$id": "152", "json": { - "$id": "69", + "$id": "153", "name": "nullableProperty" } } @@ -495,10 +1169,10 @@ ] }, { - "$ref": "63" + "$ref": "147" }, { - "$id": "70", + "$id": "154", "kind": "model", "name": "CollectionsStringProperty", "namespace": "Type.Property.Nullable", @@ -508,13 +1182,13 @@ "decorators": [], "properties": [ { - "$id": "71", + "$id": "155", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "Required property", "type": { - "$id": "72", + "$id": "156", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -527,28 +1201,28 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsStringProperty.requiredProperty", "serializationOptions": { - "$id": "73", + "$id": "157", "json": { - "$id": "74", + "$id": "158", "name": "requiredProperty" } } }, { - "$id": "75", + "$id": "159", "kind": "property", "name": "nullableProperty", "serializedName": "nullableProperty", "doc": "Property", "type": { - "$id": "76", + "$id": "160", "kind": "nullable", "type": { - "$id": "77", + "$id": "161", "kind": "array", "name": "Array1", "valueType": { - "$id": "78", + "$id": "162", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -566,9 +1240,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsStringProperty.nullableProperty", "serializationOptions": { - "$id": "79", + "$id": "163", "json": { - "$id": "80", + "$id": "164", "name": "nullableProperty" } } @@ -578,7 +1252,7 @@ ], "clients": [ { - "$id": "81", + "$id": "165", "kind": "client", "name": "NullableClient", "namespace": "Type.Property.Nullable", @@ -586,12 +1260,12 @@ "methods": [], "parameters": [ { - "$id": "82", + "$id": "166", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "83", + "$id": "167", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -605,9 +1279,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "84", + "$id": "168", "type": { - "$id": "85", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -621,41 +1295,31 @@ "apiVersions": [], "children": [ { - "$id": "86", + "$id": "170", "kind": "client", "name": "String", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "87", + "$id": "171", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "88", + "$id": "172", "name": "getNonNull", "resourceName": "String", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "89", + "$id": "173", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "90", - "kind": "constant", - "valueType": { - "$id": "91", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -670,12 +1334,12 @@ ], "responses": [ { - "$id": "92", + "$id": "174", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "86" }, "headers": [], "isErrorResponse": false, @@ -695,11 +1359,11 @@ }, "parameters": [ { - "$id": "93", + "$id": "175", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "90" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -713,9 +1377,9 @@ } ], "response": { - "$id": "94", + "$id": "176", "type": { - "$ref": "2" + "$ref": "86" } }, "isOverride": false, @@ -724,35 +1388,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.String.getNonNull" }, { - "$id": "95", + "$id": "177", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "96", + "$id": "178", "name": "getNull", "resourceName": "String", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "97", + "$id": "179", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "98", - "kind": "constant", - "valueType": { - "$id": "99", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -767,12 +1421,12 @@ ], "responses": [ { - "$id": "100", + "$id": "180", "statusCodes": [ 200 ], "bodyType": { - "$ref": "2" + "$ref": "86" }, "headers": [], "isErrorResponse": false, @@ -792,11 +1446,11 @@ }, "parameters": [ { - "$id": "101", + "$id": "181", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "98" + "$ref": "4" }, "location": "Header", "isApiVersion": false, @@ -810,9 +1464,9 @@ } ], "response": { - "$id": "102", + "$id": "182", "type": { - "$ref": "2" + "$ref": "86" } }, "isOverride": false, @@ -821,36 +1475,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.String.getNull" }, { - "$id": "103", + "$id": "183", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "104", + "$id": "184", "name": "patchNonNull", "resourceName": "String", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "105", + "$id": "185", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "106", - "kind": "constant", - "valueType": { - "$id": "107", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -863,11 +1507,11 @@ "skipUrlEncoding": false }, { - "$id": "108", + "$id": "186", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -882,7 +1526,7 @@ ], "responses": [ { - "$id": "109", + "$id": "187", "statusCodes": [ 204 ], @@ -904,22 +1548,12 @@ }, "parameters": [ { - "$id": "110", + "$id": "188", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "111", - "kind": "constant", - "valueType": { - "$id": "112", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -932,11 +1566,11 @@ "skipUrlEncoding": false }, { - "$id": "113", + "$id": "189", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -950,7 +1584,7 @@ } ], "response": { - "$id": "114" + "$id": "190" }, "isOverride": false, "generateConvenient": true, @@ -958,36 +1592,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.String.patchNonNull" }, { - "$id": "115", + "$id": "191", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "116", + "$id": "192", "name": "patchNull", "resourceName": "String", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "117", + "$id": "193", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "118", - "kind": "constant", - "valueType": { - "$id": "119", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -1000,11 +1624,11 @@ "skipUrlEncoding": false }, { - "$id": "120", + "$id": "194", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -1019,7 +1643,7 @@ ], "responses": [ { - "$id": "121", + "$id": "195", "statusCodes": [ 204 ], @@ -1041,22 +1665,12 @@ }, "parameters": [ { - "$id": "122", + "$id": "196", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "123", - "kind": "constant", - "valueType": { - "$id": "124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "12" }, "location": "Header", "isApiVersion": false, @@ -1069,11 +1683,11 @@ "skipUrlEncoding": false }, { - "$id": "125", + "$id": "197", "name": "body", "nameInRequest": "body", "type": { - "$ref": "2" + "$ref": "86" }, "location": "Body", "isApiVersion": false, @@ -1087,7 +1701,7 @@ } ], "response": { - "$id": "126" + "$id": "198" }, "isOverride": false, "generateConvenient": true, @@ -1097,12 +1711,12 @@ ], "parameters": [ { - "$id": "127", + "$id": "199", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "128", + "$id": "200", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1116,9 +1730,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "129", + "$id": "201", "type": { - "$id": "130", + "$id": "202", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1131,45 +1745,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.String", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "131", + "$id": "203", "kind": "client", "name": "Bytes", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "132", + "$id": "204", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "133", + "$id": "205", "name": "getNonNull", "resourceName": "Bytes", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "134", + "$id": "206", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "135", - "kind": "constant", - "valueType": { - "$id": "136", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1184,12 +1788,12 @@ ], "responses": [ { - "$id": "137", + "$id": "207", "statusCodes": [ 200 ], "bodyType": { - "$ref": "12" + "$ref": "96" }, "headers": [], "isErrorResponse": false, @@ -1209,11 +1813,11 @@ }, "parameters": [ { - "$id": "138", + "$id": "208", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "135" + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -1227,9 +1831,9 @@ } ], "response": { - "$id": "139", + "$id": "209", "type": { - "$ref": "12" + "$ref": "96" } }, "isOverride": false, @@ -1238,35 +1842,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Bytes.getNonNull" }, { - "$id": "140", + "$id": "210", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "141", + "$id": "211", "name": "getNull", "resourceName": "Bytes", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "142", + "$id": "212", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "143", - "kind": "constant", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1281,12 +1875,12 @@ ], "responses": [ { - "$id": "145", + "$id": "213", "statusCodes": [ 200 ], "bodyType": { - "$ref": "12" + "$ref": "96" }, "headers": [], "isErrorResponse": false, @@ -1306,11 +1900,11 @@ }, "parameters": [ { - "$id": "146", + "$id": "214", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "143" + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -1324,9 +1918,9 @@ } ], "response": { - "$id": "147", + "$id": "215", "type": { - "$ref": "12" + "$ref": "96" } }, "isOverride": false, @@ -1335,36 +1929,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Bytes.getNull" }, { - "$id": "148", + "$id": "216", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "149", + "$id": "217", "name": "patchNonNull", "resourceName": "Bytes", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "150", + "$id": "218", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "151", - "kind": "constant", - "valueType": { - "$id": "152", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -1377,11 +1961,11 @@ "skipUrlEncoding": false }, { - "$id": "153", + "$id": "219", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "96" }, "location": "Body", "isApiVersion": false, @@ -1396,7 +1980,7 @@ ], "responses": [ { - "$id": "154", + "$id": "220", "statusCodes": [ 204 ], @@ -1418,22 +2002,12 @@ }, "parameters": [ { - "$id": "155", + "$id": "221", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "156", - "kind": "constant", - "valueType": { - "$id": "157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "20" }, "location": "Header", "isApiVersion": false, @@ -1446,11 +2020,11 @@ "skipUrlEncoding": false }, { - "$id": "158", + "$id": "222", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "96" }, "location": "Body", "isApiVersion": false, @@ -1464,7 +2038,7 @@ } ], "response": { - "$id": "159" + "$id": "223" }, "isOverride": false, "generateConvenient": true, @@ -1472,36 +2046,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Bytes.patchNonNull" }, { - "$id": "160", + "$id": "224", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "161", + "$id": "225", "name": "patchNull", "resourceName": "Bytes", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "162", + "$id": "226", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "163", - "kind": "constant", - "valueType": { - "$id": "164", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -1514,11 +2078,11 @@ "skipUrlEncoding": false }, { - "$id": "165", + "$id": "227", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "96" }, "location": "Body", "isApiVersion": false, @@ -1533,7 +2097,7 @@ ], "responses": [ { - "$id": "166", + "$id": "228", "statusCodes": [ 204 ], @@ -1555,22 +2119,12 @@ }, "parameters": [ { - "$id": "167", + "$id": "229", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "168", - "kind": "constant", - "valueType": { - "$id": "169", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -1583,11 +2137,11 @@ "skipUrlEncoding": false }, { - "$id": "170", + "$id": "230", "name": "body", "nameInRequest": "body", "type": { - "$ref": "12" + "$ref": "96" }, "location": "Body", "isApiVersion": false, @@ -1601,7 +2155,7 @@ } ], "response": { - "$id": "171" + "$id": "231" }, "isOverride": false, "generateConvenient": true, @@ -1611,12 +2165,12 @@ ], "parameters": [ { - "$id": "172", + "$id": "232", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "173", + "$id": "233", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1630,9 +2184,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "174", + "$id": "234", "type": { - "$id": "175", + "$id": "235", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1645,45 +2199,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Bytes", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "176", + "$id": "236", "kind": "client", "name": "Datetime", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "177", + "$id": "237", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "178", + "$id": "238", "name": "getNonNull", "resourceName": "Datetime", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "179", + "$id": "239", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "180", - "kind": "constant", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -1698,12 +2242,12 @@ ], "responses": [ { - "$id": "182", + "$id": "240", "statusCodes": [ 200 ], "bodyType": { - "$ref": "22" + "$ref": "106" }, "headers": [], "isErrorResponse": false, @@ -1723,11 +2267,11 @@ }, "parameters": [ { - "$id": "183", + "$id": "241", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "180" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -1741,9 +2285,9 @@ } ], "response": { - "$id": "184", + "$id": "242", "type": { - "$ref": "22" + "$ref": "106" } }, "isOverride": false, @@ -1752,35 +2296,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Datetime.getNonNull" }, { - "$id": "185", + "$id": "243", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "186", + "$id": "244", "name": "getNull", "resourceName": "Datetime", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "187", + "$id": "245", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "188", - "kind": "constant", - "valueType": { - "$id": "189", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -1795,12 +2329,12 @@ ], "responses": [ { - "$id": "190", + "$id": "246", "statusCodes": [ 200 ], "bodyType": { - "$ref": "22" + "$ref": "106" }, "headers": [], "isErrorResponse": false, @@ -1820,11 +2354,11 @@ }, "parameters": [ { - "$id": "191", + "$id": "247", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "188" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -1838,9 +2372,9 @@ } ], "response": { - "$id": "192", + "$id": "248", "type": { - "$ref": "22" + "$ref": "106" } }, "isOverride": false, @@ -1849,36 +2383,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Datetime.getNull" }, { - "$id": "193", + "$id": "249", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "194", + "$id": "250", "name": "patchNonNull", "resourceName": "Datetime", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "195", + "$id": "251", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "196", - "kind": "constant", - "valueType": { - "$id": "197", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -1891,11 +2415,11 @@ "skipUrlEncoding": false }, { - "$id": "198", + "$id": "252", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "106" }, "location": "Body", "isApiVersion": false, @@ -1910,7 +2434,7 @@ ], "responses": [ { - "$id": "199", + "$id": "253", "statusCodes": [ 204 ], @@ -1932,22 +2456,12 @@ }, "parameters": [ { - "$id": "200", + "$id": "254", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "201", - "kind": "constant", - "valueType": { - "$id": "202", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -1960,11 +2474,11 @@ "skipUrlEncoding": false }, { - "$id": "203", + "$id": "255", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "106" }, "location": "Body", "isApiVersion": false, @@ -1978,7 +2492,7 @@ } ], "response": { - "$id": "204" + "$id": "256" }, "isOverride": false, "generateConvenient": true, @@ -1986,36 +2500,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Datetime.patchNonNull" }, { - "$id": "205", + "$id": "257", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "206", + "$id": "258", "name": "patchNull", "resourceName": "Datetime", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "207", + "$id": "259", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "208", - "kind": "constant", - "valueType": { - "$id": "209", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -2028,11 +2532,11 @@ "skipUrlEncoding": false }, { - "$id": "210", + "$id": "260", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "106" }, "location": "Body", "isApiVersion": false, @@ -2047,7 +2551,7 @@ ], "responses": [ { - "$id": "211", + "$id": "261", "statusCodes": [ 204 ], @@ -2069,22 +2573,12 @@ }, "parameters": [ { - "$id": "212", + "$id": "262", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "213", - "kind": "constant", - "valueType": { - "$id": "214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -2097,11 +2591,11 @@ "skipUrlEncoding": false }, { - "$id": "215", + "$id": "263", "name": "body", "nameInRequest": "body", "type": { - "$ref": "22" + "$ref": "106" }, "location": "Body", "isApiVersion": false, @@ -2115,7 +2609,7 @@ } ], "response": { - "$id": "216" + "$id": "264" }, "isOverride": false, "generateConvenient": true, @@ -2125,12 +2619,12 @@ ], "parameters": [ { - "$id": "217", + "$id": "265", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "218", + "$id": "266", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2144,9 +2638,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "219", + "$id": "267", "type": { - "$id": "220", + "$id": "268", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2159,45 +2653,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Datetime", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "221", + "$id": "269", "kind": "client", "name": "Duration", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "222", + "$id": "270", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "223", + "$id": "271", "name": "getNonNull", "resourceName": "Duration", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "224", + "$id": "272", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "225", - "kind": "constant", - "valueType": { - "$id": "226", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2212,12 +2696,12 @@ ], "responses": [ { - "$id": "227", + "$id": "273", "statusCodes": [ 200 ], "bodyType": { - "$ref": "33" + "$ref": "117" }, "headers": [], "isErrorResponse": false, @@ -2237,11 +2721,11 @@ }, "parameters": [ { - "$id": "228", + "$id": "274", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "225" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -2255,9 +2739,9 @@ } ], "response": { - "$id": "229", + "$id": "275", "type": { - "$ref": "33" + "$ref": "117" } }, "isOverride": false, @@ -2266,35 +2750,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Duration.getNonNull" }, { - "$id": "230", + "$id": "276", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "231", + "$id": "277", "name": "getNull", "resourceName": "Duration", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "232", + "$id": "278", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "233", - "kind": "constant", - "valueType": { - "$id": "234", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -2309,12 +2783,12 @@ ], "responses": [ { - "$id": "235", + "$id": "279", "statusCodes": [ 200 ], "bodyType": { - "$ref": "33" + "$ref": "117" }, "headers": [], "isErrorResponse": false, @@ -2334,11 +2808,11 @@ }, "parameters": [ { - "$id": "236", + "$id": "280", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "233" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -2352,9 +2826,9 @@ } ], "response": { - "$id": "237", + "$id": "281", "type": { - "$ref": "33" + "$ref": "117" } }, "isOverride": false, @@ -2363,36 +2837,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Duration.getNull" }, { - "$id": "238", + "$id": "282", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "239", + "$id": "283", "name": "patchNonNull", "resourceName": "Duration", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "240", + "$id": "284", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "241", - "kind": "constant", - "valueType": { - "$id": "242", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -2405,11 +2869,11 @@ "skipUrlEncoding": false }, { - "$id": "243", + "$id": "285", "name": "body", "nameInRequest": "body", "type": { - "$ref": "33" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2424,7 +2888,7 @@ ], "responses": [ { - "$id": "244", + "$id": "286", "statusCodes": [ 204 ], @@ -2446,22 +2910,12 @@ }, "parameters": [ { - "$id": "245", + "$id": "287", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "246", - "kind": "constant", - "valueType": { - "$id": "247", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -2474,11 +2928,11 @@ "skipUrlEncoding": false }, { - "$id": "248", + "$id": "288", "name": "body", "nameInRequest": "body", "type": { - "$ref": "33" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2492,7 +2946,7 @@ } ], "response": { - "$id": "249" + "$id": "289" }, "isOverride": false, "generateConvenient": true, @@ -2500,36 +2954,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Duration.patchNonNull" }, { - "$id": "250", + "$id": "290", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "251", + "$id": "291", "name": "patchNull", "resourceName": "Duration", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "252", + "$id": "292", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "253", - "kind": "constant", - "valueType": { - "$id": "254", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -2542,11 +2986,11 @@ "skipUrlEncoding": false }, { - "$id": "255", + "$id": "293", "name": "body", "nameInRequest": "body", "type": { - "$ref": "33" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2561,7 +3005,7 @@ ], "responses": [ { - "$id": "256", + "$id": "294", "statusCodes": [ 204 ], @@ -2583,22 +3027,12 @@ }, "parameters": [ { - "$id": "257", + "$id": "295", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "258", - "kind": "constant", - "valueType": { - "$id": "259", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2611,11 +3045,11 @@ "skipUrlEncoding": false }, { - "$id": "260", + "$id": "296", "name": "body", "nameInRequest": "body", "type": { - "$ref": "33" + "$ref": "117" }, "location": "Body", "isApiVersion": false, @@ -2629,7 +3063,7 @@ } ], "response": { - "$id": "261" + "$id": "297" }, "isOverride": false, "generateConvenient": true, @@ -2639,12 +3073,12 @@ ], "parameters": [ { - "$id": "262", + "$id": "298", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "263", + "$id": "299", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2658,9 +3092,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "264", + "$id": "300", "type": { - "$id": "265", + "$id": "301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2673,45 +3107,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.Duration", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "266", + "$id": "302", "kind": "client", "name": "CollectionsByte", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "267", + "$id": "303", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "268", + "$id": "304", "name": "getNonNull", "resourceName": "CollectionsByte", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "269", + "$id": "305", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "270", - "kind": "constant", - "valueType": { - "$id": "271", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2726,12 +3150,12 @@ ], "responses": [ { - "$id": "272", + "$id": "306", "statusCodes": [ 200 ], "bodyType": { - "$ref": "44" + "$ref": "128" }, "headers": [], "isErrorResponse": false, @@ -2751,11 +3175,11 @@ }, "parameters": [ { - "$id": "273", + "$id": "307", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "270" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2769,9 +3193,9 @@ } ], "response": { - "$id": "274", + "$id": "308", "type": { - "$ref": "44" + "$ref": "128" } }, "isOverride": false, @@ -2780,35 +3204,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.getNonNull" }, { - "$id": "275", + "$id": "309", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "276", + "$id": "310", "name": "getNull", "resourceName": "CollectionsByte", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "277", + "$id": "311", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "278", - "kind": "constant", - "valueType": { - "$id": "279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2823,12 +3237,12 @@ ], "responses": [ { - "$id": "280", + "$id": "312", "statusCodes": [ 200 ], "bodyType": { - "$ref": "44" + "$ref": "128" }, "headers": [], "isErrorResponse": false, @@ -2848,11 +3262,11 @@ }, "parameters": [ { - "$id": "281", + "$id": "313", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "278" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2866,9 +3280,9 @@ } ], "response": { - "$id": "282", + "$id": "314", "type": { - "$ref": "44" + "$ref": "128" } }, "isOverride": false, @@ -2877,36 +3291,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.getNull" }, { - "$id": "283", + "$id": "315", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "284", + "$id": "316", "name": "patchNonNull", "resourceName": "CollectionsByte", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "285", + "$id": "317", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "286", - "kind": "constant", - "valueType": { - "$id": "287", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -2919,11 +3323,11 @@ "skipUrlEncoding": false }, { - "$id": "288", + "$id": "318", "name": "body", "nameInRequest": "body", "type": { - "$ref": "44" + "$ref": "128" }, "location": "Body", "isApiVersion": false, @@ -2938,7 +3342,7 @@ ], "responses": [ { - "$id": "289", + "$id": "319", "statusCodes": [ 204 ], @@ -2960,22 +3364,12 @@ }, "parameters": [ { - "$id": "290", + "$id": "320", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "291", - "kind": "constant", - "valueType": { - "$id": "292", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -2988,11 +3382,11 @@ "skipUrlEncoding": false }, { - "$id": "293", + "$id": "321", "name": "body", "nameInRequest": "body", "type": { - "$ref": "44" + "$ref": "128" }, "location": "Body", "isApiVersion": false, @@ -3006,7 +3400,7 @@ } ], "response": { - "$id": "294" + "$id": "322" }, "isOverride": false, "generateConvenient": true, @@ -3014,36 +3408,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte.patchNonNull" }, { - "$id": "295", + "$id": "323", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "296", + "$id": "324", "name": "patchNull", "resourceName": "CollectionsByte", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "297", + "$id": "325", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "298", - "kind": "constant", - "valueType": { - "$id": "299", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -3056,11 +3440,11 @@ "skipUrlEncoding": false }, { - "$id": "300", + "$id": "326", "name": "body", "nameInRequest": "body", "type": { - "$ref": "44" + "$ref": "128" }, "location": "Body", "isApiVersion": false, @@ -3075,7 +3459,7 @@ ], "responses": [ { - "$id": "301", + "$id": "327", "statusCodes": [ 204 ], @@ -3097,22 +3481,12 @@ }, "parameters": [ { - "$id": "302", + "$id": "328", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "303", - "kind": "constant", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -3125,11 +3499,11 @@ "skipUrlEncoding": false }, { - "$id": "305", + "$id": "329", "name": "body", "nameInRequest": "body", "type": { - "$ref": "44" + "$ref": "128" }, "location": "Body", "isApiVersion": false, @@ -3143,7 +3517,7 @@ } ], "response": { - "$id": "306" + "$id": "330" }, "isOverride": false, "generateConvenient": true, @@ -3153,12 +3527,12 @@ ], "parameters": [ { - "$id": "307", + "$id": "331", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "308", + "$id": "332", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3172,9 +3546,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "309", + "$id": "333", "type": { - "$id": "310", + "$id": "334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3187,45 +3561,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsByte", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "311", + "$id": "335", "kind": "client", "name": "CollectionsModel", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "312", + "$id": "336", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "313", + "$id": "337", "name": "getNonNull", "resourceName": "CollectionsModel", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "314", + "$id": "338", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "315", - "kind": "constant", - "valueType": { - "$id": "316", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -3240,12 +3604,12 @@ ], "responses": [ { - "$id": "317", + "$id": "339", "statusCodes": [ 200 ], "bodyType": { - "$ref": "55" + "$ref": "139" }, "headers": [], "isErrorResponse": false, @@ -3265,11 +3629,11 @@ }, "parameters": [ { - "$id": "318", + "$id": "340", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "315" + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -3283,9 +3647,9 @@ } ], "response": { - "$id": "319", + "$id": "341", "type": { - "$ref": "55" + "$ref": "139" } }, "isOverride": false, @@ -3294,35 +3658,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.getNonNull" }, { - "$id": "320", + "$id": "342", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "321", + "$id": "343", "name": "getNull", "resourceName": "CollectionsModel", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "322", + "$id": "344", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "323", - "kind": "constant", - "valueType": { - "$id": "324", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3337,12 +3691,12 @@ ], "responses": [ { - "$id": "325", + "$id": "345", "statusCodes": [ 200 ], "bodyType": { - "$ref": "55" + "$ref": "139" }, "headers": [], "isErrorResponse": false, @@ -3362,11 +3716,11 @@ }, "parameters": [ { - "$id": "326", + "$id": "346", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "323" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3380,9 +3734,9 @@ } ], "response": { - "$id": "327", + "$id": "347", "type": { - "$ref": "55" + "$ref": "139" } }, "isOverride": false, @@ -3391,36 +3745,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.getNull" }, { - "$id": "328", + "$id": "348", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "329", + "$id": "349", "name": "patchNonNull", "resourceName": "CollectionsModel", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "330", + "$id": "350", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "331", - "kind": "constant", - "valueType": { - "$id": "332", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -3433,11 +3777,11 @@ "skipUrlEncoding": false }, { - "$id": "333", + "$id": "351", "name": "body", "nameInRequest": "body", "type": { - "$ref": "55" + "$ref": "139" }, "location": "Body", "isApiVersion": false, @@ -3452,7 +3796,7 @@ ], "responses": [ { - "$id": "334", + "$id": "352", "statusCodes": [ 204 ], @@ -3474,22 +3818,12 @@ }, "parameters": [ { - "$id": "335", + "$id": "353", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "336", - "kind": "constant", - "valueType": { - "$id": "337", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -3502,11 +3836,11 @@ "skipUrlEncoding": false }, { - "$id": "338", + "$id": "354", "name": "body", "nameInRequest": "body", "type": { - "$ref": "55" + "$ref": "139" }, "location": "Body", "isApiVersion": false, @@ -3520,7 +3854,7 @@ } ], "response": { - "$id": "339" + "$id": "355" }, "isOverride": false, "generateConvenient": true, @@ -3528,36 +3862,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel.patchNonNull" }, { - "$id": "340", + "$id": "356", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "341", + "$id": "357", "name": "patchNull", "resourceName": "CollectionsModel", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "342", + "$id": "358", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "343", - "kind": "constant", - "valueType": { - "$id": "344", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -3570,11 +3894,11 @@ "skipUrlEncoding": false }, { - "$id": "345", + "$id": "359", "name": "body", "nameInRequest": "body", "type": { - "$ref": "55" + "$ref": "139" }, "location": "Body", "isApiVersion": false, @@ -3589,7 +3913,7 @@ ], "responses": [ { - "$id": "346", + "$id": "360", "statusCodes": [ 204 ], @@ -3611,22 +3935,12 @@ }, "parameters": [ { - "$id": "347", + "$id": "361", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "348", - "kind": "constant", - "valueType": { - "$id": "349", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -3639,11 +3953,11 @@ "skipUrlEncoding": false }, { - "$id": "350", + "$id": "362", "name": "body", "nameInRequest": "body", "type": { - "$ref": "55" + "$ref": "139" }, "location": "Body", "isApiVersion": false, @@ -3657,7 +3971,7 @@ } ], "response": { - "$id": "351" + "$id": "363" }, "isOverride": false, "generateConvenient": true, @@ -3667,12 +3981,12 @@ ], "parameters": [ { - "$id": "352", + "$id": "364", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "353", + "$id": "365", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3686,9 +4000,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "354", + "$id": "366", "type": { - "$id": "355", + "$id": "367", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3701,45 +4015,35 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsModel", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } }, { - "$id": "356", + "$id": "368", "kind": "client", "name": "CollectionsString", "namespace": "Type.Property.Nullable", "methods": [ { - "$id": "357", + "$id": "369", "kind": "basic", "name": "getNonNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "358", + "$id": "370", "name": "getNonNull", "resourceName": "CollectionsString", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "359", + "$id": "371", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "360", - "kind": "constant", - "valueType": { - "$id": "361", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3754,12 +4058,12 @@ ], "responses": [ { - "$id": "362", + "$id": "372", "statusCodes": [ 200 ], "bodyType": { - "$ref": "70" + "$ref": "154" }, "headers": [], "isErrorResponse": false, @@ -3779,11 +4083,11 @@ }, "parameters": [ { - "$id": "363", + "$id": "373", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "360" + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3797,9 +4101,9 @@ } ], "response": { - "$id": "364", + "$id": "374", "type": { - "$ref": "70" + "$ref": "154" } }, "isOverride": false, @@ -3808,35 +4112,25 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.getNonNull" }, { - "$id": "365", + "$id": "375", "kind": "basic", "name": "getNull", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "366", + "$id": "376", "name": "getNull", "resourceName": "CollectionsString", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "367", + "$id": "377", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "368", - "kind": "constant", - "valueType": { - "$id": "369", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -3851,12 +4145,12 @@ ], "responses": [ { - "$id": "370", + "$id": "378", "statusCodes": [ 200 ], "bodyType": { - "$ref": "70" + "$ref": "154" }, "headers": [], "isErrorResponse": false, @@ -3876,11 +4170,11 @@ }, "parameters": [ { - "$id": "371", + "$id": "379", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "368" + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -3894,9 +4188,9 @@ } ], "response": { - "$id": "372", + "$id": "380", "type": { - "$ref": "70" + "$ref": "154" } }, "isOverride": false, @@ -3905,36 +4199,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.getNull" }, { - "$id": "373", + "$id": "381", "kind": "basic", "name": "patchNonNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "374", + "$id": "382", "name": "patchNonNull", "resourceName": "CollectionsString", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "375", + "$id": "383", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "376", - "kind": "constant", - "valueType": { - "$id": "377", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -3947,11 +4231,11 @@ "skipUrlEncoding": false }, { - "$id": "378", + "$id": "384", "name": "body", "nameInRequest": "body", "type": { - "$ref": "70" + "$ref": "154" }, "location": "Body", "isApiVersion": false, @@ -3966,7 +4250,7 @@ ], "responses": [ { - "$id": "379", + "$id": "385", "statusCodes": [ 204 ], @@ -3988,22 +4272,12 @@ }, "parameters": [ { - "$id": "380", + "$id": "386", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "381", - "kind": "constant", - "valueType": { - "$id": "382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -4016,11 +4290,11 @@ "skipUrlEncoding": false }, { - "$id": "383", + "$id": "387", "name": "body", "nameInRequest": "body", "type": { - "$ref": "70" + "$ref": "154" }, "location": "Body", "isApiVersion": false, @@ -4034,7 +4308,7 @@ } ], "response": { - "$id": "384" + "$id": "388" }, "isOverride": false, "generateConvenient": true, @@ -4042,36 +4316,26 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString.patchNonNull" }, { - "$id": "385", + "$id": "389", "kind": "basic", "name": "patchNull", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "386", + "$id": "390", "name": "patchNull", "resourceName": "CollectionsString", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "387", + "$id": "391", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "388", - "kind": "constant", - "valueType": { - "$id": "389", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -4084,11 +4348,11 @@ "skipUrlEncoding": false }, { - "$id": "390", + "$id": "392", "name": "body", "nameInRequest": "body", "type": { - "$ref": "70" + "$ref": "154" }, "location": "Body", "isApiVersion": false, @@ -4103,7 +4367,7 @@ ], "responses": [ { - "$id": "391", + "$id": "393", "statusCodes": [ 204 ], @@ -4125,22 +4389,12 @@ }, "parameters": [ { - "$id": "392", + "$id": "394", "name": "contentType", "nameInRequest": "Content-Type", "doc": "content-type is application/merge-patch+json", "type": { - "$id": "393", - "kind": "constant", - "valueType": { - "$id": "394", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/merge-patch+json", - "decorators": [] + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -4157,7 +4411,7 @@ "name": "body", "nameInRequest": "body", "type": { - "$ref": "70" + "$ref": "154" }, "location": "Body", "isApiVersion": false, @@ -4215,7 +4469,7 @@ "crossLanguageDefinitionId": "Type.Property.Nullable.CollectionsString", "apiVersions": [], "parent": { - "$ref": "81" + "$ref": "165" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs index d0c630a5d6de..edc42ac35551 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralProperty.cs @@ -11,7 +11,7 @@ public partial class FloatLiteralProperty { public FloatLiteralProperty() => throw null; - public FloatLiteralPropertyProperty? Property + public float? Property { get => throw null; set => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs deleted file mode 100644 index c8467c6d6429..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace _Type.Property.Optional -{ - public readonly partial struct FloatLiteralPropertyProperty - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs deleted file mode 100644 index de9e7e14fbf4..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/FloatLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.Optional -{ - public readonly partial struct FloatLiteralPropertyProperty : IEquatable - { - public FloatLiteralPropertyProperty(float value) => throw null; - - public static FloatLiteralPropertyProperty _125 => throw null; - - public static bool operator ==(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; - - public static bool operator !=(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator FloatLiteralPropertyProperty(float value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(FloatLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs index fb59e2a35cae..b793b22db010 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralProperty.cs @@ -11,7 +11,7 @@ public partial class IntLiteralProperty { public IntLiteralProperty() => throw null; - public IntLiteralPropertyProperty? Property + public int? Property { get => throw null; set => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs deleted file mode 100644 index 0f5ea58370f9..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace _Type.Property.Optional -{ - public readonly partial struct IntLiteralPropertyProperty - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs deleted file mode 100644 index 8d041e4d7520..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/IntLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.Optional -{ - public readonly partial struct IntLiteralPropertyProperty : IEquatable - { - public IntLiteralPropertyProperty(int value) => throw null; - - public static IntLiteralPropertyProperty _1 => throw null; - - public static bool operator ==(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; - - public static bool operator !=(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator IntLiteralPropertyProperty(int value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(IntLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs index 0c327ff661ae..dd649231865c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralProperty.cs @@ -11,7 +11,7 @@ public partial class StringLiteralProperty { public StringLiteralProperty() => throw null; - public StringLiteralPropertyProperty? Property + public string Property { get => throw null; set => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs deleted file mode 100644 index a377c00aaafa..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/Models/StringLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.Optional -{ - public readonly partial struct StringLiteralPropertyProperty : IEquatable - { - public StringLiteralPropertyProperty(string value) => throw null; - - public static StringLiteralPropertyProperty Hello => throw null; - - public static bool operator ==(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; - - public static bool operator !=(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator StringLiteralPropertyProperty(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(StringLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs index 6a58271398d4..e6ee39ff14bd 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Generated/TypePropertyOptionalModelFactory.cs @@ -28,11 +28,11 @@ public static partial class TypePropertyOptionalModelFactory public static CollectionsModelProperty CollectionsModelProperty(IEnumerable @property = default) => throw null; - public static StringLiteralProperty StringLiteralProperty(StringLiteralPropertyProperty? @property = default) => throw null; + public static StringLiteralProperty StringLiteralProperty(string @property = default) => throw null; - public static IntLiteralProperty IntLiteralProperty(IntLiteralPropertyProperty? @property = default) => throw null; + public static IntLiteralProperty IntLiteralProperty(int? @property = default) => throw null; - public static FloatLiteralProperty FloatLiteralProperty(FloatLiteralPropertyProperty? @property = default) => throw null; + public static FloatLiteralProperty FloatLiteralProperty(float? @property = default) => throw null; public static BooleanLiteralProperty BooleanLiteralProperty(bool? @property = default) => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj index a5fb2e3c370c..10dd93ce79e9 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/src/Type.Property.Optional.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json index 993169247516..86a216bd7a94 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/optionality/tspCodeModel.json @@ -6,112 +6,10 @@ { "$id": "2", "kind": "enum", - "name": "StringLiteralProperty_property", - "valueType": { - "$id": "3", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "values": [ - { - "$id": "4", - "kind": "enumvalue", - "name": "hello", - "value": "hello", - "doc": "hello", - "valueType": { - "$ref": "3" - }, - "enumType": { - "$ref": "2" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.Optional", - "doc": "The StringLiteralProperty_property", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "5", - "kind": "enum", - "name": "IntLiteralProperty_property", - "valueType": { - "$id": "6", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "values": [ - { - "$id": "7", - "kind": "enumvalue", - "name": "1", - "value": 1, - "doc": "1", - "valueType": { - "$ref": "6" - }, - "enumType": { - "$ref": "5" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.Optional", - "doc": "The IntLiteralProperty_property", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "8", - "kind": "enum", - "name": "FloatLiteralProperty_property", - "valueType": { - "$id": "9", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "values": [ - { - "$id": "10", - "kind": "enumvalue", - "name": "1.25", - "value": 1.25, - "doc": "1.25", - "valueType": { - "$ref": "9" - }, - "enumType": { - "$ref": "8" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.Optional", - "doc": "The FloatLiteralProperty_property", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", - "decorators": [] - }, - { - "$id": "11", - "kind": "enum", "name": "UnionStringLiteralPropertyProperty", "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteralProperty.property.anonymous", "valueType": { - "$id": "12", + "$id": "3", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -119,36 +17,36 @@ }, "values": [ { - "$id": "13", + "$id": "4", "kind": "enumvalue", "name": "hello", "value": "hello", "valueType": { - "$id": "14", + "$id": "5", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "11" + "$ref": "2" }, "decorators": [] }, { - "$id": "15", + "$id": "6", "kind": "enumvalue", "name": "world", "value": "world", "valueType": { - "$id": "16", + "$id": "7", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "11" + "$ref": "2" }, "decorators": [] } @@ -160,12 +58,12 @@ "decorators": [] }, { - "$id": "17", + "$id": "8", "kind": "enum", "name": "UnionIntLiteralPropertyProperty", "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteralProperty.property.anonymous", "valueType": { - "$id": "18", + "$id": "9", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -173,36 +71,36 @@ }, "values": [ { - "$id": "19", + "$id": "10", "kind": "enumvalue", "name": "1", "value": 1, "valueType": { - "$id": "20", + "$id": "11", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "17" + "$ref": "8" }, "decorators": [] }, { - "$id": "21", + "$id": "12", "kind": "enumvalue", "name": "2", "value": 2, "valueType": { - "$id": "22", + "$id": "13", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, "enumType": { - "$ref": "17" + "$ref": "8" }, "decorators": [] } @@ -214,12 +112,12 @@ "decorators": [] }, { - "$id": "23", + "$id": "14", "kind": "enum", "name": "UnionFloatLiteralPropertyProperty", "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteralProperty.property.anonymous", "valueType": { - "$id": "24", + "$id": "15", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -227,50 +125,1140 @@ }, "values": [ { - "$id": "25", + "$id": "16", "kind": "enumvalue", "name": "1.25", "value": 1.25, "valueType": { - "$id": "26", + "$id": "17", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "23" + "$ref": "14" }, "decorators": [] }, { - "$id": "27", + "$id": "18", "kind": "enumvalue", "name": "2.375", "value": 2.375, "valueType": { - "$id": "28", + "$id": "19", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", "decorators": [] }, "enumType": { - "$ref": "23" + "$ref": "14" }, "decorators": [] } ], "namespace": "", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + } + ], + "constants": [ + { + "$id": "20", + "kind": "constant", + "name": "StringLiteralPropertyProperty", + "namespace": "Type.Property.Optional", + "usage": "Input,Output,Json", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "hello", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "IntLiteralPropertyProperty", + "namespace": "Type.Property.Optional", + "usage": "Input,Output,Json", + "valueType": { + "$id": "23", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 1, + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "FloatLiteralPropertyProperty", + "namespace": "Type.Property.Optional", + "usage": "Input,Output,Json", + "valueType": { + "$id": "25", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 1.25, + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "BooleanLiteralPropertyProperty", + "namespace": "Type.Property.Optional", + "usage": "Input,Output,Json", + "valueType": { + "$id": "27", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "getAllContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "getDefaultContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "putAllContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "putDefaultContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "getAllContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "getDefaultContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "putAllContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "putDefaultContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "getAllContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "getDefaultContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "putAllContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "putDefaultContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "getAllContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "getDefaultContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "putAllContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "putDefaultContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "getAllContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "getDefaultContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "putAllContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "putDefaultContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "getAllContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "getDefaultContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "putAllContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "putDefaultContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "getAllContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "getDefaultContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "putAllContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "putDefaultContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "getAllContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "86", + "kind": "constant", + "name": "getDefaultContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "88", + "kind": "constant", + "name": "putAllContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "90", + "kind": "constant", + "name": "putDefaultContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "92", + "kind": "constant", + "name": "getAllContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "94", + "kind": "constant", + "name": "getDefaultContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "96", + "kind": "constant", + "name": "putAllContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "98", + "kind": "constant", + "name": "putDefaultContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "100", + "kind": "constant", + "name": "getAllContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "102", + "kind": "constant", + "name": "getDefaultContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "104", + "kind": "constant", + "name": "putAllContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "106", + "kind": "constant", + "name": "putDefaultContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "108", + "kind": "constant", + "name": "getAllContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "110", + "kind": "constant", + "name": "getDefaultContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "112", + "kind": "constant", + "name": "putAllContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "114", + "kind": "constant", + "name": "putDefaultContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "116", + "kind": "constant", + "name": "getAllContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "118", + "kind": "constant", + "name": "getDefaultContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "120", + "kind": "constant", + "name": "putAllContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "122", + "kind": "constant", + "name": "putDefaultContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "124", + "kind": "constant", + "name": "getAllContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "126", + "kind": "constant", + "name": "getDefaultContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "128", + "kind": "constant", + "name": "putAllContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "130", + "kind": "constant", + "name": "putDefaultContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "132", + "kind": "constant", + "name": "getAllContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "134", + "kind": "constant", + "name": "getDefaultContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "136", + "kind": "constant", + "name": "putAllContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "138", + "kind": "constant", + "name": "putDefaultContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "140", + "kind": "constant", + "name": "getAllContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "142", + "kind": "constant", + "name": "getDefaultContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "144", + "kind": "constant", + "name": "putAllContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "146", + "kind": "constant", + "name": "putDefaultContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "148", + "kind": "constant", + "name": "getAllContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "150", + "kind": "constant", + "name": "getRequiredOnlyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "151", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "152", + "kind": "constant", + "name": "putAllContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "154", + "kind": "constant", + "name": "putRequiredOnlyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "29", + "$id": "156", "kind": "model", "name": "StringProperty", "namespace": "Type.Property.Optional", @@ -280,13 +1268,13 @@ "decorators": [], "properties": [ { - "$id": "30", + "$id": "157", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "31", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -299,9 +1287,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.StringProperty.property", "serializationOptions": { - "$id": "32", + "$id": "159", "json": { - "$id": "33", + "$id": "160", "name": "property" } } @@ -309,7 +1297,7 @@ ] }, { - "$id": "34", + "$id": "161", "kind": "model", "name": "BytesProperty", "namespace": "Type.Property.Optional", @@ -319,13 +1307,13 @@ "decorators": [], "properties": [ { - "$id": "35", + "$id": "162", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "36", + "$id": "163", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -339,9 +1327,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.BytesProperty.property", "serializationOptions": { - "$id": "37", + "$id": "164", "json": { - "$id": "38", + "$id": "165", "name": "property" } } @@ -349,7 +1337,7 @@ ] }, { - "$id": "39", + "$id": "166", "kind": "model", "name": "DatetimeProperty", "namespace": "Type.Property.Optional", @@ -359,18 +1347,18 @@ "decorators": [], "properties": [ { - "$id": "40", + "$id": "167", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "41", + "$id": "168", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "42", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -386,9 +1374,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.DatetimeProperty.property", "serializationOptions": { - "$id": "43", + "$id": "170", "json": { - "$id": "44", + "$id": "171", "name": "property" } } @@ -396,7 +1384,7 @@ ] }, { - "$id": "45", + "$id": "172", "kind": "model", "name": "DurationProperty", "namespace": "Type.Property.Optional", @@ -406,18 +1394,18 @@ "decorators": [], "properties": [ { - "$id": "46", + "$id": "173", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "47", + "$id": "174", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "48", + "$id": "175", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -433,9 +1421,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.DurationProperty.property", "serializationOptions": { - "$id": "49", + "$id": "176", "json": { - "$id": "50", + "$id": "177", "name": "property" } } @@ -443,7 +1431,7 @@ ] }, { - "$id": "51", + "$id": "178", "kind": "model", "name": "PlainDateProperty", "namespace": "Type.Property.Optional", @@ -453,13 +1441,13 @@ "decorators": [], "properties": [ { - "$id": "52", + "$id": "179", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "53", + "$id": "180", "kind": "plainDate", "name": "plainDate", "crossLanguageDefinitionId": "TypeSpec.plainDate", @@ -472,9 +1460,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.PlainDateProperty.property", "serializationOptions": { - "$id": "54", + "$id": "181", "json": { - "$id": "55", + "$id": "182", "name": "property" } } @@ -482,7 +1470,7 @@ ] }, { - "$id": "56", + "$id": "183", "kind": "model", "name": "PlainTimeProperty", "namespace": "Type.Property.Optional", @@ -492,13 +1480,13 @@ "decorators": [], "properties": [ { - "$id": "57", + "$id": "184", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "58", + "$id": "185", "kind": "plainTime", "name": "plainTime", "crossLanguageDefinitionId": "TypeSpec.plainTime", @@ -511,9 +1499,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.PlainTimeProperty.property", "serializationOptions": { - "$id": "59", + "$id": "186", "json": { - "$id": "60", + "$id": "187", "name": "property" } } @@ -521,7 +1509,7 @@ ] }, { - "$id": "61", + "$id": "188", "kind": "model", "name": "CollectionsByteProperty", "namespace": "Type.Property.Optional", @@ -531,17 +1519,17 @@ "decorators": [], "properties": [ { - "$id": "62", + "$id": "189", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "63", + "$id": "190", "kind": "array", "name": "Array", "valueType": { - "$id": "64", + "$id": "191", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -558,9 +1546,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByteProperty.property", "serializationOptions": { - "$id": "65", + "$id": "192", "json": { - "$id": "66", + "$id": "193", "name": "property" } } @@ -568,7 +1556,7 @@ ] }, { - "$id": "67", + "$id": "194", "kind": "model", "name": "CollectionsModelProperty", "namespace": "Type.Property.Optional", @@ -578,17 +1566,17 @@ "decorators": [], "properties": [ { - "$id": "68", + "$id": "195", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "69", + "$id": "196", "kind": "array", "name": "ArrayStringProperty", "valueType": { - "$ref": "29" + "$ref": "156" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -600,9 +1588,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModelProperty.property", "serializationOptions": { - "$id": "70", + "$id": "197", "json": { - "$id": "71", + "$id": "198", "name": "property" } } @@ -610,7 +1598,7 @@ ] }, { - "$id": "72", + "$id": "199", "kind": "model", "name": "StringLiteralProperty", "namespace": "Type.Property.Optional", @@ -620,19 +1608,13 @@ "decorators": [], "properties": [ { - "$id": "73", + "$id": "200", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "74", - "kind": "constant", - "valueType": { - "$ref": "2" - }, - "value": "hello", - "decorators": [] + "$ref": "20" }, "optional": true, "readOnly": false, @@ -641,9 +1623,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteralProperty.property", "serializationOptions": { - "$id": "75", + "$id": "201", "json": { - "$id": "76", + "$id": "202", "name": "property" } } @@ -651,7 +1633,7 @@ ] }, { - "$id": "77", + "$id": "203", "kind": "model", "name": "IntLiteralProperty", "namespace": "Type.Property.Optional", @@ -661,19 +1643,13 @@ "decorators": [], "properties": [ { - "$id": "78", + "$id": "204", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "79", - "kind": "constant", - "valueType": { - "$ref": "5" - }, - "value": 1, - "decorators": [] + "$ref": "22" }, "optional": true, "readOnly": false, @@ -682,9 +1658,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteralProperty.property", "serializationOptions": { - "$id": "80", + "$id": "205", "json": { - "$id": "81", + "$id": "206", "name": "property" } } @@ -692,7 +1668,7 @@ ] }, { - "$id": "82", + "$id": "207", "kind": "model", "name": "FloatLiteralProperty", "namespace": "Type.Property.Optional", @@ -702,19 +1678,13 @@ "decorators": [], "properties": [ { - "$id": "83", + "$id": "208", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "84", - "kind": "constant", - "valueType": { - "$ref": "8" - }, - "value": 1.25, - "decorators": [] + "$ref": "24" }, "optional": true, "readOnly": false, @@ -723,9 +1693,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteralProperty.property", "serializationOptions": { - "$id": "85", + "$id": "209", "json": { - "$id": "86", + "$id": "210", "name": "property" } } @@ -733,7 +1703,7 @@ ] }, { - "$id": "87", + "$id": "211", "kind": "model", "name": "BooleanLiteralProperty", "namespace": "Type.Property.Optional", @@ -743,23 +1713,13 @@ "decorators": [], "properties": [ { - "$id": "88", + "$id": "212", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "89", - "kind": "constant", - "valueType": { - "$id": "90", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "26" }, "optional": true, "readOnly": false, @@ -768,9 +1728,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteralProperty.property", "serializationOptions": { - "$id": "91", + "$id": "213", "json": { - "$id": "92", + "$id": "214", "name": "property" } } @@ -778,7 +1738,7 @@ ] }, { - "$id": "93", + "$id": "215", "kind": "model", "name": "UnionStringLiteralProperty", "namespace": "Type.Property.Optional", @@ -788,13 +1748,13 @@ "decorators": [], "properties": [ { - "$id": "94", + "$id": "216", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "11" + "$ref": "2" }, "optional": true, "readOnly": false, @@ -803,9 +1763,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteralProperty.property", "serializationOptions": { - "$id": "95", + "$id": "217", "json": { - "$id": "96", + "$id": "218", "name": "property" } } @@ -813,7 +1773,7 @@ ] }, { - "$id": "97", + "$id": "219", "kind": "model", "name": "UnionIntLiteralProperty", "namespace": "Type.Property.Optional", @@ -823,13 +1783,13 @@ "decorators": [], "properties": [ { - "$id": "98", + "$id": "220", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "17" + "$ref": "8" }, "optional": true, "readOnly": false, @@ -838,9 +1798,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteralProperty.property", "serializationOptions": { - "$id": "99", + "$id": "221", "json": { - "$id": "100", + "$id": "222", "name": "property" } } @@ -848,7 +1808,7 @@ ] }, { - "$id": "101", + "$id": "223", "kind": "model", "name": "UnionFloatLiteralProperty", "namespace": "Type.Property.Optional", @@ -858,13 +1818,13 @@ "decorators": [], "properties": [ { - "$id": "102", + "$id": "224", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "23" + "$ref": "14" }, "optional": true, "readOnly": false, @@ -873,9 +1833,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteralProperty.property", "serializationOptions": { - "$id": "103", + "$id": "225", "json": { - "$id": "104", + "$id": "226", "name": "property" } } @@ -883,7 +1843,7 @@ ] }, { - "$id": "105", + "$id": "227", "kind": "model", "name": "RequiredAndOptionalProperty", "namespace": "Type.Property.Optional", @@ -893,13 +1853,13 @@ "decorators": [], "properties": [ { - "$id": "106", + "$id": "228", "kind": "property", "name": "optionalProperty", "serializedName": "optionalProperty", "doc": "optional string property", "type": { - "$id": "107", + "$id": "229", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -912,21 +1872,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptionalProperty.optionalProperty", "serializationOptions": { - "$id": "108", + "$id": "230", "json": { - "$id": "109", + "$id": "231", "name": "optionalProperty" } } }, { - "$id": "110", + "$id": "232", "kind": "property", "name": "requiredProperty", "serializedName": "requiredProperty", "doc": "required int property", "type": { - "$id": "111", + "$id": "233", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -939,9 +1899,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptionalProperty.requiredProperty", "serializationOptions": { - "$id": "112", + "$id": "234", "json": { - "$id": "113", + "$id": "235", "name": "requiredProperty" } } @@ -951,7 +1911,7 @@ ], "clients": [ { - "$id": "114", + "$id": "236", "kind": "client", "name": "OptionalClient", "namespace": "Type.Property.Optional", @@ -959,12 +1919,12 @@ "methods": [], "parameters": [ { - "$id": "115", + "$id": "237", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "116", + "$id": "238", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -978,9 +1938,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "117", + "$id": "239", "type": { - "$id": "118", + "$id": "240", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -994,41 +1954,31 @@ "apiVersions": [], "children": [ { - "$id": "119", + "$id": "241", "kind": "client", "name": "String", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "120", + "$id": "242", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "121", + "$id": "243", "name": "getAll", "resourceName": "String", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "122", + "$id": "244", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "123", - "kind": "constant", - "valueType": { - "$id": "124", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -1043,12 +1993,12 @@ ], "responses": [ { - "$id": "125", + "$id": "245", "statusCodes": [ 200 ], "bodyType": { - "$ref": "29" + "$ref": "156" }, "headers": [], "isErrorResponse": false, @@ -1068,11 +2018,11 @@ }, "parameters": [ { - "$id": "126", + "$id": "246", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "123" + "$ref": "28" }, "location": "Header", "isApiVersion": false, @@ -1086,9 +2036,9 @@ } ], "response": { - "$id": "127", + "$id": "247", "type": { - "$ref": "29" + "$ref": "156" } }, "isOverride": false, @@ -1097,35 +2047,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.String.getAll" }, { - "$id": "128", + "$id": "248", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "129", + "$id": "249", "name": "getDefault", "resourceName": "String", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "130", + "$id": "250", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "131", - "kind": "constant", - "valueType": { - "$id": "132", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -1140,12 +2080,12 @@ ], "responses": [ { - "$id": "133", + "$id": "251", "statusCodes": [ 200 ], "bodyType": { - "$ref": "29" + "$ref": "156" }, "headers": [], "isErrorResponse": false, @@ -1165,11 +2105,11 @@ }, "parameters": [ { - "$id": "134", + "$id": "252", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "131" + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -1183,9 +2123,9 @@ } ], "response": { - "$id": "135", + "$id": "253", "type": { - "$ref": "29" + "$ref": "156" } }, "isOverride": false, @@ -1194,36 +2134,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.String.getDefault" }, { - "$id": "136", + "$id": "254", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "137", + "$id": "255", "name": "putAll", "resourceName": "String", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "138", + "$id": "256", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "139", - "kind": "constant", - "valueType": { - "$id": "140", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -1236,11 +2166,11 @@ "skipUrlEncoding": false }, { - "$id": "141", + "$id": "257", "name": "body", "nameInRequest": "body", "type": { - "$ref": "29" + "$ref": "156" }, "location": "Body", "isApiVersion": false, @@ -1255,7 +2185,7 @@ ], "responses": [ { - "$id": "142", + "$id": "258", "statusCodes": [ 204 ], @@ -1277,11 +2207,11 @@ }, "parameters": [ { - "$id": "143", + "$id": "259", "name": "body", "nameInRequest": "body", "type": { - "$ref": "29" + "$ref": "156" }, "location": "Body", "isApiVersion": false, @@ -1294,12 +2224,12 @@ "skipUrlEncoding": false }, { - "$id": "144", + "$id": "260", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "139" + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -1313,7 +2243,7 @@ } ], "response": { - "$id": "145" + "$id": "261" }, "isOverride": false, "generateConvenient": true, @@ -1321,36 +2251,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.String.putAll" }, { - "$id": "146", + "$id": "262", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "147", + "$id": "263", "name": "putDefault", "resourceName": "String", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "148", + "$id": "264", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "149", - "kind": "constant", - "valueType": { - "$id": "150", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -1363,11 +2283,11 @@ "skipUrlEncoding": false }, { - "$id": "151", + "$id": "265", "name": "body", "nameInRequest": "body", "type": { - "$ref": "29" + "$ref": "156" }, "location": "Body", "isApiVersion": false, @@ -1382,7 +2302,7 @@ ], "responses": [ { - "$id": "152", + "$id": "266", "statusCodes": [ 204 ], @@ -1404,11 +2324,11 @@ }, "parameters": [ { - "$id": "153", + "$id": "267", "name": "body", "nameInRequest": "body", "type": { - "$ref": "29" + "$ref": "156" }, "location": "Body", "isApiVersion": false, @@ -1421,12 +2341,12 @@ "skipUrlEncoding": false }, { - "$id": "154", + "$id": "268", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "149" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -1440,7 +2360,7 @@ } ], "response": { - "$id": "155" + "$id": "269" }, "isOverride": false, "generateConvenient": true, @@ -1450,12 +2370,12 @@ ], "parameters": [ { - "$id": "156", + "$id": "270", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "157", + "$id": "271", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1469,9 +2389,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "158", + "$id": "272", "type": { - "$id": "159", + "$id": "273", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1484,45 +2404,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.String", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "160", + "$id": "274", "kind": "client", "name": "Bytes", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "161", + "$id": "275", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "162", + "$id": "276", "name": "getAll", "resourceName": "Bytes", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "163", + "$id": "277", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "164", - "kind": "constant", - "valueType": { - "$id": "165", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -1537,12 +2447,12 @@ ], "responses": [ { - "$id": "166", + "$id": "278", "statusCodes": [ 200 ], "bodyType": { - "$ref": "34" + "$ref": "161" }, "headers": [], "isErrorResponse": false, @@ -1562,11 +2472,11 @@ }, "parameters": [ { - "$id": "167", + "$id": "279", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "164" + "$ref": "36" }, "location": "Header", "isApiVersion": false, @@ -1580,9 +2490,9 @@ } ], "response": { - "$id": "168", + "$id": "280", "type": { - "$ref": "34" + "$ref": "161" } }, "isOverride": false, @@ -1591,35 +2501,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Bytes.getAll" }, { - "$id": "169", + "$id": "281", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "170", + "$id": "282", "name": "getDefault", "resourceName": "Bytes", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "171", + "$id": "283", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "172", - "kind": "constant", - "valueType": { - "$id": "173", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -1634,12 +2534,12 @@ ], "responses": [ { - "$id": "174", + "$id": "284", "statusCodes": [ 200 ], "bodyType": { - "$ref": "34" + "$ref": "161" }, "headers": [], "isErrorResponse": false, @@ -1659,11 +2559,11 @@ }, "parameters": [ { - "$id": "175", + "$id": "285", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "172" + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -1677,9 +2577,9 @@ } ], "response": { - "$id": "176", + "$id": "286", "type": { - "$ref": "34" + "$ref": "161" } }, "isOverride": false, @@ -1688,36 +2588,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Bytes.getDefault" }, { - "$id": "177", + "$id": "287", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "178", + "$id": "288", "name": "putAll", "resourceName": "Bytes", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "179", + "$id": "289", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "180", - "kind": "constant", - "valueType": { - "$id": "181", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -1730,11 +2620,11 @@ "skipUrlEncoding": false }, { - "$id": "182", + "$id": "290", "name": "body", "nameInRequest": "body", "type": { - "$ref": "34" + "$ref": "161" }, "location": "Body", "isApiVersion": false, @@ -1749,7 +2639,7 @@ ], "responses": [ { - "$id": "183", + "$id": "291", "statusCodes": [ 204 ], @@ -1771,11 +2661,11 @@ }, "parameters": [ { - "$id": "184", + "$id": "292", "name": "body", "nameInRequest": "body", "type": { - "$ref": "34" + "$ref": "161" }, "location": "Body", "isApiVersion": false, @@ -1788,12 +2678,12 @@ "skipUrlEncoding": false }, { - "$id": "185", + "$id": "293", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "180" + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -1807,7 +2697,7 @@ } ], "response": { - "$id": "186" + "$id": "294" }, "isOverride": false, "generateConvenient": true, @@ -1815,36 +2705,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Bytes.putAll" }, { - "$id": "187", + "$id": "295", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "188", + "$id": "296", "name": "putDefault", "resourceName": "Bytes", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "189", + "$id": "297", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "190", - "kind": "constant", - "valueType": { - "$id": "191", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -1857,11 +2737,11 @@ "skipUrlEncoding": false }, { - "$id": "192", + "$id": "298", "name": "body", "nameInRequest": "body", "type": { - "$ref": "34" + "$ref": "161" }, "location": "Body", "isApiVersion": false, @@ -1876,7 +2756,7 @@ ], "responses": [ { - "$id": "193", + "$id": "299", "statusCodes": [ 204 ], @@ -1898,11 +2778,11 @@ }, "parameters": [ { - "$id": "194", + "$id": "300", "name": "body", "nameInRequest": "body", "type": { - "$ref": "34" + "$ref": "161" }, "location": "Body", "isApiVersion": false, @@ -1915,12 +2795,12 @@ "skipUrlEncoding": false }, { - "$id": "195", + "$id": "301", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "190" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -1934,7 +2814,7 @@ } ], "response": { - "$id": "196" + "$id": "302" }, "isOverride": false, "generateConvenient": true, @@ -1944,12 +2824,12 @@ ], "parameters": [ { - "$id": "197", + "$id": "303", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "198", + "$id": "304", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1963,9 +2843,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "199", + "$id": "305", "type": { - "$id": "200", + "$id": "306", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1978,45 +2858,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Bytes", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "201", + "$id": "307", "kind": "client", "name": "Datetime", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "202", + "$id": "308", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "203", + "$id": "309", "name": "getAll", "resourceName": "Datetime", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "204", + "$id": "310", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "205", - "kind": "constant", - "valueType": { - "$id": "206", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -2031,12 +2901,12 @@ ], "responses": [ { - "$id": "207", + "$id": "311", "statusCodes": [ 200 ], "bodyType": { - "$ref": "39" + "$ref": "166" }, "headers": [], "isErrorResponse": false, @@ -2056,11 +2926,11 @@ }, "parameters": [ { - "$id": "208", + "$id": "312", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "205" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -2074,9 +2944,9 @@ } ], "response": { - "$id": "209", + "$id": "313", "type": { - "$ref": "39" + "$ref": "166" } }, "isOverride": false, @@ -2085,35 +2955,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Datetime.getAll" }, { - "$id": "210", + "$id": "314", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "211", + "$id": "315", "name": "getDefault", "resourceName": "Datetime", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "212", + "$id": "316", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "213", - "kind": "constant", - "valueType": { - "$id": "214", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -2128,12 +2988,12 @@ ], "responses": [ { - "$id": "215", + "$id": "317", "statusCodes": [ 200 ], "bodyType": { - "$ref": "39" + "$ref": "166" }, "headers": [], "isErrorResponse": false, @@ -2153,11 +3013,11 @@ }, "parameters": [ { - "$id": "216", + "$id": "318", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "213" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -2171,9 +3031,9 @@ } ], "response": { - "$id": "217", + "$id": "319", "type": { - "$ref": "39" + "$ref": "166" } }, "isOverride": false, @@ -2182,36 +3042,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Datetime.getDefault" }, { - "$id": "218", + "$id": "320", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "219", + "$id": "321", "name": "putAll", "resourceName": "Datetime", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "220", + "$id": "322", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "221", - "kind": "constant", - "valueType": { - "$id": "222", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2224,11 +3074,11 @@ "skipUrlEncoding": false }, { - "$id": "223", + "$id": "323", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "166" }, "location": "Body", "isApiVersion": false, @@ -2243,7 +3093,7 @@ ], "responses": [ { - "$id": "224", + "$id": "324", "statusCodes": [ 204 ], @@ -2265,11 +3115,11 @@ }, "parameters": [ { - "$id": "225", + "$id": "325", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "166" }, "location": "Body", "isApiVersion": false, @@ -2282,12 +3132,12 @@ "skipUrlEncoding": false }, { - "$id": "226", + "$id": "326", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "221" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2301,7 +3151,7 @@ } ], "response": { - "$id": "227" + "$id": "327" }, "isOverride": false, "generateConvenient": true, @@ -2309,36 +3159,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Datetime.putAll" }, { - "$id": "228", + "$id": "328", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "229", + "$id": "329", "name": "putDefault", "resourceName": "Datetime", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "230", + "$id": "330", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "231", - "kind": "constant", - "valueType": { - "$id": "232", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2351,11 +3191,11 @@ "skipUrlEncoding": false }, { - "$id": "233", + "$id": "331", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "166" }, "location": "Body", "isApiVersion": false, @@ -2370,7 +3210,7 @@ ], "responses": [ { - "$id": "234", + "$id": "332", "statusCodes": [ 204 ], @@ -2392,11 +3232,11 @@ }, "parameters": [ { - "$id": "235", + "$id": "333", "name": "body", "nameInRequest": "body", "type": { - "$ref": "39" + "$ref": "166" }, "location": "Body", "isApiVersion": false, @@ -2409,12 +3249,12 @@ "skipUrlEncoding": false }, { - "$id": "236", + "$id": "334", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "231" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2428,7 +3268,7 @@ } ], "response": { - "$id": "237" + "$id": "335" }, "isOverride": false, "generateConvenient": true, @@ -2438,12 +3278,12 @@ ], "parameters": [ { - "$id": "238", + "$id": "336", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "239", + "$id": "337", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2457,9 +3297,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "240", + "$id": "338", "type": { - "$id": "241", + "$id": "339", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2472,45 +3312,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Datetime", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "242", + "$id": "340", "kind": "client", "name": "Duration", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "243", + "$id": "341", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "244", + "$id": "342", "name": "getAll", "resourceName": "Duration", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "245", + "$id": "343", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "246", - "kind": "constant", - "valueType": { - "$id": "247", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2525,12 +3355,12 @@ ], "responses": [ { - "$id": "248", + "$id": "344", "statusCodes": [ 200 ], "bodyType": { - "$ref": "45" + "$ref": "172" }, "headers": [], "isErrorResponse": false, @@ -2550,11 +3380,11 @@ }, "parameters": [ { - "$id": "249", + "$id": "345", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "246" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2568,9 +3398,9 @@ } ], "response": { - "$id": "250", + "$id": "346", "type": { - "$ref": "45" + "$ref": "172" } }, "isOverride": false, @@ -2579,35 +3409,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Duration.getAll" }, { - "$id": "251", + "$id": "347", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "252", + "$id": "348", "name": "getDefault", "resourceName": "Duration", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "253", + "$id": "349", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "254", - "kind": "constant", - "valueType": { - "$id": "255", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -2622,12 +3442,12 @@ ], "responses": [ { - "$id": "256", + "$id": "350", "statusCodes": [ 200 ], "bodyType": { - "$ref": "45" + "$ref": "172" }, "headers": [], "isErrorResponse": false, @@ -2647,11 +3467,11 @@ }, "parameters": [ { - "$id": "257", + "$id": "351", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "254" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -2665,9 +3485,9 @@ } ], "response": { - "$id": "258", + "$id": "352", "type": { - "$ref": "45" + "$ref": "172" } }, "isOverride": false, @@ -2676,36 +3496,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Duration.getDefault" }, { - "$id": "259", + "$id": "353", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "260", + "$id": "354", "name": "putAll", "resourceName": "Duration", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "261", + "$id": "355", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "262", - "kind": "constant", - "valueType": { - "$id": "263", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -2718,11 +3528,11 @@ "skipUrlEncoding": false }, { - "$id": "264", + "$id": "356", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -2737,7 +3547,7 @@ ], "responses": [ { - "$id": "265", + "$id": "357", "statusCodes": [ 204 ], @@ -2759,11 +3569,11 @@ }, "parameters": [ { - "$id": "266", + "$id": "358", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -2776,12 +3586,12 @@ "skipUrlEncoding": false }, { - "$id": "267", + "$id": "359", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "262" + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -2795,7 +3605,7 @@ } ], "response": { - "$id": "268" + "$id": "360" }, "isOverride": false, "generateConvenient": true, @@ -2803,36 +3613,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Duration.putAll" }, { - "$id": "269", + "$id": "361", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "270", + "$id": "362", "name": "putDefault", "resourceName": "Duration", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "271", + "$id": "363", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "272", - "kind": "constant", - "valueType": { - "$id": "273", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -2845,11 +3645,11 @@ "skipUrlEncoding": false }, { - "$id": "274", + "$id": "364", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -2864,7 +3664,7 @@ ], "responses": [ { - "$id": "275", + "$id": "365", "statusCodes": [ 204 ], @@ -2886,11 +3686,11 @@ }, "parameters": [ { - "$id": "276", + "$id": "366", "name": "body", "nameInRequest": "body", "type": { - "$ref": "45" + "$ref": "172" }, "location": "Body", "isApiVersion": false, @@ -2903,12 +3703,12 @@ "skipUrlEncoding": false }, { - "$id": "277", + "$id": "367", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "272" + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -2922,7 +3722,7 @@ } ], "response": { - "$id": "278" + "$id": "368" }, "isOverride": false, "generateConvenient": true, @@ -2932,12 +3732,12 @@ ], "parameters": [ { - "$id": "279", + "$id": "369", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "280", + "$id": "370", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2951,9 +3751,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "281", + "$id": "371", "type": { - "$id": "282", + "$id": "372", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2966,45 +3766,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.Duration", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "283", + "$id": "373", "kind": "client", "name": "PlainDate", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "284", + "$id": "374", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "285", + "$id": "375", "name": "getAll", "resourceName": "PlainDate", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "286", + "$id": "376", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "287", - "kind": "constant", - "valueType": { - "$id": "288", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -3019,12 +3809,12 @@ ], "responses": [ { - "$id": "289", + "$id": "377", "statusCodes": [ 200 ], "bodyType": { - "$ref": "51" + "$ref": "178" }, "headers": [], "isErrorResponse": false, @@ -3044,11 +3834,11 @@ }, "parameters": [ { - "$id": "290", + "$id": "378", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "287" + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -3062,9 +3852,9 @@ } ], "response": { - "$id": "291", + "$id": "379", "type": { - "$ref": "51" + "$ref": "178" } }, "isOverride": false, @@ -3073,35 +3863,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainDate.getAll" }, { - "$id": "292", + "$id": "380", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "293", + "$id": "381", "name": "getDefault", "resourceName": "PlainDate", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "294", + "$id": "382", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "295", - "kind": "constant", - "valueType": { - "$id": "296", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -3116,12 +3896,12 @@ ], "responses": [ { - "$id": "297", + "$id": "383", "statusCodes": [ 200 ], "bodyType": { - "$ref": "51" + "$ref": "178" }, "headers": [], "isErrorResponse": false, @@ -3141,11 +3921,11 @@ }, "parameters": [ { - "$id": "298", + "$id": "384", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "295" + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -3159,9 +3939,9 @@ } ], "response": { - "$id": "299", + "$id": "385", "type": { - "$ref": "51" + "$ref": "178" } }, "isOverride": false, @@ -3170,36 +3950,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainDate.getDefault" }, { - "$id": "300", + "$id": "386", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "301", + "$id": "387", "name": "putAll", "resourceName": "PlainDate", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "302", + "$id": "388", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "303", - "kind": "constant", - "valueType": { - "$id": "304", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3212,11 +3982,11 @@ "skipUrlEncoding": false }, { - "$id": "305", + "$id": "389", "name": "body", "nameInRequest": "body", "type": { - "$ref": "51" + "$ref": "178" }, "location": "Body", "isApiVersion": false, @@ -3231,7 +4001,7 @@ ], "responses": [ { - "$id": "306", + "$id": "390", "statusCodes": [ 204 ], @@ -3253,11 +4023,11 @@ }, "parameters": [ { - "$id": "307", + "$id": "391", "name": "body", "nameInRequest": "body", "type": { - "$ref": "51" + "$ref": "178" }, "location": "Body", "isApiVersion": false, @@ -3270,12 +4040,12 @@ "skipUrlEncoding": false }, { - "$id": "308", + "$id": "392", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "303" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3289,7 +4059,7 @@ } ], "response": { - "$id": "309" + "$id": "393" }, "isOverride": false, "generateConvenient": true, @@ -3297,36 +4067,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainDate.putAll" }, { - "$id": "310", + "$id": "394", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "311", + "$id": "395", "name": "putDefault", "resourceName": "PlainDate", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "312", + "$id": "396", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "313", - "kind": "constant", - "valueType": { - "$id": "314", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -3339,11 +4099,11 @@ "skipUrlEncoding": false }, { - "$id": "315", + "$id": "397", "name": "body", "nameInRequest": "body", "type": { - "$ref": "51" + "$ref": "178" }, "location": "Body", "isApiVersion": false, @@ -3358,7 +4118,7 @@ ], "responses": [ { - "$id": "316", + "$id": "398", "statusCodes": [ 204 ], @@ -3380,11 +4140,11 @@ }, "parameters": [ { - "$id": "317", + "$id": "399", "name": "body", "nameInRequest": "body", "type": { - "$ref": "51" + "$ref": "178" }, "location": "Body", "isApiVersion": false, @@ -3397,12 +4157,12 @@ "skipUrlEncoding": false }, { - "$id": "318", + "$id": "400", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "313" + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -3416,7 +4176,7 @@ } ], "response": { - "$id": "319" + "$id": "401" }, "isOverride": false, "generateConvenient": true, @@ -3426,12 +4186,12 @@ ], "parameters": [ { - "$id": "320", + "$id": "402", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "321", + "$id": "403", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3445,9 +4205,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "322", + "$id": "404", "type": { - "$id": "323", + "$id": "405", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3460,45 +4220,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainDate", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "324", + "$id": "406", "kind": "client", "name": "PlainTime", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "325", + "$id": "407", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "326", + "$id": "408", "name": "getAll", "resourceName": "PlainTime", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "327", + "$id": "409", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "328", - "kind": "constant", - "valueType": { - "$id": "329", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -3513,12 +4263,12 @@ ], "responses": [ { - "$id": "330", + "$id": "410", "statusCodes": [ 200 ], "bodyType": { - "$ref": "56" + "$ref": "183" }, "headers": [], "isErrorResponse": false, @@ -3538,11 +4288,11 @@ }, "parameters": [ { - "$id": "331", + "$id": "411", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "328" + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -3556,9 +4306,9 @@ } ], "response": { - "$id": "332", + "$id": "412", "type": { - "$ref": "56" + "$ref": "183" } }, "isOverride": false, @@ -3567,35 +4317,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainTime.getAll" }, { - "$id": "333", + "$id": "413", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "334", + "$id": "414", "name": "getDefault", "resourceName": "PlainTime", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "335", + "$id": "415", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "336", - "kind": "constant", - "valueType": { - "$id": "337", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -3610,12 +4350,12 @@ ], "responses": [ { - "$id": "338", + "$id": "416", "statusCodes": [ 200 ], "bodyType": { - "$ref": "56" + "$ref": "183" }, "headers": [], "isErrorResponse": false, @@ -3635,11 +4375,11 @@ }, "parameters": [ { - "$id": "339", + "$id": "417", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "336" + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -3653,9 +4393,9 @@ } ], "response": { - "$id": "340", + "$id": "418", "type": { - "$ref": "56" + "$ref": "183" } }, "isOverride": false, @@ -3664,36 +4404,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainTime.getDefault" }, { - "$id": "341", + "$id": "419", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "342", + "$id": "420", "name": "putAll", "resourceName": "PlainTime", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "343", + "$id": "421", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "344", - "kind": "constant", - "valueType": { - "$id": "345", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -3706,11 +4436,11 @@ "skipUrlEncoding": false }, { - "$id": "346", + "$id": "422", "name": "body", "nameInRequest": "body", "type": { - "$ref": "56" + "$ref": "183" }, "location": "Body", "isApiVersion": false, @@ -3725,7 +4455,7 @@ ], "responses": [ { - "$id": "347", + "$id": "423", "statusCodes": [ 204 ], @@ -3747,11 +4477,11 @@ }, "parameters": [ { - "$id": "348", + "$id": "424", "name": "body", "nameInRequest": "body", "type": { - "$ref": "56" + "$ref": "183" }, "location": "Body", "isApiVersion": false, @@ -3764,12 +4494,12 @@ "skipUrlEncoding": false }, { - "$id": "349", + "$id": "425", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "344" + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -3783,7 +4513,7 @@ } ], "response": { - "$id": "350" + "$id": "426" }, "isOverride": false, "generateConvenient": true, @@ -3791,36 +4521,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainTime.putAll" }, { - "$id": "351", + "$id": "427", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "352", + "$id": "428", "name": "putDefault", "resourceName": "PlainTime", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "353", + "$id": "429", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "354", - "kind": "constant", - "valueType": { - "$id": "355", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3833,11 +4553,11 @@ "skipUrlEncoding": false }, { - "$id": "356", + "$id": "430", "name": "body", "nameInRequest": "body", "type": { - "$ref": "56" + "$ref": "183" }, "location": "Body", "isApiVersion": false, @@ -3852,7 +4572,7 @@ ], "responses": [ { - "$id": "357", + "$id": "431", "statusCodes": [ 204 ], @@ -3874,11 +4594,11 @@ }, "parameters": [ { - "$id": "358", + "$id": "432", "name": "body", "nameInRequest": "body", "type": { - "$ref": "56" + "$ref": "183" }, "location": "Body", "isApiVersion": false, @@ -3891,12 +4611,12 @@ "skipUrlEncoding": false }, { - "$id": "359", + "$id": "433", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "354" + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3910,7 +4630,7 @@ } ], "response": { - "$id": "360" + "$id": "434" }, "isOverride": false, "generateConvenient": true, @@ -3920,12 +4640,12 @@ ], "parameters": [ { - "$id": "361", + "$id": "435", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "362", + "$id": "436", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3939,9 +4659,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "363", + "$id": "437", "type": { - "$id": "364", + "$id": "438", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3954,45 +4674,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.PlainTime", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "365", + "$id": "439", "kind": "client", "name": "CollectionsByte", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "366", + "$id": "440", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "367", + "$id": "441", "name": "getAll", "resourceName": "CollectionsByte", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "368", + "$id": "442", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "369", - "kind": "constant", - "valueType": { - "$id": "370", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -4007,12 +4717,12 @@ ], "responses": [ { - "$id": "371", + "$id": "443", "statusCodes": [ 200 ], "bodyType": { - "$ref": "61" + "$ref": "188" }, "headers": [], "isErrorResponse": false, @@ -4032,11 +4742,11 @@ }, "parameters": [ { - "$id": "372", + "$id": "444", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "369" + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -4050,9 +4760,9 @@ } ], "response": { - "$id": "373", + "$id": "445", "type": { - "$ref": "61" + "$ref": "188" } }, "isOverride": false, @@ -4061,35 +4771,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.getAll" }, { - "$id": "374", + "$id": "446", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "375", + "$id": "447", "name": "getDefault", "resourceName": "CollectionsByte", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "376", + "$id": "448", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "377", - "kind": "constant", - "valueType": { - "$id": "378", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -4104,12 +4804,12 @@ ], "responses": [ { - "$id": "379", + "$id": "449", "statusCodes": [ 200 ], "bodyType": { - "$ref": "61" + "$ref": "188" }, "headers": [], "isErrorResponse": false, @@ -4129,11 +4829,11 @@ }, "parameters": [ { - "$id": "380", + "$id": "450", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "377" + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -4147,9 +4847,9 @@ } ], "response": { - "$id": "381", + "$id": "451", "type": { - "$ref": "61" + "$ref": "188" } }, "isOverride": false, @@ -4158,36 +4858,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.getDefault" }, { - "$id": "382", + "$id": "452", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "383", + "$id": "453", "name": "putAll", "resourceName": "CollectionsByte", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "384", + "$id": "454", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "385", - "kind": "constant", - "valueType": { - "$id": "386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -4200,11 +4890,11 @@ "skipUrlEncoding": false }, { - "$id": "387", + "$id": "455", "name": "body", "nameInRequest": "body", "type": { - "$ref": "61" + "$ref": "188" }, "location": "Body", "isApiVersion": false, @@ -4219,7 +4909,7 @@ ], "responses": [ { - "$id": "388", + "$id": "456", "statusCodes": [ 204 ], @@ -4241,11 +4931,11 @@ }, "parameters": [ { - "$id": "389", + "$id": "457", "name": "body", "nameInRequest": "body", "type": { - "$ref": "61" + "$ref": "188" }, "location": "Body", "isApiVersion": false, @@ -4258,12 +4948,12 @@ "skipUrlEncoding": false }, { - "$id": "390", + "$id": "458", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "385" + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -4277,7 +4967,7 @@ } ], "response": { - "$id": "391" + "$id": "459" }, "isOverride": false, "generateConvenient": true, @@ -4285,36 +4975,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte.putAll" }, { - "$id": "392", + "$id": "460", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "393", + "$id": "461", "name": "putDefault", "resourceName": "CollectionsByte", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "394", + "$id": "462", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "395", - "kind": "constant", - "valueType": { - "$id": "396", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -4327,11 +5007,11 @@ "skipUrlEncoding": false }, { - "$id": "397", + "$id": "463", "name": "body", "nameInRequest": "body", "type": { - "$ref": "61" + "$ref": "188" }, "location": "Body", "isApiVersion": false, @@ -4346,7 +5026,7 @@ ], "responses": [ { - "$id": "398", + "$id": "464", "statusCodes": [ 204 ], @@ -4368,11 +5048,11 @@ }, "parameters": [ { - "$id": "399", + "$id": "465", "name": "body", "nameInRequest": "body", "type": { - "$ref": "61" + "$ref": "188" }, "location": "Body", "isApiVersion": false, @@ -4385,12 +5065,12 @@ "skipUrlEncoding": false }, { - "$id": "400", + "$id": "466", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "395" + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -4404,7 +5084,7 @@ } ], "response": { - "$id": "401" + "$id": "467" }, "isOverride": false, "generateConvenient": true, @@ -4414,12 +5094,12 @@ ], "parameters": [ { - "$id": "402", + "$id": "468", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "403", + "$id": "469", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4433,9 +5113,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "404", + "$id": "470", "type": { - "$id": "405", + "$id": "471", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4448,45 +5128,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsByte", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "406", + "$id": "472", "kind": "client", "name": "CollectionsModel", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "407", + "$id": "473", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "408", + "$id": "474", "name": "getAll", "resourceName": "CollectionsModel", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "409", + "$id": "475", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "410", - "kind": "constant", - "valueType": { - "$id": "411", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -4501,12 +5171,12 @@ ], "responses": [ { - "$id": "412", + "$id": "476", "statusCodes": [ 200 ], "bodyType": { - "$ref": "67" + "$ref": "194" }, "headers": [], "isErrorResponse": false, @@ -4526,11 +5196,11 @@ }, "parameters": [ { - "$id": "413", + "$id": "477", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "410" + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -4544,9 +5214,9 @@ } ], "response": { - "$id": "414", + "$id": "478", "type": { - "$ref": "67" + "$ref": "194" } }, "isOverride": false, @@ -4555,35 +5225,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.getAll" }, { - "$id": "415", + "$id": "479", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "416", + "$id": "480", "name": "getDefault", "resourceName": "CollectionsModel", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "417", + "$id": "481", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "418", - "kind": "constant", - "valueType": { - "$id": "419", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -4598,12 +5258,12 @@ ], "responses": [ { - "$id": "420", + "$id": "482", "statusCodes": [ 200 ], "bodyType": { - "$ref": "67" + "$ref": "194" }, "headers": [], "isErrorResponse": false, @@ -4623,11 +5283,11 @@ }, "parameters": [ { - "$id": "421", + "$id": "483", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "418" + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -4641,9 +5301,9 @@ } ], "response": { - "$id": "422", + "$id": "484", "type": { - "$ref": "67" + "$ref": "194" } }, "isOverride": false, @@ -4652,36 +5312,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.getDefault" }, { - "$id": "423", + "$id": "485", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "424", + "$id": "486", "name": "putAll", "resourceName": "CollectionsModel", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "425", + "$id": "487", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "426", - "kind": "constant", - "valueType": { - "$id": "427", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -4694,11 +5344,11 @@ "skipUrlEncoding": false }, { - "$id": "428", + "$id": "488", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "194" }, "location": "Body", "isApiVersion": false, @@ -4713,7 +5363,7 @@ ], "responses": [ { - "$id": "429", + "$id": "489", "statusCodes": [ 204 ], @@ -4735,11 +5385,11 @@ }, "parameters": [ { - "$id": "430", + "$id": "490", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "194" }, "location": "Body", "isApiVersion": false, @@ -4752,12 +5402,12 @@ "skipUrlEncoding": false }, { - "$id": "431", + "$id": "491", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "426" + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -4771,7 +5421,7 @@ } ], "response": { - "$id": "432" + "$id": "492" }, "isOverride": false, "generateConvenient": true, @@ -4779,36 +5429,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel.putAll" }, { - "$id": "433", + "$id": "493", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "434", + "$id": "494", "name": "putDefault", "resourceName": "CollectionsModel", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "435", + "$id": "495", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "436", - "kind": "constant", - "valueType": { - "$id": "437", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -4821,11 +5461,11 @@ "skipUrlEncoding": false }, { - "$id": "438", + "$id": "496", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "194" }, "location": "Body", "isApiVersion": false, @@ -4840,7 +5480,7 @@ ], "responses": [ { - "$id": "439", + "$id": "497", "statusCodes": [ 204 ], @@ -4862,11 +5502,11 @@ }, "parameters": [ { - "$id": "440", + "$id": "498", "name": "body", "nameInRequest": "body", "type": { - "$ref": "67" + "$ref": "194" }, "location": "Body", "isApiVersion": false, @@ -4879,12 +5519,12 @@ "skipUrlEncoding": false }, { - "$id": "441", + "$id": "499", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "436" + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -4898,7 +5538,7 @@ } ], "response": { - "$id": "442" + "$id": "500" }, "isOverride": false, "generateConvenient": true, @@ -4908,12 +5548,12 @@ ], "parameters": [ { - "$id": "443", + "$id": "501", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "444", + "$id": "502", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4927,9 +5567,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "445", + "$id": "503", "type": { - "$id": "446", + "$id": "504", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4942,45 +5582,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.CollectionsModel", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "447", + "$id": "505", "kind": "client", "name": "StringLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "448", + "$id": "506", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "449", + "$id": "507", "name": "getAll", "resourceName": "StringLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "450", + "$id": "508", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "451", - "kind": "constant", - "valueType": { - "$id": "452", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -4995,12 +5625,12 @@ ], "responses": [ { - "$id": "453", + "$id": "509", "statusCodes": [ 200 ], "bodyType": { - "$ref": "72" + "$ref": "199" }, "headers": [], "isErrorResponse": false, @@ -5020,11 +5650,11 @@ }, "parameters": [ { - "$id": "454", + "$id": "510", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "451" + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -5038,9 +5668,9 @@ } ], "response": { - "$id": "455", + "$id": "511", "type": { - "$ref": "72" + "$ref": "199" } }, "isOverride": false, @@ -5049,35 +5679,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.getAll" }, { - "$id": "456", + "$id": "512", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "457", + "$id": "513", "name": "getDefault", "resourceName": "StringLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "458", + "$id": "514", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "459", - "kind": "constant", - "valueType": { - "$id": "460", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -5092,12 +5712,12 @@ ], "responses": [ { - "$id": "461", + "$id": "515", "statusCodes": [ 200 ], "bodyType": { - "$ref": "72" + "$ref": "199" }, "headers": [], "isErrorResponse": false, @@ -5117,11 +5737,11 @@ }, "parameters": [ { - "$id": "462", + "$id": "516", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "459" + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -5135,9 +5755,9 @@ } ], "response": { - "$id": "463", + "$id": "517", "type": { - "$ref": "72" + "$ref": "199" } }, "isOverride": false, @@ -5146,36 +5766,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.getDefault" }, { - "$id": "464", + "$id": "518", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "465", + "$id": "519", "name": "putAll", "resourceName": "StringLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "466", + "$id": "520", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "467", - "kind": "constant", - "valueType": { - "$id": "468", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -5188,11 +5798,11 @@ "skipUrlEncoding": false }, { - "$id": "469", + "$id": "521", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "199" }, "location": "Body", "isApiVersion": false, @@ -5207,7 +5817,7 @@ ], "responses": [ { - "$id": "470", + "$id": "522", "statusCodes": [ 204 ], @@ -5229,11 +5839,11 @@ }, "parameters": [ { - "$id": "471", + "$id": "523", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "199" }, "location": "Body", "isApiVersion": false, @@ -5246,12 +5856,12 @@ "skipUrlEncoding": false }, { - "$id": "472", + "$id": "524", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "467" + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -5265,7 +5875,7 @@ } ], "response": { - "$id": "473" + "$id": "525" }, "isOverride": false, "generateConvenient": true, @@ -5273,36 +5883,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteral.putAll" }, { - "$id": "474", + "$id": "526", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "475", + "$id": "527", "name": "putDefault", "resourceName": "StringLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "476", + "$id": "528", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "477", - "kind": "constant", - "valueType": { - "$id": "478", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -5315,11 +5915,11 @@ "skipUrlEncoding": false }, { - "$id": "479", + "$id": "529", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "199" }, "location": "Body", "isApiVersion": false, @@ -5334,7 +5934,7 @@ ], "responses": [ { - "$id": "480", + "$id": "530", "statusCodes": [ 204 ], @@ -5356,11 +5956,11 @@ }, "parameters": [ { - "$id": "481", + "$id": "531", "name": "body", "nameInRequest": "body", "type": { - "$ref": "72" + "$ref": "199" }, "location": "Body", "isApiVersion": false, @@ -5373,12 +5973,12 @@ "skipUrlEncoding": false }, { - "$id": "482", + "$id": "532", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "477" + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -5392,7 +5992,7 @@ } ], "response": { - "$id": "483" + "$id": "533" }, "isOverride": false, "generateConvenient": true, @@ -5402,12 +6002,12 @@ ], "parameters": [ { - "$id": "484", + "$id": "534", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "485", + "$id": "535", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5421,9 +6021,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "486", + "$id": "536", "type": { - "$id": "487", + "$id": "537", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5436,45 +6036,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.StringLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "488", + "$id": "538", "kind": "client", "name": "IntLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "489", + "$id": "539", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "490", + "$id": "540", "name": "getAll", "resourceName": "IntLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "491", + "$id": "541", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "492", - "kind": "constant", - "valueType": { - "$id": "493", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -5489,12 +6079,12 @@ ], "responses": [ { - "$id": "494", + "$id": "542", "statusCodes": [ 200 ], "bodyType": { - "$ref": "77" + "$ref": "203" }, "headers": [], "isErrorResponse": false, @@ -5514,11 +6104,11 @@ }, "parameters": [ { - "$id": "495", + "$id": "543", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "492" + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -5532,9 +6122,9 @@ } ], "response": { - "$id": "496", + "$id": "544", "type": { - "$ref": "77" + "$ref": "203" } }, "isOverride": false, @@ -5543,35 +6133,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.getAll" }, { - "$id": "497", + "$id": "545", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "498", + "$id": "546", "name": "getDefault", "resourceName": "IntLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "499", + "$id": "547", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "500", - "kind": "constant", - "valueType": { - "$id": "501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -5586,12 +6166,12 @@ ], "responses": [ { - "$id": "502", + "$id": "548", "statusCodes": [ 200 ], "bodyType": { - "$ref": "77" + "$ref": "203" }, "headers": [], "isErrorResponse": false, @@ -5611,11 +6191,11 @@ }, "parameters": [ { - "$id": "503", + "$id": "549", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "500" + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -5629,9 +6209,9 @@ } ], "response": { - "$id": "504", + "$id": "550", "type": { - "$ref": "77" + "$ref": "203" } }, "isOverride": false, @@ -5640,36 +6220,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.getDefault" }, { - "$id": "505", + "$id": "551", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "506", + "$id": "552", "name": "putAll", "resourceName": "IntLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "507", + "$id": "553", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "508", - "kind": "constant", - "valueType": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -5682,11 +6252,11 @@ "skipUrlEncoding": false }, { - "$id": "510", + "$id": "554", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "203" }, "location": "Body", "isApiVersion": false, @@ -5701,7 +6271,7 @@ ], "responses": [ { - "$id": "511", + "$id": "555", "statusCodes": [ 204 ], @@ -5723,11 +6293,11 @@ }, "parameters": [ { - "$id": "512", + "$id": "556", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "203" }, "location": "Body", "isApiVersion": false, @@ -5740,12 +6310,12 @@ "skipUrlEncoding": false }, { - "$id": "513", + "$id": "557", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "508" + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -5759,7 +6329,7 @@ } ], "response": { - "$id": "514" + "$id": "558" }, "isOverride": false, "generateConvenient": true, @@ -5767,36 +6337,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteral.putAll" }, { - "$id": "515", + "$id": "559", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "516", + "$id": "560", "name": "putDefault", "resourceName": "IntLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "517", + "$id": "561", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "518", - "kind": "constant", - "valueType": { - "$id": "519", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -5809,11 +6369,11 @@ "skipUrlEncoding": false }, { - "$id": "520", + "$id": "562", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "203" }, "location": "Body", "isApiVersion": false, @@ -5828,7 +6388,7 @@ ], "responses": [ { - "$id": "521", + "$id": "563", "statusCodes": [ 204 ], @@ -5850,11 +6410,11 @@ }, "parameters": [ { - "$id": "522", + "$id": "564", "name": "body", "nameInRequest": "body", "type": { - "$ref": "77" + "$ref": "203" }, "location": "Body", "isApiVersion": false, @@ -5867,12 +6427,12 @@ "skipUrlEncoding": false }, { - "$id": "523", + "$id": "565", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "518" + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -5886,7 +6446,7 @@ } ], "response": { - "$id": "524" + "$id": "566" }, "isOverride": false, "generateConvenient": true, @@ -5896,12 +6456,12 @@ ], "parameters": [ { - "$id": "525", + "$id": "567", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "526", + "$id": "568", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5915,9 +6475,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "527", + "$id": "569", "type": { - "$id": "528", + "$id": "570", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5930,45 +6490,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.IntLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "529", + "$id": "571", "kind": "client", "name": "FloatLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "530", + "$id": "572", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "531", + "$id": "573", "name": "getAll", "resourceName": "FloatLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "532", + "$id": "574", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "533", - "kind": "constant", - "valueType": { - "$id": "534", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -5983,12 +6533,12 @@ ], "responses": [ { - "$id": "535", + "$id": "575", "statusCodes": [ 200 ], "bodyType": { - "$ref": "82" + "$ref": "207" }, "headers": [], "isErrorResponse": false, @@ -6008,11 +6558,11 @@ }, "parameters": [ { - "$id": "536", + "$id": "576", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "533" + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -6026,9 +6576,9 @@ } ], "response": { - "$id": "537", + "$id": "577", "type": { - "$ref": "82" + "$ref": "207" } }, "isOverride": false, @@ -6037,35 +6587,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.getAll" }, { - "$id": "538", + "$id": "578", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "539", + "$id": "579", "name": "getDefault", "resourceName": "FloatLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "540", + "$id": "580", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "541", - "kind": "constant", - "valueType": { - "$id": "542", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -6080,12 +6620,12 @@ ], "responses": [ { - "$id": "543", + "$id": "581", "statusCodes": [ 200 ], "bodyType": { - "$ref": "82" + "$ref": "207" }, "headers": [], "isErrorResponse": false, @@ -6105,11 +6645,11 @@ }, "parameters": [ { - "$id": "544", + "$id": "582", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "541" + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -6123,9 +6663,9 @@ } ], "response": { - "$id": "545", + "$id": "583", "type": { - "$ref": "82" + "$ref": "207" } }, "isOverride": false, @@ -6134,36 +6674,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.getDefault" }, { - "$id": "546", + "$id": "584", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "547", + "$id": "585", "name": "putAll", "resourceName": "FloatLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "548", + "$id": "586", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "549", - "kind": "constant", - "valueType": { - "$id": "550", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -6176,11 +6706,11 @@ "skipUrlEncoding": false }, { - "$id": "551", + "$id": "587", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -6195,7 +6725,7 @@ ], "responses": [ { - "$id": "552", + "$id": "588", "statusCodes": [ 204 ], @@ -6217,11 +6747,11 @@ }, "parameters": [ { - "$id": "553", + "$id": "589", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -6234,12 +6764,12 @@ "skipUrlEncoding": false }, { - "$id": "554", + "$id": "590", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "549" + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -6253,7 +6783,7 @@ } ], "response": { - "$id": "555" + "$id": "591" }, "isOverride": false, "generateConvenient": true, @@ -6261,36 +6791,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral.putAll" }, { - "$id": "556", + "$id": "592", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "557", + "$id": "593", "name": "putDefault", "resourceName": "FloatLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "558", + "$id": "594", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "559", - "kind": "constant", - "valueType": { - "$id": "560", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -6303,11 +6823,11 @@ "skipUrlEncoding": false }, { - "$id": "561", + "$id": "595", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -6322,7 +6842,7 @@ ], "responses": [ { - "$id": "562", + "$id": "596", "statusCodes": [ 204 ], @@ -6344,11 +6864,11 @@ }, "parameters": [ { - "$id": "563", + "$id": "597", "name": "body", "nameInRequest": "body", "type": { - "$ref": "82" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -6361,12 +6881,12 @@ "skipUrlEncoding": false }, { - "$id": "564", + "$id": "598", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "559" + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -6380,7 +6900,7 @@ } ], "response": { - "$id": "565" + "$id": "599" }, "isOverride": false, "generateConvenient": true, @@ -6390,12 +6910,12 @@ ], "parameters": [ { - "$id": "566", + "$id": "600", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "567", + "$id": "601", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6409,9 +6929,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "568", + "$id": "602", "type": { - "$id": "569", + "$id": "603", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6424,45 +6944,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.FloatLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "570", + "$id": "604", "kind": "client", "name": "BooleanLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "571", + "$id": "605", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "572", + "$id": "606", "name": "getAll", "resourceName": "BooleanLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "573", + "$id": "607", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "574", - "kind": "constant", - "valueType": { - "$id": "575", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -6477,12 +6987,12 @@ ], "responses": [ { - "$id": "576", + "$id": "608", "statusCodes": [ 200 ], "bodyType": { - "$ref": "87" + "$ref": "211" }, "headers": [], "isErrorResponse": false, @@ -6502,11 +7012,11 @@ }, "parameters": [ { - "$id": "577", + "$id": "609", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "574" + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -6520,9 +7030,9 @@ } ], "response": { - "$id": "578", + "$id": "610", "type": { - "$ref": "87" + "$ref": "211" } }, "isOverride": false, @@ -6531,35 +7041,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.getAll" }, { - "$id": "579", + "$id": "611", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "580", + "$id": "612", "name": "getDefault", "resourceName": "BooleanLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "581", + "$id": "613", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "582", - "kind": "constant", - "valueType": { - "$id": "583", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -6574,12 +7074,12 @@ ], "responses": [ { - "$id": "584", + "$id": "614", "statusCodes": [ 200 ], "bodyType": { - "$ref": "87" + "$ref": "211" }, "headers": [], "isErrorResponse": false, @@ -6599,11 +7099,11 @@ }, "parameters": [ { - "$id": "585", + "$id": "615", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "582" + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -6617,9 +7117,9 @@ } ], "response": { - "$id": "586", + "$id": "616", "type": { - "$ref": "87" + "$ref": "211" } }, "isOverride": false, @@ -6628,36 +7128,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.getDefault" }, { - "$id": "587", + "$id": "617", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "588", + "$id": "618", "name": "putAll", "resourceName": "BooleanLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "589", + "$id": "619", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "590", - "kind": "constant", - "valueType": { - "$id": "591", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -6670,11 +7160,11 @@ "skipUrlEncoding": false }, { - "$id": "592", + "$id": "620", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -6689,7 +7179,7 @@ ], "responses": [ { - "$id": "593", + "$id": "621", "statusCodes": [ 204 ], @@ -6711,11 +7201,11 @@ }, "parameters": [ { - "$id": "594", + "$id": "622", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -6728,12 +7218,12 @@ "skipUrlEncoding": false }, { - "$id": "595", + "$id": "623", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "590" + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -6747,7 +7237,7 @@ } ], "response": { - "$id": "596" + "$id": "624" }, "isOverride": false, "generateConvenient": true, @@ -6755,36 +7245,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral.putAll" }, { - "$id": "597", + "$id": "625", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "598", + "$id": "626", "name": "putDefault", "resourceName": "BooleanLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "599", + "$id": "627", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "600", - "kind": "constant", - "valueType": { - "$id": "601", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -6797,11 +7277,11 @@ "skipUrlEncoding": false }, { - "$id": "602", + "$id": "628", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -6816,7 +7296,7 @@ ], "responses": [ { - "$id": "603", + "$id": "629", "statusCodes": [ 204 ], @@ -6838,11 +7318,11 @@ }, "parameters": [ { - "$id": "604", + "$id": "630", "name": "body", "nameInRequest": "body", "type": { - "$ref": "87" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -6855,12 +7335,12 @@ "skipUrlEncoding": false }, { - "$id": "605", + "$id": "631", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "600" + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -6874,7 +7354,7 @@ } ], "response": { - "$id": "606" + "$id": "632" }, "isOverride": false, "generateConvenient": true, @@ -6884,12 +7364,12 @@ ], "parameters": [ { - "$id": "607", + "$id": "633", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "608", + "$id": "634", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6903,9 +7383,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "609", + "$id": "635", "type": { - "$id": "610", + "$id": "636", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6918,45 +7398,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.BooleanLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "611", + "$id": "637", "kind": "client", "name": "UnionStringLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "612", + "$id": "638", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "613", + "$id": "639", "name": "getAll", "resourceName": "UnionStringLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "614", + "$id": "640", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "615", - "kind": "constant", - "valueType": { - "$id": "616", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -6971,12 +7441,12 @@ ], "responses": [ { - "$id": "617", + "$id": "641", "statusCodes": [ 200 ], "bodyType": { - "$ref": "93" + "$ref": "215" }, "headers": [], "isErrorResponse": false, @@ -6996,11 +7466,11 @@ }, "parameters": [ { - "$id": "618", + "$id": "642", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "615" + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -7014,9 +7484,9 @@ } ], "response": { - "$id": "619", + "$id": "643", "type": { - "$ref": "93" + "$ref": "215" } }, "isOverride": false, @@ -7025,35 +7495,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.getAll" }, { - "$id": "620", + "$id": "644", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "621", + "$id": "645", "name": "getDefault", "resourceName": "UnionStringLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "622", + "$id": "646", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "623", - "kind": "constant", - "valueType": { - "$id": "624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -7068,12 +7528,12 @@ ], "responses": [ { - "$id": "625", + "$id": "647", "statusCodes": [ 200 ], "bodyType": { - "$ref": "93" + "$ref": "215" }, "headers": [], "isErrorResponse": false, @@ -7093,11 +7553,11 @@ }, "parameters": [ { - "$id": "626", + "$id": "648", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "623" + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -7111,9 +7571,9 @@ } ], "response": { - "$id": "627", + "$id": "649", "type": { - "$ref": "93" + "$ref": "215" } }, "isOverride": false, @@ -7122,36 +7582,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.getDefault" }, { - "$id": "628", + "$id": "650", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "629", + "$id": "651", "name": "putAll", "resourceName": "UnionStringLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "630", + "$id": "652", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "631", - "kind": "constant", - "valueType": { - "$id": "632", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -7164,11 +7614,11 @@ "skipUrlEncoding": false }, { - "$id": "633", + "$id": "653", "name": "body", "nameInRequest": "body", "type": { - "$ref": "93" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -7183,7 +7633,7 @@ ], "responses": [ { - "$id": "634", + "$id": "654", "statusCodes": [ 204 ], @@ -7205,11 +7655,11 @@ }, "parameters": [ { - "$id": "635", + "$id": "655", "name": "body", "nameInRequest": "body", "type": { - "$ref": "93" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -7222,12 +7672,12 @@ "skipUrlEncoding": false }, { - "$id": "636", + "$id": "656", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "631" + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -7241,7 +7691,7 @@ } ], "response": { - "$id": "637" + "$id": "657" }, "isOverride": false, "generateConvenient": true, @@ -7249,36 +7699,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral.putAll" }, { - "$id": "638", + "$id": "658", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "639", + "$id": "659", "name": "putDefault", "resourceName": "UnionStringLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "640", + "$id": "660", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "641", - "kind": "constant", - "valueType": { - "$id": "642", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -7291,11 +7731,11 @@ "skipUrlEncoding": false }, { - "$id": "643", + "$id": "661", "name": "body", "nameInRequest": "body", "type": { - "$ref": "93" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -7310,7 +7750,7 @@ ], "responses": [ { - "$id": "644", + "$id": "662", "statusCodes": [ 204 ], @@ -7332,11 +7772,11 @@ }, "parameters": [ { - "$id": "645", + "$id": "663", "name": "body", "nameInRequest": "body", "type": { - "$ref": "93" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -7349,12 +7789,12 @@ "skipUrlEncoding": false }, { - "$id": "646", + "$id": "664", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "641" + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -7368,7 +7808,7 @@ } ], "response": { - "$id": "647" + "$id": "665" }, "isOverride": false, "generateConvenient": true, @@ -7378,12 +7818,12 @@ ], "parameters": [ { - "$id": "648", + "$id": "666", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "649", + "$id": "667", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7397,9 +7837,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "650", + "$id": "668", "type": { - "$id": "651", + "$id": "669", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7412,45 +7852,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionStringLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "652", + "$id": "670", "kind": "client", "name": "UnionIntLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "653", + "$id": "671", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "654", + "$id": "672", "name": "getAll", "resourceName": "UnionIntLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "655", + "$id": "673", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "656", - "kind": "constant", - "valueType": { - "$id": "657", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -7465,12 +7895,12 @@ ], "responses": [ { - "$id": "658", + "$id": "674", "statusCodes": [ 200 ], "bodyType": { - "$ref": "97" + "$ref": "219" }, "headers": [], "isErrorResponse": false, @@ -7490,11 +7920,11 @@ }, "parameters": [ { - "$id": "659", + "$id": "675", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "656" + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -7508,9 +7938,9 @@ } ], "response": { - "$id": "660", + "$id": "676", "type": { - "$ref": "97" + "$ref": "219" } }, "isOverride": false, @@ -7519,35 +7949,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.getAll" }, { - "$id": "661", + "$id": "677", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "662", + "$id": "678", "name": "getDefault", "resourceName": "UnionIntLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "663", + "$id": "679", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "664", - "kind": "constant", - "valueType": { - "$id": "665", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -7562,12 +7982,12 @@ ], "responses": [ { - "$id": "666", + "$id": "680", "statusCodes": [ 200 ], "bodyType": { - "$ref": "97" + "$ref": "219" }, "headers": [], "isErrorResponse": false, @@ -7587,11 +8007,11 @@ }, "parameters": [ { - "$id": "667", + "$id": "681", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "664" + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -7605,9 +8025,9 @@ } ], "response": { - "$id": "668", + "$id": "682", "type": { - "$ref": "97" + "$ref": "219" } }, "isOverride": false, @@ -7616,36 +8036,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.getDefault" }, { - "$id": "669", + "$id": "683", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "670", + "$id": "684", "name": "putAll", "resourceName": "UnionIntLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "671", + "$id": "685", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "672", - "kind": "constant", - "valueType": { - "$id": "673", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "136" }, "location": "Header", "isApiVersion": false, @@ -7658,11 +8068,11 @@ "skipUrlEncoding": false }, { - "$id": "674", + "$id": "686", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "219" }, "location": "Body", "isApiVersion": false, @@ -7677,7 +8087,7 @@ ], "responses": [ { - "$id": "675", + "$id": "687", "statusCodes": [ 204 ], @@ -7699,11 +8109,11 @@ }, "parameters": [ { - "$id": "676", + "$id": "688", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "219" }, "location": "Body", "isApiVersion": false, @@ -7716,12 +8126,12 @@ "skipUrlEncoding": false }, { - "$id": "677", + "$id": "689", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "672" + "$ref": "136" }, "location": "Header", "isApiVersion": false, @@ -7735,7 +8145,7 @@ } ], "response": { - "$id": "678" + "$id": "690" }, "isOverride": false, "generateConvenient": true, @@ -7743,36 +8153,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral.putAll" }, { - "$id": "679", + "$id": "691", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "680", + "$id": "692", "name": "putDefault", "resourceName": "UnionIntLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "681", + "$id": "693", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "682", - "kind": "constant", - "valueType": { - "$id": "683", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "138" }, "location": "Header", "isApiVersion": false, @@ -7785,11 +8185,11 @@ "skipUrlEncoding": false }, { - "$id": "684", + "$id": "694", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "219" }, "location": "Body", "isApiVersion": false, @@ -7804,7 +8204,7 @@ ], "responses": [ { - "$id": "685", + "$id": "695", "statusCodes": [ 204 ], @@ -7826,11 +8226,11 @@ }, "parameters": [ { - "$id": "686", + "$id": "696", "name": "body", "nameInRequest": "body", "type": { - "$ref": "97" + "$ref": "219" }, "location": "Body", "isApiVersion": false, @@ -7843,12 +8243,12 @@ "skipUrlEncoding": false }, { - "$id": "687", + "$id": "697", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "682" + "$ref": "138" }, "location": "Header", "isApiVersion": false, @@ -7862,7 +8262,7 @@ } ], "response": { - "$id": "688" + "$id": "698" }, "isOverride": false, "generateConvenient": true, @@ -7872,12 +8272,12 @@ ], "parameters": [ { - "$id": "689", + "$id": "699", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "690", + "$id": "700", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7891,9 +8291,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "691", + "$id": "701", "type": { - "$id": "692", + "$id": "702", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7906,45 +8306,35 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionIntLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "693", + "$id": "703", "kind": "client", "name": "UnionFloatLiteral", "namespace": "Type.Property.Optional", "methods": [ { - "$id": "694", + "$id": "704", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "695", + "$id": "705", "name": "getAll", "resourceName": "UnionFloatLiteral", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "696", + "$id": "706", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "697", - "kind": "constant", - "valueType": { - "$id": "698", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "140" }, "location": "Header", "isApiVersion": false, @@ -7959,12 +8349,12 @@ ], "responses": [ { - "$id": "699", + "$id": "707", "statusCodes": [ 200 ], "bodyType": { - "$ref": "101" + "$ref": "223" }, "headers": [], "isErrorResponse": false, @@ -7984,11 +8374,11 @@ }, "parameters": [ { - "$id": "700", + "$id": "708", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "697" + "$ref": "140" }, "location": "Header", "isApiVersion": false, @@ -8002,9 +8392,9 @@ } ], "response": { - "$id": "701", + "$id": "709", "type": { - "$ref": "101" + "$ref": "223" } }, "isOverride": false, @@ -8013,35 +8403,25 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.getAll" }, { - "$id": "702", + "$id": "710", "kind": "basic", "name": "getDefault", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return the default object", "operation": { - "$id": "703", + "$id": "711", "name": "getDefault", "resourceName": "UnionFloatLiteral", "doc": "Get models that will return the default object", "accessibility": "public", "parameters": [ { - "$id": "704", + "$id": "712", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "705", - "kind": "constant", - "valueType": { - "$id": "706", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "142" }, "location": "Header", "isApiVersion": false, @@ -8056,12 +8436,12 @@ ], "responses": [ { - "$id": "707", + "$id": "713", "statusCodes": [ 200 ], "bodyType": { - "$ref": "101" + "$ref": "223" }, "headers": [], "isErrorResponse": false, @@ -8081,11 +8461,11 @@ }, "parameters": [ { - "$id": "708", + "$id": "714", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "705" + "$ref": "142" }, "location": "Header", "isApiVersion": false, @@ -8099,9 +8479,9 @@ } ], "response": { - "$id": "709", + "$id": "715", "type": { - "$ref": "101" + "$ref": "223" } }, "isOverride": false, @@ -8110,36 +8490,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.getDefault" }, { - "$id": "710", + "$id": "716", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "711", + "$id": "717", "name": "putAll", "resourceName": "UnionFloatLiteral", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "712", + "$id": "718", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "713", - "kind": "constant", - "valueType": { - "$id": "714", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "144" }, "location": "Header", "isApiVersion": false, @@ -8152,11 +8522,11 @@ "skipUrlEncoding": false }, { - "$id": "715", + "$id": "719", "name": "body", "nameInRequest": "body", "type": { - "$ref": "101" + "$ref": "223" }, "location": "Body", "isApiVersion": false, @@ -8171,7 +8541,7 @@ ], "responses": [ { - "$id": "716", + "$id": "720", "statusCodes": [ 204 ], @@ -8193,11 +8563,11 @@ }, "parameters": [ { - "$id": "717", + "$id": "721", "name": "body", "nameInRequest": "body", "type": { - "$ref": "101" + "$ref": "223" }, "location": "Body", "isApiVersion": false, @@ -8210,12 +8580,12 @@ "skipUrlEncoding": false }, { - "$id": "718", + "$id": "722", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "713" + "$ref": "144" }, "location": "Header", "isApiVersion": false, @@ -8229,7 +8599,7 @@ } ], "response": { - "$id": "719" + "$id": "723" }, "isOverride": false, "generateConvenient": true, @@ -8237,36 +8607,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral.putAll" }, { - "$id": "720", + "$id": "724", "kind": "basic", "name": "putDefault", "accessibility": "public", "apiVersions": [], "doc": "Put a body with default properties.", "operation": { - "$id": "721", + "$id": "725", "name": "putDefault", "resourceName": "UnionFloatLiteral", "doc": "Put a body with default properties.", "accessibility": "public", "parameters": [ { - "$id": "722", + "$id": "726", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "723", - "kind": "constant", - "valueType": { - "$id": "724", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "146" }, "location": "Header", "isApiVersion": false, @@ -8279,11 +8639,11 @@ "skipUrlEncoding": false }, { - "$id": "725", + "$id": "727", "name": "body", "nameInRequest": "body", "type": { - "$ref": "101" + "$ref": "223" }, "location": "Body", "isApiVersion": false, @@ -8298,7 +8658,7 @@ ], "responses": [ { - "$id": "726", + "$id": "728", "statusCodes": [ 204 ], @@ -8320,11 +8680,11 @@ }, "parameters": [ { - "$id": "727", + "$id": "729", "name": "body", "nameInRequest": "body", "type": { - "$ref": "101" + "$ref": "223" }, "location": "Body", "isApiVersion": false, @@ -8337,12 +8697,12 @@ "skipUrlEncoding": false }, { - "$id": "728", + "$id": "730", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "723" + "$ref": "146" }, "location": "Header", "isApiVersion": false, @@ -8356,7 +8716,7 @@ } ], "response": { - "$id": "729" + "$id": "731" }, "isOverride": false, "generateConvenient": true, @@ -8366,12 +8726,12 @@ ], "parameters": [ { - "$id": "730", + "$id": "732", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "731", + "$id": "733", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8385,9 +8745,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "732", + "$id": "734", "type": { - "$id": "733", + "$id": "735", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8400,46 +8760,36 @@ "crossLanguageDefinitionId": "Type.Property.Optional.UnionFloatLiteral", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } }, { - "$id": "734", + "$id": "736", "kind": "client", "name": "RequiredAndOptional", "namespace": "Type.Property.Optional", "doc": "Test optional and required properties", "methods": [ { - "$id": "735", + "$id": "737", "kind": "basic", "name": "getAll", "accessibility": "public", "apiVersions": [], "doc": "Get models that will return all properties in the model", "operation": { - "$id": "736", + "$id": "738", "name": "getAll", "resourceName": "RequiredAndOptional", "doc": "Get models that will return all properties in the model", "accessibility": "public", "parameters": [ { - "$id": "737", + "$id": "739", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "738", - "kind": "constant", - "valueType": { - "$id": "739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -8459,7 +8809,7 @@ 200 ], "bodyType": { - "$ref": "105" + "$ref": "227" }, "headers": [], "isErrorResponse": false, @@ -8483,7 +8833,7 @@ "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "738" + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -8499,7 +8849,7 @@ "response": { "$id": "742", "type": { - "$ref": "105" + "$ref": "227" } }, "isOverride": false, @@ -8526,17 +8876,7 @@ "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "746", - "kind": "constant", - "valueType": { - "$id": "747", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -8551,12 +8891,12 @@ ], "responses": [ { - "$id": "748", + "$id": "746", "statusCodes": [ 200 ], "bodyType": { - "$ref": "105" + "$ref": "227" }, "headers": [], "isErrorResponse": false, @@ -8576,11 +8916,11 @@ }, "parameters": [ { - "$id": "749", + "$id": "747", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "746" + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -8594,9 +8934,9 @@ } ], "response": { - "$id": "750", + "$id": "748", "type": { - "$ref": "105" + "$ref": "227" } }, "isOverride": false, @@ -8605,36 +8945,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.getRequiredOnly" }, { - "$id": "751", + "$id": "749", "kind": "basic", "name": "putAll", "accessibility": "public", "apiVersions": [], "doc": "Put a body with all properties present.", "operation": { - "$id": "752", + "$id": "750", "name": "putAll", "resourceName": "RequiredAndOptional", "doc": "Put a body with all properties present.", "accessibility": "public", "parameters": [ { - "$id": "753", + "$id": "751", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "754", - "kind": "constant", - "valueType": { - "$id": "755", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -8647,11 +8977,11 @@ "skipUrlEncoding": false }, { - "$id": "756", + "$id": "752", "name": "body", "nameInRequest": "body", "type": { - "$ref": "105" + "$ref": "227" }, "location": "Body", "isApiVersion": false, @@ -8666,7 +8996,7 @@ ], "responses": [ { - "$id": "757", + "$id": "753", "statusCodes": [ 204 ], @@ -8688,11 +9018,11 @@ }, "parameters": [ { - "$id": "758", + "$id": "754", "name": "body", "nameInRequest": "body", "type": { - "$ref": "105" + "$ref": "227" }, "location": "Body", "isApiVersion": false, @@ -8705,12 +9035,12 @@ "skipUrlEncoding": false }, { - "$id": "759", + "$id": "755", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "754" + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -8724,7 +9054,7 @@ } ], "response": { - "$id": "760" + "$id": "756" }, "isOverride": false, "generateConvenient": true, @@ -8732,36 +9062,26 @@ "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional.putAll" }, { - "$id": "761", + "$id": "757", "kind": "basic", "name": "putRequiredOnly", "accessibility": "public", "apiVersions": [], "doc": "Put a body with only required properties.", "operation": { - "$id": "762", + "$id": "758", "name": "putRequiredOnly", "resourceName": "RequiredAndOptional", "doc": "Put a body with only required properties.", "accessibility": "public", "parameters": [ { - "$id": "763", + "$id": "759", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "764", - "kind": "constant", - "valueType": { - "$id": "765", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -8774,11 +9094,11 @@ "skipUrlEncoding": false }, { - "$id": "766", + "$id": "760", "name": "body", "nameInRequest": "body", "type": { - "$ref": "105" + "$ref": "227" }, "location": "Body", "isApiVersion": false, @@ -8793,7 +9113,7 @@ ], "responses": [ { - "$id": "767", + "$id": "761", "statusCodes": [ 204 ], @@ -8815,11 +9135,11 @@ }, "parameters": [ { - "$id": "768", + "$id": "762", "name": "body", "nameInRequest": "body", "type": { - "$ref": "105" + "$ref": "227" }, "location": "Body", "isApiVersion": false, @@ -8832,12 +9152,12 @@ "skipUrlEncoding": false }, { - "$id": "769", + "$id": "763", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "764" + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -8851,7 +9171,7 @@ } ], "response": { - "$id": "770" + "$id": "764" }, "isOverride": false, "generateConvenient": true, @@ -8861,12 +9181,12 @@ ], "parameters": [ { - "$id": "771", + "$id": "765", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "772", + "$id": "766", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8880,9 +9200,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "773", + "$id": "767", "type": { - "$id": "774", + "$id": "768", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8895,7 +9215,7 @@ "crossLanguageDefinitionId": "Type.Property.Optional.RequiredAndOptional", "apiVersions": [], "parent": { - "$ref": "114" + "$ref": "236" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralProperty.cs index 36438a93932b..b7859f1ca1a2 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralProperty.cs @@ -11,6 +11,6 @@ public partial class FloatLiteralProperty { public FloatLiteralProperty() => throw null; - public FloatLiteralPropertyProperty Property => throw null; + public float Property => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs deleted file mode 100644 index 7d454e7c89f5..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.Serialization.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace _Type.Property.ValueTypes -{ - public readonly partial struct FloatLiteralPropertyProperty - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.cs deleted file mode 100644 index 0b3c6b6b2240..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/FloatLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.ValueTypes -{ - public readonly partial struct FloatLiteralPropertyProperty : IEquatable - { - public FloatLiteralPropertyProperty(float value) => throw null; - - public static FloatLiteralPropertyProperty _43125 => throw null; - - public static bool operator ==(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; - - public static bool operator !=(FloatLiteralPropertyProperty left, FloatLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator FloatLiteralPropertyProperty(float value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(FloatLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralProperty.cs index f7d402b93cf2..cf511c8db490 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralProperty.cs @@ -11,6 +11,6 @@ public partial class IntLiteralProperty { public IntLiteralProperty() => throw null; - public IntLiteralPropertyProperty Property => throw null; + public int Property => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs deleted file mode 100644 index bb8ded4939fd..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.Serialization.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace _Type.Property.ValueTypes -{ - public readonly partial struct IntLiteralPropertyProperty - { - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.cs deleted file mode 100644 index b0985e4f01c9..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/IntLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.ValueTypes -{ - public readonly partial struct IntLiteralPropertyProperty : IEquatable - { - public IntLiteralPropertyProperty(int value) => throw null; - - public static IntLiteralPropertyProperty _42 => throw null; - - public static bool operator ==(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; - - public static bool operator !=(IntLiteralPropertyProperty left, IntLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator IntLiteralPropertyProperty(int value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(IntLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralProperty.cs index 3356665f7276..ee989924e7b8 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralProperty.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralProperty.cs @@ -11,6 +11,6 @@ public partial class StringLiteralProperty { public StringLiteralProperty() => throw null; - public StringLiteralPropertyProperty Property => throw null; + public string Property => throw null; } } diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralPropertyProperty.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralPropertyProperty.cs deleted file mode 100644 index 31bf3ec21b13..000000000000 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/Models/StringLiteralPropertyProperty.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace _Type.Property.ValueTypes -{ - public readonly partial struct StringLiteralPropertyProperty : IEquatable - { - public StringLiteralPropertyProperty(string value) => throw null; - - public static StringLiteralPropertyProperty Hello => throw null; - - public static bool operator ==(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; - - public static bool operator !=(StringLiteralPropertyProperty left, StringLiteralPropertyProperty right) => throw null; - - /// Converts a string to a . - /// The value. - public static implicit operator StringLiteralPropertyProperty(string value) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => throw null; - - public bool Equals(StringLiteralPropertyProperty other) => throw null; - - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => throw null; - - public override string ToString() => throw null; - } -} diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs index 2d521a62764b..35fc9f055d5c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Generated/TypePropertyValueTypesModelFactory.cs @@ -56,11 +56,11 @@ public static partial class TypePropertyValueTypesModelFactory public static UnknownArrayProperty UnknownArrayProperty(BinaryData @property = default) => throw null; - public static StringLiteralProperty StringLiteralProperty(StringLiteralPropertyProperty @property = default) => throw null; + public static StringLiteralProperty StringLiteralProperty(string @property = default) => throw null; - public static IntLiteralProperty IntLiteralProperty(IntLiteralPropertyProperty @property = default) => throw null; + public static IntLiteralProperty IntLiteralProperty(int @property = default) => throw null; - public static FloatLiteralProperty FloatLiteralProperty(FloatLiteralPropertyProperty @property = default) => throw null; + public static FloatLiteralProperty FloatLiteralProperty(float @property = default) => throw null; public static BooleanLiteralProperty BooleanLiteralProperty(bool @property = default) => throw null; diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj index 0897e6121b5e..b1c4ca3ad701 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/src/Type.Property.ValueTypes.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json index 45333f89cb2e..446ca828125b 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/property/value-types/tspCodeModel.json @@ -120,7 +120,8 @@ { "$id": "14", "kind": "enum", - "name": "StringLiteralProperty_property", + "name": "UnionStringLiteralPropertyProperty", + "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteralProperty.property.anonymous", "valueType": { "$id": "15", "kind": "string", @@ -134,29 +135,49 @@ "kind": "enumvalue", "name": "hello", "value": "hello", - "doc": "hello", "valueType": { - "$ref": "15" + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] }, "enumType": { "$ref": "14" - } + }, + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "world", + "value": "world", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "14" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.ValueTypes", - "doc": "The StringLiteralProperty_property", - "isFixed": false, + "namespace": "", + "isFixed": true, "isFlags": false, "usage": "Input,Output,Json", "decorators": [] }, { - "$id": "17", + "$id": "20", "kind": "enum", - "name": "IntLiteralProperty_property", + "name": "UnionIntLiteralPropertyProperty", + "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteralProperty.property.anonymous", "valueType": { - "$id": "18", + "$id": "21", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -164,264 +185,1135 @@ }, "values": [ { - "$id": "19", + "$id": "22", "kind": "enumvalue", "name": "42", "value": 42, - "doc": "42", "valueType": { - "$ref": "18" + "$id": "23", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] }, "enumType": { - "$ref": "17" - } + "$ref": "20" + }, + "decorators": [] + }, + { + "$id": "24", + "kind": "enumvalue", + "name": "43", + "value": 43, + "valueType": { + "$id": "25", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "enumType": { + "$ref": "20" + }, + "decorators": [] + } + ], + "namespace": "", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "26", + "kind": "enum", + "name": "UnionFloatLiteralPropertyProperty", + "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteralProperty.property.anonymous", + "valueType": { + "$id": "27", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "values": [ + { + "$id": "28", + "kind": "enumvalue", + "name": "43.125", + "value": 43.125, + "valueType": { + "$id": "29", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "decorators": [] + }, + { + "$id": "30", + "kind": "enumvalue", + "name": "46.875", + "value": 46.875, + "valueType": { + "$id": "31", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "enumType": { + "$ref": "26" + }, + "decorators": [] + } + ], + "namespace": "", + "isFixed": true, + "isFlags": false, + "usage": "Input,Output,Json", + "decorators": [] + }, + { + "$id": "32", + "kind": "enum", + "name": "ExtendedEnum", + "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtendedEnum", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "values": [ + { + "$id": "34", + "kind": "enumvalue", + "name": "EnumValue2", + "value": "value2", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" + }, + "decorators": [] } ], - "crossLanguageDefinitionId": "", "namespace": "Type.Property.ValueTypes", - "doc": "The IntLiteralProperty_property", "isFixed": false, "isFlags": false, "usage": "Input,Output,Json", "decorators": [] + } + ], + "constants": [ + { + "$id": "36", + "kind": "constant", + "name": "StringLiteralPropertyProperty", + "namespace": "Type.Property.ValueTypes", + "usage": "Input,Output,Json", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "hello", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "IntLiteralPropertyProperty", + "namespace": "Type.Property.ValueTypes", + "usage": "Input,Output,Json", + "valueType": { + "$id": "39", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 42, + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "FloatLiteralPropertyProperty", + "namespace": "Type.Property.ValueTypes", + "usage": "Input,Output,Json", + "valueType": { + "$id": "41", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 43.125, + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "BooleanLiteralPropertyProperty", + "namespace": "Type.Property.ValueTypes", + "usage": "Input,Output,Json", + "valueType": { + "$id": "43", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "putContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "putContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "54", + "kind": "constant", + "name": "putContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "putContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "putContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "putContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "putContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "putContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "putContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "putContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "getContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "86", + "kind": "constant", + "name": "putContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "88", + "kind": "constant", + "name": "getContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "90", + "kind": "constant", + "name": "putContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "92", + "kind": "constant", + "name": "getContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "94", + "kind": "constant", + "name": "putContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "96", + "kind": "constant", + "name": "getContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "98", + "kind": "constant", + "name": "putContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "100", + "kind": "constant", + "name": "getContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "102", + "kind": "constant", + "name": "putContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "104", + "kind": "constant", + "name": "getContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "105", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "106", + "kind": "constant", + "name": "putContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "107", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "108", + "kind": "constant", + "name": "getContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "109", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "110", + "kind": "constant", + "name": "putContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "111", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "112", + "kind": "constant", + "name": "getContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "113", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "114", + "kind": "constant", + "name": "putContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "115", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "116", + "kind": "constant", + "name": "getContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "117", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "118", + "kind": "constant", + "name": "putContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "119", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "120", + "kind": "constant", + "name": "getContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "121", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "122", + "kind": "constant", + "name": "putContentType19", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "123", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "124", + "kind": "constant", + "name": "getContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "125", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "126", + "kind": "constant", + "name": "putContentType20", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "127", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "128", + "kind": "constant", + "name": "getContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "129", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "130", + "kind": "constant", + "name": "putContentType21", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "131", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "132", + "kind": "constant", + "name": "getContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "133", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "134", + "kind": "constant", + "name": "putContentType22", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "135", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "136", + "kind": "constant", + "name": "getContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "137", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "138", + "kind": "constant", + "name": "putContentType23", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "139", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "140", + "kind": "constant", + "name": "getContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "141", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "142", + "kind": "constant", + "name": "putContentType24", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "143", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "144", + "kind": "constant", + "name": "getContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "145", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "146", + "kind": "constant", + "name": "putContentType25", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "147", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] }, { - "$id": "20", - "kind": "enum", - "name": "FloatLiteralProperty_property", + "$id": "148", + "kind": "constant", + "name": "getContentType26", + "namespace": "", + "usage": "None", "valueType": { - "$id": "21", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", + "$id": "149", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "22", - "kind": "enumvalue", - "name": "43.125", - "value": 43.125, - "doc": "43.125", - "valueType": { - "$ref": "21" - }, - "enumType": { - "$ref": "20" - } - } - ], - "crossLanguageDefinitionId": "", - "namespace": "Type.Property.ValueTypes", - "doc": "The FloatLiteralProperty_property", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "23", - "kind": "enum", - "name": "UnionStringLiteralPropertyProperty", - "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteralProperty.property.anonymous", + "$id": "150", + "kind": "constant", + "name": "putContentType26", + "namespace": "", + "usage": "None", "valueType": { - "$id": "24", + "$id": "151", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "25", - "kind": "enumvalue", - "name": "hello", - "value": "hello", - "valueType": { - "$id": "26", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "23" - }, - "decorators": [] - }, - { - "$id": "27", - "kind": "enumvalue", - "name": "world", - "value": "world", - "valueType": { - "$id": "28", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "23" - }, - "decorators": [] - } - ], - "namespace": "", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "29", - "kind": "enum", - "name": "UnionIntLiteralPropertyProperty", - "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteralProperty.property.anonymous", + "$id": "152", + "kind": "constant", + "name": "getContentType27", + "namespace": "", + "usage": "None", "valueType": { - "$id": "30", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", + "$id": "153", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "31", - "kind": "enumvalue", - "name": "42", - "value": 42, - "valueType": { - "$id": "32", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "enumType": { - "$ref": "29" - }, - "decorators": [] - }, - { - "$id": "33", - "kind": "enumvalue", - "name": "43", - "value": 43, - "valueType": { - "$id": "34", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "enumType": { - "$ref": "29" - }, - "decorators": [] - } - ], - "namespace": "", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] }, { - "$id": "35", - "kind": "enum", - "name": "UnionFloatLiteralPropertyProperty", - "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteralProperty.property.anonymous", + "$id": "154", + "kind": "constant", + "name": "putContentType27", + "namespace": "", + "usage": "None", "valueType": { - "$id": "36", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", + "$id": "155", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "37", - "kind": "enumvalue", - "name": "43.125", - "value": 43.125, - "valueType": { - "$id": "38", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "enumType": { - "$ref": "35" - }, - "decorators": [] - }, - { - "$id": "39", - "kind": "enumvalue", - "name": "46.875", - "value": 46.875, - "valueType": { - "$id": "40", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "enumType": { - "$ref": "35" - }, - "decorators": [] - } - ], + "value": "application/json", + "decorators": [] + }, + { + "$id": "156", + "kind": "constant", + "name": "getContentType28", "namespace": "", - "isFixed": true, - "isFlags": false, - "usage": "Input,Output,Json", + "usage": "None", + "valueType": { + "$id": "157", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", "decorators": [] }, { - "$id": "41", - "kind": "enum", - "name": "ExtendedEnum", - "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtendedEnum", + "$id": "158", + "kind": "constant", + "name": "putContentType28", + "namespace": "", + "usage": "None", "valueType": { - "$id": "42", + "$id": "159", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "values": [ - { - "$id": "43", - "kind": "enumvalue", - "name": "EnumValue2", - "value": "value2", - "valueType": { - "$id": "44", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "enumType": { - "$ref": "41" - }, - "decorators": [] - } - ], - "namespace": "Type.Property.ValueTypes", - "isFixed": false, - "isFlags": false, - "usage": "Input,Output,Json", + "value": "application/json", "decorators": [] } ], "models": [ { - "$id": "45", + "$id": "160", "kind": "model", "name": "BooleanProperty", "namespace": "Type.Property.ValueTypes", @@ -431,13 +1323,13 @@ "decorators": [], "properties": [ { - "$id": "46", + "$id": "161", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "47", + "$id": "162", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -450,9 +1342,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.BooleanProperty.property", "serializationOptions": { - "$id": "48", + "$id": "163", "json": { - "$id": "49", + "$id": "164", "name": "property" } } @@ -460,7 +1352,7 @@ ] }, { - "$id": "50", + "$id": "165", "kind": "model", "name": "StringProperty", "namespace": "Type.Property.ValueTypes", @@ -470,13 +1362,13 @@ "decorators": [], "properties": [ { - "$id": "51", + "$id": "166", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "52", + "$id": "167", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -489,9 +1381,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.StringProperty.property", "serializationOptions": { - "$id": "53", + "$id": "168", "json": { - "$id": "54", + "$id": "169", "name": "property" } } @@ -499,7 +1391,7 @@ ] }, { - "$id": "55", + "$id": "170", "kind": "model", "name": "BytesProperty", "namespace": "Type.Property.ValueTypes", @@ -509,13 +1401,13 @@ "decorators": [], "properties": [ { - "$id": "56", + "$id": "171", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "57", + "$id": "172", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -529,9 +1421,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.BytesProperty.property", "serializationOptions": { - "$id": "58", + "$id": "173", "json": { - "$id": "59", + "$id": "174", "name": "property" } } @@ -539,7 +1431,7 @@ ] }, { - "$id": "60", + "$id": "175", "kind": "model", "name": "IntProperty", "namespace": "Type.Property.ValueTypes", @@ -549,13 +1441,13 @@ "decorators": [], "properties": [ { - "$id": "61", + "$id": "176", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "62", + "$id": "177", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -568,9 +1460,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.IntProperty.property", "serializationOptions": { - "$id": "63", + "$id": "178", "json": { - "$id": "64", + "$id": "179", "name": "property" } } @@ -578,7 +1470,7 @@ ] }, { - "$id": "65", + "$id": "180", "kind": "model", "name": "FloatProperty", "namespace": "Type.Property.ValueTypes", @@ -588,13 +1480,13 @@ "decorators": [], "properties": [ { - "$id": "66", + "$id": "181", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "67", + "$id": "182", "kind": "float32", "name": "float32", "crossLanguageDefinitionId": "TypeSpec.float32", @@ -607,9 +1499,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.FloatProperty.property", "serializationOptions": { - "$id": "68", + "$id": "183", "json": { - "$id": "69", + "$id": "184", "name": "property" } } @@ -617,7 +1509,7 @@ ] }, { - "$id": "70", + "$id": "185", "kind": "model", "name": "DecimalProperty", "namespace": "Type.Property.ValueTypes", @@ -627,13 +1519,13 @@ "decorators": [], "properties": [ { - "$id": "71", + "$id": "186", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "72", + "$id": "187", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -646,9 +1538,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.DecimalProperty.property", "serializationOptions": { - "$id": "73", + "$id": "188", "json": { - "$id": "74", + "$id": "189", "name": "property" } } @@ -656,7 +1548,7 @@ ] }, { - "$id": "75", + "$id": "190", "kind": "model", "name": "Decimal128Property", "namespace": "Type.Property.ValueTypes", @@ -666,13 +1558,13 @@ "decorators": [], "properties": [ { - "$id": "76", + "$id": "191", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "77", + "$id": "192", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -685,9 +1577,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal128Property.property", "serializationOptions": { - "$id": "78", + "$id": "193", "json": { - "$id": "79", + "$id": "194", "name": "property" } } @@ -695,7 +1587,7 @@ ] }, { - "$id": "80", + "$id": "195", "kind": "model", "name": "DatetimeProperty", "namespace": "Type.Property.ValueTypes", @@ -705,18 +1597,18 @@ "decorators": [], "properties": [ { - "$id": "81", + "$id": "196", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "82", + "$id": "197", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc3339", "wireType": { - "$id": "83", + "$id": "198", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -732,9 +1624,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.DatetimeProperty.property", "serializationOptions": { - "$id": "84", + "$id": "199", "json": { - "$id": "85", + "$id": "200", "name": "property" } } @@ -742,7 +1634,7 @@ ] }, { - "$id": "86", + "$id": "201", "kind": "model", "name": "DurationProperty", "namespace": "Type.Property.ValueTypes", @@ -752,18 +1644,18 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "202", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "88", + "$id": "203", "kind": "duration", "name": "duration", "encode": "ISO8601", "wireType": { - "$id": "89", + "$id": "204", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -779,9 +1671,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.DurationProperty.property", "serializationOptions": { - "$id": "90", + "$id": "205", "json": { - "$id": "91", + "$id": "206", "name": "property" } } @@ -789,7 +1681,7 @@ ] }, { - "$id": "92", + "$id": "207", "kind": "model", "name": "EnumProperty", "namespace": "Type.Property.ValueTypes", @@ -799,7 +1691,7 @@ "decorators": [], "properties": [ { - "$id": "93", + "$id": "208", "kind": "property", "name": "property", "serializedName": "property", @@ -814,9 +1706,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.EnumProperty.property", "serializationOptions": { - "$id": "94", + "$id": "209", "json": { - "$id": "95", + "$id": "210", "name": "property" } } @@ -824,7 +1716,7 @@ ] }, { - "$id": "96", + "$id": "211", "kind": "model", "name": "ExtensibleEnumProperty", "namespace": "Type.Property.ValueTypes", @@ -834,7 +1726,7 @@ "decorators": [], "properties": [ { - "$id": "97", + "$id": "212", "kind": "property", "name": "property", "serializedName": "property", @@ -849,9 +1741,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtensibleEnumProperty.property", "serializationOptions": { - "$id": "98", + "$id": "213", "json": { - "$id": "99", + "$id": "214", "name": "property" } } @@ -859,7 +1751,7 @@ ] }, { - "$id": "100", + "$id": "215", "kind": "model", "name": "ModelProperty", "namespace": "Type.Property.ValueTypes", @@ -869,13 +1761,13 @@ "decorators": [], "properties": [ { - "$id": "101", + "$id": "216", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "102", + "$id": "217", "kind": "model", "name": "InnerModel", "namespace": "Type.Property.ValueTypes", @@ -885,13 +1777,13 @@ "decorators": [], "properties": [ { - "$id": "103", + "$id": "218", "kind": "property", "name": "property", "serializedName": "property", "doc": "Required string property", "type": { - "$id": "104", + "$id": "219", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -904,9 +1796,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.InnerModel.property", "serializationOptions": { - "$id": "105", + "$id": "220", "json": { - "$id": "106", + "$id": "221", "name": "property" } } @@ -920,9 +1812,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.ModelProperty.property", "serializationOptions": { - "$id": "107", + "$id": "222", "json": { - "$id": "108", + "$id": "223", "name": "property" } } @@ -930,10 +1822,10 @@ ] }, { - "$ref": "102" + "$ref": "217" }, { - "$id": "109", + "$id": "224", "kind": "model", "name": "CollectionsStringProperty", "namespace": "Type.Property.ValueTypes", @@ -943,17 +1835,17 @@ "decorators": [], "properties": [ { - "$id": "110", + "$id": "225", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "111", + "$id": "226", "kind": "array", "name": "Array", "valueType": { - "$id": "112", + "$id": "227", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -969,9 +1861,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsStringProperty.property", "serializationOptions": { - "$id": "113", + "$id": "228", "json": { - "$id": "114", + "$id": "229", "name": "property" } } @@ -979,7 +1871,7 @@ ] }, { - "$id": "115", + "$id": "230", "kind": "model", "name": "CollectionsIntProperty", "namespace": "Type.Property.ValueTypes", @@ -989,17 +1881,17 @@ "decorators": [], "properties": [ { - "$id": "116", + "$id": "231", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "117", + "$id": "232", "kind": "array", "name": "Array1", "valueType": { - "$id": "118", + "$id": "233", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -1015,9 +1907,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsIntProperty.property", "serializationOptions": { - "$id": "119", + "$id": "234", "json": { - "$id": "120", + "$id": "235", "name": "property" } } @@ -1025,7 +1917,7 @@ ] }, { - "$id": "121", + "$id": "236", "kind": "model", "name": "CollectionsModelProperty", "namespace": "Type.Property.ValueTypes", @@ -1035,17 +1927,17 @@ "decorators": [], "properties": [ { - "$id": "122", + "$id": "237", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "123", + "$id": "238", "kind": "array", "name": "ArrayInnerModel", "valueType": { - "$ref": "102" + "$ref": "217" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1057,9 +1949,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsModelProperty.property", "serializationOptions": { - "$id": "124", + "$id": "239", "json": { - "$id": "125", + "$id": "240", "name": "property" } } @@ -1067,7 +1959,7 @@ ] }, { - "$id": "126", + "$id": "241", "kind": "model", "name": "DictionaryStringProperty", "namespace": "Type.Property.ValueTypes", @@ -1077,23 +1969,23 @@ "decorators": [], "properties": [ { - "$id": "127", + "$id": "242", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "128", + "$id": "243", "kind": "dict", "keyType": { - "$id": "129", + "$id": "244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "valueType": { - "$id": "130", + "$id": "245", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1108,9 +2000,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.DictionaryStringProperty.property", "serializationOptions": { - "$id": "131", + "$id": "246", "json": { - "$id": "132", + "$id": "247", "name": "property" } } @@ -1118,7 +2010,7 @@ ] }, { - "$id": "133", + "$id": "248", "kind": "model", "name": "NeverProperty", "namespace": "Type.Property.ValueTypes", @@ -1129,7 +2021,7 @@ "properties": [] }, { - "$id": "134", + "$id": "249", "kind": "model", "name": "UnknownStringProperty", "namespace": "Type.Property.ValueTypes", @@ -1139,13 +2031,13 @@ "decorators": [], "properties": [ { - "$id": "135", + "$id": "250", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "136", + "$id": "251", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1158,9 +2050,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownStringProperty.property", "serializationOptions": { - "$id": "137", + "$id": "252", "json": { - "$id": "138", + "$id": "253", "name": "property" } } @@ -1168,7 +2060,7 @@ ] }, { - "$id": "139", + "$id": "254", "kind": "model", "name": "UnknownIntProperty", "namespace": "Type.Property.ValueTypes", @@ -1178,13 +2070,13 @@ "decorators": [], "properties": [ { - "$id": "140", + "$id": "255", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "141", + "$id": "256", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1197,9 +2089,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownIntProperty.property", "serializationOptions": { - "$id": "142", + "$id": "257", "json": { - "$id": "143", + "$id": "258", "name": "property" } } @@ -1207,7 +2099,7 @@ ] }, { - "$id": "144", + "$id": "259", "kind": "model", "name": "UnknownDictProperty", "namespace": "Type.Property.ValueTypes", @@ -1217,13 +2109,13 @@ "decorators": [], "properties": [ { - "$id": "145", + "$id": "260", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "146", + "$id": "261", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1236,9 +2128,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownDictProperty.property", "serializationOptions": { - "$id": "147", + "$id": "262", "json": { - "$id": "148", + "$id": "263", "name": "property" } } @@ -1246,7 +2138,7 @@ ] }, { - "$id": "149", + "$id": "264", "kind": "model", "name": "UnknownArrayProperty", "namespace": "Type.Property.ValueTypes", @@ -1256,13 +2148,13 @@ "decorators": [], "properties": [ { - "$id": "150", + "$id": "265", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "151", + "$id": "266", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -1275,9 +2167,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownArrayProperty.property", "serializationOptions": { - "$id": "152", + "$id": "267", "json": { - "$id": "153", + "$id": "268", "name": "property" } } @@ -1285,7 +2177,7 @@ ] }, { - "$id": "154", + "$id": "269", "kind": "model", "name": "StringLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1295,19 +2187,13 @@ "decorators": [], "properties": [ { - "$id": "155", + "$id": "270", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "156", - "kind": "constant", - "valueType": { - "$ref": "14" - }, - "value": "hello", - "decorators": [] + "$ref": "36" }, "optional": false, "readOnly": false, @@ -1316,9 +2202,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.StringLiteralProperty.property", "serializationOptions": { - "$id": "157", + "$id": "271", "json": { - "$id": "158", + "$id": "272", "name": "property" } } @@ -1326,7 +2212,7 @@ ] }, { - "$id": "159", + "$id": "273", "kind": "model", "name": "IntLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1336,19 +2222,13 @@ "decorators": [], "properties": [ { - "$id": "160", + "$id": "274", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "161", - "kind": "constant", - "valueType": { - "$ref": "17" - }, - "value": 42, - "decorators": [] + "$ref": "38" }, "optional": false, "readOnly": false, @@ -1357,9 +2237,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.IntLiteralProperty.property", "serializationOptions": { - "$id": "162", + "$id": "275", "json": { - "$id": "163", + "$id": "276", "name": "property" } } @@ -1367,7 +2247,7 @@ ] }, { - "$id": "164", + "$id": "277", "kind": "model", "name": "FloatLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1377,19 +2257,13 @@ "decorators": [], "properties": [ { - "$id": "165", + "$id": "278", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "166", - "kind": "constant", - "valueType": { - "$ref": "20" - }, - "value": 43.125, - "decorators": [] + "$ref": "40" }, "optional": false, "readOnly": false, @@ -1398,9 +2272,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.FloatLiteralProperty.property", "serializationOptions": { - "$id": "167", + "$id": "279", "json": { - "$id": "168", + "$id": "280", "name": "property" } } @@ -1408,7 +2282,7 @@ ] }, { - "$id": "169", + "$id": "281", "kind": "model", "name": "BooleanLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1418,23 +2292,13 @@ "decorators": [], "properties": [ { - "$id": "170", + "$id": "282", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "171", - "kind": "constant", - "valueType": { - "$id": "172", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "42" }, "optional": false, "readOnly": false, @@ -1443,9 +2307,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.BooleanLiteralProperty.property", "serializationOptions": { - "$id": "173", + "$id": "283", "json": { - "$id": "174", + "$id": "284", "name": "property" } } @@ -1453,7 +2317,7 @@ ] }, { - "$id": "175", + "$id": "285", "kind": "model", "name": "UnionStringLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1463,13 +2327,13 @@ "decorators": [], "properties": [ { - "$id": "176", + "$id": "286", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "23" + "$ref": "14" }, "optional": false, "readOnly": false, @@ -1478,9 +2342,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteralProperty.property", "serializationOptions": { - "$id": "177", + "$id": "287", "json": { - "$id": "178", + "$id": "288", "name": "property" } } @@ -1488,7 +2352,7 @@ ] }, { - "$id": "179", + "$id": "289", "kind": "model", "name": "UnionIntLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1498,13 +2362,13 @@ "decorators": [], "properties": [ { - "$id": "180", + "$id": "290", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "29" + "$ref": "20" }, "optional": false, "readOnly": false, @@ -1513,9 +2377,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteralProperty.property", "serializationOptions": { - "$id": "181", + "$id": "291", "json": { - "$id": "182", + "$id": "292", "name": "property" } } @@ -1523,7 +2387,7 @@ ] }, { - "$id": "183", + "$id": "293", "kind": "model", "name": "UnionFloatLiteralProperty", "namespace": "Type.Property.ValueTypes", @@ -1533,13 +2397,13 @@ "decorators": [], "properties": [ { - "$id": "184", + "$id": "294", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$ref": "35" + "$ref": "26" }, "optional": false, "readOnly": false, @@ -1548,9 +2412,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteralProperty.property", "serializationOptions": { - "$id": "185", + "$id": "295", "json": { - "$id": "186", + "$id": "296", "name": "property" } } @@ -1558,7 +2422,7 @@ ] }, { - "$id": "187", + "$id": "297", "kind": "model", "name": "UnionEnumValueProperty", "namespace": "Type.Property.ValueTypes", @@ -1568,18 +2432,26 @@ "decorators": [], "properties": [ { - "$id": "188", + "$id": "298", "kind": "property", "name": "property", "serializedName": "property", "doc": "Property", "type": { - "$id": "189", - "kind": "constant", + "$id": "299", + "kind": "enumvalue", + "name": "EnumValue2", + "value": "value2", "valueType": { - "$ref": "41" + "$id": "300", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "32" }, - "value": "value2", "decorators": [] }, "optional": false, @@ -1589,9 +2461,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionEnumValueProperty.property", "serializationOptions": { - "$id": "190", + "$id": "301", "json": { - "$id": "191", + "$id": "302", "name": "property" } } @@ -1601,7 +2473,7 @@ ], "clients": [ { - "$id": "192", + "$id": "303", "kind": "client", "name": "ValueTypesClient", "namespace": "Type.Property.ValueTypes", @@ -1609,12 +2481,12 @@ "methods": [], "parameters": [ { - "$id": "193", + "$id": "304", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "194", + "$id": "305", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1628,9 +2500,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "195", + "$id": "306", "type": { - "$id": "196", + "$id": "307", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1644,41 +2516,31 @@ "apiVersions": [], "children": [ { - "$id": "197", + "$id": "308", "kind": "client", "name": "Boolean", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "198", + "$id": "309", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "199", + "$id": "310", "name": "get", "resourceName": "Boolean", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "200", + "$id": "311", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "201", - "kind": "constant", - "valueType": { - "$id": "202", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -1693,12 +2555,12 @@ ], "responses": [ { - "$id": "203", + "$id": "312", "statusCodes": [ 200 ], "bodyType": { - "$ref": "45" + "$ref": "160" }, "headers": [], "isErrorResponse": false, @@ -1718,11 +2580,11 @@ }, "parameters": [ { - "$id": "204", + "$id": "313", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "201" + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -1736,9 +2598,9 @@ } ], "response": { - "$id": "205", + "$id": "314", "type": { - "$ref": "45" + "$ref": "160" } }, "isOverride": false, @@ -1747,36 +2609,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Boolean.get" }, { - "$id": "206", + "$id": "315", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "207", + "$id": "316", "name": "put", "resourceName": "Boolean", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "208", + "$id": "317", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "209", - "kind": "constant", - "valueType": { - "$id": "210", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -1789,12 +2641,12 @@ "skipUrlEncoding": false }, { - "$id": "211", + "$id": "318", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "45" + "$ref": "160" }, "location": "Body", "isApiVersion": false, @@ -1809,7 +2661,7 @@ ], "responses": [ { - "$id": "212", + "$id": "319", "statusCodes": [ 204 ], @@ -1831,12 +2683,12 @@ }, "parameters": [ { - "$id": "213", + "$id": "320", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "45" + "$ref": "160" }, "location": "Body", "isApiVersion": false, @@ -1849,12 +2701,12 @@ "skipUrlEncoding": false }, { - "$id": "214", + "$id": "321", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "209" + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -1868,7 +2720,7 @@ } ], "response": { - "$id": "215" + "$id": "322" }, "isOverride": false, "generateConvenient": true, @@ -1878,12 +2730,12 @@ ], "parameters": [ { - "$id": "216", + "$id": "323", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "217", + "$id": "324", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1897,9 +2749,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "218", + "$id": "325", "type": { - "$id": "219", + "$id": "326", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1912,45 +2764,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Boolean", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "220", + "$id": "327", "kind": "client", "name": "String", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "221", + "$id": "328", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "222", + "$id": "329", "name": "get", "resourceName": "String", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "223", + "$id": "330", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "224", - "kind": "constant", - "valueType": { - "$id": "225", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -1965,12 +2807,12 @@ ], "responses": [ { - "$id": "226", + "$id": "331", "statusCodes": [ 200 ], "bodyType": { - "$ref": "50" + "$ref": "165" }, "headers": [], "isErrorResponse": false, @@ -1990,11 +2832,11 @@ }, "parameters": [ { - "$id": "227", + "$id": "332", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "224" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2008,9 +2850,9 @@ } ], "response": { - "$id": "228", + "$id": "333", "type": { - "$ref": "50" + "$ref": "165" } }, "isOverride": false, @@ -2019,36 +2861,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.String.get" }, { - "$id": "229", + "$id": "334", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "230", + "$id": "335", "name": "put", "resourceName": "String", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "231", + "$id": "336", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "232", - "kind": "constant", - "valueType": { - "$id": "233", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2061,12 +2893,12 @@ "skipUrlEncoding": false }, { - "$id": "234", + "$id": "337", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "50" + "$ref": "165" }, "location": "Body", "isApiVersion": false, @@ -2081,7 +2913,7 @@ ], "responses": [ { - "$id": "235", + "$id": "338", "statusCodes": [ 204 ], @@ -2103,12 +2935,12 @@ }, "parameters": [ { - "$id": "236", + "$id": "339", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "50" + "$ref": "165" }, "location": "Body", "isApiVersion": false, @@ -2121,12 +2953,12 @@ "skipUrlEncoding": false }, { - "$id": "237", + "$id": "340", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "232" + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2140,7 +2972,7 @@ } ], "response": { - "$id": "238" + "$id": "341" }, "isOverride": false, "generateConvenient": true, @@ -2150,12 +2982,12 @@ ], "parameters": [ { - "$id": "239", + "$id": "342", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "240", + "$id": "343", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2169,9 +3001,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "241", + "$id": "344", "type": { - "$id": "242", + "$id": "345", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2184,45 +3016,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.String", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "243", + "$id": "346", "kind": "client", "name": "Bytes", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "244", + "$id": "347", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "245", + "$id": "348", "name": "get", "resourceName": "Bytes", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "246", + "$id": "349", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "247", - "kind": "constant", - "valueType": { - "$id": "248", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2237,12 +3059,12 @@ ], "responses": [ { - "$id": "249", + "$id": "350", "statusCodes": [ 200 ], "bodyType": { - "$ref": "55" + "$ref": "170" }, "headers": [], "isErrorResponse": false, @@ -2262,11 +3084,11 @@ }, "parameters": [ { - "$id": "250", + "$id": "351", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "247" + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2280,9 +3102,9 @@ } ], "response": { - "$id": "251", + "$id": "352", "type": { - "$ref": "55" + "$ref": "170" } }, "isOverride": false, @@ -2291,36 +3113,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Bytes.get" }, { - "$id": "252", + "$id": "353", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "253", + "$id": "354", "name": "put", "resourceName": "Bytes", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "254", + "$id": "355", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "255", - "kind": "constant", - "valueType": { - "$id": "256", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -2333,12 +3145,12 @@ "skipUrlEncoding": false }, { - "$id": "257", + "$id": "356", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "55" + "$ref": "170" }, "location": "Body", "isApiVersion": false, @@ -2353,7 +3165,7 @@ ], "responses": [ { - "$id": "258", + "$id": "357", "statusCodes": [ 204 ], @@ -2375,12 +3187,12 @@ }, "parameters": [ { - "$id": "259", + "$id": "358", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "55" + "$ref": "170" }, "location": "Body", "isApiVersion": false, @@ -2393,12 +3205,12 @@ "skipUrlEncoding": false }, { - "$id": "260", + "$id": "359", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "255" + "$ref": "54" }, "location": "Header", "isApiVersion": false, @@ -2412,7 +3224,7 @@ } ], "response": { - "$id": "261" + "$id": "360" }, "isOverride": false, "generateConvenient": true, @@ -2422,12 +3234,12 @@ ], "parameters": [ { - "$id": "262", + "$id": "361", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "263", + "$id": "362", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2441,9 +3253,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "264", + "$id": "363", "type": { - "$id": "265", + "$id": "364", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2456,45 +3268,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Bytes", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "266", + "$id": "365", "kind": "client", "name": "Int", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "267", + "$id": "366", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "268", + "$id": "367", "name": "get", "resourceName": "Int", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "269", + "$id": "368", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "270", - "kind": "constant", - "valueType": { - "$id": "271", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -2509,12 +3311,12 @@ ], "responses": [ { - "$id": "272", + "$id": "369", "statusCodes": [ 200 ], "bodyType": { - "$ref": "60" + "$ref": "175" }, "headers": [], "isErrorResponse": false, @@ -2534,11 +3336,11 @@ }, "parameters": [ { - "$id": "273", + "$id": "370", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "270" + "$ref": "56" }, "location": "Header", "isApiVersion": false, @@ -2552,9 +3354,9 @@ } ], "response": { - "$id": "274", + "$id": "371", "type": { - "$ref": "60" + "$ref": "175" } }, "isOverride": false, @@ -2563,36 +3365,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Int.get" }, { - "$id": "275", + "$id": "372", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "276", + "$id": "373", "name": "put", "resourceName": "Int", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "277", + "$id": "374", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "278", - "kind": "constant", - "valueType": { - "$id": "279", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -2605,12 +3397,12 @@ "skipUrlEncoding": false }, { - "$id": "280", + "$id": "375", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "60" + "$ref": "175" }, "location": "Body", "isApiVersion": false, @@ -2625,7 +3417,7 @@ ], "responses": [ { - "$id": "281", + "$id": "376", "statusCodes": [ 204 ], @@ -2647,12 +3439,12 @@ }, "parameters": [ { - "$id": "282", + "$id": "377", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "60" + "$ref": "175" }, "location": "Body", "isApiVersion": false, @@ -2665,12 +3457,12 @@ "skipUrlEncoding": false }, { - "$id": "283", + "$id": "378", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "278" + "$ref": "58" }, "location": "Header", "isApiVersion": false, @@ -2684,7 +3476,7 @@ } ], "response": { - "$id": "284" + "$id": "379" }, "isOverride": false, "generateConvenient": true, @@ -2694,12 +3486,12 @@ ], "parameters": [ { - "$id": "285", + "$id": "380", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "286", + "$id": "381", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2713,9 +3505,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "287", + "$id": "382", "type": { - "$id": "288", + "$id": "383", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2728,45 +3520,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Int", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "289", + "$id": "384", "kind": "client", "name": "Float", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "290", + "$id": "385", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "291", + "$id": "386", "name": "get", "resourceName": "Float", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "292", + "$id": "387", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "293", - "kind": "constant", - "valueType": { - "$id": "294", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -2781,12 +3563,12 @@ ], "responses": [ { - "$id": "295", + "$id": "388", "statusCodes": [ 200 ], "bodyType": { - "$ref": "65" + "$ref": "180" }, "headers": [], "isErrorResponse": false, @@ -2806,11 +3588,11 @@ }, "parameters": [ { - "$id": "296", + "$id": "389", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "293" + "$ref": "60" }, "location": "Header", "isApiVersion": false, @@ -2824,9 +3606,9 @@ } ], "response": { - "$id": "297", + "$id": "390", "type": { - "$ref": "65" + "$ref": "180" } }, "isOverride": false, @@ -2835,36 +3617,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Float.get" }, { - "$id": "298", + "$id": "391", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "299", + "$id": "392", "name": "put", "resourceName": "Float", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "300", + "$id": "393", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "301", - "kind": "constant", - "valueType": { - "$id": "302", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -2877,12 +3649,12 @@ "skipUrlEncoding": false }, { - "$id": "303", + "$id": "394", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "65" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -2897,7 +3669,7 @@ ], "responses": [ { - "$id": "304", + "$id": "395", "statusCodes": [ 204 ], @@ -2919,12 +3691,12 @@ }, "parameters": [ { - "$id": "305", + "$id": "396", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "65" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -2937,12 +3709,12 @@ "skipUrlEncoding": false }, { - "$id": "306", + "$id": "397", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "301" + "$ref": "62" }, "location": "Header", "isApiVersion": false, @@ -2956,7 +3728,7 @@ } ], "response": { - "$id": "307" + "$id": "398" }, "isOverride": false, "generateConvenient": true, @@ -2966,12 +3738,12 @@ ], "parameters": [ { - "$id": "308", + "$id": "399", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "309", + "$id": "400", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2985,9 +3757,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "310", + "$id": "401", "type": { - "$id": "311", + "$id": "402", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3000,45 +3772,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Float", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "312", + "$id": "403", "kind": "client", "name": "Decimal", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "313", + "$id": "404", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "314", + "$id": "405", "name": "get", "resourceName": "Decimal", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "315", + "$id": "406", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "316", - "kind": "constant", - "valueType": { - "$id": "317", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3053,12 +3815,12 @@ ], "responses": [ { - "$id": "318", + "$id": "407", "statusCodes": [ 200 ], "bodyType": { - "$ref": "70" + "$ref": "185" }, "headers": [], "isErrorResponse": false, @@ -3078,11 +3840,11 @@ }, "parameters": [ { - "$id": "319", + "$id": "408", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "316" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -3096,9 +3858,9 @@ } ], "response": { - "$id": "320", + "$id": "409", "type": { - "$ref": "70" + "$ref": "185" } }, "isOverride": false, @@ -3107,36 +3869,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal.get" }, { - "$id": "321", + "$id": "410", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "322", + "$id": "411", "name": "put", "resourceName": "Decimal", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "323", + "$id": "412", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "324", - "kind": "constant", - "valueType": { - "$id": "325", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -3149,12 +3901,12 @@ "skipUrlEncoding": false }, { - "$id": "326", + "$id": "413", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "70" + "$ref": "185" }, "location": "Body", "isApiVersion": false, @@ -3169,7 +3921,7 @@ ], "responses": [ { - "$id": "327", + "$id": "414", "statusCodes": [ 204 ], @@ -3191,12 +3943,12 @@ }, "parameters": [ { - "$id": "328", + "$id": "415", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "70" + "$ref": "185" }, "location": "Body", "isApiVersion": false, @@ -3209,12 +3961,12 @@ "skipUrlEncoding": false }, { - "$id": "329", + "$id": "416", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "324" + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -3228,7 +3980,7 @@ } ], "response": { - "$id": "330" + "$id": "417" }, "isOverride": false, "generateConvenient": true, @@ -3238,12 +3990,12 @@ ], "parameters": [ { - "$id": "331", + "$id": "418", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "332", + "$id": "419", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3257,9 +4009,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "333", + "$id": "420", "type": { - "$id": "334", + "$id": "421", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3272,45 +4024,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "335", + "$id": "422", "kind": "client", "name": "Decimal128", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "336", + "$id": "423", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "337", + "$id": "424", "name": "get", "resourceName": "Decimal128", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "338", + "$id": "425", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "339", - "kind": "constant", - "valueType": { - "$id": "340", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -3325,12 +4067,12 @@ ], "responses": [ { - "$id": "341", + "$id": "426", "statusCodes": [ 200 ], "bodyType": { - "$ref": "75" + "$ref": "190" }, "headers": [], "isErrorResponse": false, @@ -3350,11 +4092,11 @@ }, "parameters": [ { - "$id": "342", + "$id": "427", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "339" + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -3368,9 +4110,9 @@ } ], "response": { - "$id": "343", + "$id": "428", "type": { - "$ref": "75" + "$ref": "190" } }, "isOverride": false, @@ -3379,36 +4121,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal128.get" }, { - "$id": "344", + "$id": "429", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "345", + "$id": "430", "name": "put", "resourceName": "Decimal128", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "346", + "$id": "431", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "347", - "kind": "constant", - "valueType": { - "$id": "348", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -3421,12 +4153,12 @@ "skipUrlEncoding": false }, { - "$id": "349", + "$id": "432", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "75" + "$ref": "190" }, "location": "Body", "isApiVersion": false, @@ -3441,7 +4173,7 @@ ], "responses": [ { - "$id": "350", + "$id": "433", "statusCodes": [ 204 ], @@ -3463,12 +4195,12 @@ }, "parameters": [ { - "$id": "351", + "$id": "434", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "75" + "$ref": "190" }, "location": "Body", "isApiVersion": false, @@ -3481,12 +4213,12 @@ "skipUrlEncoding": false }, { - "$id": "352", + "$id": "435", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "347" + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -3500,7 +4232,7 @@ } ], "response": { - "$id": "353" + "$id": "436" }, "isOverride": false, "generateConvenient": true, @@ -3510,12 +4242,12 @@ ], "parameters": [ { - "$id": "354", + "$id": "437", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "355", + "$id": "438", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3529,9 +4261,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "356", + "$id": "439", "type": { - "$id": "357", + "$id": "440", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3544,45 +4276,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Decimal128", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "358", + "$id": "441", "kind": "client", "name": "Datetime", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "359", + "$id": "442", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "360", + "$id": "443", "name": "get", "resourceName": "Datetime", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "361", + "$id": "444", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "362", - "kind": "constant", - "valueType": { - "$id": "363", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -3597,12 +4319,12 @@ ], "responses": [ { - "$id": "364", + "$id": "445", "statusCodes": [ 200 ], "bodyType": { - "$ref": "80" + "$ref": "195" }, "headers": [], "isErrorResponse": false, @@ -3622,11 +4344,11 @@ }, "parameters": [ { - "$id": "365", + "$id": "446", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "362" + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -3640,9 +4362,9 @@ } ], "response": { - "$id": "366", + "$id": "447", "type": { - "$ref": "80" + "$ref": "195" } }, "isOverride": false, @@ -3651,36 +4373,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Datetime.get" }, { - "$id": "367", + "$id": "448", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "368", + "$id": "449", "name": "put", "resourceName": "Datetime", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "369", + "$id": "450", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "370", - "kind": "constant", - "valueType": { - "$id": "371", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3693,12 +4405,12 @@ "skipUrlEncoding": false }, { - "$id": "372", + "$id": "451", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "80" + "$ref": "195" }, "location": "Body", "isApiVersion": false, @@ -3713,7 +4425,7 @@ ], "responses": [ { - "$id": "373", + "$id": "452", "statusCodes": [ 204 ], @@ -3735,12 +4447,12 @@ }, "parameters": [ { - "$id": "374", + "$id": "453", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "80" + "$ref": "195" }, "location": "Body", "isApiVersion": false, @@ -3753,12 +4465,12 @@ "skipUrlEncoding": false }, { - "$id": "375", + "$id": "454", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "370" + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -3772,7 +4484,7 @@ } ], "response": { - "$id": "376" + "$id": "455" }, "isOverride": false, "generateConvenient": true, @@ -3782,12 +4494,12 @@ ], "parameters": [ { - "$id": "377", + "$id": "456", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "378", + "$id": "457", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3801,9 +4513,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "379", + "$id": "458", "type": { - "$id": "380", + "$id": "459", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3816,45 +4528,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Datetime", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "381", + "$id": "460", "kind": "client", "name": "Duration", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "382", + "$id": "461", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "383", + "$id": "462", "name": "get", "resourceName": "Duration", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "384", + "$id": "463", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "385", - "kind": "constant", - "valueType": { - "$id": "386", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -3869,12 +4571,12 @@ ], "responses": [ { - "$id": "387", + "$id": "464", "statusCodes": [ 200 ], "bodyType": { - "$ref": "86" + "$ref": "201" }, "headers": [], "isErrorResponse": false, @@ -3894,11 +4596,11 @@ }, "parameters": [ { - "$id": "388", + "$id": "465", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "385" + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -3912,9 +4614,9 @@ } ], "response": { - "$id": "389", + "$id": "466", "type": { - "$ref": "86" + "$ref": "201" } }, "isOverride": false, @@ -3923,36 +4625,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Duration.get" }, { - "$id": "390", + "$id": "467", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "391", + "$id": "468", "name": "put", "resourceName": "Duration", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "392", + "$id": "469", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "393", - "kind": "constant", - "valueType": { - "$id": "394", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -3965,12 +4657,12 @@ "skipUrlEncoding": false }, { - "$id": "395", + "$id": "470", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "86" + "$ref": "201" }, "location": "Body", "isApiVersion": false, @@ -3985,7 +4677,7 @@ ], "responses": [ { - "$id": "396", + "$id": "471", "statusCodes": [ 204 ], @@ -4007,12 +4699,12 @@ }, "parameters": [ { - "$id": "397", + "$id": "472", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "86" + "$ref": "201" }, "location": "Body", "isApiVersion": false, @@ -4025,12 +4717,12 @@ "skipUrlEncoding": false }, { - "$id": "398", + "$id": "473", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "393" + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -4044,7 +4736,7 @@ } ], "response": { - "$id": "399" + "$id": "474" }, "isOverride": false, "generateConvenient": true, @@ -4054,12 +4746,12 @@ ], "parameters": [ { - "$id": "400", + "$id": "475", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "401", + "$id": "476", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4073,9 +4765,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "402", + "$id": "477", "type": { - "$id": "403", + "$id": "478", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4088,45 +4780,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Duration", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "404", + "$id": "479", "kind": "client", "name": "Enum", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "405", + "$id": "480", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "406", + "$id": "481", "name": "get", "resourceName": "Enum", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "407", + "$id": "482", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "408", - "kind": "constant", - "valueType": { - "$id": "409", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -4141,12 +4823,12 @@ ], "responses": [ { - "$id": "410", + "$id": "483", "statusCodes": [ 200 ], "bodyType": { - "$ref": "92" + "$ref": "207" }, "headers": [], "isErrorResponse": false, @@ -4166,11 +4848,11 @@ }, "parameters": [ { - "$id": "411", + "$id": "484", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "408" + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -4184,9 +4866,9 @@ } ], "response": { - "$id": "412", + "$id": "485", "type": { - "$ref": "92" + "$ref": "207" } }, "isOverride": false, @@ -4195,36 +4877,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Enum.get" }, { - "$id": "413", + "$id": "486", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "414", + "$id": "487", "name": "put", "resourceName": "Enum", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "415", + "$id": "488", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "416", - "kind": "constant", - "valueType": { - "$id": "417", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -4237,12 +4909,12 @@ "skipUrlEncoding": false }, { - "$id": "418", + "$id": "489", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "92" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -4257,7 +4929,7 @@ ], "responses": [ { - "$id": "419", + "$id": "490", "statusCodes": [ 204 ], @@ -4279,12 +4951,12 @@ }, "parameters": [ { - "$id": "420", + "$id": "491", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "92" + "$ref": "207" }, "location": "Body", "isApiVersion": false, @@ -4297,12 +4969,12 @@ "skipUrlEncoding": false }, { - "$id": "421", + "$id": "492", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "416" + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -4316,7 +4988,7 @@ } ], "response": { - "$id": "422" + "$id": "493" }, "isOverride": false, "generateConvenient": true, @@ -4326,12 +4998,12 @@ ], "parameters": [ { - "$id": "423", + "$id": "494", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "424", + "$id": "495", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4345,9 +5017,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "425", + "$id": "496", "type": { - "$id": "426", + "$id": "497", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4360,45 +5032,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Enum", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "427", + "$id": "498", "kind": "client", "name": "ExtensibleEnum", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "428", + "$id": "499", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "429", + "$id": "500", "name": "get", "resourceName": "ExtensibleEnum", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "430", + "$id": "501", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "431", - "kind": "constant", - "valueType": { - "$id": "432", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -4413,12 +5075,12 @@ ], "responses": [ { - "$id": "433", + "$id": "502", "statusCodes": [ 200 ], "bodyType": { - "$ref": "96" + "$ref": "211" }, "headers": [], "isErrorResponse": false, @@ -4438,11 +5100,11 @@ }, "parameters": [ { - "$id": "434", + "$id": "503", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "431" + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -4456,9 +5118,9 @@ } ], "response": { - "$id": "435", + "$id": "504", "type": { - "$ref": "96" + "$ref": "211" } }, "isOverride": false, @@ -4467,36 +5129,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtensibleEnum.get" }, { - "$id": "436", + "$id": "505", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "437", + "$id": "506", "name": "put", "resourceName": "ExtensibleEnum", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "438", + "$id": "507", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "439", - "kind": "constant", - "valueType": { - "$id": "440", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -4509,12 +5161,12 @@ "skipUrlEncoding": false }, { - "$id": "441", + "$id": "508", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "96" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -4529,7 +5181,7 @@ ], "responses": [ { - "$id": "442", + "$id": "509", "statusCodes": [ 204 ], @@ -4551,12 +5203,12 @@ }, "parameters": [ { - "$id": "443", + "$id": "510", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "96" + "$ref": "211" }, "location": "Body", "isApiVersion": false, @@ -4569,12 +5221,12 @@ "skipUrlEncoding": false }, { - "$id": "444", + "$id": "511", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "439" + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -4588,7 +5240,7 @@ } ], "response": { - "$id": "445" + "$id": "512" }, "isOverride": false, "generateConvenient": true, @@ -4598,12 +5250,12 @@ ], "parameters": [ { - "$id": "446", + "$id": "513", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "447", + "$id": "514", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4617,9 +5269,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "448", + "$id": "515", "type": { - "$id": "449", + "$id": "516", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4632,45 +5284,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.ExtensibleEnum", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "450", + "$id": "517", "kind": "client", "name": "Model", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "451", + "$id": "518", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "452", + "$id": "519", "name": "get", "resourceName": "Model", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "453", + "$id": "520", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "454", - "kind": "constant", - "valueType": { - "$id": "455", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -4685,12 +5327,12 @@ ], "responses": [ { - "$id": "456", + "$id": "521", "statusCodes": [ 200 ], "bodyType": { - "$ref": "100" + "$ref": "215" }, "headers": [], "isErrorResponse": false, @@ -4710,11 +5352,11 @@ }, "parameters": [ { - "$id": "457", + "$id": "522", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "454" + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -4728,9 +5370,9 @@ } ], "response": { - "$id": "458", + "$id": "523", "type": { - "$ref": "100" + "$ref": "215" } }, "isOverride": false, @@ -4739,36 +5381,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Model.get" }, { - "$id": "459", + "$id": "524", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "460", + "$id": "525", "name": "put", "resourceName": "Model", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "461", + "$id": "526", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "462", - "kind": "constant", - "valueType": { - "$id": "463", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -4781,12 +5413,12 @@ "skipUrlEncoding": false }, { - "$id": "464", + "$id": "527", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "100" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -4801,7 +5433,7 @@ ], "responses": [ { - "$id": "465", + "$id": "528", "statusCodes": [ 204 ], @@ -4823,12 +5455,12 @@ }, "parameters": [ { - "$id": "466", + "$id": "529", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "100" + "$ref": "215" }, "location": "Body", "isApiVersion": false, @@ -4841,12 +5473,12 @@ "skipUrlEncoding": false }, { - "$id": "467", + "$id": "530", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "462" + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -4860,7 +5492,7 @@ } ], "response": { - "$id": "468" + "$id": "531" }, "isOverride": false, "generateConvenient": true, @@ -4870,12 +5502,12 @@ ], "parameters": [ { - "$id": "469", + "$id": "532", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "470", + "$id": "533", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4889,9 +5521,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "471", + "$id": "534", "type": { - "$id": "472", + "$id": "535", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4904,45 +5536,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Model", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "473", + "$id": "536", "kind": "client", "name": "CollectionsString", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "474", + "$id": "537", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "475", + "$id": "538", "name": "get", "resourceName": "CollectionsString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "476", + "$id": "539", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "477", - "kind": "constant", - "valueType": { - "$id": "478", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -4957,12 +5579,12 @@ ], "responses": [ { - "$id": "479", + "$id": "540", "statusCodes": [ 200 ], "bodyType": { - "$ref": "109" + "$ref": "224" }, "headers": [], "isErrorResponse": false, @@ -4982,11 +5604,11 @@ }, "parameters": [ { - "$id": "480", + "$id": "541", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "477" + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -5000,9 +5622,9 @@ } ], "response": { - "$id": "481", + "$id": "542", "type": { - "$ref": "109" + "$ref": "224" } }, "isOverride": false, @@ -5011,36 +5633,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsString.get" }, { - "$id": "482", + "$id": "543", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "483", + "$id": "544", "name": "put", "resourceName": "CollectionsString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "484", + "$id": "545", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "485", - "kind": "constant", - "valueType": { - "$id": "486", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -5053,12 +5665,12 @@ "skipUrlEncoding": false }, { - "$id": "487", + "$id": "546", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "109" + "$ref": "224" }, "location": "Body", "isApiVersion": false, @@ -5073,7 +5685,7 @@ ], "responses": [ { - "$id": "488", + "$id": "547", "statusCodes": [ 204 ], @@ -5095,12 +5707,12 @@ }, "parameters": [ { - "$id": "489", + "$id": "548", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "109" + "$ref": "224" }, "location": "Body", "isApiVersion": false, @@ -5113,12 +5725,12 @@ "skipUrlEncoding": false }, { - "$id": "490", + "$id": "549", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "485" + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -5132,7 +5744,7 @@ } ], "response": { - "$id": "491" + "$id": "550" }, "isOverride": false, "generateConvenient": true, @@ -5142,12 +5754,12 @@ ], "parameters": [ { - "$id": "492", + "$id": "551", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "493", + "$id": "552", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5161,9 +5773,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "494", + "$id": "553", "type": { - "$id": "495", + "$id": "554", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5176,45 +5788,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsString", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "496", + "$id": "555", "kind": "client", "name": "CollectionsInt", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "497", + "$id": "556", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "498", + "$id": "557", "name": "get", "resourceName": "CollectionsInt", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "499", + "$id": "558", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "500", - "kind": "constant", - "valueType": { - "$id": "501", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -5229,12 +5831,12 @@ ], "responses": [ { - "$id": "502", + "$id": "559", "statusCodes": [ 200 ], "bodyType": { - "$ref": "115" + "$ref": "230" }, "headers": [], "isErrorResponse": false, @@ -5254,11 +5856,11 @@ }, "parameters": [ { - "$id": "503", + "$id": "560", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "500" + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -5272,9 +5874,9 @@ } ], "response": { - "$id": "504", + "$id": "561", "type": { - "$ref": "115" + "$ref": "230" } }, "isOverride": false, @@ -5283,36 +5885,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsInt.get" }, { - "$id": "505", + "$id": "562", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "506", + "$id": "563", "name": "put", "resourceName": "CollectionsInt", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "507", + "$id": "564", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "508", - "kind": "constant", - "valueType": { - "$id": "509", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -5325,12 +5917,12 @@ "skipUrlEncoding": false }, { - "$id": "510", + "$id": "565", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "115" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -5345,7 +5937,7 @@ ], "responses": [ { - "$id": "511", + "$id": "566", "statusCodes": [ 204 ], @@ -5367,12 +5959,12 @@ }, "parameters": [ { - "$id": "512", + "$id": "567", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "115" + "$ref": "230" }, "location": "Body", "isApiVersion": false, @@ -5385,12 +5977,12 @@ "skipUrlEncoding": false }, { - "$id": "513", + "$id": "568", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "508" + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -5404,7 +5996,7 @@ } ], "response": { - "$id": "514" + "$id": "569" }, "isOverride": false, "generateConvenient": true, @@ -5414,12 +6006,12 @@ ], "parameters": [ { - "$id": "515", + "$id": "570", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "516", + "$id": "571", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5433,9 +6025,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "517", + "$id": "572", "type": { - "$id": "518", + "$id": "573", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5448,45 +6040,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsInt", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "519", + "$id": "574", "kind": "client", "name": "CollectionsModel", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "520", + "$id": "575", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "521", + "$id": "576", "name": "get", "resourceName": "CollectionsModel", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "522", + "$id": "577", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "523", - "kind": "constant", - "valueType": { - "$id": "524", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -5501,12 +6083,12 @@ ], "responses": [ { - "$id": "525", + "$id": "578", "statusCodes": [ 200 ], "bodyType": { - "$ref": "121" + "$ref": "236" }, "headers": [], "isErrorResponse": false, @@ -5526,11 +6108,11 @@ }, "parameters": [ { - "$id": "526", + "$id": "579", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "523" + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -5544,9 +6126,9 @@ } ], "response": { - "$id": "527", + "$id": "580", "type": { - "$ref": "121" + "$ref": "236" } }, "isOverride": false, @@ -5555,36 +6137,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsModel.get" }, { - "$id": "528", + "$id": "581", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "529", + "$id": "582", "name": "put", "resourceName": "CollectionsModel", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "530", + "$id": "583", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "531", - "kind": "constant", - "valueType": { - "$id": "532", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -5597,12 +6169,12 @@ "skipUrlEncoding": false }, { - "$id": "533", + "$id": "584", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "121" + "$ref": "236" }, "location": "Body", "isApiVersion": false, @@ -5617,7 +6189,7 @@ ], "responses": [ { - "$id": "534", + "$id": "585", "statusCodes": [ 204 ], @@ -5639,12 +6211,12 @@ }, "parameters": [ { - "$id": "535", + "$id": "586", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "121" + "$ref": "236" }, "location": "Body", "isApiVersion": false, @@ -5657,12 +6229,12 @@ "skipUrlEncoding": false }, { - "$id": "536", + "$id": "587", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "531" + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -5676,7 +6248,7 @@ } ], "response": { - "$id": "537" + "$id": "588" }, "isOverride": false, "generateConvenient": true, @@ -5686,12 +6258,12 @@ ], "parameters": [ { - "$id": "538", + "$id": "589", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "539", + "$id": "590", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5705,9 +6277,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "540", + "$id": "591", "type": { - "$id": "541", + "$id": "592", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5720,45 +6292,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.CollectionsModel", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "542", + "$id": "593", "kind": "client", "name": "DictionaryString", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "543", + "$id": "594", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "544", + "$id": "595", "name": "get", "resourceName": "DictionaryString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "545", + "$id": "596", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "546", - "kind": "constant", - "valueType": { - "$id": "547", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -5773,12 +6335,12 @@ ], "responses": [ { - "$id": "548", + "$id": "597", "statusCodes": [ 200 ], "bodyType": { - "$ref": "126" + "$ref": "241" }, "headers": [], "isErrorResponse": false, @@ -5798,11 +6360,11 @@ }, "parameters": [ { - "$id": "549", + "$id": "598", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "546" + "$ref": "104" }, "location": "Header", "isApiVersion": false, @@ -5816,9 +6378,9 @@ } ], "response": { - "$id": "550", + "$id": "599", "type": { - "$ref": "126" + "$ref": "241" } }, "isOverride": false, @@ -5827,36 +6389,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.DictionaryString.get" }, { - "$id": "551", + "$id": "600", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "552", + "$id": "601", "name": "put", "resourceName": "DictionaryString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "553", + "$id": "602", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "554", - "kind": "constant", - "valueType": { - "$id": "555", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -5869,12 +6421,12 @@ "skipUrlEncoding": false }, { - "$id": "556", + "$id": "603", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "126" + "$ref": "241" }, "location": "Body", "isApiVersion": false, @@ -5889,7 +6441,7 @@ ], "responses": [ { - "$id": "557", + "$id": "604", "statusCodes": [ 204 ], @@ -5911,12 +6463,12 @@ }, "parameters": [ { - "$id": "558", + "$id": "605", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "126" + "$ref": "241" }, "location": "Body", "isApiVersion": false, @@ -5929,12 +6481,12 @@ "skipUrlEncoding": false }, { - "$id": "559", + "$id": "606", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "554" + "$ref": "106" }, "location": "Header", "isApiVersion": false, @@ -5948,7 +6500,7 @@ } ], "response": { - "$id": "560" + "$id": "607" }, "isOverride": false, "generateConvenient": true, @@ -5958,12 +6510,12 @@ ], "parameters": [ { - "$id": "561", + "$id": "608", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "562", + "$id": "609", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -5977,9 +6529,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "563", + "$id": "610", "type": { - "$id": "564", + "$id": "611", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -5992,45 +6544,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.DictionaryString", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "565", + "$id": "612", "kind": "client", "name": "Never", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "566", + "$id": "613", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "567", + "$id": "614", "name": "get", "resourceName": "Never", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "568", + "$id": "615", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "569", - "kind": "constant", - "valueType": { - "$id": "570", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -6045,12 +6587,12 @@ ], "responses": [ { - "$id": "571", + "$id": "616", "statusCodes": [ 200 ], "bodyType": { - "$ref": "133" + "$ref": "248" }, "headers": [], "isErrorResponse": false, @@ -6070,11 +6612,11 @@ }, "parameters": [ { - "$id": "572", + "$id": "617", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "569" + "$ref": "108" }, "location": "Header", "isApiVersion": false, @@ -6088,9 +6630,9 @@ } ], "response": { - "$id": "573", + "$id": "618", "type": { - "$ref": "133" + "$ref": "248" } }, "isOverride": false, @@ -6099,36 +6641,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Never.get" }, { - "$id": "574", + "$id": "619", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "575", + "$id": "620", "name": "put", "resourceName": "Never", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "576", + "$id": "621", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "577", - "kind": "constant", - "valueType": { - "$id": "578", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -6141,12 +6673,12 @@ "skipUrlEncoding": false }, { - "$id": "579", + "$id": "622", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "133" + "$ref": "248" }, "location": "Body", "isApiVersion": false, @@ -6161,7 +6693,7 @@ ], "responses": [ { - "$id": "580", + "$id": "623", "statusCodes": [ 204 ], @@ -6183,12 +6715,12 @@ }, "parameters": [ { - "$id": "581", + "$id": "624", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "133" + "$ref": "248" }, "location": "Body", "isApiVersion": false, @@ -6201,12 +6733,12 @@ "skipUrlEncoding": false }, { - "$id": "582", + "$id": "625", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "577" + "$ref": "110" }, "location": "Header", "isApiVersion": false, @@ -6220,7 +6752,7 @@ } ], "response": { - "$id": "583" + "$id": "626" }, "isOverride": false, "generateConvenient": true, @@ -6230,12 +6762,12 @@ ], "parameters": [ { - "$id": "584", + "$id": "627", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "585", + "$id": "628", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6249,9 +6781,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "586", + "$id": "629", "type": { - "$id": "587", + "$id": "630", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6264,45 +6796,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.Never", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "588", + "$id": "631", "kind": "client", "name": "UnknownString", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "589", + "$id": "632", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "590", + "$id": "633", "name": "get", "resourceName": "UnknownString", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "591", + "$id": "634", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "592", - "kind": "constant", - "valueType": { - "$id": "593", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -6317,12 +6839,12 @@ ], "responses": [ { - "$id": "594", + "$id": "635", "statusCodes": [ 200 ], "bodyType": { - "$ref": "134" + "$ref": "249" }, "headers": [], "isErrorResponse": false, @@ -6342,11 +6864,11 @@ }, "parameters": [ { - "$id": "595", + "$id": "636", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "592" + "$ref": "112" }, "location": "Header", "isApiVersion": false, @@ -6360,9 +6882,9 @@ } ], "response": { - "$id": "596", + "$id": "637", "type": { - "$ref": "134" + "$ref": "249" } }, "isOverride": false, @@ -6371,36 +6893,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownString.get" }, { - "$id": "597", + "$id": "638", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "598", + "$id": "639", "name": "put", "resourceName": "UnknownString", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "599", + "$id": "640", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "600", - "kind": "constant", - "valueType": { - "$id": "601", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -6413,12 +6925,12 @@ "skipUrlEncoding": false }, { - "$id": "602", + "$id": "641", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "134" + "$ref": "249" }, "location": "Body", "isApiVersion": false, @@ -6433,7 +6945,7 @@ ], "responses": [ { - "$id": "603", + "$id": "642", "statusCodes": [ 204 ], @@ -6455,12 +6967,12 @@ }, "parameters": [ { - "$id": "604", + "$id": "643", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "134" + "$ref": "249" }, "location": "Body", "isApiVersion": false, @@ -6473,12 +6985,12 @@ "skipUrlEncoding": false }, { - "$id": "605", + "$id": "644", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "600" + "$ref": "114" }, "location": "Header", "isApiVersion": false, @@ -6492,7 +7004,7 @@ } ], "response": { - "$id": "606" + "$id": "645" }, "isOverride": false, "generateConvenient": true, @@ -6502,12 +7014,12 @@ ], "parameters": [ { - "$id": "607", + "$id": "646", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "608", + "$id": "647", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6521,9 +7033,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "609", + "$id": "648", "type": { - "$id": "610", + "$id": "649", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6536,45 +7048,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownString", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "611", + "$id": "650", "kind": "client", "name": "UnknownInt", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "612", + "$id": "651", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "613", + "$id": "652", "name": "get", "resourceName": "UnknownInt", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "614", + "$id": "653", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "615", - "kind": "constant", - "valueType": { - "$id": "616", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -6589,12 +7091,12 @@ ], "responses": [ { - "$id": "617", + "$id": "654", "statusCodes": [ 200 ], "bodyType": { - "$ref": "139" + "$ref": "254" }, "headers": [], "isErrorResponse": false, @@ -6614,11 +7116,11 @@ }, "parameters": [ { - "$id": "618", + "$id": "655", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "615" + "$ref": "116" }, "location": "Header", "isApiVersion": false, @@ -6632,9 +7134,9 @@ } ], "response": { - "$id": "619", + "$id": "656", "type": { - "$ref": "139" + "$ref": "254" } }, "isOverride": false, @@ -6643,36 +7145,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownInt.get" }, { - "$id": "620", + "$id": "657", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "621", + "$id": "658", "name": "put", "resourceName": "UnknownInt", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "622", + "$id": "659", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "623", - "kind": "constant", - "valueType": { - "$id": "624", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -6685,12 +7177,12 @@ "skipUrlEncoding": false }, { - "$id": "625", + "$id": "660", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "139" + "$ref": "254" }, "location": "Body", "isApiVersion": false, @@ -6705,7 +7197,7 @@ ], "responses": [ { - "$id": "626", + "$id": "661", "statusCodes": [ 204 ], @@ -6727,12 +7219,12 @@ }, "parameters": [ { - "$id": "627", + "$id": "662", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "139" + "$ref": "254" }, "location": "Body", "isApiVersion": false, @@ -6745,12 +7237,12 @@ "skipUrlEncoding": false }, { - "$id": "628", + "$id": "663", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "623" + "$ref": "118" }, "location": "Header", "isApiVersion": false, @@ -6764,7 +7256,7 @@ } ], "response": { - "$id": "629" + "$id": "664" }, "isOverride": false, "generateConvenient": true, @@ -6774,12 +7266,12 @@ ], "parameters": [ { - "$id": "630", + "$id": "665", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "631", + "$id": "666", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -6793,9 +7285,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "632", + "$id": "667", "type": { - "$id": "633", + "$id": "668", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -6808,45 +7300,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownInt", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "634", + "$id": "669", "kind": "client", "name": "UnknownDict", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "635", + "$id": "670", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "636", + "$id": "671", "name": "get", "resourceName": "UnknownDict", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "637", + "$id": "672", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "638", - "kind": "constant", - "valueType": { - "$id": "639", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -6861,12 +7343,12 @@ ], "responses": [ { - "$id": "640", + "$id": "673", "statusCodes": [ 200 ], "bodyType": { - "$ref": "144" + "$ref": "259" }, "headers": [], "isErrorResponse": false, @@ -6886,11 +7368,11 @@ }, "parameters": [ { - "$id": "641", + "$id": "674", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "638" + "$ref": "120" }, "location": "Header", "isApiVersion": false, @@ -6904,9 +7386,9 @@ } ], "response": { - "$id": "642", + "$id": "675", "type": { - "$ref": "144" + "$ref": "259" } }, "isOverride": false, @@ -6915,36 +7397,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownDict.get" }, { - "$id": "643", + "$id": "676", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "644", + "$id": "677", "name": "put", "resourceName": "UnknownDict", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "645", + "$id": "678", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "646", - "kind": "constant", - "valueType": { - "$id": "647", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -6957,12 +7429,12 @@ "skipUrlEncoding": false }, { - "$id": "648", + "$id": "679", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "144" + "$ref": "259" }, "location": "Body", "isApiVersion": false, @@ -6977,7 +7449,7 @@ ], "responses": [ { - "$id": "649", + "$id": "680", "statusCodes": [ 204 ], @@ -6999,12 +7471,12 @@ }, "parameters": [ { - "$id": "650", + "$id": "681", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "144" + "$ref": "259" }, "location": "Body", "isApiVersion": false, @@ -7017,12 +7489,12 @@ "skipUrlEncoding": false }, { - "$id": "651", + "$id": "682", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "646" + "$ref": "122" }, "location": "Header", "isApiVersion": false, @@ -7036,7 +7508,7 @@ } ], "response": { - "$id": "652" + "$id": "683" }, "isOverride": false, "generateConvenient": true, @@ -7046,12 +7518,12 @@ ], "parameters": [ { - "$id": "653", + "$id": "684", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "654", + "$id": "685", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7065,9 +7537,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "655", + "$id": "686", "type": { - "$id": "656", + "$id": "687", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7080,45 +7552,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownDict", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "657", + "$id": "688", "kind": "client", "name": "UnknownArray", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "658", + "$id": "689", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "659", + "$id": "690", "name": "get", "resourceName": "UnknownArray", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "660", + "$id": "691", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "661", - "kind": "constant", - "valueType": { - "$id": "662", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -7133,12 +7595,12 @@ ], "responses": [ { - "$id": "663", + "$id": "692", "statusCodes": [ 200 ], "bodyType": { - "$ref": "149" + "$ref": "264" }, "headers": [], "isErrorResponse": false, @@ -7158,11 +7620,11 @@ }, "parameters": [ { - "$id": "664", + "$id": "693", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "661" + "$ref": "124" }, "location": "Header", "isApiVersion": false, @@ -7176,9 +7638,9 @@ } ], "response": { - "$id": "665", + "$id": "694", "type": { - "$ref": "149" + "$ref": "264" } }, "isOverride": false, @@ -7187,36 +7649,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownArray.get" }, { - "$id": "666", + "$id": "695", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "667", + "$id": "696", "name": "put", "resourceName": "UnknownArray", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "668", + "$id": "697", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "669", - "kind": "constant", - "valueType": { - "$id": "670", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -7229,12 +7681,12 @@ "skipUrlEncoding": false }, { - "$id": "671", + "$id": "698", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "149" + "$ref": "264" }, "location": "Body", "isApiVersion": false, @@ -7249,7 +7701,7 @@ ], "responses": [ { - "$id": "672", + "$id": "699", "statusCodes": [ 204 ], @@ -7271,12 +7723,12 @@ }, "parameters": [ { - "$id": "673", + "$id": "700", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "149" + "$ref": "264" }, "location": "Body", "isApiVersion": false, @@ -7289,12 +7741,12 @@ "skipUrlEncoding": false }, { - "$id": "674", + "$id": "701", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "669" + "$ref": "126" }, "location": "Header", "isApiVersion": false, @@ -7308,7 +7760,7 @@ } ], "response": { - "$id": "675" + "$id": "702" }, "isOverride": false, "generateConvenient": true, @@ -7318,12 +7770,12 @@ ], "parameters": [ { - "$id": "676", + "$id": "703", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "677", + "$id": "704", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7337,9 +7789,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "678", + "$id": "705", "type": { - "$id": "679", + "$id": "706", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7352,45 +7804,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnknownArray", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "680", + "$id": "707", "kind": "client", "name": "StringLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "681", + "$id": "708", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "682", + "$id": "709", "name": "get", "resourceName": "StringLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "683", + "$id": "710", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "684", - "kind": "constant", - "valueType": { - "$id": "685", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -7405,12 +7847,12 @@ ], "responses": [ { - "$id": "686", + "$id": "711", "statusCodes": [ 200 ], "bodyType": { - "$ref": "154" + "$ref": "269" }, "headers": [], "isErrorResponse": false, @@ -7430,11 +7872,11 @@ }, "parameters": [ { - "$id": "687", + "$id": "712", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "684" + "$ref": "128" }, "location": "Header", "isApiVersion": false, @@ -7448,9 +7890,9 @@ } ], "response": { - "$id": "688", + "$id": "713", "type": { - "$ref": "154" + "$ref": "269" } }, "isOverride": false, @@ -7459,36 +7901,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.StringLiteral.get" }, { - "$id": "689", + "$id": "714", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "690", + "$id": "715", "name": "put", "resourceName": "StringLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "691", + "$id": "716", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "692", - "kind": "constant", - "valueType": { - "$id": "693", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -7501,12 +7933,12 @@ "skipUrlEncoding": false }, { - "$id": "694", + "$id": "717", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "154" + "$ref": "269" }, "location": "Body", "isApiVersion": false, @@ -7521,7 +7953,7 @@ ], "responses": [ { - "$id": "695", + "$id": "718", "statusCodes": [ 204 ], @@ -7543,12 +7975,12 @@ }, "parameters": [ { - "$id": "696", + "$id": "719", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "154" + "$ref": "269" }, "location": "Body", "isApiVersion": false, @@ -7561,12 +7993,12 @@ "skipUrlEncoding": false }, { - "$id": "697", + "$id": "720", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "692" + "$ref": "130" }, "location": "Header", "isApiVersion": false, @@ -7580,7 +8012,7 @@ } ], "response": { - "$id": "698" + "$id": "721" }, "isOverride": false, "generateConvenient": true, @@ -7590,12 +8022,12 @@ ], "parameters": [ { - "$id": "699", + "$id": "722", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "700", + "$id": "723", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7609,9 +8041,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "701", + "$id": "724", "type": { - "$id": "702", + "$id": "725", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7624,45 +8056,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.StringLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "703", + "$id": "726", "kind": "client", "name": "IntLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "704", + "$id": "727", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "705", + "$id": "728", "name": "get", "resourceName": "IntLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "706", + "$id": "729", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "707", - "kind": "constant", - "valueType": { - "$id": "708", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -7677,12 +8099,12 @@ ], "responses": [ { - "$id": "709", + "$id": "730", "statusCodes": [ 200 ], "bodyType": { - "$ref": "159" + "$ref": "273" }, "headers": [], "isErrorResponse": false, @@ -7702,11 +8124,11 @@ }, "parameters": [ { - "$id": "710", + "$id": "731", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "707" + "$ref": "132" }, "location": "Header", "isApiVersion": false, @@ -7720,9 +8142,9 @@ } ], "response": { - "$id": "711", + "$id": "732", "type": { - "$ref": "159" + "$ref": "273" } }, "isOverride": false, @@ -7731,36 +8153,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.IntLiteral.get" }, { - "$id": "712", + "$id": "733", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "713", + "$id": "734", "name": "put", "resourceName": "IntLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "714", + "$id": "735", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "715", - "kind": "constant", - "valueType": { - "$id": "716", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -7773,12 +8185,12 @@ "skipUrlEncoding": false }, { - "$id": "717", + "$id": "736", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "159" + "$ref": "273" }, "location": "Body", "isApiVersion": false, @@ -7793,7 +8205,7 @@ ], "responses": [ { - "$id": "718", + "$id": "737", "statusCodes": [ 204 ], @@ -7815,12 +8227,12 @@ }, "parameters": [ { - "$id": "719", + "$id": "738", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "159" + "$ref": "273" }, "location": "Body", "isApiVersion": false, @@ -7833,12 +8245,12 @@ "skipUrlEncoding": false }, { - "$id": "720", + "$id": "739", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "715" + "$ref": "134" }, "location": "Header", "isApiVersion": false, @@ -7852,7 +8264,7 @@ } ], "response": { - "$id": "721" + "$id": "740" }, "isOverride": false, "generateConvenient": true, @@ -7862,12 +8274,12 @@ ], "parameters": [ { - "$id": "722", + "$id": "741", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "723", + "$id": "742", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -7881,9 +8293,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "724", + "$id": "743", "type": { - "$id": "725", + "$id": "744", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -7896,45 +8308,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.IntLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "726", + "$id": "745", "kind": "client", "name": "FloatLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "727", + "$id": "746", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "728", + "$id": "747", "name": "get", "resourceName": "FloatLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "729", + "$id": "748", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "730", - "kind": "constant", - "valueType": { - "$id": "731", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "136" }, "location": "Header", "isApiVersion": false, @@ -7949,12 +8351,12 @@ ], "responses": [ { - "$id": "732", + "$id": "749", "statusCodes": [ 200 ], "bodyType": { - "$ref": "164" + "$ref": "277" }, "headers": [], "isErrorResponse": false, @@ -7974,11 +8376,11 @@ }, "parameters": [ { - "$id": "733", + "$id": "750", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "730" + "$ref": "136" }, "location": "Header", "isApiVersion": false, @@ -7992,9 +8394,9 @@ } ], "response": { - "$id": "734", + "$id": "751", "type": { - "$ref": "164" + "$ref": "277" } }, "isOverride": false, @@ -8003,36 +8405,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.FloatLiteral.get" }, { - "$id": "735", + "$id": "752", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "736", + "$id": "753", "name": "put", "resourceName": "FloatLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "737", + "$id": "754", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "738", - "kind": "constant", - "valueType": { - "$id": "739", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "138" }, "location": "Header", "isApiVersion": false, @@ -8045,12 +8437,12 @@ "skipUrlEncoding": false }, { - "$id": "740", + "$id": "755", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "164" + "$ref": "277" }, "location": "Body", "isApiVersion": false, @@ -8065,7 +8457,7 @@ ], "responses": [ { - "$id": "741", + "$id": "756", "statusCodes": [ 204 ], @@ -8087,12 +8479,12 @@ }, "parameters": [ { - "$id": "742", + "$id": "757", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "164" + "$ref": "277" }, "location": "Body", "isApiVersion": false, @@ -8105,12 +8497,12 @@ "skipUrlEncoding": false }, { - "$id": "743", + "$id": "758", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "738" + "$ref": "138" }, "location": "Header", "isApiVersion": false, @@ -8124,7 +8516,7 @@ } ], "response": { - "$id": "744" + "$id": "759" }, "isOverride": false, "generateConvenient": true, @@ -8134,12 +8526,12 @@ ], "parameters": [ { - "$id": "745", + "$id": "760", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "746", + "$id": "761", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8153,9 +8545,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "747", + "$id": "762", "type": { - "$id": "748", + "$id": "763", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8168,45 +8560,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.FloatLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "749", + "$id": "764", "kind": "client", "name": "BooleanLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "750", + "$id": "765", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "751", + "$id": "766", "name": "get", "resourceName": "BooleanLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "752", + "$id": "767", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "753", - "kind": "constant", - "valueType": { - "$id": "754", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "140" }, "location": "Header", "isApiVersion": false, @@ -8221,12 +8603,12 @@ ], "responses": [ { - "$id": "755", + "$id": "768", "statusCodes": [ 200 ], "bodyType": { - "$ref": "169" + "$ref": "281" }, "headers": [], "isErrorResponse": false, @@ -8246,11 +8628,11 @@ }, "parameters": [ { - "$id": "756", + "$id": "769", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "753" + "$ref": "140" }, "location": "Header", "isApiVersion": false, @@ -8264,9 +8646,9 @@ } ], "response": { - "$id": "757", + "$id": "770", "type": { - "$ref": "169" + "$ref": "281" } }, "isOverride": false, @@ -8275,36 +8657,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.BooleanLiteral.get" }, { - "$id": "758", + "$id": "771", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "759", + "$id": "772", "name": "put", "resourceName": "BooleanLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "760", + "$id": "773", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "761", - "kind": "constant", - "valueType": { - "$id": "762", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "142" }, "location": "Header", "isApiVersion": false, @@ -8317,12 +8689,12 @@ "skipUrlEncoding": false }, { - "$id": "763", + "$id": "774", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "169" + "$ref": "281" }, "location": "Body", "isApiVersion": false, @@ -8337,7 +8709,7 @@ ], "responses": [ { - "$id": "764", + "$id": "775", "statusCodes": [ 204 ], @@ -8359,12 +8731,12 @@ }, "parameters": [ { - "$id": "765", + "$id": "776", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "169" + "$ref": "281" }, "location": "Body", "isApiVersion": false, @@ -8377,12 +8749,12 @@ "skipUrlEncoding": false }, { - "$id": "766", + "$id": "777", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "761" + "$ref": "142" }, "location": "Header", "isApiVersion": false, @@ -8396,7 +8768,7 @@ } ], "response": { - "$id": "767" + "$id": "778" }, "isOverride": false, "generateConvenient": true, @@ -8406,12 +8778,12 @@ ], "parameters": [ { - "$id": "768", + "$id": "779", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "769", + "$id": "780", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8425,9 +8797,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "770", + "$id": "781", "type": { - "$id": "771", + "$id": "782", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8440,45 +8812,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.BooleanLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "772", + "$id": "783", "kind": "client", "name": "UnionStringLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "773", + "$id": "784", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "774", + "$id": "785", "name": "get", "resourceName": "UnionStringLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "775", + "$id": "786", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "776", - "kind": "constant", - "valueType": { - "$id": "777", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "144" }, "location": "Header", "isApiVersion": false, @@ -8493,12 +8855,12 @@ ], "responses": [ { - "$id": "778", + "$id": "787", "statusCodes": [ 200 ], "bodyType": { - "$ref": "175" + "$ref": "285" }, "headers": [], "isErrorResponse": false, @@ -8518,11 +8880,11 @@ }, "parameters": [ { - "$id": "779", + "$id": "788", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "776" + "$ref": "144" }, "location": "Header", "isApiVersion": false, @@ -8536,9 +8898,9 @@ } ], "response": { - "$id": "780", + "$id": "789", "type": { - "$ref": "175" + "$ref": "285" } }, "isOverride": false, @@ -8547,36 +8909,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteral.get" }, { - "$id": "781", + "$id": "790", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "782", + "$id": "791", "name": "put", "resourceName": "UnionStringLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "783", + "$id": "792", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "784", - "kind": "constant", - "valueType": { - "$id": "785", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "146" }, "location": "Header", "isApiVersion": false, @@ -8589,12 +8941,12 @@ "skipUrlEncoding": false }, { - "$id": "786", + "$id": "793", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "175" + "$ref": "285" }, "location": "Body", "isApiVersion": false, @@ -8609,7 +8961,7 @@ ], "responses": [ { - "$id": "787", + "$id": "794", "statusCodes": [ 204 ], @@ -8631,12 +8983,12 @@ }, "parameters": [ { - "$id": "788", + "$id": "795", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "175" + "$ref": "285" }, "location": "Body", "isApiVersion": false, @@ -8649,12 +9001,12 @@ "skipUrlEncoding": false }, { - "$id": "789", + "$id": "796", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "784" + "$ref": "146" }, "location": "Header", "isApiVersion": false, @@ -8668,7 +9020,7 @@ } ], "response": { - "$id": "790" + "$id": "797" }, "isOverride": false, "generateConvenient": true, @@ -8678,12 +9030,12 @@ ], "parameters": [ { - "$id": "791", + "$id": "798", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "792", + "$id": "799", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8697,9 +9049,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "793", + "$id": "800", "type": { - "$id": "794", + "$id": "801", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8712,45 +9064,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionStringLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "795", + "$id": "802", "kind": "client", "name": "UnionIntLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "796", + "$id": "803", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "797", + "$id": "804", "name": "get", "resourceName": "UnionIntLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "798", + "$id": "805", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "799", - "kind": "constant", - "valueType": { - "$id": "800", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -8765,12 +9107,12 @@ ], "responses": [ { - "$id": "801", + "$id": "806", "statusCodes": [ 200 ], "bodyType": { - "$ref": "179" + "$ref": "289" }, "headers": [], "isErrorResponse": false, @@ -8790,11 +9132,11 @@ }, "parameters": [ { - "$id": "802", + "$id": "807", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "799" + "$ref": "148" }, "location": "Header", "isApiVersion": false, @@ -8808,9 +9150,9 @@ } ], "response": { - "$id": "803", + "$id": "808", "type": { - "$ref": "179" + "$ref": "289" } }, "isOverride": false, @@ -8819,36 +9161,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteral.get" }, { - "$id": "804", + "$id": "809", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "805", + "$id": "810", "name": "put", "resourceName": "UnionIntLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "806", + "$id": "811", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "807", - "kind": "constant", - "valueType": { - "$id": "808", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -8861,12 +9193,12 @@ "skipUrlEncoding": false }, { - "$id": "809", + "$id": "812", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "179" + "$ref": "289" }, "location": "Body", "isApiVersion": false, @@ -8881,7 +9213,7 @@ ], "responses": [ { - "$id": "810", + "$id": "813", "statusCodes": [ 204 ], @@ -8903,12 +9235,12 @@ }, "parameters": [ { - "$id": "811", + "$id": "814", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "179" + "$ref": "289" }, "location": "Body", "isApiVersion": false, @@ -8921,12 +9253,12 @@ "skipUrlEncoding": false }, { - "$id": "812", + "$id": "815", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "807" + "$ref": "150" }, "location": "Header", "isApiVersion": false, @@ -8940,7 +9272,7 @@ } ], "response": { - "$id": "813" + "$id": "816" }, "isOverride": false, "generateConvenient": true, @@ -8950,12 +9282,12 @@ ], "parameters": [ { - "$id": "814", + "$id": "817", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "815", + "$id": "818", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -8969,9 +9301,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "816", + "$id": "819", "type": { - "$id": "817", + "$id": "820", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -8984,45 +9316,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionIntLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "818", + "$id": "821", "kind": "client", "name": "UnionFloatLiteral", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "819", + "$id": "822", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "820", + "$id": "823", "name": "get", "resourceName": "UnionFloatLiteral", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "821", + "$id": "824", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "822", - "kind": "constant", - "valueType": { - "$id": "823", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -9037,12 +9359,12 @@ ], "responses": [ { - "$id": "824", + "$id": "825", "statusCodes": [ 200 ], "bodyType": { - "$ref": "183" + "$ref": "293" }, "headers": [], "isErrorResponse": false, @@ -9062,11 +9384,11 @@ }, "parameters": [ { - "$id": "825", + "$id": "826", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "822" + "$ref": "152" }, "location": "Header", "isApiVersion": false, @@ -9080,9 +9402,9 @@ } ], "response": { - "$id": "826", + "$id": "827", "type": { - "$ref": "183" + "$ref": "293" } }, "isOverride": false, @@ -9091,36 +9413,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteral.get" }, { - "$id": "827", + "$id": "828", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "828", + "$id": "829", "name": "put", "resourceName": "UnionFloatLiteral", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "829", + "$id": "830", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "830", - "kind": "constant", - "valueType": { - "$id": "831", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -9133,12 +9445,12 @@ "skipUrlEncoding": false }, { - "$id": "832", + "$id": "831", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "183" + "$ref": "293" }, "location": "Body", "isApiVersion": false, @@ -9153,7 +9465,7 @@ ], "responses": [ { - "$id": "833", + "$id": "832", "statusCodes": [ 204 ], @@ -9175,12 +9487,12 @@ }, "parameters": [ { - "$id": "834", + "$id": "833", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "183" + "$ref": "293" }, "location": "Body", "isApiVersion": false, @@ -9193,12 +9505,12 @@ "skipUrlEncoding": false }, { - "$id": "835", + "$id": "834", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "830" + "$ref": "154" }, "location": "Header", "isApiVersion": false, @@ -9212,7 +9524,7 @@ } ], "response": { - "$id": "836" + "$id": "835" }, "isOverride": false, "generateConvenient": true, @@ -9222,12 +9534,12 @@ ], "parameters": [ { - "$id": "837", + "$id": "836", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "838", + "$id": "837", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9241,9 +9553,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "839", + "$id": "838", "type": { - "$id": "840", + "$id": "839", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9256,45 +9568,35 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionFloatLiteral", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } }, { - "$id": "841", + "$id": "840", "kind": "client", "name": "UnionEnumValue", "namespace": "Type.Property.ValueTypes", "methods": [ { - "$id": "842", + "$id": "841", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "Get call", "operation": { - "$id": "843", + "$id": "842", "name": "get", "resourceName": "UnionEnumValue", "doc": "Get call", "accessibility": "public", "parameters": [ { - "$id": "844", + "$id": "843", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "845", - "kind": "constant", - "valueType": { - "$id": "846", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "156" }, "location": "Header", "isApiVersion": false, @@ -9309,12 +9611,12 @@ ], "responses": [ { - "$id": "847", + "$id": "844", "statusCodes": [ 200 ], "bodyType": { - "$ref": "187" + "$ref": "297" }, "headers": [], "isErrorResponse": false, @@ -9334,11 +9636,11 @@ }, "parameters": [ { - "$id": "848", + "$id": "845", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "845" + "$ref": "156" }, "location": "Header", "isApiVersion": false, @@ -9352,9 +9654,9 @@ } ], "response": { - "$id": "849", + "$id": "846", "type": { - "$ref": "187" + "$ref": "297" } }, "isOverride": false, @@ -9363,36 +9665,26 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionEnumValue.get" }, { - "$id": "850", + "$id": "847", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "Put operation", "operation": { - "$id": "851", + "$id": "848", "name": "put", "resourceName": "UnionEnumValue", "doc": "Put operation", "accessibility": "public", "parameters": [ { - "$id": "852", + "$id": "849", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "853", - "kind": "constant", - "valueType": { - "$id": "854", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "158" }, "location": "Header", "isApiVersion": false, @@ -9405,12 +9697,12 @@ "skipUrlEncoding": false }, { - "$id": "855", + "$id": "850", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "187" + "$ref": "297" }, "location": "Body", "isApiVersion": false, @@ -9425,7 +9717,7 @@ ], "responses": [ { - "$id": "856", + "$id": "851", "statusCodes": [ 204 ], @@ -9447,12 +9739,12 @@ }, "parameters": [ { - "$id": "857", + "$id": "852", "name": "body", "nameInRequest": "body", "doc": "body", "type": { - "$ref": "187" + "$ref": "297" }, "location": "Body", "isApiVersion": false, @@ -9465,12 +9757,12 @@ "skipUrlEncoding": false }, { - "$id": "858", + "$id": "853", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "853" + "$ref": "158" }, "location": "Header", "isApiVersion": false, @@ -9484,7 +9776,7 @@ } ], "response": { - "$id": "859" + "$id": "854" }, "isOverride": false, "generateConvenient": true, @@ -9494,12 +9786,12 @@ ], "parameters": [ { - "$id": "860", + "$id": "855", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "861", + "$id": "856", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -9513,9 +9805,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "862", + "$id": "857", "type": { - "$id": "863", + "$id": "858", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -9528,7 +9820,7 @@ "crossLanguageDefinitionId": "Type.Property.ValueTypes.UnionEnumValue", "apiVersions": [], "parent": { - "$ref": "192" + "$ref": "303" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj index d37f59cdcf03..4770ecdd179c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/src/Type.Scalar.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json index b1b1e156f06e..fee39b0d3e60 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/scalar/tspCodeModel.json @@ -3,22 +3,440 @@ "name": "Type.Scalar", "apiVersions": [], "enums": [], + "constants": [ + { + "$id": "2", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "3", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "4", + "kind": "constant", + "name": "GetResponseContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "5", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "6", + "kind": "constant", + "name": "GetResponseContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "7", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "8", + "kind": "constant", + "name": "GetResponseContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "9", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "10", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "11", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "12", + "kind": "constant", + "name": "GetResponseContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "13", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "14", + "kind": "constant", + "name": "GetResponseContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "15", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "16", + "kind": "constant", + "name": "GetResponseContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "18", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "20", + "kind": "constant", + "name": "GetResponseContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "21", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "22", + "kind": "constant", + "name": "GetResponseContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "23", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "24", + "kind": "constant", + "name": "GetResponseContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "25", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "26", + "kind": "constant", + "name": "responseBodyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "27", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "28", + "kind": "constant", + "name": "GetResponseContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "29", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "30", + "kind": "constant", + "name": "GetResponseContentType10", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "31", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "32", + "kind": "constant", + "name": "GetResponseContentType11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "33", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "34", + "kind": "constant", + "name": "responseBodyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "35", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "36", + "kind": "constant", + "name": "GetResponseContentType12", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "37", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "38", + "kind": "constant", + "name": "GetResponseContentType13", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "39", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "40", + "kind": "constant", + "name": "GetResponseContentType14", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "41", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "42", + "kind": "constant", + "name": "prepareVerifyContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "43", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "44", + "kind": "constant", + "name": "GetResponseContentType15", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "45", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "46", + "kind": "constant", + "name": "GetResponseContentType16", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "47", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "48", + "kind": "constant", + "name": "prepareVerifyContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "49", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "50", + "kind": "constant", + "name": "GetResponseContentType17", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "51", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "52", + "kind": "constant", + "name": "GetResponseContentType18", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], "models": [], "clients": [ { - "$id": "2", + "$id": "54", "kind": "client", "name": "ScalarClient", "namespace": "Type.Scalar", "methods": [], "parameters": [ { - "$id": "3", + "$id": "55", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "4", + "$id": "56", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -32,9 +450,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "5", + "$id": "57", "type": { - "$id": "6", + "$id": "58", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -48,41 +466,31 @@ "apiVersions": [], "children": [ { - "$id": "7", + "$id": "59", "kind": "client", "name": "String", "namespace": "Type.Scalar", "methods": [ { - "$id": "8", + "$id": "60", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "get string value", "operation": { - "$id": "9", + "$id": "61", "name": "get", "resourceName": "String", "doc": "get string value", "accessibility": "public", "parameters": [ { - "$id": "10", + "$id": "62", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "11", - "kind": "constant", - "valueType": { - "$id": "12", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -97,12 +505,12 @@ ], "responses": [ { - "$id": "13", + "$id": "63", "statusCodes": [ 200 ], "bodyType": { - "$id": "14", + "$id": "64", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -110,21 +518,11 @@ }, "headers": [ { - "$id": "15", + "$id": "65", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "16", - "kind": "constant", - "valueType": { - "$id": "17", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "4" } } ], @@ -145,11 +543,11 @@ }, "parameters": [ { - "$id": "18", + "$id": "66", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "11" + "$ref": "2" }, "location": "Header", "isApiVersion": false, @@ -163,9 +561,9 @@ } ], "response": { - "$id": "19", + "$id": "67", "type": { - "$ref": "14" + "$ref": "64" } }, "isOverride": false, @@ -174,35 +572,25 @@ "crossLanguageDefinitionId": "Type.Scalar.String.get" }, { - "$id": "20", + "$id": "68", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "put string value", "operation": { - "$id": "21", + "$id": "69", "name": "put", "resourceName": "String", "doc": "put string value", "accessibility": "public", "parameters": [ { - "$id": "22", + "$id": "70", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "23", - "kind": "constant", - "valueType": { - "$id": "24", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "6" }, "location": "Header", "isApiVersion": false, @@ -215,12 +603,12 @@ "skipUrlEncoding": false }, { - "$id": "25", + "$id": "71", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "26", + "$id": "72", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -239,7 +627,7 @@ ], "responses": [ { - "$id": "27", + "$id": "73", "statusCodes": [ 204 ], @@ -261,21 +649,11 @@ }, "parameters": [ { - "$id": "28", + "$id": "74", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "29", - "kind": "constant", - "valueType": { - "$id": "30", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "8" }, "location": "Header", "isApiVersion": false, @@ -288,12 +666,12 @@ "skipUrlEncoding": false }, { - "$id": "31", + "$id": "75", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "32", + "$id": "76", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -311,7 +689,7 @@ } ], "response": { - "$id": "33" + "$id": "77" }, "isOverride": false, "generateConvenient": true, @@ -321,12 +699,12 @@ ], "parameters": [ { - "$id": "34", + "$id": "78", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "35", + "$id": "79", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -340,9 +718,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "36", + "$id": "80", "type": { - "$id": "37", + "$id": "81", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -355,45 +733,35 @@ "crossLanguageDefinitionId": "Type.Scalar.String", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "38", + "$id": "82", "kind": "client", "name": "Boolean", "namespace": "Type.Scalar", "methods": [ { - "$id": "39", + "$id": "83", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "get boolean value", "operation": { - "$id": "40", + "$id": "84", "name": "get", "resourceName": "Boolean", "doc": "get boolean value", "accessibility": "public", "parameters": [ { - "$id": "41", + "$id": "85", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "42", - "kind": "constant", - "valueType": { - "$id": "43", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -408,12 +776,12 @@ ], "responses": [ { - "$id": "44", + "$id": "86", "statusCodes": [ 200 ], "bodyType": { - "$id": "45", + "$id": "87", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -421,21 +789,11 @@ }, "headers": [ { - "$id": "46", + "$id": "88", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "47", - "kind": "constant", - "valueType": { - "$id": "48", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "12" } } ], @@ -456,11 +814,11 @@ }, "parameters": [ { - "$id": "49", + "$id": "89", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "42" + "$ref": "10" }, "location": "Header", "isApiVersion": false, @@ -474,9 +832,9 @@ } ], "response": { - "$id": "50", + "$id": "90", "type": { - "$ref": "45" + "$ref": "87" } }, "isOverride": false, @@ -485,35 +843,25 @@ "crossLanguageDefinitionId": "Type.Scalar.Boolean.get" }, { - "$id": "51", + "$id": "91", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "put boolean value", "operation": { - "$id": "52", + "$id": "92", "name": "put", "resourceName": "Boolean", "doc": "put boolean value", "accessibility": "public", "parameters": [ { - "$id": "53", + "$id": "93", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "54", - "kind": "constant", - "valueType": { - "$id": "55", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "14" }, "location": "Header", "isApiVersion": false, @@ -526,12 +874,12 @@ "skipUrlEncoding": false }, { - "$id": "56", + "$id": "94", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "57", + "$id": "95", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -550,7 +898,7 @@ ], "responses": [ { - "$id": "58", + "$id": "96", "statusCodes": [ 204 ], @@ -572,21 +920,11 @@ }, "parameters": [ { - "$id": "59", + "$id": "97", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "60", - "kind": "constant", - "valueType": { - "$id": "61", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "16" }, "location": "Header", "isApiVersion": false, @@ -599,12 +937,12 @@ "skipUrlEncoding": false }, { - "$id": "62", + "$id": "98", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "63", + "$id": "99", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -622,7 +960,7 @@ } ], "response": { - "$id": "64" + "$id": "100" }, "isOverride": false, "generateConvenient": true, @@ -632,12 +970,12 @@ ], "parameters": [ { - "$id": "65", + "$id": "101", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "66", + "$id": "102", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -651,9 +989,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "67", + "$id": "103", "type": { - "$id": "68", + "$id": "104", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -666,45 +1004,35 @@ "crossLanguageDefinitionId": "Type.Scalar.Boolean", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "69", + "$id": "105", "kind": "client", "name": "Unknown", "namespace": "Type.Scalar", "methods": [ { - "$id": "70", + "$id": "106", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "doc": "get unknown value", "operation": { - "$id": "71", + "$id": "107", "name": "get", "resourceName": "Unknown", "doc": "get unknown value", "accessibility": "public", "parameters": [ { - "$id": "72", + "$id": "108", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "73", - "kind": "constant", - "valueType": { - "$id": "74", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -719,12 +1047,12 @@ ], "responses": [ { - "$id": "75", + "$id": "109", "statusCodes": [ 200 ], "bodyType": { - "$id": "76", + "$id": "110", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -732,21 +1060,11 @@ }, "headers": [ { - "$id": "77", + "$id": "111", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "78", - "kind": "constant", - "valueType": { - "$id": "79", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "20" } } ], @@ -767,11 +1085,11 @@ }, "parameters": [ { - "$id": "80", + "$id": "112", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "73" + "$ref": "18" }, "location": "Header", "isApiVersion": false, @@ -785,9 +1103,9 @@ } ], "response": { - "$id": "81", + "$id": "113", "type": { - "$ref": "76" + "$ref": "110" } }, "isOverride": false, @@ -796,35 +1114,25 @@ "crossLanguageDefinitionId": "Type.Scalar.Unknown.get" }, { - "$id": "82", + "$id": "114", "kind": "basic", "name": "put", "accessibility": "public", "apiVersions": [], "doc": "put unknown value", "operation": { - "$id": "83", + "$id": "115", "name": "put", "resourceName": "Unknown", "doc": "put unknown value", "accessibility": "public", "parameters": [ { - "$id": "84", + "$id": "116", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "85", - "kind": "constant", - "valueType": { - "$id": "86", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "22" }, "location": "Header", "isApiVersion": false, @@ -837,12 +1145,12 @@ "skipUrlEncoding": false }, { - "$id": "87", + "$id": "117", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "88", + "$id": "118", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -861,7 +1169,7 @@ ], "responses": [ { - "$id": "89", + "$id": "119", "statusCodes": [ 204 ], @@ -883,21 +1191,11 @@ }, "parameters": [ { - "$id": "90", + "$id": "120", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "91", - "kind": "constant", - "valueType": { - "$id": "92", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "24" }, "location": "Header", "isApiVersion": false, @@ -910,12 +1208,12 @@ "skipUrlEncoding": false }, { - "$id": "93", + "$id": "121", "name": "body", "nameInRequest": "body", "doc": "_", "type": { - "$id": "94", + "$id": "122", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -933,7 +1231,7 @@ } ], "response": { - "$id": "95" + "$id": "123" }, "isOverride": false, "generateConvenient": true, @@ -943,12 +1241,12 @@ ], "parameters": [ { - "$id": "96", + "$id": "124", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "97", + "$id": "125", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -962,9 +1260,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "98", + "$id": "126", "type": { - "$id": "99", + "$id": "127", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -977,44 +1275,34 @@ "crossLanguageDefinitionId": "Type.Scalar.Unknown", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "100", + "$id": "128", "kind": "client", "name": "DecimalType", "namespace": "Type.Scalar", "doc": "Decimal type", "methods": [ { - "$id": "101", + "$id": "129", "kind": "basic", "name": "responseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "102", + "$id": "130", "name": "responseBody", "resourceName": "DecimalType", "accessibility": "public", "parameters": [ { - "$id": "103", + "$id": "131", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "104", - "kind": "constant", - "valueType": { - "$id": "105", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -1029,12 +1317,12 @@ ], "responses": [ { - "$id": "106", + "$id": "132", "statusCodes": [ 200 ], "bodyType": { - "$id": "107", + "$id": "133", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1042,21 +1330,11 @@ }, "headers": [ { - "$id": "108", + "$id": "134", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "109", - "kind": "constant", - "valueType": { - "$id": "110", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "28" } } ], @@ -1077,11 +1355,11 @@ }, "parameters": [ { - "$id": "111", + "$id": "135", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "104" + "$ref": "26" }, "location": "Header", "isApiVersion": false, @@ -1095,9 +1373,9 @@ } ], "response": { - "$id": "112", + "$id": "136", "type": { - "$ref": "107" + "$ref": "133" } }, "isOverride": false, @@ -1106,33 +1384,23 @@ "crossLanguageDefinitionId": "Type.Scalar.DecimalType.responseBody" }, { - "$id": "113", + "$id": "137", "kind": "basic", "name": "requestBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "114", + "$id": "138", "name": "requestBody", "resourceName": "DecimalType", "accessibility": "public", "parameters": [ { - "$id": "115", + "$id": "139", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "116", - "kind": "constant", - "valueType": { - "$id": "117", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "30" }, "location": "Header", "isApiVersion": false, @@ -1145,11 +1413,11 @@ "skipUrlEncoding": false }, { - "$id": "118", + "$id": "140", "name": "body", "nameInRequest": "body", "type": { - "$id": "119", + "$id": "141", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1168,7 +1436,7 @@ ], "responses": [ { - "$id": "120", + "$id": "142", "statusCodes": [ 204 ], @@ -1190,21 +1458,11 @@ }, "parameters": [ { - "$id": "121", + "$id": "143", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "122", - "kind": "constant", - "valueType": { - "$id": "123", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "32" }, "location": "Header", "isApiVersion": false, @@ -1217,11 +1475,11 @@ "skipUrlEncoding": false }, { - "$id": "124", + "$id": "144", "name": "body", "nameInRequest": "body", "type": { - "$id": "125", + "$id": "145", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1239,7 +1497,7 @@ } ], "response": { - "$id": "126" + "$id": "146" }, "isOverride": false, "generateConvenient": true, @@ -1247,23 +1505,23 @@ "crossLanguageDefinitionId": "Type.Scalar.DecimalType.requestBody" }, { - "$id": "127", + "$id": "147", "kind": "basic", "name": "requestParameter", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "128", + "$id": "148", "name": "requestParameter", "resourceName": "DecimalType", "accessibility": "public", "parameters": [ { - "$id": "129", + "$id": "149", "name": "value", "nameInRequest": "value", "type": { - "$id": "130", + "$id": "150", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1282,7 +1540,7 @@ ], "responses": [ { - "$id": "131", + "$id": "151", "statusCodes": [ 204 ], @@ -1301,11 +1559,11 @@ }, "parameters": [ { - "$id": "132", + "$id": "152", "name": "value", "nameInRequest": "value", "type": { - "$id": "133", + "$id": "153", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1323,7 +1581,7 @@ } ], "response": { - "$id": "134" + "$id": "154" }, "isOverride": false, "generateConvenient": true, @@ -1333,12 +1591,12 @@ ], "parameters": [ { - "$id": "135", + "$id": "155", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "136", + "$id": "156", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1352,9 +1610,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "137", + "$id": "157", "type": { - "$id": "138", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1367,44 +1625,34 @@ "crossLanguageDefinitionId": "Type.Scalar.DecimalType", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "139", + "$id": "159", "kind": "client", "name": "Decimal128Type", "namespace": "Type.Scalar", "doc": "Decimal128 type", "methods": [ { - "$id": "140", + "$id": "160", "kind": "basic", "name": "responseBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "141", + "$id": "161", "name": "responseBody", "resourceName": "Decimal128Type", "accessibility": "public", "parameters": [ { - "$id": "142", + "$id": "162", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "143", - "kind": "constant", - "valueType": { - "$id": "144", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -1419,12 +1667,12 @@ ], "responses": [ { - "$id": "145", + "$id": "163", "statusCodes": [ 200 ], "bodyType": { - "$id": "146", + "$id": "164", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -1432,21 +1680,11 @@ }, "headers": [ { - "$id": "147", + "$id": "165", "name": "contentType", "nameInResponse": "content-type", "type": { - "$id": "148", - "kind": "constant", - "valueType": { - "$id": "149", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "36" } } ], @@ -1467,11 +1705,11 @@ }, "parameters": [ { - "$id": "150", + "$id": "166", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "143" + "$ref": "34" }, "location": "Header", "isApiVersion": false, @@ -1485,9 +1723,9 @@ } ], "response": { - "$id": "151", + "$id": "167", "type": { - "$ref": "146" + "$ref": "164" } }, "isOverride": false, @@ -1496,33 +1734,23 @@ "crossLanguageDefinitionId": "Type.Scalar.Decimal128Type.responseBody" }, { - "$id": "152", + "$id": "168", "kind": "basic", "name": "requestBody", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "153", + "$id": "169", "name": "requestBody", "resourceName": "Decimal128Type", "accessibility": "public", "parameters": [ { - "$id": "154", + "$id": "170", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "155", - "kind": "constant", - "valueType": { - "$id": "156", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "38" }, "location": "Header", "isApiVersion": false, @@ -1535,11 +1763,11 @@ "skipUrlEncoding": false }, { - "$id": "157", + "$id": "171", "name": "body", "nameInRequest": "body", "type": { - "$id": "158", + "$id": "172", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -1558,7 +1786,7 @@ ], "responses": [ { - "$id": "159", + "$id": "173", "statusCodes": [ 204 ], @@ -1580,21 +1808,11 @@ }, "parameters": [ { - "$id": "160", + "$id": "174", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "161", - "kind": "constant", - "valueType": { - "$id": "162", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "40" }, "location": "Header", "isApiVersion": false, @@ -1607,11 +1825,11 @@ "skipUrlEncoding": false }, { - "$id": "163", + "$id": "175", "name": "body", "nameInRequest": "body", "type": { - "$id": "164", + "$id": "176", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -1629,7 +1847,7 @@ } ], "response": { - "$id": "165" + "$id": "177" }, "isOverride": false, "generateConvenient": true, @@ -1637,23 +1855,23 @@ "crossLanguageDefinitionId": "Type.Scalar.Decimal128Type.requestBody" }, { - "$id": "166", + "$id": "178", "kind": "basic", "name": "requestParameter", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "167", + "$id": "179", "name": "requestParameter", "resourceName": "Decimal128Type", "accessibility": "public", "parameters": [ { - "$id": "168", + "$id": "180", "name": "value", "nameInRequest": "value", "type": { - "$id": "169", + "$id": "181", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -1672,7 +1890,7 @@ ], "responses": [ { - "$id": "170", + "$id": "182", "statusCodes": [ 204 ], @@ -1691,11 +1909,11 @@ }, "parameters": [ { - "$id": "171", + "$id": "183", "name": "value", "nameInRequest": "value", "type": { - "$id": "172", + "$id": "184", "kind": "decimal128", "name": "decimal128", "crossLanguageDefinitionId": "TypeSpec.decimal128", @@ -1713,7 +1931,7 @@ } ], "response": { - "$id": "173" + "$id": "185" }, "isOverride": false, "generateConvenient": true, @@ -1723,12 +1941,12 @@ ], "parameters": [ { - "$id": "174", + "$id": "186", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "175", + "$id": "187", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1742,9 +1960,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "176", + "$id": "188", "type": { - "$id": "177", + "$id": "189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1757,44 +1975,34 @@ "crossLanguageDefinitionId": "Type.Scalar.Decimal128Type", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "178", + "$id": "190", "kind": "client", "name": "DecimalVerify", "namespace": "Type.Scalar", "doc": "Decimal type verification", "methods": [ { - "$id": "179", + "$id": "191", "kind": "basic", "name": "prepareVerify", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "180", + "$id": "192", "name": "prepareVerify", "resourceName": "DecimalVerify", "accessibility": "public", "parameters": [ { - "$id": "181", + "$id": "193", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "182", - "kind": "constant", - "valueType": { - "$id": "183", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -1809,16 +2017,16 @@ ], "responses": [ { - "$id": "184", + "$id": "194", "statusCodes": [ 200 ], "bodyType": { - "$id": "185", + "$id": "195", "kind": "array", "name": "Array", "valueType": { - "$id": "186", + "$id": "196", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1845,11 +2053,11 @@ }, "parameters": [ { - "$id": "187", + "$id": "197", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "182" + "$ref": "42" }, "location": "Header", "isApiVersion": false, @@ -1863,9 +2071,9 @@ } ], "response": { - "$id": "188", + "$id": "198", "type": { - "$ref": "185" + "$ref": "195" } }, "isOverride": false, @@ -1874,33 +2082,23 @@ "crossLanguageDefinitionId": "Type.Scalar.DecimalVerify.prepareVerify" }, { - "$id": "189", + "$id": "199", "kind": "basic", "name": "verify", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "190", + "$id": "200", "name": "verify", "resourceName": "DecimalVerify", "accessibility": "public", "parameters": [ { - "$id": "191", + "$id": "201", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "192", - "kind": "constant", - "valueType": { - "$id": "193", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "44" }, "location": "Header", "isApiVersion": false, @@ -1913,11 +2111,11 @@ "skipUrlEncoding": false }, { - "$id": "194", + "$id": "202", "name": "body", "nameInRequest": "body", "type": { - "$id": "195", + "$id": "203", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -1936,7 +2134,7 @@ ], "responses": [ { - "$id": "196", + "$id": "204", "statusCodes": [ 204 ], @@ -1958,21 +2156,11 @@ }, "parameters": [ { - "$id": "197", + "$id": "205", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "198", - "kind": "constant", - "valueType": { - "$id": "199", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "46" }, "location": "Header", "isApiVersion": false, @@ -1985,11 +2173,11 @@ "skipUrlEncoding": false }, { - "$id": "200", + "$id": "206", "name": "body", "nameInRequest": "body", "type": { - "$id": "201", + "$id": "207", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -2007,7 +2195,7 @@ } ], "response": { - "$id": "202" + "$id": "208" }, "isOverride": false, "generateConvenient": true, @@ -2017,12 +2205,12 @@ ], "parameters": [ { - "$id": "203", + "$id": "209", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "204", + "$id": "210", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2036,9 +2224,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "205", + "$id": "211", "type": { - "$id": "206", + "$id": "212", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2051,44 +2239,34 @@ "crossLanguageDefinitionId": "Type.Scalar.DecimalVerify", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } }, { - "$id": "207", + "$id": "213", "kind": "client", "name": "Decimal128Verify", "namespace": "Type.Scalar", "doc": "Decimal128 type verification", "methods": [ { - "$id": "208", + "$id": "214", "kind": "basic", "name": "prepareVerify", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "209", + "$id": "215", "name": "prepareVerify", "resourceName": "Decimal128Verify", "accessibility": "public", "parameters": [ { - "$id": "210", + "$id": "216", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "211", - "kind": "constant", - "valueType": { - "$id": "212", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2103,16 +2281,16 @@ ], "responses": [ { - "$id": "213", + "$id": "217", "statusCodes": [ 200 ], "bodyType": { - "$id": "214", + "$id": "218", "kind": "array", "name": "Array", "valueType": { - "$id": "215", + "$id": "219", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -2139,11 +2317,11 @@ }, "parameters": [ { - "$id": "216", + "$id": "220", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "211" + "$ref": "48" }, "location": "Header", "isApiVersion": false, @@ -2157,9 +2335,9 @@ } ], "response": { - "$id": "217", + "$id": "221", "type": { - "$ref": "214" + "$ref": "218" } }, "isOverride": false, @@ -2168,33 +2346,23 @@ "crossLanguageDefinitionId": "Type.Scalar.Decimal128Verify.prepareVerify" }, { - "$id": "218", + "$id": "222", "kind": "basic", "name": "verify", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "219", + "$id": "223", "name": "verify", "resourceName": "Decimal128Verify", "accessibility": "public", "parameters": [ { - "$id": "220", + "$id": "224", "name": "contentType", "nameInRequest": "Content-Type", "type": { - "$id": "221", - "kind": "constant", - "valueType": { - "$id": "222", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "50" }, "location": "Header", "isApiVersion": false, @@ -2207,11 +2375,11 @@ "skipUrlEncoding": false }, { - "$id": "223", + "$id": "225", "name": "body", "nameInRequest": "body", "type": { - "$id": "224", + "$id": "226", "kind": "decimal", "name": "decimal", "crossLanguageDefinitionId": "TypeSpec.decimal", @@ -2230,7 +2398,7 @@ ], "responses": [ { - "$id": "225", + "$id": "227", "statusCodes": [ 204 ], @@ -2252,21 +2420,11 @@ }, "parameters": [ { - "$id": "226", + "$id": "228", "name": "contentType", "nameInRequest": "content-type", "type": { - "$id": "227", - "kind": "constant", - "valueType": { - "$id": "228", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "52" }, "location": "Header", "isApiVersion": false, @@ -2345,7 +2503,7 @@ "crossLanguageDefinitionId": "Type.Scalar.Decimal128Verify", "apiVersions": [], "parent": { - "$ref": "2" + "$ref": "54" } } ] diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj index d208c5579422..6d157491a2f0 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/src/Type.Union.csproj @@ -17,6 +17,7 @@ + diff --git a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json index 2618fe64b84f..54bac85f0a8c 100644 --- a/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json +++ b/eng/packages/http-client-csharp/generator/TestProjects/Spector/http/type/union/tspCodeModel.json @@ -467,9 +467,411 @@ "decorators": [] } ], - "models": [ + "constants": [ { "$id": "54", + "kind": "constant", + "name": "MixedLiteralsCasesStringLiteral1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "55", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "a", + "decorators": [] + }, + { + "$id": "56", + "kind": "constant", + "name": "MixedLiteralsCasesStringLiteral2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "57", + "kind": "int32", + "name": "int32", + "crossLanguageDefinitionId": "TypeSpec.int32", + "decorators": [] + }, + "value": 2, + "decorators": [] + }, + { + "$id": "58", + "kind": "constant", + "name": "MixedLiteralsCasesStringLiteral3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "59", + "kind": "float32", + "name": "float32", + "crossLanguageDefinitionId": "TypeSpec.float32", + "decorators": [] + }, + "value": 3.3, + "decorators": [] + }, + { + "$id": "60", + "kind": "constant", + "name": "MixedLiteralsCasesStringLiteral4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "61", + "kind": "boolean", + "name": "boolean", + "crossLanguageDefinitionId": "TypeSpec.boolean", + "decorators": [] + }, + "value": true, + "decorators": [] + }, + { + "$id": "62", + "kind": "constant", + "name": "MixedLiteralsCasesStringLiteral11", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "63", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "a", + "decorators": [] + }, + { + "$id": "64", + "kind": "constant", + "name": "getContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "65", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "66", + "kind": "constant", + "name": "sendContentType", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "67", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "68", + "kind": "constant", + "name": "getContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "69", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "70", + "kind": "constant", + "name": "sendContentType1", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "71", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "72", + "kind": "constant", + "name": "getContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "73", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "74", + "kind": "constant", + "name": "sendContentType2", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "75", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "76", + "kind": "constant", + "name": "getContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "77", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "78", + "kind": "constant", + "name": "sendContentType3", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "79", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "80", + "kind": "constant", + "name": "getContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "81", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "82", + "kind": "constant", + "name": "sendContentType4", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "83", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "84", + "kind": "constant", + "name": "getContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "85", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "86", + "kind": "constant", + "name": "sendContentType5", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "87", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "88", + "kind": "constant", + "name": "getContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "89", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "90", + "kind": "constant", + "name": "sendContentType6", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "91", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "92", + "kind": "constant", + "name": "getContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "93", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "94", + "kind": "constant", + "name": "sendContentType7", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "95", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "96", + "kind": "constant", + "name": "getContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "97", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "98", + "kind": "constant", + "name": "sendContentType8", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "99", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "100", + "kind": "constant", + "name": "getContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "101", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + }, + { + "$id": "102", + "kind": "constant", + "name": "sendContentType9", + "namespace": "", + "usage": "None", + "valueType": { + "$id": "103", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "application/json", + "decorators": [] + } + ], + "models": [ + { + "$id": "104", "kind": "model", "name": "GetResponse", "namespace": "Type.Union", @@ -478,7 +880,7 @@ "decorators": [], "properties": [ { - "$id": "55", + "$id": "105", "kind": "property", "name": "prop", "serializedName": "prop", @@ -492,9 +894,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "56", + "$id": "106", "json": { - "$id": "57", + "$id": "107", "name": "prop" } } @@ -502,7 +904,7 @@ ] }, { - "$id": "58", + "$id": "108", "kind": "model", "name": "SendRequest", "namespace": "Type.Union", @@ -511,7 +913,7 @@ "decorators": [], "properties": [ { - "$id": "59", + "$id": "109", "kind": "property", "name": "prop", "serializedName": "prop", @@ -525,9 +927,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringsOnly.send.prop", "serializationOptions": { - "$id": "60", + "$id": "110", "json": { - "$id": "61", + "$id": "111", "name": "prop" } } @@ -535,7 +937,7 @@ ] }, { - "$id": "62", + "$id": "112", "kind": "model", "name": "GetResponse1", "namespace": "Type.Union", @@ -544,7 +946,7 @@ "decorators": [], "properties": [ { - "$id": "63", + "$id": "113", "kind": "property", "name": "prop", "serializedName": "prop", @@ -558,9 +960,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "64", + "$id": "114", "json": { - "$id": "65", + "$id": "115", "name": "prop" } } @@ -568,7 +970,7 @@ ] }, { - "$id": "66", + "$id": "116", "kind": "model", "name": "SendRequest1", "namespace": "Type.Union", @@ -577,7 +979,7 @@ "decorators": [], "properties": [ { - "$id": "67", + "$id": "117", "kind": "property", "name": "prop", "serializedName": "prop", @@ -591,9 +993,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringExtensible.send.prop", "serializationOptions": { - "$id": "68", + "$id": "118", "json": { - "$id": "69", + "$id": "119", "name": "prop" } } @@ -601,7 +1003,7 @@ ] }, { - "$id": "70", + "$id": "120", "kind": "model", "name": "GetResponse2", "namespace": "Type.Union", @@ -610,7 +1012,7 @@ "decorators": [], "properties": [ { - "$id": "71", + "$id": "121", "kind": "property", "name": "prop", "serializedName": "prop", @@ -624,9 +1026,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "72", + "$id": "122", "json": { - "$id": "73", + "$id": "123", "name": "prop" } } @@ -634,7 +1036,7 @@ ] }, { - "$id": "74", + "$id": "124", "kind": "model", "name": "SendRequest2", "namespace": "Type.Union", @@ -643,7 +1045,7 @@ "decorators": [], "properties": [ { - "$id": "75", + "$id": "125", "kind": "property", "name": "prop", "serializedName": "prop", @@ -657,9 +1059,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringExtensibleNamed.send.prop", "serializationOptions": { - "$id": "76", + "$id": "126", "json": { - "$id": "77", + "$id": "127", "name": "prop" } } @@ -667,7 +1069,7 @@ ] }, { - "$id": "78", + "$id": "128", "kind": "model", "name": "GetResponse3", "namespace": "Type.Union", @@ -676,7 +1078,7 @@ "decorators": [], "properties": [ { - "$id": "79", + "$id": "129", "kind": "property", "name": "prop", "serializedName": "prop", @@ -690,9 +1092,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "80", + "$id": "130", "json": { - "$id": "81", + "$id": "131", "name": "prop" } } @@ -700,7 +1102,7 @@ ] }, { - "$id": "82", + "$id": "132", "kind": "model", "name": "SendRequest3", "namespace": "Type.Union", @@ -709,7 +1111,7 @@ "decorators": [], "properties": [ { - "$id": "83", + "$id": "133", "kind": "property", "name": "prop", "serializedName": "prop", @@ -723,9 +1125,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.IntsOnly.send.prop", "serializationOptions": { - "$id": "84", + "$id": "134", "json": { - "$id": "85", + "$id": "135", "name": "prop" } } @@ -733,7 +1135,7 @@ ] }, { - "$id": "86", + "$id": "136", "kind": "model", "name": "GetResponse4", "namespace": "Type.Union", @@ -742,7 +1144,7 @@ "decorators": [], "properties": [ { - "$id": "87", + "$id": "137", "kind": "property", "name": "prop", "serializedName": "prop", @@ -756,9 +1158,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "88", + "$id": "138", "json": { - "$id": "89", + "$id": "139", "name": "prop" } } @@ -766,7 +1168,7 @@ ] }, { - "$id": "90", + "$id": "140", "kind": "model", "name": "SendRequest4", "namespace": "Type.Union", @@ -775,7 +1177,7 @@ "decorators": [], "properties": [ { - "$id": "91", + "$id": "141", "kind": "property", "name": "prop", "serializedName": "prop", @@ -789,9 +1191,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.FloatsOnly.send.prop", "serializationOptions": { - "$id": "92", + "$id": "142", "json": { - "$id": "93", + "$id": "143", "name": "prop" } } @@ -799,7 +1201,7 @@ ] }, { - "$id": "94", + "$id": "144", "kind": "model", "name": "GetResponse5", "namespace": "Type.Union", @@ -808,17 +1210,17 @@ "decorators": [], "properties": [ { - "$id": "95", + "$id": "145", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "96", + "$id": "146", "kind": "union", "name": "GetResponseProp4", "variantTypes": [ { - "$id": "97", + "$id": "147", "kind": "model", "name": "Cat", "namespace": "Type.Union", @@ -827,12 +1229,12 @@ "decorators": [], "properties": [ { - "$id": "98", + "$id": "148", "kind": "property", "name": "name", "serializedName": "name", "type": { - "$id": "99", + "$id": "149", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -845,9 +1247,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.Cat.name", "serializationOptions": { - "$id": "100", + "$id": "150", "json": { - "$id": "101", + "$id": "151", "name": "name" } } @@ -855,7 +1257,7 @@ ] }, { - "$id": "102", + "$id": "152", "kind": "model", "name": "Dog", "namespace": "Type.Union", @@ -864,12 +1266,12 @@ "decorators": [], "properties": [ { - "$id": "103", + "$id": "153", "kind": "property", "name": "bark", "serializedName": "bark", "type": { - "$id": "104", + "$id": "154", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -882,9 +1284,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.Dog.bark", "serializationOptions": { - "$id": "105", + "$id": "155", "json": { - "$id": "106", + "$id": "156", "name": "bark" } } @@ -902,9 +1304,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "107", + "$id": "157", "json": { - "$id": "108", + "$id": "158", "name": "prop" } } @@ -912,13 +1314,13 @@ ] }, { - "$ref": "97" + "$ref": "147" }, { - "$ref": "102" + "$ref": "152" }, { - "$id": "109", + "$id": "159", "kind": "model", "name": "SendRequest5", "namespace": "Type.Union", @@ -927,12 +1329,12 @@ "decorators": [], "properties": [ { - "$id": "110", + "$id": "160", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$ref": "96" + "$ref": "146" }, "optional": false, "readOnly": false, @@ -941,9 +1343,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.ModelsOnly.send.prop", "serializationOptions": { - "$id": "111", + "$id": "161", "json": { - "$id": "112", + "$id": "162", "name": "prop" } } @@ -951,7 +1353,7 @@ ] }, { - "$id": "113", + "$id": "163", "kind": "model", "name": "GetResponse6", "namespace": "Type.Union", @@ -960,12 +1362,12 @@ "decorators": [], "properties": [ { - "$id": "114", + "$id": "164", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "115", + "$id": "165", "kind": "model", "name": "EnumsOnlyCases", "namespace": "Type.Union", @@ -974,7 +1376,7 @@ "decorators": [], "properties": [ { - "$id": "116", + "$id": "166", "kind": "property", "name": "lr", "serializedName": "lr", @@ -989,15 +1391,15 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.EnumsOnlyCases.lr", "serializationOptions": { - "$id": "117", + "$id": "167", "json": { - "$id": "118", + "$id": "168", "name": "lr" } } }, { - "$id": "119", + "$id": "169", "kind": "property", "name": "ud", "serializedName": "ud", @@ -1012,9 +1414,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.EnumsOnlyCases.ud", "serializationOptions": { - "$id": "120", + "$id": "170", "json": { - "$id": "121", + "$id": "171", "name": "ud" } } @@ -1028,9 +1430,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "122", + "$id": "172", "json": { - "$id": "123", + "$id": "173", "name": "prop" } } @@ -1038,10 +1440,10 @@ ] }, { - "$ref": "115" + "$ref": "165" }, { - "$id": "124", + "$id": "174", "kind": "model", "name": "SendRequest6", "namespace": "Type.Union", @@ -1050,12 +1452,12 @@ "decorators": [], "properties": [ { - "$id": "125", + "$id": "175", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$ref": "115" + "$ref": "165" }, "optional": false, "readOnly": false, @@ -1064,9 +1466,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.EnumsOnly.send.prop", "serializationOptions": { - "$id": "126", + "$id": "176", "json": { - "$id": "127", + "$id": "177", "name": "prop" } } @@ -1074,7 +1476,7 @@ ] }, { - "$id": "128", + "$id": "178", "kind": "model", "name": "GetResponse7", "namespace": "Type.Union", @@ -1083,12 +1485,12 @@ "decorators": [], "properties": [ { - "$id": "129", + "$id": "179", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "130", + "$id": "180", "kind": "model", "name": "StringAndArrayCases", "namespace": "Type.Union", @@ -1097,29 +1499,29 @@ "decorators": [], "properties": [ { - "$id": "131", + "$id": "181", "kind": "property", "name": "string", "serializedName": "string", "doc": "This should be receive/send the string variant", "type": { - "$id": "132", + "$id": "182", "kind": "union", "name": "StringAndArrayCasesString", "variantTypes": [ { - "$id": "133", + "$id": "183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "134", + "$id": "184", "kind": "array", "name": "Array", "valueType": { - "$id": "135", + "$id": "185", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1139,37 +1541,37 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringAndArrayCases.string", "serializationOptions": { - "$id": "136", + "$id": "186", "json": { - "$id": "137", + "$id": "187", "name": "string" } } }, { - "$id": "138", + "$id": "188", "kind": "property", "name": "array", "serializedName": "array", "doc": "This should be receive/send the array variant", "type": { - "$id": "139", + "$id": "189", "kind": "union", "name": "StringAndArrayCasesArray", "variantTypes": [ { - "$id": "140", + "$id": "190", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, { - "$id": "141", + "$id": "191", "kind": "array", "name": "Array", "valueType": { - "$id": "142", + "$id": "192", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1189,9 +1591,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringAndArrayCases.array", "serializationOptions": { - "$id": "143", + "$id": "193", "json": { - "$id": "144", + "$id": "194", "name": "array" } } @@ -1205,9 +1607,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "145", + "$id": "195", "json": { - "$id": "146", + "$id": "196", "name": "prop" } } @@ -1215,10 +1617,10 @@ ] }, { - "$ref": "130" + "$ref": "180" }, { - "$id": "147", + "$id": "197", "kind": "model", "name": "SendRequest7", "namespace": "Type.Union", @@ -1227,12 +1629,12 @@ "decorators": [], "properties": [ { - "$id": "148", + "$id": "198", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$ref": "130" + "$ref": "180" }, "optional": false, "readOnly": false, @@ -1241,9 +1643,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.StringAndArray.send.prop", "serializationOptions": { - "$id": "149", + "$id": "199", "json": { - "$id": "150", + "$id": "200", "name": "prop" } } @@ -1251,7 +1653,7 @@ ] }, { - "$id": "151", + "$id": "201", "kind": "model", "name": "GetResponse8", "namespace": "Type.Union", @@ -1260,12 +1662,12 @@ "decorators": [], "properties": [ { - "$id": "152", + "$id": "202", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "153", + "$id": "203", "kind": "model", "name": "MixedLiteralsCases", "namespace": "Type.Union", @@ -1274,67 +1676,27 @@ "decorators": [], "properties": [ { - "$id": "154", + "$id": "204", "kind": "property", "name": "stringLiteral", "serializedName": "stringLiteral", "doc": "This should be receive/send the \"a\" variant", "type": { - "$id": "155", + "$id": "205", "kind": "union", "name": "MixedLiteralsCasesStringLiteral", "variantTypes": [ { - "$id": "156", - "kind": "constant", - "valueType": { - "$id": "157", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "a", - "decorators": [] - }, - { - "$id": "158", - "kind": "constant", - "valueType": { - "$id": "159", - "kind": "int32", - "name": "int32", - "crossLanguageDefinitionId": "TypeSpec.int32", - "decorators": [] - }, - "value": 2, - "decorators": [] + "$ref": "54" }, { - "$id": "160", - "kind": "constant", - "valueType": { - "$id": "161", - "kind": "float32", - "name": "float32", - "crossLanguageDefinitionId": "TypeSpec.float32", - "decorators": [] - }, - "value": 3.3, - "decorators": [] + "$ref": "56" }, { - "$id": "162", - "kind": "constant", - "valueType": { - "$id": "163", - "kind": "boolean", - "name": "boolean", - "crossLanguageDefinitionId": "TypeSpec.boolean", - "decorators": [] - }, - "value": true, - "decorators": [] + "$ref": "58" + }, + { + "$ref": "60" } ], "namespace": "", @@ -1347,21 +1709,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiteralsCases.stringLiteral", "serializationOptions": { - "$id": "164", + "$id": "206", "json": { - "$id": "165", + "$id": "207", "name": "stringLiteral" } } }, { - "$id": "166", + "$id": "208", "kind": "property", "name": "intLiteral", "serializedName": "intLiteral", "doc": "This should be receive/send the 2 variant", "type": { - "$ref": "155" + "$ref": "205" }, "optional": false, "readOnly": false, @@ -1370,21 +1732,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiteralsCases.intLiteral", "serializationOptions": { - "$id": "167", + "$id": "209", "json": { - "$id": "168", + "$id": "210", "name": "intLiteral" } } }, { - "$id": "169", + "$id": "211", "kind": "property", "name": "floatLiteral", "serializedName": "floatLiteral", "doc": "This should be receive/send the 3.3 variant", "type": { - "$ref": "155" + "$ref": "205" }, "optional": false, "readOnly": false, @@ -1393,21 +1755,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiteralsCases.floatLiteral", "serializationOptions": { - "$id": "170", + "$id": "212", "json": { - "$id": "171", + "$id": "213", "name": "floatLiteral" } } }, { - "$id": "172", + "$id": "214", "kind": "property", "name": "booleanLiteral", "serializedName": "booleanLiteral", "doc": "This should be receive/send the true variant", "type": { - "$ref": "155" + "$ref": "205" }, "optional": false, "readOnly": false, @@ -1416,9 +1778,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiteralsCases.booleanLiteral", "serializationOptions": { - "$id": "173", + "$id": "215", "json": { - "$id": "174", + "$id": "216", "name": "booleanLiteral" } } @@ -1432,9 +1794,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "175", + "$id": "217", "json": { - "$id": "176", + "$id": "218", "name": "prop" } } @@ -1442,10 +1804,10 @@ ] }, { - "$ref": "153" + "$ref": "203" }, { - "$id": "177", + "$id": "219", "kind": "model", "name": "SendRequest8", "namespace": "Type.Union", @@ -1454,12 +1816,12 @@ "decorators": [], "properties": [ { - "$id": "178", + "$id": "220", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$ref": "153" + "$ref": "203" }, "optional": false, "readOnly": false, @@ -1468,9 +1830,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedLiterals.send.prop", "serializationOptions": { - "$id": "179", + "$id": "221", "json": { - "$id": "180", + "$id": "222", "name": "prop" } } @@ -1478,7 +1840,7 @@ ] }, { - "$id": "181", + "$id": "223", "kind": "model", "name": "GetResponse9", "namespace": "Type.Union", @@ -1487,12 +1849,12 @@ "decorators": [], "properties": [ { - "$id": "182", + "$id": "224", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$id": "183", + "$id": "225", "kind": "model", "name": "MixedTypesCases", "namespace": "Type.Union", @@ -1501,41 +1863,31 @@ "decorators": [], "properties": [ { - "$id": "184", + "$id": "226", "kind": "property", "name": "model", "serializedName": "model", "doc": "This should be receive/send the Cat variant", "type": { - "$id": "185", + "$id": "227", "kind": "union", "name": "MixedTypesCasesModel", "variantTypes": [ { - "$ref": "97" + "$ref": "147" }, { - "$id": "186", - "kind": "constant", - "valueType": { - "$id": "187", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "a", - "decorators": [] + "$ref": "62" }, { - "$id": "188", + "$id": "228", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", "decorators": [] }, { - "$id": "189", + "$id": "229", "kind": "boolean", "name": "boolean", "crossLanguageDefinitionId": "TypeSpec.boolean", @@ -1552,21 +1904,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypesCases.model", "serializationOptions": { - "$id": "190", + "$id": "230", "json": { - "$id": "191", + "$id": "231", "name": "model" } } }, { - "$id": "192", + "$id": "232", "kind": "property", "name": "literal", "serializedName": "literal", "doc": "This should be receive/send the \"a\" variant", "type": { - "$ref": "185" + "$ref": "227" }, "optional": false, "readOnly": false, @@ -1575,21 +1927,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypesCases.literal", "serializationOptions": { - "$id": "193", + "$id": "233", "json": { - "$id": "194", + "$id": "234", "name": "literal" } } }, { - "$id": "195", + "$id": "235", "kind": "property", "name": "int", "serializedName": "int", "doc": "This should be receive/send the int variant", "type": { - "$ref": "185" + "$ref": "227" }, "optional": false, "readOnly": false, @@ -1598,21 +1950,21 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypesCases.int", "serializationOptions": { - "$id": "196", + "$id": "236", "json": { - "$id": "197", + "$id": "237", "name": "int" } } }, { - "$id": "198", + "$id": "238", "kind": "property", "name": "boolean", "serializedName": "boolean", "doc": "This should be receive/send the boolean variant", "type": { - "$ref": "185" + "$ref": "227" }, "optional": false, "readOnly": false, @@ -1621,25 +1973,25 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypesCases.boolean", "serializationOptions": { - "$id": "199", + "$id": "239", "json": { - "$id": "200", + "$id": "240", "name": "boolean" } } }, { - "$id": "201", + "$id": "241", "kind": "property", "name": "array", "serializedName": "array", "doc": "This should be receive/send 4 element with Cat, \"a\", int, and boolean", "type": { - "$id": "202", + "$id": "242", "kind": "array", "name": "Array1", "valueType": { - "$ref": "185" + "$ref": "227" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -1651,9 +2003,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypesCases.array", "serializationOptions": { - "$id": "203", + "$id": "243", "json": { - "$id": "204", + "$id": "244", "name": "array" } } @@ -1667,9 +2019,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.get.Response.anonymous.prop", "serializationOptions": { - "$id": "205", + "$id": "245", "json": { - "$id": "206", + "$id": "246", "name": "prop" } } @@ -1677,10 +2029,10 @@ ] }, { - "$ref": "183" + "$ref": "225" }, { - "$id": "207", + "$id": "247", "kind": "model", "name": "SendRequest9", "namespace": "Type.Union", @@ -1689,12 +2041,12 @@ "decorators": [], "properties": [ { - "$id": "208", + "$id": "248", "kind": "property", "name": "prop", "serializedName": "prop", "type": { - "$ref": "183" + "$ref": "225" }, "optional": false, "readOnly": false, @@ -1703,9 +2055,9 @@ "decorators": [], "crossLanguageDefinitionId": "Type.Union.MixedTypes.send.prop", "serializationOptions": { - "$id": "209", + "$id": "249", "json": { - "$id": "210", + "$id": "250", "name": "prop" } } @@ -1715,7 +2067,7 @@ ], "clients": [ { - "$id": "211", + "$id": "251", "kind": "client", "name": "UnionClient", "namespace": "Type.Union", @@ -1723,12 +2075,12 @@ "methods": [], "parameters": [ { - "$id": "212", + "$id": "252", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "213", + "$id": "253", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -1742,9 +2094,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "214", + "$id": "254", "type": { - "$id": "215", + "$id": "255", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -1758,40 +2110,30 @@ "apiVersions": [], "children": [ { - "$id": "216", + "$id": "256", "kind": "client", "name": "StringsOnly", "namespace": "Type.Union", "doc": "Describe union of string \"a\" | \"b\" | \"c\"", "methods": [ { - "$id": "217", + "$id": "257", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "218", + "$id": "258", "name": "get", "resourceName": "StringsOnly", "accessibility": "public", "parameters": [ { - "$id": "219", + "$id": "259", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "220", - "kind": "constant", - "valueType": { - "$id": "221", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -1806,12 +2148,12 @@ ], "responses": [ { - "$id": "222", + "$id": "260", "statusCodes": [ 200 ], "bodyType": { - "$ref": "54" + "$ref": "104" }, "headers": [], "isErrorResponse": false, @@ -1831,11 +2173,11 @@ }, "parameters": [ { - "$id": "223", + "$id": "261", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "220" + "$ref": "64" }, "location": "Header", "isApiVersion": false, @@ -1849,9 +2191,9 @@ } ], "response": { - "$id": "224", + "$id": "262", "type": { - "$ref": "54" + "$ref": "104" } }, "isOverride": false, @@ -1860,34 +2202,24 @@ "crossLanguageDefinitionId": "Type.Union.StringsOnly.get" }, { - "$id": "225", + "$id": "263", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "226", + "$id": "264", "name": "send", "resourceName": "StringsOnly", "accessibility": "public", "parameters": [ { - "$id": "227", + "$id": "265", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "228", - "kind": "constant", - "valueType": { - "$id": "229", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -1900,11 +2232,11 @@ "skipUrlEncoding": false }, { - "$id": "230", + "$id": "266", "name": "sendRequest", "nameInRequest": "sendRequest", "type": { - "$ref": "58" + "$ref": "108" }, "location": "Body", "isApiVersion": false, @@ -1919,7 +2251,7 @@ ], "responses": [ { - "$id": "231", + "$id": "267", "statusCodes": [ 204 ], @@ -1941,7 +2273,7 @@ }, "parameters": [ { - "$id": "232", + "$id": "268", "name": "prop", "nameInRequest": "prop", "type": { @@ -1958,12 +2290,12 @@ "skipUrlEncoding": false }, { - "$id": "233", + "$id": "269", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "228" + "$ref": "66" }, "location": "Header", "isApiVersion": false, @@ -1977,7 +2309,7 @@ } ], "response": { - "$id": "234" + "$id": "270" }, "isOverride": false, "generateConvenient": true, @@ -1987,12 +2319,12 @@ ], "parameters": [ { - "$id": "235", + "$id": "271", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "236", + "$id": "272", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2006,9 +2338,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "237", + "$id": "273", "type": { - "$id": "238", + "$id": "274", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2021,44 +2353,34 @@ "crossLanguageDefinitionId": "Type.Union.StringsOnly", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "239", + "$id": "275", "kind": "client", "name": "StringExtensible", "namespace": "Type.Union", "doc": "Describe union of string string | \"b\" | \"c\"", "methods": [ { - "$id": "240", + "$id": "276", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "241", + "$id": "277", "name": "get", "resourceName": "StringExtensible", "accessibility": "public", "parameters": [ { - "$id": "242", + "$id": "278", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "243", - "kind": "constant", - "valueType": { - "$id": "244", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -2073,12 +2395,12 @@ ], "responses": [ { - "$id": "245", + "$id": "279", "statusCodes": [ 200 ], "bodyType": { - "$ref": "62" + "$ref": "112" }, "headers": [], "isErrorResponse": false, @@ -2098,11 +2420,11 @@ }, "parameters": [ { - "$id": "246", + "$id": "280", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "243" + "$ref": "68" }, "location": "Header", "isApiVersion": false, @@ -2116,9 +2438,9 @@ } ], "response": { - "$id": "247", + "$id": "281", "type": { - "$ref": "62" + "$ref": "112" } }, "isOverride": false, @@ -2127,34 +2449,24 @@ "crossLanguageDefinitionId": "Type.Union.StringExtensible.get" }, { - "$id": "248", + "$id": "282", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "249", + "$id": "283", "name": "send", "resourceName": "StringExtensible", "accessibility": "public", "parameters": [ { - "$id": "250", + "$id": "284", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "251", - "kind": "constant", - "valueType": { - "$id": "252", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -2167,11 +2479,11 @@ "skipUrlEncoding": false }, { - "$id": "253", + "$id": "285", "name": "sendRequest1", "nameInRequest": "sendRequest1", "type": { - "$ref": "66" + "$ref": "116" }, "location": "Body", "isApiVersion": false, @@ -2186,7 +2498,7 @@ ], "responses": [ { - "$id": "254", + "$id": "286", "statusCodes": [ 204 ], @@ -2208,7 +2520,7 @@ }, "parameters": [ { - "$id": "255", + "$id": "287", "name": "prop", "nameInRequest": "prop", "type": { @@ -2225,12 +2537,12 @@ "skipUrlEncoding": false }, { - "$id": "256", + "$id": "288", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "251" + "$ref": "70" }, "location": "Header", "isApiVersion": false, @@ -2244,7 +2556,7 @@ } ], "response": { - "$id": "257" + "$id": "289" }, "isOverride": false, "generateConvenient": true, @@ -2254,12 +2566,12 @@ ], "parameters": [ { - "$id": "258", + "$id": "290", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "259", + "$id": "291", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2273,9 +2585,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "260", + "$id": "292", "type": { - "$id": "261", + "$id": "293", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2288,44 +2600,34 @@ "crossLanguageDefinitionId": "Type.Union.StringExtensible", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "262", + "$id": "294", "kind": "client", "name": "StringExtensibleNamed", "namespace": "Type.Union", "doc": "Describe union of string string | \"b\" | \"c\" but where the union is named and some of the variants are named", "methods": [ { - "$id": "263", + "$id": "295", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "264", + "$id": "296", "name": "get", "resourceName": "StringExtensibleNamed", "accessibility": "public", "parameters": [ { - "$id": "265", + "$id": "297", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "266", - "kind": "constant", - "valueType": { - "$id": "267", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -2340,12 +2642,12 @@ ], "responses": [ { - "$id": "268", + "$id": "298", "statusCodes": [ 200 ], "bodyType": { - "$ref": "70" + "$ref": "120" }, "headers": [], "isErrorResponse": false, @@ -2365,11 +2667,11 @@ }, "parameters": [ { - "$id": "269", + "$id": "299", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "266" + "$ref": "72" }, "location": "Header", "isApiVersion": false, @@ -2383,9 +2685,9 @@ } ], "response": { - "$id": "270", + "$id": "300", "type": { - "$ref": "70" + "$ref": "120" } }, "isOverride": false, @@ -2394,34 +2696,24 @@ "crossLanguageDefinitionId": "Type.Union.StringExtensibleNamed.get" }, { - "$id": "271", + "$id": "301", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "272", + "$id": "302", "name": "send", "resourceName": "StringExtensibleNamed", "accessibility": "public", "parameters": [ { - "$id": "273", + "$id": "303", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "274", - "kind": "constant", - "valueType": { - "$id": "275", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -2434,11 +2726,11 @@ "skipUrlEncoding": false }, { - "$id": "276", + "$id": "304", "name": "sendRequest2", "nameInRequest": "sendRequest2", "type": { - "$ref": "74" + "$ref": "124" }, "location": "Body", "isApiVersion": false, @@ -2453,7 +2745,7 @@ ], "responses": [ { - "$id": "277", + "$id": "305", "statusCodes": [ 204 ], @@ -2475,7 +2767,7 @@ }, "parameters": [ { - "$id": "278", + "$id": "306", "name": "prop", "nameInRequest": "prop", "type": { @@ -2492,12 +2784,12 @@ "skipUrlEncoding": false }, { - "$id": "279", + "$id": "307", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "274" + "$ref": "74" }, "location": "Header", "isApiVersion": false, @@ -2511,7 +2803,7 @@ } ], "response": { - "$id": "280" + "$id": "308" }, "isOverride": false, "generateConvenient": true, @@ -2521,12 +2813,12 @@ ], "parameters": [ { - "$id": "281", + "$id": "309", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "282", + "$id": "310", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2540,9 +2832,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "283", + "$id": "311", "type": { - "$id": "284", + "$id": "312", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2555,44 +2847,34 @@ "crossLanguageDefinitionId": "Type.Union.StringExtensibleNamed", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "285", + "$id": "313", "kind": "client", "name": "IntsOnly", "namespace": "Type.Union", "doc": "Describe union of integer 1 | 2 | 3", "methods": [ { - "$id": "286", + "$id": "314", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "287", + "$id": "315", "name": "get", "resourceName": "IntsOnly", "accessibility": "public", "parameters": [ { - "$id": "288", + "$id": "316", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "289", - "kind": "constant", - "valueType": { - "$id": "290", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -2607,12 +2889,12 @@ ], "responses": [ { - "$id": "291", + "$id": "317", "statusCodes": [ 200 ], "bodyType": { - "$ref": "78" + "$ref": "128" }, "headers": [], "isErrorResponse": false, @@ -2632,11 +2914,11 @@ }, "parameters": [ { - "$id": "292", + "$id": "318", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "289" + "$ref": "76" }, "location": "Header", "isApiVersion": false, @@ -2650,9 +2932,9 @@ } ], "response": { - "$id": "293", + "$id": "319", "type": { - "$ref": "78" + "$ref": "128" } }, "isOverride": false, @@ -2661,34 +2943,24 @@ "crossLanguageDefinitionId": "Type.Union.IntsOnly.get" }, { - "$id": "294", + "$id": "320", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "295", + "$id": "321", "name": "send", "resourceName": "IntsOnly", "accessibility": "public", "parameters": [ { - "$id": "296", + "$id": "322", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "297", - "kind": "constant", - "valueType": { - "$id": "298", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -2701,11 +2973,11 @@ "skipUrlEncoding": false }, { - "$id": "299", + "$id": "323", "name": "sendRequest3", "nameInRequest": "sendRequest3", "type": { - "$ref": "82" + "$ref": "132" }, "location": "Body", "isApiVersion": false, @@ -2720,7 +2992,7 @@ ], "responses": [ { - "$id": "300", + "$id": "324", "statusCodes": [ 204 ], @@ -2742,7 +3014,7 @@ }, "parameters": [ { - "$id": "301", + "$id": "325", "name": "prop", "nameInRequest": "prop", "type": { @@ -2759,12 +3031,12 @@ "skipUrlEncoding": false }, { - "$id": "302", + "$id": "326", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "297" + "$ref": "78" }, "location": "Header", "isApiVersion": false, @@ -2778,7 +3050,7 @@ } ], "response": { - "$id": "303" + "$id": "327" }, "isOverride": false, "generateConvenient": true, @@ -2788,12 +3060,12 @@ ], "parameters": [ { - "$id": "304", + "$id": "328", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "305", + "$id": "329", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2807,9 +3079,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "306", + "$id": "330", "type": { - "$id": "307", + "$id": "331", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -2822,44 +3094,34 @@ "crossLanguageDefinitionId": "Type.Union.IntsOnly", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "308", + "$id": "332", "kind": "client", "name": "FloatsOnly", "namespace": "Type.Union", "doc": "Describe union of floats 1.1 | 2.2 | 3.3", "methods": [ { - "$id": "309", + "$id": "333", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "310", + "$id": "334", "name": "get", "resourceName": "FloatsOnly", "accessibility": "public", "parameters": [ { - "$id": "311", + "$id": "335", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "312", - "kind": "constant", - "valueType": { - "$id": "313", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -2874,12 +3136,12 @@ ], "responses": [ { - "$id": "314", + "$id": "336", "statusCodes": [ 200 ], "bodyType": { - "$ref": "86" + "$ref": "136" }, "headers": [], "isErrorResponse": false, @@ -2899,11 +3161,11 @@ }, "parameters": [ { - "$id": "315", + "$id": "337", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "312" + "$ref": "80" }, "location": "Header", "isApiVersion": false, @@ -2917,9 +3179,9 @@ } ], "response": { - "$id": "316", + "$id": "338", "type": { - "$ref": "86" + "$ref": "136" } }, "isOverride": false, @@ -2928,34 +3190,24 @@ "crossLanguageDefinitionId": "Type.Union.FloatsOnly.get" }, { - "$id": "317", + "$id": "339", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "318", + "$id": "340", "name": "send", "resourceName": "FloatsOnly", "accessibility": "public", "parameters": [ { - "$id": "319", + "$id": "341", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "320", - "kind": "constant", - "valueType": { - "$id": "321", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -2968,11 +3220,11 @@ "skipUrlEncoding": false }, { - "$id": "322", + "$id": "342", "name": "sendRequest4", "nameInRequest": "sendRequest4", "type": { - "$ref": "90" + "$ref": "140" }, "location": "Body", "isApiVersion": false, @@ -2987,7 +3239,7 @@ ], "responses": [ { - "$id": "323", + "$id": "343", "statusCodes": [ 204 ], @@ -3009,7 +3261,7 @@ }, "parameters": [ { - "$id": "324", + "$id": "344", "name": "prop", "nameInRequest": "prop", "type": { @@ -3026,12 +3278,12 @@ "skipUrlEncoding": false }, { - "$id": "325", + "$id": "345", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "320" + "$ref": "82" }, "location": "Header", "isApiVersion": false, @@ -3045,7 +3297,7 @@ } ], "response": { - "$id": "326" + "$id": "346" }, "isOverride": false, "generateConvenient": true, @@ -3055,12 +3307,12 @@ ], "parameters": [ { - "$id": "327", + "$id": "347", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "328", + "$id": "348", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3074,9 +3326,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "329", + "$id": "349", "type": { - "$id": "330", + "$id": "350", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3089,44 +3341,34 @@ "crossLanguageDefinitionId": "Type.Union.FloatsOnly", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "331", + "$id": "351", "kind": "client", "name": "ModelsOnly", "namespace": "Type.Union", "doc": "Describe union of models", "methods": [ { - "$id": "332", + "$id": "352", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "333", + "$id": "353", "name": "get", "resourceName": "ModelsOnly", "accessibility": "public", "parameters": [ { - "$id": "334", + "$id": "354", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "335", - "kind": "constant", - "valueType": { - "$id": "336", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -3141,12 +3383,12 @@ ], "responses": [ { - "$id": "337", + "$id": "355", "statusCodes": [ 200 ], "bodyType": { - "$ref": "94" + "$ref": "144" }, "headers": [], "isErrorResponse": false, @@ -3166,11 +3408,11 @@ }, "parameters": [ { - "$id": "338", + "$id": "356", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "335" + "$ref": "84" }, "location": "Header", "isApiVersion": false, @@ -3184,9 +3426,9 @@ } ], "response": { - "$id": "339", + "$id": "357", "type": { - "$ref": "94" + "$ref": "144" } }, "isOverride": false, @@ -3195,34 +3437,24 @@ "crossLanguageDefinitionId": "Type.Union.ModelsOnly.get" }, { - "$id": "340", + "$id": "358", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "341", + "$id": "359", "name": "send", "resourceName": "ModelsOnly", "accessibility": "public", "parameters": [ { - "$id": "342", + "$id": "360", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "343", - "kind": "constant", - "valueType": { - "$id": "344", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -3235,11 +3467,11 @@ "skipUrlEncoding": false }, { - "$id": "345", + "$id": "361", "name": "sendRequest5", "nameInRequest": "sendRequest5", "type": { - "$ref": "109" + "$ref": "159" }, "location": "Body", "isApiVersion": false, @@ -3254,7 +3486,7 @@ ], "responses": [ { - "$id": "346", + "$id": "362", "statusCodes": [ 204 ], @@ -3276,11 +3508,11 @@ }, "parameters": [ { - "$id": "347", + "$id": "363", "name": "prop", "nameInRequest": "prop", "type": { - "$ref": "96" + "$ref": "146" }, "location": "Body", "isApiVersion": false, @@ -3293,12 +3525,12 @@ "skipUrlEncoding": false }, { - "$id": "348", + "$id": "364", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "343" + "$ref": "86" }, "location": "Header", "isApiVersion": false, @@ -3312,7 +3544,7 @@ } ], "response": { - "$id": "349" + "$id": "365" }, "isOverride": false, "generateConvenient": true, @@ -3322,12 +3554,12 @@ ], "parameters": [ { - "$id": "350", + "$id": "366", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "351", + "$id": "367", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3341,9 +3573,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "352", + "$id": "368", "type": { - "$id": "353", + "$id": "369", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3356,44 +3588,34 @@ "crossLanguageDefinitionId": "Type.Union.ModelsOnly", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "354", + "$id": "370", "kind": "client", "name": "EnumsOnly", "namespace": "Type.Union", "doc": "Describe union of 2 different enums", "methods": [ { - "$id": "355", + "$id": "371", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "356", + "$id": "372", "name": "get", "resourceName": "EnumsOnly", "accessibility": "public", "parameters": [ { - "$id": "357", + "$id": "373", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "358", - "kind": "constant", - "valueType": { - "$id": "359", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -3408,12 +3630,12 @@ ], "responses": [ { - "$id": "360", + "$id": "374", "statusCodes": [ 200 ], "bodyType": { - "$ref": "113" + "$ref": "163" }, "headers": [], "isErrorResponse": false, @@ -3433,11 +3655,11 @@ }, "parameters": [ { - "$id": "361", + "$id": "375", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "358" + "$ref": "88" }, "location": "Header", "isApiVersion": false, @@ -3451,9 +3673,9 @@ } ], "response": { - "$id": "362", + "$id": "376", "type": { - "$ref": "113" + "$ref": "163" } }, "isOverride": false, @@ -3462,34 +3684,24 @@ "crossLanguageDefinitionId": "Type.Union.EnumsOnly.get" }, { - "$id": "363", + "$id": "377", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "364", + "$id": "378", "name": "send", "resourceName": "EnumsOnly", "accessibility": "public", "parameters": [ { - "$id": "365", + "$id": "379", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "366", - "kind": "constant", - "valueType": { - "$id": "367", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -3502,11 +3714,11 @@ "skipUrlEncoding": false }, { - "$id": "368", + "$id": "380", "name": "sendRequest6", "nameInRequest": "sendRequest6", "type": { - "$ref": "124" + "$ref": "174" }, "location": "Body", "isApiVersion": false, @@ -3521,7 +3733,7 @@ ], "responses": [ { - "$id": "369", + "$id": "381", "statusCodes": [ 204 ], @@ -3543,11 +3755,11 @@ }, "parameters": [ { - "$id": "370", + "$id": "382", "name": "prop", "nameInRequest": "prop", "type": { - "$ref": "115" + "$ref": "165" }, "location": "Body", "isApiVersion": false, @@ -3560,12 +3772,12 @@ "skipUrlEncoding": false }, { - "$id": "371", + "$id": "383", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "366" + "$ref": "90" }, "location": "Header", "isApiVersion": false, @@ -3579,7 +3791,7 @@ } ], "response": { - "$id": "372" + "$id": "384" }, "isOverride": false, "generateConvenient": true, @@ -3589,12 +3801,12 @@ ], "parameters": [ { - "$id": "373", + "$id": "385", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "374", + "$id": "386", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3608,9 +3820,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "375", + "$id": "387", "type": { - "$id": "376", + "$id": "388", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3623,44 +3835,34 @@ "crossLanguageDefinitionId": "Type.Union.EnumsOnly", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "377", + "$id": "389", "kind": "client", "name": "StringAndArray", "namespace": "Type.Union", "doc": "Describe union of a string and an array of strings", "methods": [ { - "$id": "378", + "$id": "390", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "379", + "$id": "391", "name": "get", "resourceName": "StringAndArray", "accessibility": "public", "parameters": [ { - "$id": "380", + "$id": "392", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "381", - "kind": "constant", - "valueType": { - "$id": "382", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -3675,12 +3877,12 @@ ], "responses": [ { - "$id": "383", + "$id": "393", "statusCodes": [ 200 ], "bodyType": { - "$ref": "128" + "$ref": "178" }, "headers": [], "isErrorResponse": false, @@ -3700,11 +3902,11 @@ }, "parameters": [ { - "$id": "384", + "$id": "394", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "381" + "$ref": "92" }, "location": "Header", "isApiVersion": false, @@ -3718,9 +3920,9 @@ } ], "response": { - "$id": "385", + "$id": "395", "type": { - "$ref": "128" + "$ref": "178" } }, "isOverride": false, @@ -3729,34 +3931,24 @@ "crossLanguageDefinitionId": "Type.Union.StringAndArray.get" }, { - "$id": "386", + "$id": "396", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "387", + "$id": "397", "name": "send", "resourceName": "StringAndArray", "accessibility": "public", "parameters": [ { - "$id": "388", + "$id": "398", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "389", - "kind": "constant", - "valueType": { - "$id": "390", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -3769,11 +3961,11 @@ "skipUrlEncoding": false }, { - "$id": "391", + "$id": "399", "name": "sendRequest7", "nameInRequest": "sendRequest7", "type": { - "$ref": "147" + "$ref": "197" }, "location": "Body", "isApiVersion": false, @@ -3788,7 +3980,7 @@ ], "responses": [ { - "$id": "392", + "$id": "400", "statusCodes": [ 204 ], @@ -3810,11 +4002,11 @@ }, "parameters": [ { - "$id": "393", + "$id": "401", "name": "prop", "nameInRequest": "prop", "type": { - "$ref": "130" + "$ref": "180" }, "location": "Body", "isApiVersion": false, @@ -3827,12 +4019,12 @@ "skipUrlEncoding": false }, { - "$id": "394", + "$id": "402", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "389" + "$ref": "94" }, "location": "Header", "isApiVersion": false, @@ -3846,7 +4038,7 @@ } ], "response": { - "$id": "395" + "$id": "403" }, "isOverride": false, "generateConvenient": true, @@ -3856,12 +4048,12 @@ ], "parameters": [ { - "$id": "396", + "$id": "404", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "397", + "$id": "405", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3875,9 +4067,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "398", + "$id": "406", "type": { - "$id": "399", + "$id": "407", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -3890,44 +4082,34 @@ "crossLanguageDefinitionId": "Type.Union.StringAndArray", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "400", + "$id": "408", "kind": "client", "name": "MixedLiterals", "namespace": "Type.Union", "doc": "Describe union of floats \"a\" | 2 | 3.3", "methods": [ { - "$id": "401", + "$id": "409", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "402", + "$id": "410", "name": "get", "resourceName": "MixedLiterals", "accessibility": "public", "parameters": [ { - "$id": "403", + "$id": "411", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "404", - "kind": "constant", - "valueType": { - "$id": "405", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -3942,12 +4124,12 @@ ], "responses": [ { - "$id": "406", + "$id": "412", "statusCodes": [ 200 ], "bodyType": { - "$ref": "151" + "$ref": "201" }, "headers": [], "isErrorResponse": false, @@ -3967,11 +4149,11 @@ }, "parameters": [ { - "$id": "407", + "$id": "413", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "404" + "$ref": "96" }, "location": "Header", "isApiVersion": false, @@ -3985,9 +4167,9 @@ } ], "response": { - "$id": "408", + "$id": "414", "type": { - "$ref": "151" + "$ref": "201" } }, "isOverride": false, @@ -3996,34 +4178,24 @@ "crossLanguageDefinitionId": "Type.Union.MixedLiterals.get" }, { - "$id": "409", + "$id": "415", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "410", + "$id": "416", "name": "send", "resourceName": "MixedLiterals", "accessibility": "public", "parameters": [ { - "$id": "411", + "$id": "417", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "412", - "kind": "constant", - "valueType": { - "$id": "413", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -4036,11 +4208,11 @@ "skipUrlEncoding": false }, { - "$id": "414", + "$id": "418", "name": "sendRequest8", "nameInRequest": "sendRequest8", "type": { - "$ref": "177" + "$ref": "219" }, "location": "Body", "isApiVersion": false, @@ -4055,7 +4227,7 @@ ], "responses": [ { - "$id": "415", + "$id": "419", "statusCodes": [ 204 ], @@ -4077,11 +4249,11 @@ }, "parameters": [ { - "$id": "416", + "$id": "420", "name": "prop", "nameInRequest": "prop", "type": { - "$ref": "153" + "$ref": "203" }, "location": "Body", "isApiVersion": false, @@ -4094,12 +4266,12 @@ "skipUrlEncoding": false }, { - "$id": "417", + "$id": "421", "name": "contentType", "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "412" + "$ref": "98" }, "location": "Header", "isApiVersion": false, @@ -4113,7 +4285,7 @@ } ], "response": { - "$id": "418" + "$id": "422" }, "isOverride": false, "generateConvenient": true, @@ -4123,12 +4295,12 @@ ], "parameters": [ { - "$id": "419", + "$id": "423", "name": "endpoint", "nameInRequest": "endpoint", "doc": "Service host", "type": { - "$id": "420", + "$id": "424", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -4142,9 +4314,9 @@ "explode": false, "kind": "Client", "defaultValue": { - "$id": "421", + "$id": "425", "type": { - "$id": "422", + "$id": "426", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" @@ -4157,44 +4329,34 @@ "crossLanguageDefinitionId": "Type.Union.MixedLiterals", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } }, { - "$id": "423", + "$id": "427", "kind": "client", "name": "MixedTypes", "namespace": "Type.Union", "doc": "Describe union of floats \"a\" | 2 | 3.3", "methods": [ { - "$id": "424", + "$id": "428", "kind": "basic", "name": "get", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "425", + "$id": "429", "name": "get", "resourceName": "MixedTypes", "accessibility": "public", "parameters": [ { - "$id": "426", + "$id": "430", "name": "accept", "nameInRequest": "Accept", "type": { - "$id": "427", - "kind": "constant", - "valueType": { - "$id": "428", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -4209,12 +4371,12 @@ ], "responses": [ { - "$id": "429", + "$id": "431", "statusCodes": [ 200 ], "bodyType": { - "$ref": "181" + "$ref": "223" }, "headers": [], "isErrorResponse": false, @@ -4234,11 +4396,11 @@ }, "parameters": [ { - "$id": "430", + "$id": "432", "name": "accept", "nameInRequest": "accept", "type": { - "$ref": "427" + "$ref": "100" }, "location": "Header", "isApiVersion": false, @@ -4252,9 +4414,9 @@ } ], "response": { - "$id": "431", + "$id": "433", "type": { - "$ref": "181" + "$ref": "223" } }, "isOverride": false, @@ -4263,34 +4425,24 @@ "crossLanguageDefinitionId": "Type.Union.MixedTypes.get" }, { - "$id": "432", + "$id": "434", "kind": "basic", "name": "send", "accessibility": "public", "apiVersions": [], "operation": { - "$id": "433", + "$id": "435", "name": "send", "resourceName": "MixedTypes", "accessibility": "public", "parameters": [ { - "$id": "434", + "$id": "436", "name": "contentType", "nameInRequest": "Content-Type", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$id": "435", - "kind": "constant", - "valueType": { - "$id": "436", - "kind": "string", - "name": "string", - "crossLanguageDefinitionId": "TypeSpec.string", - "decorators": [] - }, - "value": "application/json", - "decorators": [] + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -4307,7 +4459,7 @@ "name": "sendRequest9", "nameInRequest": "sendRequest9", "type": { - "$ref": "207" + "$ref": "247" }, "location": "Body", "isApiVersion": false, @@ -4348,7 +4500,7 @@ "name": "prop", "nameInRequest": "prop", "type": { - "$ref": "183" + "$ref": "225" }, "location": "Body", "isApiVersion": false, @@ -4366,7 +4518,7 @@ "nameInRequest": "contentType", "doc": "Body parameter's content type. Known values are application/json", "type": { - "$ref": "435" + "$ref": "102" }, "location": "Header", "isApiVersion": false, @@ -4424,7 +4576,7 @@ "crossLanguageDefinitionId": "Type.Union.MixedTypes", "apiVersions": [], "parent": { - "$ref": "211" + "$ref": "251" } } ] diff --git a/eng/packages/http-client-csharp/package-lock.json b/eng/packages/http-client-csharp/package-lock.json index aa06db142e8c..038265d29f7b 100644 --- a/eng/packages/http-client-csharp/package-lock.json +++ b/eng/packages/http-client-csharp/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250509.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250522.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.17", @@ -2314,9 +2314,9 @@ } }, "node_modules/@typespec/http-client-csharp": { - "version": "1.0.0-alpha.20250509.1", - "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250509.1.tgz", - "integrity": "sha512-O6fVeLEivLBDtLP+87ZTm5GU1bQuaLJ2aekTzb3W4VwKgAvXu3dbwc9czloVQ7pa+HBCMTQ8REtZUln0tNdnrg==", + "version": "1.0.0-alpha.20250522.1", + "resolved": "https://registry.npmjs.org/@typespec/http-client-csharp/-/http-client-csharp-1.0.0-alpha.20250522.1.tgz", + "integrity": "sha512-IvF7OSzv3NwzQmJvfANn5LL7kDqjuBYYYb7XtdUW9cYlW5PxF3pV3uGIRC1NKmCabj1WA020RPcVzpalKyPkiw==", "license": "MIT", "dependencies": { "json-serialize-refs": "0.1.0-0" diff --git a/eng/packages/http-client-csharp/package.json b/eng/packages/http-client-csharp/package.json index 9158ce98bbc4..9e39d503cdd4 100644 --- a/eng/packages/http-client-csharp/package.json +++ b/eng/packages/http-client-csharp/package.json @@ -38,7 +38,7 @@ "dist/generator/**" ], "dependencies": { - "@typespec/http-client-csharp": "1.0.0-alpha.20250509.1" + "@typespec/http-client-csharp": "1.0.0-alpha.20250522.1" }, "devDependencies": { "@azure-tools/azure-http-specs": "0.1.0-alpha.17", diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 3e95fd6f0633..44979aacc793 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -104,7 +104,10 @@ extends: ServiceDirectory: ${{ parameters.ServiceDirectory }} DependsOn: - Build - Artifacts: ${{ parameters.Artifacts }} + Artifacts: + - ${{ each artifact in parameters.Artifacts }}: + - ${{ if ne(artifact.createReleaseStage, 'false') }}: + - ${{ artifact }} ${{ if eq(parameters.ServiceDirectory, 'template') }}: TestPipeline: true ArtifactName: packages diff --git a/eng/pipelines/templates/variables/globals.yml b/eng/pipelines/templates/variables/globals.yml index e11db6a426c9..fbe47906a123 100644 --- a/eng/pipelines/templates/variables/globals.yml +++ b/eng/pipelines/templates/variables/globals.yml @@ -22,5 +22,5 @@ variables: AdditionalTestFilters: "Placeholder!=DefaultIgnoreMe" # Docs publishing variables for repo/owner - DocRepoOwner: 'Azure' + DocRepoOwner: 'MicrosoftDocs' DocRepoName: 'azure-docs-sdk-dotnet' diff --git a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/MetadataEntityResource.Serialization.cs b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/MetadataEntityResource.Serialization.cs index 02b17ac159a1..42ca20c6fa1a 100644 --- a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/MetadataEntityResource.Serialization.cs +++ b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/MetadataEntityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Advisor { public partial class MetadataEntityResource : IJsonModel { + private static MetadataEntityData s_dataDeserializationInstance; + private static MetadataEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MetadataEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MetadataEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAdvisorContext.Default); MetadataEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAdvisorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/ResourceRecommendationBaseResource.Serialization.cs b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/ResourceRecommendationBaseResource.Serialization.cs index d0bd61cfac91..3eeca7b4e573 100644 --- a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/ResourceRecommendationBaseResource.Serialization.cs +++ b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/ResourceRecommendationBaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Advisor { public partial class ResourceRecommendationBaseResource : IJsonModel { + private static ResourceRecommendationBaseData s_dataDeserializationInstance; + private static ResourceRecommendationBaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceRecommendationBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceRecommendationBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAdvisorContext.Default); ResourceRecommendationBaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAdvisorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/SuppressionContractResource.Serialization.cs b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/SuppressionContractResource.Serialization.cs index 7c2d79e920cb..02fab453c97a 100644 --- a/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/SuppressionContractResource.Serialization.cs +++ b/sdk/advisor/Azure.ResourceManager.Advisor/src/Generated/SuppressionContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Advisor { public partial class SuppressionContractResource : IJsonModel { + private static SuppressionContractData s_dataDeserializationInstance; + private static SuppressionContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SuppressionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SuppressionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAdvisorContext.Default); SuppressionContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAdvisorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.Serialization.cs b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.Serialization.cs index a689bf1b95d5..2849d1f0cddf 100644 --- a/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.Serialization.cs +++ b/sdk/agricultureplatform/Azure.ResourceManager.AgriculturePlatform/src/Generated/AgricultureServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgriculturePlatform { public partial class AgricultureServiceResource : IJsonModel { + private static AgricultureServiceData s_dataDeserializationInstance; + private static AgricultureServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AgricultureServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AgricultureServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgriculturePlatformContext.Default); AgricultureServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgriculturePlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateEndpointConnectionResource.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateEndpointConnectionResource.Serialization.cs index 6520a2e413ea..30e7377cde7b 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgFoodPlatform { public partial class AgFoodPlatformPrivateEndpointConnectionResource : IJsonModel { + private static AgFoodPlatformPrivateEndpointConnectionData s_dataDeserializationInstance; + private static AgFoodPlatformPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AgFoodPlatformPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AgFoodPlatformPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgFoodPlatformContext.Default); AgFoodPlatformPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgFoodPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateLinkResource.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateLinkResource.Serialization.cs index 59b06fc84b78..2af8b5122a62 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateLinkResource.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/AgFoodPlatformPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgFoodPlatform { public partial class AgFoodPlatformPrivateLinkResource : IJsonModel { + private static AgFoodPlatformPrivateLinkResourceData s_dataDeserializationInstance; + private static AgFoodPlatformPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AgFoodPlatformPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AgFoodPlatformPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgFoodPlatformContext.Default); AgFoodPlatformPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgFoodPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionResource.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionResource.Serialization.cs index 7b7d6e83f020..439f112e764e 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionResource.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/ExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgFoodPlatform { public partial class ExtensionResource : IJsonModel { + private static ExtensionData s_dataDeserializationInstance; + private static ExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgFoodPlatformContext.Default); ExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgFoodPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatResource.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatResource.Serialization.cs index 306429e6d4b8..ac5924faf0fa 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatResource.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgFoodPlatform { public partial class FarmBeatResource : IJsonModel { + private static FarmBeatData s_dataDeserializationInstance; + private static FarmBeatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FarmBeatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FarmBeatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgFoodPlatformContext.Default); FarmBeatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgFoodPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatsExtensionResource.Serialization.cs b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatsExtensionResource.Serialization.cs index ca82a359ef0e..4225b741f752 100644 --- a/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatsExtensionResource.Serialization.cs +++ b/sdk/agrifood/Azure.ResourceManager.AgFoodPlatform/src/Generated/FarmBeatsExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AgFoodPlatform { public partial class FarmBeatsExtensionResource : IJsonModel { + private static FarmBeatsExtensionData s_dataDeserializationInstance; + private static FarmBeatsExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FarmBeatsExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FarmBeatsExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAgFoodPlatformContext.Default); FarmBeatsExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAgFoodPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md b/sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md index 963104bd0160..d0e2114ba242 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.0.0-beta.2 (Unreleased) +## 1.1.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,29 @@ ### Other Changes +## 1.1.0-beta.1 (2025-05-21) + +### Features Added +- Set API version to 2025-05-15-preview. +- Added Bing Custom search tool. +- Added Sharepoint grounding tool. +- Added Microsoft Fabric tool. + +## 1.0.0 (2025-05-15) + +### Features Added +- First stable release of Azure AI Agents Persistent client library. + +## 1.0.0-beta.2 (2025-05-14) + +### Breaking Changes +- ThreadRunSteps methods were moved to Runs. +- VectorStoreFileBatches and VectorStoreFiles methods were moved to VectorStores. +- The AzureAISearchResource was replaced by AzureAISearchToolResource. + +### Sample updates +- Added sample demonstrating uploading single file to vector store and listing run steps. + ## 1.0.0-beta.1 (2025-05-09) ### Features Added diff --git a/sdk/ai/Azure.AI.Agents.Persistent/README.md b/sdk/ai/Azure.AI.Agents.Persistent/README.md index 41e39372e568..426a44f9cc9a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/README.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/README.md @@ -2,7 +2,10 @@ Use the AI Agents client library to: -* **Develop Agents using the Azure AI Agents Service**, leveraging an extensive ecosystem of models, tools, and capabilities from OpenAI, Microsoft, and other LLM providers. The Azure AI Agents Service enables the building of Agents for a wide range of generative AI use cases. The package is currently in preview. +* **Develop Agents using the Azure AI Agents Service**, leveraging an extensive ecosystem of models, tools, and capabilities from OpenAI, Microsoft, and other LLM providers. The Azure AI Agents Service enables the building of Agents for a wide range of generative AI use cases. +* **Note:** While this package can be used independently, we recommend using the Azure AI Projects client library (Azure.AI.Projects) for an enhanced experience. +The Projects library provides simplified access to advanced functionality, such as creating and managing agents, enumerating AI models, working with datasets and +managing search indexes, evaluating generative AI performance, and enabling OpenTelemetry tracing. [Product documentation][product_doc] | [Samples][samples] @@ -318,10 +321,11 @@ To enable your Agent to perform search through Bing search API, you use `BingGro Here is an example: ```C# Snippet:AgentsBingGrounding_GetConnection -BingGroundingSearchConfigurationList configurationList = new( - [new BingGroundingSearchConfiguration(connectionId)] +BingGroundingToolDefinition bingGroundingTool = new( + new BingGroundingSearchToolParameters( + [new BingGroundingSearchConfiguration(connectionId)] + ) ); -BingGroundingToolDefinition bingGroundingTool = new(configurationList); ``` ```C# Snippet:AgentsBingGroundingAsync_CreateAgent PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( @@ -908,8 +912,8 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [RequestFailedException]: https://learn.microsoft.com/dotnet/api/azure.requestfailedexception?view=azure-dotnet [samples]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples -[api_ref_docs]: https://learn.microsoft.com/dotnet/api/azure.ai.projects?view=azure-dotnet-preview -[nuget]: https://www.nuget.org/packages/Azure.AI.Projects +[api_ref_docs]: https://learn.microsoft.com/dotnet/api/overview/azure/ai.agents.persistent-readme +[nuget]: https://www.nuget.org/packages/Azure.AI.Agents.Persistent/ [source_code]: https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent [product_doc]: https://learn.microsoft.com/azure/ai-studio/ [azure_identity]: https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet diff --git a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs index d2062ef40320..7dbff5b0db16 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs @@ -121,6 +121,44 @@ 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 BingCustomSearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchConfiguration(string connectionId, string instanceName) { } + public string ConnectionId { get { throw null; } set { } } + public long? Count { get { throw null; } set { } } + public string Freshness { get { throw null; } set { } } + public string InstanceName { get { throw null; } set { } } + public string Market { get { throw null; } set { } } + public string SetLang { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BingCustomSearchToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchToolDefinition(Azure.AI.Agents.Persistent.BingCustomSearchToolParameters bingCustomSearch) { } + public Azure.AI.Agents.Persistent.BingCustomSearchToolParameters BingCustomSearch { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BingCustomSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } + public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BingGroundingSearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BingGroundingSearchConfiguration(string connectionId) { } @@ -136,21 +174,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 BingGroundingSearchConfigurationList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class BingGroundingSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingSearchConfigurationList(System.Collections.Generic.IEnumerable searchConfigurations) { } + public BingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class BingGroundingToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList bingGrounding) { } - public Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList BingGrounding { get { throw null; } set { } } + public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters bingGrounding) { } + public Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Agents.Persistent.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -238,6 +276,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.Persistent.ErrorEvent left, Azure.AI.Agents.Persistent.ErrorEvent right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricDataAgentToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FabricDataAgentToolParameters() { } + public System.Collections.Generic.IList ConnectionList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.FabricDataAgentToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.FabricDataAgentToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FileSearchRankingOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileSearchRankingOptions(string ranker, float scoreThreshold) { } @@ -896,6 +945,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 MicrosoftFabricToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MicrosoftFabricToolDefinition(Azure.AI.Agents.Persistent.FabricDataAgentToolParameters fabricDataagent) { } + public Azure.AI.Agents.Persistent.FabricDataAgentToolParameters FabricDataagent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class OpenApiAnonymousAuthDetails : Azure.AI.Agents.Persistent.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenApiAnonymousAuthDetails() { } @@ -1034,10 +1094,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PersistentAgentFilePurpose(string value) { throw null; } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Agents { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose AgentsOutput { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Batch { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose BatchOutput { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose FineTune { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose FineTuneResults { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Vision { get { throw null; } } public bool Equals(Azure.AI.Agents.Persistent.PersistentAgentFilePurpose other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1080,11 +1136,12 @@ public PersistentAgentsAdministrationClient(System.Uri endpoint, Azure.Core.Toke } public partial class PersistentAgentsAdministrationClientOptions : Azure.Core.ClientOptions { - public PersistentAgentsAdministrationClientOptions(Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion version = Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion.V1) { } + public PersistentAgentsAdministrationClientOptions(Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion version = Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion.V2025_05_15_Preview) { } public enum ServiceVersion { V2025_05_01 = 1, V1 = 2, + V2025_05_15_Preview = 3, } } public partial class PersistentAgentsClient @@ -1183,6 +1240,7 @@ public static partial class PersistentAgentsModelFactory public static Azure.AI.Agents.Persistent.RunError RunError(string code = null, string message = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStep RunStep(string id = null, Azure.AI.Agents.Persistent.RunStepType type = default(Azure.AI.Agents.Persistent.RunStepType), string agentId = null, string threadId = null, string runId = null, Azure.AI.Agents.Persistent.RunStepStatus status = default(Azure.AI.Agents.Persistent.RunStepStatus), Azure.AI.Agents.Persistent.RunStepDetails stepDetails = null, Azure.AI.Agents.Persistent.RunStepError lastError = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiredAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Agents.Persistent.RunStepCompletionUsage usage = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary azureAISearch = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall RunStepBingCustomSearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingCustomSearch = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingGrounding = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageReference image = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) { throw null; } @@ -1211,7 +1269,9 @@ public static partial class PersistentAgentsModelFactory public static Azure.AI.Agents.Persistent.RunStepFunctionToolCall RunStepFunctionToolCall(string id, string name, string arguments) { throw null; } public static Azure.AI.Agents.Persistent.RunStepMessageCreationDetails RunStepMessageCreationDetails(Azure.AI.Agents.Persistent.RunStepMessageCreationReference messageCreation = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary microsoftFabric = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepOpenAPIToolCall RunStepOpenAPIToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary openAPI = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary sharePoint = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepToolCall RunStepToolCall(string type = null, string id = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepToolCallDetails RunStepToolCallDetails(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } public static Azure.AI.Agents.Persistent.SubmitToolOutputsAction SubmitToolOutputsAction(System.Collections.Generic.IEnumerable toolCalls) { throw null; } @@ -1245,10 +1305,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PersistentAgentsNamedToolChoiceType(string value) { throw null; } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType AzureAISearch { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingCustomSearch { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingGrounding { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType CodeInterpreter { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType ConnectedAgent { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType FileSearch { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType Function { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType MicrosoftFabric { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType Sharepoint { get { throw null; } } public bool Equals(Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1609,6 +1672,17 @@ 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 RunStepBingCustomSearchToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepBingCustomSearchToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary BingCustomSearch { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RunStepBingGroundingToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RunStepBingGroundingToolCall() : base (default(string)) { } @@ -2011,6 +2085,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 RunStepMicrosoftFabricToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepMicrosoftFabricToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary MicrosoftFabric { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RunStepOpenAPIToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RunStepOpenAPIToolCall() : base (default(string)) { } @@ -2022,6 +2107,17 @@ 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 RunStepSharepointToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepSharepointToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary SharePoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepSharepointToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepSharepointToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 RunStepStatus : System.IEquatable { @@ -2140,6 +2236,28 @@ public partial class RunUpdate : Azure.AI.Agents.Persistent.StreamingUpdate, System.ClientModel.Primitives.IPersistableModel + { + public SharepointGroundingToolParameters() { } + public System.Collections.Generic.IList ConnectionList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointGroundingToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointGroundingToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SharepointToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharepointToolDefinition(Azure.AI.Agents.Persistent.SharepointGroundingToolParameters sharepointGrounding) { } + public Azure.AI.Agents.Persistent.SharepointGroundingToolParameters SharepointGrounding { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 StreamingUpdate { internal StreamingUpdate() { } @@ -2386,6 +2504,17 @@ internal ThreadUpdate() { } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public Azure.AI.Agents.Persistent.ToolResources ToolResources { get { throw null; } } } + public partial class ToolConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConnection(string connectionId) { } + public string ConnectionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.ToolConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.ToolConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ToolDefinition() { } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs index d2062ef40320..7dbff5b0db16 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs @@ -121,6 +121,44 @@ 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 BingCustomSearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchConfiguration(string connectionId, string instanceName) { } + public string ConnectionId { get { throw null; } set { } } + public long? Count { get { throw null; } set { } } + public string Freshness { get { throw null; } set { } } + public string InstanceName { get { throw null; } set { } } + public string Market { get { throw null; } set { } } + public string SetLang { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BingCustomSearchToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchToolDefinition(Azure.AI.Agents.Persistent.BingCustomSearchToolParameters bingCustomSearch) { } + public Azure.AI.Agents.Persistent.BingCustomSearchToolParameters BingCustomSearch { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BingCustomSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } + public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingCustomSearchToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class BingGroundingSearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BingGroundingSearchConfiguration(string connectionId) { } @@ -136,21 +174,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 BingGroundingSearchConfigurationList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class BingGroundingSearchToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingSearchConfigurationList(System.Collections.Generic.IEnumerable searchConfigurations) { } + public BingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations) { } public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class BingGroundingToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList bingGrounding) { } - public Azure.AI.Agents.Persistent.BingGroundingSearchConfigurationList BingGrounding { get { throw null; } set { } } + public BingGroundingToolDefinition(Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters bingGrounding) { } + public Azure.AI.Agents.Persistent.BingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Agents.Persistent.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -238,6 +276,17 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Agents.Persistent.ErrorEvent left, Azure.AI.Agents.Persistent.ErrorEvent right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricDataAgentToolParameters : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FabricDataAgentToolParameters() { } + public System.Collections.Generic.IList ConnectionList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.FabricDataAgentToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.FabricDataAgentToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FileSearchRankingOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileSearchRankingOptions(string ranker, float scoreThreshold) { } @@ -896,6 +945,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 MicrosoftFabricToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MicrosoftFabricToolDefinition(Azure.AI.Agents.Persistent.FabricDataAgentToolParameters fabricDataagent) { } + public Azure.AI.Agents.Persistent.FabricDataAgentToolParameters FabricDataagent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class OpenApiAnonymousAuthDetails : Azure.AI.Agents.Persistent.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public OpenApiAnonymousAuthDetails() { } @@ -1034,10 +1094,6 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PersistentAgentFilePurpose(string value) { throw null; } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Agents { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose AgentsOutput { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Batch { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose BatchOutput { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose FineTune { get { throw null; } } - public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose FineTuneResults { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentFilePurpose Vision { get { throw null; } } public bool Equals(Azure.AI.Agents.Persistent.PersistentAgentFilePurpose other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1080,11 +1136,12 @@ public PersistentAgentsAdministrationClient(System.Uri endpoint, Azure.Core.Toke } public partial class PersistentAgentsAdministrationClientOptions : Azure.Core.ClientOptions { - public PersistentAgentsAdministrationClientOptions(Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion version = Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion.V1) { } + public PersistentAgentsAdministrationClientOptions(Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion version = Azure.AI.Agents.Persistent.PersistentAgentsAdministrationClientOptions.ServiceVersion.V2025_05_15_Preview) { } public enum ServiceVersion { V2025_05_01 = 1, V1 = 2, + V2025_05_15_Preview = 3, } } public partial class PersistentAgentsClient @@ -1183,6 +1240,7 @@ public static partial class PersistentAgentsModelFactory public static Azure.AI.Agents.Persistent.RunError RunError(string code = null, string message = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStep RunStep(string id = null, Azure.AI.Agents.Persistent.RunStepType type = default(Azure.AI.Agents.Persistent.RunStepType), string agentId = null, string threadId = null, string runId = null, Azure.AI.Agents.Persistent.RunStepStatus status = default(Azure.AI.Agents.Persistent.RunStepStatus), Azure.AI.Agents.Persistent.RunStepDetails stepDetails = null, Azure.AI.Agents.Persistent.RunStepError lastError = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiredAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Agents.Persistent.RunStepCompletionUsage usage = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary azureAISearch = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall RunStepBingCustomSearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingCustomSearch = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingGrounding = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageReference image = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) { throw null; } @@ -1211,7 +1269,9 @@ public static partial class PersistentAgentsModelFactory public static Azure.AI.Agents.Persistent.RunStepFunctionToolCall RunStepFunctionToolCall(string id, string name, string arguments) { throw null; } public static Azure.AI.Agents.Persistent.RunStepMessageCreationDetails RunStepMessageCreationDetails(Azure.AI.Agents.Persistent.RunStepMessageCreationReference messageCreation = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary microsoftFabric = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepOpenAPIToolCall RunStepOpenAPIToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary openAPI = null) { throw null; } + public static Azure.AI.Agents.Persistent.RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary sharePoint = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepToolCall RunStepToolCall(string type = null, string id = null) { throw null; } public static Azure.AI.Agents.Persistent.RunStepToolCallDetails RunStepToolCallDetails(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } public static Azure.AI.Agents.Persistent.SubmitToolOutputsAction SubmitToolOutputsAction(System.Collections.Generic.IEnumerable toolCalls) { throw null; } @@ -1245,10 +1305,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public PersistentAgentsNamedToolChoiceType(string value) { throw null; } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType AzureAISearch { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingCustomSearch { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType BingGrounding { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType CodeInterpreter { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType ConnectedAgent { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType FileSearch { get { throw null; } } public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType Function { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType MicrosoftFabric { get { throw null; } } + public static Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType Sharepoint { get { throw null; } } public bool Equals(Azure.AI.Agents.Persistent.PersistentAgentsNamedToolChoiceType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1609,6 +1672,17 @@ 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 RunStepBingCustomSearchToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepBingCustomSearchToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary BingCustomSearch { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepBingCustomSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RunStepBingGroundingToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RunStepBingGroundingToolCall() : base (default(string)) { } @@ -2011,6 +2085,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 RunStepMicrosoftFabricToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepMicrosoftFabricToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary MicrosoftFabric { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class RunStepOpenAPIToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal RunStepOpenAPIToolCall() : base (default(string)) { } @@ -2022,6 +2107,17 @@ 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 RunStepSharepointToolCall : Azure.AI.Agents.Persistent.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RunStepSharepointToolCall() : base (default(string)) { } + public System.Collections.Generic.IReadOnlyDictionary SharePoint { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepSharepointToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.RunStepSharepointToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 RunStepStatus : System.IEquatable { @@ -2140,6 +2236,28 @@ public partial class RunUpdate : Azure.AI.Agents.Persistent.StreamingUpdate, System.ClientModel.Primitives.IPersistableModel + { + public SharepointGroundingToolParameters() { } + public System.Collections.Generic.IList ConnectionList { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointGroundingToolParameters System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointGroundingToolParameters System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SharepointToolDefinition : Azure.AI.Agents.Persistent.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SharepointToolDefinition(Azure.AI.Agents.Persistent.SharepointGroundingToolParameters sharepointGrounding) { } + public Azure.AI.Agents.Persistent.SharepointGroundingToolParameters SharepointGrounding { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.SharepointToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 StreamingUpdate { internal StreamingUpdate() { } @@ -2386,6 +2504,17 @@ internal ThreadUpdate() { } public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public Azure.AI.Agents.Persistent.ToolResources ToolResources { get { throw null; } } } + public partial class ToolConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConnection(string connectionId) { } + public string ConnectionId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.ToolConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Agents.Persistent.ToolConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { protected ToolDefinition() { } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/assets.json b/sdk/ai/Azure.AI.Agents.Persistent/assets.json index 0484cf633e3c..e3afe0f5fd16 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_e3d96c97a9" + "Tag": "net/ai/Azure.AI.Agents.Persistent_84d6bda56b" } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/README.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/README.md index b316fa79c54a..1c2bbce40e49 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/samples/README.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/README.md @@ -31,4 +31,6 @@ description: Samples for the Azure.AI.Agents.Persistent client library. | [Sample16_PersistentAgents_Azure_AI_Search_Streaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample16_PersistentAgents_Azure_AI_Search_Streaming.md) | Sample using agents with Azure AI Search tool with streaming. | | [Sample17_PersistentAgents_ImageUrlInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample17_PersistentAgents_ImageUrlInputs.md) | Sample using agents with Image URL as an input. | | [Sample18_PersistentAgents_ImageFileInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample18_PersistentAgents_ImageFileInputs.md) | Sample using agents with Image Fileas an input. | +| [Sample19_PersistentAgents_VectorStoreFile_WithSteps](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample19_PersistentAgents_VectorStoreFile_WithSteps.md) | Sample file search using `VectorStoreFile` and agents. | + diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample19_PersistentAgents_VectorStoreFile_WithSteps.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample19_PersistentAgents_VectorStoreFile_WithSteps.md new file mode 100644 index 000000000000..7a2c269e9223 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample19_PersistentAgents_VectorStoreFile_WithSteps.md @@ -0,0 +1,283 @@ +# Sample file search using `VectorStoreFile` and agents in Azure.AI.Agents.Persistent. + +This example demonstrates how to use a local file with a vector store and Agents in Azure.AI.Agents.Persistent. You will upload a file, add its file ID to a new vector store, and then examine the run steps performed by the Agent. +1. Begin by creating the Agent client and reading the required environment variables. + +```C# Snippet:PersistentAgents_VectorStoreFileSearch_CreateClient +var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); +``` + +2. Write a sample file to disk and upload it to the data store. Store the uploaded file's ID and name in a dictionary for later reference. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_FilesToUse_Sync +// Upload a file and wait for it to be processed +System.IO.File.WriteAllText( + path: "sample_file_for_upload.txt", + contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); +PersistentAgentFileInfo uploadedAgentFile = client.Files.UploadFile( + filePath: "sample_file_for_upload.txt", + purpose: PersistentAgentFilePurpose.Agents); +Dictionary fileIds = new() +{ + { uploadedAgentFile.Id, uploadedAgentFile.Filename } +}; +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_FilesToUse_Async +// Upload a file and wait for it to be processed +System.IO.File.WriteAllText( + path: "sample_file_for_upload.txt", + contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); +PersistentAgentFileInfo uploadedAgentFile = await client.Files.UploadFileAsync( + filePath: "sample_file_for_upload.txt", + purpose: PersistentAgentFilePurpose.Agents); +Dictionary fileIds = new() +{ + { uploadedAgentFile.Id, uploadedAgentFile.Filename } +}; +``` + +3. Create a new vector store and add the uploaded file's ID to it. This enables the Agent to search the file's contents. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_VectorStore_Sync +// Create a vector store with the file and wait for it to be processed. +// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active +PersistentAgentsVectorStore vectorStore = client.VectorStores.CreateVectorStore( + name: "my_vector_store"); +// Add file ID to vector store. +VectorStoreFile vctFile = client.VectorStores.CreateVectorStoreFile( + vectorStoreId: vectorStore.Id, + fileId: uploadedAgentFile.Id +); +Console.WriteLine($"Added file to vector store. The id file in the vector store is {vctFile.Id}."); +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_VectorStore_Async +// Create a vector store. +// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active +PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync( + name: "my_vector_store"); +// Add file ID to vector store. +VectorStoreFile vctFile = await client.VectorStores.CreateVectorStoreFileAsync( + vectorStoreId: vectorStore.Id, + fileId: uploadedAgentFile.Id +); +Console.WriteLine($"Added file to vector store. The id file in the vector store is {vctFile.Id}."); +``` + +4. Create a `FileSearchToolResource` and add the vector store's ID. Use this resource when creating the Agent, so it can access the file search capability. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_CreateAgent_Sync +FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); +fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); + +// Create an Agent with toolResources and process Agent run +PersistentAgent agent = client.Administration.CreateAgent( + model: modelDeploymentName, + name: "SDK Test Agent - Retrieval", + instructions: "You are a helpful agent that can help fetch data from files you know about.", + tools: new List { new FileSearchToolDefinition() }, + toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_CreateAgent_Async +FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); +fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); + +// Create an Agent with toolResources and process Agent run +PersistentAgent agent = await client.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "SDK Test Agent - Retrieval", + instructions: "You are a helpful agent that can help fetch data from files you know about.", + tools: new List { new FileSearchToolDefinition() }, + toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); +``` + +5. To display file names instead of IDs in Agent responses, use a helper method to replace reference placeholders with the actual file names. + +```C# Snippet:PersistentAgents_VectorStoreFileSearch_Print +private static void WriteMessages(IEnumerable messages, Dictionary fileIds) +{ + foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) + { + string strMessage = textItem.Text; + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextFilePathAnnotation pathAnnotation) + { + strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); + } + else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) + { + strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); + } + } + Console.Write(strMessage); + } + else + { + Console.Write(textItem.Text); + } + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" fileIds, string fileID, string placeholder, string text) +{ + if (fileIds.TryGetValue(fileID, out string replacement)) + return text.Replace(placeholder, $" [{replacement}]"); + else + return text.Replace(placeholder, $" [{fileID}]"); +} +``` + +6. Start a new thread, send a question to the Agent about the file's contents, and create a run. Wait for the run to complete, then display the Agent's response, including file references. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_CreateThreadAndRun_Sync +// Create thread for communication +PersistentAgentThread thread = client.Threads.CreateThread(); + +// Create message to thread +PersistentThreadMessage messageResponse = client.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "Can you give me the documented codes for 'banana' and 'orange'?"); + +// Run the Agent +ThreadRun run = client.Runs.CreateRun(thread, agent); + +do +{ + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = client.Runs.GetRun(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +Pageable messages = client.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending +); +WriteMessages(messages, fileIds); +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_CreateThreadAndRun_Async +// Create thread for communication +PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); + +// Create message to thread +PersistentThreadMessage messageResponse = await client.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "Can you give me the documented codes for 'banana' and 'orange'?"); + +// Run the Agent +ThreadRun run = await client.Runs.CreateRunAsync(thread, agent); + +do +{ + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await client.Runs.GetRunAsync(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); +List messages = await client.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending +).ToListAsync(); +WriteMessages(messages, fileIds); +``` + +7. Use a helper function to print detailed information about each run step, such as message creation or tool calls, including any file search results. + +```C# Snippet:PersistentAgents_VectorStoreFileSearch_PrintSteps +private static void printRunStepInfo(RunStep step) +{ + if (step.StepDetails is RunStepMessageCreationDetails messageCreationDetails) + { + Console.WriteLine($"Message creation step: messageID {messageCreationDetails.MessageCreation.MessageId}"); + } + else if (step.StepDetails is RunStepToolCallDetails toolCallDetails) + { + Console.WriteLine($"Tool call step: Tool count: {toolCallDetails.ToolCalls.Count}; First tool {toolCallDetails.ToolCalls.First().Type}"); + if (toolCallDetails.ToolCalls[0] is RunStepFileSearchToolCall fileSearch) + { + Console.WriteLine($"\tFile search returned {fileSearch.FileSearch.Results.Count} result(s)."); + if (fileSearch.FileSearch.Results.Count > 0) + { + Console.WriteLine($"\t\tFound result in file {fileSearch.FileSearch.Results[0].FileName}"); + } + } + } + else + { + Console.WriteLine(step.RunId); + } +} +``` + +8. Iterate through all run steps to review the Agent's actions and outputs. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_ShowRunSteps_Sync +foreach (RunStep step in client.Runs.GetRunSteps(run)) +{ + printRunStepInfo(step); +} +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_ShowRunSteps_Async +await foreach (RunStep step in client.Runs.GetRunStepsAsync(run)) +{ + printRunStepInfo(step); +} +``` + +9. After the sample completes, delete all resources you created: the vector store, file, thread, and Agent. + +Synchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_Cleanup_Sync +client.VectorStores.DeleteVectorStore(vectorStore.Id); +client.Files.DeleteFile(uploadedAgentFile.Id); +client.Threads.DeleteThread(thread.Id); +client.Administration.DeleteAgent(agent.Id); +``` + +Asynchronous sample: +```C# Snippet:PersistentAgents_VectorStoreFileSearch_Cleanup_Async +await client.VectorStores.DeleteVectorStoreAsync(vectorStore.Id); +await client.Files.DeleteFileAsync(uploadedAgentFile.Id); +await client.Threads.DeleteThreadAsync(thread.Id); +await client.Administration.DeleteAgentAsync(agent.Id); +``` diff --git a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample4_PersistentAgents_Bing_Grounding.md b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample4_PersistentAgents_Bing_Grounding.md index d2ef27ce0b94..1330b228b37f 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample4_PersistentAgents_Bing_Grounding.md +++ b/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample4_PersistentAgents_Bing_Grounding.md @@ -13,10 +13,11 @@ PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCreden 2. We will use the Bing connection ID to initialize the `BingGroundingToolDefinition`. ```C# Snippet:AgentsBingGrounding_GetConnection -BingGroundingSearchConfigurationList configurationList = new( - [new BingGroundingSearchConfiguration(connectionId)] +BingGroundingToolDefinition bingGroundingTool = new( + new BingGroundingSearchToolParameters( + [new BingGroundingSearchConfiguration(connectionId)] + ) ); -BingGroundingToolDefinition bingGroundingTool = new(configurationList); ``` 3. We will use the `BingGroundingToolDefinition` during the agent initialization. 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 0b7e26e70ab4..ac34e4f9862e 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,9 @@ This is the Azure.AI.Agents.Persistent client library for developing .NET applications with rich experience. Microsoft Azure.AI.Agents.Persistent client library - 1.0.0-beta.2 + 1.1.0-beta.2 + + 1.0.0 Azure.AI.Agents.Persistent true $(RequiredTargetFrameworks) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsFiles.cs index 45b0856e1b52..2ac3ff6153fd 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsFiles.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsFiles.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.IO; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using Azure.Core; @@ -59,6 +60,7 @@ public virtual async Task> UploadFileAsync(Str Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNullOrEmpty(filename, nameof(filename)); + filename = ReplaceNonAscii(filename); UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null); using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); @@ -77,6 +79,7 @@ public virtual Response UploadFile(Stream data, Persist Argument.AssertNotNull(data, nameof(data)); Argument.AssertNotNullOrEmpty(filename, nameof(filename)); + filename = ReplaceNonAscii(filename); UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null); using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); RequestContext context = FromCancellationToken(cancellationToken); @@ -84,6 +87,17 @@ public virtual Response UploadFile(Stream data, Persist return Response.FromValue(PersistentAgentFileInfo.FromResponse(response), response); } + /// + /// Remove non ASCII symbols from the file name. + /// Temporary workaround of an issue when the file contains non ASCII characters. + /// + /// The file name. + /// The file name with all non ASCII letters replaced. + private static string ReplaceNonAscii(string filename) + { + return Regex.Replace(filename, @"[^\u0000-\u007F]", "~"); + } + /// Uploads a file for use by other operations. /// Multipart body. /// The cancellation token to use. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs index 7c123058e5aa..fd2345f7756c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureFunctionBindingType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The AzureFunctionBinding_type. + /// The AzureFunctionBindingType. public readonly partial struct AzureFunctionBindingType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs new file mode 100644 index 000000000000..ac57ac91f74f --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) 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.Agents.Persistent +{ + public partial class BingCustomSearchConfiguration : 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(BingCustomSearchConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("connection_id"u8); + writer.WriteStringValue(ConnectionId); + writer.WritePropertyName("instance_name"u8); + writer.WriteStringValue(InstanceName); + if (Optional.IsDefined(Market)) + { + writer.WritePropertyName("market"u8); + writer.WriteStringValue(Market); + } + if (Optional.IsDefined(SetLang)) + { + writer.WritePropertyName("set_lang"u8); + writer.WriteStringValue(SetLang); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(Freshness)) + { + writer.WritePropertyName("freshness"u8); + writer.WriteStringValue(Freshness); + } + 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 + } + } + } + + BingCustomSearchConfiguration 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(BingCustomSearchConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBingCustomSearchConfiguration(document.RootElement, options); + } + + internal static BingCustomSearchConfiguration DeserializeBingCustomSearchConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string connectionId = default; + string instanceName = default; + string market = default; + string setLang = default; + long? count = default; + string freshness = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connection_id"u8)) + { + connectionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instance_name"u8)) + { + instanceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("market"u8)) + { + market = property.Value.GetString(); + continue; + } + if (property.NameEquals("set_lang"u8)) + { + setLang = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("freshness"u8)) + { + freshness = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BingCustomSearchConfiguration( + connectionId, + instanceName, + market, + setLang, + count, + freshness, + 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BingCustomSearchConfiguration 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 DeserializeBingCustomSearchConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} 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 BingCustomSearchConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBingCustomSearchConfiguration(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/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs new file mode 100644 index 000000000000..a157244c40fb --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.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.AI.Agents.Persistent +{ + /// A bing custom search configuration. + public partial class BingCustomSearchConfiguration + { + /// + /// 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 . + /// Connection id for grounding with bing search. + /// Name of the custom configuration instance given to config. + /// or is null. + public BingCustomSearchConfiguration(string connectionId, string instanceName) + { + Argument.AssertNotNull(connectionId, nameof(connectionId)); + Argument.AssertNotNull(instanceName, nameof(instanceName)); + + ConnectionId = connectionId; + InstanceName = instanceName; + } + + /// Initializes a new instance of . + /// Connection id for grounding with bing search. + /// Name of the custom configuration instance given to config. + /// The market where the results come from. + /// The language to use for user interface strings when calling Bing API. + /// The number of search results to return in the bing api response. + /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters. + /// Keeps track of any properties unknown to the library. + internal BingCustomSearchConfiguration(string connectionId, string instanceName, string market, string setLang, long? count, string freshness, IDictionary serializedAdditionalRawData) + { + ConnectionId = connectionId; + InstanceName = instanceName; + Market = market; + SetLang = setLang; + Count = count; + Freshness = freshness; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BingCustomSearchConfiguration() + { + } + + /// Connection id for grounding with bing search. + public string ConnectionId { get; set; } + /// Name of the custom configuration instance given to config. + public string InstanceName { get; set; } + /// The market where the results come from. + public string Market { get; set; } + /// The language to use for user interface strings when calling Bing API. + public string SetLang { get; set; } + /// The number of search results to return in the bing api response. + public long? Count { get; set; } + /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters. + public string Freshness { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs similarity index 95% rename from sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs index 71befeab196b..64dd3849fba8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class BingCustomSearchToolDefinition : IUtf8JsonSerializable, IJsonModel { @@ -59,7 +59,7 @@ internal static BingCustomSearchToolDefinition DeserializeBingCustomSearchToolDe { return null; } - SearchConfigurationList bingCustomSearch = default; + BingCustomSearchToolParameters bingCustomSearch = default; string type = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static BingCustomSearchToolDefinition DeserializeBingCustomSearchToolDe { if (property.NameEquals("bing_custom_search"u8)) { - bingCustomSearch = SearchConfigurationList.DeserializeSearchConfigurationList(property.Value, options); + bingCustomSearch = BingCustomSearchToolParameters.DeserializeBingCustomSearchToolParameters(property.Value, options); continue; } if (property.NameEquals("type"u8)) @@ -91,7 +91,7 @@ BinaryData IPersistableModel.Write(ModelReaderWr switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs new file mode 100644 index 000000000000..61a79de33a31 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// The input definition information for a Bing custom search tool as used to configure an agent. + public partial class BingCustomSearchToolDefinition : ToolDefinition + { + /// Initializes a new instance of . + /// The bing custom search tool parameters. + /// is null. + public BingCustomSearchToolDefinition(BingCustomSearchToolParameters bingCustomSearch) + { + Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); + + Type = "bing_custom_search"; + BingCustomSearch = bingCustomSearch; + } + + /// Initializes a new instance of . + /// The object type. + /// Keeps track of any properties unknown to the library. + /// The bing custom search tool parameters. + internal BingCustomSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, BingCustomSearchToolParameters bingCustomSearch) : base(type, serializedAdditionalRawData) + { + BingCustomSearch = bingCustomSearch; + } + + /// Initializes a new instance of for deserialization. + internal BingCustomSearchToolDefinition() + { + } + + /// The bing custom search tool parameters. + public BingCustomSearchToolParameters BingCustomSearch { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.Serialization.cs new file mode 100644 index 000000000000..bc01779e8665 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.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.AI.Agents.Persistent +{ + public partial class BingCustomSearchToolParameters : 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(BingCustomSearchToolParameters)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("search_configurations"u8); + writer.WriteStartArray(); + foreach (var item in SearchConfigurations) + { + 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 + } + } + } + + BingCustomSearchToolParameters 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(BingCustomSearchToolParameters)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBingCustomSearchToolParameters(document.RootElement, options); + } + + internal static BingCustomSearchToolParameters DeserializeBingCustomSearchToolParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList searchConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("search_configurations"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BingCustomSearchConfiguration.DeserializeBingCustomSearchConfiguration(item, options)); + } + searchConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BingCustomSearchToolParameters(searchConfigurations, 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(BingCustomSearchToolParameters)} does not support writing '{options.Format}' format."); + } + } + + BingCustomSearchToolParameters 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 DeserializeBingCustomSearchToolParameters(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BingCustomSearchToolParameters)} 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 BingCustomSearchToolParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBingCustomSearchToolParameters(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/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.cs new file mode 100644 index 000000000000..f622207692f8 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolParameters.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.AI.Agents.Persistent +{ + /// The bing custom search tool parameters. + public partial class BingCustomSearchToolParameters + { + /// + /// 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 connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + /// is null. + public BingCustomSearchToolParameters(IEnumerable searchConfigurations) + { + Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations)); + + SearchConfigurations = searchConfigurations.ToList(); + } + + /// Initializes a new instance of . + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + /// Keeps track of any properties unknown to the library. + internal BingCustomSearchToolParameters(IList searchConfigurations, IDictionary serializedAdditionalRawData) + { + SearchConfigurations = searchConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BingCustomSearchToolParameters() + { + } + + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + public IList SearchConfigurations { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs deleted file mode 100644 index d583341aa27b..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.Serialization.cs +++ /dev/null @@ -1,152 +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.Agents.Persistent -{ - public partial class BingGroundingSearchConfigurationList : 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(BingGroundingSearchConfigurationList)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("search_configurations"u8); - writer.WriteStartArray(); - foreach (var item in SearchConfigurations) - { - 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 - } - } - } - - BingGroundingSearchConfigurationList 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(BingGroundingSearchConfigurationList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeBingGroundingSearchConfigurationList(document.RootElement, options); - } - - internal static BingGroundingSearchConfigurationList DeserializeBingGroundingSearchConfigurationList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList searchConfigurations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("search_configurations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BingGroundingSearchConfiguration.DeserializeBingGroundingSearchConfiguration(item, options)); - } - searchConfigurations = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new BingGroundingSearchConfigurationList(searchConfigurations, 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, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} does not support writing '{options.Format}' format."); - } - } - - BingGroundingSearchConfigurationList 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 DeserializeBingGroundingSearchConfigurationList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(BingGroundingSearchConfigurationList)} 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 BingGroundingSearchConfigurationList FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingGroundingSearchConfigurationList(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/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.cs deleted file mode 100644 index 5b34ea34ef69..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchConfigurationList.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; -using System.Linq; - -namespace Azure.AI.Agents.Persistent -{ - /// A list of search configurations currently used by the `bing_grounding` tool. - public partial class BingGroundingSearchConfigurationList - { - /// - /// 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 search configurations attached to this tool. There can be a maximum of 1 - /// search configuration resource attached to the tool. - /// - /// is null. - public BingGroundingSearchConfigurationList(IEnumerable searchConfigurations) - { - Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations)); - - SearchConfigurations = searchConfigurations.ToList(); - } - - /// Initializes a new instance of . - /// - /// The search configurations attached to this tool. There can be a maximum of 1 - /// search configuration resource attached to the tool. - /// - /// Keeps track of any properties unknown to the library. - internal BingGroundingSearchConfigurationList(IList searchConfigurations, IDictionary serializedAdditionalRawData) - { - SearchConfigurations = searchConfigurations; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal BingGroundingSearchConfigurationList() - { - } - - /// - /// The search configurations attached to this tool. There can be a maximum of 1 - /// search configuration resource attached to the tool. - /// - public IList SearchConfigurations { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.Serialization.cs new file mode 100644 index 000000000000..dad28c2a7eaa --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.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.AI.Agents.Persistent +{ + public partial class BingGroundingSearchToolParameters : 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(BingGroundingSearchToolParameters)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("search_configurations"u8); + writer.WriteStartArray(); + foreach (var item in SearchConfigurations) + { + 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 + } + } + } + + BingGroundingSearchToolParameters 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(BingGroundingSearchToolParameters)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBingGroundingSearchToolParameters(document.RootElement, options); + } + + internal static BingGroundingSearchToolParameters DeserializeBingGroundingSearchToolParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList searchConfigurations = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("search_configurations"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BingGroundingSearchConfiguration.DeserializeBingGroundingSearchConfiguration(item, options)); + } + searchConfigurations = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BingGroundingSearchToolParameters(searchConfigurations, 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(BingGroundingSearchToolParameters)} does not support writing '{options.Format}' format."); + } + } + + BingGroundingSearchToolParameters 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 DeserializeBingGroundingSearchToolParameters(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BingGroundingSearchToolParameters)} 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 BingGroundingSearchToolParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBingGroundingSearchToolParameters(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/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.cs new file mode 100644 index 000000000000..25bc58a4a0f4 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingSearchToolParameters.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.AI.Agents.Persistent +{ + /// The bing grounding search tool parameters. + public partial class BingGroundingSearchToolParameters + { + /// + /// 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 search configurations attached to this tool. There can be a maximum of 1 + /// search configuration resource attached to the tool. + /// + /// is null. + public BingGroundingSearchToolParameters(IEnumerable searchConfigurations) + { + Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations)); + + SearchConfigurations = searchConfigurations.ToList(); + } + + /// Initializes a new instance of . + /// + /// The search configurations attached to this tool. There can be a maximum of 1 + /// search configuration resource attached to the tool. + /// + /// Keeps track of any properties unknown to the library. + internal BingGroundingSearchToolParameters(IList searchConfigurations, IDictionary serializedAdditionalRawData) + { + SearchConfigurations = searchConfigurations; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BingGroundingSearchToolParameters() + { + } + + /// + /// The search configurations attached to this tool. There can be a maximum of 1 + /// search configuration resource attached to the tool. + /// + public IList SearchConfigurations { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs index a20b3dbdda1c..a093752f466e 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.Serialization.cs @@ -59,7 +59,7 @@ internal static BingGroundingToolDefinition DeserializeBingGroundingToolDefiniti { return null; } - BingGroundingSearchConfigurationList bingGrounding = default; + BingGroundingSearchToolParameters bingGrounding = default; string type = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static BingGroundingToolDefinition DeserializeBingGroundingToolDefiniti { if (property.NameEquals("bing_grounding"u8)) { - bingGrounding = BingGroundingSearchConfigurationList.DeserializeBingGroundingSearchConfigurationList(property.Value, options); + bingGrounding = BingGroundingSearchToolParameters.DeserializeBingGroundingSearchToolParameters(property.Value, options); continue; } if (property.NameEquals("type"u8)) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs index d08e6c8b98a9..07b0a12d607c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingGroundingToolDefinition.cs @@ -14,9 +14,9 @@ namespace Azure.AI.Agents.Persistent public partial class BingGroundingToolDefinition : ToolDefinition { /// Initializes a new instance of . - /// The list of search configurations used by the bing grounding tool. + /// The bing grounding search tool parameters. /// is null. - public BingGroundingToolDefinition(BingGroundingSearchConfigurationList bingGrounding) + public BingGroundingToolDefinition(BingGroundingSearchToolParameters bingGrounding) { Argument.AssertNotNull(bingGrounding, nameof(bingGrounding)); @@ -27,8 +27,8 @@ public BingGroundingToolDefinition(BingGroundingSearchConfigurationList bingGrou /// Initializes a new instance of . /// The object type. /// Keeps track of any properties unknown to the library. - /// The list of search configurations used by the bing grounding tool. - internal BingGroundingToolDefinition(string type, IDictionary serializedAdditionalRawData, BingGroundingSearchConfigurationList bingGrounding) : base(type, serializedAdditionalRawData) + /// The bing grounding search tool parameters. + internal BingGroundingToolDefinition(string type, IDictionary serializedAdditionalRawData, BingGroundingSearchToolParameters bingGrounding) : base(type, serializedAdditionalRawData) { BingGrounding = bingGrounding; } @@ -38,7 +38,7 @@ internal BingGroundingToolDefinition() { } - /// The list of search configurations used by the bing grounding tool. - public BingGroundingSearchConfigurationList BingGrounding { get; set; } + /// The bing grounding search tool parameters. + public BingGroundingSearchToolParameters BingGrounding { get; set; } } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs index 14c2a11fbd92..02993f45cecc 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs @@ -65,7 +65,7 @@ internal CreateAgentRequest(string model) /// /// The collection of tools to enable for the new agent. /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -115,7 +115,7 @@ internal CreateAgentRequest() /// /// The collection of tools to enable for the new agent. /// 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 IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs index 68dabc3ba735..d6413572c7a9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs @@ -70,7 +70,7 @@ internal CreateRunRequest(string assistantId) /// /// The overridden list of enabled tools that the agent should use to run the thread. /// 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 . /// /// /// If `true`, returns a stream of events that happen during the Run as server-sent events, @@ -145,7 +145,7 @@ internal CreateRunRequest() /// /// The overridden list of enabled tools that the agent should use to run the thread. /// 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 IReadOnlyList OverrideTools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs index 1d5d8ebd9187..8c44917204bf 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs @@ -65,7 +65,7 @@ internal CreateThreadAndRunRequest(string assistantId) /// /// The overridden list of enabled tools the agent should use to run the thread. /// 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 . /// /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. /// @@ -136,7 +136,7 @@ internal CreateThreadAndRunRequest() /// /// The overridden list of enabled tools the agent should use to run the thread. /// 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 IReadOnlyList OverrideTools { get; } /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.Serialization.cs new file mode 100644 index 000000000000..7753a9ed2229 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.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.AI.Agents.Persistent +{ + public partial class FabricDataAgentToolParameters : 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(FabricDataAgentToolParameters)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ConnectionList)) + { + writer.WritePropertyName("connections"u8); + writer.WriteStartArray(); + foreach (var item in ConnectionList) + { + 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 + } + } + } + + FabricDataAgentToolParameters 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(FabricDataAgentToolParameters)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricDataAgentToolParameters(document.RootElement, options); + } + + internal static FabricDataAgentToolParameters DeserializeFabricDataAgentToolParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList connections = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ToolConnection.DeserializeToolConnection(item, options)); + } + connections = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricDataAgentToolParameters(connections ?? 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(FabricDataAgentToolParameters)} does not support writing '{options.Format}' format."); + } + } + + FabricDataAgentToolParameters 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 DeserializeFabricDataAgentToolParameters(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricDataAgentToolParameters)} 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 FabricDataAgentToolParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFabricDataAgentToolParameters(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/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.cs new file mode 100644 index 000000000000..539883986190 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FabricDataAgentToolParameters.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// The fabric data agent tool parameters. + public partial class FabricDataAgentToolParameters + { + /// + /// 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 FabricDataAgentToolParameters() + { + ConnectionList = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + /// Keeps track of any properties unknown to the library. + internal FabricDataAgentToolParameters(IList connectionList, IDictionary serializedAdditionalRawData) + { + ConnectionList = connectionList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + public IList ConnectionList { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FileSearchToolCallContentType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FileSearchToolCallContentType.cs index c0d81d77d9c4..9c1798c768a4 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FileSearchToolCallContentType.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/FileSearchToolCallContentType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The FileSearchToolCallContent_type. + /// The FileSearchToolCallContentType. public readonly partial struct FileSearchToolCallContentType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalAgentDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalAgentDeletionStatusObject.cs index cb57f938c5b4..5bce9c301231 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalAgentDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalAgentDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The InternalAgentDeletionStatus_object. + /// The InternalAgentDeletionStatusObject. internal readonly partial struct InternalAgentDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileDeletionStatusObject.cs index 3c33bde644c5..e56bdcf38cdd 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The InternalFileDeletionStatus_object. + /// The InternalFileDeletionStatusObject. internal readonly partial struct InternalFileDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileListResponseObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileListResponseObject.cs index e1273f795938..2364872cb28a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileListResponseObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalFileListResponseObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The InternalFileListResponse_object. + /// The InternalFileListResponseObject. internal readonly partial struct InternalFileListResponseObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreDeletionStatusObject.cs index 1762fecc069b..94fffe083c7f 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The InternalVectorStoreDeletionStatus_object. + /// The InternalVectorStoreDeletionStatusObject. internal readonly partial struct InternalVectorStoreDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreFileDeletionStatusObject.cs index cea78530d4a9..9a3e2fea196c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreFileDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/InternalVectorStoreFileDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The InternalVectorStoreFileDeletionStatus_object. + /// The InternalVectorStoreFileDeletionStatusObject. internal readonly partial struct InternalVectorStoreFileDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageDeltaChunkObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageDeltaChunkObject.cs index 8e8154621340..5b6fa369be24 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageDeltaChunkObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageDeltaChunkObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The MessageDeltaChunk_object. + /// The MessageDeltaChunkObject. public readonly partial struct MessageDeltaChunkObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs similarity index 95% rename from sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs index bf986513c68a..dfda8728cd15 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class MicrosoftFabricToolDefinition : IUtf8JsonSerializable, IJsonModel { @@ -59,7 +59,7 @@ internal static MicrosoftFabricToolDefinition DeserializeMicrosoftFabricToolDefi { return null; } - ToolConnectionList fabricDataagent = default; + FabricDataAgentToolParameters fabricDataagent = default; string type = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static MicrosoftFabricToolDefinition DeserializeMicrosoftFabricToolDefi { if (property.NameEquals("fabric_dataagent"u8)) { - fabricDataagent = ToolConnectionList.DeserializeToolConnectionList(property.Value, options); + fabricDataagent = FabricDataAgentToolParameters.DeserializeFabricDataAgentToolParameters(property.Value, options); continue; } if (property.NameEquals("type"u8)) @@ -91,7 +91,7 @@ BinaryData IPersistableModel.Write(ModelReaderWri switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(MicrosoftFabricToolDefinition)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs new file mode 100644 index 000000000000..0589b42e7cb9 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// The input definition information for a Microsoft Fabric tool as used to configure an agent. + public partial class MicrosoftFabricToolDefinition : ToolDefinition + { + /// Initializes a new instance of . + /// The fabric data agent tool parameters. + /// is null. + public MicrosoftFabricToolDefinition(FabricDataAgentToolParameters fabricDataagent) + { + Argument.AssertNotNull(fabricDataagent, nameof(fabricDataagent)); + + Type = "fabric_dataagent"; + FabricDataagent = fabricDataagent; + } + + /// Initializes a new instance of . + /// The object type. + /// Keeps track of any properties unknown to the library. + /// The fabric data agent tool parameters. + internal MicrosoftFabricToolDefinition(string type, IDictionary serializedAdditionalRawData, FabricDataAgentToolParameters fabricDataagent) : base(type, serializedAdditionalRawData) + { + FabricDataagent = fabricDataagent; + } + + /// Initializes a new instance of for deserialization. + internal MicrosoftFabricToolDefinition() + { + } + + /// The fabric data agent tool parameters. + public FabricDataAgentToolParameters FabricDataagent { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs index 525d7fa2d10c..027c8084d20e 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs @@ -56,7 +56,7 @@ public partial class PersistentAgent /// /// The collection of tools enabled for the agent. /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -104,7 +104,7 @@ internal PersistentAgent(string id, DateTimeOffset createdAt, string name, strin /// /// The collection of tools enabled for the agent. /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -162,7 +162,7 @@ internal PersistentAgent() /// /// The collection of tools enabled for the agent. /// 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 IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFileInfoObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFileInfoObject.cs index 941e277b0bb0..561168bb6ed6 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFileInfoObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFileInfoObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The PersistentAgentFileInfo_object. + /// The PersistentAgentFileInfoObject. internal readonly partial struct PersistentAgentFileInfoObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFilePurpose.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFilePurpose.cs index 01680229e080..eaac36b60c4a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFilePurpose.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentFilePurpose.cs @@ -22,26 +22,14 @@ public PersistentAgentFilePurpose(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string FineTuneValue = "fine-tune"; - private const string FineTuneResultsValue = "fine-tune-results"; private const string AgentsValue = "assistants"; private const string AgentsOutputValue = "assistants_output"; - private const string BatchValue = "batch"; - private const string BatchOutputValue = "batch_output"; private const string VisionValue = "vision"; - /// Indicates a file is used for fine tuning input. - public static PersistentAgentFilePurpose FineTune { get; } = new PersistentAgentFilePurpose(FineTuneValue); - /// Indicates a file is used for fine tuning results. - public static PersistentAgentFilePurpose FineTuneResults { get; } = new PersistentAgentFilePurpose(FineTuneResultsValue); /// Indicates a file is used as input to agents. public static PersistentAgentFilePurpose Agents { get; } = new PersistentAgentFilePurpose(AgentsValue); /// Indicates a file is used as output by agents. public static PersistentAgentFilePurpose AgentsOutput { get; } = new PersistentAgentFilePurpose(AgentsOutputValue); - /// Indicates a file is used as input to . - public static PersistentAgentFilePurpose Batch { get; } = new PersistentAgentFilePurpose(BatchValue); - /// Indicates a file is used as output by a vector store batch operation. - public static PersistentAgentFilePurpose BatchOutput { get; } = new PersistentAgentFilePurpose(BatchOutputValue); /// Indicates a file is used as input to a vision operation. public static PersistentAgentFilePurpose Vision { get; } = new PersistentAgentFilePurpose(VisionValue); /// Determines if two values are the same. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentObject.cs index 71d0f2adb5cc..7a68b575f507 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The PersistentAgent_object. + /// The PersistentAgentObject. internal readonly partial struct PersistentAgentObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentThreadObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentThreadObject.cs index 54924ccf049c..a05bd89e74c7 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentThreadObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentThreadObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The PersistentAgentThread_object. + /// The PersistentAgentThreadObject. internal readonly partial struct PersistentAgentThreadObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClientOptions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClientOptions.cs index 9cb1de8e0318..f08608eed1f2 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClientOptions.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Agents.Persistent /// Client options for PersistentAgentsAdministrationClient. public partial class PersistentAgentsAdministrationClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V1; + private const ServiceVersion LatestVersion = ServiceVersion.V2025_05_15_Preview; /// The version of the service to use. public enum ServiceVersion @@ -22,6 +22,8 @@ public enum ServiceVersion V2025_05_01 = 1, /// Service version "v1". V1 = 2, + /// Service version "2025-05-15-preview". + V2025_05_15_Preview = 3, } internal string Version { get; } @@ -33,6 +35,7 @@ public PersistentAgentsAdministrationClientOptions(ServiceVersion version = Late { ServiceVersion.V2025_05_01 => "2025-05-01", ServiceVersion.V1 => "v1", + ServiceVersion.V2025_05_15_Preview => "2025-05-15-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs index 533bfd42c4eb..a65f16387406 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs @@ -84,7 +84,7 @@ internal virtual Response InternalListFiles(Persistent /// /// /// - /// The purpose of the file. Allowed values: "fine-tune" | "fine-tune-results" | "assistants" | "assistants_output" | "batch" | "batch_output" | "vision". + /// The purpose of the file. Allowed values: "assistants" | "assistants_output" | "vision". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. @@ -119,7 +119,7 @@ internal virtual async Task InternalListFilesAsync(string purpose, Req /// /// /// - /// The purpose of the file. Allowed values: "fine-tune" | "fine-tune-results" | "assistants" | "assistants_output" | "batch" | "batch_output" | "vision". + /// The purpose of the file. Allowed values: "assistants" | "assistants_output" | "vision". /// The request context, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs index ec9be61f12bf..725a519c9941 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs @@ -217,7 +217,7 @@ public static RunStepMessageCreationReference RunStepMessageCreationReference(st /// /// A list of tool call details for this run 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 , , , , and . + /// The available derived classes include , , , , , , , and . /// /// A new instance for mocking. public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null) @@ -324,6 +324,39 @@ public static RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string i return new RunStepAzureAISearchToolCall("azure_ai_search", id, serializedAdditionalRawData: null, azureAISearch); } + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, IReadOnlyDictionary sharePoint = null) + { + sharePoint ??= new Dictionary(); + + return new RunStepSharepointToolCall("sharepoint_grounding", id, serializedAdditionalRawData: null, sharePoint); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, IReadOnlyDictionary microsoftFabric = null) + { + microsoftFabric ??= new Dictionary(); + + return new RunStepMicrosoftFabricToolCall("fabric_dataagent", id, serializedAdditionalRawData: null, microsoftFabric); + } + + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// A new instance for mocking. + public static RunStepBingCustomSearchToolCall RunStepBingCustomSearchToolCall(string id = null, IReadOnlyDictionary bingCustomSearch = null) + { + bingCustomSearch ??= new Dictionary(); + + return new RunStepBingCustomSearchToolCall("bing_custom_search", id, serializedAdditionalRawData: null, bingCustomSearch); + } + /// Initializes a new instance of . /// The ID of the tool call. This ID must be referenced when you submit tool outputs. /// Reserved for future use. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs index 98fc2b8551af..5abd0fa864fd 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs @@ -25,6 +25,9 @@ public PersistentAgentsNamedToolChoiceType(string value) private const string FunctionValue = "function"; private const string CodeInterpreterValue = "code_interpreter"; private const string FileSearchValue = "file_search"; + private const string BingGroundingValue = "bing_grounding"; + private const string MicrosoftFabricValue = "fabric_dataagent"; + private const string SharepointValue = "sharepoint_grounding"; private const string AzureAISearchValue = "azure_ai_search"; private const string BingCustomSearchValue = "bing_custom_search"; private const string ConnectedAgentValue = "connected_agent"; @@ -35,6 +38,12 @@ public PersistentAgentsNamedToolChoiceType(string value) public static PersistentAgentsNamedToolChoiceType CodeInterpreter { get; } = new PersistentAgentsNamedToolChoiceType(CodeInterpreterValue); /// Tool type `file_search`. public static PersistentAgentsNamedToolChoiceType FileSearch { get; } = new PersistentAgentsNamedToolChoiceType(FileSearchValue); + /// Tool type `bing_grounding`. + public static PersistentAgentsNamedToolChoiceType BingGrounding { get; } = new PersistentAgentsNamedToolChoiceType(BingGroundingValue); + /// Tool type `fabric_dataagent`. + public static PersistentAgentsNamedToolChoiceType MicrosoftFabric { get; } = new PersistentAgentsNamedToolChoiceType(MicrosoftFabricValue); + /// Tool type `sharepoint_grounding`. + public static PersistentAgentsNamedToolChoiceType Sharepoint { get; } = new PersistentAgentsNamedToolChoiceType(SharepointValue); /// Tool type `azure_ai_search`. public static PersistentAgentsNamedToolChoiceType AzureAISearch { get; } = new PersistentAgentsNamedToolChoiceType(AzureAISearchValue); /// Tool type `bing_custom_search`. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsVectorStoreObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsVectorStoreObject.cs index 11798aa1abd7..39260ed826b9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsVectorStoreObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsVectorStoreObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The PersistentAgentsVectorStore_object. + /// The PersistentAgentsVectorStoreObject. public readonly partial struct PersistentAgentsVectorStoreObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentThreadMessageObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentThreadMessageObject.cs index 488600ccd826..5be0cc2ae5c4 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentThreadMessageObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentThreadMessageObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The PersistentThreadMessage_object. + /// The PersistentThreadMessageObject. internal readonly partial struct PersistentThreadMessageObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ResponseFormatJsonSchemaTypeType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ResponseFormatJsonSchemaTypeType.cs index 6b8b307b39a6..96a1044ea2c2 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ResponseFormatJsonSchemaTypeType.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ResponseFormatJsonSchemaTypeType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The ResponseFormatJsonSchemaType_type. + /// The ResponseFormatJsonSchemaTypeType. public readonly partial struct ResponseFormatJsonSchemaTypeType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.Serialization.cs new file mode 100644 index 000000000000..a9919d4bfecf --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.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.AI.Agents.Persistent +{ + public partial class RunStepBingCustomSearchToolCall : 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(RunStepBingCustomSearchToolCall)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bing_custom_search"u8); + writer.WriteStartObject(); + foreach (var item in BingCustomSearch) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + + RunStepBingCustomSearchToolCall 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(RunStepBingCustomSearchToolCall)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRunStepBingCustomSearchToolCall(document.RootElement, options); + } + + internal static RunStepBingCustomSearchToolCall DeserializeRunStepBingCustomSearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary bingCustomSearch = default; + string type = default; + string id = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bing_custom_search"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + bingCustomSearch = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RunStepBingCustomSearchToolCall(type, id, serializedAdditionalRawData, bingCustomSearch); + } + + 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} does not support writing '{options.Format}' format."); + } + } + + RunStepBingCustomSearchToolCall 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 DeserializeRunStepBingCustomSearchToolCall(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} 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 new RunStepBingCustomSearchToolCall FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRunStepBingCustomSearchToolCall(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs new file mode 100644 index 000000000000..7c628d9d04a6 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// + /// A record of a call to a bing custom search tool, issued by the model in evaluation of a defined tool, that represents + /// executed search with bing custom search. + /// + public partial class RunStepBingCustomSearchToolCall : RunStepToolCall + { + /// Initializes a new instance of . + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Reserved for future use. + /// or is null. + internal RunStepBingCustomSearchToolCall(string id, IReadOnlyDictionary bingCustomSearch) : base(id) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); + + Type = "bing_custom_search"; + BingCustomSearch = bingCustomSearch; + } + + /// Initializes a new instance of . + /// The object type. + /// The ID of the tool call. This ID must be referenced when you submit tool outputs. + /// Keeps track of any properties unknown to the library. + /// Reserved for future use. + internal RunStepBingCustomSearchToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary bingCustomSearch) : base(type, id, serializedAdditionalRawData) + { + BingCustomSearch = bingCustomSearch; + } + + /// Initializes a new instance of for deserialization. + internal RunStepBingCustomSearchToolCall() + { + } + + /// Reserved for future use. + public IReadOnlyDictionary BingCustomSearch { get; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepDeltaChunkObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepDeltaChunkObject.cs index c3606cdd1a89..3215218ac2a4 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepDeltaChunkObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepDeltaChunkObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The RunStepDeltaChunk_object. + /// The RunStepDeltaChunkObject. public readonly partial struct RunStepDeltaChunkObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs index 987a9e708b62..8bce669c0034 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class RunStepMicrosoftFabricToolCall : IUtf8JsonSerializable, IJsonModel { @@ -108,7 +108,7 @@ BinaryData IPersistableModel.Write(ModelReaderWr switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(RunStepMicrosoftFabricToolCall)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs index 9cd55706d646..a78260a4ae24 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMicrosoftFabricToolCall.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { /// /// A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepObject.cs index 33e04b8798f8..e42315ecde6a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The RunStep_object. + /// The RunStepObject. internal readonly partial struct RunStepObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs index 37a067bc09fd..aa1aaf4b6af4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class RunStepSharepointToolCall : IUtf8JsonSerializable, IJsonModel { @@ -108,7 +108,7 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(RunStepSharepointToolCall)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs index 3efabae62b69..43a2c6932b4b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepSharepointToolCall.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { /// /// A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs index a691ba0270f9..75934e58dfca 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs @@ -80,11 +80,14 @@ internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, switch (discriminator.GetString()) { case "azure_ai_search": return RunStepAzureAISearchToolCall.DeserializeRunStepAzureAISearchToolCall(element, options); + case "bing_custom_search": return RunStepBingCustomSearchToolCall.DeserializeRunStepBingCustomSearchToolCall(element, options); case "bing_grounding": return RunStepBingGroundingToolCall.DeserializeRunStepBingGroundingToolCall(element, options); case "code_interpreter": return RunStepCodeInterpreterToolCall.DeserializeRunStepCodeInterpreterToolCall(element, options); + case "fabric_dataagent": return RunStepMicrosoftFabricToolCall.DeserializeRunStepMicrosoftFabricToolCall(element, options); case "file_search": return RunStepFileSearchToolCall.DeserializeRunStepFileSearchToolCall(element, options); case "function": return RunStepFunctionToolCall.DeserializeRunStepFunctionToolCall(element, options); case "openapi": return RunStepOpenAPIToolCall.DeserializeRunStepOpenAPIToolCall(element, options); + case "sharepoint_grounding": return RunStepSharepointToolCall.DeserializeRunStepSharepointToolCall(element, options); } } return UnknownRunStepToolCall.DeserializeUnknownRunStepToolCall(element, options); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs index f8e3e27b1338..2baae9a8d283 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Agents.Persistent /// /// An abstract representation of a detailed tool call as recorded within a run step for an existing run. /// 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 RunStepToolCall { diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs index 08bfe0d6e0d5..efea73eed8eb 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs @@ -18,7 +18,7 @@ public partial class RunStepToolCallDetails : RunStepDetails /// /// A list of tool call details for this run 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 , , , , and . + /// The available derived classes include , , , , , , , and . /// /// is null. internal RunStepToolCallDetails(IEnumerable toolCalls) @@ -35,7 +35,7 @@ internal RunStepToolCallDetails(IEnumerable toolCalls) /// /// A list of tool call details for this run 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 , , , , and . + /// The available derived classes include , , , , , , , and . /// internal RunStepToolCallDetails(RunStepType type, IDictionary serializedAdditionalRawData, IReadOnlyList toolCalls) : base(type, serializedAdditionalRawData) { @@ -50,7 +50,7 @@ internal RunStepToolCallDetails() /// /// A list of tool call details for this run 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 , , , , and . + /// The available derived classes include , , , , , , , and . /// public IReadOnlyList ToolCalls { get; } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.Serialization.cs new file mode 100644 index 000000000000..3423203ac603 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.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.AI.Agents.Persistent +{ + public partial class SharepointGroundingToolParameters : 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(SharepointGroundingToolParameters)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(ConnectionList)) + { + writer.WritePropertyName("connections"u8); + writer.WriteStartArray(); + foreach (var item in ConnectionList) + { + 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 + } + } + } + + SharepointGroundingToolParameters 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(SharepointGroundingToolParameters)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSharepointGroundingToolParameters(document.RootElement, options); + } + + internal static SharepointGroundingToolParameters DeserializeSharepointGroundingToolParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList connections = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connections"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ToolConnection.DeserializeToolConnection(item, options)); + } + connections = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SharepointGroundingToolParameters(connections ?? 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, AzureAIAgentsPersistentContext.Default); + default: + throw new FormatException($"The model {nameof(SharepointGroundingToolParameters)} does not support writing '{options.Format}' format."); + } + } + + SharepointGroundingToolParameters 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 DeserializeSharepointGroundingToolParameters(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SharepointGroundingToolParameters)} 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 SharepointGroundingToolParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSharepointGroundingToolParameters(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/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.cs new file mode 100644 index 000000000000..4b8892c9accf --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointGroundingToolParameters.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// The sharepoint grounding tool parameters. + public partial class SharepointGroundingToolParameters + { + /// + /// 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 SharepointGroundingToolParameters() + { + ConnectionList = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + /// Keeps track of any properties unknown to the library. + internal SharepointGroundingToolParameters(IList connectionList, IDictionary serializedAdditionalRawData) + { + ConnectionList = connectionList; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// The connections attached to this tool. There can be a maximum of 1 connection + /// resource attached to the tool. + /// + public IList ConnectionList { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs similarity index 95% rename from sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs index 19a15f202f5a..131f1ac8575a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class SharepointToolDefinition : IUtf8JsonSerializable, IJsonModel { @@ -59,7 +59,7 @@ internal static SharepointToolDefinition DeserializeSharepointToolDefinition(Jso { return null; } - ToolConnectionList sharepointGrounding = default; + SharepointGroundingToolParameters sharepointGrounding = default; string type = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -67,7 +67,7 @@ internal static SharepointToolDefinition DeserializeSharepointToolDefinition(Jso { if (property.NameEquals("sharepoint_grounding"u8)) { - sharepointGrounding = ToolConnectionList.DeserializeToolConnectionList(property.Value, options); + sharepointGrounding = SharepointGroundingToolParameters.DeserializeSharepointGroundingToolParameters(property.Value, options); continue; } if (property.NameEquals("type"u8)) @@ -91,7 +91,7 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOp switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(SharepointToolDefinition)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs new file mode 100644 index 000000000000..ae71ace3dff6 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Agents.Persistent +{ + /// The input definition information for a sharepoint tool as used to configure an agent. + public partial class SharepointToolDefinition : ToolDefinition + { + /// Initializes a new instance of . + /// The sharepoint grounding tool parameters. + /// is null. + public SharepointToolDefinition(SharepointGroundingToolParameters sharepointGrounding) + { + Argument.AssertNotNull(sharepointGrounding, nameof(sharepointGrounding)); + + Type = "sharepoint_grounding"; + SharepointGrounding = sharepointGrounding; + } + + /// Initializes a new instance of . + /// The object type. + /// Keeps track of any properties unknown to the library. + /// The sharepoint grounding tool parameters. + internal SharepointToolDefinition(string type, IDictionary serializedAdditionalRawData, SharepointGroundingToolParameters sharepointGrounding) : base(type, serializedAdditionalRawData) + { + SharepointGrounding = sharepointGrounding; + } + + /// Initializes a new instance of for deserialization. + internal SharepointToolDefinition() + { + } + + /// The sharepoint grounding tool parameters. + public SharepointGroundingToolParameters SharepointGrounding { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadDeletionStatusObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadDeletionStatusObject.cs index e692dc571cf8..2bc355768b4c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadDeletionStatusObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The ThreadDeletionStatus_object. + /// The ThreadDeletionStatusObject. internal readonly partial struct ThreadDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs index 7c927e9a8cdf..5f59a535d895 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs @@ -57,7 +57,7 @@ public partial class ThreadRun /// /// The overridden enabled tools used for this agent thread run. /// 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 Unix timestamp, in seconds, representing when this object was created. /// The Unix timestamp, in seconds, representing when this item expires. @@ -126,7 +126,7 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta /// /// The overridden enabled tools used for this agent thread run. /// 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 Unix timestamp, in seconds, representing when this object was created. /// The Unix timestamp, in seconds, representing when this item expires. @@ -209,7 +209,7 @@ internal ThreadRun() /// /// The overridden enabled tools used for this agent thread run. /// 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 IReadOnlyList Tools { get; } /// The Unix timestamp, in seconds, representing when this object was created. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunObject.cs index 00df52a2869e..119cdf25e63b 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The ThreadRun_object. + /// The ThreadRunObject. internal readonly partial struct ThreadRunObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs index d0cbb7c9a912..76ae573eabcc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs @@ -11,7 +11,7 @@ using System.Text.Json; using Azure.Core; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { public partial class ToolConnection : IUtf8JsonSerializable, IJsonModel { @@ -99,7 +99,7 @@ BinaryData IPersistableModel.Write(ModelReaderWriterOptions opti switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: throw new FormatException($"The model {nameof(ToolConnection)} does not support writing '{options.Format}' format."); } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs similarity index 98% rename from sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs index d60e6fe9ab5b..cc6f72bb901c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnection.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs @@ -8,7 +8,7 @@ using System; using System.Collections.Generic; -namespace Azure.AI.Projects +namespace Azure.AI.Agents.Persistent { /// A connection resource. public partial class ToolConnection diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs index 30a08ddf2a8d..6532e2849db9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs @@ -79,12 +79,15 @@ internal static ToolDefinition DeserializeToolDefinition(JsonElement element, Mo { case "azure_ai_search": return AzureAISearchToolDefinition.DeserializeAzureAISearchToolDefinition(element, options); case "azure_function": return AzureFunctionToolDefinition.DeserializeAzureFunctionToolDefinition(element, options); + case "bing_custom_search": return BingCustomSearchToolDefinition.DeserializeBingCustomSearchToolDefinition(element, options); case "bing_grounding": return BingGroundingToolDefinition.DeserializeBingGroundingToolDefinition(element, options); case "code_interpreter": return CodeInterpreterToolDefinition.DeserializeCodeInterpreterToolDefinition(element, options); case "connected_agent": return ConnectedAgentToolDefinition.DeserializeConnectedAgentToolDefinition(element, options); + case "fabric_dataagent": return MicrosoftFabricToolDefinition.DeserializeMicrosoftFabricToolDefinition(element, options); case "file_search": return FileSearchToolDefinition.DeserializeFileSearchToolDefinition(element, options); case "function": return FunctionToolDefinition.DeserializeFunctionToolDefinition(element, options); case "openapi": return OpenApiToolDefinition.DeserializeOpenApiToolDefinition(element, options); + case "sharepoint_grounding": return SharepointToolDefinition.DeserializeSharepointToolDefinition(element, options); } } return UnknownToolDefinition.DeserializeUnknownToolDefinition(element, options); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs index 4d5d6347f9f6..a632f3baa004 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Agents.Persistent /// /// An abstract representation of an input tool definition that an agent can use. /// 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 ToolDefinition { diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs index 4d769e19309a..7b84d42ae316 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs @@ -60,7 +60,7 @@ internal UpdateAgentRequest() /// /// The modified collection of tools to enable for the agent. /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, @@ -105,7 +105,7 @@ internal UpdateAgentRequest(string model, string name, string description, strin /// /// The modified collection of tools to enable for the agent. /// 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 IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatchObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatchObject.cs index cf70f9d86d1d..9183902f08d9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatchObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatchObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The VectorStoreFileBatch_object. + /// The VectorStoreFileBatchObject. public readonly partial struct VectorStoreFileBatchObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileObject.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileObject.cs index e2502738bc3f..0ff7412f48a3 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileObject.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Agents.Persistent { - /// The VectorStoreFile_object. + /// The VectorStoreFileObject. public readonly partial struct VectorStoreFileObject : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs index 0c730706482d..016ddcb203ea 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/PersistentAgentsTests.cs @@ -208,10 +208,9 @@ public async Task TestThreadPageable() PersistentAgentsClient client = GetClient(); PersistentAgent agent = await GetAgent(client, AGENT_NAME); AsyncPageable pgThreads = client.Threads.GetThreadsAsync(limit: 2); - int cntBefore = (await pgThreads.ToListAsync()).Count; // This test may take a long time if the number of threads is big. // The code below may e used to clean up the threads. - //AsyncPageable pgThreads = client.Threads.GetThreadsAsync(limit: 100); + //pgThreads = client.Threads.GetThreadsAsync(limit: 100); //List del = await pgThreads.ToListAsync(); //foreach (PersistentAgentThread thr in del) //{ @@ -219,8 +218,9 @@ public async Task TestThreadPageable() // await Delay(5); //} //pgThreads = client.Threads.GetThreadsAsync(limit: 100); - //int cntBefore = (await pgThreads.ToListAsync()).Count; + //Assert.AreEqual(0, (await pgThreads.ToListAsync()).Count); // End of cleanup code. + int cntBefore = (await pgThreads.ToListAsync()).Count; PersistentAgentThread thr1 = await client.Threads.CreateThreadAsync(); PersistentAgentThread thr2 = await client.Threads.CreateThreadAsync(); PersistentAgentThread thr3 = await client.Threads.CreateThreadAsync(); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Grounding.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Grounding.cs index e246a265f8a8..1ab7aacf436d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Grounding.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_Bing_Grounding.cs @@ -30,10 +30,11 @@ public async Task BingGroundingExampleAsync() PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); #endregion #region Snippet:AgentsBingGrounding_GetConnection - BingGroundingSearchConfigurationList configurationList = new( - [new BingGroundingSearchConfiguration(connectionId)] + BingGroundingToolDefinition bingGroundingTool = new( + new BingGroundingSearchToolParameters( + [new BingGroundingSearchConfiguration(connectionId)] + ) ); - BingGroundingToolDefinition bingGroundingTool = new(configurationList); #endregion #region Snippet:AgentsBingGroundingAsync_CreateAgent PersistentAgent agent = await agentClient.Administration.CreateAgentAsync( @@ -122,10 +123,11 @@ public void BingGroundingExample() var connectionId = TestEnvironment.BING_CONECTION_ID; #endif PersistentAgentsClient agentClient = new(projectEndpoint, new DefaultAzureCredential()); - BingGroundingSearchConfigurationList configurationList = new( - [new BingGroundingSearchConfiguration(connectionId)] + BingGroundingToolDefinition bingGroundingTool = new( + new BingGroundingSearchToolParameters( + [new BingGroundingSearchConfiguration(connectionId)] + ) ); - BingGroundingToolDefinition bingGroundingTool = new(configurationList); #region Snippet:AgentsBingGrounding_CreateAgent PersistentAgent agent = agentClient.Administration.CreateAgent( model: modelDeploymentName, diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_VectorStoreFile_WithSteps.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_VectorStoreFile_WithSteps.cs new file mode 100644 index 000000000000..e53d241b691f --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Samples/Sample_PersistentAgents_VectorStoreFile_WithSteps.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 System.Threading; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Tests; + +public partial class Sample_PersistentAgents_VectorStoreFile_WithSteps : SamplesBase +{ + [Test] + [AsyncOnly] + public async Task FilesSearchWithStepsExampleAsync() + { + #region Snippet:PersistentAgents_VectorStoreFileSearch_CreateClient +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); + #endregion + #region Snippet:PersistentAgents_VectorStoreFileSearch_FilesToUse_Async + // Upload a file and wait for it to be processed + System.IO.File.WriteAllText( + path: "sample_file_for_upload.txt", + contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); + PersistentAgentFileInfo uploadedAgentFile = await client.Files.UploadFileAsync( + filePath: "sample_file_for_upload.txt", + purpose: PersistentAgentFilePurpose.Agents); + Dictionary fileIds = new() + { + { uploadedAgentFile.Id, uploadedAgentFile.Filename } + }; + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_VectorStore_Async + // Create a vector store. + // If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active + PersistentAgentsVectorStore vectorStore = await client.VectorStores.CreateVectorStoreAsync( + name: "my_vector_store"); + // Add file ID to vector store. + VectorStoreFile vctFile = await client.VectorStores.CreateVectorStoreFileAsync( + vectorStoreId: vectorStore.Id, + fileId: uploadedAgentFile.Id + ); + Console.WriteLine($"Added file to vector store. The id file in the vector store is {vctFile.Id}."); + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_CreateAgent_Async + FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); + fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); + + // Create an Agent with toolResources and process Agent run + PersistentAgent agent = await client.Administration.CreateAgentAsync( + model: modelDeploymentName, + name: "SDK Test Agent - Retrieval", + instructions: "You are a helpful agent that can help fetch data from files you know about.", + tools: new List { new FileSearchToolDefinition() }, + toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_CreateThreadAndRun_Async + // Create thread for communication + PersistentAgentThread thread = await client.Threads.CreateThreadAsync(); + + // Create message to thread + PersistentThreadMessage messageResponse = await client.Messages.CreateMessageAsync( + thread.Id, + MessageRole.User, + "Can you give me the documented codes for 'banana' and 'orange'?"); + + // Run the Agent + ThreadRun run = await client.Runs.CreateRunAsync(thread, agent); + + do + { + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await client.Runs.GetRunAsync(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + List messages = await client.Messages.GetMessagesAsync( + threadId: thread.Id, + order: ListSortOrder.Ascending + ).ToListAsync(); + WriteMessages(messages, fileIds); + #endregion + #region Snippet:PersistentAgents_VectorStoreFileSearch_ShowRunSteps_Async + await foreach (RunStep step in client.Runs.GetRunStepsAsync(run)) + { + printRunStepInfo(step); + } + #endregion + #region Snippet:PersistentAgents_VectorStoreFileSearch_Cleanup_Async + await client.VectorStores.DeleteVectorStoreAsync(vectorStore.Id); + await client.Files.DeleteFileAsync(uploadedAgentFile.Id); + await client.Threads.DeleteThreadAsync(thread.Id); + await client.Administration.DeleteAgentAsync(agent.Id); + #endregion + } + + [Test] + [SyncOnly] + public void FilesSearchWithStepsExampleSync() + { +#if SNIPPET + var projectEndpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var projectEndpoint = TestEnvironment.PROJECT_ENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential()); + #region Snippet:PersistentAgents_VectorStoreFileSearch_FilesToUse_Sync + // Upload a file and wait for it to be processed + System.IO.File.WriteAllText( + path: "sample_file_for_upload.txt", + contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); + PersistentAgentFileInfo uploadedAgentFile = client.Files.UploadFile( + filePath: "sample_file_for_upload.txt", + purpose: PersistentAgentFilePurpose.Agents); + Dictionary fileIds = new() + { + { uploadedAgentFile.Id, uploadedAgentFile.Filename } + }; + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_VectorStore_Sync + // Create a vector store with the file and wait for it to be processed. + // If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active + PersistentAgentsVectorStore vectorStore = client.VectorStores.CreateVectorStore( + name: "my_vector_store"); + // Add file ID to vector store. + VectorStoreFile vctFile = client.VectorStores.CreateVectorStoreFile( + vectorStoreId: vectorStore.Id, + fileId: uploadedAgentFile.Id + ); + Console.WriteLine($"Added file to vector store. The id file in the vector store is {vctFile.Id}."); + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_CreateAgent_Sync + FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); + fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); + + // Create an Agent with toolResources and process Agent run + PersistentAgent agent = client.Administration.CreateAgent( + model: modelDeploymentName, + name: "SDK Test Agent - Retrieval", + instructions: "You are a helpful agent that can help fetch data from files you know about.", + tools: new List { new FileSearchToolDefinition() }, + toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_CreateThreadAndRun_Sync + // Create thread for communication + PersistentAgentThread thread = client.Threads.CreateThread(); + + // Create message to thread + PersistentThreadMessage messageResponse = client.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "Can you give me the documented codes for 'banana' and 'orange'?"); + + // Run the Agent + ThreadRun run = client.Runs.CreateRun(thread, agent); + + do + { + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = client.Runs.GetRun(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + Pageable messages = client.Messages.GetMessages( + threadId: thread.Id, + order: ListSortOrder.Ascending + ); + WriteMessages(messages, fileIds); + #endregion + #region Snippet:PersistentAgents_VectorStoreFileSearch_ShowRunSteps_Sync + foreach (RunStep step in client.Runs.GetRunSteps(run)) + { + printRunStepInfo(step); + } + #endregion + #region Snippet:PersistentAgents_VectorStoreFileSearch_Cleanup_Sync + client.VectorStores.DeleteVectorStore(vectorStore.Id); + client.Files.DeleteFile(uploadedAgentFile.Id); + client.Threads.DeleteThread(thread.Id); + client.Administration.DeleteAgent(agent.Id); + #endregion + } + + #region Snippet:PersistentAgents_VectorStoreFileSearch_Print + private static void WriteMessages(IEnumerable messages, Dictionary fileIds) + { + foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) + { + string strMessage = textItem.Text; + foreach (MessageTextAnnotation annotation in textItem.Annotations) + { + if (annotation is MessageTextFilePathAnnotation pathAnnotation) + { + strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); + } + else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) + { + strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); + } + } + Console.Write(strMessage); + } + else + { + Console.Write(textItem.Text); + } + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" fileIds, string fileID, string placeholder, string text) + { + if (fileIds.TryGetValue(fileID, out string replacement)) + return text.Replace(placeholder, $" [{replacement}]"); + else + return text.Replace(placeholder, $" [{fileID}]"); + } + #endregion + + #region Snippet:PersistentAgents_VectorStoreFileSearch_PrintSteps + private static void printRunStepInfo(RunStep step) + { + if (step.StepDetails is RunStepMessageCreationDetails messageCreationDetails) + { + Console.WriteLine($"Message creation step: messageID {messageCreationDetails.MessageCreation.MessageId}"); + } + else if (step.StepDetails is RunStepToolCallDetails toolCallDetails) + { + Console.WriteLine($"Tool call step: Tool count: {toolCallDetails.ToolCalls.Count}; First tool {toolCallDetails.ToolCalls.First().Type}"); + if (toolCallDetails.ToolCalls[0] is RunStepFileSearchToolCall fileSearch) + { + Console.WriteLine($"\tFile search returned {fileSearch.FileSearch.Results.Count} result(s)."); + if (fileSearch.FileSearch.Results.Count > 0) + { + Console.WriteLine($"\t\tFound result in file {fileSearch.FileSearch.Results[0].FileName}"); + } + } + } + else + { + Console.WriteLine(step.RunId); + } + } + #endregion +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml b/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml index 699036df31bc..55cc339ea283 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Agents -commit: 75e29d97bf8864dd5e87c0a1054d21e986b757e1 +commit: 92d30ce3b5d901b4dab77bb3d7784e49e5456519 repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/ai/Azure.AI.Inference/CHANGELOG.md b/sdk/ai/Azure.AI.Inference/CHANGELOG.md index b93de731e4e1..184ac9afd924 100644 --- a/sdk/ai/Azure.AI.Inference/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Inference/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.6 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.0.0-beta.5 (2025-05-14) + +### Other Changes + +- Updated support for `AIInferenceExtensions` methods to consume stable SCM version. + ## 1.0.0-beta.4 (2025-03-18) ### Features Added diff --git a/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj b/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj index e98241911ddc..87870f1a7f27 100644 --- a/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj +++ b/sdk/ai/Azure.AI.Inference/src/Azure.AI.Inference.csproj @@ -2,7 +2,7 @@ This is the Microsoft Azure AI Inference Service client library Microsoft Azure.AI.Inference client library - 1.0.0-beta.5 + 1.0.0-beta.6 Azure Inference $(RequiredTargetFrameworks) $(NoWarn);CS1591;AZC0030;AZC0031 diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolChoiceType.cs index 930fad82bc73..cf6876b9862f 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolChoiceType.cs +++ b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsNamedToolChoiceType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Inference { - /// The ChatCompletionsNamedToolChoice_type. + /// The ChatCompletionsNamedToolChoiceType. public readonly partial struct ChatCompletionsNamedToolChoiceType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolCallType.cs b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolCallType.cs index 660eae8b8078..bc3bda194638 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolCallType.cs +++ b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolCallType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Inference { - /// The ChatCompletionsToolCall_type. + /// The ChatCompletionsToolCallType. public readonly partial struct ChatCompletionsToolCallType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolDefinitionType.cs b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolDefinitionType.cs index 0204f4682b9d..547810f108bc 100644 --- a/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolDefinitionType.cs +++ b/sdk/ai/Azure.AI.Inference/src/Generated/ChatCompletionsToolDefinitionType.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Inference { - /// The ChatCompletionsToolDefinition_type. + /// The ChatCompletionsToolDefinitionType. public readonly partial struct ChatCompletionsToolDefinitionType : IEquatable { private readonly string _value; diff --git a/sdk/ai/Azure.AI.Projects/CHANGELOG.md b/sdk/ai/Azure.AI.Projects/CHANGELOG.md index 25dc860be5f0..3c91b3a647ba 100644 --- a/sdk/ai/Azure.AI.Projects/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Projects/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.9 (Unreleased) +## 1.0.0-beta.10 (Unreleased) ### Features Added @@ -10,6 +10,29 @@ ### Other Changes +## 1.0.0-beta.9 (2025-05-16) + +### Features Added +* `Deployments` methods to enumerate AI models deployed to your AI Foundry Project. +* `Datasets` methods to upload documents and reference them. To be used with Evaluations. +* `Indexes` methods to handle Search Indexes. + +### Breaking Changes +* Azure AI Foundry Project endpoint is now required to construct the `AIProjectClient`. It has the form +`https://.services.ai.azure.com/api/projects/`. Find it in your AI Foundry Project Overview page. +* Agents are now implemented in a separate package `Azure.AI.Agents.Persistent`. Use the `GetPersistentAgentsClient` method on the +`AIProjectsClient` to create, run and delete agents. However there have been some breaking changes in these operations. See [Agents package document and samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent) for more details. +* Several changes to the `Connections` methods, including the response object (now it is simply called `Connection`). The class `ConnectionProperties` was renamed to `Connection`, and its properties have changed. +* `GetAzureOpenAIChatClient` now supports returning an authenticated `AzureOpenAI` ChatClient to be used with +AI models deployed to the Project's AI Services. +* The method `UploadFileRequest` on `AIProjectClient` had been removed, use `UploadFile` in `Datasets` instead. +* Property `scope` on `AIProjectClient` is removed. +* Evaluator Ids are available using the class `EvaluatorIDs` and no longer require `Azure.AI.Evaluation` package to be installed. +* Property `Id` on Evaluation is replaced with `name`. + +### Sample Updates +* All samples have been updated. New ones have been added for Deployments, Datasets, and Indexes. + ## 1.0.0-beta.8 (2025-04-23) ### Sample Updates diff --git a/sdk/ai/Azure.AI.Projects/README.md b/sdk/ai/Azure.AI.Projects/README.md index 358e294fcbc0..7705a42b0f7b 100644 --- a/sdk/ai/Azure.AI.Projects/README.md +++ b/sdk/ai/Azure.AI.Projects/README.md @@ -1,8 +1,16 @@ # Azure AI Projects client library for .NET -Use the AI Projects client library to: +The AI Projects client library (in preview) is part of the Azure AI Foundry SDK and provides easy access to resources in your Azure AI Foundry Project. Use it to: -* **Develop Agents using the Azure AI Agent Service**, leveraging an extensive ecosystem of models, tools, and capabilities from OpenAI, Microsoft, and other LLM providers. The Azure AI Agent Service enables the building of Agents for a wide range of generative AI use cases. The package is currently in preview. -* **Enumerate connections** in your Azure AI Foundry project and get connection properties. For example, get the inference endpoint URL and credentials associated with your Azure OpenAI connection. +* **Create and run Agents** using the `GetPersistentAgentsClient` method on the client. +* **Get an AzureOpenAI client** using the `GetAzureOpenAIChatClient` method on the client. +* **Enumerate AI Models** deployed to your Foundry Project using the `Deployments` operations. +* **Enumerate connected Azure resources** in your Foundry project using the `Connections` operations. +* **Upload documents and create Datasets** to reference them using the `Datasets` operations. +* **Create and enumerate Search Indexes** using the `Indexes` operations. +* **Get an Azure AI Inference client** for chat completions, text or image embeddings using the `Inference` extensions. + +> **Note:** There have been significant updates with the release of version 1.0.0-beta.9, including breaking changes. Please see new code snippets below and the samples folder. Agents are now implemented in a separate package `Azure.AI.Agents.Persistent`, which will get installed automatically when you install `Azure.AI.Projects`. You can continue using "agents" operations on the `AIProjectsClient` to create, run and delete agents, as before. +See [full set of Agents samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent/samples) in their new location. Also see the [change log for the 1.0.0-beta.9 release](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/CHANGELOG.md). [Product documentation][product_doc] | [Samples][samples] @@ -18,21 +26,13 @@ Use the AI Projects client library to: - [Key concepts](#key-concepts) - [Create and authenticate the client](#create-and-authenticate-the-client) - [Examples](#examples) - - [Agents](#agents) - - [Create an Agent](#create-an-agent) - - [Create thread](#create-thread) - - [Create message](#create-message) - - [Create and execute run](#create-and-execute-run) - - [Retrieve messages](#retrieve-messages) - - [File search](#file-search) - - [Enterprise File Search](#create-agent-with-enterprise-file-search) - - [Code interpreter attachment](#create-message-with-code-interpreter-attachment) - - [Create Agent with Bing Grounding](#create-agent-with-bing-grounding) - - [Azure AI Search](#create-agent-with-azure-ai-search) - - [Function call Executed Manually](#function-call-executed-manually) - - [Function call Executed Automatically](#function-call-executed-automatically) - - [Azure function Call](#azure-function-call) - - [OpenAPI](#create-agent-with-openapi) + - [Performing Agent operations](#performing-agent-operations) + - [Get an authenticated AzureOpenAI client](#get-an-authenticated-azureopenai-client) + - [Get an authenticated ChatCompletionsClient](#get-an-authenticated-chatcompletionsclient) + - [Deployments operations](#deployments-operations) + - [Connections operations](#connections-operations) + - [Dataset operations](#dataset-operations) + - [Indexes operations](#indexes-operations) - [Troubleshooting](#troubleshooting) - [Next steps](#next-steps) - [Contributing](#contributing) @@ -65,70 +65,57 @@ dotnet add package Azure.Identity To interact with Azure AI Projects, you’ll need to create an instance of `AIProjectClient`. Use the appropriate credential type from the Azure Identity library. For example, [DefaultAzureCredential][azure_identity_dac]: -```C# Snippet:OverviewCreateClient -var connectionString = Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -AIProjectClient projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); +```C# Snippet:AI_Projects_OverviewCreateClient +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); ``` -Once the `AIProjectClient` is created, you can call methods in the form of `GetXxxClient()` on this client to retrieve instances of specific sub-clients. +Once the `AIProjectClient` is created, you can call methods in the form of `GetClient()` on this client to retrieve instances of specific sub-clients. ## Examples -### Agents - -Agents in the Azure AI Projects client library are designed to facilitate various interactions and operations within your AI projects. They serve as the core components that manage and execute tasks, leveraging different tools and resources to achieve specific goals. The following steps outline the typical sequence for interacting with agents: +### Performing Agent operations -#### Create an Agent +The `GetPersistentAgentsClient` method on the `AIProjectsClient` gives you access to an authenticated `PersistentAgentsClient` from the `Azure.AI.Agents.Persistent` package. Below we show how to create an Agent and delete it. To see what you can do with the agent you created, see the [many samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent/samples) associated with the `Azure.AI.Agents.Persistent` package. -First, you need to create an `AgentsClient` -```C# Snippet:OverviewCreateAgentClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); +The code below assumes `ModelDeploymentName` (a string) is defined. It's the deployment name of an AI model in your Foundry Project, as shown in the "Models + endpoints" tab, under the "Name" column. +```C# Snippet:AI_Projects_ExtensionsAgentsBasicsSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +PersistentAgentsClient agentsClient = projectClient.GetPersistentAgentsClient(); -With an authenticated client, an agent can be created: -```C# Snippet:OverviewCreateAgent -Agent agent = await client.CreateAgentAsync( +// Step 1: Create an agent +PersistentAgent agent = agentsClient.Administration.CreateAgent( model: modelDeploymentName, name: "Math Tutor", instructions: "You are a personal math tutor. Write and run code to answer math questions." ); -``` -#### Create thread +//// Step 2: Create a thread +PersistentAgentThread thread = agentsClient.Threads.CreateThread(); -Next, create a thread: -```C# Snippet:OverviewCreateThread -AgentThread thread = await client.CreateThreadAsync(); -``` - -#### Create message - -With a thread created, messages can be created on it: -```C# Snippet:OverviewCreateMessage -ThreadMessage message = await client.CreateMessageAsync( +// Step 3: Add a message to a thread +PersistentThreadMessage message = agentsClient.Messages.CreateMessage( thread.Id, MessageRole.User, "I need to solve the equation `3x + 11 = 14`. Can you help me?"); -``` -#### Create and execute run +// Intermission: message is now correlated with thread +// Intermission: listing messages will retrieve the message just added -A run can then be started that evaluates the thread against an agent: -```C# Snippet:OverviewCreateRun -ThreadRun run = await client.CreateRunAsync( +List messagesList = [.. agentsClient.Messages.GetMessages(thread.Id)]; +Assert.AreEqual(message.Id, messagesList[0].Id); + +// Step 4: Run the agent +ThreadRun run = agentsClient.Runs.CreateRun( thread.Id, agent.Id, additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); -``` - -Once the run has started, it should then be polled until it reaches a terminal status: -```C# Snippet:OverviewWaitForRun do { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentsClient.Runs.GetRun(thread.Id, run.Id); } while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); @@ -136,18 +123,12 @@ Assert.AreEqual( RunStatus.Completed, run.Status, run.LastError?.Message); -``` -#### Retrieve messages - -Assuming the run successfully completed, listing messages from the thread that was run will now reflect new information -added by the agent: -```C# Snippet:OverviewListUpdatedMessages -PageableList messages - = await client.GetMessagesAsync( +Pageable messages + = agentsClient.Messages.GetMessages( threadId: thread.Id, order: ListSortOrder.Ascending); -foreach (ThreadMessage threadMessage in messages) +foreach (PersistentThreadMessage threadMessage in messages) { Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); foreach (MessageContent contentItem in threadMessage.ContentItems) @@ -163,794 +144,228 @@ foreach (ThreadMessage threadMessage in messages) Console.WriteLine(); } } -``` - -Example output from this sequence: -``` - 2024-10-15 23:12:59 - assistant: Yes, Jane Doe, the solution to the equation \(3x + 11 = 14\) is \(x = 1\). - 2024-10-15 23:12:51 - user: I need to solve the equation `3x + 11 = 14`. Can you help me? -``` - -#### File search - -Files can be uploaded and then referenced by agents or messages. First, use the generalized upload API with a -purpose of 'agents' to make a file ID available: -```C# Snippet:UploadAgentFilesToUse -// Upload a file and wait for it to be processed -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -Dictionary fileIds = new() -{ - { uploadedAgentFile.Id, uploadedAgentFile.Filename } -}; -``` - -Once uploaded, the file ID can then be provided to create a vector store for it -```C# Snippet:CreateVectorStore -// Create a vector store with the file and wait for it to be processed. -// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active -VectorStore vectorStore = await client.CreateVectorStoreAsync( - fileIds: new List { uploadedAgentFile.Id }, - name: "my_vector_store"); -``` - -The vectorStore ID can then be provided to an agent upon creation. Note that file search will only be used if an appropriate tool like Code Interpreter is enabled. Also, you do not need to provide toolResources if you did not create a vector store above -```C# Snippet:CreateAgentWithFiles -FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); -fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - -// Create an agent with toolResources and process assistant run -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); -``` - -With a file ID association and a supported tool enabled, the agent will then be able to consume the associated -data when running threads. - -#### Create Agent with Enterprise File Search - -We can upload file to Azure as it is shown in the example, or use the existing Azure blob storage. In the code below we demonstrate how this can be achieved. First we upload file to azure and create `VectorStoreDataSource`, which then is used to create vector store. This vector store is then given to the `FileSearchTool` constructor. - -```C# Snippet:CreateVectorStoreBlob -var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset -); -VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store", - storeConfiguration: new VectorStoreConfiguration( - dataSources: [ ds ] - ) -); - -FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); -List tools = [new FileSearchToolDefinition()]; -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); +agentsClient.Threads.DeleteThread(threadId: thread.Id); +agentsClient.Administration.DeleteAgent(agentId: agent.Id); ``` -We also can attach files to the existing vector store. In the code snippet below, we first create an empty vector store and add file to it. +### Get an authenticated AzureOpenAI client -```C# Snippet:BatchFileAttachment -var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset -); -VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store" -); - -VectorStoreFileBatch vctFile = await client.CreateVectorStoreFileBatchAsync( - vectorStoreId: vectorStore.Id, - dataSources: [ ds ] -); -Console.WriteLine($"Created vector store file batch, vector store file batch ID: {vctFile.Id}"); +Your Azure AI Foundry project may have one or more OpenAI models deployed that support chat completions. Use the code below to get an authenticated ChatClient from the [Azure.AI.OpenAI](https://learn.microsoft.com/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet) package, and execute a chat completions call. -FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); -``` - -#### Create Message with Code Interpreter Attachment - -To attach a file with the context to the message, use the `MessageAttachment` class. To be able to process the attached file contents we need to provide the `List` with the single element `CodeInterpreterToolDefinition` as a `tools` parameter to both `CreateAgent` method and `MessageAttachment` class constructor. - -Here is an example to pass `CodeInterpreterTool` as tool: - -```C# Snippet:CreateAgentWithInterpreterTool -List tools = [ new CodeInterpreterToolDefinition() ]; -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: tools -); +The code below assumes `ModelDeploymentName` (a string) is defined. It's the deployment name of an AI model in your Foundry Project, or a connected Azure OpenAI resource. As shown in the "Models + endpoints" tab, under the "Name" column. -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -var fileId = uploadedAgentFile.Id; - -var attachment = new MessageAttachment( - fileId: fileId, - tools: tools -); +You can update the `connectionName` with one of the connections in your Foundry project, and you can update the `apiVersion` value with one found in the "Data plane - inference" row [in this table](https://learn.microsoft.com/azure/ai-services/openai/reference#api-specs). -AgentThread thread = await client.CreateThreadAsync(); +```C# Snippet:AI_Projects_AzureOpenAISync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +ChatClient chatClient = projectClient.GetAzureOpenAIChatClient(deploymentName: modelDeploymentName, connectionName: null, apiVersion: null); -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "Can you give me the documented codes for 'banana' and 'orange'?", - attachments: [ attachment ] -); +ChatCompletion result = chatClient.CompleteChat("List all the rainbow colors"); +Console.WriteLine(result.Content[0].Text); ``` -Azure blob storage can be used as a message attachment. In this case, use `VectorStoreDataSource` as a data source: - -```C# Snippet:CreateMessageAttachmentWithBlobStore -var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset -); - -var attachment = new MessageAttachment( - ds: ds, - tools: tools -); -``` +### Get an authenticated ChatCompletionsClient -#### Create Agent with Bing Grounding +Your Azure AI Foundry project may have one or more AI models deployed that support chat completions. Use the code below to get an authenticated [ChatCompletionsClient](https://learn.microsoft.com/dotnet/api/azure.ai.inference.chatcompletionsclient?view=azure-dotnet-preview) from the `Azure.AI.Inference` package, and execute a chat completions call. -To enable your Agent to perform search through Bing search API, you use `BingGroundingTool` along with a connection. +The code below assumes `ModelDeploymentName` (a string) is defined. It's the deployment name of an AI model in your Foundry Project, or a connected Azure OpenAI resource. As shown in the "Models + endpoints" tab, under the "Name" column. -Here is an example: -```C# Snippet:BingGroundingAsync_GetConnection -ConnectionResponse bingConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(bingConnectionName); -var connectionId = bingConnection.Id; +```C# Snippet:AI_Projects_ChatClientSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); -ToolConnectionList connectionList = new() +var requestOptions = new ChatCompletionsOptions() { - ConnectionList = { new ToolConnection(connectionId) } + Messages = + { + new ChatRequestSystemMessage("You are a helpful assistant."), + new ChatRequestUserMessage("How many feet are in a mile?"), + }, + Model = modelDeploymentName }; -BingGroundingToolDefinition bingGroundingTool = new(connectionList); -``` -```C# Snippet:BingGroundingAsync_CreateAgent -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ bingGroundingTool ]); +Response response = chatClient.Complete(requestOptions); +Console.WriteLine(response.Value.Content); ``` -#### Create Agent with Azure AI Search +### Deployments operations -Azure AI Search is an enterprise search system for high-performance applications. -It integrates with Azure OpenAI Service and Azure Machine Learning, offering advanced -search technologies like vector search and full-text search. Ideal for knowledge base -insights, information discovery, and automation. Creating an Agent with Azure AI -Search requires an existing Azure AI Search Index. For more information and setup -guides, see [Azure AI Search Tool Guide](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/azure-ai-search). +The code below shows some Deployments operations, which allow you to enumerate the AI models deployed to your AI Foundry Projects. These models can be seen in the "Models + endpoints" tab in your AI Foundry Project. Full samples can be found under the "Deployment" folder in the [package samples][samples]. -```C# Snippet:CreateAgentWithAzureAISearchTool -ListConnectionsResponse connections = await projectClient.GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); +```C# Snippet:AI_Projects_DeploymentExampleSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +var modelPublisher = System.Environment.GetEnvironmentVariable("MODEL_PUBLISHER"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Deployments deployments = projectClient.GetDeploymentsClient(); -if (connections?.Value == null || connections.Value.Count == 0) +Console.WriteLine("List all deployments:"); +foreach (var deployment in deployments.GetDeployments()) { - throw new InvalidOperationException("No connections found for the Azure AI Search."); + Console.WriteLine(deployment); } -ConnectionResponse connection = connections.Value[0]; - -AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple -); -ToolResources toolResource = new() +Console.WriteLine($"List all deployments by the model publisher `{modelPublisher}`:"); +foreach (var deployment in deployments.GetDeployments(modelPublisher: modelPublisher)) { - AzureAISearch = searchResource -}; - -AgentsClient agentClient = projectClient.GetAgentsClient(); - -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ new AzureAISearchToolDefinition() ], - toolResources: toolResource); -``` - -If the agent has found the relevant information in the index, the reference -and annotation will be provided in the message response. In the example above, we replace -the reference placeholder by the actual reference and url. Please note, that to -get sensible result, the index needs to have fields "title" and "url". - -```C# Snippet:PopulateReferencesAgentWithAzureAISearchTool -PageableList messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" "Seattle, WA"; -FunctionToolDefinition getUserFavoriteCityTool = new("getUserFavoriteCity", "Gets the user's favorite city."); -// Example of a function with a single required parameter -string GetCityNickname(string location) => location switch -{ - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), -}; -FunctionToolDefinition getCityNicknameTool = new( - name: "getCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -// Example of a function with one required and one optional, enum parameter -string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch -{ - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() -}; -FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "getCurrentWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); +Console.WriteLine($"Get a single deployment named `{modelDeploymentName}`:"); +var deploymentDetails = deployments.GetDeployment(modelDeploymentName); +Console.WriteLine(deploymentDetails); ``` -With the functions defined in their appropriate tools, an agent can be now created that has those tools enabled: +### Connections operations -```C# Snippet:FunctionsCreateAgentWithFunctionTools -// note: parallel function calling is only supported with newer models like gpt-4-1106-preview -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [ getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool ] - ); -``` +The code below shows some Connection operations, which allow you to enumerate the Azure Resources connected to your AI Foundry Projects. These connections can be seen in the "Management Center", in the "Connected resources" tab in your AI Foundry Project. Full samples can be found under the "Connections" folder in the [package samples][samples]. -If the agent calls tools, the calling code will need to resolve `ToolCall` instances into matching -`ToolOutput` instances. For convenience, a basic example is extracted here: +```C# Snippet:AI_Projects_ConnectionsExampleSync +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var connectionName = Environment.GetEnvironmentVariable("CONNECTION_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Connections connectionsClient = projectClient.GetConnectionsClient(); -```C# Snippet:FunctionsHandleFunctionCalls -ToolOutput GetResolvedToolOutput(RequiredToolCall toolCall) +Console.WriteLine("List the properties of all connections:"); +foreach (var connection in connectionsClient.GetConnections()) { - if (toolCall is RequiredFunctionToolCall functionToolCall) - { - if (functionToolCall.Name == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCall, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionToolCall.Arguments); - if (functionToolCall.Name == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCall, GetCityNickname(locationArgument)); - } - if (functionToolCall.Name == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument)); - } - } - return null; + Console.WriteLine(connection); + Console.Write(connection.Name); } -``` -To handle user input like "what's the weather like right now in my favorite city?", polling the response for completion -should be supplemented by a `RunStatus` check for `RequiresAction` or, in this case, the presence of the -`RequiredAction` property on the run. Then, the collection of `ToolOutputSubmissions` should be submitted to the -run via the `SubmitRunToolOutputs` method so that the run can continue: - -```C# Snippet:FunctionsHandlePollingWithRequiredAction -do +Console.WriteLine("List the properties of all connections of a particular type (e.g., Azure OpenAI connections):"); +foreach (var connection in connectionsClient.GetConnections(connectionType: ConnectionType.AzureOpenAI)) { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - - if (run.Status == RunStatus.RequiresAction - && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = []; - foreach (RequiredToolCall toolCall in submitToolOutputsAction.ToolCalls) - { - toolOutputs.Add(GetResolvedToolOutput(toolCall)); - } - run = await client.SubmitToolOutputsToRunAsync(run, toolOutputs); - } + Console.WriteLine(connection); } -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` -Calling function with streaming requires small modification of the code above. Streaming updates contain one ToolOutput per update and now the GetResolvedToolOutput function will look like it is shown on the code snippet below: +Console.WriteLine($"Get the properties of a connection named `{connectionName}`:"); +var specificConnection = connectionsClient.Get(connectionName, includeCredentials: false); +Console.WriteLine(specificConnection); -```C# Snippet:FunctionsWithStreamingUpdateHandling -ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) -{ - if (functionName == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCallId, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); - if (functionName == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCallId, GetCityNickname(locationArgument)); - } - if (functionName == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument)); - } - return null; -} -``` +Console.WriteLine("Get the properties of a connection with credentials:"); +var specificConnectionCredentials = connectionsClient.Get(connectionName, includeCredentials: true); +Console.WriteLine(specificConnectionCredentials); -We create a stream and wait for the stream update of the `RequiredActionUpdate` type. This update will mark the point, when we need to submit tool outputs to the stream. We will submit outputs in the inner cycle. Please note that `RequiredActionUpdate` keeps only one required action, while our run may require multiple function calls, this case is handled in the inner cycle, so that we can add tool output to the existing array of outputs. After all required actions were submitted we clean up the array of required actions. +Console.WriteLine($"Get the properties of the default connection:"); +var defaultConnection = connectionsClient.GetDefault(includeCredentials: false); +Console.WriteLine(defaultConnection); -```C# Snippet:FunctionsWithStreamingUpdateCycle -List toolOutputs = []; -ThreadRun streamRun = null; -AsyncCollectionResult stream = client.CreateRunStreamingAsync(thread.Id, agent.Id); -do -{ - toolOutputs.Clear(); - await foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is RequiredActionUpdate submitToolOutputsUpdate) - { - RequiredActionUpdate newActionUpdate = submitToolOutputsUpdate; - toolOutputs.Add( - GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - )); - streamRun = submitToolOutputsUpdate.Value; - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - if (toolOutputs.Count > 0) - { - stream = client.SubmitToolOutputsToStreamAsync(streamRun, toolOutputs); - } -} -while (toolOutputs.Count > 0); +Console.WriteLine($"Get the properties of the default connection with credentials:"); +var defaultConnectionCredentials = connectionsClient.GetDefault(includeCredentials: true); +Console.WriteLine(defaultConnectionCredentials); ``` -#### Function call executed automatically +### Dataset operations -In addition to the manual function calls, SDK supports automatic function calling. After creating functions and`FunctionToolDefinition` according to the last section, here is the steps: +The code below shows some Dataset operations. Full samples can be found under the "Datasets" folder in the [package samples][samples]. -When you create an agent, you can specify the function call by tools argument similar to the example of manual function calls: -```C# Snippet:StreamingWithAutoFunctionCall_CreateAgent -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] -); -``` - -We create a thread and message similar to the example of manual function tool calls: -```C# Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); -``` - -Setup `AutoFunctionCallOptions`: -```C# Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls -List toolOutputs = new(); -Dictionary toolDelegates = new(); -toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); -toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); -toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); -AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); -``` +```C# Snippet:AI_Projects_DatasetsExampleSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Datasets datasets = projectClient.GetDatasetsClient(); -With autoFunctionCallOptions as parameter for `CreateRunStreamingAsync`, the agent will then call the function automatically when it is needed: -```C# Snippet:StreamingWithAutoFunctionCallAsync -await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } -} -``` -To allow the agent cast the parameters to the function call, you must use the supported argument types. They are `string`, `int`, `ushort`, `float`, `uint`, `decimal`, `double`, `long`, and `bool`. Other tpes such as array, dictionary, or classes are not supported. - -#### Azure function call - -We can use Azure Function from inside the agent. In the example below we are calling function "foo", which responds "Bar". In this example we create `AzureFunctionToolDefinition` object, with the function name, description, input and output queues, followed by function parameters. See below for the instructions on function deployment. -```C# Snippet:AzureFunctionsDefineFunctionTools -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var storageQueueUri = System.Environment.GetEnvironmentVariable("STORAGE_QUEUE_URI"); - -AgentsClient client = new(connectionString, new DefaultAzureCredential()); - -AzureFunctionToolDefinition azureFnTool = new( - name: "foo", - description: "Get answers from the foo bot.", - inputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-foo-input", - storageServiceEndpoint: storageQueueUri - ) - ), - outputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-tool-output", - storageServiceEndpoint: storageQueueUri - ) - ), - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - query = new - { - Type = "string", - Description = "The question to ask.", - }, - outputqueueuri = new - { - Type = "string", - Description = "The full output queue uri." - } - }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ) -); -``` - -Note that in this scenario we are asking agent to supply storage queue URI to the azure function whenever it is called. -```C# Snippet:AzureFunctionsCreateAgentWithFunctionTools -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful support agent. Use the provided function any " - + "time the prompt contains the string 'What would foo say?'. When you invoke " - + "the function, ALWAYS specify the output queue uri parameter as " - + $"'{storageQueueUri}/azure-function-tool-output'. Always responds with " - + "\"Foo says\" and then the response from the tool.", - tools: [ azureFnTool ] +Console.WriteLine("Uploading a single file to create Dataset version '1'..."); +var datasetResponse = datasets.UploadFile( + name: datasetName, + version: "1", + filePath: "sample_folder/sample_file1.txt" ); -``` +Console.WriteLine(datasetResponse); -After we have created a message with request to ask "What would foo say?", we need to wait while the run is in queued, in progress or requires action states. -```C# Snippet:AzureFunctionsHandlePollingWithRequiredAction -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the most prevalent element in the universe? What would foo say?"); +Console.WriteLine("Uploading folder to create Dataset version '2'..."); +datasetResponse = datasets.UploadFolder( + name: datasetName, + version: "2", + folderPath: "sample_folder" +); +Console.WriteLine(datasetResponse); -ThreadRun run = await client.CreateRunAsync(thread, agent); +Console.WriteLine("Retrieving Dataset version '1'..."); +DatasetVersion dataset = datasets.GetDataset(datasetName, "1"); +Console.WriteLine(dataset); -do +Console.WriteLine($"Listing all versions for Dataset '{datasetName}':"); +foreach (var ds in datasets.GetVersions(datasetName)) { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); + Console.WriteLine(ds); } -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` -To make a function call we need to create and deploy the Azure function. In the code snippet below, we have an example of function on C# which can be used by the code above. - -```C# -namespace FunctionProj +Console.WriteLine($"Listing latest versions for all datasets:"); +foreach (var ds in datasets.GetDatasetVersions()) { - public class Response - { - public required string Value { get; set; } - public required string CorrelationId { get; set; } - } - - public class Arguments - { - public required string OutputQueueUri { get; set; } - public required string CorrelationId { get; set; } - } - - public class Foo - { - private readonly ILogger _logger; - - public Foo(ILogger logger) - { - _logger = logger; - } - - [Function("Foo")] - public void Run([QueueTrigger("azure-function-foo-input")] Arguments input, FunctionContext executionContext) - { - var logger = executionContext.GetLogger("Foo"); - logger.LogInformation("C# Queue function processed a request."); - - // We have to provide the Managed identity for function resource - // and allow this identity a Queue Data Contributor role on the storage account. - var cred = new DefaultAzureCredential(); - var queueClient = new QueueClient(new Uri(input.OutputQueueUri), cred, - new QueueClientOptions { MessageEncoding = QueueMessageEncoding.Base64 }); - - var response = new Response - { - Value = "Bar", - // Important! Correlation ID must match the input correlation ID. - CorrelationId = input.CorrelationId - }; - - var jsonResponse = JsonSerializer.Serialize(response); - queueClient.SendMessage(jsonResponse); - } - } + Console.WriteLine(ds); } -``` - -In this code we define function input and output class: `Arguments` and `Response` respectively. These two data classes will be serialized in JSON. It is important that these both contain field `CorrelationId`, which is the same between input and output. -In our example the function will be stored in the storage account, created with the AI hub. For that we need to allow key access to that storage. In Azure portal go to Storage account > Settings > Configuration and set "Allow storage account key access" to Enabled. If it is not done, the error will be displayed "The remote server returned an error: (403) Forbidden." To create the function resource that will host our function, install azure-cli python package and run the next command: - -```shell -pip install -U azure-cli -az login -az functionapp create --resource-group your-resource-group --consumption-plan-location region --runtime dotnet-isolated --functions-version 4 --name function_name --storage-account storage_account_already_present_in_resource_group --app-insights existing_or_new_application_insights_name +Console.WriteLine("Deleting Dataset versions '1' and '2'..."); +datasets.Delete(datasetName, "1"); +datasets.Delete(datasetName, "2"); ``` -This function writes data to the output queue and hence needs to be authenticated to Azure, so we will need to assign the function system identity and provide it `Storage Queue Data Contributor`. To do that in Azure portal select the function, located in `your-resource-group` resource group and in Settings>Identity, switch it on and click Save. After that assign the `Storage Queue Data Contributor` permission on storage account used by our function (`storage_account_already_present_in_resource_group` in the script above) for just assigned System Managed identity. +### Indexes operations -Now we will create the function itself. Install [.NET](https://dotnet.microsoft.com/download) and [Core Tools](https://go.microsoft.com/fwlink/?linkid=2174087) and create the function project using next commands. -``` -func init FunctionProj --worker-runtime dotnet-isolated --target-framework net8.0 -cd FunctionProj -func new --name foo --template "HTTP trigger" --authlevel "anonymous" -dotnet add package Azure.Identity -dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues --prerelease -``` +The code below shows some Indexes operations. Full samples can be found under the "Indexes" folder in the [package samples][samples]. -**Note:** There is a "Azure Queue Storage trigger", however the attempt to use it results in error for now. -We have created a project, containing HTTP-triggered azure function with the logic in `Foo.cs` file. As far as we need to trigger Azure function by a new message in the queue, we will replace the content of a Foo.cs by the C# sample code above. -To deploy the function run the command from dotnet project folder: +```C# Snippet:AI_Projects_IndexesExampleSync +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var indexName = Environment.GetEnvironmentVariable("INDEX_NAME") ?? "my-index"; +var indexVersion = Environment.GetEnvironmentVariable("INDEX_VERSION") ?? "1.0"; +var aiSearchConnectionName = Environment.GetEnvironmentVariable("AI_SEARCH_CONNECTION_NAME") ?? "my-ai-search-connection-name"; +var aiSearchIndexName = Environment.GetEnvironmentVariable("AI_SEARCH_INDEX_NAME") ?? "my-ai-search-index-name"; +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Indexes indexesClient = projectClient.GetIndexesClient(); -``` -func azure functionapp publish function_name -``` - -In the `storage_account_already_present_in_resource_group` select the `Queue service` and create two queues: `azure-function-foo-input` and `azure-function-tool-output`. Note that the same queues are used in our sample. To check that the function is working, place the next message into the `azure-function-foo-input` and replace `storage_account_already_present_in_resource_group` by the actual resource group name, or just copy the output queue address. -```json -{ - "OutputQueueUri": "https://storage_account_already_present_in_resource_group.queue.core.windows.net/azure-function-tool-output", - "CorrelationId": "42" -} -``` - -Next, we will monitor the output queue or the message. You should receive the next message. -```json +RequestContent content = RequestContent.Create(new { - "Value": "Bar", - "CorrelationId": "42" -} -``` -Please note that the input `CorrelationId` is the same as output. -*Hint:* Place multiple messages to input queue and keep second internet browser window with the output queue open and hit the refresh button on the portal user interface, so that you will not miss the message. If the message instead went to `azure-function-foo-input-poison` queue, the function completed with error, please check your setup. -After we have tested the function and made sure it works, please make sure that the Azure AI Project have the next roles for the storage account: `Storage Account Contributor`, `Storage Blob Data Contributor`, `Storage File Data Privileged Contributor`, `Storage Queue Data Contributor` and `Storage Table Data Contributor`. Now the function is ready to be used by the agent. - - -#### Create Agent With OpenAPI - -OpenAPI specifications describe REST operations against a specific endpoint. Agents SDK can read an OpenAPI spec, create a function from it, and call that function against the REST endpoint without additional client-side execution. - -Here is an example creating an OpenAPI tool (using anonymous authentication): -```C# Snippet:OpenAPIDefineFunctionTools -OpenApiAnonymousAuthDetails oaiAuth = new(); -OpenApiToolDefinition openapiTool = new( - name: "get_weather", - description: "Retrieve weather information for a location", - spec: BinaryData.FromBytes(File.ReadAllBytes(file_path)), - auth: oaiAuth, - defaultParams: ["format"] + connectionName = aiSearchConnectionName, + indexName = aiSearchIndexName, + indexVersion = indexVersion, + type = "AzureSearch", + description = "Sample Index for testing", + displayName = "Sample Index" +}); + +Console.WriteLine($"Create an Index named `{indexName}` referencing an existing AI Search resource:"); +var index = indexesClient.CreateOrUpdate( + name: indexName, + version: indexVersion, + content: content ); +Console.WriteLine(index); -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful assistant.", - tools: [ openapiTool ] -); -``` +Console.WriteLine($"Get an existing Index named `{indexName}`, version `{indexVersion}`:"); +var retrievedIndex = indexesClient.GetIndex(name: indexName, version: indexVersion); +Console.WriteLine(retrievedIndex); -In this example we are using the `weather_openapi.json` file and agent will request the wttr.in website for the weather in a location fron the prompt. -```C# Snippet:OpenAPIHandlePollingWithRequiredAction -AgentThread thread = await client.CreateThreadAsync(); -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather in Seattle?"); - -ThreadRun run = await client.CreateRunAsync(thread, agent); +Console.WriteLine($"Listing all versions of the Index named `{indexName}`:"); +foreach (var version in indexesClient.GetVersions(name: indexName)) +{ + Console.WriteLine(version); +} -do +Console.WriteLine($"Listing all Indices:"); +foreach (var version in indexesClient.GetIndices()) { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); + Console.WriteLine(version); } -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); + +Console.WriteLine("Delete the Index version created above:"); +indexesClient.Delete(name: indexName, version: indexVersion); ``` ## Troubleshooting Any operation that fails will throw a [RequestFailedException][RequestFailedException]. The exception's `code` will hold the HTTP response status code. The exception's `message` contains a detailed message that may be helpful in diagnosing the issue: -```C# Snippet:Readme_Troubleshooting +```C# Snippet:AI_Projects_Readme_Troubleshooting try { - client.CreateMessage( - "thread1234", - MessageRole.User, - "I need to solve the equation `3x + 11 = 14`. Can you help me?"); + projectClient.GetDatasetsClient().GetDataset("non-existent-dataset-name", "non-existent-dataset-version"); } catch (RequestFailedException ex) when (ex.Status == 404) { diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs index 3cb02e983e08..7877a5a6ecc8 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs @@ -1,625 +1,198 @@ namespace Azure.AI.Projects { - public partial class Agent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal Agent() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Description { get { throw null; } } + internal AgentEvaluation() { } + public string Error { get { throw null; } } public string Id { get { throw null; } } - public string Instructions { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string Model { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData ResponseFormat { get { throw null; } } - public float? Temperature { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Tools { get { throw null; } } - public float? TopP { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Agent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Agent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AgentFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentFile() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Filename { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.AgentFilePurpose Purpose { get { throw null; } } - public int Size { get { throw null; } } - public Azure.AI.Projects.FileState? Status { get { throw null; } } - public string StatusDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentFilePurpose : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentFilePurpose(string value) { throw null; } - public static Azure.AI.Projects.AgentFilePurpose Agents { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose AgentsOutput { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose Batch { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose BatchOutput { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose FineTune { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose FineTuneResults { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose Vision { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentFilePurpose 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.Projects.AgentFilePurpose left, Azure.AI.Projects.AgentFilePurpose right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentFilePurpose (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentFilePurpose left, Azure.AI.Projects.AgentFilePurpose right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentPageableListOfVectorStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentPageableListOfVectorStore() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public string LastId { get { throw null; } } - public Azure.AI.Projects.AgentPageableListOfVectorStoreObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentPageableListOfVectorStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentPageableListOfVectorStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AgentPageableListOfVectorStoreFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentPageableListOfVectorStoreFile() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public string LastId { get { throw null; } } - public Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentPageableListOfVectorStoreFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentPageableListOfVectorStoreFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentPageableListOfVectorStoreFileObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentPageableListOfVectorStoreFileObject(string value) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject List { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject 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.Projects.AgentPageableListOfVectorStoreFileObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentPageableListOfVectorStoreObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentPageableListOfVectorStoreObject(string value) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreObject List { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentPageableListOfVectorStoreObject 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.Projects.AgentPageableListOfVectorStoreObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreObject right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentPageableListOfVectorStoreObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentPageableListOfVectorStoreObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentsApiResponseFormat : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AgentsApiResponseFormat() { } - public Azure.AI.Projects.ResponseFormat? Type { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Result { get { throw null; } } + public string Status { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentsApiResponseFormat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentsApiResponseFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentsApiResponseFormatMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsApiResponseFormatMode(string value) { throw null; } - public static Azure.AI.Projects.AgentsApiResponseFormatMode Auto { get { throw null; } } - public static Azure.AI.Projects.AgentsApiResponseFormatMode None { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsApiResponseFormatMode 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.Projects.AgentsApiResponseFormatMode left, Azure.AI.Projects.AgentsApiResponseFormatMode right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsApiResponseFormatMode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsApiResponseFormatMode left, Azure.AI.Projects.AgentsApiResponseFormatMode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentsApiToolChoiceOptionMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsApiToolChoiceOptionMode(string value) { throw null; } - public static Azure.AI.Projects.AgentsApiToolChoiceOptionMode Auto { get { throw null; } } - public static Azure.AI.Projects.AgentsApiToolChoiceOptionMode None { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsApiToolChoiceOptionMode 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.Projects.AgentsApiToolChoiceOptionMode left, Azure.AI.Projects.AgentsApiToolChoiceOptionMode right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsApiToolChoiceOptionMode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsApiToolChoiceOptionMode left, Azure.AI.Projects.AgentsApiToolChoiceOptionMode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentsClient - { - protected AgentsClient() { } - public AgentsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public AgentsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response CancelRun(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response CancelRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelRunAsync(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> CancelRunAsync(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateAgent(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateAgent(string model, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateAgentAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAgentAsync(string model, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, System.BinaryData content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, string content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, System.BinaryData content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, string content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateMessageAsync(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateRun(Azure.AI.Projects.AgentThread thread, Azure.AI.Projects.Agent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateRun(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRunAsync(Azure.AI.Projects.AgentThread thread, Azure.AI.Projects.Agent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateRunAsync(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual Azure.Response CreateThread(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateThread(System.Collections.Generic.IEnumerable messages = null, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateThreadAndRun(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateThreadAndRun(string assistantId, Azure.AI.Projects.AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, System.Collections.Generic.IEnumerable overrideTools = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateThreadAndRunAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAndRunAsync(string assistantId, Azure.AI.Projects.AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, System.Collections.Generic.IEnumerable overrideTools = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateThreadAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAsync(System.Collections.Generic.IEnumerable messages = null, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStore(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStore(System.Collections.Generic.IEnumerable fileIds = null, string name = null, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreAsync(System.Collections.Generic.IEnumerable fileIds = null, string name = null, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStoreFile(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStoreFile(string vectorStoreId, string fileId = null, Azure.AI.Projects.VectorStoreDataSource dataSource = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreFileAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreFileAsync(string vectorStoreId, string fileId = null, Azure.AI.Projects.VectorStoreDataSource dataSource = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStoreFileBatch(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStoreFileBatch(string vectorStoreId, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IEnumerable dataSources = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreFileBatchAsync(string vectorStoreId, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IEnumerable dataSources = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteAgent(string agentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteAgentAsync(string agentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteFile(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response DeleteVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteVectorStoreAsync(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteVectorStoreFile(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response DeleteVectorStoreFile(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAgent(string assistantId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetAgent(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetAgentAsync(string assistantId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetAgentAsync(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetAgents(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetAgentsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFile(string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetFile(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetFileAsync(string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFileContent(string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetFileContent(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetFileContentAsync(string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetFileContentAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetFiles(Azure.AI.Projects.AgentFilePurpose? purpose = default(Azure.AI.Projects.AgentFilePurpose?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetFilesAsync(Azure.AI.Projects.AgentFilePurpose? purpose = default(Azure.AI.Projects.AgentFilePurpose?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetMessage(string threadId, string messageId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetMessage(string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetMessageAsync(string threadId, string messageId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetMessageAsync(string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetMessages(string threadId, string runId = null, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetMessagesAsync(string threadId, string runId = null, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRun(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetRunAsync(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetRunAsync(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRuns(string threadId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunsAsync(string threadId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRunStep(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetRunStep(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetRunStepAsync(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetRunStepAsync(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRunSteps(Azure.AI.Projects.ThreadRun run, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRunSteps(string threadId, string runId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunStepsAsync(Azure.AI.Projects.ThreadRun run, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunStepsAsync(string threadId, string runId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetThread(string threadId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetThreadAsync(string threadId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetThreads(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetThreadsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreAsync(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFile(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFile(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileAsync(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFiles(string vectorStoreId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFiles(string vectorStoreId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFilesAsync(string vectorStoreId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFilesAsync(string vectorStoreId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStores(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStores(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoresAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoresAsync(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response ModifyVectorStore(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response ModifyVectorStore(string vectorStoreId, string name = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ModifyVectorStoreAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> ModifyVectorStoreAsync(string vectorStoreId, string name = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SubmitToolOutputsToRun(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SubmitToolOutputsToRun(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> SubmitToolOutputsToRunAsync(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task SubmitToolOutputsToRunAsync(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.ClientModel.CollectionResult SubmitToolOutputsToStream(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult SubmitToolOutputsToStreamAsync(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual Azure.Response UpdateAgent(string assistantId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateAgent(string assistantId, string model = null, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAgentAsync(string assistantId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAgentAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateMessage(string threadId, string messageId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateMessage(string threadId, string messageId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateMessageAsync(string threadId, string messageId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateMessageAsync(string threadId, string messageId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateRun(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateRun(string threadId, string runId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateRunAsync(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateRunAsync(string threadId, string runId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateThread(string threadId, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateThread(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateThreadAsync(string threadId, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateThreadAsync(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UploadFile(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UploadFile(System.IO.Stream data, Azure.AI.Projects.AgentFilePurpose purpose, string filename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UploadFile(string filePath, Azure.AI.Projects.AgentFilePurpose purpose, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UploadFileAsync(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UploadFileAsync(System.IO.Stream data, Azure.AI.Projects.AgentFilePurpose purpose, string filename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UploadFileAsync(string filePath, Azure.AI.Projects.AgentFilePurpose purpose, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.AI.Projects.AgentEvaluation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentsNamedToolChoice : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationRedactionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AgentsNamedToolChoice(Azure.AI.Projects.AgentsNamedToolChoiceType type) { } - public Azure.AI.Projects.FunctionName Function { get { throw null; } set { } } - public Azure.AI.Projects.AgentsNamedToolChoiceType Type { get { throw null; } set { } } + public AgentEvaluationRedactionConfiguration() { } + public bool? RedactScoreProperties { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentsNamedToolChoice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentsNamedToolChoice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentsNamedToolChoiceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsNamedToolChoiceType(string value) { throw null; } - public static Azure.AI.Projects.AgentsNamedToolChoiceType AzureAISearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType BingCustomSearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType BingGrounding { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType CodeInterpreter { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType ConnectedAgent { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType FileSearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType Function { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType MicrosoftFabric { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType Sharepoint { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsNamedToolChoiceType 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.Projects.AgentsNamedToolChoiceType left, Azure.AI.Projects.AgentsNamedToolChoiceType right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsNamedToolChoiceType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsNamedToolChoiceType left, Azure.AI.Projects.AgentsNamedToolChoiceType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.AgentStreamEvent Done { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent Error { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageDelta { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageIncomplete { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageInProgress { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCancelled { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCancelling { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunExpired { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunFailed { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunIncomplete { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunInProgress { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunQueued { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunRequiresAction { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCancelled { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepDelta { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepExpired { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepFailed { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentStreamEvent 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.Projects.AgentStreamEvent left, Azure.AI.Projects.AgentStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentStreamEvent left, Azure.AI.Projects.AgentStreamEvent right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.AgentEvaluationRedactionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationRedactionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentThread : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal AgentThread() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } + public AgentEvaluationRequest(string runId, System.Collections.Generic.IDictionary evaluators, string appInsightsConnectionString) { } + public string AppInsightsConnectionString { get { throw null; } } + public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } + public Azure.AI.Projects.AgentEvaluationRedactionConfiguration RedactionConfiguration { get { throw null; } set { } } + public string RunId { get { throw null; } } + public Azure.AI.Projects.AgentEvaluationSamplingConfiguration SamplingConfiguration { get { throw null; } set { } } + public string ThreadId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentEvaluationRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AgentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AgentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalDetails { get { throw null; } } + public string Error { get { throw null; } } + public string Evaluator { get { throw null; } } + public string EvaluatorId { get { throw null; } } + public string Reason { get { throw null; } } + public string RunId { get { throw null; } } + public float Score { get { throw null; } } + public string Status { get { throw null; } } + public string ThreadId { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentThread System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentThread System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AgentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentThreadCreationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationSamplingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AgentThreadCreationOptions() { } - public System.Collections.Generic.IList Messages { get { throw null; } } - public System.Collections.Generic.IDictionary Metadata { get { throw null; } set { } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } set { } } + public AgentEvaluationSamplingConfiguration(string name, float samplingPercent, float maxRequestRate) { } + public float MaxRequestRate { get { throw null; } } + public string Name { get { throw null; } } + public float SamplingPercent { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentThreadCreationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentThreadCreationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 AIClientModelFactory - { - public static Azure.AI.Projects.Agent Agent(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string name = null, string description = null, string model = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.AgentFile AgentFile(string id = null, int size = 0, string filename = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Projects.AgentFilePurpose purpose = default(Azure.AI.Projects.AgentFilePurpose)) { throw null; } - public static Azure.AI.Projects.AgentThread AgentThread(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.MessageTextFileCitationAnnotation MessageFileCitationTextAnnotation(string text, string fileId, string quote) { throw null; } - public static Azure.AI.Projects.MessageTextFilePathAnnotation MessageFilePathTextAnnotation(string text, string fileId) { throw null; } - public static Azure.AI.Projects.MessageImageFileContent MessageImageFileContent(string fileId) { throw null; } - public static Azure.AI.Projects.MessageTextContent MessageTextContent(string text, System.Collections.Generic.IEnumerable annotations) { throw null; } - public static Azure.AI.Projects.PageableList PageableList(System.Collections.Generic.IReadOnlyList data, string firstId, string lastId, bool hasMore) { throw null; } - public static Azure.AI.Projects.RequiredFunctionToolCall RequiredFunctionToolCall(string toolCallId, string functionName, string functionArguments) { throw null; } - public static Azure.AI.Projects.RunStep RunStep(string id = null, Azure.AI.Projects.RunStepType type = default(Azure.AI.Projects.RunStepType), string agentId = null, string threadId = null, string runId = null, Azure.AI.Projects.RunStepStatus status = default(Azure.AI.Projects.RunStepStatus), Azure.AI.Projects.RunStepDetails stepDetails = null, Azure.AI.Projects.RunStepError lastError = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiredAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Projects.RunStepCompletionUsage usage = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterToolCall RunStepCodeInterpreterToolCall(string id, string input, System.Collections.Generic.IReadOnlyList outputs) { throw null; } - public static Azure.AI.Projects.RunStepFunctionToolCall RunStepFunctionToolCall(string id, string name, string arguments, string output) { throw null; } - public static Azure.AI.Projects.SubmitToolOutputsAction SubmitToolOutputsAction(System.Collections.Generic.IEnumerable toolCalls) { throw null; } - public static Azure.AI.Projects.ThreadMessage ThreadMessage(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string threadId = null, Azure.AI.Projects.MessageStatus status = default(Azure.AI.Projects.MessageStatus), Azure.AI.Projects.MessageIncompleteDetails incompleteDetails = null, System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? incompleteAt = default(System.DateTimeOffset?), Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.Collections.Generic.IEnumerable contentItems = null, string agentId = null, string runId = null, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.ThreadRun ThreadRun(string id = null, string threadId = null, string agentId = null, Azure.AI.Projects.RunStatus status = default(Azure.AI.Projects.RunStatus), Azure.AI.Projects.RequiredAction requiredAction = null, Azure.AI.Projects.RunError lastError = null, string model = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?), System.DateTimeOffset? startedAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Projects.IncompleteRunDetails incompleteDetails = null, Azure.AI.Projects.RunCompletionUsage usage = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? parallelToolCalls = default(bool?)) { throw null; } + Azure.AI.Projects.AgentEvaluationSamplingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationSamplingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class AIProjectClient : System.ClientModel.Primitives.ClientConnectionProvider { protected AIProjectClient() : base (default(int)) { } - public AIProjectClient(string connectionString, Azure.Core.TokenCredential credential = null) : base (default(int)) { } - public AIProjectClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } - public AIProjectClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) : base (default(int)) { } - public AIProjectClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } + public AIProjectClient(System.Uri endpoint, Azure.Core.TokenCredential credential = null) : base (default(int)) { } + public AIProjectClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.AI.Projects.AgentsClient GetAgentsClient(string apiVersion = "2024-07-01-preview") { throw null; } + public Azure.AI.Projects.Telemetry Telemetry { get { throw null; } } public override System.Collections.Generic.IEnumerable GetAllConnections() { throw null; } + public OpenAI.Chat.ChatClient GetAzureOpenAIChatClient(string? connectionName = null, string? apiVersion = null, string? deploymentName = null) { throw null; } + public Azure.AI.Inference.ChatCompletionsClient GetChatCompletionsClient() { throw null; } public override System.ClientModel.Primitives.ClientConnection GetConnection(string connectionId) { throw null; } - public virtual Azure.AI.Projects.ConnectionsClient GetConnectionsClient(string apiVersion = "2024-07-01-preview") { throw null; } - public virtual Azure.AI.Projects.EvaluationsClient GetEvaluationsClient(string apiVersion = "2024-07-01-preview") { throw null; } - public virtual Azure.AI.Projects.TelemetryClient GetTelemetryClient(string apiVersion = "2024-07-01-preview") { throw null; } + public virtual Azure.AI.Projects.Connections GetConnectionsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.Datasets GetDatasetsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.Deployments GetDeploymentsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public Azure.AI.Inference.EmbeddingsClient GetEmbeddingsClient() { throw null; } + public virtual Azure.AI.Projects.Evaluations GetEvaluationsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public Azure.AI.Inference.ImageEmbeddingsClient GetImageEmbeddingsClient() { throw null; } + public virtual Azure.AI.Projects.Indexes GetIndexesClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.RedTeams GetRedTeamsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.ServicePatterns GetServicePatternsClient() { throw null; } } public partial class AIProjectClientOptions : Azure.Core.ClientOptions { - public AIProjectClientOptions(Azure.AI.Projects.AIProjectClientOptions.ServiceVersion version = Azure.AI.Projects.AIProjectClientOptions.ServiceVersion.V2024_07_01_Preview) { } + public AIProjectClientOptions(Azure.AI.Projects.AIProjectClientOptions.ServiceVersion version = Azure.AI.Projects.AIProjectClientOptions.ServiceVersion.V2025_05_15_Preview) { } public int ClientCacheSize { get { throw null; } set { } } public enum ServiceVersion { - V2024_07_01_Preview = 1, + V2025_05_01 = 1, + V2025_05_15_Preview = 2, } } public static partial class AIProjectsModelFactory { - public static Azure.AI.Projects.AgentPageableListOfVectorStore AgentPageableListOfVectorStore(Azure.AI.Projects.AgentPageableListOfVectorStoreObject @object = default(Azure.AI.Projects.AgentPageableListOfVectorStoreObject), System.Collections.Generic.IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreFile AgentPageableListOfVectorStoreFile(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject @object = default(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject), System.Collections.Generic.IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; } - public static Azure.AI.Projects.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Projects.AzureFunctionBindingType type = default(Azure.AI.Projects.AzureFunctionBindingType), Azure.AI.Projects.AzureFunctionStorageQueue storageQueue = null) { throw null; } - public static Azure.AI.Projects.ConnectionProperties ConnectionProperties(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.ConnectionPropertiesApiKeyAuth ConnectionPropertiesApiKeyAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null, Azure.AI.Projects.CredentialsApiKeyAuth credentials = null) { throw null; } - public static Azure.AI.Projects.ConnectionResponse ConnectionResponse(string id = null, string name = null, Azure.AI.Projects.ConnectionProperties properties = null) { throw null; } - public static Azure.AI.Projects.CredentialsApiKeyAuth CredentialsApiKeyAuth(string key = null) { throw null; } - public static Azure.AI.Projects.Evaluation Evaluation(string id = null, Azure.AI.Projects.InputData data = null, Azure.AI.Projects.EvaluationTarget target = null, string displayName = null, string description = null, Azure.AI.Projects.SystemData systemData = null, string status = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary evaluators = null) { throw null; } - public static Azure.AI.Projects.EvaluationSchedule EvaluationSchedule(string name = null, Azure.AI.Projects.ApplicationInsightsConfiguration data = null, string description = null, Azure.AI.Projects.SystemData systemData = null, string provisioningState = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string isEnabled = null, System.Collections.Generic.IDictionary evaluators = null, Azure.AI.Projects.Trigger trigger = null) { throw null; } - public static Azure.AI.Projects.FileSearchToolCallContent FileSearchToolCallContent(Azure.AI.Projects.FileSearchToolCallContentType type = default(Azure.AI.Projects.FileSearchToolCallContentType), string text = null) { throw null; } - public static Azure.AI.Projects.GetWorkspaceResponse GetWorkspaceResponse(string id = null, string name = null, Azure.AI.Projects.WorkspaceProperties properties = null) { throw null; } - public static Azure.AI.Projects.IncompleteRunDetails IncompleteRunDetails(Azure.AI.Projects.IncompleteDetailsReason reason = default(Azure.AI.Projects.IncompleteDetailsReason)) { throw null; } - public static Azure.AI.Projects.InternalConnectionPropertiesCustomAuth InternalConnectionPropertiesCustomAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.InternalConnectionPropertiesNoAuth InternalConnectionPropertiesNoAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.ListConnectionsResponse ListConnectionsResponse(System.Collections.Generic.IEnumerable value = null) { throw null; } - public static Azure.AI.Projects.MessageDelta MessageDelta(Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaChunk MessageDeltaChunk(string id = null, Azure.AI.Projects.MessageDeltaChunkObject @object = default(Azure.AI.Projects.MessageDeltaChunkObject), Azure.AI.Projects.MessageDelta delta = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaContent MessageDeltaContent(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = 0, Azure.AI.Projects.MessageDeltaImageFileContentObject imageFile = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextContent MessageDeltaTextContent(int index = 0, Azure.AI.Projects.MessageDeltaTextContentObject text = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, System.Collections.Generic.IEnumerable annotations = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = default(int?), int? endIndex = default(int?), string text = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextUrlCitationAnnotation MessageDeltaTextUrlCitationAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextUrlCitationDetails MessageDeltaTextUrlCitationDetails(string url = null, string title = null) { throw null; } - public static Azure.AI.Projects.MessageImageFileParam MessageImageFileParam(string fileId = null, Azure.AI.Projects.ImageDetailLevel? detail = default(Azure.AI.Projects.ImageDetailLevel?)) { throw null; } - public static Azure.AI.Projects.MessageImageUrlParam MessageImageUrlParam(string url = null, Azure.AI.Projects.ImageDetailLevel? detail = default(Azure.AI.Projects.ImageDetailLevel?)) { throw null; } - public static Azure.AI.Projects.MessageIncompleteDetails MessageIncompleteDetails(Azure.AI.Projects.MessageIncompleteDetailsReason reason = default(Azure.AI.Projects.MessageIncompleteDetailsReason)) { throw null; } - public static Azure.AI.Projects.MessageInputImageFileBlock MessageInputImageFileBlock(Azure.AI.Projects.MessageImageFileParam imageFile = null) { throw null; } - public static Azure.AI.Projects.MessageInputImageUrlBlock MessageInputImageUrlBlock(Azure.AI.Projects.MessageImageUrlParam imageUrl = null) { throw null; } - public static Azure.AI.Projects.MessageInputTextBlock MessageInputTextBlock(string text = null) { throw null; } - public static Azure.AI.Projects.MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) { throw null; } - public static Azure.AI.Projects.MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, Azure.AI.Projects.MessageTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) { throw null; } - public static Azure.AI.Projects.RequiredToolCall RequiredToolCall(string type = null, string id = null) { throw null; } - public static Azure.AI.Projects.ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType type = default(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType), Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema = null) { throw null; } - public static Azure.AI.Projects.RunCompletionUsage RunCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; } - public static Azure.AI.Projects.RunError RunError(string code = null, string message = null) { throw null; } - public static Azure.AI.Projects.RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary azureAISearch = null) { throw null; } - public static Azure.AI.Projects.RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingGrounding = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(Azure.AI.Projects.RunStepCodeInterpreterImageReference image = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterLogOutput RunStepCodeInterpreterLogOutput(string logs = null) { throw null; } - public static Azure.AI.Projects.RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; } - public static Azure.AI.Projects.RunStepCustomSearchToolCall RunStepCustomSearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingCustomSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepDelta RunStepDelta(Azure.AI.Projects.RunStepDeltaDetail stepDetails = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaChunk RunStepDeltaChunk(string id = null, Azure.AI.Projects.RunStepDeltaChunkObject @object = default(Azure.AI.Projects.RunStepDeltaChunkObject), Azure.AI.Projects.RunStepDelta delta = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = 0, Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject image = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = 0, string logs = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepFileSearchToolCallResults fileSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepDeltaFunction function = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaMessageCreation RunStepDeltaMessageCreation(Azure.AI.Projects.RunStepDeltaMessageCreationObject messageCreation = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaToolCall RunStepDeltaToolCall(int index = 0, string id = null, string type = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaToolCallObject RunStepDeltaToolCallObject(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } - public static Azure.AI.Projects.RunStepError RunStepError(Azure.AI.Projects.RunStepErrorCode code = default(Azure.AI.Projects.RunStepErrorCode), string message = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, Azure.AI.Projects.RunStepFileSearchToolCallResults fileSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = 0f, System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(Azure.AI.Projects.FileSearchRankingOptions rankingOptions = null, System.Collections.Generic.IEnumerable results = null) { throw null; } - public static Azure.AI.Projects.RunStepMessageCreationDetails RunStepMessageCreationDetails(Azure.AI.Projects.RunStepMessageCreationReference messageCreation = null) { throw null; } - public static Azure.AI.Projects.RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) { throw null; } - public static Azure.AI.Projects.RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary microsoftFabric = null) { throw null; } - public static Azure.AI.Projects.RunStepOpenAPIToolCall RunStepOpenAPIToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary openAPI = null) { throw null; } - public static Azure.AI.Projects.RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary sharePoint = null) { throw null; } - public static Azure.AI.Projects.RunStepToolCall RunStepToolCall(string type = null, string id = null) { throw null; } - public static Azure.AI.Projects.RunStepToolCallDetails RunStepToolCallDetails(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } - public static Azure.AI.Projects.SystemData SystemData(System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), string createdBy = null, string createdByType = null, System.DateTimeOffset? lastModifiedAt = default(System.DateTimeOffset?)) { throw null; } - public static Azure.AI.Projects.ThreadMessageOptions ThreadMessageOptions(Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.BinaryData content = null, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.VectorStore VectorStore(string id = null, Azure.AI.Projects.VectorStoreObject @object = default(Azure.AI.Projects.VectorStoreObject), System.DateTimeOffset createdAt = default(System.DateTimeOffset), string name = null, int usageBytes = 0, Azure.AI.Projects.VectorStoreFileCount fileCounts = null, Azure.AI.Projects.VectorStoreStatus status = default(Azure.AI.Projects.VectorStoreStatus), Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveAt = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = false, Azure.AI.Projects.VectorStoreDeletionStatusObject @object = default(Azure.AI.Projects.VectorStoreDeletionStatusObject)) { throw null; } - public static Azure.AI.Projects.VectorStoreFile VectorStoreFile(string id = null, Azure.AI.Projects.VectorStoreFileObject @object = default(Azure.AI.Projects.VectorStoreFileObject), int usageBytes = 0, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string vectorStoreId = null, Azure.AI.Projects.VectorStoreFileStatus status = default(Azure.AI.Projects.VectorStoreFileStatus), Azure.AI.Projects.VectorStoreFileError lastError = null, Azure.AI.Projects.VectorStoreChunkingStrategyResponse chunkingStrategy = null) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatch VectorStoreFileBatch(string id = null, Azure.AI.Projects.VectorStoreFileBatchObject @object = default(Azure.AI.Projects.VectorStoreFileBatchObject), System.DateTimeOffset createdAt = default(System.DateTimeOffset), string vectorStoreId = null, Azure.AI.Projects.VectorStoreFileBatchStatus status = default(Azure.AI.Projects.VectorStoreFileBatchStatus), Azure.AI.Projects.VectorStoreFileCount fileCounts = null) { throw null; } - public static Azure.AI.Projects.VectorStoreFileCount VectorStoreFileCount(int inProgress = 0, int completed = 0, int failed = 0, int cancelled = 0, int total = 0) { throw null; } - public static Azure.AI.Projects.VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = false, Azure.AI.Projects.VectorStoreFileDeletionStatusObject @object = default(Azure.AI.Projects.VectorStoreFileDeletionStatusObject)) { throw null; } - public static Azure.AI.Projects.VectorStoreFileError VectorStoreFileError(Azure.AI.Projects.VectorStoreFileErrorCode code = default(Azure.AI.Projects.VectorStoreFileErrorCode), string message = null) { throw null; } - public static Azure.AI.Projects.VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static = null) { throw null; } - public static Azure.AI.Projects.VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static = null) { throw null; } - public static Azure.AI.Projects.WorkspaceProperties WorkspaceProperties(string applicationInsights = null) { throw null; } - } - public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AISearchIndexResource(string indexConnectionId, string indexName) { } - public string Filter { get { throw null; } set { } } - public string IndexConnectionId { get { throw null; } set { } } - public string IndexName { get { throw null; } set { } } - public Azure.AI.Projects.AzureAISearchQueryType? QueryType { get { throw null; } set { } } - public int? TopK { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AOAIModelConfig : Azure.AI.Projects.TargetModelConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AOAIModelConfig(string azureEndpoint, string apiKey, string azureDeployment) { } - public string ApiKey { get { throw null; } set { } } - public string AzureDeployment { get { throw null; } set { } } - public string AzureEndpoint { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AOAIModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AOAIModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ApplicationInsightsConfiguration : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ApplicationInsightsConfiguration(string resourceId, string query) { } - public string ConnectionString { get { throw null; } set { } } - public string Query { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - public string ServiceName { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ApplicationInsightsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ApplicationInsightsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 Azure.AI.Projects.AgentEvaluation AgentEvaluation(string id = null, string status = null, string error = null, System.Collections.Generic.IEnumerable result = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluationRequest AgentEvaluationRequest(string runId = null, string threadId = null, System.Collections.Generic.IDictionary evaluators = null, Azure.AI.Projects.AgentEvaluationSamplingConfiguration samplingConfiguration = null, Azure.AI.Projects.AgentEvaluationRedactionConfiguration redactionConfiguration = null, string appInsightsConnectionString = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluationResult AgentEvaluationResult(string evaluator = null, string evaluatorId = null, float score = 0f, string status = null, string reason = null, string version = null, string threadId = null, string runId = null, string error = null, System.Collections.Generic.IReadOnlyDictionary additionalDetails = null) { throw null; } + public static Azure.AI.Projects.ApiKeyCredentials ApiKeyCredentials(string apiKey = null) { throw null; } + public static Azure.AI.Projects.AssetCredentialResponse AssetCredentialResponse(Azure.AI.Projects.BlobReference blobReference = null) { throw null; } + public static Azure.AI.Projects.AzureAISearchIndex AzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string connectionName = null, string indexName = null, Azure.AI.Projects.FieldMapping fieldMapping = null) { throw null; } + public static Azure.AI.Projects.BlobReference BlobReference(string blobUri = null, string storageAccountArmId = null, Azure.AI.Projects.SasCredential credential = null) { throw null; } + public static Azure.AI.Projects.Connection Connection(string name = null, string id = null, Azure.AI.Projects.ConnectionType type = default(Azure.AI.Projects.ConnectionType), string target = null, bool isDefault = false, Azure.AI.Projects.BaseCredentials credentials = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } + public static Azure.AI.Projects.CosmosDBIndex CosmosDBIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string connectionName = null, string databaseName = null, string containerName = null, Azure.AI.Projects.EmbeddingConfiguration embeddingConfiguration = null, Azure.AI.Projects.FieldMapping fieldMapping = null) { throw null; } + public static Azure.AI.Projects.CustomCredential CustomCredential(System.Collections.Generic.IReadOnlyDictionary keys = null) { throw null; } + public static Azure.AI.Projects.DatasetVersion DatasetVersion(string dataUri = null, string type = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Deployment Deployment(string type = null, string name = null) { throw null; } + public static Azure.AI.Projects.Evaluation Evaluation(string name = null, Azure.AI.Projects.InputData data = null, string displayName = null, string description = null, string status = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary evaluators = null) { throw null; } + public static Azure.AI.Projects.FileDatasetVersion FileDatasetVersion(string dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.FolderDatasetVersion FolderDatasetVersion(string dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Index Index(string type = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string vectorStoreId = null) { throw null; } + public static Azure.AI.Projects.ModelDeployment ModelDeployment(string name = null, string modelName = null, string modelVersion = null, string modelPublisher = null, System.Collections.Generic.IReadOnlyDictionary capabilities = null, Azure.AI.Projects.Sku sku = null, string connectionName = null) { throw null; } + public static Azure.AI.Projects.PendingUploadRequest PendingUploadRequest(string pendingUploadId = null, string connectionName = null, Azure.AI.Projects.PendingUploadType pendingUploadType = default(Azure.AI.Projects.PendingUploadType)) { throw null; } + public static Azure.AI.Projects.PendingUploadResponse PendingUploadResponse(Azure.AI.Projects.BlobReference blobReference = null, string pendingUploadId = null, string version = null, Azure.AI.Projects.PendingUploadType pendingUploadType = default(Azure.AI.Projects.PendingUploadType)) { throw null; } + public static Azure.AI.Projects.RedTeam RedTeam(string name = null, string displayName = null, int? numTurns = default(int?), System.Collections.Generic.IEnumerable attackStrategies = null, bool? simulationOnly = default(bool?), System.Collections.Generic.IEnumerable riskCategories = null, string applicationScenario = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string status = null, Azure.AI.Projects.TargetConfig target = null) { throw null; } + public static Azure.AI.Projects.SasCredential SasCredential(string sasUri = null, Azure.AI.Projects.SasCredentialType type = default(Azure.AI.Projects.SasCredentialType)) { throw null; } + public static Azure.AI.Projects.SASCredentials SASCredentials(string sasToken = null) { throw null; } + public static Azure.AI.Projects.Sku Sku(long capacity = (long)0, string family = null, string name = null, string size = null, string tier = null) { throw null; } + } + public partial class ApiKeyCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiKeyCredentials() { } + public string ApiKey { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ApiKeyCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ApiKeyCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssetCredentialResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssetCredentialResponse() { } + public Azure.AI.Projects.BlobReference BlobReference { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AssetCredentialResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AssetCredentialResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AttackStrategy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AttackStrategy(string value) { throw null; } + public static Azure.AI.Projects.AttackStrategy AnsiiAttack { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy AsciiArt { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy AsciiSmuggler { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Atbash { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Base64 { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Baseline { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Binary { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Caesar { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy CharacterSpace { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy CharacterSwap { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Diacritic { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Difficult { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Easy { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Flip { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Jailbreak { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Leetspeak { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Moderate { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Morse { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy ROT13 { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy StringJoin { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy SuffixAppend { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy UnicodeConfusable { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy UnicodeSubstitution { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Url { get { throw null; } } + public bool Equals(Azure.AI.Projects.AttackStrategy 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.Projects.AttackStrategy left, Azure.AI.Projects.AttackStrategy right) { throw null; } + public static implicit operator Azure.AI.Projects.AttackStrategy (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.AttackStrategy left, Azure.AI.Projects.AttackStrategy right) { throw null; } + public override string ToString() { throw null; } } public enum AuthenticationType { @@ -629,246 +202,88 @@ public enum AuthenticationType Custom = 3, None = 4, } - public partial class AutoFunctionCallOptions - { - public AutoFunctionCallOptions(System.Collections.Generic.Dictionary toolDelegates, int maxRetry) { } - } public partial class AzureAIProjectsContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureAIProjectsContext() { } public static Azure.AI.Projects.AzureAIProjectsContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AzureAISearchQueryType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AzureAISearchQueryType(string value) { throw null; } - public static Azure.AI.Projects.AzureAISearchQueryType Semantic { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType Simple { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType Vector { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType VectorSemanticHybrid { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType VectorSimpleHybrid { get { throw null; } } - public bool Equals(Azure.AI.Projects.AzureAISearchQueryType 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.Projects.AzureAISearchQueryType left, Azure.AI.Projects.AzureAISearchQueryType right) { throw null; } - public static implicit operator Azure.AI.Projects.AzureAISearchQueryType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AzureAISearchQueryType left, Azure.AI.Projects.AzureAISearchQueryType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AzureAISearchResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureAISearchResource() { } - public AzureAISearchResource(string indexConnectionId, string indexName, int topK = 5, string filter = "", Azure.AI.Projects.AzureAISearchQueryType? queryType = default(Azure.AI.Projects.AzureAISearchQueryType?)) { } - public System.Collections.Generic.IList IndexList { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureAISearchResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureAISearchResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureAISearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureAISearchToolDefinition() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureAISearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureAISearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureFunctionBinding : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionBinding(Azure.AI.Projects.AzureFunctionStorageQueue storageQueue) { } - public Azure.AI.Projects.AzureFunctionStorageQueue StorageQueue { get { throw null; } set { } } - public Azure.AI.Projects.AzureFunctionBindingType Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionBinding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionBinding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AzureFunctionBindingType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AzureFunctionBindingType(string value) { throw null; } - public static Azure.AI.Projects.AzureFunctionBindingType StorageQueue { get { throw null; } } - public bool Equals(Azure.AI.Projects.AzureFunctionBindingType 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.Projects.AzureFunctionBindingType left, Azure.AI.Projects.AzureFunctionBindingType right) { throw null; } - public static implicit operator Azure.AI.Projects.AzureFunctionBindingType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AzureFunctionBindingType left, Azure.AI.Projects.AzureFunctionBindingType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AzureFunctionStorageQueue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName) { } - public string QueueName { get { throw null; } set { } } - public string StorageServiceEndpoint { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionStorageQueue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionStorageQueue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureFunctionToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionToolDefinition(string name, string description, Azure.AI.Projects.AzureFunctionBinding inputBinding, Azure.AI.Projects.AzureFunctionBinding outputBinding, System.BinaryData parameters) { } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData Parameters { get { throw null; } } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class BingCustomSearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public BingCustomSearchToolDefinition(Azure.AI.Projects.SearchConfigurationList bingCustomSearch) { } - public Azure.AI.Projects.SearchConfigurationList BingCustomSearch { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.BingCustomSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BingCustomSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class BingGroundingToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureAISearchIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingToolDefinition(Azure.AI.Projects.ToolConnectionList bingGrounding) { } - public Azure.AI.Projects.ToolConnectionList BingGrounding { get { throw null; } set { } } + public AzureAISearchIndex(string connectionName, string indexName) { } + public string ConnectionName { get { throw null; } set { } } + public Azure.AI.Projects.FieldMapping FieldMapping { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BingGroundingToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CodeInterpreterToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureOpenAIModelConfiguration : Azure.AI.Projects.TargetConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CodeInterpreterToolDefinition() { } + public AzureOpenAIModelConfiguration(string modelDeploymentName) { } + public string ModelDeploymentName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CodeInterpreterToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CodeInterpreterToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CodeInterpreterToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CodeInterpreterToolResource() { } - public System.Collections.Generic.IList DataSources { get { throw null; } } - public System.Collections.Generic.IList FileIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CodeInterpreterToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CodeInterpreterToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AzureOpenAIModelConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureOpenAIModelConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedAgentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public abstract partial class BaseCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConnectedAgentDetails(string id, string name, string description) { } - public string Description { get { throw null; } set { } } - public string Id { get { throw null; } set { } } - public string Name { get { throw null; } set { } } + protected BaseCredentials() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectedAgentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectedAgentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.BaseCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BaseCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedAgentToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class BlobReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConnectedAgentToolDefinition(Azure.AI.Projects.ConnectedAgentDetails connectedAgent) { } - public Azure.AI.Projects.ConnectedAgentDetails ConnectedAgent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectedAgentToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectedAgentToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 ConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected ConnectionProperties(Azure.AI.Projects.ConnectionType category, string target) { } - public Azure.AI.Projects.AuthenticationType AuthType { get { throw null; } set { } } - public Azure.AI.Projects.ConnectionType Category { get { throw null; } } - public string Target { get { throw null; } } + internal BlobReference() { } + public string BlobUri { get { throw null; } } + public Azure.AI.Projects.SasCredential Credential { get { throw null; } } + public string StorageAccountArmId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.BlobReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BlobReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectionPropertiesApiKeyAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Connection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ConnectionPropertiesApiKeyAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - public Azure.AI.Projects.CredentialsApiKeyAuth Credentials { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionPropertiesApiKeyAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionPropertiesApiKeyAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ConnectionResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ConnectionResponse() { } + internal Connection() { } + public Azure.AI.Projects.BaseCredentials Credentials { get { throw null; } } public string Id { get { throw null; } } + public bool IsDefault { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Projects.ConnectionProperties Properties { get { throw null; } } + public string Target { get { throw null; } } + public Azure.AI.Projects.ConnectionType Type { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.Connection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Connection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectionsClient + public partial class Connections { - protected ConnectionsClient() { } - public ConnectionsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public ConnectionsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public ConnectionsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public ConnectionsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } + protected Connections() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response GetConnection(string connectionName, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetConnection(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionAsync(string connectionName, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConnections(Azure.AI.Projects.ConnectionType? category = default(Azure.AI.Projects.ConnectionType?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConnections(string category, bool? includeAll, string target, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionsAsync(Azure.AI.Projects.ConnectionType? category = default(Azure.AI.Projects.ConnectionType?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionsAsync(string category, bool? includeAll, string target, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetConnectionWithSecrets(string connectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetConnectionWithSecrets(string connectionName, string ignored, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionWithSecretsAsync(string connectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionWithSecretsAsync(string connectionName, string ignored, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDefaultConnection(Azure.AI.Projects.ConnectionType category, bool? withCredential = default(bool?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDefaultConnectionAsync(Azure.AI.Projects.ConnectionType category, bool? withCredential = default(bool?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkspace(Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetWorkspace(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetWorkspaceAsync(Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public Azure.AI.Projects.Connection Get(string connectionName, bool includeCredentials = false) { throw null; } + public System.Threading.Tasks.Task> GetAsync(string connectionName, bool includeCredentials = false) { throw null; } + public virtual Azure.Pageable GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetConnections(string connectionType, bool? defaultConnection, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetConnectionsAsync(string connectionType, bool? defaultConnection, Azure.RequestContext context) { throw null; } + public Azure.AI.Projects.Connection GetDefault(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } + public System.Threading.Tasks.Task GetDefaultAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectionType : System.IEquatable @@ -877,13 +292,14 @@ public ConnectionsClient(System.Uri endpoint, string subscriptionId, string reso private readonly int _dummyPrimitive; public ConnectionType(string value) { throw null; } public static Azure.AI.Projects.ConnectionType APIKey { get { throw null; } } + public static Azure.AI.Projects.ConnectionType ApplicationConfiguration { get { throw null; } } + public static Azure.AI.Projects.ConnectionType ApplicationInsights { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureAISearch { get { throw null; } } - public static Azure.AI.Projects.ConnectionType AzureAIServices { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureBlobStorage { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureOpenAI { get { throw null; } } - public static Azure.AI.Projects.ConnectionType CognitiveService { get { throw null; } } + public static Azure.AI.Projects.ConnectionType AzureStorageAccount { get { throw null; } } + public static Azure.AI.Projects.ConnectionType CosmosDB { get { throw null; } } public static Azure.AI.Projects.ConnectionType Custom { get { throw null; } } - public static Azure.AI.Projects.ConnectionType Serverless { get { throw null; } } public bool Equals(Azure.AI.Projects.ConnectionType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -894,73 +310,145 @@ public ConnectionsClient(System.Uri endpoint, string subscriptionId, string reso public static bool operator !=(Azure.AI.Projects.ConnectionType left, Azure.AI.Projects.ConnectionType right) { throw null; } public override string ToString() { throw null; } } - public partial class CredentialsApiKeyAuth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CosmosDBIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CredentialsApiKeyAuth() { } - public string Key { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CredentialsApiKeyAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CredentialsApiKeyAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public CosmosDBIndex(string connectionName, string databaseName, string containerName, Azure.AI.Projects.EmbeddingConfiguration embeddingConfiguration, Azure.AI.Projects.FieldMapping fieldMapping) { } + public string ConnectionName { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public Azure.AI.Projects.EmbeddingConfiguration EmbeddingConfiguration { get { throw null; } set { } } + public Azure.AI.Projects.FieldMapping FieldMapping { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.CosmosDBIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CosmosDBIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CronTrigger : Azure.AI.Projects.Trigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomCredential : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CronTrigger(string expression) { } - public string Expression { get { throw null; } set { } } + internal CustomCredential() { } + public System.Collections.Generic.IReadOnlyDictionary Keys { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CronTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CronTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.CustomCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CustomCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class Dataset : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Datasets { - public Dataset(string id) { } - public string Id { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Dataset System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Dataset System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected Datasets() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateOrUpdate(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Delete(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetCredentials(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCredentials(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCredentialsAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataset(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDataset(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDatasetAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatasetAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatasetVersions(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDatasetVersions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatasetVersionsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDatasetVersionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static string GetRelativePath(string folderPath, string filePath) { throw null; } + public virtual Azure.Pageable GetVersions(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetVersions(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PendingUpload(string name, string version, Azure.AI.Projects.PendingUploadRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PendingUpload(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> PendingUploadAsync(string name, string version, Azure.AI.Projects.PendingUploadRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PendingUploadAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public Azure.Response UploadFile(string name, string version, string filePath) { throw null; } + public Azure.Response UploadFolder(string name, string version, string folderPath) { throw null; } + } + public abstract partial class DatasetVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DatasetVersion(string dataUri) { } + public string ConnectionName { get { throw null; } set { } } + public string DataUri { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } } + public bool? IsReference { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.DatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DoneEvent : System.IEquatable + public abstract partial class Deployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DoneEvent(string value) { throw null; } - public static Azure.AI.Projects.DoneEvent Done { get { throw null; } } - public bool Equals(Azure.AI.Projects.DoneEvent 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.Projects.DoneEvent left, Azure.AI.Projects.DoneEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.DoneEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.DoneEvent left, Azure.AI.Projects.DoneEvent right) { throw null; } - public override string ToString() { throw null; } + protected Deployment() { } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Deployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Deployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class Deployments + { + protected Deployments() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response GetDeployment(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.DeploymentType? deploymentType = default(Azure.AI.Projects.DeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string modelPublisher, string modelName, string deploymentType, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.DeploymentType? deploymentType = default(Azure.AI.Projects.DeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, Azure.RequestContext context) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ErrorEvent : System.IEquatable + public readonly partial struct DeploymentType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ErrorEvent(string value) { throw null; } - public static Azure.AI.Projects.ErrorEvent Error { get { throw null; } } - public bool Equals(Azure.AI.Projects.ErrorEvent other) { throw null; } + public DeploymentType(string value) { throw null; } + public static Azure.AI.Projects.DeploymentType ModelDeployment { get { throw null; } } + public bool Equals(Azure.AI.Projects.DeploymentType 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.Projects.ErrorEvent left, Azure.AI.Projects.ErrorEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.ErrorEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ErrorEvent left, Azure.AI.Projects.ErrorEvent right) { throw null; } + public static bool operator ==(Azure.AI.Projects.DeploymentType left, Azure.AI.Projects.DeploymentType right) { throw null; } + public static implicit operator Azure.AI.Projects.DeploymentType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DeploymentType left, Azure.AI.Projects.DeploymentType right) { throw null; } public override string ToString() { throw null; } } + public partial class EmbeddingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) { } + public string EmbeddingField { get { throw null; } set { } } + public string ModelDeploymentName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EmbeddingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EmbeddingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntraIDCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntraIDCredentials() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EntraIDCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EntraIDCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class Evaluation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public Evaluation(Azure.AI.Projects.InputData data, System.Collections.Generic.IDictionary evaluators) { } @@ -968,12 +456,10 @@ public Evaluation(Azure.AI.Projects.InputData data, System.Collections.Generic.I public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } - public string Id { get { throw null; } } + public string Name { get { throw null; } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } public string Status { get { throw null; } } - public Azure.AI.Projects.SystemData SystemData { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.AI.Projects.EvaluationTarget Target { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Projects.Evaluation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -981,75 +467,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; } } - public partial class EvaluationSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EvaluationSchedule(Azure.AI.Projects.ApplicationInsightsConfiguration data, System.Collections.Generic.IDictionary evaluators, Azure.AI.Projects.Trigger trigger) { } - public Azure.AI.Projects.ApplicationInsightsConfiguration Data { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } - public string IsEnabled { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public string ProvisioningState { get { throw null; } } - public Azure.AI.Projects.SystemData SystemData { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.AI.Projects.Trigger Trigger { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.EvaluationSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EvaluationSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class EvaluationsClient + public partial class Evaluations { - protected EvaluationsClient() { } - public EvaluationsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public EvaluationsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public EvaluationsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public EvaluationsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } + protected Evaluations() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response Create(Azure.AI.Projects.Evaluation evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateAgentEvaluation(Azure.AI.Projects.AgentEvaluationRequest evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateAgentEvaluation(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAgentEvaluationAsync(Azure.AI.Projects.AgentEvaluationRequest evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAgentEvaluationAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.Evaluation evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrReplaceSchedule(string name, Azure.AI.Projects.EvaluationSchedule resource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrReplaceSchedule(string name, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrReplaceScheduleAsync(string name, Azure.AI.Projects.EvaluationSchedule resource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateOrReplaceScheduleAsync(string name, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DisableSchedule(string name, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DisableScheduleAsync(string name, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetEvaluation(string id, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetEvaluation(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetEvaluationAsync(string id, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetEvaluationAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetEvaluations(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetEvaluations(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetEvaluationsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetEvaluationsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSchedule(string name, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetSchedule(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetScheduleAsync(string name, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetScheduleAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetSchedules(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetSchedules(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSchedulesAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetSchedulesAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(string id, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAsync(string id, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - } - public partial class EvaluationTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EvaluationTarget(string systemMessage, Azure.AI.Projects.TargetModelConfig modelConfig) { } - public Azure.AI.Projects.TargetModelConfig ModelConfig { get { throw null; } set { } } - public System.Collections.Generic.IDictionary ModelParams { get { throw null; } } - public string SystemMessage { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.EvaluationTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EvaluationTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 GetEvaluation(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluation(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEvaluations(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetEvaluations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEvaluationsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetEvaluationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class EvaluatorConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1064,2527 +501,354 @@ 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 FileSearchRankingOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FileSearchRankingOptions(string ranker, float scoreThreshold) { } - public string Ranker { get { throw null; } set { } } - public float ScoreThreshold { get { throw null; } set { } } + public static partial class EvaluatorIDs + { + public const string BleuScore = "azureai://built-in/evaluators/bleu_score"; + public const string CodeVulnerability = "azureai://built-in/evaluators/code_vulnerability"; + public const string Coherence = "azureai://built-in/evaluators/coherence"; + public const string ContentSafety = "azureai://built-in/evaluators/content_safety"; + public const string DocumentRetrieval = "azureai://built-in/evaluators/document_retrieval"; + public const string F1Score = "azureai://built-in/evaluators/f1_score"; + public const string Fluency = "azureai://built-in/evaluators/fluency"; + public const string GleuScore = "azureai://built-in/evaluators/gleu_score"; + public const string Groundedness = "azureai://built-in/evaluators/groundedness"; + public const string GroundednessPro = "azureai://built-in/evaluators/groundedness_pro"; + public const string HateUnfairness = "azureai://built-in/evaluators/hate_unfairness"; + public const string IndirectAttack = "azureai://built-in/evaluators/indirect_attack"; + public const string IntentResolution = "azureai://built-in/evaluators/intent_resolution"; + public const string LabelGrader = "azureai://built-in/evaluators/label_grader"; + public const string MeteorScore = "azureai://built-in/evaluators/meteor_score"; + public const string ProtectedMaterial = "azureai://built-in/evaluators/protected_material"; + public const string QA = "azureai://built-in/evaluators/qa"; + public const string Relevance = "azureai://built-in/evaluators/relevance"; + public const string ResponseCompleteness = "azureai://built-in/evaluators/response_completeness"; + public const string Retrieval = "azureai://built-in/evaluators/retrieval"; + public const string RougeScore = "azureai://built-in/evaluators/rouge_score"; + public const string SelfHarm = "azureai://built-in/evaluators/self_harm"; + public const string Sexual = "azureai://built-in/evaluators/sexual"; + public const string SimilarityScore = "azureai://built-in/evaluators/similarity_score"; + public const string StringCheckGrader = "azureai://built-in/evaluators/string_check_grader"; + public const string TaskAdherence = "azureai://built-in/evaluators/task_adherence"; + public const string TextSimilarityGrader = "azureai://built-in/evaluators/text_similarity_grader"; + public const string ToolCallAccuracy = "azureai://built-in/evaluators/tool_call_accuracy"; + public const string UngroundedAttributes = "azureai://built-in/evaluators/ungrounded_attributes"; + public const string Violence = "azureai://built-in/evaluators/violence"; + } + public partial class FieldMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FieldMapping(System.Collections.Generic.IEnumerable contentFields) { } + public System.Collections.Generic.IList ContentFields { get { throw null; } } + public string FilepathField { get { throw null; } set { } } + public System.Collections.Generic.IList MetadataFields { get { throw null; } } + public string TitleField { get { throw null; } set { } } + public string UrlField { get { throw null; } set { } } + public System.Collections.Generic.IList VectorFields { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FieldMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileDatasetVersion : Azure.AI.Projects.DatasetVersion, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FileDatasetVersion(string dataUri) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileDatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FolderDatasetVersion : Azure.AI.Projects.DatasetVersion, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FolderDatasetVersion(string dataUri) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FolderDatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FolderDatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 Index : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected Index() { } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchRankingOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchRankingOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.Index System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Index System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolCallContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Indexes { - internal FileSearchToolCallContent() { } - public string Text { get { throw null; } } - public Azure.AI.Projects.FileSearchToolCallContentType Type { get { throw null; } } + protected Indexes() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateOrUpdate(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Delete(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetIndex(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetIndex(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetIndexAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetIndexAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetIndices(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetIndices(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetIndicesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetIndicesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetVersions(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetVersions(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public abstract partial class InputData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected InputData() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolCallContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolCallContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.InputData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FileSearchToolCallContentType : System.IEquatable + public partial class InputDataset : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FileSearchToolCallContentType(string value) { throw null; } - public static Azure.AI.Projects.FileSearchToolCallContentType Text { get { throw null; } } - public bool Equals(Azure.AI.Projects.FileSearchToolCallContentType 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.Projects.FileSearchToolCallContentType left, Azure.AI.Projects.FileSearchToolCallContentType right) { throw null; } - public static implicit operator Azure.AI.Projects.FileSearchToolCallContentType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.FileSearchToolCallContentType left, Azure.AI.Projects.FileSearchToolCallContentType right) { throw null; } - public override string ToString() { throw null; } + public InputDataset(string id) { } + public string Id { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InputDataset System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputDataset System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ManagedAzureAISearchIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedAzureAISearchIndex(string vectorStoreId) { } + public string VectorStoreId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ManagedAzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ManagedAzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelDeployment : Azure.AI.Projects.Deployment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelDeployment() { } + public System.Collections.Generic.IReadOnlyDictionary Capabilities { get { throw null; } } + public string ConnectionName { get { throw null; } } + public string ModelName { get { throw null; } } + public string ModelPublisher { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Projects.Sku Sku { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ModelDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ModelDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class NoAuthenticationCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolDefinition() { } - public Azure.AI.Projects.FileSearchToolDefinitionDetails FileSearch { get { throw null; } set { } } + internal NoAuthenticationCredentials() { } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.NoAuthenticationCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.NoAuthenticationCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolDefinitionDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PendingUploadRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolDefinitionDetails() { } - public int? MaxNumResults { get { throw null; } set { } } - public Azure.AI.Projects.FileSearchRankingOptions RankingOptions { get { throw null; } set { } } + public PendingUploadRequest() { } + public string ConnectionName { get { throw null; } set { } } + public string PendingUploadId { get { throw null; } set { } } + public Azure.AI.Projects.PendingUploadType PendingUploadType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolDefinitionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolDefinitionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.PendingUploadRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.PendingUploadRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PendingUploadResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolResource() { } - public FileSearchToolResource(System.Collections.Generic.IList vectorStoreIds, System.Collections.Generic.IList vectorStores) { } - public System.Collections.Generic.IList VectorStoreIds { get { throw null; } } - public System.Collections.Generic.IList VectorStores { get { throw null; } } + internal PendingUploadResponse() { } + public Azure.AI.Projects.BlobReference BlobReference { get { throw null; } } + public string PendingUploadId { get { throw null; } } + public Azure.AI.Projects.PendingUploadType PendingUploadType { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.PendingUploadResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.PendingUploadResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FileState : System.IEquatable + public readonly partial struct PendingUploadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FileState(string value) { throw null; } - public static Azure.AI.Projects.FileState Deleted { get { throw null; } } - public static Azure.AI.Projects.FileState Deleting { get { throw null; } } - public static Azure.AI.Projects.FileState Error { get { throw null; } } - public static Azure.AI.Projects.FileState Pending { get { throw null; } } - public static Azure.AI.Projects.FileState Processed { get { throw null; } } - public static Azure.AI.Projects.FileState Running { get { throw null; } } - public static Azure.AI.Projects.FileState Uploaded { get { throw null; } } - public bool Equals(Azure.AI.Projects.FileState other) { throw null; } + public PendingUploadType(string value) { throw null; } + public static Azure.AI.Projects.PendingUploadType BlobReference { get { throw null; } } + public static Azure.AI.Projects.PendingUploadType None { get { throw null; } } + public bool Equals(Azure.AI.Projects.PendingUploadType 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.Projects.FileState left, Azure.AI.Projects.FileState right) { throw null; } - public static implicit operator Azure.AI.Projects.FileState (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.FileState left, Azure.AI.Projects.FileState right) { throw null; } + public static bool operator ==(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } + public static implicit operator Azure.AI.Projects.PendingUploadType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } public override string ToString() { throw null; } } + public partial class RedTeam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RedTeam(Azure.AI.Projects.TargetConfig target) { } + public string ApplicationScenario { get { throw null; } set { } } + public System.Collections.Generic.IList AttackStrategies { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public string Name { get { throw null; } } + public int? NumTurns { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IList RiskCategories { get { throw null; } } + public bool? SimulationOnly { get { throw null; } set { } } + public string Status { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.AI.Projects.TargetConfig Target { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RedTeam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RedTeam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RedTeams + { + protected RedTeams() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Create(Azure.AI.Projects.RedTeam redTeam, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.RedTeam redTeam, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetRedTeam(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetRedTeam(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRedTeamAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetRedTeamAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRedTeams(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetRedTeams(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRedTeamsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetRedTeamsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Frequency : System.IEquatable + public readonly partial struct RiskCategory : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public Frequency(string value) { throw null; } - public static Azure.AI.Projects.Frequency Day { get { throw null; } } - public static Azure.AI.Projects.Frequency Hour { get { throw null; } } - public static Azure.AI.Projects.Frequency Minute { get { throw null; } } - public static Azure.AI.Projects.Frequency Month { get { throw null; } } - public static Azure.AI.Projects.Frequency Week { get { throw null; } } - public bool Equals(Azure.AI.Projects.Frequency other) { throw null; } + public RiskCategory(string value) { throw null; } + public static Azure.AI.Projects.RiskCategory HateUnfairness { get { throw null; } } + public static Azure.AI.Projects.RiskCategory SelfHarm { get { throw null; } } + public static Azure.AI.Projects.RiskCategory Sexual { get { throw null; } } + public static Azure.AI.Projects.RiskCategory Violence { get { throw null; } } + public bool Equals(Azure.AI.Projects.RiskCategory 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.Projects.Frequency left, Azure.AI.Projects.Frequency right) { throw null; } - public static implicit operator Azure.AI.Projects.Frequency (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.Frequency left, Azure.AI.Projects.Frequency right) { throw null; } + public static bool operator ==(Azure.AI.Projects.RiskCategory left, Azure.AI.Projects.RiskCategory right) { throw null; } + public static implicit operator Azure.AI.Projects.RiskCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RiskCategory left, Azure.AI.Projects.RiskCategory right) { throw null; } public override string ToString() { throw null; } } - public partial class FunctionName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SasCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FunctionName(string name) { } - public string Name { get { throw null; } set { } } + internal SasCredential() { } + public string SasUri { get { throw null; } } + public Azure.AI.Projects.SasCredentialType Type { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FunctionName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FunctionName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.SasCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SasCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FunctionToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SASCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FunctionToolDefinition(string name, string description) { } - public FunctionToolDefinition(string name, string description, System.BinaryData parameters) { } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData Parameters { get { throw null; } } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - public static bool operator ==(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RequiredFunctionToolCall functionToolCall) { throw null; } - public static bool operator ==(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RunStepFunctionToolCall functionToolCall) { throw null; } - public static bool operator ==(Azure.AI.Projects.RequiredFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator ==(Azure.AI.Projects.RunStepFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator !=(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RequiredFunctionToolCall functionToolCall) { throw null; } - public static bool operator !=(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RunStepFunctionToolCall functionToolCall) { throw null; } - public static bool operator !=(Azure.AI.Projects.RequiredFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - Azure.AI.Projects.FunctionToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FunctionToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class GetWorkspaceResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal GetWorkspaceResponse() { } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public Azure.AI.Projects.WorkspaceProperties Properties { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.GetWorkspaceResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.GetWorkspaceResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ImageDetailLevel : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ImageDetailLevel(string value) { throw null; } - public static Azure.AI.Projects.ImageDetailLevel Auto { get { throw null; } } - public static Azure.AI.Projects.ImageDetailLevel High { get { throw null; } } - public static Azure.AI.Projects.ImageDetailLevel Low { get { throw null; } } - public bool Equals(Azure.AI.Projects.ImageDetailLevel 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.Projects.ImageDetailLevel left, Azure.AI.Projects.ImageDetailLevel right) { throw null; } - public static implicit operator Azure.AI.Projects.ImageDetailLevel (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ImageDetailLevel left, Azure.AI.Projects.ImageDetailLevel right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IncompleteDetailsReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IncompleteDetailsReason(string value) { throw null; } - public static Azure.AI.Projects.IncompleteDetailsReason MaxCompletionTokens { get { throw null; } } - public static Azure.AI.Projects.IncompleteDetailsReason MaxPromptTokens { get { throw null; } } - public bool Equals(Azure.AI.Projects.IncompleteDetailsReason 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.Projects.IncompleteDetailsReason left, Azure.AI.Projects.IncompleteDetailsReason right) { throw null; } - public static implicit operator Azure.AI.Projects.IncompleteDetailsReason (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.IncompleteDetailsReason left, Azure.AI.Projects.IncompleteDetailsReason right) { throw null; } - public override string ToString() { throw null; } - } - public partial class IncompleteRunDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal IncompleteRunDetails() { } - public Azure.AI.Projects.IncompleteDetailsReason Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.IncompleteRunDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.IncompleteRunDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 InputData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected InputData() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InputData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class InternalConnectionPropertiesCustomAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal InternalConnectionPropertiesCustomAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InternalConnectionPropertiesCustomAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InternalConnectionPropertiesCustomAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class InternalConnectionPropertiesNoAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal InternalConnectionPropertiesNoAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InternalConnectionPropertiesNoAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InternalConnectionPropertiesNoAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ListConnectionsResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListConnectionsResponse() { } - public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ListConnectionsResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ListConnectionsResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ListSortOrder : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ListSortOrder(string value) { throw null; } - public static Azure.AI.Projects.ListSortOrder Ascending { get { throw null; } } - public static Azure.AI.Projects.ListSortOrder Descending { get { throw null; } } - public bool Equals(Azure.AI.Projects.ListSortOrder 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.Projects.ListSortOrder left, Azure.AI.Projects.ListSortOrder right) { throw null; } - public static implicit operator Azure.AI.Projects.ListSortOrder (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ListSortOrder left, Azure.AI.Projects.ListSortOrder right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MAASModelConfig : Azure.AI.Projects.TargetModelConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MAASModelConfig(string azureEndpoint, string apiKey) { } - public string ApiKey { get { throw null; } set { } } - public string AzureEndpoint { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MAASModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MAASModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageAttachment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageAttachment(Azure.AI.Projects.VectorStoreDataSource ds, System.Collections.Generic.List tools) { } - public MessageAttachment(System.Collections.Generic.IEnumerable tools) { } - public MessageAttachment(string fileId, System.Collections.Generic.List tools) { } - public Azure.AI.Projects.VectorStoreDataSource DataSource { get { throw null; } set { } } - public string FileId { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 MessageContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageContent() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageContentUpdate : Azure.AI.Projects.StreamingUpdate - { - internal MessageContentUpdate() { } - public string ImageFileId { get { throw null; } } - public string MessageId { get { throw null; } } - public int MessageIndex { get { throw null; } } - public Azure.AI.Projects.MessageRole? Role { get { throw null; } } - public string Text { get { throw null; } } - public Azure.AI.Projects.TextAnnotationUpdate TextAnnotation { get { throw null; } } - } - public partial class MessageDelta : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDelta() { } - public System.Collections.Generic.IReadOnlyList Content { get { throw null; } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDelta System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDelta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaChunk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaChunk() { } - public Azure.AI.Projects.MessageDelta Delta { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.MessageDeltaChunkObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaChunk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaChunk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageDeltaChunkObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageDeltaChunkObject(string value) { throw null; } - public static Azure.AI.Projects.MessageDeltaChunkObject ThreadMessageDelta { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageDeltaChunkObject 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.Projects.MessageDeltaChunkObject left, Azure.AI.Projects.MessageDeltaChunkObject right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageDeltaChunkObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageDeltaChunkObject left, Azure.AI.Projects.MessageDeltaChunkObject right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageDeltaContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageDeltaContent(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaImageFileContent : Azure.AI.Projects.MessageDeltaContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaImageFileContent() : base (default(int)) { } - public Azure.AI.Projects.MessageDeltaImageFileContentObject ImageFile { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaImageFileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaImageFileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaImageFileContentObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaImageFileContentObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaImageFileContentObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaImageFileContentObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 MessageDeltaTextAnnotation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected internal System.Collections.Generic.IDictionary SerializedAdditionalRawData; - protected MessageDeltaTextAnnotation(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextContent : Azure.AI.Projects.MessageDeltaContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextContent() : base (default(int)) { } - public Azure.AI.Projects.MessageDeltaTextContentObject Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextContentObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextContentObject() { } - public System.Collections.Generic.IReadOnlyList Annotations { get { throw null; } } - public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextContentObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextContentObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFileCitationAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFileCitationAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject FileCitation { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFileCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFileCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFileCitationAnnotationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFileCitationAnnotationObject() { } - public string FileId { get { throw null; } } - public string Quote { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFileCitationAnnotationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFilePathAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFilePathAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject FilePath { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFilePathAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFilePathAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFilePathAnnotationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFilePathAnnotationObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFilePathAnnotationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextUrlCitationAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextUrlCitationAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public int? StartIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextUrlCitationDetails UrlCitation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextUrlCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextUrlCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextUrlCitationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextUrlCitationDetails() { } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextUrlCitationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextUrlCitationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageFileContent : Azure.AI.Projects.MessageContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageImageFileContent() { } - public string FileId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageFileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageFileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageFileParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageImageFileParam(string fileId) { } - public Azure.AI.Projects.ImageDetailLevel? Detail { get { throw null; } set { } } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageFileParam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageFileParam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageUrlParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageImageUrlParam(string url) { } - public Azure.AI.Projects.ImageDetailLevel? Detail { get { throw null; } set { } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageUrlParam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageUrlParam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageIncompleteDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageIncompleteDetails() { } - public Azure.AI.Projects.MessageIncompleteDetailsReason Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageIncompleteDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageIncompleteDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageIncompleteDetailsReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageIncompleteDetailsReason(string value) { throw null; } - public static Azure.AI.Projects.MessageIncompleteDetailsReason ContentFilter { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason MaxTokens { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunCancelled { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunExpired { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunFailed { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageIncompleteDetailsReason 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.Projects.MessageIncompleteDetailsReason left, Azure.AI.Projects.MessageIncompleteDetailsReason right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageIncompleteDetailsReason (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageIncompleteDetailsReason left, Azure.AI.Projects.MessageIncompleteDetailsReason right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageInputContentBlock : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageInputContentBlock() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputContentBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputContentBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputImageFileBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputImageFileBlock(Azure.AI.Projects.MessageImageFileParam imageFile) { } - public Azure.AI.Projects.MessageImageFileParam ImageFile { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputImageFileBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputImageFileBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputImageUrlBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputImageUrlBlock(Azure.AI.Projects.MessageImageUrlParam imageUrl) { } - public Azure.AI.Projects.MessageImageUrlParam ImageUrl { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputImageUrlBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputImageUrlBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputTextBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputTextBlock(string text) { } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputTextBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputTextBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageRole : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageRole(string value) { throw null; } - public static Azure.AI.Projects.MessageRole Agent { get { throw null; } } - public static Azure.AI.Projects.MessageRole User { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageRole 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.Projects.MessageRole left, Azure.AI.Projects.MessageRole right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageRole (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageRole left, Azure.AI.Projects.MessageRole right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MessageStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageStatus(string value) { throw null; } - public static Azure.AI.Projects.MessageStatus Completed { get { throw null; } } - public static Azure.AI.Projects.MessageStatus Incomplete { get { throw null; } } - public static Azure.AI.Projects.MessageStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageStatus 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.Projects.MessageStatus left, Azure.AI.Projects.MessageStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageStatus left, Azure.AI.Projects.MessageStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MessageStatusUpdate : Azure.AI.Projects.StreamingUpdate - { - internal MessageStatusUpdate() { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MessageStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageCompleted { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageCreated { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageDelta { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageIncomplete { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageStreamEvent 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.Projects.MessageStreamEvent left, Azure.AI.Projects.MessageStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageStreamEvent left, Azure.AI.Projects.MessageStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageTextAnnotation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageTextAnnotation(string text) { } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextContent : Azure.AI.Projects.MessageContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextContent() { } - public System.Collections.Generic.IReadOnlyList Annotations { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextFileCitationAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextFileCitationAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public string FileId { get { throw null; } } - public string Quote { get { throw null; } } - public int? StartIndex { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextFileCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextFileCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextFilePathAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextFilePathAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public string FileId { get { throw null; } } - public int? StartIndex { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextFilePathAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextFilePathAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextUrlCitationAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextUrlCitationAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public int? StartIndex { get { throw null; } } - public Azure.AI.Projects.MessageTextUrlCitationDetails UrlCitation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextUrlCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextUrlCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextUrlCitationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextUrlCitationDetails() { } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextUrlCitationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextUrlCitationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MicrosoftFabricToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MicrosoftFabricToolDefinition(Azure.AI.Projects.ToolConnectionList fabricDataagent) { } - public Azure.AI.Projects.ToolConnectionList FabricDataagent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiAnonymousAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiAnonymousAuthDetails() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiAnonymousAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiAnonymousAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 OpenApiAuthDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected OpenApiAuthDetails() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiConnectionAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiConnectionAuthDetails(Azure.AI.Projects.OpenApiConnectionSecurityScheme securityScheme) { } - public Azure.AI.Projects.OpenApiConnectionSecurityScheme SecurityScheme { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiConnectionAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiConnectionAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiConnectionSecurityScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiConnectionSecurityScheme(string connectionId) { } - public string ConnectionId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiConnectionSecurityScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiConnectionSecurityScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiFunctionDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiFunctionDefinition(string name, System.BinaryData spec, Azure.AI.Projects.OpenApiAuthDetails auth) { } - public Azure.AI.Projects.OpenApiAuthDetails Auth { get { throw null; } set { } } - public System.Collections.Generic.IList DefaultParams { get { throw null; } } - public string Description { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.BinaryData Spec { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiFunctionDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiFunctionDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiManagedAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiManagedAuthDetails(Azure.AI.Projects.OpenApiManagedSecurityScheme securityScheme) { } - public Azure.AI.Projects.OpenApiManagedSecurityScheme SecurityScheme { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiManagedAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiManagedAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiManagedSecurityScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiManagedSecurityScheme(string audience) { } - public string Audience { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiManagedSecurityScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiManagedSecurityScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiToolDefinition(Azure.AI.Projects.OpenApiFunctionDefinition openapi) { } - public OpenApiToolDefinition(string name, string description, System.BinaryData spec, Azure.AI.Projects.OpenApiAuthDetails auth, System.Collections.Generic.IList defaultParams = null) { } - public Azure.AI.Projects.OpenApiFunctionDefinition Openapi { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class PageableList : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - internal PageableList() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public T this[int index] { get { throw null; } } - public string LastId { get { throw null; } } - public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class RecurrenceSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RecurrenceSchedule(System.Collections.Generic.IEnumerable hours, System.Collections.Generic.IEnumerable minutes) { } - public System.Collections.Generic.IList Hours { get { throw null; } } - public System.Collections.Generic.IList Minutes { get { throw null; } } - public System.Collections.Generic.IList MonthDays { get { throw null; } } - public System.Collections.Generic.IList WeekDays { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RecurrenceSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RecurrenceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RecurrenceTrigger : Azure.AI.Projects.Trigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RecurrenceTrigger(Azure.AI.Projects.Frequency frequency, int interval) { } - public Azure.AI.Projects.Frequency Frequency { get { throw null; } set { } } - public int Interval { get { throw null; } set { } } - public Azure.AI.Projects.RecurrenceSchedule Schedule { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RecurrenceTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RecurrenceTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RequiredAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RequiredAction() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RequiredActionUpdate : Azure.AI.Projects.RunUpdate - { - internal RequiredActionUpdate() { } - public string FunctionArguments { get { throw null; } } - public string FunctionName { get { throw null; } } - public string ToolCallId { get { throw null; } } - public Azure.AI.Projects.ThreadRun GetThreadRun() { throw null; } - } - public partial class RequiredFunctionToolCall : Azure.AI.Projects.RequiredToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RequiredFunctionToolCall() : base (default(string)) { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RequiredToolCall : Azure.AI.Projects.RequiredAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RequiredToolCall(string id) { } - public string Id { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ResponseFormat : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseFormat(string value) { throw null; } - public static Azure.AI.Projects.ResponseFormat JsonObject { get { throw null; } } - public static Azure.AI.Projects.ResponseFormat Text { get { throw null; } } - public bool Equals(Azure.AI.Projects.ResponseFormat 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.Projects.ResponseFormat left, Azure.AI.Projects.ResponseFormat right) { throw null; } - public static implicit operator Azure.AI.Projects.ResponseFormat (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ResponseFormat left, Azure.AI.Projects.ResponseFormat right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ResponseFormatJsonSchema : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResponseFormatJsonSchema(string name, System.BinaryData schema) { } - public string Description { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.BinaryData Schema { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ResponseFormatJsonSchema System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ResponseFormatJsonSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ResponseFormatJsonSchemaType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema) { } - public Azure.AI.Projects.ResponseFormatJsonSchema JsonSchema { get { throw null; } set { } } - public Azure.AI.Projects.ResponseFormatJsonSchemaTypeType Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ResponseFormatJsonSchemaType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ResponseFormatJsonSchemaType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ResponseFormatJsonSchemaTypeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseFormatJsonSchemaTypeType(string value) { throw null; } - public static Azure.AI.Projects.ResponseFormatJsonSchemaTypeType JsonSchema { get { throw null; } } - public bool Equals(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType 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.Projects.ResponseFormatJsonSchemaTypeType left, Azure.AI.Projects.ResponseFormatJsonSchemaTypeType right) { throw null; } - public static implicit operator Azure.AI.Projects.ResponseFormatJsonSchemaTypeType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType left, Azure.AI.Projects.ResponseFormatJsonSchemaTypeType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunAdditionalFieldList : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunAdditionalFieldList(string value) { throw null; } - public static Azure.AI.Projects.RunAdditionalFieldList FileSearchContents { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunAdditionalFieldList 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.Projects.RunAdditionalFieldList left, Azure.AI.Projects.RunAdditionalFieldList right) { throw null; } - public static implicit operator Azure.AI.Projects.RunAdditionalFieldList (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunAdditionalFieldList left, Azure.AI.Projects.RunAdditionalFieldList right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunCompletionUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunCompletionUsage() { } - public long CompletionTokens { get { throw null; } } - public long PromptTokens { get { throw null; } } - public long TotalTokens { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunCompletionUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunCompletionUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunError() { } - public string Code { get { throw null; } } - public string Message { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStatus(string value) { throw null; } - public static Azure.AI.Projects.RunStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.RunStatus Cancelling { get { throw null; } } - public static Azure.AI.Projects.RunStatus Completed { get { throw null; } } - public static Azure.AI.Projects.RunStatus Expired { get { throw null; } } - public static Azure.AI.Projects.RunStatus Failed { get { throw null; } } - public static Azure.AI.Projects.RunStatus InProgress { get { throw null; } } - public static Azure.AI.Projects.RunStatus Queued { get { throw null; } } - public static Azure.AI.Projects.RunStatus RequiresAction { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStatus 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.Projects.RunStatus left, Azure.AI.Projects.RunStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStatus left, Azure.AI.Projects.RunStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStep() { } - public string AssistantId { get { throw null; } } - public System.DateTimeOffset? CancelledAt { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public System.DateTimeOffset? ExpiredAt { get { throw null; } } - public System.DateTimeOffset? FailedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.RunStepError LastError { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string RunId { get { throw null; } } - public Azure.AI.Projects.RunStepStatus Status { get { throw null; } } - public Azure.AI.Projects.RunStepDetails StepDetails { get { throw null; } } - public string ThreadId { get { throw null; } } - public Azure.AI.Projects.RunStepType Type { get { throw null; } } - public Azure.AI.Projects.RunStepCompletionUsage Usage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStep System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepAzureAISearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepAzureAISearchToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary AzureAISearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepAzureAISearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepAzureAISearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepBingGroundingToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepBingGroundingToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary BingGrounding { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepBingGroundingToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepBingGroundingToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterImageOutput : Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterImageOutput() { } - public Azure.AI.Projects.RunStepCodeInterpreterImageReference Image { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterImageOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterImageOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterImageReference() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterLogOutput : Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterLogOutput() { } - public string Logs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterLogOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterLogOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterToolCall() : base (default(string)) { } - public string Input { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepCodeInterpreterToolCallOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepCodeInterpreterToolCallOutput() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterToolCallOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCompletionUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCompletionUsage() { } - public long CompletionTokens { get { throw null; } } - public long PromptTokens { get { throw null; } } - public long TotalTokens { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCompletionUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCompletionUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCustomSearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCustomSearchToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary BingCustomSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCustomSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCustomSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDelta : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDelta() { } - public Azure.AI.Projects.RunStepDeltaDetail StepDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDelta System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDelta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaChunk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaChunk() { } - public Azure.AI.Projects.RunStepDelta Delta { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.RunStepDeltaChunkObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaChunk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaChunk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepDeltaChunkObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepDeltaChunkObject(string value) { throw null; } - public static Azure.AI.Projects.RunStepDeltaChunkObject ThreadRunStepDelta { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepDeltaChunkObject 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.Projects.RunStepDeltaChunkObject left, Azure.AI.Projects.RunStepDeltaChunkObject right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepDeltaChunkObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepDeltaChunkObject left, Azure.AI.Projects.RunStepDeltaChunkObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepDeltaCodeInterpreterDetailItemObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterDetailItemObject() { } - public string Input { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterDetailItemObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterImageOutput : Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterImageOutput() : base (default(int)) { } - public Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject Image { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterImageOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterImageOutputObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterImageOutputObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterImageOutputObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterLogOutput : Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterLogOutput() : base (default(int)) { } - public string Logs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterLogOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterLogOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaCodeInterpreterOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDeltaCodeInterpreterOutput(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject CodeInterpreter { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDeltaDetail() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFileSearchToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFileSearchToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepFileSearchToolCallResults FileSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFileSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFileSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFunction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFunction() { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - public string Output { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFunction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFunction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFunctionToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFunctionToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepDeltaFunction Function { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaMessageCreation : Azure.AI.Projects.RunStepDeltaDetail, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaMessageCreation() { } - public Azure.AI.Projects.RunStepDeltaMessageCreationObject MessageCreation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaMessageCreation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaMessageCreation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaMessageCreationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaMessageCreationObject() { } - public string MessageId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaMessageCreationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaMessageCreationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaToolCall : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected internal System.Collections.Generic.IDictionary SerializedAdditionalRawData; - protected RunStepDeltaToolCall(int index, string id) { } - public string Id { get { throw null; } } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaToolCallObject : Azure.AI.Projects.RunStepDeltaDetail, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaToolCallObject() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaToolCallObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaToolCallObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDetails() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDetailsUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunStepDetailsUpdate() { } - public string CodeInterpreterInput { get { throw null; } } - public System.Collections.Generic.IReadOnlyList CodeInterpreterOutputs { get { throw null; } } - public string CreatedMessageId { get { throw null; } } - public string FunctionArguments { get { throw null; } } - public string FunctionName { get { throw null; } } - public string FunctionOutput { get { throw null; } } - public string StepId { get { throw null; } } - public string ToolCallId { get { throw null; } } - public int? ToolCallIndex { get { throw null; } } - } - public partial class RunStepError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepError() { } - public Azure.AI.Projects.RunStepErrorCode Code { get { throw null; } } - public string Message { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepErrorCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepErrorCode(string value) { throw null; } - public static Azure.AI.Projects.RunStepErrorCode RateLimitExceeded { get { throw null; } } - public static Azure.AI.Projects.RunStepErrorCode ServerError { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepErrorCode 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.Projects.RunStepErrorCode left, Azure.AI.Projects.RunStepErrorCode right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepErrorCode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepErrorCode left, Azure.AI.Projects.RunStepErrorCode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepFileSearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCall() : base (default(string)) { } - public Azure.AI.Projects.RunStepFileSearchToolCallResults FileSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFileSearchToolCallResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCallResult() { } - public System.Collections.Generic.IReadOnlyList Content { get { throw null; } } - public string FileId { get { throw null; } } - public string FileName { get { throw null; } } - public float Score { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCallResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCallResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFileSearchToolCallResults : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCallResults() { } - public Azure.AI.Projects.FileSearchRankingOptions RankingOptions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCallResults System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCallResults System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFunctionToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFunctionToolCall() : base (default(string)) { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - public string Output { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMessageCreationDetails : Azure.AI.Projects.RunStepDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMessageCreationDetails() { } - public Azure.AI.Projects.RunStepMessageCreationReference MessageCreation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMessageCreationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMessageCreationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMessageCreationReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMessageCreationReference() { } - public string MessageId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMessageCreationReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMessageCreationReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMicrosoftFabricToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMicrosoftFabricToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary MicrosoftFabric { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepOpenAPIToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepOpenAPIToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary OpenAPI { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepOpenAPIToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepOpenAPIToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepSharepointToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepSharepointToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary SharePoint { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepSharepointToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepSharepointToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepStatus(string value) { throw null; } - public static Azure.AI.Projects.RunStepStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Completed { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Expired { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Failed { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepStatus 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.Projects.RunStepStatus left, Azure.AI.Projects.RunStepStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepStatus left, Azure.AI.Projects.RunStepStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunStepStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCancelled { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCompleted { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCreated { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepDelta { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepExpired { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepFailed { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepStreamEvent 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.Projects.RunStepStreamEvent left, Azure.AI.Projects.RunStepStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepStreamEvent left, Azure.AI.Projects.RunStepStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class RunStepToolCall : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepToolCall(string id) { } - public string Id { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepToolCallDetails : Azure.AI.Projects.RunStepDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepToolCallDetails() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepToolCallDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepToolCallDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepType(string value) { throw null; } - public static Azure.AI.Projects.RunStepType MessageCreation { get { throw null; } } - public static Azure.AI.Projects.RunStepType ToolCalls { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepType 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.Projects.RunStepType left, Azure.AI.Projects.RunStepType right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepType left, Azure.AI.Projects.RunStepType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunStepUpdate() { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCancelled { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCancelling { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCompleted { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCreated { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunExpired { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunFailed { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunIncomplete { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunInProgress { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunQueued { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunRequiresAction { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStreamEvent 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.Projects.RunStreamEvent left, Azure.AI.Projects.RunStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStreamEvent left, Azure.AI.Projects.RunStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunUpdate() { } - } - public partial class SearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SearchConfiguration(string connectionId, string instanceName) { } - public string ConnectionId { get { throw null; } set { } } - public string InstanceName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SearchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SearchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SearchConfigurationList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SearchConfigurationList(System.Collections.Generic.IEnumerable searchConfigurations) { } - public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SearchConfigurationList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SearchConfigurationList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SharepointToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SharepointToolDefinition(Azure.AI.Projects.ToolConnectionList sharepointGrounding) { } - public Azure.AI.Projects.ToolConnectionList SharepointGrounding { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SharepointToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SharepointToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 StreamingUpdate - { - internal StreamingUpdate() { } - public Azure.AI.Projects.StreamingUpdateReason UpdateKind { get { throw null; } } - } - public enum StreamingUpdateReason - { - Unknown = 0, - ThreadCreated = 1, - RunCreated = 2, - RunQueued = 3, - RunInProgress = 4, - RunRequiresAction = 5, - RunCompleted = 6, - RunIncomplete = 7, - RunFailed = 8, - RunCancelling = 9, - RunCancelled = 10, - RunExpired = 11, - RunStepCreated = 12, - RunStepInProgress = 13, - RunStepUpdated = 14, - RunStepCompleted = 15, - RunStepFailed = 16, - RunStepCancelled = 17, - RunStepExpired = 18, - MessageCreated = 19, - MessageInProgress = 20, - MessageUpdated = 21, - MessageCompleted = 22, - MessageFailed = 23, - Error = 24, - Done = 25, - } - public partial class StreamingUpdate : Azure.AI.Projects.StreamingUpdate where T : class - { - internal StreamingUpdate() { } - public T Value { get { throw null; } } - public static implicit operator T (Azure.AI.Projects.StreamingUpdate update) { throw null; } - } - public partial class SubmitToolOutputsAction : Azure.AI.Projects.RequiredAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SubmitToolOutputsAction() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } + internal SASCredentials() { } + public string SasToken { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SubmitToolOutputsAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SubmitToolOutputsAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SystemData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SystemData() { } - public System.DateTimeOffset? CreatedAt { get { throw null; } } - public string CreatedBy { get { throw null; } } - public string CreatedByType { get { throw null; } } - public System.DateTimeOffset? LastModifiedAt { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SystemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SystemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 TargetModelConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected TargetModelConfig() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.TargetModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TargetModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class TelemetryClient - { - protected TelemetryClient() { } - public TelemetryClient(string connectionString, Azure.Core.TokenCredential credential) { } - public TelemetryClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public TelemetryClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public TelemetryClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - } - public partial class TextAnnotationUpdate - { - internal TextAnnotationUpdate() { } - public int ContentIndex { get { throw null; } } - public int? EndIndex { get { throw null; } } - public string InputFileId { get { throw null; } } - public string OutputFileId { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string TextToReplace { get { throw null; } } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - } - public partial class ThreadMessage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ThreadMessage() { } - public string AssistantId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Attachments { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ContentItems { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.DateTimeOffset? IncompleteAt { get { throw null; } } - public Azure.AI.Projects.MessageIncompleteDetails IncompleteDetails { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - public string RunId { get { throw null; } } - public Azure.AI.Projects.MessageStatus Status { get { throw null; } } - public string ThreadId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadMessage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ThreadMessageOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, System.BinaryData content) { } - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks) { } - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, string content) { } - public System.Collections.Generic.IList Attachments { get { throw null; } set { } } - public System.BinaryData Content { get { throw null; } } - public System.Collections.Generic.IDictionary Metadata { get { throw null; } set { } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - public System.Collections.Generic.IEnumerable GetContentBlocks() { throw null; } - public string GetTextContent() { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadMessageOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadMessageOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ThreadRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ThreadRun() { } - public string AssistantId { get { throw null; } } - public System.DateTimeOffset? CancelledAt { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public System.DateTimeOffset? ExpiresAt { get { throw null; } } - public System.DateTimeOffset? FailedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.IncompleteRunDetails IncompleteDetails { get { throw null; } } - public string Instructions { get { throw null; } } - public Azure.AI.Projects.RunError LastError { get { throw null; } } - public int? MaxCompletionTokens { get { throw null; } } - public int? MaxPromptTokens { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string Model { get { throw null; } } - public bool ParallelToolCalls { get { throw null; } } - public Azure.AI.Projects.RequiredAction RequiredAction { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RequiredActions { get { throw null; } } - public System.BinaryData ResponseFormat { get { throw null; } } - public System.DateTimeOffset? StartedAt { get { throw null; } } - public Azure.AI.Projects.RunStatus Status { get { throw null; } } - public float? Temperature { get { throw null; } } - public string ThreadId { get { throw null; } } - public System.BinaryData ToolChoice { get { throw null; } } - public Azure.AI.Projects.UpdateToolResourcesOptions ToolResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Tools { get { throw null; } } - public float? TopP { get { throw null; } } - public Azure.AI.Projects.TruncationObject TruncationStrategy { get { throw null; } } - public Azure.AI.Projects.RunCompletionUsage Usage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ThreadStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ThreadStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.ThreadStreamEvent ThreadCreated { get { throw null; } } - public bool Equals(Azure.AI.Projects.ThreadStreamEvent 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.Projects.ThreadStreamEvent left, Azure.AI.Projects.ThreadStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.ThreadStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ThreadStreamEvent left, Azure.AI.Projects.ThreadStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ThreadUpdate : Azure.AI.Projects.StreamingUpdate - { - internal ThreadUpdate() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } - } - public partial class ToolConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolConnection(string connectionId) { } - public string ConnectionId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolConnectionList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolConnectionList() { } - public System.Collections.Generic.IList ConnectionList { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolConnectionList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolConnectionList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 ToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected ToolDefinition() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolOutput() { } - public ToolOutput(Azure.AI.Projects.RequiredToolCall toolCall) { } - public ToolOutput(Azure.AI.Projects.RequiredToolCall toolCall, string output) { } - public ToolOutput(string toolCallId) { } - public ToolOutput(string toolCallId, string output) { } - public string Output { get { throw null; } set { } } - public string ToolCallId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolResources : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolResources() { } - public Azure.AI.Projects.AzureAISearchResource AzureAISearch { get { throw null; } set { } } - public Azure.AI.Projects.CodeInterpreterToolResource CodeInterpreter { get { throw null; } set { } } - public Azure.AI.Projects.FileSearchToolResource FileSearch { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 Trigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected Trigger() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Trigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Trigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class TruncationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TruncationObject(Azure.AI.Projects.TruncationStrategy type) { } - public int? LastMessages { get { throw null; } set { } } - public Azure.AI.Projects.TruncationStrategy Type { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.TruncationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TruncationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.SASCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SASCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TruncationStrategy : System.IEquatable + public readonly partial struct SasCredentialType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public TruncationStrategy(string value) { throw null; } - public static Azure.AI.Projects.TruncationStrategy Auto { get { throw null; } } - public static Azure.AI.Projects.TruncationStrategy LastMessages { get { throw null; } } - public bool Equals(Azure.AI.Projects.TruncationStrategy other) { throw null; } + public SasCredentialType(string value) { throw null; } + public static Azure.AI.Projects.SasCredentialType SAS { get { throw null; } } + public bool Equals(Azure.AI.Projects.SasCredentialType 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.Projects.TruncationStrategy left, Azure.AI.Projects.TruncationStrategy right) { throw null; } - public static implicit operator Azure.AI.Projects.TruncationStrategy (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.TruncationStrategy left, Azure.AI.Projects.TruncationStrategy right) { throw null; } + public static bool operator ==(Azure.AI.Projects.SasCredentialType left, Azure.AI.Projects.SasCredentialType right) { throw null; } + public static implicit operator Azure.AI.Projects.SasCredentialType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.SasCredentialType left, Azure.AI.Projects.SasCredentialType right) { throw null; } public override string ToString() { throw null; } } - public partial class UpdateCodeInterpreterToolResourceOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UpdateCodeInterpreterToolResourceOptions() { } - public System.Collections.Generic.IList FileIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateCodeInterpreterToolResourceOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateCodeInterpreterToolResourceOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class UpdateFileSearchToolResourceOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UpdateFileSearchToolResourceOptions() { } - public System.Collections.Generic.IList VectorStoreIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateFileSearchToolResourceOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateFileSearchToolResourceOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class UpdateToolResourcesOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ServicePatterns { - public UpdateToolResourcesOptions() { } - public Azure.AI.Projects.AzureAISearchResource AzureAISearch { get { throw null; } set { } } - public Azure.AI.Projects.UpdateCodeInterpreterToolResourceOptions CodeInterpreter { get { throw null; } set { } } - public Azure.AI.Projects.UpdateFileSearchToolResourceOptions FileSearch { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateToolResourcesOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateToolResourcesOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected ServicePatterns() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } } - public partial class VectorStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Sku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal VectorStore() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreExpirationPolicy ExpiresAfter { get { throw null; } } - public System.DateTimeOffset? ExpiresAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileCount FileCounts { get { throw null; } } - public string Id { get { throw null; } } - public System.DateTimeOffset? LastActiveAt { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + internal Sku() { } + public long Capacity { get { throw null; } } + public string Family { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Projects.VectorStoreObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreStatus Status { get { throw null; } } - public int UsageBytes { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreAutoChunkingStrategyRequest : Azure.AI.Projects.VectorStoreChunkingStrategyRequest, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreAutoChunkingStrategyRequest() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreAutoChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreAutoChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreAutoChunkingStrategyResponse : Azure.AI.Projects.VectorStoreChunkingStrategyResponse, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreAutoChunkingStrategyResponse() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreAutoChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreAutoChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 VectorStoreChunkingStrategyRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected VectorStoreChunkingStrategyRequest() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 VectorStoreChunkingStrategyResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected VectorStoreChunkingStrategyResponse() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreConfiguration(System.Collections.Generic.IEnumerable dataSources) { } - public System.Collections.Generic.IList DataSources { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreConfigurations(string storeName, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration) { } - public Azure.AI.Projects.VectorStoreConfiguration StoreConfiguration { get { throw null; } set { } } - public string StoreName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreDataSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreDataSource(string assetIdentifier, Azure.AI.Projects.VectorStoreDataSourceAssetType assetType) { } - public string AssetIdentifier { get { throw null; } set { } } - public Azure.AI.Projects.VectorStoreDataSourceAssetType AssetType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreDataSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreDataSourceAssetType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreDataSourceAssetType(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreDataSourceAssetType IdAsset { get { throw null; } } - public static Azure.AI.Projects.VectorStoreDataSourceAssetType UriAsset { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreDataSourceAssetType 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.Projects.VectorStoreDataSourceAssetType left, Azure.AI.Projects.VectorStoreDataSourceAssetType right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreDataSourceAssetType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreDataSourceAssetType left, Azure.AI.Projects.VectorStoreDataSourceAssetType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreDeletionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreDeletionStatus() { } - public bool Deleted { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreDeletionStatusObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreDeletionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreDeletionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreDeletionStatusObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreDeletionStatusObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreDeletionStatusObject VectorStoreDeleted { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreDeletionStatusObject 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.Projects.VectorStoreDeletionStatusObject left, Azure.AI.Projects.VectorStoreDeletionStatusObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreDeletionStatusObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreDeletionStatusObject left, Azure.AI.Projects.VectorStoreDeletionStatusObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreExpirationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreExpirationPolicy(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor anchor, int days) { } - public Azure.AI.Projects.VectorStoreExpirationPolicyAnchor Anchor { get { throw null; } set { } } - public int Days { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreExpirationPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreExpirationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreExpirationPolicyAnchor : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreExpirationPolicyAnchor(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreExpirationPolicyAnchor LastActiveAt { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor 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.Projects.VectorStoreExpirationPolicyAnchor left, Azure.AI.Projects.VectorStoreExpirationPolicyAnchor right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreExpirationPolicyAnchor (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor left, Azure.AI.Projects.VectorStoreExpirationPolicyAnchor right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFile() { } - public Azure.AI.Projects.VectorStoreChunkingStrategyResponse ChunkingStrategy { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileError LastError { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileStatus Status { get { throw null; } } - public int UsageBytes { get { throw null; } } - public string VectorStoreId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreFileBatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileBatch() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileCount FileCounts { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileBatchObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileBatchStatus Status { get { throw null; } } - public string VectorStoreId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileBatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileBatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileBatchObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileBatchObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatchObject VectorStoreFilesBatch { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileBatchObject 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.Projects.VectorStoreFileBatchObject left, Azure.AI.Projects.VectorStoreFileBatchObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileBatchObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileBatchObject left, Azure.AI.Projects.VectorStoreFileBatchObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileBatchStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileBatchStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileBatchStatus 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.Projects.VectorStoreFileBatchStatus left, Azure.AI.Projects.VectorStoreFileBatchStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileBatchStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileBatchStatus left, Azure.AI.Projects.VectorStoreFileBatchStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFileCount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileCount() { } - public int Cancelled { get { throw null; } } - public int Completed { get { throw null; } } - public int Failed { get { throw null; } } - public int InProgress { get { throw null; } } - public int Total { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileCount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreFileDeletionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileDeletionStatus() { } - public bool Deleted { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileDeletionStatusObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileDeletionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileDeletionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileDeletionStatusObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileDeletionStatusObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileDeletionStatusObject VectorStoreFileDeleted { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileDeletionStatusObject 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.Projects.VectorStoreFileDeletionStatusObject left, Azure.AI.Projects.VectorStoreFileDeletionStatusObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileDeletionStatusObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileDeletionStatusObject left, Azure.AI.Projects.VectorStoreFileDeletionStatusObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFileError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileError() { } - public Azure.AI.Projects.VectorStoreFileErrorCode Code { get { throw null; } } - public string Message { get { throw null; } } + public string Size { get { throw null; } } + public string Tier { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileErrorCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileErrorCode(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileErrorCode InvalidFile { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileErrorCode ServerError { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileErrorCode UnsupportedFile { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileErrorCode 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.Projects.VectorStoreFileErrorCode left, Azure.AI.Projects.VectorStoreFileErrorCode right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileErrorCode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileErrorCode left, Azure.AI.Projects.VectorStoreFileErrorCode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileObject VectorStoreFile { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileObject 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.Projects.VectorStoreFileObject left, Azure.AI.Projects.VectorStoreFileObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileObject left, Azure.AI.Projects.VectorStoreFileObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileStatus 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.Projects.VectorStoreFileStatus left, Azure.AI.Projects.VectorStoreFileStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileStatus left, Azure.AI.Projects.VectorStoreFileStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileStatusFilter : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileStatusFilter(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileStatusFilter 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.Projects.VectorStoreFileStatusFilter left, Azure.AI.Projects.VectorStoreFileStatusFilter right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileStatusFilter (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileStatusFilter left, Azure.AI.Projects.VectorStoreFileStatusFilter right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreObject VectorStore { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreObject 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.Projects.VectorStoreObject left, Azure.AI.Projects.VectorStoreObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreObject left, Azure.AI.Projects.VectorStoreObject right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.Sku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Sku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class VectorStoreStaticChunkingStrategyOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public abstract partial class TargetConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public VectorStoreStaticChunkingStrategyOptions(int maxChunkSizeTokens, int chunkOverlapTokens) { } - public int ChunkOverlapTokens { get { throw null; } set { } } - public int MaxChunkSizeTokens { get { throw null; } set { } } + protected TargetConfig() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreStaticChunkingStrategyRequest : Azure.AI.Projects.VectorStoreChunkingStrategyRequest, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreStaticChunkingStrategyRequest(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static) { } - public Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions Static { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreStaticChunkingStrategyResponse : Azure.AI.Projects.VectorStoreChunkingStrategyResponse, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreStaticChunkingStrategyResponse() { } - public Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions Static { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreStatus Expired { get { throw null; } } - public static Azure.AI.Projects.VectorStoreStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreStatus 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.Projects.VectorStoreStatus left, Azure.AI.Projects.VectorStoreStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreStatus left, Azure.AI.Projects.VectorStoreStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WeekDays : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public WeekDays(string value) { throw null; } - public static Azure.AI.Projects.WeekDays Friday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Monday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Saturday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Sunday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Thursday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Tuesday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Wednesday { get { throw null; } } - public bool Equals(Azure.AI.Projects.WeekDays 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.Projects.WeekDays left, Azure.AI.Projects.WeekDays right) { throw null; } - public static implicit operator Azure.AI.Projects.WeekDays (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.WeekDays left, Azure.AI.Projects.WeekDays right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.TargetConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TargetConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class WorkspaceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Telemetry { - internal WorkspaceProperties() { } - public string ApplicationInsights { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.WorkspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.WorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public Telemetry(Azure.AI.Projects.AIProjectClient outerInstance) { } + public string GetConnectionString() { throw null; } + public System.Threading.Tasks.Task GetConnectionStringAsync() { throw null; } } } namespace Microsoft.Extensions.Azure { public static partial class AIProjectsClientBuilderExtensions { - public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs index 3cb02e983e08..7877a5a6ecc8 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs @@ -1,625 +1,198 @@ namespace Azure.AI.Projects { - public partial class Agent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal Agent() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Description { get { throw null; } } + internal AgentEvaluation() { } + public string Error { get { throw null; } } public string Id { get { throw null; } } - public string Instructions { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string Model { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData ResponseFormat { get { throw null; } } - public float? Temperature { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Tools { get { throw null; } } - public float? TopP { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Agent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Agent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AgentFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentFile() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Filename { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.AgentFilePurpose Purpose { get { throw null; } } - public int Size { get { throw null; } } - public Azure.AI.Projects.FileState? Status { get { throw null; } } - public string StatusDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentFilePurpose : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentFilePurpose(string value) { throw null; } - public static Azure.AI.Projects.AgentFilePurpose Agents { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose AgentsOutput { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose Batch { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose BatchOutput { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose FineTune { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose FineTuneResults { get { throw null; } } - public static Azure.AI.Projects.AgentFilePurpose Vision { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentFilePurpose 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.Projects.AgentFilePurpose left, Azure.AI.Projects.AgentFilePurpose right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentFilePurpose (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentFilePurpose left, Azure.AI.Projects.AgentFilePurpose right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentPageableListOfVectorStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentPageableListOfVectorStore() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public string LastId { get { throw null; } } - public Azure.AI.Projects.AgentPageableListOfVectorStoreObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentPageableListOfVectorStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentPageableListOfVectorStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AgentPageableListOfVectorStoreFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal AgentPageableListOfVectorStoreFile() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public string LastId { get { throw null; } } - public Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentPageableListOfVectorStoreFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentPageableListOfVectorStoreFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentPageableListOfVectorStoreFileObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentPageableListOfVectorStoreFileObject(string value) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject List { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject 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.Projects.AgentPageableListOfVectorStoreFileObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentPageableListOfVectorStoreObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentPageableListOfVectorStoreObject(string value) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreObject List { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentPageableListOfVectorStoreObject 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.Projects.AgentPageableListOfVectorStoreObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreObject right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentPageableListOfVectorStoreObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentPageableListOfVectorStoreObject left, Azure.AI.Projects.AgentPageableListOfVectorStoreObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentsApiResponseFormat : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AgentsApiResponseFormat() { } - public Azure.AI.Projects.ResponseFormat? Type { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList Result { get { throw null; } } + public string Status { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentsApiResponseFormat System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentsApiResponseFormat System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentsApiResponseFormatMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsApiResponseFormatMode(string value) { throw null; } - public static Azure.AI.Projects.AgentsApiResponseFormatMode Auto { get { throw null; } } - public static Azure.AI.Projects.AgentsApiResponseFormatMode None { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsApiResponseFormatMode 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.Projects.AgentsApiResponseFormatMode left, Azure.AI.Projects.AgentsApiResponseFormatMode right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsApiResponseFormatMode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsApiResponseFormatMode left, Azure.AI.Projects.AgentsApiResponseFormatMode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentsApiToolChoiceOptionMode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsApiToolChoiceOptionMode(string value) { throw null; } - public static Azure.AI.Projects.AgentsApiToolChoiceOptionMode Auto { get { throw null; } } - public static Azure.AI.Projects.AgentsApiToolChoiceOptionMode None { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsApiToolChoiceOptionMode 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.Projects.AgentsApiToolChoiceOptionMode left, Azure.AI.Projects.AgentsApiToolChoiceOptionMode right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsApiToolChoiceOptionMode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsApiToolChoiceOptionMode left, Azure.AI.Projects.AgentsApiToolChoiceOptionMode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AgentsClient - { - protected AgentsClient() { } - public AgentsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public AgentsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public AgentsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response CancelRun(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response CancelRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelRunAsync(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> CancelRunAsync(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateAgent(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateAgent(string model, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateAgentAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAgentAsync(string model, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, System.BinaryData content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.AI.Projects.MessageRole role, string content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateMessage(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, System.BinaryData content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateMessageAsync(string threadId, Azure.AI.Projects.MessageRole role, string content, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateMessageAsync(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateRun(Azure.AI.Projects.AgentThread thread, Azure.AI.Projects.Agent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateRun(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRunAsync(Azure.AI.Projects.AgentThread thread, Azure.AI.Projects.Agent agent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateRunAsync(string threadId, Azure.Core.RequestContent content, System.Collections.Generic.IEnumerable include = null, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult CreateRunStreaming(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult CreateRunStreamingAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, System.Collections.Generic.IEnumerable additionalMessages = null, System.Collections.Generic.IEnumerable overrideTools = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual Azure.Response CreateThread(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateThread(System.Collections.Generic.IEnumerable messages = null, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateThreadAndRun(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateThreadAndRun(string assistantId, Azure.AI.Projects.AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, System.Collections.Generic.IEnumerable overrideTools = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateThreadAndRunAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAndRunAsync(string assistantId, Azure.AI.Projects.AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, System.Collections.Generic.IEnumerable overrideTools = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? stream = default(bool?), float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, bool? parallelToolCalls = default(bool?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateThreadAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateThreadAsync(System.Collections.Generic.IEnumerable messages = null, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStore(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStore(System.Collections.Generic.IEnumerable fileIds = null, string name = null, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreAsync(System.Collections.Generic.IEnumerable fileIds = null, string name = null, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStoreFile(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStoreFile(string vectorStoreId, string fileId = null, Azure.AI.Projects.VectorStoreDataSource dataSource = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreFileAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreFileAsync(string vectorStoreId, string fileId = null, Azure.AI.Projects.VectorStoreDataSource dataSource = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateVectorStoreFileBatch(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateVectorStoreFileBatch(string vectorStoreId, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IEnumerable dataSources = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateVectorStoreFileBatchAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateVectorStoreFileBatchAsync(string vectorStoreId, System.Collections.Generic.IEnumerable fileIds = null, System.Collections.Generic.IEnumerable dataSources = null, Azure.AI.Projects.VectorStoreChunkingStrategyRequest chunkingStrategy = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteAgent(string agentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteAgentAsync(string agentId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteFile(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response DeleteVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteVectorStoreAsync(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response DeleteVectorStoreFile(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response DeleteVectorStoreFile(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetAgent(string assistantId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetAgent(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetAgentAsync(string assistantId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetAgentAsync(string assistantId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetAgents(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetAgentsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFile(string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetFile(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetFileAsync(string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetFileAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetFileContent(string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetFileContent(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetFileContentAsync(string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetFileContentAsync(string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetFiles(Azure.AI.Projects.AgentFilePurpose? purpose = default(Azure.AI.Projects.AgentFilePurpose?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetFilesAsync(Azure.AI.Projects.AgentFilePurpose? purpose = default(Azure.AI.Projects.AgentFilePurpose?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetMessage(string threadId, string messageId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetMessage(string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetMessageAsync(string threadId, string messageId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetMessageAsync(string threadId, string messageId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetMessages(string threadId, string runId = null, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetMessagesAsync(string threadId, string runId = null, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRun(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetRun(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetRunAsync(string threadId, string runId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetRunAsync(string threadId, string runId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRuns(string threadId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunsAsync(string threadId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetRunStep(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetRunStep(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetRunStepAsync(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetRunStepAsync(string threadId, string runId, string stepId, System.Collections.Generic.IEnumerable include = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRunSteps(Azure.AI.Projects.ThreadRun run, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetRunSteps(string threadId, string runId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunStepsAsync(Azure.AI.Projects.ThreadRun run, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetRunStepsAsync(string threadId, string runId, int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetThread(string threadId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetThreadAsync(string threadId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response> GetThreads(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task>> GetThreadsAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStore(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStore(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreAsync(string vectorStoreId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreAsync(string vectorStoreId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFile(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFile(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileAsync(string vectorStoreId, string fileId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStoreFiles(string vectorStoreId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStoreFiles(string vectorStoreId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoreFilesAsync(string vectorStoreId, Azure.AI.Projects.VectorStoreFileStatusFilter? filter = default(Azure.AI.Projects.VectorStoreFileStatusFilter?), int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoreFilesAsync(string vectorStoreId, string filter, int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetVectorStores(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetVectorStores(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetVectorStoresAsync(int? limit = default(int?), Azure.AI.Projects.ListSortOrder? order = default(Azure.AI.Projects.ListSortOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetVectorStoresAsync(int? limit, string order, string after, string before, Azure.RequestContext context) { throw null; } - public virtual Azure.Response ModifyVectorStore(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response ModifyVectorStore(string vectorStoreId, string name = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task ModifyVectorStoreAsync(string vectorStoreId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> ModifyVectorStoreAsync(string vectorStoreId, string name = null, Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SubmitToolOutputsToRun(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SubmitToolOutputsToRun(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> SubmitToolOutputsToRunAsync(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task SubmitToolOutputsToRunAsync(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.ClientModel.CollectionResult SubmitToolOutputsToStream(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult SubmitToolOutputsToStreamAsync(Azure.AI.Projects.ThreadRun run, System.Collections.Generic.IEnumerable toolOutputs, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken), Azure.AI.Projects.AutoFunctionCallOptions autoFunctionCallOptions = null) { throw null; } - public virtual Azure.Response UpdateAgent(string assistantId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateAgent(string assistantId, string model = null, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAgentAsync(string assistantId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAgentAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateMessage(string threadId, string messageId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateMessage(string threadId, string messageId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateMessageAsync(string threadId, string messageId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateMessageAsync(string threadId, string messageId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateRun(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateRun(string threadId, string runId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateRunAsync(string threadId, string runId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateRunAsync(string threadId, string runId, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateThread(string threadId, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UpdateThread(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateThreadAsync(string threadId, Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UpdateThreadAsync(string threadId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UploadFile(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UploadFile(System.IO.Stream data, Azure.AI.Projects.AgentFilePurpose purpose, string filename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UploadFile(string filePath, Azure.AI.Projects.AgentFilePurpose purpose, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task UploadFileAsync(Azure.Core.RequestContent content, string contentType, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> UploadFileAsync(System.IO.Stream data, Azure.AI.Projects.AgentFilePurpose purpose, string filename, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UploadFileAsync(string filePath, Azure.AI.Projects.AgentFilePurpose purpose, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.AI.Projects.AgentEvaluation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentsNamedToolChoice : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationRedactionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AgentsNamedToolChoice(Azure.AI.Projects.AgentsNamedToolChoiceType type) { } - public Azure.AI.Projects.FunctionName Function { get { throw null; } set { } } - public Azure.AI.Projects.AgentsNamedToolChoiceType Type { get { throw null; } set { } } + public AgentEvaluationRedactionConfiguration() { } + public bool? RedactScoreProperties { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentsNamedToolChoice System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentsNamedToolChoice System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AgentsNamedToolChoiceType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentsNamedToolChoiceType(string value) { throw null; } - public static Azure.AI.Projects.AgentsNamedToolChoiceType AzureAISearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType BingCustomSearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType BingGrounding { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType CodeInterpreter { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType ConnectedAgent { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType FileSearch { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType Function { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType MicrosoftFabric { get { throw null; } } - public static Azure.AI.Projects.AgentsNamedToolChoiceType Sharepoint { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentsNamedToolChoiceType 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.Projects.AgentsNamedToolChoiceType left, Azure.AI.Projects.AgentsNamedToolChoiceType right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentsNamedToolChoiceType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentsNamedToolChoiceType left, Azure.AI.Projects.AgentsNamedToolChoiceType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AgentStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AgentStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.AgentStreamEvent Done { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent Error { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageDelta { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageIncomplete { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadMessageInProgress { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCancelled { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCancelling { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunExpired { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunFailed { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunIncomplete { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunInProgress { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunQueued { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunRequiresAction { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCancelled { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCompleted { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepCreated { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepDelta { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepExpired { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepFailed { get { throw null; } } - public static Azure.AI.Projects.AgentStreamEvent ThreadRunStepInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.AgentStreamEvent 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.Projects.AgentStreamEvent left, Azure.AI.Projects.AgentStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.AgentStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AgentStreamEvent left, Azure.AI.Projects.AgentStreamEvent right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.AgentEvaluationRedactionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationRedactionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentThread : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal AgentThread() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } + public AgentEvaluationRequest(string runId, System.Collections.Generic.IDictionary evaluators, string appInsightsConnectionString) { } + public string AppInsightsConnectionString { get { throw null; } } + public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } + public Azure.AI.Projects.AgentEvaluationRedactionConfiguration RedactionConfiguration { get { throw null; } set { } } + public string RunId { get { throw null; } } + public Azure.AI.Projects.AgentEvaluationSamplingConfiguration SamplingConfiguration { get { throw null; } set { } } + public string ThreadId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentEvaluationRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AgentEvaluationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AgentEvaluationResult() { } + public System.Collections.Generic.IReadOnlyDictionary AdditionalDetails { get { throw null; } } + public string Error { get { throw null; } } + public string Evaluator { get { throw null; } } + public string EvaluatorId { get { throw null; } } + public string Reason { get { throw null; } } + public string RunId { get { throw null; } } + public float Score { get { throw null; } } + public string Status { get { throw null; } } + public string ThreadId { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentThread System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentThread System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AgentEvaluationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class AgentThreadCreationOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AgentEvaluationSamplingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public AgentThreadCreationOptions() { } - public System.Collections.Generic.IList Messages { get { throw null; } } - public System.Collections.Generic.IDictionary Metadata { get { throw null; } set { } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } set { } } + public AgentEvaluationSamplingConfiguration(string name, float samplingPercent, float maxRequestRate) { } + public float MaxRequestRate { get { throw null; } } + public string Name { get { throw null; } } + public float SamplingPercent { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AgentThreadCreationOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentThreadCreationOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 AIClientModelFactory - { - public static Azure.AI.Projects.Agent Agent(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string name = null, string description = null, string model = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.ToolResources toolResources = null, float? temperature = default(float?), float? topP = default(float?), System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.AgentFile AgentFile(string id = null, int size = 0, string filename = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Projects.AgentFilePurpose purpose = default(Azure.AI.Projects.AgentFilePurpose)) { throw null; } - public static Azure.AI.Projects.AgentThread AgentThread(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), Azure.AI.Projects.ToolResources toolResources = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.MessageTextFileCitationAnnotation MessageFileCitationTextAnnotation(string text, string fileId, string quote) { throw null; } - public static Azure.AI.Projects.MessageTextFilePathAnnotation MessageFilePathTextAnnotation(string text, string fileId) { throw null; } - public static Azure.AI.Projects.MessageImageFileContent MessageImageFileContent(string fileId) { throw null; } - public static Azure.AI.Projects.MessageTextContent MessageTextContent(string text, System.Collections.Generic.IEnumerable annotations) { throw null; } - public static Azure.AI.Projects.PageableList PageableList(System.Collections.Generic.IReadOnlyList data, string firstId, string lastId, bool hasMore) { throw null; } - public static Azure.AI.Projects.RequiredFunctionToolCall RequiredFunctionToolCall(string toolCallId, string functionName, string functionArguments) { throw null; } - public static Azure.AI.Projects.RunStep RunStep(string id = null, Azure.AI.Projects.RunStepType type = default(Azure.AI.Projects.RunStepType), string agentId = null, string threadId = null, string runId = null, Azure.AI.Projects.RunStepStatus status = default(Azure.AI.Projects.RunStepStatus), Azure.AI.Projects.RunStepDetails stepDetails = null, Azure.AI.Projects.RunStepError lastError = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiredAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Projects.RunStepCompletionUsage usage = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterToolCall RunStepCodeInterpreterToolCall(string id, string input, System.Collections.Generic.IReadOnlyList outputs) { throw null; } - public static Azure.AI.Projects.RunStepFunctionToolCall RunStepFunctionToolCall(string id, string name, string arguments, string output) { throw null; } - public static Azure.AI.Projects.SubmitToolOutputsAction SubmitToolOutputsAction(System.Collections.Generic.IEnumerable toolCalls) { throw null; } - public static Azure.AI.Projects.ThreadMessage ThreadMessage(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string threadId = null, Azure.AI.Projects.MessageStatus status = default(Azure.AI.Projects.MessageStatus), Azure.AI.Projects.MessageIncompleteDetails incompleteDetails = null, System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? incompleteAt = default(System.DateTimeOffset?), Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.Collections.Generic.IEnumerable contentItems = null, string agentId = null, string runId = null, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.ThreadRun ThreadRun(string id = null, string threadId = null, string agentId = null, Azure.AI.Projects.RunStatus status = default(Azure.AI.Projects.RunStatus), Azure.AI.Projects.RequiredAction requiredAction = null, Azure.AI.Projects.RunError lastError = null, string model = null, string instructions = null, System.Collections.Generic.IEnumerable tools = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?), System.DateTimeOffset? startedAt = default(System.DateTimeOffset?), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?), System.DateTimeOffset? cancelledAt = default(System.DateTimeOffset?), System.DateTimeOffset? failedAt = default(System.DateTimeOffset?), Azure.AI.Projects.IncompleteRunDetails incompleteDetails = null, Azure.AI.Projects.RunCompletionUsage usage = null, float? temperature = default(float?), float? topP = default(float?), int? maxPromptTokens = default(int?), int? maxCompletionTokens = default(int?), Azure.AI.Projects.TruncationObject truncationStrategy = null, System.BinaryData toolChoice = null, System.BinaryData responseFormat = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, Azure.AI.Projects.UpdateToolResourcesOptions toolResources = null, bool? parallelToolCalls = default(bool?)) { throw null; } + Azure.AI.Projects.AgentEvaluationSamplingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AgentEvaluationSamplingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class AIProjectClient : System.ClientModel.Primitives.ClientConnectionProvider { protected AIProjectClient() : base (default(int)) { } - public AIProjectClient(string connectionString, Azure.Core.TokenCredential credential = null) : base (default(int)) { } - public AIProjectClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } - public AIProjectClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) : base (default(int)) { } - public AIProjectClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } + public AIProjectClient(System.Uri endpoint, Azure.Core.TokenCredential credential = null) : base (default(int)) { } + public AIProjectClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.AI.Projects.AgentsClient GetAgentsClient(string apiVersion = "2024-07-01-preview") { throw null; } + public Azure.AI.Projects.Telemetry Telemetry { get { throw null; } } public override System.Collections.Generic.IEnumerable GetAllConnections() { throw null; } + public OpenAI.Chat.ChatClient GetAzureOpenAIChatClient(string? connectionName = null, string? apiVersion = null, string? deploymentName = null) { throw null; } + public Azure.AI.Inference.ChatCompletionsClient GetChatCompletionsClient() { throw null; } public override System.ClientModel.Primitives.ClientConnection GetConnection(string connectionId) { throw null; } - public virtual Azure.AI.Projects.ConnectionsClient GetConnectionsClient(string apiVersion = "2024-07-01-preview") { throw null; } - public virtual Azure.AI.Projects.EvaluationsClient GetEvaluationsClient(string apiVersion = "2024-07-01-preview") { throw null; } - public virtual Azure.AI.Projects.TelemetryClient GetTelemetryClient(string apiVersion = "2024-07-01-preview") { throw null; } + public virtual Azure.AI.Projects.Connections GetConnectionsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.Datasets GetDatasetsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.Deployments GetDeploymentsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public Azure.AI.Inference.EmbeddingsClient GetEmbeddingsClient() { throw null; } + public virtual Azure.AI.Projects.Evaluations GetEvaluationsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public Azure.AI.Inference.ImageEmbeddingsClient GetImageEmbeddingsClient() { throw null; } + public virtual Azure.AI.Projects.Indexes GetIndexesClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.RedTeams GetRedTeamsClient(string apiVersion = "2025-05-15-preview") { throw null; } + public virtual Azure.AI.Projects.ServicePatterns GetServicePatternsClient() { throw null; } } public partial class AIProjectClientOptions : Azure.Core.ClientOptions { - public AIProjectClientOptions(Azure.AI.Projects.AIProjectClientOptions.ServiceVersion version = Azure.AI.Projects.AIProjectClientOptions.ServiceVersion.V2024_07_01_Preview) { } + public AIProjectClientOptions(Azure.AI.Projects.AIProjectClientOptions.ServiceVersion version = Azure.AI.Projects.AIProjectClientOptions.ServiceVersion.V2025_05_15_Preview) { } public int ClientCacheSize { get { throw null; } set { } } public enum ServiceVersion { - V2024_07_01_Preview = 1, + V2025_05_01 = 1, + V2025_05_15_Preview = 2, } } public static partial class AIProjectsModelFactory { - public static Azure.AI.Projects.AgentPageableListOfVectorStore AgentPageableListOfVectorStore(Azure.AI.Projects.AgentPageableListOfVectorStoreObject @object = default(Azure.AI.Projects.AgentPageableListOfVectorStoreObject), System.Collections.Generic.IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; } - public static Azure.AI.Projects.AgentPageableListOfVectorStoreFile AgentPageableListOfVectorStoreFile(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject @object = default(Azure.AI.Projects.AgentPageableListOfVectorStoreFileObject), System.Collections.Generic.IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = false) { throw null; } - public static Azure.AI.Projects.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Projects.AzureFunctionBindingType type = default(Azure.AI.Projects.AzureFunctionBindingType), Azure.AI.Projects.AzureFunctionStorageQueue storageQueue = null) { throw null; } - public static Azure.AI.Projects.ConnectionProperties ConnectionProperties(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.ConnectionPropertiesApiKeyAuth ConnectionPropertiesApiKeyAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null, Azure.AI.Projects.CredentialsApiKeyAuth credentials = null) { throw null; } - public static Azure.AI.Projects.ConnectionResponse ConnectionResponse(string id = null, string name = null, Azure.AI.Projects.ConnectionProperties properties = null) { throw null; } - public static Azure.AI.Projects.CredentialsApiKeyAuth CredentialsApiKeyAuth(string key = null) { throw null; } - public static Azure.AI.Projects.Evaluation Evaluation(string id = null, Azure.AI.Projects.InputData data = null, Azure.AI.Projects.EvaluationTarget target = null, string displayName = null, string description = null, Azure.AI.Projects.SystemData systemData = null, string status = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary evaluators = null) { throw null; } - public static Azure.AI.Projects.EvaluationSchedule EvaluationSchedule(string name = null, Azure.AI.Projects.ApplicationInsightsConfiguration data = null, string description = null, Azure.AI.Projects.SystemData systemData = null, string provisioningState = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string isEnabled = null, System.Collections.Generic.IDictionary evaluators = null, Azure.AI.Projects.Trigger trigger = null) { throw null; } - public static Azure.AI.Projects.FileSearchToolCallContent FileSearchToolCallContent(Azure.AI.Projects.FileSearchToolCallContentType type = default(Azure.AI.Projects.FileSearchToolCallContentType), string text = null) { throw null; } - public static Azure.AI.Projects.GetWorkspaceResponse GetWorkspaceResponse(string id = null, string name = null, Azure.AI.Projects.WorkspaceProperties properties = null) { throw null; } - public static Azure.AI.Projects.IncompleteRunDetails IncompleteRunDetails(Azure.AI.Projects.IncompleteDetailsReason reason = default(Azure.AI.Projects.IncompleteDetailsReason)) { throw null; } - public static Azure.AI.Projects.InternalConnectionPropertiesCustomAuth InternalConnectionPropertiesCustomAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.InternalConnectionPropertiesNoAuth InternalConnectionPropertiesNoAuth(Azure.AI.Projects.ConnectionType category = default(Azure.AI.Projects.ConnectionType), string target = null) { throw null; } - public static Azure.AI.Projects.ListConnectionsResponse ListConnectionsResponse(System.Collections.Generic.IEnumerable value = null) { throw null; } - public static Azure.AI.Projects.MessageDelta MessageDelta(Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaChunk MessageDeltaChunk(string id = null, Azure.AI.Projects.MessageDeltaChunkObject @object = default(Azure.AI.Projects.MessageDeltaChunkObject), Azure.AI.Projects.MessageDelta delta = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaContent MessageDeltaContent(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = 0, Azure.AI.Projects.MessageDeltaImageFileContentObject imageFile = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextContent MessageDeltaTextContent(int index = 0, Azure.AI.Projects.MessageDeltaTextContentObject text = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, System.Collections.Generic.IEnumerable annotations = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = default(int?), int? endIndex = default(int?), string text = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextUrlCitationAnnotation MessageDeltaTextUrlCitationAnnotation(int index = 0, Azure.AI.Projects.MessageDeltaTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageDeltaTextUrlCitationDetails MessageDeltaTextUrlCitationDetails(string url = null, string title = null) { throw null; } - public static Azure.AI.Projects.MessageImageFileParam MessageImageFileParam(string fileId = null, Azure.AI.Projects.ImageDetailLevel? detail = default(Azure.AI.Projects.ImageDetailLevel?)) { throw null; } - public static Azure.AI.Projects.MessageImageUrlParam MessageImageUrlParam(string url = null, Azure.AI.Projects.ImageDetailLevel? detail = default(Azure.AI.Projects.ImageDetailLevel?)) { throw null; } - public static Azure.AI.Projects.MessageIncompleteDetails MessageIncompleteDetails(Azure.AI.Projects.MessageIncompleteDetailsReason reason = default(Azure.AI.Projects.MessageIncompleteDetailsReason)) { throw null; } - public static Azure.AI.Projects.MessageInputImageFileBlock MessageInputImageFileBlock(Azure.AI.Projects.MessageImageFileParam imageFile = null) { throw null; } - public static Azure.AI.Projects.MessageInputImageUrlBlock MessageInputImageUrlBlock(Azure.AI.Projects.MessageImageUrlParam imageUrl = null) { throw null; } - public static Azure.AI.Projects.MessageInputTextBlock MessageInputTextBlock(string text = null) { throw null; } - public static Azure.AI.Projects.MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) { throw null; } - public static Azure.AI.Projects.MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, Azure.AI.Projects.MessageTextUrlCitationDetails urlCitation = null, int? startIndex = default(int?), int? endIndex = default(int?)) { throw null; } - public static Azure.AI.Projects.MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) { throw null; } - public static Azure.AI.Projects.RequiredToolCall RequiredToolCall(string type = null, string id = null) { throw null; } - public static Azure.AI.Projects.ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType type = default(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType), Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema = null) { throw null; } - public static Azure.AI.Projects.RunCompletionUsage RunCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; } - public static Azure.AI.Projects.RunError RunError(string code = null, string message = null) { throw null; } - public static Azure.AI.Projects.RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary azureAISearch = null) { throw null; } - public static Azure.AI.Projects.RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingGrounding = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(Azure.AI.Projects.RunStepCodeInterpreterImageReference image = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) { throw null; } - public static Azure.AI.Projects.RunStepCodeInterpreterLogOutput RunStepCodeInterpreterLogOutput(string logs = null) { throw null; } - public static Azure.AI.Projects.RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = (long)0, long promptTokens = (long)0, long totalTokens = (long)0) { throw null; } - public static Azure.AI.Projects.RunStepCustomSearchToolCall RunStepCustomSearchToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary bingCustomSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepDelta RunStepDelta(Azure.AI.Projects.RunStepDeltaDetail stepDetails = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaChunk RunStepDeltaChunk(string id = null, Azure.AI.Projects.RunStepDeltaChunkObject @object = default(Azure.AI.Projects.RunStepDeltaChunkObject), Azure.AI.Projects.RunStepDelta delta = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, System.Collections.Generic.IEnumerable outputs = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = 0, Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject image = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = 0, string logs = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = 0, string type = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepFileSearchToolCallResults fileSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = 0, string id = null, Azure.AI.Projects.RunStepDeltaFunction function = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaMessageCreation RunStepDeltaMessageCreation(Azure.AI.Projects.RunStepDeltaMessageCreationObject messageCreation = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaToolCall RunStepDeltaToolCall(int index = 0, string id = null, string type = null) { throw null; } - public static Azure.AI.Projects.RunStepDeltaToolCallObject RunStepDeltaToolCallObject(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } - public static Azure.AI.Projects.RunStepError RunStepError(Azure.AI.Projects.RunStepErrorCode code = default(Azure.AI.Projects.RunStepErrorCode), string message = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, Azure.AI.Projects.RunStepFileSearchToolCallResults fileSearch = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = 0f, System.Collections.Generic.IEnumerable content = null) { throw null; } - public static Azure.AI.Projects.RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(Azure.AI.Projects.FileSearchRankingOptions rankingOptions = null, System.Collections.Generic.IEnumerable results = null) { throw null; } - public static Azure.AI.Projects.RunStepMessageCreationDetails RunStepMessageCreationDetails(Azure.AI.Projects.RunStepMessageCreationReference messageCreation = null) { throw null; } - public static Azure.AI.Projects.RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) { throw null; } - public static Azure.AI.Projects.RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary microsoftFabric = null) { throw null; } - public static Azure.AI.Projects.RunStepOpenAPIToolCall RunStepOpenAPIToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary openAPI = null) { throw null; } - public static Azure.AI.Projects.RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, System.Collections.Generic.IReadOnlyDictionary sharePoint = null) { throw null; } - public static Azure.AI.Projects.RunStepToolCall RunStepToolCall(string type = null, string id = null) { throw null; } - public static Azure.AI.Projects.RunStepToolCallDetails RunStepToolCallDetails(System.Collections.Generic.IEnumerable toolCalls = null) { throw null; } - public static Azure.AI.Projects.SystemData SystemData(System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), string createdBy = null, string createdByType = null, System.DateTimeOffset? lastModifiedAt = default(System.DateTimeOffset?)) { throw null; } - public static Azure.AI.Projects.ThreadMessageOptions ThreadMessageOptions(Azure.AI.Projects.MessageRole role = default(Azure.AI.Projects.MessageRole), System.BinaryData content = null, System.Collections.Generic.IEnumerable attachments = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.VectorStore VectorStore(string id = null, Azure.AI.Projects.VectorStoreObject @object = default(Azure.AI.Projects.VectorStoreObject), System.DateTimeOffset createdAt = default(System.DateTimeOffset), string name = null, int usageBytes = 0, Azure.AI.Projects.VectorStoreFileCount fileCounts = null, Azure.AI.Projects.VectorStoreStatus status = default(Azure.AI.Projects.VectorStoreStatus), Azure.AI.Projects.VectorStoreExpirationPolicy expiresAfter = null, System.DateTimeOffset? expiresAt = default(System.DateTimeOffset?), System.DateTimeOffset? lastActiveAt = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } - public static Azure.AI.Projects.VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = false, Azure.AI.Projects.VectorStoreDeletionStatusObject @object = default(Azure.AI.Projects.VectorStoreDeletionStatusObject)) { throw null; } - public static Azure.AI.Projects.VectorStoreFile VectorStoreFile(string id = null, Azure.AI.Projects.VectorStoreFileObject @object = default(Azure.AI.Projects.VectorStoreFileObject), int usageBytes = 0, System.DateTimeOffset createdAt = default(System.DateTimeOffset), string vectorStoreId = null, Azure.AI.Projects.VectorStoreFileStatus status = default(Azure.AI.Projects.VectorStoreFileStatus), Azure.AI.Projects.VectorStoreFileError lastError = null, Azure.AI.Projects.VectorStoreChunkingStrategyResponse chunkingStrategy = null) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatch VectorStoreFileBatch(string id = null, Azure.AI.Projects.VectorStoreFileBatchObject @object = default(Azure.AI.Projects.VectorStoreFileBatchObject), System.DateTimeOffset createdAt = default(System.DateTimeOffset), string vectorStoreId = null, Azure.AI.Projects.VectorStoreFileBatchStatus status = default(Azure.AI.Projects.VectorStoreFileBatchStatus), Azure.AI.Projects.VectorStoreFileCount fileCounts = null) { throw null; } - public static Azure.AI.Projects.VectorStoreFileCount VectorStoreFileCount(int inProgress = 0, int completed = 0, int failed = 0, int cancelled = 0, int total = 0) { throw null; } - public static Azure.AI.Projects.VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = false, Azure.AI.Projects.VectorStoreFileDeletionStatusObject @object = default(Azure.AI.Projects.VectorStoreFileDeletionStatusObject)) { throw null; } - public static Azure.AI.Projects.VectorStoreFileError VectorStoreFileError(Azure.AI.Projects.VectorStoreFileErrorCode code = default(Azure.AI.Projects.VectorStoreFileErrorCode), string message = null) { throw null; } - public static Azure.AI.Projects.VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static = null) { throw null; } - public static Azure.AI.Projects.VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static = null) { throw null; } - public static Azure.AI.Projects.WorkspaceProperties WorkspaceProperties(string applicationInsights = null) { throw null; } - } - public partial class AISearchIndexResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AISearchIndexResource(string indexConnectionId, string indexName) { } - public string Filter { get { throw null; } set { } } - public string IndexConnectionId { get { throw null; } set { } } - public string IndexName { get { throw null; } set { } } - public Azure.AI.Projects.AzureAISearchQueryType? QueryType { get { throw null; } set { } } - public int? TopK { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AISearchIndexResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AISearchIndexResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AOAIModelConfig : Azure.AI.Projects.TargetModelConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AOAIModelConfig(string azureEndpoint, string apiKey, string azureDeployment) { } - public string ApiKey { get { throw null; } set { } } - public string AzureDeployment { get { throw null; } set { } } - public string AzureEndpoint { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AOAIModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AOAIModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ApplicationInsightsConfiguration : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ApplicationInsightsConfiguration(string resourceId, string query) { } - public string ConnectionString { get { throw null; } set { } } - public string Query { get { throw null; } set { } } - public string ResourceId { get { throw null; } set { } } - public string ServiceName { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ApplicationInsightsConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ApplicationInsightsConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 Azure.AI.Projects.AgentEvaluation AgentEvaluation(string id = null, string status = null, string error = null, System.Collections.Generic.IEnumerable result = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluationRequest AgentEvaluationRequest(string runId = null, string threadId = null, System.Collections.Generic.IDictionary evaluators = null, Azure.AI.Projects.AgentEvaluationSamplingConfiguration samplingConfiguration = null, Azure.AI.Projects.AgentEvaluationRedactionConfiguration redactionConfiguration = null, string appInsightsConnectionString = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluationResult AgentEvaluationResult(string evaluator = null, string evaluatorId = null, float score = 0f, string status = null, string reason = null, string version = null, string threadId = null, string runId = null, string error = null, System.Collections.Generic.IReadOnlyDictionary additionalDetails = null) { throw null; } + public static Azure.AI.Projects.ApiKeyCredentials ApiKeyCredentials(string apiKey = null) { throw null; } + public static Azure.AI.Projects.AssetCredentialResponse AssetCredentialResponse(Azure.AI.Projects.BlobReference blobReference = null) { throw null; } + public static Azure.AI.Projects.AzureAISearchIndex AzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string connectionName = null, string indexName = null, Azure.AI.Projects.FieldMapping fieldMapping = null) { throw null; } + public static Azure.AI.Projects.BlobReference BlobReference(string blobUri = null, string storageAccountArmId = null, Azure.AI.Projects.SasCredential credential = null) { throw null; } + public static Azure.AI.Projects.Connection Connection(string name = null, string id = null, Azure.AI.Projects.ConnectionType type = default(Azure.AI.Projects.ConnectionType), string target = null, bool isDefault = false, Azure.AI.Projects.BaseCredentials credentials = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } + public static Azure.AI.Projects.CosmosDBIndex CosmosDBIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string connectionName = null, string databaseName = null, string containerName = null, Azure.AI.Projects.EmbeddingConfiguration embeddingConfiguration = null, Azure.AI.Projects.FieldMapping fieldMapping = null) { throw null; } + public static Azure.AI.Projects.CustomCredential CustomCredential(System.Collections.Generic.IReadOnlyDictionary keys = null) { throw null; } + public static Azure.AI.Projects.DatasetVersion DatasetVersion(string dataUri = null, string type = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Deployment Deployment(string type = null, string name = null) { throw null; } + public static Azure.AI.Projects.Evaluation Evaluation(string name = null, Azure.AI.Projects.InputData data = null, string displayName = null, string description = null, string status = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IDictionary evaluators = null) { throw null; } + public static Azure.AI.Projects.FileDatasetVersion FileDatasetVersion(string dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.FolderDatasetVersion FolderDatasetVersion(string dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Index Index(string type = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string vectorStoreId = null) { throw null; } + public static Azure.AI.Projects.ModelDeployment ModelDeployment(string name = null, string modelName = null, string modelVersion = null, string modelPublisher = null, System.Collections.Generic.IReadOnlyDictionary capabilities = null, Azure.AI.Projects.Sku sku = null, string connectionName = null) { throw null; } + public static Azure.AI.Projects.PendingUploadRequest PendingUploadRequest(string pendingUploadId = null, string connectionName = null, Azure.AI.Projects.PendingUploadType pendingUploadType = default(Azure.AI.Projects.PendingUploadType)) { throw null; } + public static Azure.AI.Projects.PendingUploadResponse PendingUploadResponse(Azure.AI.Projects.BlobReference blobReference = null, string pendingUploadId = null, string version = null, Azure.AI.Projects.PendingUploadType pendingUploadType = default(Azure.AI.Projects.PendingUploadType)) { throw null; } + public static Azure.AI.Projects.RedTeam RedTeam(string name = null, string displayName = null, int? numTurns = default(int?), System.Collections.Generic.IEnumerable attackStrategies = null, bool? simulationOnly = default(bool?), System.Collections.Generic.IEnumerable riskCategories = null, string applicationScenario = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string status = null, Azure.AI.Projects.TargetConfig target = null) { throw null; } + public static Azure.AI.Projects.SasCredential SasCredential(string sasUri = null, Azure.AI.Projects.SasCredentialType type = default(Azure.AI.Projects.SasCredentialType)) { throw null; } + public static Azure.AI.Projects.SASCredentials SASCredentials(string sasToken = null) { throw null; } + public static Azure.AI.Projects.Sku Sku(long capacity = (long)0, string family = null, string name = null, string size = null, string tier = null) { throw null; } + } + public partial class ApiKeyCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiKeyCredentials() { } + public string ApiKey { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ApiKeyCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ApiKeyCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AssetCredentialResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AssetCredentialResponse() { } + public Azure.AI.Projects.BlobReference BlobReference { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AssetCredentialResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AssetCredentialResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AttackStrategy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AttackStrategy(string value) { throw null; } + public static Azure.AI.Projects.AttackStrategy AnsiiAttack { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy AsciiArt { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy AsciiSmuggler { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Atbash { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Base64 { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Baseline { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Binary { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Caesar { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy CharacterSpace { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy CharacterSwap { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Diacritic { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Difficult { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Easy { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Flip { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Jailbreak { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Leetspeak { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Moderate { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Morse { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy ROT13 { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy StringJoin { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy SuffixAppend { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy UnicodeConfusable { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy UnicodeSubstitution { get { throw null; } } + public static Azure.AI.Projects.AttackStrategy Url { get { throw null; } } + public bool Equals(Azure.AI.Projects.AttackStrategy 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.Projects.AttackStrategy left, Azure.AI.Projects.AttackStrategy right) { throw null; } + public static implicit operator Azure.AI.Projects.AttackStrategy (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.AttackStrategy left, Azure.AI.Projects.AttackStrategy right) { throw null; } + public override string ToString() { throw null; } } public enum AuthenticationType { @@ -629,246 +202,88 @@ public enum AuthenticationType Custom = 3, None = 4, } - public partial class AutoFunctionCallOptions - { - public AutoFunctionCallOptions(System.Collections.Generic.Dictionary toolDelegates, int maxRetry) { } - } public partial class AzureAIProjectsContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureAIProjectsContext() { } public static Azure.AI.Projects.AzureAIProjectsContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct AzureAISearchQueryType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AzureAISearchQueryType(string value) { throw null; } - public static Azure.AI.Projects.AzureAISearchQueryType Semantic { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType Simple { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType Vector { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType VectorSemanticHybrid { get { throw null; } } - public static Azure.AI.Projects.AzureAISearchQueryType VectorSimpleHybrid { get { throw null; } } - public bool Equals(Azure.AI.Projects.AzureAISearchQueryType 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.Projects.AzureAISearchQueryType left, Azure.AI.Projects.AzureAISearchQueryType right) { throw null; } - public static implicit operator Azure.AI.Projects.AzureAISearchQueryType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AzureAISearchQueryType left, Azure.AI.Projects.AzureAISearchQueryType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AzureAISearchResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureAISearchResource() { } - public AzureAISearchResource(string indexConnectionId, string indexName, int topK = 5, string filter = "", Azure.AI.Projects.AzureAISearchQueryType? queryType = default(Azure.AI.Projects.AzureAISearchQueryType?)) { } - public System.Collections.Generic.IList IndexList { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureAISearchResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureAISearchResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureAISearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureAISearchToolDefinition() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureAISearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureAISearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureFunctionBinding : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionBinding(Azure.AI.Projects.AzureFunctionStorageQueue storageQueue) { } - public Azure.AI.Projects.AzureFunctionStorageQueue StorageQueue { get { throw null; } set { } } - public Azure.AI.Projects.AzureFunctionBindingType Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionBinding System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionBinding System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 AzureFunctionBindingType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public AzureFunctionBindingType(string value) { throw null; } - public static Azure.AI.Projects.AzureFunctionBindingType StorageQueue { get { throw null; } } - public bool Equals(Azure.AI.Projects.AzureFunctionBindingType 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.Projects.AzureFunctionBindingType left, Azure.AI.Projects.AzureFunctionBindingType right) { throw null; } - public static implicit operator Azure.AI.Projects.AzureFunctionBindingType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.AzureFunctionBindingType left, Azure.AI.Projects.AzureFunctionBindingType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class AzureFunctionStorageQueue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName) { } - public string QueueName { get { throw null; } set { } } - public string StorageServiceEndpoint { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionStorageQueue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionStorageQueue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class AzureFunctionToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public AzureFunctionToolDefinition(string name, string description, Azure.AI.Projects.AzureFunctionBinding inputBinding, Azure.AI.Projects.AzureFunctionBinding outputBinding, System.BinaryData parameters) { } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData Parameters { get { throw null; } } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.AzureFunctionToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureFunctionToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class BingCustomSearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public BingCustomSearchToolDefinition(Azure.AI.Projects.SearchConfigurationList bingCustomSearch) { } - public Azure.AI.Projects.SearchConfigurationList BingCustomSearch { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.BingCustomSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BingCustomSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class BingGroundingToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureAISearchIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public BingGroundingToolDefinition(Azure.AI.Projects.ToolConnectionList bingGrounding) { } - public Azure.AI.Projects.ToolConnectionList BingGrounding { get { throw null; } set { } } + public AzureAISearchIndex(string connectionName, string indexName) { } + public string ConnectionName { get { throw null; } set { } } + public Azure.AI.Projects.FieldMapping FieldMapping { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.BingGroundingToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BingGroundingToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CodeInterpreterToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class AzureOpenAIModelConfiguration : Azure.AI.Projects.TargetConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CodeInterpreterToolDefinition() { } + public AzureOpenAIModelConfiguration(string modelDeploymentName) { } + public string ModelDeploymentName { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CodeInterpreterToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CodeInterpreterToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class CodeInterpreterToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public CodeInterpreterToolResource() { } - public System.Collections.Generic.IList DataSources { get { throw null; } } - public System.Collections.Generic.IList FileIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CodeInterpreterToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CodeInterpreterToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.AzureOpenAIModelConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.AzureOpenAIModelConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedAgentDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public abstract partial class BaseCredentials : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConnectedAgentDetails(string id, string name, string description) { } - public string Description { get { throw null; } set { } } - public string Id { get { throw null; } set { } } - public string Name { get { throw null; } set { } } + protected BaseCredentials() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectedAgentDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectedAgentDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.BaseCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BaseCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectedAgentToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class BlobReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ConnectedAgentToolDefinition(Azure.AI.Projects.ConnectedAgentDetails connectedAgent) { } - public Azure.AI.Projects.ConnectedAgentDetails ConnectedAgent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectedAgentToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectedAgentToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 ConnectionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected ConnectionProperties(Azure.AI.Projects.ConnectionType category, string target) { } - public Azure.AI.Projects.AuthenticationType AuthType { get { throw null; } set { } } - public Azure.AI.Projects.ConnectionType Category { get { throw null; } } - public string Target { get { throw null; } } + internal BlobReference() { } + public string BlobUri { get { throw null; } } + public Azure.AI.Projects.SasCredential Credential { get { throw null; } } + public string StorageAccountArmId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.BlobReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.BlobReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectionPropertiesApiKeyAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Connection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ConnectionPropertiesApiKeyAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - public Azure.AI.Projects.CredentialsApiKeyAuth Credentials { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionPropertiesApiKeyAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionPropertiesApiKeyAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ConnectionResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ConnectionResponse() { } + internal Connection() { } + public Azure.AI.Projects.BaseCredentials Credentials { get { throw null; } } public string Id { get { throw null; } } + public bool IsDefault { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Projects.ConnectionProperties Properties { get { throw null; } } + public string Target { get { throw null; } } + public Azure.AI.Projects.ConnectionType Type { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ConnectionResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ConnectionResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.Connection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Connection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class ConnectionsClient + public partial class Connections { - protected ConnectionsClient() { } - public ConnectionsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public ConnectionsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public ConnectionsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public ConnectionsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } + protected Connections() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - public virtual Azure.Response GetConnection(string connectionName, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetConnection(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionAsync(string connectionName, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionAsync(string connectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConnections(Azure.AI.Projects.ConnectionType? category = default(Azure.AI.Projects.ConnectionType?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetConnections(string category, bool? includeAll, string target, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionsAsync(Azure.AI.Projects.ConnectionType? category = default(Azure.AI.Projects.ConnectionType?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionsAsync(string category, bool? includeAll, string target, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetConnectionWithSecrets(string connectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetConnectionWithSecrets(string connectionName, string ignored, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetConnectionWithSecretsAsync(string connectionName, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> GetConnectionWithSecretsAsync(string connectionName, string ignored, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetDefaultConnection(Azure.AI.Projects.ConnectionType category, bool? withCredential = default(bool?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetDefaultConnectionAsync(Azure.AI.Projects.ConnectionType category, bool? withCredential = default(bool?), bool? includeAll = default(bool?), string target = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetWorkspace(Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetWorkspace(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetWorkspaceAsync(Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetWorkspaceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public Azure.AI.Projects.Connection Get(string connectionName, bool includeCredentials = false) { throw null; } + public System.Threading.Tasks.Task> GetAsync(string connectionName, bool includeCredentials = false) { throw null; } + public virtual Azure.Pageable GetConnections(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetConnections(string connectionType, bool? defaultConnection, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetConnectionsAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool? defaultConnection = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetConnectionsAsync(string connectionType, bool? defaultConnection, Azure.RequestContext context) { throw null; } + public Azure.AI.Projects.Connection GetDefault(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } + public System.Threading.Tasks.Task GetDefaultAsync(Azure.AI.Projects.ConnectionType? connectionType = default(Azure.AI.Projects.ConnectionType?), bool includeCredentials = false) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ConnectionType : System.IEquatable @@ -877,13 +292,14 @@ public ConnectionsClient(System.Uri endpoint, string subscriptionId, string reso private readonly int _dummyPrimitive; public ConnectionType(string value) { throw null; } public static Azure.AI.Projects.ConnectionType APIKey { get { throw null; } } + public static Azure.AI.Projects.ConnectionType ApplicationConfiguration { get { throw null; } } + public static Azure.AI.Projects.ConnectionType ApplicationInsights { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureAISearch { get { throw null; } } - public static Azure.AI.Projects.ConnectionType AzureAIServices { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureBlobStorage { get { throw null; } } public static Azure.AI.Projects.ConnectionType AzureOpenAI { get { throw null; } } - public static Azure.AI.Projects.ConnectionType CognitiveService { get { throw null; } } + public static Azure.AI.Projects.ConnectionType AzureStorageAccount { get { throw null; } } + public static Azure.AI.Projects.ConnectionType CosmosDB { get { throw null; } } public static Azure.AI.Projects.ConnectionType Custom { get { throw null; } } - public static Azure.AI.Projects.ConnectionType Serverless { get { throw null; } } public bool Equals(Azure.AI.Projects.ConnectionType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -894,73 +310,145 @@ public ConnectionsClient(System.Uri endpoint, string subscriptionId, string reso public static bool operator !=(Azure.AI.Projects.ConnectionType left, Azure.AI.Projects.ConnectionType right) { throw null; } public override string ToString() { throw null; } } - public partial class CredentialsApiKeyAuth : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CosmosDBIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal CredentialsApiKeyAuth() { } - public string Key { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CredentialsApiKeyAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CredentialsApiKeyAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public CosmosDBIndex(string connectionName, string databaseName, string containerName, Azure.AI.Projects.EmbeddingConfiguration embeddingConfiguration, Azure.AI.Projects.FieldMapping fieldMapping) { } + public string ConnectionName { get { throw null; } set { } } + public string ContainerName { get { throw null; } set { } } + public string DatabaseName { get { throw null; } set { } } + public Azure.AI.Projects.EmbeddingConfiguration EmbeddingConfiguration { get { throw null; } set { } } + public Azure.AI.Projects.FieldMapping FieldMapping { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.CosmosDBIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CosmosDBIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class CronTrigger : Azure.AI.Projects.Trigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CustomCredential : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public CronTrigger(string expression) { } - public string Expression { get { throw null; } set { } } + internal CustomCredential() { } + public System.Collections.Generic.IReadOnlyDictionary Keys { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.CronTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CronTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.CustomCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.CustomCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class Dataset : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Datasets { - public Dataset(string id) { } - public string Id { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Dataset System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Dataset System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected Datasets() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateOrUpdate(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Delete(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetCredentials(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetCredentials(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCredentialsAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataset(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDataset(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDatasetAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDatasetAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDatasetVersions(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetDatasetVersions(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDatasetVersionsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDatasetVersionsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static string GetRelativePath(string folderPath, string filePath) { throw null; } + public virtual Azure.Pageable GetVersions(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetVersions(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PendingUpload(string name, string version, Azure.AI.Projects.PendingUploadRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response PendingUpload(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> PendingUploadAsync(string name, string version, Azure.AI.Projects.PendingUploadRequest body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task PendingUploadAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public Azure.Response UploadFile(string name, string version, string filePath) { throw null; } + public Azure.Response UploadFolder(string name, string version, string folderPath) { throw null; } + } + public abstract partial class DatasetVersion : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DatasetVersion(string dataUri) { } + public string ConnectionName { get { throw null; } set { } } + public string DataUri { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } } + public bool? IsReference { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.DatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 DoneEvent : System.IEquatable + public abstract partial class Deployment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public DoneEvent(string value) { throw null; } - public static Azure.AI.Projects.DoneEvent Done { get { throw null; } } - public bool Equals(Azure.AI.Projects.DoneEvent 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.Projects.DoneEvent left, Azure.AI.Projects.DoneEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.DoneEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.DoneEvent left, Azure.AI.Projects.DoneEvent right) { throw null; } - public override string ToString() { throw null; } + protected Deployment() { } + public string Name { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Deployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Deployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class Deployments + { + protected Deployments() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response GetDeployment(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetDeployment(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetDeploymentAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetDeploymentAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string modelPublisher = null, string modelName = null, Azure.AI.Projects.DeploymentType? deploymentType = default(Azure.AI.Projects.DeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetDeployments(string modelPublisher, string modelName, string deploymentType, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string modelPublisher = null, string modelName = null, Azure.AI.Projects.DeploymentType? deploymentType = default(Azure.AI.Projects.DeploymentType?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, Azure.RequestContext context) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ErrorEvent : System.IEquatable + public readonly partial struct DeploymentType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public ErrorEvent(string value) { throw null; } - public static Azure.AI.Projects.ErrorEvent Error { get { throw null; } } - public bool Equals(Azure.AI.Projects.ErrorEvent other) { throw null; } + public DeploymentType(string value) { throw null; } + public static Azure.AI.Projects.DeploymentType ModelDeployment { get { throw null; } } + public bool Equals(Azure.AI.Projects.DeploymentType 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.Projects.ErrorEvent left, Azure.AI.Projects.ErrorEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.ErrorEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ErrorEvent left, Azure.AI.Projects.ErrorEvent right) { throw null; } + public static bool operator ==(Azure.AI.Projects.DeploymentType left, Azure.AI.Projects.DeploymentType right) { throw null; } + public static implicit operator Azure.AI.Projects.DeploymentType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DeploymentType left, Azure.AI.Projects.DeploymentType right) { throw null; } public override string ToString() { throw null; } } + public partial class EmbeddingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) { } + public string EmbeddingField { get { throw null; } set { } } + public string ModelDeploymentName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EmbeddingConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EmbeddingConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EntraIDCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EntraIDCredentials() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EntraIDCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EntraIDCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class Evaluation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public Evaluation(Azure.AI.Projects.InputData data, System.Collections.Generic.IDictionary evaluators) { } @@ -968,12 +456,10 @@ public Evaluation(Azure.AI.Projects.InputData data, System.Collections.Generic.I public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } - public string Id { get { throw null; } } + public string Name { get { throw null; } } public System.Collections.Generic.IDictionary Properties { get { throw null; } } public string Status { get { throw null; } } - public Azure.AI.Projects.SystemData SystemData { get { throw null; } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.AI.Projects.EvaluationTarget Target { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.AI.Projects.Evaluation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -981,75 +467,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; } } - public partial class EvaluationSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EvaluationSchedule(Azure.AI.Projects.ApplicationInsightsConfiguration data, System.Collections.Generic.IDictionary evaluators, Azure.AI.Projects.Trigger trigger) { } - public Azure.AI.Projects.ApplicationInsightsConfiguration Data { get { throw null; } set { } } - public string Description { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Evaluators { get { throw null; } } - public string IsEnabled { get { throw null; } } - public string Name { get { throw null; } } - public System.Collections.Generic.IDictionary Properties { get { throw null; } } - public string ProvisioningState { get { throw null; } } - public Azure.AI.Projects.SystemData SystemData { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - public Azure.AI.Projects.Trigger Trigger { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.EvaluationSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EvaluationSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class EvaluationsClient + public partial class Evaluations { - protected EvaluationsClient() { } - public EvaluationsClient(string connectionString, Azure.Core.TokenCredential credential) { } - public EvaluationsClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public EvaluationsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public EvaluationsClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } + protected Evaluations() { } public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response Create(Azure.AI.Projects.Evaluation evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response CreateAgentEvaluation(Azure.AI.Projects.AgentEvaluationRequest evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateAgentEvaluation(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAgentEvaluationAsync(Azure.AI.Projects.AgentEvaluationRequest evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAgentEvaluationAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.Evaluation evaluation, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrReplaceSchedule(string name, Azure.AI.Projects.EvaluationSchedule resource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response CreateOrReplaceSchedule(string name, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrReplaceScheduleAsync(string name, Azure.AI.Projects.EvaluationSchedule resource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateOrReplaceScheduleAsync(string name, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DisableSchedule(string name, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DisableScheduleAsync(string name, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetEvaluation(string id, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetEvaluation(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetEvaluationAsync(string id, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetEvaluationAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetEvaluations(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetEvaluations(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetEvaluationsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetEvaluationsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetSchedule(string name, Azure.RequestContext context) { throw null; } - public virtual Azure.Response GetSchedule(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task GetScheduleAsync(string name, Azure.RequestContext context) { throw null; } - public virtual System.Threading.Tasks.Task> GetScheduleAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetSchedules(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.Pageable GetSchedules(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetSchedulesAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } - public virtual Azure.AsyncPageable GetSchedulesAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(string id, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateAsync(string id, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - } - public partial class EvaluationTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public EvaluationTarget(string systemMessage, Azure.AI.Projects.TargetModelConfig modelConfig) { } - public Azure.AI.Projects.TargetModelConfig ModelConfig { get { throw null; } set { } } - public System.Collections.Generic.IDictionary ModelParams { get { throw null; } } - public string SystemMessage { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.EvaluationTarget System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.EvaluationTarget System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 GetEvaluation(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetEvaluation(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetEvaluationAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetEvaluationAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetEvaluations(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetEvaluations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetEvaluationsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetEvaluationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class EvaluatorConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -1064,2527 +501,354 @@ 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 FileSearchRankingOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public FileSearchRankingOptions(string ranker, float scoreThreshold) { } - public string Ranker { get { throw null; } set { } } - public float ScoreThreshold { get { throw null; } set { } } + public static partial class EvaluatorIDs + { + public const string BleuScore = "azureai://built-in/evaluators/bleu_score"; + public const string CodeVulnerability = "azureai://built-in/evaluators/code_vulnerability"; + public const string Coherence = "azureai://built-in/evaluators/coherence"; + public const string ContentSafety = "azureai://built-in/evaluators/content_safety"; + public const string DocumentRetrieval = "azureai://built-in/evaluators/document_retrieval"; + public const string F1Score = "azureai://built-in/evaluators/f1_score"; + public const string Fluency = "azureai://built-in/evaluators/fluency"; + public const string GleuScore = "azureai://built-in/evaluators/gleu_score"; + public const string Groundedness = "azureai://built-in/evaluators/groundedness"; + public const string GroundednessPro = "azureai://built-in/evaluators/groundedness_pro"; + public const string HateUnfairness = "azureai://built-in/evaluators/hate_unfairness"; + public const string IndirectAttack = "azureai://built-in/evaluators/indirect_attack"; + public const string IntentResolution = "azureai://built-in/evaluators/intent_resolution"; + public const string LabelGrader = "azureai://built-in/evaluators/label_grader"; + public const string MeteorScore = "azureai://built-in/evaluators/meteor_score"; + public const string ProtectedMaterial = "azureai://built-in/evaluators/protected_material"; + public const string QA = "azureai://built-in/evaluators/qa"; + public const string Relevance = "azureai://built-in/evaluators/relevance"; + public const string ResponseCompleteness = "azureai://built-in/evaluators/response_completeness"; + public const string Retrieval = "azureai://built-in/evaluators/retrieval"; + public const string RougeScore = "azureai://built-in/evaluators/rouge_score"; + public const string SelfHarm = "azureai://built-in/evaluators/self_harm"; + public const string Sexual = "azureai://built-in/evaluators/sexual"; + public const string SimilarityScore = "azureai://built-in/evaluators/similarity_score"; + public const string StringCheckGrader = "azureai://built-in/evaluators/string_check_grader"; + public const string TaskAdherence = "azureai://built-in/evaluators/task_adherence"; + public const string TextSimilarityGrader = "azureai://built-in/evaluators/text_similarity_grader"; + public const string ToolCallAccuracy = "azureai://built-in/evaluators/tool_call_accuracy"; + public const string UngroundedAttributes = "azureai://built-in/evaluators/ungrounded_attributes"; + public const string Violence = "azureai://built-in/evaluators/violence"; + } + public partial class FieldMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FieldMapping(System.Collections.Generic.IEnumerable contentFields) { } + public System.Collections.Generic.IList ContentFields { get { throw null; } } + public string FilepathField { get { throw null; } set { } } + public System.Collections.Generic.IList MetadataFields { get { throw null; } } + public string TitleField { get { throw null; } set { } } + public string UrlField { get { throw null; } set { } } + public System.Collections.Generic.IList VectorFields { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FieldMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FieldMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileDatasetVersion : Azure.AI.Projects.DatasetVersion, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FileDatasetVersion(string dataUri) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileDatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FolderDatasetVersion : Azure.AI.Projects.DatasetVersion, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FolderDatasetVersion(string dataUri) : base (default(string)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FolderDatasetVersion System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FolderDatasetVersion System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 Index : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected Index() { } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchRankingOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchRankingOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.Index System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Index System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolCallContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Indexes { - internal FileSearchToolCallContent() { } - public string Text { get { throw null; } } - public Azure.AI.Projects.FileSearchToolCallContentType Type { get { throw null; } } + protected Indexes() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response CreateOrUpdate(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(string name, string version, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response Delete(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(string name, string version, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetIndex(string name, string version, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetIndex(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetIndexAsync(string name, string version, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetIndexAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetIndices(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetIndices(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetIndicesAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetIndicesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetVersions(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetVersions(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetVersionsAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public abstract partial class InputData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected InputData() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolCallContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolCallContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.InputData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FileSearchToolCallContentType : System.IEquatable + public partial class InputDataset : Azure.AI.Projects.InputData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public FileSearchToolCallContentType(string value) { throw null; } - public static Azure.AI.Projects.FileSearchToolCallContentType Text { get { throw null; } } - public bool Equals(Azure.AI.Projects.FileSearchToolCallContentType 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.Projects.FileSearchToolCallContentType left, Azure.AI.Projects.FileSearchToolCallContentType right) { throw null; } - public static implicit operator Azure.AI.Projects.FileSearchToolCallContentType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.FileSearchToolCallContentType left, Azure.AI.Projects.FileSearchToolCallContentType right) { throw null; } - public override string ToString() { throw null; } + public InputDataset(string id) { } + public string Id { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InputDataset System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputDataset System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ManagedAzureAISearchIndex : Azure.AI.Projects.Index, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ManagedAzureAISearchIndex(string vectorStoreId) { } + public string VectorStoreId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ManagedAzureAISearchIndex System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ManagedAzureAISearchIndex System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ModelDeployment : Azure.AI.Projects.Deployment, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ModelDeployment() { } + public System.Collections.Generic.IReadOnlyDictionary Capabilities { get { throw null; } } + public string ConnectionName { get { throw null; } } + public string ModelName { get { throw null; } } + public string ModelPublisher { get { throw null; } } + public string ModelVersion { get { throw null; } } + public Azure.AI.Projects.Sku Sku { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ModelDeployment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ModelDeployment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class NoAuthenticationCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolDefinition() { } - public Azure.AI.Projects.FileSearchToolDefinitionDetails FileSearch { get { throw null; } set { } } + internal NoAuthenticationCredentials() { } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.NoAuthenticationCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.NoAuthenticationCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolDefinitionDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PendingUploadRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolDefinitionDetails() { } - public int? MaxNumResults { get { throw null; } set { } } - public Azure.AI.Projects.FileSearchRankingOptions RankingOptions { get { throw null; } set { } } + public PendingUploadRequest() { } + public string ConnectionName { get { throw null; } set { } } + public string PendingUploadId { get { throw null; } set { } } + public Azure.AI.Projects.PendingUploadType PendingUploadType { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolDefinitionDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolDefinitionDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.PendingUploadRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.PendingUploadRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FileSearchToolResource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PendingUploadResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FileSearchToolResource() { } - public FileSearchToolResource(System.Collections.Generic.IList vectorStoreIds, System.Collections.Generic.IList vectorStores) { } - public System.Collections.Generic.IList VectorStoreIds { get { throw null; } } - public System.Collections.Generic.IList VectorStores { get { throw null; } } + internal PendingUploadResponse() { } + public Azure.AI.Projects.BlobReference BlobReference { get { throw null; } } + public string PendingUploadId { get { throw null; } } + public Azure.AI.Projects.PendingUploadType PendingUploadType { get { throw null; } } + public string Version { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FileSearchToolResource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FileSearchToolResource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.PendingUploadResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.PendingUploadResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 FileState : System.IEquatable + public readonly partial struct PendingUploadType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public FileState(string value) { throw null; } - public static Azure.AI.Projects.FileState Deleted { get { throw null; } } - public static Azure.AI.Projects.FileState Deleting { get { throw null; } } - public static Azure.AI.Projects.FileState Error { get { throw null; } } - public static Azure.AI.Projects.FileState Pending { get { throw null; } } - public static Azure.AI.Projects.FileState Processed { get { throw null; } } - public static Azure.AI.Projects.FileState Running { get { throw null; } } - public static Azure.AI.Projects.FileState Uploaded { get { throw null; } } - public bool Equals(Azure.AI.Projects.FileState other) { throw null; } + public PendingUploadType(string value) { throw null; } + public static Azure.AI.Projects.PendingUploadType BlobReference { get { throw null; } } + public static Azure.AI.Projects.PendingUploadType None { get { throw null; } } + public bool Equals(Azure.AI.Projects.PendingUploadType 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.Projects.FileState left, Azure.AI.Projects.FileState right) { throw null; } - public static implicit operator Azure.AI.Projects.FileState (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.FileState left, Azure.AI.Projects.FileState right) { throw null; } + public static bool operator ==(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } + public static implicit operator Azure.AI.Projects.PendingUploadType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } public override string ToString() { throw null; } } + public partial class RedTeam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RedTeam(Azure.AI.Projects.TargetConfig target) { } + public string ApplicationScenario { get { throw null; } set { } } + public System.Collections.Generic.IList AttackStrategies { get { throw null; } } + public string DisplayName { get { throw null; } set { } } + public string Name { get { throw null; } } + public int? NumTurns { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Properties { get { throw null; } } + public System.Collections.Generic.IList RiskCategories { get { throw null; } } + public bool? SimulationOnly { get { throw null; } set { } } + public string Status { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public Azure.AI.Projects.TargetConfig Target { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RedTeam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RedTeam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RedTeams + { + protected RedTeams() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Create(Azure.AI.Projects.RedTeam redTeam, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Create(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.RedTeam redTeam, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetRedTeam(string name, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetRedTeam(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRedTeamAsync(string name, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetRedTeamAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetRedTeams(Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetRedTeams(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetRedTeamsAsync(Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetRedTeamsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct Frequency : System.IEquatable + public readonly partial struct RiskCategory : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public Frequency(string value) { throw null; } - public static Azure.AI.Projects.Frequency Day { get { throw null; } } - public static Azure.AI.Projects.Frequency Hour { get { throw null; } } - public static Azure.AI.Projects.Frequency Minute { get { throw null; } } - public static Azure.AI.Projects.Frequency Month { get { throw null; } } - public static Azure.AI.Projects.Frequency Week { get { throw null; } } - public bool Equals(Azure.AI.Projects.Frequency other) { throw null; } + public RiskCategory(string value) { throw null; } + public static Azure.AI.Projects.RiskCategory HateUnfairness { get { throw null; } } + public static Azure.AI.Projects.RiskCategory SelfHarm { get { throw null; } } + public static Azure.AI.Projects.RiskCategory Sexual { get { throw null; } } + public static Azure.AI.Projects.RiskCategory Violence { get { throw null; } } + public bool Equals(Azure.AI.Projects.RiskCategory 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.Projects.Frequency left, Azure.AI.Projects.Frequency right) { throw null; } - public static implicit operator Azure.AI.Projects.Frequency (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.Frequency left, Azure.AI.Projects.Frequency right) { throw null; } + public static bool operator ==(Azure.AI.Projects.RiskCategory left, Azure.AI.Projects.RiskCategory right) { throw null; } + public static implicit operator Azure.AI.Projects.RiskCategory (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RiskCategory left, Azure.AI.Projects.RiskCategory right) { throw null; } public override string ToString() { throw null; } } - public partial class FunctionName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SasCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FunctionName(string name) { } - public string Name { get { throw null; } set { } } + internal SasCredential() { } + public string SasUri { get { throw null; } } + public Azure.AI.Projects.SasCredentialType Type { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.FunctionName System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FunctionName System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.SasCredential System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SasCredential System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class FunctionToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SASCredentials : Azure.AI.Projects.BaseCredentials, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public FunctionToolDefinition(string name, string description) { } - public FunctionToolDefinition(string name, string description, System.BinaryData parameters) { } - public string Description { get { throw null; } } - public string Name { get { throw null; } } - public System.BinaryData Parameters { get { throw null; } } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - public static bool operator ==(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RequiredFunctionToolCall functionToolCall) { throw null; } - public static bool operator ==(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RunStepFunctionToolCall functionToolCall) { throw null; } - public static bool operator ==(Azure.AI.Projects.RequiredFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator ==(Azure.AI.Projects.RunStepFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator !=(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RequiredFunctionToolCall functionToolCall) { throw null; } - public static bool operator !=(Azure.AI.Projects.FunctionToolDefinition functionToolDefinition, Azure.AI.Projects.RunStepFunctionToolCall functionToolCall) { throw null; } - public static bool operator !=(Azure.AI.Projects.RequiredFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepFunctionToolCall functionToolCall, Azure.AI.Projects.FunctionToolDefinition functionToolDefinition) { throw null; } - Azure.AI.Projects.FunctionToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.FunctionToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class GetWorkspaceResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal GetWorkspaceResponse() { } - public string Id { get { throw null; } } - public string Name { get { throw null; } } - public Azure.AI.Projects.WorkspaceProperties Properties { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.GetWorkspaceResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.GetWorkspaceResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ImageDetailLevel : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ImageDetailLevel(string value) { throw null; } - public static Azure.AI.Projects.ImageDetailLevel Auto { get { throw null; } } - public static Azure.AI.Projects.ImageDetailLevel High { get { throw null; } } - public static Azure.AI.Projects.ImageDetailLevel Low { get { throw null; } } - public bool Equals(Azure.AI.Projects.ImageDetailLevel 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.Projects.ImageDetailLevel left, Azure.AI.Projects.ImageDetailLevel right) { throw null; } - public static implicit operator Azure.AI.Projects.ImageDetailLevel (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ImageDetailLevel left, Azure.AI.Projects.ImageDetailLevel right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct IncompleteDetailsReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public IncompleteDetailsReason(string value) { throw null; } - public static Azure.AI.Projects.IncompleteDetailsReason MaxCompletionTokens { get { throw null; } } - public static Azure.AI.Projects.IncompleteDetailsReason MaxPromptTokens { get { throw null; } } - public bool Equals(Azure.AI.Projects.IncompleteDetailsReason 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.Projects.IncompleteDetailsReason left, Azure.AI.Projects.IncompleteDetailsReason right) { throw null; } - public static implicit operator Azure.AI.Projects.IncompleteDetailsReason (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.IncompleteDetailsReason left, Azure.AI.Projects.IncompleteDetailsReason right) { throw null; } - public override string ToString() { throw null; } - } - public partial class IncompleteRunDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal IncompleteRunDetails() { } - public Azure.AI.Projects.IncompleteDetailsReason Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.IncompleteRunDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.IncompleteRunDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 InputData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected InputData() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InputData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InputData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class InternalConnectionPropertiesCustomAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal InternalConnectionPropertiesCustomAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InternalConnectionPropertiesCustomAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InternalConnectionPropertiesCustomAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class InternalConnectionPropertiesNoAuth : Azure.AI.Projects.ConnectionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal InternalConnectionPropertiesNoAuth() : base (default(Azure.AI.Projects.ConnectionType), default(string)) { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.InternalConnectionPropertiesNoAuth System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.InternalConnectionPropertiesNoAuth System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ListConnectionsResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ListConnectionsResponse() { } - public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ListConnectionsResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ListConnectionsResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ListSortOrder : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ListSortOrder(string value) { throw null; } - public static Azure.AI.Projects.ListSortOrder Ascending { get { throw null; } } - public static Azure.AI.Projects.ListSortOrder Descending { get { throw null; } } - public bool Equals(Azure.AI.Projects.ListSortOrder 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.Projects.ListSortOrder left, Azure.AI.Projects.ListSortOrder right) { throw null; } - public static implicit operator Azure.AI.Projects.ListSortOrder (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ListSortOrder left, Azure.AI.Projects.ListSortOrder right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MAASModelConfig : Azure.AI.Projects.TargetModelConfig, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MAASModelConfig(string azureEndpoint, string apiKey) { } - public string ApiKey { get { throw null; } set { } } - public string AzureEndpoint { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MAASModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MAASModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageAttachment : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageAttachment(Azure.AI.Projects.VectorStoreDataSource ds, System.Collections.Generic.List tools) { } - public MessageAttachment(System.Collections.Generic.IEnumerable tools) { } - public MessageAttachment(string fileId, System.Collections.Generic.List tools) { } - public Azure.AI.Projects.VectorStoreDataSource DataSource { get { throw null; } set { } } - public string FileId { get { throw null; } set { } } - public System.Collections.Generic.IList Tools { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageAttachment System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageAttachment System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 MessageContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageContent() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageContentUpdate : Azure.AI.Projects.StreamingUpdate - { - internal MessageContentUpdate() { } - public string ImageFileId { get { throw null; } } - public string MessageId { get { throw null; } } - public int MessageIndex { get { throw null; } } - public Azure.AI.Projects.MessageRole? Role { get { throw null; } } - public string Text { get { throw null; } } - public Azure.AI.Projects.TextAnnotationUpdate TextAnnotation { get { throw null; } } - } - public partial class MessageDelta : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDelta() { } - public System.Collections.Generic.IReadOnlyList Content { get { throw null; } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDelta System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDelta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaChunk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaChunk() { } - public Azure.AI.Projects.MessageDelta Delta { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.MessageDeltaChunkObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaChunk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaChunk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageDeltaChunkObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageDeltaChunkObject(string value) { throw null; } - public static Azure.AI.Projects.MessageDeltaChunkObject ThreadMessageDelta { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageDeltaChunkObject 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.Projects.MessageDeltaChunkObject left, Azure.AI.Projects.MessageDeltaChunkObject right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageDeltaChunkObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageDeltaChunkObject left, Azure.AI.Projects.MessageDeltaChunkObject right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageDeltaContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageDeltaContent(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaImageFileContent : Azure.AI.Projects.MessageDeltaContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaImageFileContent() : base (default(int)) { } - public Azure.AI.Projects.MessageDeltaImageFileContentObject ImageFile { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaImageFileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaImageFileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaImageFileContentObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaImageFileContentObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaImageFileContentObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaImageFileContentObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 MessageDeltaTextAnnotation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected internal System.Collections.Generic.IDictionary SerializedAdditionalRawData; - protected MessageDeltaTextAnnotation(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextContent : Azure.AI.Projects.MessageDeltaContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextContent() : base (default(int)) { } - public Azure.AI.Projects.MessageDeltaTextContentObject Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextContentObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextContentObject() { } - public System.Collections.Generic.IReadOnlyList Annotations { get { throw null; } } - public string Value { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextContentObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextContentObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFileCitationAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFileCitationAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject FileCitation { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFileCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFileCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFileCitationAnnotationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFileCitationAnnotationObject() { } - public string FileId { get { throw null; } } - public string Quote { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFileCitationAnnotationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFileCitationAnnotationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFilePathAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFilePathAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject FilePath { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFilePathAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFilePathAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextFilePathAnnotationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextFilePathAnnotationObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextFilePathAnnotationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextFilePathAnnotationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextUrlCitationAnnotation : Azure.AI.Projects.MessageDeltaTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextUrlCitationAnnotation() : base (default(int)) { } - public int? EndIndex { get { throw null; } } - public int? StartIndex { get { throw null; } } - public Azure.AI.Projects.MessageDeltaTextUrlCitationDetails UrlCitation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextUrlCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextUrlCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageDeltaTextUrlCitationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageDeltaTextUrlCitationDetails() { } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageDeltaTextUrlCitationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageDeltaTextUrlCitationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageFileContent : Azure.AI.Projects.MessageContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageImageFileContent() { } - public string FileId { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageFileContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageFileContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageFileParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageImageFileParam(string fileId) { } - public Azure.AI.Projects.ImageDetailLevel? Detail { get { throw null; } set { } } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageFileParam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageFileParam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageImageUrlParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageImageUrlParam(string url) { } - public Azure.AI.Projects.ImageDetailLevel? Detail { get { throw null; } set { } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageImageUrlParam System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageImageUrlParam System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageIncompleteDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageIncompleteDetails() { } - public Azure.AI.Projects.MessageIncompleteDetailsReason Reason { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageIncompleteDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageIncompleteDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageIncompleteDetailsReason : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageIncompleteDetailsReason(string value) { throw null; } - public static Azure.AI.Projects.MessageIncompleteDetailsReason ContentFilter { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason MaxTokens { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunCancelled { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunExpired { get { throw null; } } - public static Azure.AI.Projects.MessageIncompleteDetailsReason RunFailed { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageIncompleteDetailsReason 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.Projects.MessageIncompleteDetailsReason left, Azure.AI.Projects.MessageIncompleteDetailsReason right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageIncompleteDetailsReason (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageIncompleteDetailsReason left, Azure.AI.Projects.MessageIncompleteDetailsReason right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageInputContentBlock : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageInputContentBlock() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputContentBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputContentBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputImageFileBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputImageFileBlock(Azure.AI.Projects.MessageImageFileParam imageFile) { } - public Azure.AI.Projects.MessageImageFileParam ImageFile { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputImageFileBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputImageFileBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputImageUrlBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputImageUrlBlock(Azure.AI.Projects.MessageImageUrlParam imageUrl) { } - public Azure.AI.Projects.MessageImageUrlParam ImageUrl { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputImageUrlBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputImageUrlBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageInputTextBlock : Azure.AI.Projects.MessageInputContentBlock, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MessageInputTextBlock(string text) { } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageInputTextBlock System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageInputTextBlock System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 MessageRole : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageRole(string value) { throw null; } - public static Azure.AI.Projects.MessageRole Agent { get { throw null; } } - public static Azure.AI.Projects.MessageRole User { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageRole 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.Projects.MessageRole left, Azure.AI.Projects.MessageRole right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageRole (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageRole left, Azure.AI.Projects.MessageRole right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MessageStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageStatus(string value) { throw null; } - public static Azure.AI.Projects.MessageStatus Completed { get { throw null; } } - public static Azure.AI.Projects.MessageStatus Incomplete { get { throw null; } } - public static Azure.AI.Projects.MessageStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageStatus 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.Projects.MessageStatus left, Azure.AI.Projects.MessageStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageStatus left, Azure.AI.Projects.MessageStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MessageStatusUpdate : Azure.AI.Projects.StreamingUpdate - { - internal MessageStatusUpdate() { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MessageStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MessageStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageCompleted { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageCreated { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageDelta { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageIncomplete { get { throw null; } } - public static Azure.AI.Projects.MessageStreamEvent ThreadMessageInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.MessageStreamEvent 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.Projects.MessageStreamEvent left, Azure.AI.Projects.MessageStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.MessageStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.MessageStreamEvent left, Azure.AI.Projects.MessageStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class MessageTextAnnotation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected MessageTextAnnotation(string text) { } - public string Text { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextContent : Azure.AI.Projects.MessageContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextContent() { } - public System.Collections.Generic.IReadOnlyList Annotations { get { throw null; } } - public string Text { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextFileCitationAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextFileCitationAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public string FileId { get { throw null; } } - public string Quote { get { throw null; } } - public int? StartIndex { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextFileCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextFileCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextFilePathAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextFilePathAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public string FileId { get { throw null; } } - public int? StartIndex { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextFilePathAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextFilePathAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextUrlCitationAnnotation : Azure.AI.Projects.MessageTextAnnotation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextUrlCitationAnnotation() : base (default(string)) { } - public int? EndIndex { get { throw null; } } - public int? StartIndex { get { throw null; } } - public Azure.AI.Projects.MessageTextUrlCitationDetails UrlCitation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextUrlCitationAnnotation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextUrlCitationAnnotation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MessageTextUrlCitationDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal MessageTextUrlCitationDetails() { } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MessageTextUrlCitationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MessageTextUrlCitationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class MicrosoftFabricToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MicrosoftFabricToolDefinition(Azure.AI.Projects.ToolConnectionList fabricDataagent) { } - public Azure.AI.Projects.ToolConnectionList FabricDataagent { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.MicrosoftFabricToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiAnonymousAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiAnonymousAuthDetails() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiAnonymousAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiAnonymousAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 OpenApiAuthDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected OpenApiAuthDetails() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiConnectionAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiConnectionAuthDetails(Azure.AI.Projects.OpenApiConnectionSecurityScheme securityScheme) { } - public Azure.AI.Projects.OpenApiConnectionSecurityScheme SecurityScheme { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiConnectionAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiConnectionAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiConnectionSecurityScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiConnectionSecurityScheme(string connectionId) { } - public string ConnectionId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiConnectionSecurityScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiConnectionSecurityScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiFunctionDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiFunctionDefinition(string name, System.BinaryData spec, Azure.AI.Projects.OpenApiAuthDetails auth) { } - public Azure.AI.Projects.OpenApiAuthDetails Auth { get { throw null; } set { } } - public System.Collections.Generic.IList DefaultParams { get { throw null; } } - public string Description { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.BinaryData Spec { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiFunctionDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiFunctionDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiManagedAuthDetails : Azure.AI.Projects.OpenApiAuthDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiManagedAuthDetails(Azure.AI.Projects.OpenApiManagedSecurityScheme securityScheme) { } - public Azure.AI.Projects.OpenApiManagedSecurityScheme SecurityScheme { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiManagedAuthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiManagedAuthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiManagedSecurityScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiManagedSecurityScheme(string audience) { } - public string Audience { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiManagedSecurityScheme System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiManagedSecurityScheme System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class OpenApiToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public OpenApiToolDefinition(Azure.AI.Projects.OpenApiFunctionDefinition openapi) { } - public OpenApiToolDefinition(string name, string description, System.BinaryData spec, Azure.AI.Projects.OpenApiAuthDetails auth, System.Collections.Generic.IList defaultParams = null) { } - public Azure.AI.Projects.OpenApiFunctionDefinition Openapi { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.OpenApiToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.OpenApiToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class PageableList : System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - internal PageableList() { } - public System.Collections.Generic.IReadOnlyList Data { get { throw null; } } - public string FirstId { get { throw null; } } - public bool HasMore { get { throw null; } } - public T this[int index] { get { throw null; } } - public string LastId { get { throw null; } } - public System.Collections.Generic.IEnumerator GetEnumerator() { throw null; } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } - } - public partial class RecurrenceSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RecurrenceSchedule(System.Collections.Generic.IEnumerable hours, System.Collections.Generic.IEnumerable minutes) { } - public System.Collections.Generic.IList Hours { get { throw null; } } - public System.Collections.Generic.IList Minutes { get { throw null; } } - public System.Collections.Generic.IList MonthDays { get { throw null; } } - public System.Collections.Generic.IList WeekDays { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RecurrenceSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RecurrenceSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RecurrenceTrigger : Azure.AI.Projects.Trigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public RecurrenceTrigger(Azure.AI.Projects.Frequency frequency, int interval) { } - public Azure.AI.Projects.Frequency Frequency { get { throw null; } set { } } - public int Interval { get { throw null; } set { } } - public Azure.AI.Projects.RecurrenceSchedule Schedule { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RecurrenceTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RecurrenceTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RequiredAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RequiredAction() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RequiredActionUpdate : Azure.AI.Projects.RunUpdate - { - internal RequiredActionUpdate() { } - public string FunctionArguments { get { throw null; } } - public string FunctionName { get { throw null; } } - public string ToolCallId { get { throw null; } } - public Azure.AI.Projects.ThreadRun GetThreadRun() { throw null; } - } - public partial class RequiredFunctionToolCall : Azure.AI.Projects.RequiredToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RequiredFunctionToolCall() : base (default(string)) { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RequiredToolCall : Azure.AI.Projects.RequiredAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RequiredToolCall(string id) { } - public string Id { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RequiredToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RequiredToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ResponseFormat : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseFormat(string value) { throw null; } - public static Azure.AI.Projects.ResponseFormat JsonObject { get { throw null; } } - public static Azure.AI.Projects.ResponseFormat Text { get { throw null; } } - public bool Equals(Azure.AI.Projects.ResponseFormat 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.Projects.ResponseFormat left, Azure.AI.Projects.ResponseFormat right) { throw null; } - public static implicit operator Azure.AI.Projects.ResponseFormat (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ResponseFormat left, Azure.AI.Projects.ResponseFormat right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ResponseFormatJsonSchema : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResponseFormatJsonSchema(string name, System.BinaryData schema) { } - public string Description { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public System.BinaryData Schema { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ResponseFormatJsonSchema System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ResponseFormatJsonSchema System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ResponseFormatJsonSchemaType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ResponseFormatJsonSchemaType(Azure.AI.Projects.ResponseFormatJsonSchema jsonSchema) { } - public Azure.AI.Projects.ResponseFormatJsonSchema JsonSchema { get { throw null; } set { } } - public Azure.AI.Projects.ResponseFormatJsonSchemaTypeType Type { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ResponseFormatJsonSchemaType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ResponseFormatJsonSchemaType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ResponseFormatJsonSchemaTypeType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ResponseFormatJsonSchemaTypeType(string value) { throw null; } - public static Azure.AI.Projects.ResponseFormatJsonSchemaTypeType JsonSchema { get { throw null; } } - public bool Equals(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType 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.Projects.ResponseFormatJsonSchemaTypeType left, Azure.AI.Projects.ResponseFormatJsonSchemaTypeType right) { throw null; } - public static implicit operator Azure.AI.Projects.ResponseFormatJsonSchemaTypeType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ResponseFormatJsonSchemaTypeType left, Azure.AI.Projects.ResponseFormatJsonSchemaTypeType right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunAdditionalFieldList : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunAdditionalFieldList(string value) { throw null; } - public static Azure.AI.Projects.RunAdditionalFieldList FileSearchContents { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunAdditionalFieldList 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.Projects.RunAdditionalFieldList left, Azure.AI.Projects.RunAdditionalFieldList right) { throw null; } - public static implicit operator Azure.AI.Projects.RunAdditionalFieldList (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunAdditionalFieldList left, Azure.AI.Projects.RunAdditionalFieldList right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunCompletionUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunCompletionUsage() { } - public long CompletionTokens { get { throw null; } } - public long PromptTokens { get { throw null; } } - public long TotalTokens { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunCompletionUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunCompletionUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunError() { } - public string Code { get { throw null; } } - public string Message { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStatus(string value) { throw null; } - public static Azure.AI.Projects.RunStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.RunStatus Cancelling { get { throw null; } } - public static Azure.AI.Projects.RunStatus Completed { get { throw null; } } - public static Azure.AI.Projects.RunStatus Expired { get { throw null; } } - public static Azure.AI.Projects.RunStatus Failed { get { throw null; } } - public static Azure.AI.Projects.RunStatus InProgress { get { throw null; } } - public static Azure.AI.Projects.RunStatus Queued { get { throw null; } } - public static Azure.AI.Projects.RunStatus RequiresAction { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStatus 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.Projects.RunStatus left, Azure.AI.Projects.RunStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStatus left, Azure.AI.Projects.RunStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStep : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStep() { } - public string AssistantId { get { throw null; } } - public System.DateTimeOffset? CancelledAt { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public System.DateTimeOffset? ExpiredAt { get { throw null; } } - public System.DateTimeOffset? FailedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.RunStepError LastError { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string RunId { get { throw null; } } - public Azure.AI.Projects.RunStepStatus Status { get { throw null; } } - public Azure.AI.Projects.RunStepDetails StepDetails { get { throw null; } } - public string ThreadId { get { throw null; } } - public Azure.AI.Projects.RunStepType Type { get { throw null; } } - public Azure.AI.Projects.RunStepCompletionUsage Usage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStep System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStep System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepAzureAISearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepAzureAISearchToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary AzureAISearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepAzureAISearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepAzureAISearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepBingGroundingToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepBingGroundingToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary BingGrounding { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepBingGroundingToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepBingGroundingToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterImageOutput : Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterImageOutput() { } - public Azure.AI.Projects.RunStepCodeInterpreterImageReference Image { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterImageOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterImageOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterImageReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterImageReference() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterImageReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterImageReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterLogOutput : Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterLogOutput() { } - public string Logs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterLogOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterLogOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCodeInterpreterToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCodeInterpreterToolCall() : base (default(string)) { } - public string Input { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepCodeInterpreterToolCallOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepCodeInterpreterToolCallOutput() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCodeInterpreterToolCallOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCodeInterpreterToolCallOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCompletionUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCompletionUsage() { } - public long CompletionTokens { get { throw null; } } - public long PromptTokens { get { throw null; } } - public long TotalTokens { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCompletionUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCompletionUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepCustomSearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepCustomSearchToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary BingCustomSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepCustomSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepCustomSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDelta : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDelta() { } - public Azure.AI.Projects.RunStepDeltaDetail StepDetails { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDelta System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDelta System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaChunk : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaChunk() { } - public Azure.AI.Projects.RunStepDelta Delta { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.RunStepDeltaChunkObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaChunk System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaChunk System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepDeltaChunkObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepDeltaChunkObject(string value) { throw null; } - public static Azure.AI.Projects.RunStepDeltaChunkObject ThreadRunStepDelta { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepDeltaChunkObject 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.Projects.RunStepDeltaChunkObject left, Azure.AI.Projects.RunStepDeltaChunkObject right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepDeltaChunkObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepDeltaChunkObject left, Azure.AI.Projects.RunStepDeltaChunkObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepDeltaCodeInterpreterDetailItemObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterDetailItemObject() { } - public string Input { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Outputs { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterDetailItemObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterImageOutput : Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterImageOutput() : base (default(int)) { } - public Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject Image { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterImageOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterImageOutputObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterImageOutputObject() { } - public string FileId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterImageOutputObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterImageOutputObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterLogOutput : Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterLogOutput() : base (default(int)) { } - public string Logs { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterLogOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterLogOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaCodeInterpreterOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDeltaCodeInterpreterOutput(int index) { } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaCodeInterpreterToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaCodeInterpreterToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepDeltaCodeInterpreterDetailItemObject CodeInterpreter { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaCodeInterpreterToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaCodeInterpreterToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDeltaDetail() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFileSearchToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFileSearchToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepFileSearchToolCallResults FileSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFileSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFileSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFunction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFunction() { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - public string Output { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFunction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFunction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaFunctionToolCall : Azure.AI.Projects.RunStepDeltaToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaFunctionToolCall() : base (default(int), default(string)) { } - public Azure.AI.Projects.RunStepDeltaFunction Function { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaMessageCreation : Azure.AI.Projects.RunStepDeltaDetail, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaMessageCreation() { } - public Azure.AI.Projects.RunStepDeltaMessageCreationObject MessageCreation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaMessageCreation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaMessageCreation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaMessageCreationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaMessageCreationObject() { } - public string MessageId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaMessageCreationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaMessageCreationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDeltaToolCall : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected internal System.Collections.Generic.IDictionary SerializedAdditionalRawData; - protected RunStepDeltaToolCall(int index, string id) { } - public string Id { get { throw null; } } - public int Index { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDeltaToolCallObject : Azure.AI.Projects.RunStepDeltaDetail, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepDeltaToolCallObject() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDeltaToolCallObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDeltaToolCallObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 RunStepDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepDetails() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepDetailsUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunStepDetailsUpdate() { } - public string CodeInterpreterInput { get { throw null; } } - public System.Collections.Generic.IReadOnlyList CodeInterpreterOutputs { get { throw null; } } - public string CreatedMessageId { get { throw null; } } - public string FunctionArguments { get { throw null; } } - public string FunctionName { get { throw null; } } - public string FunctionOutput { get { throw null; } } - public string StepId { get { throw null; } } - public string ToolCallId { get { throw null; } } - public int? ToolCallIndex { get { throw null; } } - } - public partial class RunStepError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepError() { } - public Azure.AI.Projects.RunStepErrorCode Code { get { throw null; } } - public string Message { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepErrorCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepErrorCode(string value) { throw null; } - public static Azure.AI.Projects.RunStepErrorCode RateLimitExceeded { get { throw null; } } - public static Azure.AI.Projects.RunStepErrorCode ServerError { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepErrorCode 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.Projects.RunStepErrorCode left, Azure.AI.Projects.RunStepErrorCode right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepErrorCode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepErrorCode left, Azure.AI.Projects.RunStepErrorCode right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepFileSearchToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCall() : base (default(string)) { } - public Azure.AI.Projects.RunStepFileSearchToolCallResults FileSearch { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFileSearchToolCallResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCallResult() { } - public System.Collections.Generic.IReadOnlyList Content { get { throw null; } } - public string FileId { get { throw null; } } - public string FileName { get { throw null; } } - public float Score { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCallResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCallResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFileSearchToolCallResults : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFileSearchToolCallResults() { } - public Azure.AI.Projects.FileSearchRankingOptions RankingOptions { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFileSearchToolCallResults System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFileSearchToolCallResults System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepFunctionToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepFunctionToolCall() : base (default(string)) { } - public string Arguments { get { throw null; } } - public string Name { get { throw null; } } - public string Output { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepFunctionToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepFunctionToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMessageCreationDetails : Azure.AI.Projects.RunStepDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMessageCreationDetails() { } - public Azure.AI.Projects.RunStepMessageCreationReference MessageCreation { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMessageCreationDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMessageCreationDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMessageCreationReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMessageCreationReference() { } - public string MessageId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMessageCreationReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMessageCreationReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepMicrosoftFabricToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepMicrosoftFabricToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary MicrosoftFabric { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepMicrosoftFabricToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepOpenAPIToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepOpenAPIToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary OpenAPI { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepOpenAPIToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepOpenAPIToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepSharepointToolCall : Azure.AI.Projects.RunStepToolCall, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepSharepointToolCall() : base (default(string)) { } - public System.Collections.Generic.IReadOnlyDictionary SharePoint { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepSharepointToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepSharepointToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepStatus(string value) { throw null; } - public static Azure.AI.Projects.RunStepStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Completed { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Expired { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus Failed { get { throw null; } } - public static Azure.AI.Projects.RunStepStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepStatus 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.Projects.RunStepStatus left, Azure.AI.Projects.RunStepStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepStatus left, Azure.AI.Projects.RunStepStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunStepStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCancelled { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCompleted { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepCreated { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepDelta { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepExpired { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepFailed { get { throw null; } } - public static Azure.AI.Projects.RunStepStreamEvent ThreadRunStepInProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepStreamEvent 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.Projects.RunStepStreamEvent left, Azure.AI.Projects.RunStepStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepStreamEvent left, Azure.AI.Projects.RunStepStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public abstract partial class RunStepToolCall : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected RunStepToolCall(string id) { } - public string Id { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class RunStepToolCallDetails : Azure.AI.Projects.RunStepDetails, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal RunStepToolCallDetails() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.RunStepToolCallDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.RunStepToolCallDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 RunStepType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStepType(string value) { throw null; } - public static Azure.AI.Projects.RunStepType MessageCreation { get { throw null; } } - public static Azure.AI.Projects.RunStepType ToolCalls { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStepType 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.Projects.RunStepType left, Azure.AI.Projects.RunStepType right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStepType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStepType left, Azure.AI.Projects.RunStepType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunStepUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunStepUpdate() { } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RunStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RunStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCancelled { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCancelling { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCompleted { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunCreated { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunExpired { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunFailed { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunIncomplete { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunInProgress { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunQueued { get { throw null; } } - public static Azure.AI.Projects.RunStreamEvent ThreadRunRequiresAction { get { throw null; } } - public bool Equals(Azure.AI.Projects.RunStreamEvent 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.Projects.RunStreamEvent left, Azure.AI.Projects.RunStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.RunStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.RunStreamEvent left, Azure.AI.Projects.RunStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public partial class RunUpdate : Azure.AI.Projects.StreamingUpdate - { - internal RunUpdate() { } - } - public partial class SearchConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SearchConfiguration(string connectionId, string instanceName) { } - public string ConnectionId { get { throw null; } set { } } - public string InstanceName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SearchConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SearchConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SearchConfigurationList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SearchConfigurationList(System.Collections.Generic.IEnumerable searchConfigurations) { } - public System.Collections.Generic.IList SearchConfigurations { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SearchConfigurationList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SearchConfigurationList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SharepointToolDefinition : Azure.AI.Projects.ToolDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public SharepointToolDefinition(Azure.AI.Projects.ToolConnectionList sharepointGrounding) { } - public Azure.AI.Projects.ToolConnectionList SharepointGrounding { get { throw null; } set { } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SharepointToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SharepointToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 StreamingUpdate - { - internal StreamingUpdate() { } - public Azure.AI.Projects.StreamingUpdateReason UpdateKind { get { throw null; } } - } - public enum StreamingUpdateReason - { - Unknown = 0, - ThreadCreated = 1, - RunCreated = 2, - RunQueued = 3, - RunInProgress = 4, - RunRequiresAction = 5, - RunCompleted = 6, - RunIncomplete = 7, - RunFailed = 8, - RunCancelling = 9, - RunCancelled = 10, - RunExpired = 11, - RunStepCreated = 12, - RunStepInProgress = 13, - RunStepUpdated = 14, - RunStepCompleted = 15, - RunStepFailed = 16, - RunStepCancelled = 17, - RunStepExpired = 18, - MessageCreated = 19, - MessageInProgress = 20, - MessageUpdated = 21, - MessageCompleted = 22, - MessageFailed = 23, - Error = 24, - Done = 25, - } - public partial class StreamingUpdate : Azure.AI.Projects.StreamingUpdate where T : class - { - internal StreamingUpdate() { } - public T Value { get { throw null; } } - public static implicit operator T (Azure.AI.Projects.StreamingUpdate update) { throw null; } - } - public partial class SubmitToolOutputsAction : Azure.AI.Projects.RequiredAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SubmitToolOutputsAction() { } - public System.Collections.Generic.IReadOnlyList ToolCalls { get { throw null; } } + internal SASCredentials() { } + public string SasToken { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SubmitToolOutputsAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SubmitToolOutputsAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class SystemData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal SystemData() { } - public System.DateTimeOffset? CreatedAt { get { throw null; } } - public string CreatedBy { get { throw null; } } - public string CreatedByType { get { throw null; } } - public System.DateTimeOffset? LastModifiedAt { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.SystemData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SystemData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 TargetModelConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected TargetModelConfig() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.TargetModelConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TargetModelConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class TelemetryClient - { - protected TelemetryClient() { } - public TelemetryClient(string connectionString, Azure.Core.TokenCredential credential) { } - public TelemetryClient(string connectionString, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public TelemetryClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential) { } - public TelemetryClient(System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, Azure.Core.TokenCredential credential, Azure.AI.Projects.AIProjectClientOptions options) { } - public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } - } - public partial class TextAnnotationUpdate - { - internal TextAnnotationUpdate() { } - public int ContentIndex { get { throw null; } } - public int? EndIndex { get { throw null; } } - public string InputFileId { get { throw null; } } - public string OutputFileId { get { throw null; } } - public int? StartIndex { get { throw null; } } - public string TextToReplace { get { throw null; } } - public string Title { get { throw null; } } - public string Url { get { throw null; } } - } - public partial class ThreadMessage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ThreadMessage() { } - public string AssistantId { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Attachments { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ContentItems { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.DateTimeOffset? IncompleteAt { get { throw null; } } - public Azure.AI.Projects.MessageIncompleteDetails IncompleteDetails { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - public string RunId { get { throw null; } } - public Azure.AI.Projects.MessageStatus Status { get { throw null; } } - public string ThreadId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadMessage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadMessage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ThreadMessageOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, System.BinaryData content) { } - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, System.Collections.Generic.IEnumerable contentBlocks) { } - public ThreadMessageOptions(Azure.AI.Projects.MessageRole role, string content) { } - public System.Collections.Generic.IList Attachments { get { throw null; } set { } } - public System.BinaryData Content { get { throw null; } } - public System.Collections.Generic.IDictionary Metadata { get { throw null; } set { } } - public Azure.AI.Projects.MessageRole Role { get { throw null; } } - public System.Collections.Generic.IEnumerable GetContentBlocks() { throw null; } - public string GetTextContent() { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadMessageOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadMessageOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ThreadRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal ThreadRun() { } - public string AssistantId { get { throw null; } } - public System.DateTimeOffset? CancelledAt { get { throw null; } } - public System.DateTimeOffset? CompletedAt { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public System.DateTimeOffset? ExpiresAt { get { throw null; } } - public System.DateTimeOffset? FailedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.IncompleteRunDetails IncompleteDetails { get { throw null; } } - public string Instructions { get { throw null; } } - public Azure.AI.Projects.RunError LastError { get { throw null; } } - public int? MaxCompletionTokens { get { throw null; } } - public int? MaxPromptTokens { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public string Model { get { throw null; } } - public bool ParallelToolCalls { get { throw null; } } - public Azure.AI.Projects.RequiredAction RequiredAction { get { throw null; } } - public System.Collections.Generic.IReadOnlyList RequiredActions { get { throw null; } } - public System.BinaryData ResponseFormat { get { throw null; } } - public System.DateTimeOffset? StartedAt { get { throw null; } } - public Azure.AI.Projects.RunStatus Status { get { throw null; } } - public float? Temperature { get { throw null; } } - public string ThreadId { get { throw null; } } - public System.BinaryData ToolChoice { get { throw null; } } - public Azure.AI.Projects.UpdateToolResourcesOptions ToolResources { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Tools { get { throw null; } } - public float? TopP { get { throw null; } } - public Azure.AI.Projects.TruncationObject TruncationStrategy { get { throw null; } } - public Azure.AI.Projects.RunCompletionUsage Usage { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ThreadRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ThreadRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 ThreadStreamEvent : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ThreadStreamEvent(string value) { throw null; } - public static Azure.AI.Projects.ThreadStreamEvent ThreadCreated { get { throw null; } } - public bool Equals(Azure.AI.Projects.ThreadStreamEvent 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.Projects.ThreadStreamEvent left, Azure.AI.Projects.ThreadStreamEvent right) { throw null; } - public static implicit operator Azure.AI.Projects.ThreadStreamEvent (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.ThreadStreamEvent left, Azure.AI.Projects.ThreadStreamEvent right) { throw null; } - public override string ToString() { throw null; } - } - public partial class ThreadUpdate : Azure.AI.Projects.StreamingUpdate - { - internal ThreadUpdate() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } - public Azure.AI.Projects.ToolResources ToolResources { get { throw null; } } - } - public partial class ToolConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolConnection(string connectionId) { } - public string ConnectionId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolConnectionList : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolConnectionList() { } - public System.Collections.Generic.IList ConnectionList { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolConnectionList System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolConnectionList System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 ToolDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected ToolDefinition() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolOutput() { } - public ToolOutput(Azure.AI.Projects.RequiredToolCall toolCall) { } - public ToolOutput(Azure.AI.Projects.RequiredToolCall toolCall, string output) { } - public ToolOutput(string toolCallId) { } - public ToolOutput(string toolCallId, string output) { } - public string Output { get { throw null; } set { } } - public string ToolCallId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class ToolResources : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public ToolResources() { } - public Azure.AI.Projects.AzureAISearchResource AzureAISearch { get { throw null; } set { } } - public Azure.AI.Projects.CodeInterpreterToolResource CodeInterpreter { get { throw null; } set { } } - public Azure.AI.Projects.FileSearchToolResource FileSearch { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.ToolResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.ToolResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 Trigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected Trigger() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.Trigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Trigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class TruncationObject : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public TruncationObject(Azure.AI.Projects.TruncationStrategy type) { } - public int? LastMessages { get { throw null; } set { } } - public Azure.AI.Projects.TruncationStrategy Type { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.TruncationObject System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TruncationObject System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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.Projects.SASCredentials System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.SASCredentials System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 TruncationStrategy : System.IEquatable + public readonly partial struct SasCredentialType : System.IEquatable { private readonly object _dummy; private readonly int _dummyPrimitive; - public TruncationStrategy(string value) { throw null; } - public static Azure.AI.Projects.TruncationStrategy Auto { get { throw null; } } - public static Azure.AI.Projects.TruncationStrategy LastMessages { get { throw null; } } - public bool Equals(Azure.AI.Projects.TruncationStrategy other) { throw null; } + public SasCredentialType(string value) { throw null; } + public static Azure.AI.Projects.SasCredentialType SAS { get { throw null; } } + public bool Equals(Azure.AI.Projects.SasCredentialType 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.Projects.TruncationStrategy left, Azure.AI.Projects.TruncationStrategy right) { throw null; } - public static implicit operator Azure.AI.Projects.TruncationStrategy (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.TruncationStrategy left, Azure.AI.Projects.TruncationStrategy right) { throw null; } + public static bool operator ==(Azure.AI.Projects.SasCredentialType left, Azure.AI.Projects.SasCredentialType right) { throw null; } + public static implicit operator Azure.AI.Projects.SasCredentialType (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.SasCredentialType left, Azure.AI.Projects.SasCredentialType right) { throw null; } public override string ToString() { throw null; } } - public partial class UpdateCodeInterpreterToolResourceOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UpdateCodeInterpreterToolResourceOptions() { } - public System.Collections.Generic.IList FileIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateCodeInterpreterToolResourceOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateCodeInterpreterToolResourceOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class UpdateFileSearchToolResourceOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public UpdateFileSearchToolResourceOptions() { } - public System.Collections.Generic.IList VectorStoreIds { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateFileSearchToolResourceOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateFileSearchToolResourceOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class UpdateToolResourcesOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ServicePatterns { - public UpdateToolResourcesOptions() { } - public Azure.AI.Projects.AzureAISearchResource AzureAISearch { get { throw null; } set { } } - public Azure.AI.Projects.UpdateCodeInterpreterToolResourceOptions CodeInterpreter { get { throw null; } set { } } - public Azure.AI.Projects.UpdateFileSearchToolResourceOptions FileSearch { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.UpdateToolResourcesOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.UpdateToolResourcesOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected ServicePatterns() { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } } - public partial class VectorStore : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Sku : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal VectorStore() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreExpirationPolicy ExpiresAfter { get { throw null; } } - public System.DateTimeOffset? ExpiresAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileCount FileCounts { get { throw null; } } - public string Id { get { throw null; } } - public System.DateTimeOffset? LastActiveAt { get { throw null; } } - public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + internal Sku() { } + public long Capacity { get { throw null; } } + public string Family { get { throw null; } } public string Name { get { throw null; } } - public Azure.AI.Projects.VectorStoreObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreStatus Status { get { throw null; } } - public int UsageBytes { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStore System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStore System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreAutoChunkingStrategyRequest : Azure.AI.Projects.VectorStoreChunkingStrategyRequest, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreAutoChunkingStrategyRequest() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreAutoChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreAutoChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreAutoChunkingStrategyResponse : Azure.AI.Projects.VectorStoreChunkingStrategyResponse, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreAutoChunkingStrategyResponse() { } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreAutoChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreAutoChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 VectorStoreChunkingStrategyRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected VectorStoreChunkingStrategyRequest() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.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 VectorStoreChunkingStrategyResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - protected VectorStoreChunkingStrategyResponse() { } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreConfiguration(System.Collections.Generic.IEnumerable dataSources) { } - public System.Collections.Generic.IList DataSources { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreConfigurations : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreConfigurations(string storeName, Azure.AI.Projects.VectorStoreConfiguration storeConfiguration) { } - public Azure.AI.Projects.VectorStoreConfiguration StoreConfiguration { get { throw null; } set { } } - public string StoreName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreConfigurations System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreConfigurations System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreDataSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreDataSource(string assetIdentifier, Azure.AI.Projects.VectorStoreDataSourceAssetType assetType) { } - public string AssetIdentifier { get { throw null; } set { } } - public Azure.AI.Projects.VectorStoreDataSourceAssetType AssetType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreDataSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreDataSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreDataSourceAssetType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreDataSourceAssetType(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreDataSourceAssetType IdAsset { get { throw null; } } - public static Azure.AI.Projects.VectorStoreDataSourceAssetType UriAsset { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreDataSourceAssetType 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.Projects.VectorStoreDataSourceAssetType left, Azure.AI.Projects.VectorStoreDataSourceAssetType right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreDataSourceAssetType (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreDataSourceAssetType left, Azure.AI.Projects.VectorStoreDataSourceAssetType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreDeletionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreDeletionStatus() { } - public bool Deleted { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreDeletionStatusObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreDeletionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreDeletionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreDeletionStatusObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreDeletionStatusObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreDeletionStatusObject VectorStoreDeleted { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreDeletionStatusObject 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.Projects.VectorStoreDeletionStatusObject left, Azure.AI.Projects.VectorStoreDeletionStatusObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreDeletionStatusObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreDeletionStatusObject left, Azure.AI.Projects.VectorStoreDeletionStatusObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreExpirationPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreExpirationPolicy(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor anchor, int days) { } - public Azure.AI.Projects.VectorStoreExpirationPolicyAnchor Anchor { get { throw null; } set { } } - public int Days { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreExpirationPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreExpirationPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreExpirationPolicyAnchor : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreExpirationPolicyAnchor(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreExpirationPolicyAnchor LastActiveAt { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor 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.Projects.VectorStoreExpirationPolicyAnchor left, Azure.AI.Projects.VectorStoreExpirationPolicyAnchor right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreExpirationPolicyAnchor (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreExpirationPolicyAnchor left, Azure.AI.Projects.VectorStoreExpirationPolicyAnchor right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFile() { } - public Azure.AI.Projects.VectorStoreChunkingStrategyResponse ChunkingStrategy { get { throw null; } } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileError LastError { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileStatus Status { get { throw null; } } - public int UsageBytes { get { throw null; } } - public string VectorStoreId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreFileBatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileBatch() { } - public System.DateTimeOffset CreatedAt { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileCount FileCounts { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileBatchObject Object { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileBatchStatus Status { get { throw null; } } - public string VectorStoreId { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileBatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileBatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileBatchObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileBatchObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatchObject VectorStoreFilesBatch { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileBatchObject 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.Projects.VectorStoreFileBatchObject left, Azure.AI.Projects.VectorStoreFileBatchObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileBatchObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileBatchObject left, Azure.AI.Projects.VectorStoreFileBatchObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileBatchStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileBatchStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileBatchStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileBatchStatus 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.Projects.VectorStoreFileBatchStatus left, Azure.AI.Projects.VectorStoreFileBatchStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileBatchStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileBatchStatus left, Azure.AI.Projects.VectorStoreFileBatchStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFileCount : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileCount() { } - public int Cancelled { get { throw null; } } - public int Completed { get { throw null; } } - public int Failed { get { throw null; } } - public int InProgress { get { throw null; } } - public int Total { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileCount System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileCount System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreFileDeletionStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileDeletionStatus() { } - public bool Deleted { get { throw null; } } - public string Id { get { throw null; } } - public Azure.AI.Projects.VectorStoreFileDeletionStatusObject Object { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileDeletionStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileDeletionStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileDeletionStatusObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileDeletionStatusObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileDeletionStatusObject VectorStoreFileDeleted { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileDeletionStatusObject 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.Projects.VectorStoreFileDeletionStatusObject left, Azure.AI.Projects.VectorStoreFileDeletionStatusObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileDeletionStatusObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileDeletionStatusObject left, Azure.AI.Projects.VectorStoreFileDeletionStatusObject right) { throw null; } - public override string ToString() { throw null; } - } - public partial class VectorStoreFileError : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreFileError() { } - public Azure.AI.Projects.VectorStoreFileErrorCode Code { get { throw null; } } - public string Message { get { throw null; } } + public string Size { get { throw null; } } + public string Tier { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreFileError System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreFileError System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreFileErrorCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileErrorCode(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileErrorCode InvalidFile { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileErrorCode ServerError { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileErrorCode UnsupportedFile { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileErrorCode 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.Projects.VectorStoreFileErrorCode left, Azure.AI.Projects.VectorStoreFileErrorCode right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileErrorCode (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileErrorCode left, Azure.AI.Projects.VectorStoreFileErrorCode right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileObject VectorStoreFile { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileObject 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.Projects.VectorStoreFileObject left, Azure.AI.Projects.VectorStoreFileObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileObject left, Azure.AI.Projects.VectorStoreFileObject right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileStatus Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileStatus 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.Projects.VectorStoreFileStatus left, Azure.AI.Projects.VectorStoreFileStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileStatus left, Azure.AI.Projects.VectorStoreFileStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreFileStatusFilter : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreFileStatusFilter(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Cancelled { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter Failed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreFileStatusFilter InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreFileStatusFilter 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.Projects.VectorStoreFileStatusFilter left, Azure.AI.Projects.VectorStoreFileStatusFilter right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreFileStatusFilter (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreFileStatusFilter left, Azure.AI.Projects.VectorStoreFileStatusFilter right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct VectorStoreObject : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreObject(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreObject VectorStore { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreObject 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.Projects.VectorStoreObject left, Azure.AI.Projects.VectorStoreObject right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreObject (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreObject left, Azure.AI.Projects.VectorStoreObject right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.Sku System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.Sku System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class VectorStoreStaticChunkingStrategyOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public abstract partial class TargetConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public VectorStoreStaticChunkingStrategyOptions(int maxChunkSizeTokens, int chunkOverlapTokens) { } - public int ChunkOverlapTokens { get { throw null; } set { } } - public int MaxChunkSizeTokens { get { throw null; } set { } } + protected TargetConfig() { } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreStaticChunkingStrategyRequest : Azure.AI.Projects.VectorStoreChunkingStrategyRequest, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public VectorStoreStaticChunkingStrategyRequest(Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions @static) { } - public Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions Static { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - public partial class VectorStoreStaticChunkingStrategyResponse : Azure.AI.Projects.VectorStoreChunkingStrategyResponse, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - internal VectorStoreStaticChunkingStrategyResponse() { } - public Azure.AI.Projects.VectorStoreStaticChunkingStrategyOptions Static { get { throw null; } } - protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.VectorStoreStaticChunkingStrategyResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.VectorStoreStaticChunkingStrategyResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.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 VectorStoreStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public VectorStoreStatus(string value) { throw null; } - public static Azure.AI.Projects.VectorStoreStatus Completed { get { throw null; } } - public static Azure.AI.Projects.VectorStoreStatus Expired { get { throw null; } } - public static Azure.AI.Projects.VectorStoreStatus InProgress { get { throw null; } } - public bool Equals(Azure.AI.Projects.VectorStoreStatus 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.Projects.VectorStoreStatus left, Azure.AI.Projects.VectorStoreStatus right) { throw null; } - public static implicit operator Azure.AI.Projects.VectorStoreStatus (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.VectorStoreStatus left, Azure.AI.Projects.VectorStoreStatus right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct WeekDays : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public WeekDays(string value) { throw null; } - public static Azure.AI.Projects.WeekDays Friday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Monday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Saturday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Sunday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Thursday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Tuesday { get { throw null; } } - public static Azure.AI.Projects.WeekDays Wednesday { get { throw null; } } - public bool Equals(Azure.AI.Projects.WeekDays 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.Projects.WeekDays left, Azure.AI.Projects.WeekDays right) { throw null; } - public static implicit operator Azure.AI.Projects.WeekDays (string value) { throw null; } - public static bool operator !=(Azure.AI.Projects.WeekDays left, Azure.AI.Projects.WeekDays right) { throw null; } - public override string ToString() { throw null; } + Azure.AI.Projects.TargetConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.TargetConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class WorkspaceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class Telemetry { - internal WorkspaceProperties() { } - public string ApplicationInsights { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Projects.WorkspaceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, 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.Projects.WorkspaceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public Telemetry(Azure.AI.Projects.AIProjectClient outerInstance) { } + public string GetConnectionString() { throw null; } + public System.Threading.Tasks.Task GetConnectionStringAsync() { throw null; } } } namespace Microsoft.Extensions.Azure { public static partial class AIProjectsClientBuilderExtensions { - public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, System.Uri endpoint, string subscriptionId, string resourceGroupName, string projectName) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } public static Azure.Core.Extensions.IAzureClientBuilder AddAIProjectClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } } } diff --git a/sdk/ai/Azure.AI.Projects/samples/README.md b/sdk/ai/Azure.AI.Projects/samples/README.md index 1111e29ca196..03b88ad8145b 100644 --- a/sdk/ai/Azure.AI.Projects/samples/README.md +++ b/sdk/ai/Azure.AI.Projects/samples/README.md @@ -9,40 +9,23 @@ name: Azure.AI.Projects samples for .NET description: Samples for the Azure.AI.Projects client library. --- -# Azure.AI.Projects Samples for Agents +# Azure.AI.Projects samples | Sample | Description | | ------ | ----------- | -| [Sample5_Sample_Agent_Additional_messages](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample5_Sample_Agent_Additional_messages.md) | Sample for using additional messages while creating agent run. | -| [Sample6_Sample_Agent_Azure_Functions](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample6_Sample_Agent_Azure_Functions.md) | Sample for using Azure Functions with agents. | -| [Sample7_Agent_Basics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample7_Agent_Basics.md) | Sample for basic use of an agent. | -| [Sample8_Agent_Bing_Grounding](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample8_Agent_Bing_Grounding.md) | Sample for use of an agent with Bing grounding. | -| [Sample9_Agent_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample9_Agent_Enterprise_File_Search.md) | Sample enterprise file search with agent. | -| [Sample10_Agent_FileSearch](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample10_Agent_FileSearch.md) | Sample file search with agent. | -| [Sample11_Functions](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample11_Functions.md) | Sample using agents with functions. | -| [Sample12_FunctionsWithStreaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample12_FunctionsWithStreaming.md) | Sample using agents with functions and streaming. | -| [Sample13_Streaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample13_Streaming.md) | Sample using agents with streaming. | -| [Sample14_Agent_Vector_Store_Batch_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample14_Agent_Vector_Store_Batch_File_Search.md) | Sample for batch file search. | -| [Sample15_Agents_Code_Interpreter_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample15_Agents_Code_Interpreter_Enterprise_File_Search.md) | Sample enterprise file search on agent with message attachment and code interpreter. | -| [Sample16_Agents_Code_Interpreter_File_Attachment](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample16_Agents_Code_Interpreter_File_Attachment.md) | Sample file search on agent with message attachment and code interpreter. | -| [Sample17_Agents_ImageUrlInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample17_Agents_ImageUrlInputs.md) | Sample using image url input with agents. | -| [Sample18_Agents_ImageFileInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample18_Agents_ImageFileInputs.md) | Sample using image file input with agents. | -| [Sample19_Agent_OpenAPI](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample19_Agent_OpenAPI.md) | Sample using agents with OpenAPI tool. | -| [Sample20_Agents_Azure_AI_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample20_Agents_Azure_AI_Search.md) | Sample using agents with Azure AI Search tool. | -| [Sample21_Agent_Vector_Store_Batch_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample21_Agent_Vector_Store_Batch_Enterprise_File_Search.md) | Sample for enterprise batch file search. | -| [Sample22_Agents_Azure_AI_Search_Streaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample22_Agents_Azure_AI_Search_Streaming.md) | Sample using agents with Azure AI Search tool with streaming. | -| [Sample23_Agent_Fabric](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample23_Agent_Fabric.md) | Sample using agents with Fabric tool. | +| [Sample1_Datasets](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample1_Datasets.md) | Sample for dataset functions. | +| [Sample2_Deployments](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample2_Deployments.md) | Sample for deployment functions. | +| [Sample3_Connections](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample3_Connections.md) | Sample for connections functions. | +| [Sample4_Indexes](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample4_Indexes.md) | Sample for indexes functions. | +| [Sample5_Evaluations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample5_Evaluations.md) | Sample for evaluations functions. | +| [Sample8_Telemetry](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample8_Telemetry.md) | Sample for telemetry functions. | -# Azure.AI.Projects Samples for Connections +# Azure.AI.Projects samples for Agents and Inference extensions | Sample | Description | | ------ | ----------- | -| [Sample3_Connection.md](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample3_Connection.md) | Sample for `ConnectionsClient`. | - -# Azure.AI.Projects Samples for Extensions - -| Sample | Description | -| ------ | ----------- | -| [Sample1_AIInference](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample1_AIInference.md) | Sample for `Azure.AI.Inference` extensions. | -| [Sample2_AzureOpenAI](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample2_AzureOpenAI.md) | Sample for `Azure.AI.OpenAI` extensions. | -| [Sample4_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample4_Search.md) | Sample for `Azure.Search.Documents` extensions. | \ No newline at end of file +| [Sample6_Agents](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample6_Agents.md) | Sample for `Azure.AI.Agents.Persistent` extensions. | +| [Sample7_AzureOpenAI](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample7_AzureOpenAI.md) | Sample for `Azure.AI.OpenAI` extensions. | +| [Sample9_InferenceChatClient](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample9_InferenceChatClient.md) | Sample for `Azure.AI.Inference` Chat Client extensions. | +| [Sample10_InferenceEmbedding](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample10_InferenceEmbedding.md) | Sample for `Azure.AI.Inference` Embeddings extensions. | +| [Sample11_InferenceImageEmbedding](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/samples/Sample11_InferenceImageEmbedding.md) | Sample for `Azure.AI.Inference` Image Embeddings extensions. | \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample10_Agent_FileSearch.md b/sdk/ai/Azure.AI.Projects/samples/Sample10_Agent_FileSearch.md deleted file mode 100644 index 2c4691fc7dd3..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample10_Agent_FileSearch.md +++ /dev/null @@ -1,227 +0,0 @@ -# Sample file search with agent in Azure.AI.Projects. - -In this example we will create the local file, upload it to the newly created `VectorStore`, which will be used in the file search. - -1. First we need to create agent client and read the environment variables that will be used in the next steps. -```C# Snippet:FilesSearchExample_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` - -2. Now we will create a file and upload it to the data store. - -Synchronous sample: -```C# Snippet:UploadAgentFilesToUse_Sync -// Upload a file and wait for it to be processed -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = client.UploadFile( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -Dictionary fileIds = new() -{ - { uploadedAgentFile.Id, uploadedAgentFile.Filename } -}; -``` - -Asynchronous sample: -```C# Snippet:UploadAgentFilesToUse -// Upload a file and wait for it to be processed -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -Dictionary fileIds = new() -{ - { uploadedAgentFile.Id, uploadedAgentFile.Filename } -}; -``` - -3. To create agent capable of using file search, we will create `VectorStore`, with the ID of uploaded file. - -Synchronous sample: -```C# Snippet:CreateVectorStore_Sync -// Create a vector store with the file and wait for it to be processed. -// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active -VectorStore vectorStore = client.CreateVectorStore( - fileIds: new List { uploadedAgentFile.Id }, - name: "my_vector_store"); -``` - -Asynchronous sample: -```C# Snippet:CreateVectorStore -// Create a vector store with the file and wait for it to be processed. -// If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active -VectorStore vectorStore = await client.CreateVectorStoreAsync( - fileIds: new List { uploadedAgentFile.Id }, - name: "my_vector_store"); -``` - - -4 The ID of the created vector store will be used in the `FileSearchToolResource` used for agent creation. - -Synchronous sample: -```C# Snippet:CreateAgentWithFiles_Sync -FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); -fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - -// Create an agent with toolResources and process assistant run -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); -``` - -Asynchronous sample: -```C# Snippet:CreateAgentWithFiles -FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); -fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - -// Create an agent with toolResources and process assistant run -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); -``` - -5. To properly render the links to the file name we use the `WriteMessages` method, which internally calls `replaceReferences` method to replace reference placeholders by file IDs or by file names. -```C# Snippet:FilesSearchExample_Print -private static void WriteMessages(IEnumerable messages, Dictionary fileIds) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) -{ - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); -} -``` - -6. We will ask a question to the file contents and add it to the thread, create run and wait while it will terminate. If the run was successful, we will render the response and provide the reference to the uploaded file. - -Synchronous sample: -```C# Snippet:FilesSearchExample_CreateThreadAndRun_Sync -// Create thread for communication -AgentThread thread = client.CreateThread(); - -// Create message to thread -ThreadMessage messageResponse = client.CreateMessage( - thread.Id, - MessageRole.User, - "Can you give me the documented codes for 'banana' and 'orange'?"); - -// Run the agent -ThreadRun run = client.CreateRun(thread, agent); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages, fileIds); -``` - -Asynchronous sample: -```C# Snippet:FilesSearchExample_CreateThreadAndRun -// Create thread for communication -AgentThread thread = await client.CreateThreadAsync(); - -// Create message to thread -ThreadMessage messageResponse = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Can you give me the documented codes for 'banana' and 'orange'?"); - -// Run the agent -ThreadRun run = await client.CreateRunAsync(thread, agent); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages, fileIds); -``` - -7. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:FilesSearchExample_Cleanup_Sync -client.DeleteVectorStore(vectorStore.Id); -client.DeleteFile(uploadedAgentFile.Id); -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:FilesSearchExample_Cleanup -await client.DeleteVectorStoreAsync(vectorStore.Id); -await client.DeleteFileAsync(uploadedAgentFile.Id); -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample10_InferenceEmbedding.md b/sdk/ai/Azure.AI.Projects/samples/Sample10_InferenceEmbedding.md new file mode 100644 index 000000000000..bbd14bae428f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample10_InferenceEmbedding.md @@ -0,0 +1,53 @@ +# Sample using `Embeddings` in Azure.AI.Projects + +This sample demonstrates how to use the synchronous and asynchronous `GetEmbeddingsClient()` method. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `MODEL_DEPLOYMENT_NAME`: The name of the embeddings deployment to retrieve. + +## Synchronous Sample + +```C# Snippet:AI_Projects_EmbeddingSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); + +var input = new List { "first phrase", "second phrase", "third phrase" }; +var requestOptions = new EmbeddingsOptions(input) +{ + Model = modelDeploymentName +}; + +Response response = embeddingsClient.Embed(requestOptions); +foreach (EmbeddingItem item in response.Value.Data) +{ + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); +} +``` +## Asynchronous Sample + +```C# Snippet:AI_Projects_EmbeddingAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); + +var input = new List { "first phrase", "second phrase", "third phrase" }; +var requestOptions = new EmbeddingsOptions(input) +{ + Model = modelDeploymentName +}; + +Response response = await embeddingsClient.EmbedAsync(requestOptions); +foreach (EmbeddingItem item in response.Value.Data) +{ + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); +} +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample11_Functions.md b/sdk/ai/Azure.AI.Projects/samples/Sample11_Functions.md deleted file mode 100644 index dea1d49b0c92..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample11_Functions.md +++ /dev/null @@ -1,275 +0,0 @@ -# Sample using agents with functions in Azure.AI.Projects. - -In this example we are demonstrating how to use the local functions with the agents. The functions can be used to provide agent specific information in response to user question. - -1. First we need to create agent client and read the environment variables that will be used in the next steps. -```C# Snippet:Functions_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` - -2 Define three toy functions: `GetUserFavoriteCity`that always returns "Seattle, WA" and `GetCityNickname`, which will handle only "Seattle, WA" and will throw exception in response to other city names. The last function `GetWeatherAtLocation` returns weather at Seattle, WA. For each function we need to create `FunctionToolDefinition`, which defines function name, description and parameters. -```C# Snippet:FunctionsDefineFunctionTools -// Example of a function that defines no parameters -string GetUserFavoriteCity() => "Seattle, WA"; -FunctionToolDefinition getUserFavoriteCityTool = new("getUserFavoriteCity", "Gets the user's favorite city."); -// Example of a function with a single required parameter -string GetCityNickname(string location) => location switch -{ - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), -}; -FunctionToolDefinition getCityNicknameTool = new( - name: "getCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -// Example of a function with one required and one optional, enum parameter -string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch -{ - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() -}; -FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "getCurrentWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -``` - -3. We will create the function `GetResolvedToolOutput`. It runs the abovementioned functions and wraps their outouts in `ToolOutput` object. -```C# Snippet:FunctionsHandleFunctionCalls -ToolOutput GetResolvedToolOutput(RequiredToolCall toolCall) -{ - if (toolCall is RequiredFunctionToolCall functionToolCall) - { - if (functionToolCall.Name == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCall, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionToolCall.Arguments); - if (functionToolCall.Name == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCall, GetCityNickname(locationArgument)); - } - if (functionToolCall.Name == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument)); - } - } - return null; -} -``` - -4. Create Agent with the `FunctionToolDefinitions` we have created in step 2. - -Synchronous sample: -```C# Snippet:FunctionsSyncCreateAgentWithFunctionTools -// note: parallel function calling is only supported with newer models like gpt-4-1106-preview -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool] - ); -``` - -Asynchronous sample: -```C# Snippet:FunctionsCreateAgentWithFunctionTools -// note: parallel function calling is only supported with newer models like gpt-4-1106-preview -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [ getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool ] - ); -``` - -5. Create `ThreadRun`. - -Synchronous sample: -```C# Snippet:FunctionsSync_CreateRun -AgentThread thread = client.CreateThread(); - -client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - -ThreadRun run = client.CreateRun(thread, agent); -``` - -Asynchronous sample: -```C# Snippet:Functions_CreateRun -AgentThread thread = await client.CreateThreadAsync(); - -await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - -ThreadRun run = await client.CreateRunAsync(thread, agent); -``` - -6. We will wait for the run to complete; if the local function call is required, run status will be set to `RunStatus.RequiresAction` and the run's `RequiredAction` property will be of `SubmitToolOutputsAction` type. In this case we will need to execute required functions locally and submit their outputs to the agent. The `RequiredAction` property contains a list of required calls in `ToolCalls` property. - -Synchronous sample: -```C# Snippet:FunctionsSyncHandlePollingWithRequiredAction -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - - if (run.Status == RunStatus.RequiresAction - && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = []; - foreach (RequiredToolCall toolCall in submitToolOutputsAction.ToolCalls) - { - toolOutputs.Add(GetResolvedToolOutput(toolCall)); - } - run = client.SubmitToolOutputsToRun(run, toolOutputs); - } -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:FunctionsHandlePollingWithRequiredAction -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - - if (run.Status == RunStatus.RequiresAction - && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = []; - foreach (RequiredToolCall toolCall in submitToolOutputsAction.ToolCalls) - { - toolOutputs.Add(GetResolvedToolOutput(toolCall)); - } - run = await client.SubmitToolOutputsToRunAsync(run, toolOutputs); - } -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -7. Write the messages from the agent to console in chronological order. - -Synchronous sample: -```C# Snippet:FunctionsSync_ListMessages -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" input = new List +{ + ImageEmbeddingInput.Load(imageFilePath:"sampleImage.png", imageFormat:"png") +}; + +var requestOptions = new ImageEmbeddingsOptions(input) +{ + Model = modelDeploymentName +}; + +Response response = imageEmbeddingsClient.Embed(requestOptions); +foreach (EmbeddingItem item in response.Value.Data) +{ + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); +} +``` +## Asynchronous Sample + +```C# Snippet:AI_Projects_ImageEmbeddingAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +ImageEmbeddingsClient imageEmbeddingsClient = client.GetImageEmbeddingsClient(); + +List input = new List +{ + ImageEmbeddingInput.Load(imageFilePath:"sampleImage.png", imageFormat:"png") +}; + +var requestOptions = new ImageEmbeddingsOptions(input) +{ + Model = modelDeploymentName +}; + +Response response = await imageEmbeddingsClient.EmbedAsync(requestOptions); +foreach (EmbeddingItem item in response.Value.Data) +{ + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); +} +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample12_FunctionsWithStreaming.md b/sdk/ai/Azure.AI.Projects/samples/Sample12_FunctionsWithStreaming.md deleted file mode 100644 index 5391f348f672..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample12_FunctionsWithStreaming.md +++ /dev/null @@ -1,248 +0,0 @@ -# Sample using agents with functions and streaming in Azure.AI.Projects. - -In this example we are demonstrating how to use the local functions with the agents in streaming scenarios. The functions can be used to provide agent specific information in response to user question. - -1. First we need to create agent client and read the environment variables that will be used in the next steps. -```C# Snippet:FunctionsWithStreaming_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` - -2 Define three toy functions: `GetUserFavoriteCity`that always returns "Seattle, WA" and `GetCityNickname`, which will handle only "Seattle, WA" and will throw exception in response to other city names. The last function `GetWeatherAtLocation` returns weather at Seattle, WA. For each function we need to create `FunctionToolDefinition`, which defines function name, description and parameters. -```C# Snippet:FunctionsWithStreaming_DefineFunctionTools -// Example of a function that defines no parameters -private string GetUserFavoriteCity() => "Seattle, WA"; -private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); -// Example of a function with a single required parameter -private string GetCityNickname(string location) => location switch -{ - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), -}; -private FunctionToolDefinition getCityNicknameTool = new( - name: "GetCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -// Example of a function with one required and one optional, enum parameter -private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch -{ - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() -}; -private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "GetWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -``` - -3. We will create the function `GetResolvedToolOutput`. It runs the abovementioned functions and wraps their outouts in `ToolOutput` object. -```C# Snippet:FunctionsWithStreamingUpdateHandling -ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) -{ - if (functionName == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCallId, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); - if (functionName == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCallId, GetCityNickname(locationArgument)); - } - if (functionName == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument)); - } - return null; -} -``` - -4. Create Agent with the `FunctionToolDefinitions` we have created in step 2. - -Synchronous sample: -```C# Snippet:FunctionsWithStreamingSync_CreateAgent -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool] -); -``` - -Asynchronous sample: -```C# Snippet:FunctionsWithStreaming_CreateAgent -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [ getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool ] -); -``` - -5. Create `Thread` with the message. - -Synchronous sample: -```C# Snippet:FunctionsWithStreamingSync_CreateThread -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); -``` - -Asynchronous sample: -```C# Snippet:FunctionsWithStreaming_CreateThread -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); -``` - -6. Create a stream and wait for the stream update of the `RequiredActionUpdate` type. This update will mark the point, when we need to submit tool outputs to the stream. `RequiredActionUpdate` keeps only one required action, while our run may require multiple function calls, when the last required action has been read, the stream terminates and we start a new stream by submitting tool call results. In the begin of each cycle up the array of required actions. - -Synchronous sample: -```C# Snippet:FunctionsWithStreamingSyncUpdateCycle -List toolOutputs = []; -ThreadRun streamRun = null; -CollectionResult stream = client.CreateRunStreaming(thread.Id, agent.Id); -do -{ - toolOutputs.Clear(); - foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is RequiredActionUpdate submitToolOutputsUpdate) - { - RequiredActionUpdate newActionUpdate = submitToolOutputsUpdate; - toolOutputs.Add( - GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - )); - streamRun = submitToolOutputsUpdate.Value; - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - if (toolOutputs.Count > 0) - { - stream = client.SubmitToolOutputsToStream(streamRun, toolOutputs); - } -} -while (toolOutputs.Count > 0); -``` - -Asynchronous sample: -```C# Snippet:FunctionsWithStreamingUpdateCycle -List toolOutputs = []; -ThreadRun streamRun = null; -AsyncCollectionResult stream = client.CreateRunStreamingAsync(thread.Id, agent.Id); -do -{ - toolOutputs.Clear(); - await foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is RequiredActionUpdate submitToolOutputsUpdate) - { - RequiredActionUpdate newActionUpdate = submitToolOutputsUpdate; - toolOutputs.Add( - GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - )); - streamRun = submitToolOutputsUpdate.Value; - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - if (toolOutputs.Count > 0) - { - stream = client.SubmitToolOutputsToStreamAsync(streamRun, toolOutputs); - } -} -while (toolOutputs.Count > 0); -``` - -7. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:FunctionsWithStreamingSync_Cleanup -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:FunctionsWithStreaming_Cleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample13_Streaming.md b/sdk/ai/Azure.AI.Projects/samples/Sample13_Streaming.md deleted file mode 100644 index d8fbf7d3f021..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample13_Streaming.md +++ /dev/null @@ -1,107 +0,0 @@ -# Sample using agents with streaming in Azure.AI.Projects. - -In this example we will demonstrate the agent streaming support. - -1. First we need to create agent client and read the environment variables that will be used in the next steps. -```C# Snippet:StreamingAsync_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` -2. We will create agent with the Interpreter tool support. It is needed to allow fow writing mathematical formulas in [LaTeX](https://en.wikipedia.org/wiki/LaTeX) format. - -Synchronous sample: -```C# Snippet:Streaming_CreateAgent -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "My Friendly Test Assistant", - instructions: "You politely help with math questions. Use the code interpreter tool when asked to visualize numbers.", - tools: [new CodeInterpreterToolDefinition()] -); -``` - -Asynchronous sample: -```C# Snippet:StreamingAsync_CreateAgent -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "My Friendly Test Assistant", - instructions: "You politely help with math questions. Use the code interpreter tool when asked to visualize numbers.", - tools: [ new CodeInterpreterToolDefinition() ] -); -``` - -3. Create `Thread` with the message. - -Synchronous sample: -```C# Snippet:Streaming_CreateThread -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "Hi, Assistant! Draw a graph for a line with a slope of 4 and y-intercept of 9."); -``` - -Asynchronous sample: -```C# Snippet:StreamingAsync_CreateThread -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Hi, Assistant! Draw a graph for a line with a slope of 4 and y-intercept of 9."); -``` - -4. Read the output from the stream. - -Synchronous sample: -```C# Snippet:Streaming_StreamLoop -foreach (StreamingUpdate streamingUpdate in client.CreateRunStreaming(thread.Id, agent.Id)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine($"--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - if (contentUpdate.ImageFileId is not null) - { - Console.WriteLine($"[Image content file ID: {contentUpdate.ImageFileId}"); - } - } -} -``` - -Asynchronous sample: -```C# Snippet:StreamingAsync_StreamLoop -await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine($"--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - if (contentUpdate.ImageFileId is not null) - { - Console.WriteLine($"[Image content file ID: {contentUpdate.ImageFileId}"); - } - } -} -``` - -5. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet::Streaming_Cleanup -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet::StreamingAsync_Cleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample14_Agent_Vector_Store_Batch_File_Search.md b/sdk/ai/Azure.AI.Projects/samples/Sample14_Agent_Vector_Store_Batch_File_Search.md deleted file mode 100644 index 92d3dbf4edb2..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample14_Agent_Vector_Store_Batch_File_Search.md +++ /dev/null @@ -1,222 +0,0 @@ -# Sample for Azure.AI.Projects and batch file search. - -1. To perform batch file search by an Agent, we first need to upload a file, create a vector store, and associate the file to the vector store. Here is an example: - -Synchronous sample: -```C# Snippet:VectorStoreBatchFileSearchCreateVectorStore -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var filePath = GetFile(); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); - -VectorStore vectorStore = client.CreateVectorStore( - name: "sample_vector_store" -); - -AgentFile fileResponse = client.UploadFile(filePath, AgentFilePurpose.Agents); -Dictionary dtReferences = new() -{ - {fileResponse.Id, Path.GetFileName(fileResponse.Filename)} -}; - -var uploadTask = client.CreateVectorStoreFileBatch( - vectorStoreId: vectorStore.Id, - fileIds: [fileResponse.Id] -); -Console.WriteLine($"Created vector store file batch, vector store file batch ID: {uploadTask.Value.Id}"); - -FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - -List tools = [new FileSearchToolDefinition()]; -Agent agent = client.CreateAgent( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchFileAsyncSearchCreateVectorStore -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var filePath = GetFile(); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); - -VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store" -); - -AgentFile fileResponse = await client.UploadFileAsync(filePath, AgentFilePurpose.Agents); -Dictionary dtReferences = new() -{ - {fileResponse.Id, Path.GetFileName(fileResponse.Filename)} -}; - -VectorStoreFileBatch uploadTask = await client.CreateVectorStoreFileBatchAsync( - vectorStoreId: vectorStore.Id, - fileIds: [fileResponse.Id] -); -Console.WriteLine($"Created vector store file batch, vector store file batch ID: {uploadTask.Id}"); - -FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - -List tools = [new FileSearchToolDefinition()]; -Agent agent = await client.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); -``` - -2. Then we need to create thread, add the message and start the run. If the run did not completed successfully, we will show the last error message, otherwise we will list messages in chronological order. - -Synchronous sample: -```C# Snippet:VectorStoreBatchFileSearchThreadAndResponse -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - -ThreadRun run = client.CreateRun( - thread.Id, - agent.Id -); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages, dtReferences); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchFileSearchAsyncThreadAndResponse -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" -); - -ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id -); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages, dtReferences); -``` - -3. After the run complete, we will use `WriteMessages` method to swap reference placeholders by the actual file names. -```C# Snippet:VectorStoreBatchFileSearchParseResults -private static void WriteMessages(IEnumerable messages, Dictionary fileIds) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) -{ - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); -} -``` - -4. When the experiment is complete, we will clean up the resources. - -Synchronous sample: -```C# Snippet:VectorStoreBatchFileSearchCleanup -VectorStoreDeletionStatus delTask = client.DeleteVectorStore(vectorStore.Id); -if (delTask.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchFileSearchAsyncCleanup -VectorStoreDeletionStatus delTask = await client.DeleteVectorStoreAsync(vectorStore.Id); -if (delTask.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -await client.DeleteAgentAsync(agent.Id); -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample15_Agents_Code_Interpreter_Enterprise_File_Search.md b/sdk/ai/Azure.AI.Projects/samples/Sample15_Agents_Code_Interpreter_Enterprise_File_Search.md deleted file mode 100644 index 8101836fc652..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample15_Agents_Code_Interpreter_Enterprise_File_Search.md +++ /dev/null @@ -1,221 +0,0 @@ -# Sample enterprise file search on agent with message attachment and code interpreter in Azure.AI.Projects. - -In this example we demonstrate, how the Azure Blob can be utilized for enterprize file search with `MessageAttachment`. - -1. First we need to create agent client and read the environment variables, which will be used in the next steps. -```C# Snippet:CodeInterpreterEnterpriseSearch_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var blobURI = Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -``` -2. Create agent. - -Synchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearch_CreateAgent -List tools = [new CodeInterpreterToolDefinition()]; -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools -); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearchAsync_CreateAgent -List tools = [ new CodeInterpreterToolDefinition() ]; -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools -); -``` - -3. Create `VectorStoreDataSource`, which will contain the link to Azure Asset ID of our Blob. -```C# Snippet:CreateMessageAttachmentWithBlobStore -var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset -); - -var attachment = new MessageAttachment( - ds: ds, - tools: tools -); -``` - -4. Create a `ThreadMessage`, which contains the `VectorStoreDataSource` as an attachment. - -Synchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearch_CreateThreadRun -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?", - attachments: [attachment] -); - -ThreadRun run = client.CreateRun( - thread.Id, - agent.Id -); -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearchAsync_CreateThreadRun -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?", - attachments: [ attachment ] -); - -ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id -); -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -5. Create the utility function, to print messages to the console. -```C# Snippet:CodeInterpreterEnterpriseSearch_Print -private static void WriteMessages(IEnumerable messages) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearchAsync_PrintMessages -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages); -``` - - -8. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearch_Cleanup -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterEnterpriseSearchAsync_Cleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample16_Agents_Code_Interpreter_File_Attachment.md b/sdk/ai/Azure.AI.Projects/samples/Sample16_Agents_Code_Interpreter_File_Attachment.md deleted file mode 100644 index 7004cbdd0ed3..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample16_Agents_Code_Interpreter_File_Attachment.md +++ /dev/null @@ -1,177 +0,0 @@ -# Sample file search on agent with message attachment and code interpreter in Azure.AI.Projects. - -In this example we demonstrate, how to use file search with `MessageAttachment`. - -1. First we need to create agent client and read the environment variables, which will be used in the next steps. -```C# Snippet:CodeInterpreterFileAttachment_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); -``` - -2. We need to create an agent, create and upload file and `ThreadMessage` with the uploaded file ID in the `MessageAttachment`. - -Synchronous sample: -```C# Snippet:CreateAgentWithInterpreterToolSync -List tools = [new CodeInterpreterToolDefinition()]; -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: tools -); - -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = client.UploadFile( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -var fileId = uploadedAgentFile.Id; - -var attachment = new MessageAttachment( - fileId: fileId, - tools: tools -); - -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "Can you give me the documented codes for 'banana' and 'orange'?", - attachments: [attachment] -); -``` - -Asynchronous sample: -```C# Snippet:CreateAgentWithInterpreterTool -List tools = [ new CodeInterpreterToolDefinition() ]; -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: tools -); - -File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); -AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); -var fileId = uploadedAgentFile.Id; - -var attachment = new MessageAttachment( - fileId: fileId, - tools: tools -); - -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "Can you give me the documented codes for 'banana' and 'orange'?", - attachments: [ attachment ] -); -``` - -3. Next we will create a `ThreadRun` and wait until the run is completed. If the run was not successful we will print the last error message. - -Synchronous sample: -```C# Snippet:CodeInterpreterFileAttachmentSync_CreateRun -ThreadRun run = client.CreateRun( - thread.Id, - agent.Id -); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterFileAttachment_CreateRun -ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id -); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -4. In this example we will use the utility function `WriteMessages`, to print messages to the console. -```C# Snippet:CodeInterpreterFileAttachment_Print -private static void WriteMessages(IEnumerable messages) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterFileAttachment_PrintMessages -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -WriteMessages(messages); -``` - -6. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:CodeInterpreterFileAttachmentSync_Cleanup -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:CodeInterpreterFileAttachment_Cleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample17_Agents_ImageUrlInputs.md b/sdk/ai/Azure.AI.Projects/samples/Sample17_Agents_ImageUrlInputs.md deleted file mode 100644 index 3b0fcd9368d1..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample17_Agents_ImageUrlInputs.md +++ /dev/null @@ -1,191 +0,0 @@ -# Sample using agents with Image URL as an input. - -This sample demonstrates examples of sending an image URL (along with optional text) as a structured content block in a single message. The examples shows how to create an agent, open a thread, post content blocks combining text and image inputs, and then run the agent to see how it interprets the multimedia input. - -1. Create an agent. - -Synchronous sample: -```C# Snippet:ImageUrlInMessageCreateAgent_Sync -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "Image Understanding Agent", - instructions: "You are an image-understanding assistant. Analyze images and provide textual descriptions." -); -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageCreateAgent -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "Image Understanding Agent", - instructions: "You are an image-understanding assistant. Analyze images and provide textual descriptions." -); -``` - -2. Create a thread - -Synchronous sample: -```C# Snippet:ImageUrlInMessageCreateThread_Sync -AgentThread thread = client.CreateThread(); -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageCreateThread -AgentThread thread = await client.CreateThreadAsync(); -``` - -3. Create a message using multiple content blocks. Here we combine a short text and an image URL in a single user message. - -Synchronous sample: -```C# Snippet:ImageUrlInMessageCreateMessage_Sync -MessageImageUrlParam imageUrlParam = new MessageImageUrlParam( - url: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" -); -imageUrlParam.Detail = ImageDetailLevel.High; - -var contentBlocks = new List -{ - new MessageInputTextBlock("Could you describe this image?"), - new MessageInputImageUrlBlock(imageUrlParam) -}; - -ThreadMessage imageMessage = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks -); -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageCreateMessage -MessageImageUrlParam imageUrlParam = new MessageImageUrlParam( - url: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" -); -imageUrlParam.Detail = ImageDetailLevel.High; -var contentBlocks = new List -{ - new MessageInputTextBlock("Could you describe this image?"), - new MessageInputImageUrlBlock(imageUrlParam) -}; - -ThreadMessage imageMessage = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks -); -``` - -4. Run the agent against the thread that now has an image to analyze. - -Synchronous sample: -```C# Snippet:ImageUrlInMessageCreateRun_Sync -ThreadRun run = client.CreateRun( - threadId: thread.Id, - assistantId: agent.Id -); -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageCreateRun -ThreadRun run = await client.CreateRunAsync( - threadId: thread.Id, - assistantId: agent.Id -); -``` - -5. Wait for the run to complete. - - -Synchronous sample: -```C# Snippet:ImageUrlInMessageWaitForRun_Sync -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - -if (run.Status != RunStatus.Completed) -{ - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); -} -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageWaitForRun -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - -if (run.Status != RunStatus.Completed) -{ - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); -} -``` - -6. Retrieve messages (including how the agent responds) and print their contents. - -Synchronous sample: -```C# Snippet:ImageUrlInMessageReview_Sync -PageableList messages = client.GetMessages(thread.Id); - -foreach (ThreadMessage msg in messages) -{ - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } -} -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageReview -PageableList messages = await client.GetMessagesAsync(thread.Id); - -foreach (ThreadMessage msg in messages) -{ - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } -} -``` - -7. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:ImageUrlInMessageCleanup_Sync -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:ImageUrlInMessageCleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample18_Agents_ImageFileInputs.md b/sdk/ai/Azure.AI.Projects/samples/Sample18_Agents_ImageFileInputs.md deleted file mode 100644 index a4600673cf6c..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample18_Agents_ImageFileInputs.md +++ /dev/null @@ -1,215 +0,0 @@ -# Sample using agents with Image File as an input. - -Demonstrates examples of sending an image file (along with optional text) as a structured content block in a single message. The examples shows how to create an agent, open a thread, post content blocks combining text and image inputs, and then run the agent to see how it interprets the multimedia input. - -1. (Optional) Upload a file for referencing in your message: - -Synchronous sample: -```C# Snippet:ImageFileInMessageUpload_Sync -string pathToImage = Path.Combine( - TestContext.CurrentContext.TestDirectory, - "Samples/Agent/image_file.png" -); - -// The file might be an image or any relevant binary. -// Make sure the server or container is set up for "Agents" usage if required. -AgentFile uploadedFile = client.UploadFile( - filePath: pathToImage, - purpose: AgentFilePurpose.Agents -); -Console.WriteLine($"Uploaded file with ID: {uploadedFile.Id}"); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageUpload -string pathToImage = Path.Combine( - TestContext.CurrentContext.TestDirectory, - "Samples/Agent/image_file.png" - ); - -// The file might be an image or any relevant binary. -// Make sure the server or container is set up for "Agents" usage if required. -AgentFile uploadedFile = await client.UploadFileAsync( - filePath: pathToImage, - purpose: AgentFilePurpose.Agents -); -Console.WriteLine($"Uploaded file with ID: {uploadedFile.Id}"); -``` - -2. Create an agent. - -Synchronous sample: -```C# Snippet:ImageFileInMessageCreateAgent_Sync -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "File Image Understanding Agent", - instructions: "Analyze images from internally uploaded files." -); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageCreateAgent -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "File Image Understanding Agent", - instructions: "Analyze images from internally uploaded files." -); -``` - -3. Create a thread. - -Synchronous sample: -```C# Snippet:ImageFileInMessageCreateThread_Sync -AgentThread thread = client.CreateThread(); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageCreateThread -AgentThread thread = await client.CreateThreadAsync(); -``` - -4. Create a message referencing the uploaded file. - -Synchronous sample: -```C# Snippet:ImageFileInMessageCreateMessage_Sync -var contentBlocks = new List -{ - new MessageInputTextBlock("Here is an uploaded file. Please describe it:"), - new MessageInputImageFileBlock(new MessageImageFileParam(uploadedFile.Id)) -}; - -ThreadMessage imageMessage = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks -); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageCreateMessage -var contentBlocks = new List -{ - new MessageInputTextBlock("Here is an uploaded file. Please describe it:"), - new MessageInputImageFileBlock(new MessageImageFileParam(uploadedFile.Id)) -}; - -ThreadMessage imageMessage = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - contentBlocks: contentBlocks -); -``` - -5. Run the agent. - -Synchronous sample: -```C# Snippet:ImageFileInMessageCreateRun_Sync -ThreadRun run = client.CreateRun( - threadId: thread.Id, - assistantId: agent.Id -); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageCreateRun -ThreadRun run = await client.CreateRunAsync( - threadId: thread.Id, - assistantId: agent.Id -); -``` - -6. Wait for the run to complete. - -Synchronous sample: -```C# Snippet:ImageFileInMessageWaitForRun_Sync -do -{ - Thread.Sleep(500); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - -if (run.Status != RunStatus.Completed) -{ - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); -} -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageWaitForRun -do -{ - await Task.Delay(500); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - -if (run.Status != RunStatus.Completed) -{ - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); -} -``` - -7. Retrieve messages (including any agent responses) and print them. - -Synchronous sample: -```C# Snippet:ImageFileInMessageReview_Sync -PageableList messages = client.GetMessages(thread.Id); - -foreach (ThreadMessage msg in messages) -{ - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } -} -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageReview -PageableList messages = await client.GetMessagesAsync(thread.Id); - -foreach (ThreadMessage msg in messages) -{ - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } -} -``` - -8. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:ImageFileInMessageCleanup_Sync -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:ImageFileInMessageCleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample19_Agent_OpenAPI.md b/sdk/ai/Azure.AI.Projects/samples/Sample19_Agent_OpenAPI.md deleted file mode 100644 index 3f73cf70af52..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample19_Agent_OpenAPI.md +++ /dev/null @@ -1,174 +0,0 @@ -# Sample using agents with OpenAPI tool in Azure.AI.Projects. - -In this example we will demonstrate the possibility to use services with [OpenAPI Specification](https://en.wikipedia.org/wiki/OpenAPI_Specification) with the agent. We will use [wttr.in](https://wttr.in) service to get weather and its specification file [weather_openapi.json](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json). To get this file we will use the utility function `GetFile`, which takes file located in the `C#` source directory. -```C# Snippet:OpenAPICallingExample_GetFile -private static string GetFile([CallerFilePath] string pth = "") -{ - var dirName = Path.GetDirectoryName(pth) ?? ""; - return Path.Combine(dirName, "weather_openapi.json"); -} -``` - -1. First we need to create agent client and read the environment variables, which will be used in the next steps. -```C# Snippet:OpenAPICallingExample_CreateClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AgentsClient client = new(connectionString, new DefaultAzureCredential()); -var file_path = GetFile(); -``` - -2. Next we will create the agent with `OpenApiToolDefinition` and anonymous authentication. - -Synchronous sample: -```C# Snippet:OpenAPISyncDefineFunctionTools -OpenApiAnonymousAuthDetails oaiAuth = new(); -OpenApiToolDefinition openapiTool = new( - name: "get_weather", - description: "Retrieve weather information for a location", - spec: BinaryData.FromBytes(File.ReadAllBytes(file_path)), - auth: oaiAuth, - defaultParams: ["format"] -); - -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful assistant.", - tools: [openapiTool] -); -``` - -Asynchronous sample: -```C# Snippet:OpenAPIDefineFunctionTools -OpenApiAnonymousAuthDetails oaiAuth = new(); -OpenApiToolDefinition openapiTool = new( - name: "get_weather", - description: "Retrieve weather information for a location", - spec: BinaryData.FromBytes(File.ReadAllBytes(file_path)), - auth: oaiAuth, - defaultParams: ["format"] -); - -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful assistant.", - tools: [ openapiTool ] -); -``` - -3. Now we will create a `ThreadRun` and wait until it is complete. If the run will not be successful, we will print the last error. - -Synchronous sample: -```C# Snippet:OpenAPISyncHandlePollingWithRequiredAction -AgentThread thread = client.CreateThread(); -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather in Seattle?"); - -ThreadRun run = client.CreateRun(thread, agent); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:OpenAPIHandlePollingWithRequiredAction -AgentThread thread = await client.CreateThreadAsync(); -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather in Seattle?"); - -ThreadRun run = await client.CreateRunAsync(thread, agent); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -4. Print the messages to the console in chronological order. - -Synchronous sample: -```C# Snippet:OpenAPISync_Print -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" response = chatClient.Complete(requestOptions); -Console.WriteLine(response.Value.Content); -``` - -Asynchronous sample: -```C# Snippet:ExtensionsChatClientAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new(connectionString); -ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); - -var requestOptions = new ChatCompletionsOptions() -{ - Messages = - { - new ChatRequestSystemMessage("You are a helpful assistant."), - new ChatRequestUserMessage("How many feet are in a mile?"), - }, - Model = modelDeploymentName -}; -Response response = await chatClient.CompleteAsync(requestOptions); -Console.WriteLine(response.Value.Content); -``` - -## Embeddings extensions - -Set these two environment variables before running the sample: -1. PROJECT_CONNECTION_STRING - The connection string taken from the Overview section of Azure AI Foundry. -2. EMBEDDING_MODEL_DEPLOYMENT_NAME - The model's name to be used for embedding generation. - -Embedding also can be called synchronously and asynchronously. - -Synchronous sample: -```C# Snippet:ExtensionsEmbeddingSync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("EMBEDDING_MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new AIProjectClient(connectionString); -EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); - -var input = new List { "first phrase", "second phrase", "third phrase" }; -var requestOptions = new EmbeddingsOptions(input) -{ - Model = modelDeploymentName -}; - -Response response = embeddingsClient.Embed(requestOptions); -foreach (EmbeddingItem item in response.Value.Data) -{ - List embedding = item.Embedding.ToObjectFromJson>(); - Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); -} -``` - -Asynchronous sample: -```C# Snippet:ExtensionsEmbeddingAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("EMBEDDING_MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new AIProjectClient(connectionString); -EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); - -var input = new List { "first phrase", "second phrase", "third phrase" }; -var requestOptions = new EmbeddingsOptions(input) -{ - Model = modelDeploymentName -}; - -Response response = await embeddingsClient.EmbedAsync(requestOptions); -foreach (EmbeddingItem item in response.Value.Data) -{ - List embedding = item.Embedding.ToObjectFromJson>(); - Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); -} -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample1_Datasets.md b/sdk/ai/Azure.AI.Projects/samples/Sample1_Datasets.md new file mode 100644 index 000000000000..4e489a77765c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample1_Datasets.md @@ -0,0 +1,99 @@ +# Sample using Datasets in Azure.AI.Projects + +In this example, we will demonstrate how to upload files and folders to create new dataset versions, list and retrieve dataset versions, and delete them. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `DATASET_NAME`: The name of the dataset to retrieve. + +## Synchronous sample: +```C# Snippet:AI_Projects_DatasetsExampleSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Datasets datasets = projectClient.GetDatasetsClient(); + +Console.WriteLine("Uploading a single file to create Dataset version '1'..."); +var datasetResponse = datasets.UploadFile( + name: datasetName, + version: "1", + filePath: "sample_folder/sample_file1.txt" + ); +Console.WriteLine(datasetResponse); + +Console.WriteLine("Uploading folder to create Dataset version '2'..."); +datasetResponse = datasets.UploadFolder( + name: datasetName, + version: "2", + folderPath: "sample_folder" +); +Console.WriteLine(datasetResponse); + +Console.WriteLine("Retrieving Dataset version '1'..."); +DatasetVersion dataset = datasets.GetDataset(datasetName, "1"); +Console.WriteLine(dataset); + +Console.WriteLine($"Listing all versions for Dataset '{datasetName}':"); +foreach (var ds in datasets.GetVersions(datasetName)) +{ + Console.WriteLine(ds); +} + +Console.WriteLine($"Listing latest versions for all datasets:"); +foreach (var ds in datasets.GetDatasetVersions()) +{ + Console.WriteLine(ds); +} + +Console.WriteLine("Deleting Dataset versions '1' and '2'..."); +datasets.Delete(datasetName, "1"); +datasets.Delete(datasetName, "2"); +``` + + +## Asynchronous sample: +```C# Snippet:AI_Projects_DatasetsExampleAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Datasets datasets = projectClient.GetDatasetsClient(); + +Console.WriteLine("Uploading a single file to create Dataset version '1'..."); +var datasetResponse = datasets.UploadFile( + name: datasetName, + version: "1", + filePath: "sample_folder/sample_file1.txt" + ); +Console.WriteLine(datasetResponse); + +Console.WriteLine("Uploading folder to create Dataset version '2'..."); +datasetResponse = datasets.UploadFolder( + name: datasetName, + version: "2", + folderPath: "sample_folder" +); +Console.WriteLine(datasetResponse); + +Console.WriteLine("Retrieving Dataset version '1'..."); +DatasetVersion dataset = await datasets.GetDatasetAsync(datasetName, "1"); +Console.WriteLine(dataset); + +Console.WriteLine($"Listing all versions for Dataset '{datasetName}':"); +await foreach (var ds in datasets.GetVersionsAsync(datasetName)) +{ + Console.WriteLine(ds); +} + +Console.WriteLine($"Listing latest versions for all datasets:"); +await foreach (var ds in datasets.GetDatasetVersionsAsync()) +{ + Console.WriteLine(ds); +} + +Console.WriteLine("Deleting Dataset versions '1' and '2'..."); +await datasets.DeleteAsync(datasetName, "1"); +await datasets.DeleteAsync(datasetName, "2"); +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample20_Agents_Azure_AI_Search.md b/sdk/ai/Azure.AI.Projects/samples/Sample20_Agents_Azure_AI_Search.md deleted file mode 100644 index 7fac0531aee4..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample20_Agents_Azure_AI_Search.md +++ /dev/null @@ -1,246 +0,0 @@ -# Sample using agents with Azure AI Search tool in Azure.AI.Projects. - -Azure AI Search is an enterprise search system for high-performance applications. -It integrates with Azure OpenAI Service and Azure Machine Learning, offering advanced -search technologies like vector search and full-text search. Ideal for knowledge base -insights, information discovery, and automation. Creating an Agent with Azure AI -Search requires an existing Azure AI Search Index. For more information and setup -guides, see [Azure AI Search Tool Guide](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/azure-ai-search). -In this example we will use the existing Azure AI Search Index as a tool for an agent. - -1. First we need to create project client and read the environment variables, which will be used in the next steps. -```C# Snippet:AzureAISearchExample_CreateProjectClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); -``` - -2. Create an agent with `AzureAISearchToolDefinition` and `ToolResources` with the only member `AzureAISearchResource` to be able to perform search. We will use `ConnectionsClient` to find the Azure AI Search resource. - -Synchronous sample: -```C# Snippet:CreateAgentWithAzureAISearchTool_Sync -ListConnectionsResponse connections = projectClient.GetConnectionsClient().GetConnections(ConnectionType.AzureAISearch); - -if (connections?.Value == null || connections.Value.Count == 0) -{ - throw new InvalidOperationException("No connections found for the Azure AI Search."); -} - -ConnectionResponse connection = connections.Value[0]; - -AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple -); -ToolResources toolResource = new() -{ - AzureAISearch = searchResource -}; - -AgentsClient agentClient = projectClient.GetAgentsClient(); - -Agent agent = agentClient.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: toolResource); -``` - -Asynchronous sample: -```C# Snippet:CreateAgentWithAzureAISearchTool -ListConnectionsResponse connections = await projectClient.GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); - -if (connections?.Value == null || connections.Value.Count == 0) -{ - throw new InvalidOperationException("No connections found for the Azure AI Search."); -} - -ConnectionResponse connection = connections.Value[0]; - -AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple -); -ToolResources toolResource = new() -{ - AzureAISearch = searchResource -}; - -AgentsClient agentClient = projectClient.GetAgentsClient(); - -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ new AzureAISearchToolDefinition() ], - toolResources: toolResource); -``` - -3. Now we will create a `ThreadRun` and wait until it is complete. If the run will not be successful, we will print the last error. - -Synchronous sample: -```C# Snippet:AzureAISearchExample_CreateRun_Sync -// Create thread for communication -Response threadResponse = agentClient.CreateThread(); -AgentThread thread = threadResponse.Value; - -// Create message to thread -ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - -// Run the agent -Response runResponse = agentClient.CreateRun(thread, agent); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - runResponse = agentClient.GetRun(thread.Id, runResponse.Value.Id); -} -while (runResponse.Value.Status == RunStatus.Queued - || runResponse.Value.Status == RunStatus.InProgress); - -Assert.AreEqual( - RunStatus.Completed, - runResponse.Value.Status, - runResponse.Value.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:AzureAISearchExample_CreateRun -// Create thread for communication -Response threadResponse = await agentClient.CreateThreadAsync(); -AgentThread thread = threadResponse.Value; - -// Create message to thread -ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - -// Run the agent -ThreadRun run = await agentClient.CreateRunAsync(thread, agent); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -4. In our search we have used an index containing "embedding", "token", "category" and also "title" fields. This allowed us to get reference title and url. In the code below, we iterate messages in chronological order and replace the reference placeholders by url and title. - -Synchronous sample: -```C# Snippet:PopulateReferencesAgentWithAzureAISearchTool_Sync -PageableList messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" tools = [new FileSearchToolDefinition()]; -Agent agent = client.CreateAgent( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); - -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_CreateAgentAndThread_Async -List tools = [new FileSearchToolDefinition()]; -Agent agent = await client.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); - -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); -``` - -4. We need to create two methods to print out messages with the references: `WriteMessages` and `replaceReferences`. The last one replaces the placeholder in the message by the file name. -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_Print -private static void WriteMessages(IEnumerable messages, Dictionary fileIds) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) -{ - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); -} -``` - -5. Now we shell wait for run to complete and if it will fail, we shell print last error message, or print messages in chronological order if the run succeeds. To swap reference placeholders with the file names, we will build the map, correlating file IDs to file names. - -Synchronous sample: -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_ThreadRun -ThreadRun run = client.CreateRun( - thread.Id, - agent.Id -); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -// Build the map of file IDs to file names. -string after = null; -AgentPageableListOfVectorStoreFile storeFiles; -Dictionary dtFiles = []; -do -{ - storeFiles = client.GetVectorStoreFiles( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = client.GetFile(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } -} -while (storeFiles.HasMore); -WriteMessages(messages, dtFiles); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_ThreadRun_Async -ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id -); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -// Build the map of file IDs to file names. -string after = null; -AgentPageableListOfVectorStoreFile storeFiles; -Dictionary dtFiles = []; -do -{ - storeFiles = await client.GetVectorStoreFilesAsync( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = await client.GetFileAsync(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } -} -while (storeFiles.HasMore); -WriteMessages(messages, dtFiles); -``` - -6. Finally, we shell delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_Cleanup -VectorStoreDeletionStatus delStatus = client.DeleteVectorStore(vectorStore.Id); -if (delStatus.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:VectorStoreBatchEnterpriseFileSearch_Cleanup_Async -VectorStoreDeletionStatus delStatus = await client.DeleteVectorStoreAsync(vectorStore.Id); -if (delStatus.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample22_Agents_Azure_AI_Search_Streaming.md b/sdk/ai/Azure.AI.Projects/samples/Sample22_Agents_Azure_AI_Search_Streaming.md deleted file mode 100644 index 0d092daa836b..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample22_Agents_Azure_AI_Search_Streaming.md +++ /dev/null @@ -1,184 +0,0 @@ -# Sample using agents with Azure AI Search tool with streaming in Azure.AI.Projects. - -Azure AI Search is an enterprise search system for high-performance applications. -It integrates with Azure OpenAI Service and Azure Machine Learning, offering advanced -search technologies like vector search and full-text search. Ideal for knowledge base -insights, information discovery, and automation. Creating an Agent with Azure AI -Search requires an existing Azure AI Search Index. For more information and setup -guides, see [Azure AI Search Tool Guide](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/azure-ai-search). -In this example we will use the existing Azure AI Search Index as a tool for an agent in streaming scenario. - -1. First we need to create project client and read the environment variables, which will be used in the next steps. -```C# Snippet:AzureAISearchStreamingExample_CreateProjectClient -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); -``` - -2. Create an agent with `AzureAISearchToolDefinition` and `ToolResources` with the only member `AzureAISearchResource` to be able to perform search. We will use `ConnectionsClient` to find the Azure AI Search resource. - -Synchronous sample: -```C# Snippet:AzureAISearchStreamingExample_CreateTool -ListConnectionsResponse connections = projectClient.GetConnectionsClient().GetConnections(ConnectionType.AzureAISearch); - -if (connections?.Value == null || connections.Value.Count == 0) -{ - throw new InvalidOperationException("No connections found for the Azure AI Search."); -} - -ConnectionResponse connection = connections.Value[0]; - -AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple -); -ToolResources toolResource = new() -{ - AzureAISearch = searchResource -}; - -AgentsClient agentClient = projectClient.GetAgentsClient(); - -Agent agent = agentClient.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: toolResource); -``` - -Asynchronous sample: -```C# Snippet:AzureAISearchStreamingExample_CreateTool_Async -ListConnectionsResponse connections = await projectClient.GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); - -if (connections?.Value == null || connections.Value.Count == 0) -{ - throw new InvalidOperationException("No connections found for the Azure AI Search."); -} - -ConnectionResponse connection = connections.Value[0]; - -AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple -); -ToolResources toolResource = new() -{ - AzureAISearch = searchResource -}; - -AgentsClient agentClient = projectClient.GetAgentsClient(); - -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: toolResource); -``` - -3. Now we will create a `ThreadRun`. - -Synchronous sample: -```C# Snippet:AzureAISearchStreamingExample_CreateThread -// Create thread for communication -AgentThread thread = agentClient.CreateThread(); - -// Create message to thread -ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); -``` - -Asynchronous sample: -```C# Snippet:AzureAISearchStreamingExample_CreateThread_Async -// Create thread for communication -AgentThread thread = await agentClient.CreateThreadAsync(); - -// Create message to thread -ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); -``` - -4. In our search we have used an index containing "embedding", "token", "category" and also "title" fields. This allowed us to get reference title and url. In the code below, we iterate messages in chronological order and replace the reference placeholders by url and title. - -Synchronous sample: -```C# Snippet:AzureAISearchStreamingExample_PrintMessages -foreach (StreamingUpdate streamingUpdate in agentClient.CreateRunStreaming(thread.Id, agent.Id)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - if (contentUpdate.TextAnnotation != null) - { - Console.Write($" [see {contentUpdate.TextAnnotation.Title}] ({contentUpdate.TextAnnotation.Url})"); - } - else - { - //Detect the reference placeholder and skip it. Instead we will print the actual reference. - if (contentUpdate.Text[0] != (char)12304 || contentUpdate.Text[contentUpdate.Text.Length - 1] != (char)12305) - Console.Write(contentUpdate.Text); - } - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } -} -``` - -Asynchronous sample: -```C# Snippet:AzureAISearchStreamingExample_PrintMessages_Async -await foreach (StreamingUpdate streamingUpdate in agentClient.CreateRunStreamingAsync(thread.Id, agent.Id)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - if (contentUpdate.TextAnnotation != null) - { - Console.Write($" [see {contentUpdate.TextAnnotation.Title}] ({contentUpdate.TextAnnotation.Url})"); - } - else - { - //Detect the reference placeholder and skip it. Instead we will print the actual reference. - if (contentUpdate.Text[0] != (char)12304 || contentUpdate.Text[contentUpdate.Text.Length - 1] != (char)12305) - Console.Write(contentUpdate.Text); - } - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } -} -``` - -5. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:AzureAISearchStreamingExample_Cleanup -agentClient.DeleteThread(thread.Id); -agentClient.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:AzureAISearchStreamingExample_Cleanup_Async -await agentClient.DeleteThreadAsync(thread.Id); -await agentClient.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample23_Agent_Fabric.md b/sdk/ai/Azure.AI.Projects/samples/Sample23_Agent_Fabric.md deleted file mode 100644 index 848661b5dcfc..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample23_Agent_Fabric.md +++ /dev/null @@ -1,202 +0,0 @@ -# Sample for use of an Agent with Fabric tool in Azure.AI.Projects. - -To enable your Agent to perform search against a Fabric resource, you use `MicrosoftFabricToolDefinition` along with a connection. -1. First we need to create an Agent client and read the environment variables, which will be used in the next steps. - -```C# Snippet:Fabric_CreateProject -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var fabricConnectionName = System.Environment.GetEnvironmentVariable("FABRIC_CONNECTION_NAME"); - -var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - -AgentsClient agentClient = projectClient.GetAgentsClient(); -``` - -2. Next we will get the Fabric connection by name using connection client. This connection will be used to initialize the `MicrosoftFabricToolDefinition`. - -Synchronous sample: -```C# Snippet:Fabric_GetConnection -ConnectionResponse fabricConnection = projectClient.GetConnectionsClient().GetConnection(fabricConnectionName); -var connectionId = fabricConnection.Id; - -ToolConnectionList connectionList = new() -{ - ConnectionList = { new ToolConnection(connectionId) } -}; -MicrosoftFabricToolDefinition fabricTool = new(connectionList); -``` - -Asynchronous sample: -```C# Snippet:FabricAsync_GetConnection -ConnectionResponse fabricConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(fabricConnectionName); -var connectionId = fabricConnection.Id; - -ToolConnectionList connectionList = new() -{ - ConnectionList = { new ToolConnection(connectionId) } -}; -MicrosoftFabricToolDefinition fabricTool = new(connectionList); -``` - -3. We will use the `MicrosoftFabricToolDefinition` during the Agent initialization. - -Synchronous sample: -```C# Snippet:Fabric_CreateAgent -Agent agent = agentClient.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [fabricTool]); -``` - -Asynchronous sample: -```C# Snippet:FabricAsync_CreateAgent -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ fabricTool ]); -``` - -4. Now we will create the thread, add the message containing a question for the Agent and start the run. - -Synchronous sample: -```C# Snippet:Fabric_CreateThreadMessage -AgentThread thread = agentClient.CreateThread(); - -// Create message to thread -ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What are the top 3 weather events with highest property damage?"); - -// Run the agent -ThreadRun run = agentClient.CreateRun(thread, agent); -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = agentClient.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:FabricAsync_CreateThreadMessage -AgentThread thread = await agentClient.CreateThreadAsync(); - -// Create message to thread -ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What are the top 3 weather events with highest property damage?"); - -// Run the agent -ThreadRun run = await agentClient.CreateRunAsync(thread, agent); -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -5. Print the Agent messages to console in chronological order. - -Synchronous sample: -```C# Snippet:Fabric_Print -PageableList messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" "Seattle, WA"; -private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); -// Example of a function with a single required parameter -private string GetCityNickname(string location) => location switch -{ - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), -}; -private FunctionToolDefinition getCityNicknameTool = new( - name: "GetCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -// Example of a function with one required and one optional, enum parameter -private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch -{ - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() -}; -private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "GetWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); -``` - -3. Create Agent with the `FunctionToolDefinitions. - -Synchronous sample: -```C# Snippet:StreamingWithAutoFunctionCall_CreateAgent -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] -); -``` - -Asynchronous sample: -```C# Snippet:StreamingWithAutoFunctionCallAsync_CreateAgent -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] -); -``` - -4. Create `Thread` with the message. - -Synchronous sample: -```C# Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); -``` - -Asynchronous sample: -```C# Snippet:StreamingWithAutoFunctionCallAsync_CreateThreadMessage -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); -``` - -5. Setup `AutoFunctionCallOptions` with the function delegates above. -```C# Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls -List toolOutputs = new(); -Dictionary toolDelegates = new(); -toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); -toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); -toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); -AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); -``` - -6. Create a stream that will allow us to receive updates from the agent. With `autoFunctionCallOptions` as parameter, the functions will be called automatically when the agent needs to call them. The `StreamingUpdate` object will contain the results of the function calls. - -Synchronous sample: -```C# Snippet:StreamingWithAutoFunctionCall -CollectionResult stream = client.CreateRunStreaming(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions); -foreach (StreamingUpdate streamingUpdate in stream) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } -} -``` - -Asynchronous sample: -```C# Snippet:StreamingWithAutoFunctionCallAsync -await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) -{ - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } -} -``` - -7. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:StreamingWithAutoFunctionCall_Cleanup -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:StreamingWithAutoFunctionCallAsync_Cleanup -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample2_AzureOpenAI.md b/sdk/ai/Azure.AI.Projects/samples/Sample2_AzureOpenAI.md deleted file mode 100644 index 8353f5aece29..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample2_AzureOpenAI.md +++ /dev/null @@ -1,25 +0,0 @@ -# Sample for Azure.AI.Projects with AzureOpenAI chat extension. - -If `Azure.AI.Openai` package is installed, the project can use AzureOpenAI extension. - -Synchronous sample: -```C# Snippet:AzureOpenAISync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new AIProjectClient(connectionString); -ChatClient chatClient = client.GetAzureOpenAIChatClient(modelDeploymentName); - -ChatCompletion result = chatClient.CompleteChat("List all the rainbow colors"); -Console.WriteLine(result.Content[0].Text); -``` - -Asynchronous sample: -```C# Snippet:AzureOpenAIAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new AIProjectClient(connectionString); -ChatClient chatClient = client.GetAzureOpenAIChatClient(modelDeploymentName); - -ChatCompletion result = await chatClient.CompleteChatAsync("List all the rainbow colors"); -Console.WriteLine(result.Content[0].Text); -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample2_Deployments.md b/sdk/ai/Azure.AI.Projects/samples/Sample2_Deployments.md new file mode 100644 index 000000000000..69f0f4f62bec --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample2_Deployments.md @@ -0,0 +1,63 @@ +# Sample using Deployments in Azure.AI.Projects + +This sample demonstrates how to use the synchronous and asynchronous `.deployments` methods to enumerate AI models deployed to your AI Foundry Project. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `DEPLOYMENT_NAME`: The name of the deployment to retrieve. + - `MODEL_PUBLISHER`: The publisher of the model to filter by. + +## Synchronous Sample + +```C# Snippet:AI_Projects_DeploymentExampleSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +var modelPublisher = System.Environment.GetEnvironmentVariable("MODEL_PUBLISHER"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Deployments deployments = projectClient.GetDeploymentsClient(); + +Console.WriteLine("List all deployments:"); +foreach (var deployment in deployments.GetDeployments()) +{ + Console.WriteLine(deployment); +} + +Console.WriteLine($"List all deployments by the model publisher `{modelPublisher}`:"); +foreach (var deployment in deployments.GetDeployments(modelPublisher: modelPublisher)) +{ + Console.WriteLine(deployment); +} + +Console.WriteLine($"Get a single deployment named `{modelDeploymentName}`:"); +var deploymentDetails = deployments.GetDeployment(modelDeploymentName); +Console.WriteLine(deploymentDetails); +``` + +## Asynchronous Sample + +```C# Snippet:AI_Projects_DeploymentExampleAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("DEPLOYMENT_NAME"); +var modelPublisher = System.Environment.GetEnvironmentVariable("MODEL_PUBLISHER"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Deployments deployments = projectClient.GetDeploymentsClient(); + +Console.WriteLine("List all deployments:"); +await foreach (var deployment in deployments.GetDeploymentsAsync()) +{ + Console.WriteLine(deployment); +} + +Console.WriteLine($"List all deployments by the model publisher `{modelPublisher}`:"); +await foreach (var deployment in deployments.GetDeploymentsAsync(modelPublisher: modelPublisher)) +{ + Console.WriteLine(deployment); +} + +Console.WriteLine($"Get a single deployment named `{modelDeploymentName}`:"); +var deploymentDetails = deployments.GetDeploymentAsync(modelDeploymentName); +Console.WriteLine(deploymentDetails); +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample3_Connection.md b/sdk/ai/Azure.AI.Projects/samples/Sample3_Connection.md deleted file mode 100644 index 467c5a680578..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample3_Connection.md +++ /dev/null @@ -1,83 +0,0 @@ -# Sample for Azure.AI.Projects with `ConnectionClient` - -In this example we will demonstrate getting the `Serverless` connection to the Azure OpenAI or GIT endpoint, and using chat completion model, deployed on this endpoint. Please note, this example requires the connection to be authenticated in Azure AI Foundry using `ApiKey`. - -Synchronous sample: -```C# Snippet:ConnectionExampleSync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new(connectionString, new DefaultAzureCredential()); -ConnectionsClient connectionsClient = client.GetConnectionsClient(); - -ConnectionResponse connection = connectionsClient.GetDefaultConnection(ConnectionType.Serverless, true); - -if (connection.Properties.AuthType == AuthenticationType.ApiKey) -{ - var apiKeyAuthProperties = connection.Properties as ConnectionPropertiesApiKeyAuth; - if (string.IsNullOrWhiteSpace(apiKeyAuthProperties.Target)) - { - throw new ArgumentException("The API key authentication target URI is missing or invalid."); - } - - if (!Uri.TryCreate(apiKeyAuthProperties.Target, UriKind.Absolute, out var endpoint)) - { - throw new UriFormatException("Invalid URI format in API key authentication target."); - } - - var credential = new AzureKeyCredential(apiKeyAuthProperties.Credentials.Key); - ChatCompletionsClient chatClient = new(endpoint, credential); - - var requestOptions = new ChatCompletionsOptions() - { - Messages = - { - new ChatRequestSystemMessage("You are a helpful assistant."), - new ChatRequestUserMessage("How many feet are in a mile?"), - }, - Model = modelDeploymentName - }; - - ChatCompletions response = chatClient.Complete(requestOptions); - Console.WriteLine(response.Content); -} -``` - -Asynchronous sample: -```C# Snippet:ConnectionExampleAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -AIProjectClient client = new(connectionString, new DefaultAzureCredential()); -ConnectionsClient connectionsClient = client.GetConnectionsClient(); - -ConnectionResponse connection = await connectionsClient.GetDefaultConnectionAsync(ConnectionType.Serverless, true); - -if (connection.Properties.AuthType == AuthenticationType.ApiKey) -{ - var apiKeyAuthProperties = connection.Properties as ConnectionPropertiesApiKeyAuth; - if (string.IsNullOrWhiteSpace(apiKeyAuthProperties.Target)) - { - throw new ArgumentException("The API key authentication target URI is missing or invalid."); - } - - if (!Uri.TryCreate(apiKeyAuthProperties.Target, UriKind.Absolute, out var endpoint)) - { - throw new UriFormatException("Invalid URI format in API key authentication target."); - } - - var credential = new AzureKeyCredential(apiKeyAuthProperties.Credentials.Key); - ChatCompletionsClient chatClient = new(endpoint, credential); - - var requestOptions = new ChatCompletionsOptions() - { - Messages = - { - new ChatRequestSystemMessage("You are a helpful assistant."), - new ChatRequestUserMessage("How many feet are in a mile?"), - }, - Model = modelDeploymentName - }; - - ChatCompletions response = await chatClient.CompleteAsync(requestOptions); - Console.WriteLine(response.Content); -} -``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample3_Connections.md b/sdk/ai/Azure.AI.Projects/samples/Sample3_Connections.md new file mode 100644 index 000000000000..4ed132ddb4e0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample3_Connections.md @@ -0,0 +1,84 @@ +# Sample using `Connections` in Azure.AI.Projects + +In this example, we will demonstrate listing and retrieving connections using the `Connections` client in `Azure.AI.Projects`. This includes listing all connections, filtering by connection type, and retrieving specific connection details. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `CONNECTION_NAME`: The name of the connection to retrieve. + +## Synchronous sample: +```C# Snippet:AI_Projects_ConnectionsExampleSync +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var connectionName = Environment.GetEnvironmentVariable("CONNECTION_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Connections connectionsClient = projectClient.GetConnectionsClient(); + +Console.WriteLine("List the properties of all connections:"); +foreach (var connection in connectionsClient.GetConnections()) +{ + Console.WriteLine(connection); + Console.Write(connection.Name); +} + +Console.WriteLine("List the properties of all connections of a particular type (e.g., Azure OpenAI connections):"); +foreach (var connection in connectionsClient.GetConnections(connectionType: ConnectionType.AzureOpenAI)) +{ + Console.WriteLine(connection); +} + +Console.WriteLine($"Get the properties of a connection named `{connectionName}`:"); +var specificConnection = connectionsClient.Get(connectionName, includeCredentials: false); +Console.WriteLine(specificConnection); + +Console.WriteLine("Get the properties of a connection with credentials:"); +var specificConnectionCredentials = connectionsClient.Get(connectionName, includeCredentials: true); +Console.WriteLine(specificConnectionCredentials); + +Console.WriteLine($"Get the properties of the default connection:"); +var defaultConnection = connectionsClient.GetDefault(includeCredentials: false); +Console.WriteLine(defaultConnection); + +Console.WriteLine($"Get the properties of the default connection with credentials:"); +var defaultConnectionCredentials = connectionsClient.GetDefault(includeCredentials: true); +Console.WriteLine(defaultConnectionCredentials); +``` + +## Asynchronous sample: +```C# Snippet:AI_Projects_ConnectionsExampleAsync +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var connectionName = Environment.GetEnvironmentVariable("CONNECTION_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Connections connectionsClient = projectClient.GetConnectionsClient(); + +Console.WriteLine("List the properties of all connections:"); +await foreach (var connection in connectionsClient.GetConnectionsAsync()) +{ + Console.WriteLine(connection); + Console.Write(connection.Name); +} + +Console.WriteLine("List the properties of all connections of a particular type (e.g., Azure OpenAI connections):"); +await foreach (var connection in connectionsClient.GetConnectionsAsync(connectionType: ConnectionType.AzureOpenAI)) +{ + Console.WriteLine(connection); +} + +Console.WriteLine($"Get the properties of a connection named `{connectionName}`:"); +var specificConnection = await connectionsClient.GetAsync(connectionName, includeCredentials: false); +Console.WriteLine(specificConnection); + +Console.WriteLine("Get the properties of a connection with credentials:"); +var specificConnectionCredentials = await connectionsClient.GetAsync(connectionName, includeCredentials: true); +Console.WriteLine(specificConnectionCredentials); + +Console.WriteLine($"Get the properties of the default connection:"); +var defaultConnection = await connectionsClient.GetDefaultAsync(includeCredentials: false); +Console.WriteLine(defaultConnection); + +Console.WriteLine($"Get the properties of the default connection with credentials:"); +var defaultConnectionCredentials = await connectionsClient.GetDefaultAsync(includeCredentials: true); +Console.WriteLine(defaultConnectionCredentials); +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample4_Indexes.md b/sdk/ai/Azure.AI.Projects/samples/Sample4_Indexes.md new file mode 100644 index 000000000000..10dc0891255c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample4_Indexes.md @@ -0,0 +1,62 @@ +# Sample using `Indexes` in Azure.AI.Projects + +This sample demonstrates how to use the synchronous and asynchronous `.indexes` methods. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `INDEX_NAME`: The name of the index to create. + - `INDEX_VERSION`: The version of the index to create. + - `AI_SEARCH_CONNECTION_NAME`: The name of the AI Search Connection to use. + - `AI_SEARCH_INDEX_NAME`: The name of the AI Search Index to use. + +## Synchronous Sample + +```C# Snippet:AI_Projects_IndexesExampleSync +var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var indexName = Environment.GetEnvironmentVariable("INDEX_NAME") ?? "my-index"; +var indexVersion = Environment.GetEnvironmentVariable("INDEX_VERSION") ?? "1.0"; +var aiSearchConnectionName = Environment.GetEnvironmentVariable("AI_SEARCH_CONNECTION_NAME") ?? "my-ai-search-connection-name"; +var aiSearchIndexName = Environment.GetEnvironmentVariable("AI_SEARCH_INDEX_NAME") ?? "my-ai-search-index-name"; +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); +Indexes indexesClient = projectClient.GetIndexesClient(); + +RequestContent content = RequestContent.Create(new +{ + connectionName = aiSearchConnectionName, + indexName = aiSearchIndexName, + indexVersion = indexVersion, + type = "AzureSearch", + description = "Sample Index for testing", + displayName = "Sample Index" +}); + +Console.WriteLine($"Create an Index named `{indexName}` referencing an existing AI Search resource:"); +var index = indexesClient.CreateOrUpdate( + name: indexName, + version: indexVersion, + content: content +); +Console.WriteLine(index); + +Console.WriteLine($"Get an existing Index named `{indexName}`, version `{indexVersion}`:"); +var retrievedIndex = indexesClient.GetIndex(name: indexName, version: indexVersion); +Console.WriteLine(retrievedIndex); + +Console.WriteLine($"Listing all versions of the Index named `{indexName}`:"); +foreach (var version in indexesClient.GetVersions(name: indexName)) +{ + Console.WriteLine(version); +} + +Console.WriteLine($"Listing all Indices:"); +foreach (var version in indexesClient.GetIndices()) +{ + Console.WriteLine(version); +} + +Console.WriteLine("Delete the Index version created above:"); +indexesClient.Delete(name: indexName, version: indexVersion); +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample4_Search.md b/sdk/ai/Azure.AI.Projects/samples/Sample4_Search.md deleted file mode 100644 index 2a5f7c86c60f..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample4_Search.md +++ /dev/null @@ -1,39 +0,0 @@ -# Sample for Azure.AI.Projects with Search extension - -In this example we will demonstrate how to use Azure AI Search resource using `Azure.Search.Documents` extension. To run this sample we will need the index named "index" with fields "HotelId", containing just a number in string format and "HotelName", containing hotel name, this field needs to be searchable. Please create the index following the [instructions](https://learn.microsoft.com/azure/ai-services/agents/how-to/tools/azure-ai-search). -In the example we will - - Get the search client - - Perform search - - And, finally, iterate over results and print them - -Synchronous sample: -```C# Snippet:ExtensionsSearch -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -AIProjectClient client = new(connectionString); -SearchClient searchClient = client.GetSearchClient("index"); - -SearchResults response = searchClient.Search("luxury hotel"); -foreach (SearchResult result in response.GetResults()) -{ - SearchDocument doc = result.Document; - string id = (string)doc["HotelId"]; - string name = (string)doc["HotelName"]; - Console.WriteLine($"{id}: {name}"); -} -``` - -Asynchronous sample: -```C# Snippet:ExtensionsSearchAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -AIProjectClient client = new(connectionString); -SearchClient searchClient = client.GetSearchClient("index"); - -SearchResults response = await searchClient.SearchAsync("luxury hotel"); -await foreach (SearchResult result in response.GetResultsAsync()) -{ - SearchDocument doc = result.Document; - string id = (string)doc["HotelId"]; - string name = (string)doc["HotelName"]; - Console.WriteLine($"{id}: {name}"); -} -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample5_Evaluations.md b/sdk/ai/Azure.AI.Projects/samples/Sample5_Evaluations.md new file mode 100644 index 000000000000..9f3b98fac18b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample5_Evaluations.md @@ -0,0 +1,100 @@ +# Sample using `Evaluations` in Azure.AI.Projects + +In this example, we will demonstrate creating, listing and retrieving evaluations using the `Evaluations` client in `Azure.AI.Projects`. This uses a Dataset as the input data for the evaluation and an Evaluator ID for the evaluation type. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `DATASET_NAME`: The name of the dataset to use as input data. + +## Synchronous sample: +```C# Snippet:AI_Projects_EvaluationsExampleSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + +// TODO: Uncomment once datasets are supported, will need to replace UploadFileAndCreate with new function name +//Console.WriteLine("Upload a single file and create a new Dataset to reference the file. Here we explicitly specify the dataset version."); +//DatasetVersion dataset = projectClient.GetDatasetsClient().UploadFileAndCreate( +// name: datasetName, +// version: "1", +// filePath: "./sample_folder/sample_data_evaluation.jsonl" +// ); +//Console.WriteLine(dataset); + +Console.WriteLine("Create an evaluation"); +Evaluations evaluations = projectClient.GetEvaluationsClient(); + +var evaluatorConfig = new EvaluatorConfiguration( + id: EvaluatorIDs.Relevance // TODO: Update this to use the correct evaluator ID +); +evaluatorConfig.InitParams.Add("deployment_name", BinaryData.FromObjectAsJson("gpt-4o")); + +Evaluation evaluation = new Evaluation( + data: new InputDataset(""), // TODO: Update this to use the correct dataset ID + evaluators: new Dictionary { { "relevance", evaluatorConfig } } +); +evaluation.DisplayName = "Sample Evaluation"; +evaluation.Description = "Sample evaluation for testing"; // TODO: Make optional once bug 4115256 is fixed + +Console.WriteLine("Create the evaluation run"); +Evaluation evaluationResponse = evaluations.Create(evaluation: evaluation); +Console.WriteLine(evaluationResponse); + +Console.WriteLine("Get evaluation"); +Evaluation getEvaluationResponse = evaluations.GetEvaluation(evaluationResponse.Name); +Console.WriteLine(getEvaluationResponse); + +Console.WriteLine("List evaluations"); +foreach (var eval in evaluations.GetEvaluations()) +{ + Console.WriteLine(eval); +} +``` + +## Asynchronous sample: +```C# Snippet:AI_Projects_EvaluationsExampleAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + +// TODO: Uncomment once datasets are supported, will need to replace UploadFileAndCreate with new function name +//Console.WriteLine("Upload a single file and create a new Dataset to reference the file. Here we explicitly specify the dataset version."); +//DatasetVersion dataset = projectClient.GetDatasetsClient().UploadFileAndCreate( +// name: datasetName, +// version: "1", +// filePath: "./sample_folder/sample_data_evaluation.jsonl" +// ); +//Console.WriteLine(dataset); + +Console.WriteLine("Create an evaluation"); +Evaluations evaluations = projectClient.GetEvaluationsClient(); + +var evaluatorConfig = new EvaluatorConfiguration( + id: EvaluatorIDs.Relevance // TODO: Update this to use the correct evaluator ID +); +evaluatorConfig.InitParams.Add("deploymentName", BinaryData.FromObjectAsJson("gpt-4o")); + +Evaluation evaluation = new Evaluation( + data: new InputDataset(""), // TODO: Update this to use the correct dataset ID + evaluators: new Dictionary { { "relevance", evaluatorConfig } } +); +evaluation.DisplayName = "Sample Evaluation"; +evaluation.Description = "Sample evaluation for testing"; // TODO: Make optional once bug 4115256 is fixed + +Console.WriteLine("Create the evaluation run"); +Evaluation evaluationResponse = await evaluations.CreateAsync(evaluation: evaluation); +Console.WriteLine(evaluationResponse); + +Console.WriteLine("Get evaluation"); +Evaluation getEvaluationResponse = await evaluations.GetEvaluationAsync(evaluationResponse.Name); +Console.WriteLine(getEvaluationResponse); + +Console.WriteLine("List evaluations"); +await foreach (var eval in evaluations.GetEvaluationsAsync()) +{ + Console.WriteLine(eval); +} +``` diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample5_Sample_Agent_Additional_messages.md b/sdk/ai/Azure.AI.Projects/samples/Sample5_Sample_Agent_Additional_messages.md deleted file mode 100644 index 9d385c4bc524..000000000000 --- a/sdk/ai/Azure.AI.Projects/samples/Sample5_Sample_Agent_Additional_messages.md +++ /dev/null @@ -1,147 +0,0 @@ -# Sample for using additional messages while creating agent run in Azure.AI.Projects. - -1. Create project client and use it to create and an agent. - -Synchronous sample: -```C# Snippet:Sample_Agent_Multiple_Messages_Create -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var projectClient = new AIProjectClient( - connectionString, - new DefaultAzureCredential()); -var agentClient = projectClient.GetAgentsClient(); - -Agent agent = agentClient.CreateAgent( - model: modelDeploymentName, - name: "Math Tutor", - instructions: "You are a personal electronics tutor. Write and run code to answer questions.", - tools: [new CodeInterpreterToolDefinition()]); -``` - -Asynchronous sample: -```C# Snippet:Sample_Agent_Multiple_Messages_CreateAsync -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var projectClient = new AIProjectClient( - connectionString, - new DefaultAzureCredential()); -var agentClient = projectClient.GetAgentsClient(); - -Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "Math Tutor", - instructions: "You are a personal electronics tutor. Write and run code to answer questions.", - tools: [new CodeInterpreterToolDefinition()]); -``` - -2. Create the thread and run. In this example we are adding two extra messages to the thread, one with `Agent` and another with `User` role. - -Synchronous sample: -```C# Snippet:Sample_Agent_Multiple_Messages_Run -AgentThread thread = agentClient.CreateThread(); -ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What is the impedance formula?"); - -ThreadRun agentRun = agentClient.CreateRun( - threadId: thread.Id, - agent.Id, - additionalMessages: [ - new ThreadMessageOptions( - role: MessageRole.Agent, - content: "E=mc^2" - ), - new ThreadMessageOptions( - role: MessageRole.User, - content: "What is the impedance formula?" - ), - ] -); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - agentRun = agentClient.GetRun(thread.Id, agentRun.Id); -} -while (agentRun.Status == RunStatus.Queued - || agentRun.Status == RunStatus.InProgress); -``` - -Asynchronous sample: -```C# Snippet:Sample_Agent_Multiple_Messages_RunAsync -AgentThread thread = await agentClient.CreateThreadAsync(); -ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the impedance formula?"); - -ThreadRun agentRun = await agentClient.CreateRunAsync( - threadId: thread.Id, - agent.Id, - additionalMessages: [ - new ThreadMessageOptions( - role: MessageRole.Agent, - content: "E=mc^2" - ), - new ThreadMessageOptions( - role: MessageRole.User, - content: "What is the impedance formula?" - ), - ] -); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - agentRun = await agentClient.GetRunAsync(thread.Id, agentRun.Id); -} -while (agentRun.Status == RunStatus.Queued - || agentRun.Status == RunStatus.InProgress); -``` - -3. Finally, we print out all the messages to the console. - -Synchronous sample: -```C# Snippet:Sample_Agent_Multiple_Messages_Print -PageableList messages = agentClient.GetMessages(thread.Id, order: ListSortOrder.Ascending); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await agentClient.GetMessagesAsync(thread.Id, order:ListSortOrder.Ascending); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages + = agentsClient.Messages.GetMessagesAsync( + threadId: thread.Id, order: ListSortOrder.Ascending); + +await foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" messagesList = [.. agentsClient.Messages.GetMessages(thread.Id)]; +Assert.AreEqual(message.Id, messagesList[0].Id); + +// Step 4: Run the agent +ThreadRun run = agentsClient.Runs.CreateRun( + thread.Id, + agent.Id, + additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); +do +{ + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentsClient.Runs.GetRun(thread.Id, run.Id); +} +while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); +Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + +Pageable messages + = agentsClient.Messages.GetMessages( + threadId: thread.Id, order: ListSortOrder.Ascending); + +foreach (PersistentThreadMessage threadMessage in messages) +{ + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" _logger; - - public Foo(ILogger logger) - { - _logger = logger; - } - - [Function("Foo")] - public void Run([QueueTrigger("azure-function-foo-input")] Arguments input, FunctionContext executionContext) - { - var logger = executionContext.GetLogger("Foo"); - logger.LogInformation("C# Queue function processed a request."); - - // We have to provide the Managed identity for function resource - // and allow this identity a Queue Data Contributor role on the storage account. - var cred = new DefaultAzureCredential(); - var queueClient = new QueueClient(new Uri(input.OutputQueueUri), cred, - new QueueClientOptions { MessageEncoding = QueueMessageEncoding.Base64 }); - - var response = new Response - { - Value = "Bar", - // Important! Correlation ID must match the input correlation ID. - CorrelationId = input.CorrelationId - }; - - var jsonResponse = JsonSerializer.Serialize(response); - queueClient.SendMessage(jsonResponse); - } - } -} -``` - -In this code we define function input and output class: `Arguments` and `Response` respectively. These two data classes will be serialized in JSON. It is important that these both contain field `CorrelationId`, which is the same between input and output. - -In our example the function will be stored in the storage account, created with the AI hub. For that we need to allow key access to that storage. In Azure portal go to Storage account > Settings > Configuration and set "Allow storage account key access" to Enabled. If it is not done, the error will be displayed "The remote server returned an error: (403) Forbidden." To create the function resource that will host our function, install azure-cli python package and run the next command: - -```shell -pip install -U azure-cli -az login -az functionapp create --resource-group your-resource-group --consumption-plan-location region --runtime dotnet-isolated --functions-version 4 --name function_name --storage-account storage_account_already_present_in_resource_group --app-insights existing_or_new_application_insights_name -``` - -This function writes data to the output queue and hence needs to be authenticated to Azure, so we will need to assign the function system identity and provide it `Storage Queue Data Contributor`. To do that in Azure portal select the function, located in `your-resource-group` resource group and in Settings>Identity, switch it on and click Save. After that assign the `Storage Queue Data Contributor` permission on storage account used by our function (`storage_account_already_present_in_resource_group` in the script above) for just assigned System Managed identity. - -Now we will create the function itself. Install [.NET](https://dotnet.microsoft.com/download) and [Core Tools](https://go.microsoft.com/fwlink/?linkid=2174087) and create the function project using next commands. -``` -func init FunctionProj --worker-runtime dotnet-isolated --target-framework net8.0 -cd FunctionProj -func new --name foo --template "HTTP trigger" --authlevel "anonymous" -dotnet add package Azure.Identity -dotnet add package Microsoft.Azure.Functions.Worker.Extensions.Storage.Queues --prerelease -``` - -**Note:** There is a "Azure Queue Storage trigger", however the attempt to use it results in error for now. -We have created a project, containing HTTP-triggered azure function with the logic in `Foo.cs` file. As far as we need to trigger Azure function by a new message in the queue, we will replace the content of a Foo.cs by the C# sample code above. -To deploy the function run the command from dotnet project folder: - -``` -func azure functionapp publish function_name -``` - -In the `storage_account_already_present_in_resource_group` select the `Queue service` and create two queues: `azure-function-foo-input` and `azure-function-tool-output`. Note that the same queues are used in our sample. To check that the function is working, place the next message into the `azure-function-foo-input` and replace `storage_account_already_present_in_resource_group` by the actual resource group name, or just copy the output queue address. -```json -{ - "OutputQueueUri": "https://storage_account_already_present_in_resource_group.queue.core.windows.net/azure-function-tool-output", - "CorrelationId": "42" -} -``` - -Next, we will monitor the output queue or the message. You should receive the next message. -```json -{ - "Value": "Bar", - "CorrelationId": "42" -} -``` -Please note that the input `CorrelationId` is the same as output. -*Hint:* Place multiple messages to input queue and keep second internet browser window with the output queue open and hit the refresh button on the portal user interface, so that you will not miss the message. If the message instead went to `azure-function-foo-input-poison` queue, the function completed with error, please check your setup. -After we have tested the function and made sure it works, please make sure that the Azure AI Project have the next roles for the storage account: `Storage Account Contributor`, `Storage Blob Data Contributor`, `Storage File Data Privileged Contributor`, `Storage Queue Data Contributor` and `Storage Table Data Contributor`. Now the function is ready to be used by the agent. - -In the example below we are calling function "foo", which responds "Bar". -1. We create `AzureFunctionToolDefinition` object, with the function name, description, input and output queues, followed by function parameters. Plus we need to read in environment variables to get necessary parameters. -```C# Snippet:AzureFunctionsDefineFunctionTools -var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -var storageQueueUri = System.Environment.GetEnvironmentVariable("STORAGE_QUEUE_URI"); - -AgentsClient client = new(connectionString, new DefaultAzureCredential()); - -AzureFunctionToolDefinition azureFnTool = new( - name: "foo", - description: "Get answers from the foo bot.", - inputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-foo-input", - storageServiceEndpoint: storageQueueUri - ) - ), - outputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-tool-output", - storageServiceEndpoint: storageQueueUri - ) - ), - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - query = new - { - Type = "string", - Description = "The question to ask.", - }, - outputqueueuri = new - { - Type = "string", - Description = "The full output queue uri." - } - }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ) -); -``` - -2. Next we need to create an agent. Note that in this scenario we are asking agent to supply storage queue URI to the azure function whenever it is called. - -Synchronous sample: -```C# Snippet:AzureFunctionsCreateAgentWithFunctionToolsSync -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful support agent. Use the provided function any " - + "time the prompt contains the string 'What would foo say?'. When you invoke " - + "the function, ALWAYS specify the output queue uri parameter as " - + $"'{storageQueueUri}/azure-function-tool-output'. Always responds with " - + "\"Foo says\" and then the response from the tool.", - tools: [azureFnTool] - ); -``` - -Asynchronous sample: -```C# Snippet:AzureFunctionsCreateAgentWithFunctionTools -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful support agent. Use the provided function any " - + "time the prompt contains the string 'What would foo say?'. When you invoke " - + "the function, ALWAYS specify the output queue uri parameter as " - + $"'{storageQueueUri}/azure-function-tool-output'. Always responds with " - + "\"Foo says\" and then the response from the tool.", - tools: [ azureFnTool ] - ); -``` - -3. After we have created a message with request to ask "What would foo say?", we need to wait while the run is in queued, in progress or requires action states. - -Synchronous sample: -```C# Snippet:AzureFunctionsHandlePollingWithRequiredActionSync -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What is the most prevalent element in the universe? What would foo say?"); - -ThreadRun run = client.CreateRun(thread, agent); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:AzureFunctionsHandlePollingWithRequiredAction -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the most prevalent element in the universe? What would foo say?"); - -ThreadRun run = await client.CreateRunAsync(thread, agent); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -4. Finally, we will print out the messages to the console in chronological order. - -Synchronous sample: -```C# Snippet:AzureFunctionsPrintSync -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages - = client.GetMessages( - threadId: thread.Id, order: ListSortOrder.Ascending); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages - = await client.GetMessagesAsync( - threadId: thread.Id, order: ListSortOrder.Ascending); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); - -foreach (ThreadMessage threadMessage in messages) -{ - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" tools = [new FileSearchToolDefinition()]; -Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); -``` - -Asynchronous sample: -```C# Snippet:CreateVectorStoreBlob -var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset -); -VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store", - storeConfiguration: new VectorStoreConfiguration( - dataSources: [ ds ] - ) -); - -FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - -List tools = [new FileSearchToolDefinition()]; -Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } -); -``` - -3. In this example we will ask a question to the file contents and add it to the thread; we will create run and wait while it will terminate. - -Synchronous sample: -```C# Snippet:EnterpriseFileSearch_CreateThreadMessage -AgentThread thread = client.CreateThread(); - -ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" -); - -ThreadRun run = client.CreateRun( - thread.Id, - agent.Id -); - -do -{ - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -Asynchronous sample: -```C# Snippet:EnterpriseFileSearchAsync_CreateThreadMessage -AgentThread thread = await client.CreateThreadAsync(); - -ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - -ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id -); - -do -{ - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); -} -while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); -Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); -``` - -4. When we create `VectorStore`, it ingests the contents of the Azure Blob, provided in the `VectorStoreDataSource` object and associates it with File ID. To provide the file name we will need to get the file name by ID, which in our case will be Azure Resource ID and take its last segment. - -Synchronous sample: -```C# Snippet:EnterpriseFileSearch_ListUpdatedMessages -PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -// Build the map of file IDs to file names. -string after = null; -AgentPageableListOfVectorStoreFile storeFiles; -Dictionary dtFiles = []; -do -{ - storeFiles = client.GetVectorStoreFiles( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = client.GetFile(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } -} -while (storeFiles.HasMore); -WriteMessages(messages, dtFiles); -``` - -Asynchronous sample: -```C# Snippet:EnterpriseFileSearchAsync_ListUpdatedMessages -PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending -); -// Build the map of file IDs to file names. -string after = null; -AgentPageableListOfVectorStoreFile storeFiles; -Dictionary dtFiles = []; -do -{ - storeFiles = await client.GetVectorStoreFilesAsync( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = await client.GetFileAsync(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } -} -while (storeFiles.HasMore); -WriteMessages(messages, dtFiles); -``` - -5. To properly render the links to the file name we use the `WriteMessages` method, which internally calls `replaceReferences` method to replace reference placeholders by file IDs or by file names. -```C# Snippet:EnterpriseFileSearch_WriteMessages -private static void WriteMessages(IEnumerable messages, Dictionary fileIds) -{ - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) -{ - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); -} -``` - -6. Finally, we delete all the resources, we have created in this sample. - -Synchronous sample: -```C# Snippet:EnterpriseFileSearch_Cleanup -VectorStoreDeletionStatus delTask = client.DeleteVectorStore(vectorStore.Id); -if (delTask.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -client.DeleteThread(thread.Id); -client.DeleteAgent(agent.Id); -``` - -Asynchronous sample: -```C# Snippet:EnterpriseFileSearchAsync_Cleanup -VectorStoreDeletionStatus delTask = await client.DeleteVectorStoreAsync(vectorStore.Id); -if (delTask.Deleted) -{ - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); -} -else -{ - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); -} -await client.DeleteThreadAsync(thread.Id); -await client.DeleteAgentAsync(agent.Id); -``` \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/samples/Sample9_InferenceChatClient.md b/sdk/ai/Azure.AI.Projects/samples/Sample9_InferenceChatClient.md new file mode 100644 index 000000000000..38d70b7b6e43 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/samples/Sample9_InferenceChatClient.md @@ -0,0 +1,51 @@ +# Sample using `Chat Completion` in Azure.AI.Projects + +This sample demonstrates how to use the synchronous and asynchronous `GetChatCompletionsClient()` method. + +## Prerequisites + +- Install the Azure.AI.Projects package. +- Set the following environment variables: + - `PROJECT_ENDPOINT`: The Azure AI Project endpoint, as found in the overview page of your Azure AI Foundry project. + - `MODEL_DEPLOYMENT_NAME`: The name of the deployment to retrieve. + +## Synchronous Sample + +```C# Snippet:AI_Projects_ChatClientSync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); + +var requestOptions = new ChatCompletionsOptions() +{ + Messages = + { + new ChatRequestSystemMessage("You are a helpful assistant."), + new ChatRequestUserMessage("How many feet are in a mile?"), + }, + Model = modelDeploymentName +}; +Response response = chatClient.Complete(requestOptions); +Console.WriteLine(response.Value.Content); +``` +## Asynchronous Sample + +```C# Snippet:AI_Projects_ChatClientAsync +var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); +ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); + +var requestOptions = new ChatCompletionsOptions() +{ + Messages = + { + new ChatRequestSystemMessage("You are a helpful assistant."), + new ChatRequestUserMessage("How many feet are in a mile?"), + }, + Model = modelDeploymentName +}; +Response response = await chatClient.CompleteAsync(requestOptions); +Console.WriteLine(response.Value.Content); +``` 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 9d8185c083be..8d5811164bdb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj +++ b/sdk/ai/Azure.AI.Projects/src/Azure.AI.Projects.csproj @@ -2,7 +2,7 @@ This is the Azure.AI.Projects client library for developing .NET applications with rich experience. Microsoft Azure.AI.Projects client library - 1.0.0-beta.9 + 1.0.0-beta.10 Azure.AI.Projects true $(RequiredTargetFrameworks) @@ -14,8 +14,10 @@ - + + + diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs index a532a739175c..c25709abc834 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs @@ -15,7 +15,6 @@ namespace Azure.AI.Projects public partial class AIProjectClient : ClientConnectionProvider { private readonly ConnectionCacheManager _cacheManager; - private readonly ConnectionsClient _connectionsClient; /// Initializes a new instance of AIProjectClient for mocking. protected AIProjectClient() : base(maxCacheSize: 100) @@ -23,48 +22,32 @@ protected AIProjectClient() : base(maxCacheSize: 100) } /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// /// A credential used to authenticate to an Azure Service. - /// is null. - /// - public AIProjectClient(string connectionString, TokenCredential credential = null) : this(connectionString, BuildCredential(credential), new AIProjectClientOptions()) - { - } - - /// - /// Initializes a new instance of AzureAIClient. - /// - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// is null. - /// is an empty string. - public AIProjectClient(string connectionString, TokenCredential credential, AIProjectClientOptions options) - : this(new Uri(ClientHelper.ParseConnectionString(connectionString, "endpoint")), - ClientHelper.ParseConnectionString(connectionString, "subscriptionId"), - ClientHelper.ParseConnectionString(connectionString, "ResourceGroupName"), - ClientHelper.ParseConnectionString(connectionString, "ProjectName"), - credential, - options) + /// is null. + public AIProjectClient(Uri endpoint, TokenCredential credential = null) : this(endpoint, BuildCredential(credential), new AIProjectClientOptions()) { } /// Initializes a new instance of AIProjectClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// /// A credential used to authenticate to an Azure Service. /// The options for configuring the client. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public AIProjectClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AIProjectClientOptions options) + /// or is null. + public AIProjectClient(Uri endpoint, TokenCredential credential, AIProjectClientOptions options) : base(options.ClientCacheSize) { Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); Argument.AssertNotNull(credential, nameof(credential)); options ??= new AIProjectClientOptions(); @@ -72,12 +55,8 @@ public AIProjectClient(Uri endpoint, string subscriptionId, string resourceGroup _tokenCredential = credential; _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _connectionsClient = GetConnectionsClient(); - _cacheManager = new ConnectionCacheManager(_connectionsClient, _tokenCredential); + _cacheManager = new ConnectionCacheManager(_endpoint, _tokenCredential); } /// diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AIClientModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AIClientModelFactory.cs deleted file mode 100644 index a7cee4f50d0e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AIClientModelFactory.cs +++ /dev/null @@ -1,279 +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.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This file restores substantial portions of generated model factory surface lost via type customization and - * visibility adjustments. - */ - -public static partial class AIClientModelFactory -{ - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The name of the agent. - /// The description of the agent. - /// The ID of the model to use. - /// The system instructions for the agent to use. - /// - /// The collection of tools enabled for the agent. - /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public static Agent Agent(string id = null, DateTimeOffset createdAt = default, string name = null, string description = null, string model = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null) - { - tools ??= new List(); - metadata ??= new Dictionary(); - - return new Agent( - id, - @object: null, - createdAt, - name, - description, - model, - instructions, - tools?.ToList(), - toolResources, - temperature, - topP, - responseFormat, - metadata, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type - /// of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list - /// of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static AgentThread AgentThread(string id = null, DateTimeOffset createdAt = default, ToolResources toolResources = null, IReadOnlyDictionary metadata = null) - { - metadata ??= new Dictionary(); - - return new AgentThread( - id, - @object: null, - createdAt, - toolResources, - metadata, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The ID of the thread associated with this run. - /// The ID of the agent associated with the thread this run was performed against. - /// The status of the agent thread run. - /// - /// The details of the action required for the agent thread run to continue. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// The last error, if any, encountered by this agent thread run. - /// The ID of the model to use. - /// The overridden system instructions used for this agent thread run. - /// - /// The overridden enabled tools used for this agent thread run. - /// 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 Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expires. - /// The Unix timestamp, in seconds, representing when this item was started. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). - /// The sampling temperature used for this run. If not set, defaults to 1. - /// The nucleus sampling value used for this run. If not set, defaults to 1. - /// The maximum number of prompt tokens specified to have been used over the course of the run. - /// The maximum number of completion tokens specified to have been used over the course of the run. - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// The response format of the tool calls used in this run. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - /// Determines if tools can be executed in parallel within the run. - /// A new instance for mocking. - public static ThreadRun ThreadRun(string id = null, string threadId = null, string agentId = null, RunStatus status = default, RequiredAction requiredAction = null, RunError lastError = null, string model = null, string instructions = null, IEnumerable tools = null, DateTimeOffset createdAt = default, DateTimeOffset? expiresAt = null, DateTimeOffset? startedAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, IncompleteRunDetails incompleteDetails = default, RunCompletionUsage usage = default, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, UpdateToolResourcesOptions toolResources = null, bool? parallelToolCalls = null) - { - tools ??= new List(); - metadata ??= new Dictionary(); - - return new ThreadRun(id, @object: null, threadId, agentId, status, requiredAction, lastError, model, instructions, tools.ToList(), createdAt, expiresAt, startedAt, completedAt, cancelledAt, failedAt, incompleteDetails, usage, temperature, topP, maxPromptTokens, maxCompletionTokens, truncationStrategy, toolChoice, responseFormat, metadata, toolResources, parallelToolCalls ?? true, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The size of the file, in bytes. - /// The name of the file. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The intended purpose of a file. - /// A new instance for mocking. - public static AgentFile AgentFile(string id = null, int size = default, string filename = null, DateTimeOffset createdAt = default, AgentFilePurpose purpose = default) - { - return new AgentFile(id, size, filename, createdAt, purpose); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The type of run step, which can be either message_creation or tool_calls. - /// The ID of the agent associated with the run step. - /// The ID of the thread that was run. - /// The ID of the run that this run step is a part of. - /// The status of this run step. - /// The details for this run step. - /// If applicable, information about the last error encountered by this run step. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expired. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// Usage statistics related to the run step. - /// A set of key/value pairs that can be attached to an object, used for storing additional information. - /// A new instance for mocking. - public static RunStep RunStep(string id = null, RunStepType type = default, string agentId = null, string threadId = null, string runId = null, RunStepStatus status = default, RunStepDetails stepDetails = null, RunStepError lastError = null, DateTimeOffset createdAt = default, DateTimeOffset? expiredAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, RunStepCompletionUsage usage = null, IReadOnlyDictionary metadata = null) - { - metadata ??= new Dictionary(); - - return new RunStep(id, @object: null, type, agentId, threadId, runId, status, stepDetails, lastError, createdAt, expiredAt, completedAt, cancelledAt, failedAt, usage, metadata, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The ID of the thread that this message belongs to. - /// The status of the message. - /// On an incomplete message, details about why the message is incomplete. - /// The Unix timestamp (in seconds) for when the message was completed. - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. - /// The role associated with the agent thread message. - /// The list of content items associated with the agent thread message. - /// If applicable, the ID of the agent that authored this message. - /// If applicable, the ID of the run associated with the authoring of this message. - /// A list of files attached to the message, and the tools they were added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. - /// A new instance for mocking. - public static ThreadMessage ThreadMessage(string id = null, DateTimeOffset createdAt = default, string threadId = null, MessageStatus status = default, MessageIncompleteDetails incompleteDetails = null, DateTimeOffset? completedAt = null, DateTimeOffset? incompleteAt = null, MessageRole role = default, IEnumerable contentItems = null, string agentId = null, string runId = null, IEnumerable attachments = null, IDictionary metadata = null) - { - contentItems ??= new List(); - attachments ??= new List(); - metadata ??= new Dictionary(); - - return new ThreadMessage(id, @object: null, createdAt, threadId, status, incompleteDetails, completedAt, incompleteAt, role, contentItems?.ToList(), agentId, runId, attachments?.ToList(), (IReadOnlyDictionary)metadata, serializedAdditionalRawData: null); - } - - public static RequiredFunctionToolCall RequiredFunctionToolCall(string toolCallId, string functionName, string functionArguments) - { - return new RequiredFunctionToolCall(toolCallId, new InternalRequiredFunctionToolCallDetails(functionName, functionArguments)); - } - - public static RunStepFunctionToolCall RunStepFunctionToolCall(string id, string name, string arguments, string output) - { - return new RunStepFunctionToolCall(id, new InternalRunStepFunctionToolCallDetails(name, arguments, output)); - } - - public static RunStepCodeInterpreterToolCall RunStepCodeInterpreterToolCall(string id, string input, IReadOnlyList outputs) - { - return new RunStepCodeInterpreterToolCall(id, new InternalCodeInterpreterToolCallDetails(input, outputs)); - } - - /// - /// Instantiates a new instance of . - /// - /// The tool calls to include in the mocked action. - /// A new instance of SubmitToolOutputsAction. - public static SubmitToolOutputsAction SubmitToolOutputsAction(IEnumerable toolCalls) - { - return new SubmitToolOutputsAction(new InternalSubmitToolOutputsDetails(toolCalls)); - } - - /// - /// Creates a new instance of MessageTextContent. - /// - /// The text for the content item. - /// The annotations for the content item. - /// A new instance of MessageTextContent. - public static MessageTextContent MessageTextContent(string text, IEnumerable annotations) - { - return new MessageTextContent(new InternalMessageTextDetails(text, annotations)); - } - - /// - /// Creates a new instance of MessageImageFileContent. - /// - /// The file ID for the image file content. - /// A new instance of MessageImageFileContent. - public static MessageImageFileContent MessageImageFileContent(string fileId) - { - return new MessageImageFileContent(new InternalMessageImageFileDetails(fileId)); - } - - /// - /// Creates a new instance of MessageFileCitationTextAnnotation. - /// - /// The text for the citation. - /// The file ID for the citation. - /// The quote for the citation. - /// A new instance of MessageFileCitationTextAnnotation. - public static MessageTextFileCitationAnnotation MessageFileCitationTextAnnotation(string text, string fileId, string quote) - { - return new MessageTextFileCitationAnnotation(text, new InternalMessageTextFileCitationDetails(fileId, quote)); - } - - /// - /// Creates a new instance of MessageFilePathTextAnnotation. - /// - /// The text for the annotation. - /// The file ID for the annotation. - /// A new instance of MessageFilePathTextAnnotation. - public static MessageTextFilePathAnnotation MessageFilePathTextAnnotation(string text, string fileId) - { - return new MessageTextFilePathAnnotation(text, new InternalMessageTextFilePathDetails(fileId)); - } - - /// - /// Creates a new instance of PageableList. - /// - /// The data type of the listed items. - /// The items for the list. - /// The ID of the first item in the list. - /// The ID of the last item in the list. - /// Whether more items not included in the list exist. - /// A new instance of PageableList. - public static PageableList PageableList(IReadOnlyList data, string firstId, string lastId, bool hasMore) - => new(data, firstId, lastId, hasMore); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Agent.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Agent.cs deleted file mode 100644 index 9008d40e6db7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Agent.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - -public partial class Agent -{ - internal string Object { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFile.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFile.cs deleted file mode 100644 index 9a98d435f23e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFile.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Runtime.CompilerServices; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This is a short-term workaround for an observed parity issue with Azure OpenAI's treatment of 'bytes' on files as - * a nullable integer. - */ - -[CodeGenSerialization(nameof(Size), DeserializationValueHook = nameof(DeserializeNullableSize))] -[CodeGenModel("OpenAIFile")] -public partial class AgentFile -{ - /* - * CUSTOM CODE DESCRIPTION: This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - internal string Object { get; } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void DeserializeNullableSize(JsonProperty property, ref int size) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - size = 0; - } - else - { - size = property.Value.GetInt32(); - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFilePurpose.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFilePurpose.cs deleted file mode 100644 index 9f3484590fbc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentFilePurpose.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// The possible values denoting the intended usage of a file. - [CodeGenModel("OpenAIFilePurpose")] - public readonly partial struct AgentFilePurpose : IEquatable - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStore.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStore.cs deleted file mode 100644 index e4567229b86c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStore.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using Azure.Core; - -namespace Azure.AI.Projects -{ - [CodeGenModel("OpenAIPageableListOfVectorStore")] - public partial class AgentPageableListOfVectorStore - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFile.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFile.cs deleted file mode 100644 index dfdc64d06500..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFile.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// The response data for a requested list of items. - [CodeGenModel("OpenAIPageableListOfVectorStoreFile")] - public partial class AgentPageableListOfVectorStoreFile - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFileObject.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFileObject.cs deleted file mode 100644 index 6a973584217d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreFileObject.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStoreFile_object. - [CodeGenModel("OpenAIPageableListOfVectorStoreFileObject")] - public readonly partial struct AgentPageableListOfVectorStoreFileObject : IEquatable - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreObject.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreObject.cs deleted file mode 100644 index 9ec36ede9a7d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentPageableListOfVectorStoreObject.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStore_object. - [CodeGenModel("OpenAIPageableListOfVectorStoreObject")] - public readonly partial struct AgentPageableListOfVectorStoreObject : IEquatable - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentThread.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentThread.cs deleted file mode 100644 index 656bae25c14b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentThread.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - -public partial class AgentThread -{ - internal string Object { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.Streaming.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.Streaming.cs deleted file mode 100644 index fb26286f698a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.Streaming.cs +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using System.Threading; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects; - -public partial class AgentsClient -{ - /// - /// Begins a new streaming that evaluates a using a specified - /// . - /// - /// Identifier of the thread. - /// The ID of the agent that should run the thread. - /// The overridden model name that the agent should use to run the thread. - /// The overridden system instructions that the agent should use to run the thread. - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - /// Adds additional messages to the thread before creating the run. - /// The overridden list of enabled tools that the agent should use to run the thread. - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. - /// is an empty string, and was expected to be non-empty. -#pragma warning disable AZC0015 // Unexpected client method return type. - public virtual AsyncCollectionResult CreateRunStreamingAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, - overrideModelName, - overrideInstructions, - additionalInstructions, - additionalMessages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - stream: true, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - - async Task sendRequestAsync() => - await CreateRunStreamingAsync(threadId, createRunRequest.ToRequestContent(), context).ConfigureAwait(false); - AsyncCollectionResult submitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, int currRetry) => - this.SubmitToolOutputsToStreamAsync(run, toolOutputs, currRetry, default); - async Task> cancelRunAsync(string runId) => await this.CancelRunAsync(threadId, runId).ConfigureAwait(false); - return new AsyncStreamingUpdateCollection( - cancellationToken, - autoFunctionCallOptions, - 0, - sendRequestAsync, - cancelRunAsync, - submitToolOutputsToStreamAsync); - } - - /// - /// Begins a new streaming that evaluates a using a specified - /// . - /// - /// Identifier of the thread. - /// The ID of the agent that should run the thread. - /// The overridden model name that the agent should use to run the thread. - /// The overridden system instructions that the agent should use to run the thread. - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - /// Adds additional messages to the thread before creating the run. - /// The overridden list of enabled tools that the agent should use to run the thread. - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. - /// is an empty string, and was expected to be non-empty. -#pragma warning disable AZC0015 // Unexpected client method return type. - public virtual CollectionResult CreateRunStreaming(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, - overrideModelName, - overrideInstructions, - additionalInstructions, - additionalMessages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - stream: true, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - - Response sendRequest() => CreateRunStreaming(threadId, createRunRequest.ToRequestContent(), context); - CollectionResult submitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, int currRetry) => - this.SubmitToolOutputsToStream(run, toolOutputs, currRetry); - Response cancelRun(string runId) => this.CancelRun(threadId, runId); - - return new StreamingUpdateCollection( - cancellationToken, - autoFunctionCallOptions, - 0, - sendRequest, - cancelRun, - submitToolOutputsToStream); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// The that the tool outputs should be submitted to. - /// A list of tools for which the outputs are being submitted. - /// The cancellation token to use. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. -#pragma warning disable AZC0015 // Unexpected client method return type. - public virtual CollectionResult SubmitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - return SubmitToolOutputsToStream(run, toolOutputs, int.MaxValue, cancellationToken); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// The that the tool outputs should be submitted to. - /// A list of tools for which the outputs are being submitted. - /// The cancellation token to use. - /// The count of current retry of auto function calls. Cancel the run if reach to the maxinum. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. -#pragma warning disable AZC0015 // Unexpected client method return type. - internal virtual CollectionResult SubmitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, int currentRetry = 0, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - Argument.AssertNotNull(run, nameof(run)); - Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); - - SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new(toolOutputs.ToList(), true, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response sendRequest() => SubmitToolOutputsInternal(run.ThreadId, run.Id, true, submitToolOutputsToRunRequest.ToRequestContent(), context); - CollectionResult submitToolOutputsToStream(ThreadRun run, IEnumerable toolOutputs, int currRetry) => - this.SubmitToolOutputsToStream(run, toolOutputs, currentRetry); - Response cancelRun(string runId) => this.CancelRun(run.ThreadId, runId); - - return new StreamingUpdateCollection( - cancellationToken, - autoFunctionCallOptions, - currentRetry, - sendRequest, - cancelRun, - submitToolOutputsToStream); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// The that the tool outputs should be submitted to. - /// A list of tools for which the outputs are being submitted. - /// The cancellation token to use. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. -#pragma warning disable AZC0015 // Unexpected client method return type. - public virtual AsyncCollectionResult SubmitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - return SubmitToolOutputsToStreamAsync(run, toolOutputs, cancellationToken); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// The that the tool outputs should be submitted to. - /// A list of tools for which the outputs are being submitted. - /// The cancellation token to use. - /// The count of current retry of auto function calls. Cancel the run if reach to the maxinum. - /// If specified, function calls defined in tools will be called automatically. - /// or is null. -#pragma warning disable AZC0015 // Unexpected client method return type. - internal virtual AsyncCollectionResult SubmitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, int currentRetry = 0, CancellationToken cancellationToken = default, AutoFunctionCallOptions autoFunctionCallOptions = null) -#pragma warning restore AZC0015 // Unexpected client method return type. - { - Argument.AssertNotNull(run, nameof(run)); - Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); - - SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new(toolOutputs.ToList(), true, null); - RequestContext context = FromCancellationToken(cancellationToken); - async Task sendRequestAsync() => await SubmitToolOutputsInternalAsync(run.ThreadId, run.Id, true, submitToolOutputsToRunRequest.ToRequestContent(), context).ConfigureAwait(false); - AsyncCollectionResult submitToolOutputsToStreamAsync(ThreadRun run, IEnumerable toolOutputs, int currRetry) => - this.SubmitToolOutputsToStreamAsync(run, toolOutputs, currRetry); - async Task> cancelRunAsync(string runId) => await this.CancelRunAsync(run.ThreadId, runId).ConfigureAwait(false); - - return new AsyncStreamingUpdateCollection( - cancellationToken, - autoFunctionCallOptions, - currentRetry, - sendRequestAsync, - cancelRunAsync, - submitToolOutputsToStreamAsync); - } - - internal async Task CreateRunStreamingAsync(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRunRequest(threadId, content, null, context); - message.BufferResponse = false; - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - internal Response CreateRunStreaming(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRunRequest(threadId, content, null, context); - message.BufferResponse = false; - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.cs deleted file mode 100644 index 54caab99f806..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AgentsClient.cs +++ /dev/null @@ -1,914 +0,0 @@ -// 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.Linq; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; -using System.Text.Json; - -namespace Azure.AI.Projects -{ - /// The Agents sub-client. - [CodeGenClient("Agents")] - public partial class AgentsClient - { - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// is null. - /// - public AgentsClient(string connectionString, TokenCredential credential) : this(connectionString, credential, new AIProjectClientOptions()) - { - } - - /// - /// Initializes a new instance of AzureAIClient. - /// - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// is null. - /// is an empty string. - public AgentsClient(string connectionString, TokenCredential credential, AIProjectClientOptions options) - : this(new Uri(ClientHelper.ParseConnectionString(connectionString, "endpoint")), - ClientHelper.ParseConnectionString(connectionString, "subscriptionId"), - ClientHelper.ParseConnectionString(connectionString, "resourceGroupName"), - ClientHelper.ParseConnectionString(connectionString, "projectName"), - credential, - options) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AIProjectClientOptions()) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AIProjectClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - Argument.AssertNotNull(credential, nameof(credential)); - options ??= new AIProjectClientOptions(); - - ClientDiagnostics = new ClientDiagnostics(options, true); - _tokenCredential = credential; - _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = options.Version; - } - - /* - * CUSTOM CODE DESCRIPTION: - * - * These convenience helpers bring additive capabilities to address client methods more ergonomically: - * - Use response value instances of types like AgentThread and ThreadRun instead of raw IDs from those instances - * a la thread.Id and run.Id. - * - Allow direct file-path-based file upload (with inferred filename parameter placement) in lieu of requiring - * manual I/O prior to getting a byte array - */ - - /// - /// Creates a new message on a specified thread, accepting a simple textual content string. - /// This API overload matches the original user experience of providing a plain string. - /// - /// Identifier of the thread. - /// - /// The role of the entity that is creating the message. Allowed values include: - /// - user: Indicates the message is sent by an actual user. - /// - assistant: Indicates the message is generated by the agent. - /// - /// The plain text content of the message. - /// An optional list of files attached to the message. - /// Optional metadata as key/value pairs. - /// The cancellation token. - /// The newly created . - /// Thrown when or is null. - /// Thrown when is empty. - public virtual async Task> CreateMessageAsync( - string threadId, - MessageRole role, - string content, - IEnumerable attachments = null, - IReadOnlyDictionary metadata = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - // Serialize the plain text into JSON so that the underlying generated code - // sees a properly quoted/escaped string instead of raw text. - BinaryData contentJson = BinaryData.FromObjectAsJson(content); - - return await CreateMessageAsync( - threadId, - role, - contentJson, - attachments, - metadata, - cancellationToken - ).ConfigureAwait(false); - } - - /// - /// Synchronous variant of . - /// - /// Identifier of the thread. - /// - /// The role of the entity that is creating the message. Allowed values include: - /// - user: Indicates the message is sent by an actual user. - /// - assistant: Indicates the message is generated by the agent. - /// - /// The plain text content of the message. - /// An optional list of files attached to the message. - /// Optional metadata as key/value pairs. - /// The cancellation token. - /// The newly created . - /// Thrown when or is null. - /// Thrown when is empty. - public virtual Response CreateMessage( - string threadId, - MessageRole role, - string content, - IEnumerable attachments = null, - IReadOnlyDictionary metadata = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - // Serialize the plain text into JSON so that the underlying generated code - // sees a properly quoted/escaped string instead of raw text. - BinaryData contentJson = BinaryData.FromObjectAsJson(content); - - // Reuse the existing generated method internally by converting the string to BinaryData. - return CreateMessage( - threadId, - role, - contentJson, - attachments, - metadata, - cancellationToken - ); - } - - /// - /// Creates a new message on a specified thread using a collection of content blocks, - /// such as text or image references. - /// - /// Identifier of the thread. - /// - /// The role of the entity creating the message. For instance: - /// - MessageRole.User: an actual user message - /// - MessageRole.Assistant: an agent-generated response - /// - /// - /// A collection of specialized content blocks (e.g. , - /// , , etc.). - /// - /// An optional list of files attached to the message. - /// Optional metadata as key/value pairs. - /// The cancellation token. - /// A encapsulating the newly created message. - /// - /// Thrown if is null or empty, or if is null. - /// - /// Thrown if is empty. - public virtual async Task> CreateMessageAsync( - string threadId, - MessageRole role, - IEnumerable contentBlocks, - IEnumerable attachments = null, - IReadOnlyDictionary metadata = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(contentBlocks, nameof(contentBlocks)); - - // Convert blocks to a JSON array stored as BinaryData - var jsonElements = new List(); - foreach (MessageInputContentBlock block in contentBlocks) - { - // Write the content into a MemoryStream. - using var memStream = new MemoryStream(); - - // Write the RequestContent into the MemoryStream - block.ToRequestContent().WriteTo(memStream, default); - - // Reset stream position to the beginning - memStream.Position = 0; - - // Parse to a JsonDocument, then clone the root element so we can reuse it - using var tempDoc = JsonDocument.Parse(memStream); - jsonElements.Add(tempDoc.RootElement.Clone()); - } - - // Now serialize the array of JsonElements into a single BinaryData for the request: - BinaryData serializedBlocks = BinaryData.FromObjectAsJson(jsonElements); - - return await CreateMessageAsync( - threadId, - role, - serializedBlocks, - attachments, - metadata, - cancellationToken - ).ConfigureAwait(false); - } - - /// - /// Synchronous variant of . - /// Creates a new message using multiple structured content blocks. - /// - /// Identifier of the thread. - /// - /// The role of the entity creating the message. For instance: - /// - MessageRole.User: an actual user message - /// - MessageRole.Assistant: an agent-generated response. - /// - /// - /// A collection of specialized content blocks (e.g. , - /// , , etc.). - /// - /// An optional list of files attached to the message. - /// Optional metadata as key/value pairs. - /// The cancellation token. - /// A encapsulating the newly created message. - /// - /// Thrown if is null or empty, or if is null. - /// - /// Thrown if is empty. - public virtual Response CreateMessage( - string threadId, - MessageRole role, - IEnumerable contentBlocks, - IEnumerable attachments = null, - IReadOnlyDictionary metadata = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(contentBlocks, nameof(contentBlocks)); - - // Convert blocks to a JSON array stored as BinaryData - var jsonElements = new List(); - foreach (MessageInputContentBlock block in contentBlocks) - { - // Write the content into a MemoryStream. - using var memStream = new MemoryStream(); - - // Write the RequestContent into the MemoryStream - block.ToRequestContent().WriteTo(memStream, default); - - // Reset stream position to the beginning - memStream.Position = 0; - - // Parse to a JsonDocument, then clone the root element so we can reuse it - using var tempDoc = JsonDocument.Parse(memStream); - jsonElements.Add(tempDoc.RootElement.Clone()); - } - - // Now serialize the array of JsonElements into a single BinaryData for the request: - BinaryData serializedBlocks = BinaryData.FromObjectAsJson(jsonElements); - - return CreateMessage( - threadId, - role, - serializedBlocks, - attachments, - metadata, - cancellationToken - ); - } - - /// - /// Creates a new run of the specified thread using a specified agent. - /// - /// - /// This method will create the run with default configuration. - /// - /// The thread that should be run. - /// The agent that should run the thread. - /// The cancellation token to use. - /// A new instance. - public virtual Response CreateRun(AgentThread thread, Agent agent, CancellationToken cancellationToken = default) - => CreateRun(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken); - - /// - /// Creates a new run of the specified thread using a specified agent. - /// - /// - /// This method will create the run with default configuration. - /// - /// The thread that should be run. - /// The agent that should run the thread. - /// The cancellation token to use. - /// A new instance. - public virtual Task> CreateRunAsync(AgentThread thread, Agent agent, CancellationToken cancellationToken = default) - => CreateRunAsync(thread.Id, agent.Id, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, cancellationToken); - - /// Returns a list of run steps associated an agent thread run. - /// The instance from which run steps should be listed. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - public virtual Response> GetRunSteps( - ThreadRun run, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(run, nameof(run)); - return GetRunSteps(run.ThreadId, run.Id, limit, order, after, before, cancellationToken); - } - - /// Returns a list of run steps associated an agent thread run. - /// The instance from which run steps should be listed. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - public virtual Task>> GetRunStepsAsync( - ThreadRun run, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(run, nameof(run)); - return GetRunStepsAsync(run.ThreadId, run.Id, limit, order, after, before, cancellationToken); - } - - /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. - /// Identifier of the thread. - /// Identifier of the run. - /// A list of tools for which the outputs are being submitted. - /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - internal virtual Response SubmitToolOutputsToRun(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default) - { - // We hide this method because setting stream to true will result in streaming response, - // which cannot be deserialized to ThreadRun. - SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null); - RequestContext context = FromCancellationToken(cancellationToken); - return SubmitToolOutputsInternal(threadId, runId, !stream.HasValue || stream.Value, submitToolOutputsToRunRequest.ToRequestContent(), context); - } - - /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'. - /// Identifier of the thread. - /// Identifier of the run. - /// A list of tools for which the outputs are being submitted. - /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. - /// The cancellation token to use. - internal virtual async Task SubmitToolOutputsToRunAsync(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default) - { - SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null); - RequestContext context = FromCancellationToken(cancellationToken); - return await SubmitToolOutputsInternalAsync(threadId, runId, !stream.HasValue || stream.Value, submitToolOutputsToRunRequest.ToRequestContent(), context).ConfigureAwait(false); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// Identifier of the thread. - /// Identifier of the run. - /// Serialized json contents. - /// Options that can be used to control the request. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response SubmitToolOutputsToRun(string threadId, string runId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - return SubmitToolOutputsInternal(threadId, runId, false, content, context); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// Identifier of the thread. - /// Identifier of the run. - /// Serialized json contents. - /// Options that can be used to control the request. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task SubmitToolOutputsToRunAsync(string threadId, string runId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - return await SubmitToolOutputsInternalAsync(threadId, runId, false, content, context).ConfigureAwait(false); - } - - /// Submits outputs from tool calls as requested by a run with a status of 'requires_action' with required_action.type of 'submit_tool_outputs'. - /// The that the tool outputs should be submitted to. - /// The list of tool call outputs to provide as part of an output submission to an agent thread run. - /// The cancellation token to use. - /// is null. - public virtual Response SubmitToolOutputsToRun(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(run, nameof(run)); - Response response = SubmitToolOutputsToRun(run.ThreadId, run.Id, toolOutputs, false, cancellationToken); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Submits outputs from tool calls as requested by a run with a status of 'requires_action' with required_action.type of 'submit_tool_outputs'. - /// The that the tool outputs should be submitted to. - /// The list of tool call outputs to provide as part of an output submission to an agent thread run. - /// The cancellation token to use. - /// is null. - public virtual async Task> SubmitToolOutputsToRunAsync(ThreadRun run, IEnumerable toolOutputs, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(run, nameof(run)); - Response response = await SubmitToolOutputsToRunAsync(run.ThreadId, run.Id, toolOutputs, false, cancellationToken).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// Identifier of the thread. - /// Identifier of the run. - /// If true, the run should return stream - /// Serialized json contents. - /// Options that can be used to control the request. - internal virtual Response SubmitToolOutputsInternal(string threadId, string runId, bool stream, RequestContent content, RequestContext context = null) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsInternal"); - scope.Start(); - try - { - using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context); - message.BufferResponse = !stream; - return _pipeline.ProcessMessage(message, context, CancellationToken.None); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Submits outputs from tools as requested by tool calls in a stream. Stream updates that need submitted tool outputs will have a status of 'RunStatus.RequiresAction'. - /// Identifier of the thread. - /// Identifier of the run. - /// If true, the run should return stream - /// Serialized json contents. - /// Options that can be used to control the request. - internal virtual async Task SubmitToolOutputsInternalAsync(string threadId, string runId, bool stream, RequestContent content, RequestContext context = null) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsInternalAsync"); - scope.Start(); - try - { - using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context); - message.BufferResponse = !stream; - return await _pipeline.ProcessMessageAsync(message, context, CancellationToken.None).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Uploads a file from a local file path accessible to . - /// - /// The local file path. - /// The intended purpose of the uploaded file. - /// The cancellation token to use. - public virtual Response UploadFile( - string filePath, - AgentFilePurpose purpose, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); - - using FileStream stream = System.IO.File.OpenRead(filePath); - return UploadFile(stream, purpose, filePath, cancellationToken); - } - - /// - /// Uploads a file from a local file path accessible to . - /// - /// The local file path. - /// The intended purpose of the uploaded file. - /// The cancellation token to use. - public virtual async Task> UploadFileAsync( - string filePath, - AgentFilePurpose purpose, - CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); - - using FileStream stream = System.IO.File.OpenRead(filePath); - return await UploadFileAsync(stream, purpose, filePath, cancellationToken).ConfigureAwait(false); - } - - /// Uploads a file for use by other operations. - /// The file data, in bytes. - /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - /// The name of the file. - /// The cancellation token to use. - /// is null. - public virtual async Task> UploadFileAsync(Stream data, AgentFilePurpose purpose, string filename, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - File azureFile = new(BinaryData.FromStream(data)); - - UploadFileRequest uploadFileRequest = new UploadFileRequest(azureFile, purpose, filename, null); - using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UploadFileAsync(content, content.ContentType, context).ConfigureAwait(false); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /// Uploads a file for use by other operations. - /// The file data, in bytes. - /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - /// The name of the file. - /// The cancellation token to use. - /// is null. - public virtual Response UploadFile(Stream data, AgentFilePurpose purpose, string filename, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - File azureFile = new(BinaryData.FromStream(data)); - - UploadFileRequest uploadFileRequest = new UploadFileRequest(azureFile, purpose, filename, null); - using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UploadFile(content, content.ContentType, context); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /// Uploads a file for use by other operations. - /// Multipart body. - /// The cancellation token to use. - /// is null. - internal virtual async Task> UploadFileAsync(UploadFileRequest body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UploadFileAsync(content, content.ContentType, context).ConfigureAwait(false); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /// Uploads a file for use by other operations. - /// Multipart body. - /// The cancellation token to use. - /// is null. - internal virtual Response UploadFile(UploadFileRequest body, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(body, nameof(body)); - - using MultipartFormDataRequestContent content = body.ToMultipartRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UploadFile(content, content.ContentType, context); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /* - * CUSTOM CODE DESCRIPTION: - * - * Generated methods that return trivial response value types (e.g. "DeletionStatus" that has nothing but a - * "Deleted" property) are shimmed to directly use the underlying data as their response value type. - * - */ - - /// Deletes an agent. - /// The ID of the agent to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response DeleteAgent(string agentId, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteAgent"); - scope.Start(); - Response baseResponse = InternalDeleteAgent(agentId, cancellationToken); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// Deletes an agent. - /// The ID of the agent to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> DeleteAgentAsync( - string agentId, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteAgent"); - scope.Start(); - Response baseResponse - = await InternalDeleteAgentAsync(agentId, cancellationToken).ConfigureAwait(false); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// Deletes a thread. - /// The ID of the thread to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response DeleteThread( - string threadId, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteThread"); - scope.Start(); - Response baseResponse - = InternalDeleteThread(threadId, cancellationToken); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// Deletes a thread. - /// The ID of the thread to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> DeleteThreadAsync( - string threadId, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteThread"); - scope.Start(); - Response baseResponse - = await InternalDeleteThreadAsync(threadId, cancellationToken).ConfigureAwait(false); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// Returns a list of files that belong to the user's organization. - /// Limits files in the response to those with the specified purpose. - /// The cancellation token to use. - public virtual Response> GetFiles(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetFiles"); - scope.Start(); - Response baseResponse = InternalListFiles(purpose, cancellationToken); - return Response.FromValue(baseResponse.Value?.Data, baseResponse.GetRawResponse()); - } - - /// Returns a list of files that belong to the user's organization. - /// Limits files in the response to those with the specified purpose. - /// The cancellation token to use. - public virtual async Task>> GetFilesAsync( - AgentFilePurpose? purpose = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetFiles"); - scope.Start(); - Response baseResponse = await InternalListFilesAsync(purpose, cancellationToken).ConfigureAwait(false); - return Response.FromValue(baseResponse.Value?.Data, baseResponse.GetRawResponse()); - } - - /// Delete a previously uploaded file. - /// The ID of the file to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response DeleteFile(string fileId, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteFile"); - scope.Start(); - Response baseResponse = InternalDeleteFile(fileId, cancellationToken); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// Delete a previously uploaded file. - /// The ID of the file to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> DeleteFileAsync(string fileId, CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.DeleteFile"); - scope.Start(); - Response baseResponse = await InternalDeleteFileAsync(fileId, cancellationToken).ConfigureAwait(false); - bool simplifiedValue = - baseResponse.GetRawResponse() != null - && !baseResponse.GetRawResponse().IsError - && baseResponse.Value != null - && baseResponse.Value.Deleted; - return Response.FromValue(simplifiedValue, baseResponse.GetRawResponse()); - } - - /// - public virtual Response> GetAgents( - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetAgents"); - scope.Start(); - Response baseResponse = InternalGetAgents(limit, order, after, before, cancellationToken); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual async Task>> GetAgentsAsync( - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetAgents"); - scope.Start(); - Response baseResponse - = await InternalGetAgentsAsync(limit, order, after, before, cancellationToken).ConfigureAwait(false); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual Response> GetRunSteps( - string threadId, - string runId, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRunSteps"); - scope.Start(); - Response baseResponse = InternalGetRunSteps(threadId, runId, null, limit, order, after, before, cancellationToken); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual async Task>> GetRunStepsAsync( - string threadId, - string runId, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRunSteps"); - scope.Start(); - Response baseResponse - = await InternalGetRunStepsAsync(threadId, runId, null, limit, order, after, before, cancellationToken).ConfigureAwait(false); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual Response> GetMessages( - string threadId, - string runId = null, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetMessages"); - scope.Start(); - Response baseResponse = InternalGetMessages(threadId, runId, limit, order, after, before, cancellationToken); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual async Task>> GetMessagesAsync( - string threadId, - string runId = null, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetMessages"); - scope.Start(); - Response baseResponse - = await InternalGetMessagesAsync(threadId, runId, limit, order, after, before, cancellationToken).ConfigureAwait(false); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual Response> GetRuns( - string threadId, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRuns"); - scope.Start(); - Response baseResponse = InternalGetRuns(threadId, limit, order, after, before, cancellationToken); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual async Task>> GetRunsAsync( - string threadId, - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetRuns"); - scope.Start(); - Response baseResponse - = await InternalGetRunsAsync(threadId, limit, order, after, before, cancellationToken).ConfigureAwait(false); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual Response> GetThreads( - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetThreads"); - scope.Start(); - Response baseResponse - = InternalGetThreads(limit, order, after, before, cancellationToken); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - - /// - public virtual async Task>> GetThreadsAsync( - int? limit = null, - ListSortOrder? order = null, - string after = null, - string before = null, - CancellationToken cancellationToken = default) - { - using DiagnosticScope scope = ClientDiagnostics.CreateScope("Agents.GetThreads"); - scope.Start(); - Response baseResponse - = await InternalGetThreadsAsync(limit, order, after, before, cancellationToken).ConfigureAwait(false); - return Response.FromValue(PageableList.Create(baseResponse.Value), baseResponse.GetRawResponse()); - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AutoFunctionCallOptions.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AutoFunctionCallOptions.cs deleted file mode 100644 index dfa44599edd1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AutoFunctionCallOptions.cs +++ /dev/null @@ -1,55 +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 System.Text; -using System.Threading.Tasks; - -namespace Azure.AI.Projects -{ - public class AutoFunctionCallOptions - { - private Dictionary _autoFunctionCallDelegates = new(); - private int _maxRetry; - /// The size of the client cache. - - /// - /// Enables auto tool calls to be executed automatically during streaming. If this is not set, function must be called manually. - /// - /// Dictionary in name and delegate in pair - /// Maximum number of errors allowed and retry per stream. Default value is 10. - public AutoFunctionCallOptions(Dictionary toolDelegates, int maxRetry) { - ValidateAutoFunctions(toolDelegates); - _autoFunctionCallDelegates.Clear(); - - foreach (var kvp in toolDelegates) - { - _autoFunctionCallDelegates[kvp.Key] = kvp.Value; - } - _maxRetry = maxRetry; - } - - private void ValidateAutoFunctions(Dictionary toolDelegates) - { - if (toolDelegates == null || toolDelegates.Count == 0) - { - throw new InvalidOperationException("The delegate dictionary must have at least one delegate."); - } - foreach (var kvp in toolDelegates) - { - if (kvp.Value.Method.ReturnType != typeof(string)) - { - throw new InvalidOperationException($"The Delegates must have string as return type."); - } - } - } - - internal Dictionary AutoFunctionCallDelegates => _autoFunctionCallDelegates; - - internal int MaxRetry => _maxRetry; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureAISearchResource.cs deleted file mode 100644 index 40df658878aa..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureAISearchResource.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - public partial class AzureAISearchResource - { - public AzureAISearchResource( - string indexConnectionId, - string indexName, - int topK = 5, - string filter = "", - AzureAISearchQueryType? queryType = null) // Removed default value - { - // Assign default value explicitly if queryType is null - queryType ??= AzureAISearchQueryType.Simple; - - // Initialize properties or perform other logic here - var indexList = new AISearchIndexResource - { - IndexConnectionId = indexConnectionId, - IndexName = indexName, - TopK = topK, - Filter = filter, - QueryType = queryType - }; - - // Additional initialization logic if needed - this.IndexList = new List { indexList }; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureFunctionToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureFunctionToolDefinition.cs deleted file mode 100644 index 5f001e3d0eb7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/AzureFunctionToolDefinition.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.Projects -{ - [CodeGenSuppress("AzureFunctionToolDefinition", typeof(InternalAzureFunctionDefinition))] - public partial class AzureFunctionToolDefinition - { - /// - public string Name => InternalAzureFunction.Function.Name; - - /// - public string Description => InternalAzureFunction.Function.Description; - - /// - public BinaryData Parameters => InternalAzureFunction.Function.Parameters; - - /// The definition of the function that the function tool should call. - internal InternalAzureFunctionDefinition InternalAzureFunction { get; set; } - - /// - /// Initializes a new instance of AzureFunctionDefinition. - /// - /// The name of the Azure function to be called. - /// A description of what the Azure function does, used by the model to choose when and how to call the function. - /// Input storage queue. - /// Output storage queue. - /// The parameters the Azure functions accepts, described as a JSON Schema object. - /// , or is null. - public AzureFunctionToolDefinition(string name, string description, AzureFunctionBinding inputBinding, AzureFunctionBinding outputBinding, BinaryData parameters) - : this(type: "azure_function", serializedAdditionalRawData: null, new InternalAzureFunctionDefinition(new InternalFunctionDefinition(name, description, parameters, serializedAdditionalRawData: null), inputBinding: inputBinding, outputBinding: outputBinding)) - { - } - - /// - public override bool Equals(object obj) - => (obj is AzureFunctionToolDefinition toolDefinition && Name == toolDefinition.Name); - - /// - public override int GetHashCode() => InternalAzureFunction.GetHashCode(); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FileSearchToolResource.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FileSearchToolResource.cs deleted file mode 100644 index e40c10669fe8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FileSearchToolResource.cs +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - public partial class FileSearchToolResource - { - public FileSearchToolResource( - IList vectorStoreIds, - IList vectorStores - ) - { - VectorStoreIds = vectorStoreIds; - if (vectorStores == null) - VectorStores = new ChangeTrackingList(); - else - VectorStores = vectorStores; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FunctionToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FunctionToolDefinition.cs deleted file mode 100644 index d3616be7c5f9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/FunctionToolDefinition.cs +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using Azure.Core; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * Used to superficially combine function tool definitions and their vacuous container tool type. - * Before: new FunctionToolDefinition(new FunctionDefinition(name, description, properties)) - * After : new FunctionToolDefinition(name, description, properties) - */ - -[CodeGenSuppress("FunctionToolDefinition", typeof(InternalFunctionDefinition))] -public partial class FunctionToolDefinition -{ - /// - public string Name => InternalFunction.Name; - - /// - public string Description => InternalFunction.Description; - - /// - public BinaryData Parameters => InternalFunction.Parameters; - - /// The definition of the function that the function tool should call. - internal InternalFunctionDefinition InternalFunction { get; set; } - - /// - /// Initializes a new instance of FunctionToolDefinition. - /// - /// The name of the function to be called. - /// A description of what the function does, used by the model to choose when and how to call the function. - /// The parameters the functions accepts, described as a JSON Schema object. - /// , or is null. - public FunctionToolDefinition(string name, string description, BinaryData parameters) - : this(type: "function", serializedAdditionalRawData: null, new InternalFunctionDefinition(name, description, parameters, serializedAdditionalRawData: null)) - { - } - - /// - /// Initializes a new instance of FunctionTool for a function that requires no explicit function parameters. - /// - /// The name of the function to be called. - /// A description of what the function does, used by the model to choose when and how to call the function. - /// or is null. - public FunctionToolDefinition(string name, string description) - : this(name, description, BinaryData.FromObjectAsJson(new { type = "object", properties = new { } })) - { } - - /* - * CUSTOM CODE DESCRIPTION: - * - * These additions simply allow easy comparison between tool calls and tool definitions. - */ - - public static bool operator ==(FunctionToolDefinition functionToolDefinition, RunStepFunctionToolCall functionToolCall) - => functionToolDefinition.Name == functionToolCall.Name; - - public static bool operator !=(FunctionToolDefinition functionToolDefinition, RunStepFunctionToolCall functionToolCall) - => functionToolDefinition.Name != functionToolCall.Name; - - public static bool operator ==(RunStepFunctionToolCall functionToolCall, FunctionToolDefinition functionToolDefinition) - => functionToolCall.Name == functionToolDefinition.Name; - - public static bool operator !=(RunStepFunctionToolCall functionToolCall, FunctionToolDefinition functionToolDefinition) - => functionToolCall.Name != functionToolDefinition.Name; - - public static bool operator ==(FunctionToolDefinition functionToolDefinition, RequiredFunctionToolCall functionToolCall) - => functionToolDefinition.Name == functionToolCall.Name; - - public static bool operator !=(FunctionToolDefinition functionToolDefinition, RequiredFunctionToolCall functionToolCall) - => functionToolDefinition.Name != functionToolCall.Name; - - public static bool operator ==(RequiredFunctionToolCall functionToolCall, FunctionToolDefinition functionToolDefinition) - => functionToolCall.Name == functionToolDefinition.Name; - - public static bool operator !=(RequiredFunctionToolCall functionToolCall, FunctionToolDefinition functionToolDefinition) - => functionToolCall.Name != functionToolDefinition.Name; - - /// - public override bool Equals(object obj) - => (obj is FunctionToolDefinition toolDefinition && Name == toolDefinition.Name) - || (obj is RunStepFunctionToolCall runStepToolCall && Name == runStepToolCall.Name) - || (obj is RequiredFunctionToolCall requiredToolCall && Name == requiredToolCall.Name); - - /// - public override int GetHashCode() => InternalFunction.GetHashCode(); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalAgentDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalAgentDeletionStatusObject.cs deleted file mode 100644 index 1dc5e0eeba4a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalAgentDeletionStatusObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" single-use nested type. - */ - -internal readonly partial struct InternalAgentDeletionStatusObject -{ } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileDeletionStatusObject.cs deleted file mode 100644 index f6ae45063fad..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileDeletionStatusObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" single-use nested type. - */ - -internal readonly partial struct InternalFileDeletionStatusObject -{ } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileListResponseObject.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileListResponseObject.cs deleted file mode 100644 index 52fc5a7ce260..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Internal/InternalFileListResponseObject.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" single-use nested type. - */ - -internal readonly partial struct InternalFileListResponseObject -{ } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageAttachment.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageAttachment.cs deleted file mode 100644 index 88c1311d33a5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageAttachment.cs +++ /dev/null @@ -1,44 +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.IO; -using System.Text; -using System.Text.Json; -namespace Azure.AI.Projects; - -public partial class MessageAttachment -{ - public MessageAttachment(VectorStoreDataSource ds, List tools) - { - FileId = null; - DataSource = ds; - Tools = serializeJson(tools); - _serializedAdditionalRawData = null; - } - - public MessageAttachment(string fileId, List tools) - { - FileId = fileId; - DataSource = null; - Tools = serializeJson(tools); - _serializedAdditionalRawData = null; - } - - private static List serializeJson(List definitions) where T: IJsonModel - { - List serializedDefinitions = new(); - foreach (IJsonModel definition in definitions) - { - var stream = new MemoryStream(); - var writer = new Utf8JsonWriter(stream); - definition.Write(writer, ModelReaderWriterOptions.Json); - writer.Flush(); - string json = Encoding.UTF8.GetString(stream.ToArray()); - serializedDefinitions.Add(new BinaryData(json)); - } - return serializedDefinitions; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageImageFileContent.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageImageFileContent.cs deleted file mode 100644 index 61b8534423bb..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageImageFileContent.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class MessageImageFileContent -{ - /// - public string FileId => InternalDetails.InternalDetails; - - internal InternalMessageImageFileDetails InternalDetails { get; } - - /// Initializes a new instance of . - /// The image file for this thread message content item. - /// is null. - internal MessageImageFileContent(InternalMessageImageFileDetails internalDetails) - { - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "image_file"; - InternalDetails = internalDetails; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextContent.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextContent.cs deleted file mode 100644 index 6f43c3942120..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextContent.cs +++ /dev/null @@ -1,38 +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.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class MessageTextContent -{ - /// - public string Text => InternalDetails.Text; - - /// - public IReadOnlyList Annotations => (IReadOnlyList)InternalDetails.Annotations; - - internal InternalMessageTextDetails InternalDetails { get; } - - /// Initializes a new instance of . - /// The text and associated annotations for this thread message content item. - /// is null. - internal MessageTextContent(InternalMessageTextDetails internalDetails) - { - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "text"; - InternalDetails = internalDetails; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFileCitationAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFileCitationAnnotation.cs deleted file mode 100644 index ef42d575bf37..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFileCitationAnnotation.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class MessageTextFileCitationAnnotation -{ - /// - public string FileId => InternalDetails.FileId; - - /// - public string Quote => InternalDetails.Quote; - - internal InternalMessageTextFileCitationDetails InternalDetails { get; } - - /// Initializes a new instance of . - /// The textual content associated with this text annotation item. - /// - /// A citation within the message that points to a specific quote from a specific file. - /// Generated when the agent uses the "file_search" tool to search files. - /// - /// or is null. - internal MessageTextFileCitationAnnotation(string text, InternalMessageTextFileCitationDetails internalDetails) : base(text) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "file_citation"; - InternalDetails = internalDetails; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFilePathAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFilePathAnnotation.cs deleted file mode 100644 index e1756918638a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/MessageTextFilePathAnnotation.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class MessageTextFilePathAnnotation : MessageTextAnnotation -{ - /// - public string FileId => InternalDetails.FileId; - - internal InternalMessageTextFilePathDetails InternalDetails { get; } - - /// Initializes a new instance of . - /// The textual content associated with this text annotation item. - /// A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. - /// or is null. - internal MessageTextFilePathAnnotation(string text, InternalMessageTextFilePathDetails internalDetails) : base(text) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "file_path"; - InternalDetails = internalDetails; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/OpenApiToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/OpenApiToolDefinition.cs deleted file mode 100644 index 97c044dc09ac..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/OpenApiToolDefinition.cs +++ /dev/null @@ -1,25 +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; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class OpenApiToolDefinition - { - public OpenApiToolDefinition(string name, string description, BinaryData spec, OpenApiAuthDetails auth, IList defaultParams = null) :this( - new OpenApiFunctionDefinition( - name: name, - description: description, - spec: spec, - auth: auth, - defaultParams: defaultParams ?? [], - serializedAdditionalRawData: null - ) - ){} - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/PageableList.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/PageableList.cs deleted file mode 100644 index ea8bb097d703..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/PageableList.cs +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Collections; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This custom type facilitates common use of list types, which don't trivially emit from TypeSpec into an idiomatic - * form. - */ - -/// -/// Represents a pageable list of data items with item ID cursors representing the start and end of the current page. -/// -/// -/// and can be used as inputs into methods that list items to retrieve -/// additional items before or after the current page's view. -/// -/// The type of the data instances contained in the list. -public partial class PageableList : IEnumerable -{ - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - - internal PageableList( - IReadOnlyList data, - string firstId, - string lastId, - bool hasMore) - { - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - internal static PageableList Create(InternalOpenAIPageableListOfAgent internalList) - => new(internalList.Data, internalList.FirstId, internalList.LastId, internalList.HasMore); - internal static PageableList Create(InternalOpenAIPageableListOfThreadMessage internalList) - => new(internalList.Data, internalList.FirstId, internalList.LastId, internalList.HasMore); - internal static PageableList Create(InternalOpenAIPageableListOfRunStep internalList) - => new(internalList.Data, internalList.FirstId, internalList.LastId, internalList.HasMore); - internal static PageableList Create(InternalOpenAIPageableListOfThreadRun internalList) - => new(internalList.Data, internalList.FirstId, internalList.LastId, internalList.HasMore); - internal static PageableList Create(OpenAIPageableListOfAgentThread internalList) - => new(internalList.Data, internalList.FirstId, internalList.LastId, internalList.HasMore); - - /* - * CUSTOM CODE DESCRIPTION: - * - * These additions to the custom PageableList type aren't necessary for the dimension of code generation customization - * but do facilitate easier "list-like" use of the type. - */ - - /// - /// Gets the data item at the specified index. - /// - /// The index of the data item to retrieve. - /// The indexed data item. - public T this[int index] => Data[index]; - - /// - public IEnumerator GetEnumerator() - { - return Data.GetEnumerator(); - } - - /// - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable)Data).GetEnumerator(); - } -} - -/* - * CUSTOM CODE DESCRIPTION: - * - * Included here for concision, these perform renames of the rerouted types for clarity. - */ - -[CodeGenType("OpenAIPageableListOfAgent")] -internal partial class InternalOpenAIPageableListOfAgent { } -internal readonly partial struct OpenAIPageableListOfAgentObject { } -//[CodeGenType("OpenAIPageableListOfAgentFile")] -//internal partial class InternalOpenAIPageableListOfAgentFile { } -internal readonly partial struct OpenAIPageableListOfAgentFileObject { } -[CodeGenType("OpenAIPageableListOfThreadMessage")] -internal partial class InternalOpenAIPageableListOfThreadMessage { } -internal readonly partial struct OpenAIPageableListOfThreadMessageObject { } -//internal readonly partial struct OpenAIPageableListOfMessageFileObject { } -[CodeGenType("OpenAIPageableListOfRunStep")] -internal partial class InternalOpenAIPageableListOfRunStep { } -internal readonly partial struct OpenAIPageableListOfRunStepObject { } -[CodeGenType("OpenAIPageableListOfThreadRun")] -internal partial class InternalOpenAIPageableListOfThreadRun { } -internal readonly partial struct OpenAIPageableListOfThreadRunObject { } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredFunctionToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredFunctionToolCall.cs deleted file mode 100644 index 2af2d3feb7d6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredFunctionToolCall.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class RequiredFunctionToolCall : RequiredToolCall -{ - /// - public string Name => InternalDetails.Name; - - /// - public string Arguments => InternalDetails.Arguments; - - internal InternalRequiredFunctionToolCallDetails InternalDetails { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredToolCall.cs deleted file mode 100644 index 5191bf709def..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RequiredToolCall.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects; - -/// -/// An abstract, base representation for a tool call that an Assistants API run requires outputs -/// from in order to continue. -/// -/// -/// is the abstract base type for all required tool calls. Its -/// concrete type can be one of: -/// -/// -/// -/// -public abstract partial class RequiredToolCall : RequiredAction { } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStep.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStep.cs deleted file mode 100644 index 54aad467986c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStep.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Runtime.CompilerServices; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects; - -[CodeGenSerialization(nameof(ExpiredAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(CompletedAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(CancelledAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(FailedAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -public partial class RunStep -{ - /* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - internal string Object { get; } - - /* - * CUSTOM CODE DESCRIPTION: - * - * "Required but nullable" utcDateTime doesn't emit the appropriate deserialization logic by default. - * - */ - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void DeserializeNullableDateTimeOffset( - JsonProperty property, - ref DateTimeOffset? targetDateTimeOffset) - => CustomSerializationHelpers.DeserializeNullableDateTimeOffset(property, ref targetDateTimeOffset); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepCodeInterpreterToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepCodeInterpreterToolCall.cs deleted file mode 100644 index 8743c6449180..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepCodeInterpreterToolCall.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class RunStepCodeInterpreterToolCall -{ - /// - public string Input => InternalDetails.Input; - - /// - public IReadOnlyList Outputs => InternalDetails.Outputs; - - internal InternalCodeInterpreterToolCallDetails InternalDetails { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepFunctionToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepFunctionToolCall.cs deleted file mode 100644 index 80e0c1f2651c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/RunStepFunctionToolCall.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * These changes facilitate the merging of superficial types introduced by the underlying REST wire format. The goal - * is to avoid having types that contain nothing meaningful beyond a property to another type. - */ - -public partial class RunStepFunctionToolCall -{ - /// - public string Name => InternalDetails.Name; - - /// - public string Arguments => InternalDetails.Arguments; - - /// - public string Output => InternalDetails.Output; - - internal InternalRunStepFunctionToolCallDetails InternalDetails { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/AsyncStreamingUpdateCollection.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/AsyncStreamingUpdateCollection.cs deleted file mode 100644 index 24776b888b94..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/AsyncStreamingUpdateCollection.cs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Linq; -using System.Net.ServerSentEvents; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; - -#nullable enable - -namespace Azure.AI.Projects; - -/// -/// Implementation of collection abstraction over streaming assistant updates. -/// -internal class AsyncStreamingUpdateCollection : AsyncCollectionResult -{ - private readonly Func> _sendRequestAsync; - private readonly CancellationToken _cancellationToken; - private readonly ToolCallsResolver? _toolCallsResolver; - private readonly Func, int, AsyncCollectionResult> _submitToolOutputsToStreamAsync; - private readonly int _maxRetry; - private int _currRetry; - private readonly Func>> _cancelRunAsync; - - public AsyncStreamingUpdateCollection( - CancellationToken cancellationToken, - AutoFunctionCallOptions autoFunctionCallOptions, - int currentRetry, - Func> sendRequestAsync, - Func>> cancelRunAsync, - Func, int, AsyncCollectionResult> submitToolOutputsToStreamAsync) - { - Argument.AssertNotNull(sendRequestAsync, nameof(sendRequestAsync)); - - _cancellationToken = cancellationToken; - _sendRequestAsync = sendRequestAsync; - _submitToolOutputsToStreamAsync = submitToolOutputsToStreamAsync; - if (autoFunctionCallOptions != null) - { - _toolCallsResolver = new(autoFunctionCallOptions.AutoFunctionCallDelegates); - _maxRetry = autoFunctionCallOptions.MaxRetry; - } - _currRetry = currentRetry; - _cancelRunAsync = cancelRunAsync; - } - - public override ContinuationToken? GetContinuationToken(ClientResult page) - // Continuation is not supported for SSE streams. - => null; - - public async override IAsyncEnumerable GetRawPagesAsync() - { - Response response = await _sendRequestAsync().ConfigureAwait(false); - PipelineResponse scmResponse = new ResponseAdapter(response); - - // We don't currently support resuming a dropped connection from the - // last received event, so the response collection has a single element. - yield return ClientResult.FromResponse(scmResponse); - } - - protected async override IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) - { - ThreadRun? streamRun = null; - List toolOutputs = new(); - do - { - IAsyncEnumerator enumerator = (toolOutputs.Count > 0 && streamRun != null) ? - _submitToolOutputsToStreamAsync(streamRun, toolOutputs, _currRetry).GetAsyncEnumerator(_cancellationToken) : - new AsyncStreamingUpdateEnumerator(page, _cancellationToken); - - toolOutputs.Clear(); - - try - { - bool hasError = false; - while (await enumerator.MoveNextAsync().ConfigureAwait(false)) - { - var streamingUpdate = enumerator.Current; - if (streamingUpdate is RequiredActionUpdate newActionUpdate && _toolCallsResolver != null) - { - ToolOutput toolOutput; - try - { - toolOutput = _toolCallsResolver.GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - ); - } - catch (Exception ex) - { - string errorJson = JsonSerializer.Serialize(new { error = ex.GetBaseException().Message }); - toolOutput = new ToolOutput(newActionUpdate.ToolCallId, errorJson); - hasError = true; - } - toolOutputs.Add(toolOutput); - - streamRun = newActionUpdate.Value; - } - else - { - yield return streamingUpdate; - } - } - _currRetry = hasError ? _currRetry + 1 : _currRetry; - - if (streamRun != null && _currRetry > _maxRetry) - { - // Cancel the run if the max retry is reached - var cancelRunResponse = await _cancelRunAsync(streamRun.Id).ConfigureAwait(false); - yield return new StreamingUpdate(cancelRunResponse.Value, StreamingUpdateReason.RunCancelled); - yield break; - } - } - finally - { - await enumerator.DisposeAsync().ConfigureAwait(false); - } - } - while (toolOutputs.Count > 0); - } - - private sealed class AsyncStreamingUpdateEnumerator : IAsyncEnumerator - { - private static ReadOnlySpan TerminalData => "[DONE]"u8; - - private readonly CancellationToken _cancellationToken; - private readonly PipelineResponse _response; - - // These enumerators represent what is effectively a doubly-nested - // loop over the outer event collection and the inner update collection, - // i.e.: - // foreach (var sse in _events) { - // // get _updates from sse event - // foreach (var update in _updates) { ... } - // } - private IAsyncEnumerator>? _events; - private IEnumerator? _updates; - - private StreamingUpdate? _current; - private bool _started; - - public AsyncStreamingUpdateEnumerator(ClientResult page, CancellationToken cancellationToken) - { - Argument.AssertNotNull(page, nameof(page)); - - _response = page.GetRawResponse(); - _cancellationToken = cancellationToken; - } - - StreamingUpdate IAsyncEnumerator.Current - => _current!; - - async ValueTask IAsyncEnumerator.MoveNextAsync() - { - if (_events is null && _started) - { - throw new ObjectDisposedException(nameof(AsyncStreamingUpdateEnumerator)); - } - - _cancellationToken.ThrowIfCancellationRequested(); - _events ??= CreateEventEnumeratorAsync(); - _started = true; - - if (_updates is not null && _updates.MoveNext()) - { - _current = _updates.Current; - return true; - } - - if (await _events.MoveNextAsync().ConfigureAwait(false)) - { - if (_events.Current.Data.AsSpan().SequenceEqual(TerminalData)) - { - _current = default; - return false; - } - - var updates = StreamingUpdate.FromEvent(_events.Current); - _updates = updates.GetEnumerator(); - - if (_updates.MoveNext()) - { - _current = _updates.Current; - return true; - } - } - - _current = default; - return false; - } - - private IAsyncEnumerator> CreateEventEnumeratorAsync() - { - if (_response.ContentStream is null) - { - throw new InvalidOperationException("Unable to create result from response with null ContentStream"); - } - - IAsyncEnumerable> enumerable = SseParser.Create(_response.ContentStream, (_, bytes) => bytes.ToArray()).EnumerateAsync(); - return enumerable.GetAsyncEnumerator(_cancellationToken); - } - - public async ValueTask DisposeAsync() - { - await DisposeAsyncCore().ConfigureAwait(false); - - GC.SuppressFinalize(this); - } - - private async ValueTask DisposeAsyncCore() - { - if (_events is not null) - { - await _events.DisposeAsync().ConfigureAwait(false); - _events = null; - - // Dispose the response so we don't leave the network connection open. - _response?.Dispose(); - } - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageContentUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageContentUpdate.cs deleted file mode 100644 index 7474ecb24390..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageContentUpdate.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// Represents a streaming update to content as part of the Assistants API. -/// -/// -/// Distinct instances will be generated for each part -/// and each content subcomponent, such as instances, even if this information -/// arrived in the same response chunk. -/// -public partial class MessageContentUpdate : StreamingUpdate -{ - public string MessageId => _delta.Id; - - /// - public int MessageIndex => _textContent?.Index - ?? _imageFileContent?.Index - ?? TextAnnotation?.ContentIndex - ?? 0; - - public MessageRole? Role => _delta.Delta?.Role; - - public string ImageFileId => _imageFileContent?.ImageFile?.FileId; - - public string Text => _textContent?.Text?.Value; - - /// - /// An update to an annotation associated with a specific content item in the message's content items collection. - /// - public TextAnnotationUpdate TextAnnotation { get; } - - private readonly MessageDeltaImageFileContent _imageFileContent; - private readonly MessageDeltaTextContent _textContent; - private readonly MessageDeltaChunk _delta; - - internal MessageContentUpdate(MessageDeltaChunk delta, MessageDeltaContent content) - : base(StreamingUpdateReason.MessageUpdated) - { - _delta = delta; - _textContent = content as MessageDeltaTextContent; - _imageFileContent = content as MessageDeltaImageFileContent; - } - - internal MessageContentUpdate(MessageDeltaChunk delta, TextAnnotationUpdate annotation) - : base(StreamingUpdateReason.MessageUpdated) - { - _delta = delta; - TextAnnotation = annotation; - } - - internal static IEnumerable DeserializeMessageContentUpdates( - JsonElement element, - StreamingUpdateReason _, - ModelReaderWriterOptions options = null) - { - MessageDeltaChunk deltaObject = MessageDeltaChunk.DeserializeMessageDeltaChunk(element, options); - List updates = []; - foreach (MessageDeltaContent deltaContent in deltaObject.Delta.Content ?? []) - { - updates.Add(new(deltaObject, deltaContent)); - if (deltaContent is MessageDeltaTextContent textContent) - { - foreach (MessageDeltaTextAnnotation internalAnnotation in textContent.Text.Annotations) - { - TextAnnotationUpdate annotation = new(internalAnnotation); - updates.Add(new(deltaObject, annotation)); - } - } - } - return updates; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageDeltaTextAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageDeltaTextAnnotation.cs deleted file mode 100644 index f72aa742f751..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageDeltaTextAnnotation.cs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public abstract partial class MessageDeltaTextAnnotation - { - /// - /// 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" }. - /// - /// - /// - /// - [CodeGenMember("_serializedAdditionalRawData")] - internal protected IDictionary SerializedAdditionalRawData; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageStatusUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageStatusUpdate.cs deleted file mode 100644 index cd6553c70292..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/MessageStatusUpdate.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when the status of a message changes. -/// -public class MessageStatusUpdate : StreamingUpdate -{ - internal MessageStatusUpdate(ThreadMessage message, StreamingUpdateReason updateKind) - : base(message, updateKind) - { } - - internal static IEnumerable DeserializeMessageStatusUpdates( - JsonElement element, - StreamingUpdateReason updateKind, - ModelReaderWriterOptions options = null) - { - ThreadMessage message = ThreadMessage.DeserializeThreadMessage(element, options); - return updateKind switch - { - _ => [new MessageStatusUpdate(message, updateKind)], - }; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RequiredActionUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RequiredActionUpdate.cs deleted file mode 100644 index 7e098b52e39f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RequiredActionUpdate.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when the status of a has changed to requires_action, -/// indicating that tool output submission or another intervention is needed for the run to continue. -/// -/// -/// Distinct instances will generated for each required action, meaning that -/// parallel function calling will present multiple updates even if the tool calls arrive at the same time. -/// -public class RequiredActionUpdate : RunUpdate -{ - /// - public string FunctionName => AsFunctionCall?.Name; - - /// - public string FunctionArguments => AsFunctionCall?.Arguments; - - public string ToolCallId => AsFunctionCall?.Id; - - private RequiredFunctionToolCall AsFunctionCall => _requiredAction as RequiredFunctionToolCall; - - private readonly RequiredAction _requiredAction; - - internal RequiredActionUpdate(ThreadRun run, RequiredAction action) - : base(run, StreamingUpdateReason.RunRequiresAction) - { - _requiredAction = action; - } - - /// - /// Gets the full, deserialized instance associated with this streaming required action - /// update. - /// - /// - public ThreadRun GetThreadRun() => Value; - - internal static IEnumerable DeserializeRequiredActionUpdates(JsonElement element) - { - ThreadRun run = ThreadRun.DeserializeThreadRun(element); - List updates = []; - foreach (RequiredAction action in run.RequiredActions ?? []) - { - updates.Add(new(run, action)); - } - return updates; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDeltaToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDeltaToolCall.cs deleted file mode 100644 index 0b21b679988b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDeltaToolCall.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public abstract partial class RunStepDeltaToolCall - { - /// - /// 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" }. - /// - /// - /// - /// - [CodeGenMember("_serializedAdditionalRawData")] - internal protected IDictionary SerializedAdditionalRawData; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDetailsUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDetailsUpdate.cs deleted file mode 100644 index 3f2e79637524..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepDetailsUpdate.cs +++ /dev/null @@ -1,90 +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.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when run step details, including tool call progress, have changed. -/// -public class RunStepDetailsUpdate : StreamingUpdate -{ - internal readonly RunStepDeltaChunk _delta; - internal readonly RunStepDeltaToolCall _toolCall; - private readonly RunStepDeltaMessageCreation _asMessageCreation; - private readonly RunStepDeltaCodeInterpreterToolCall _asCodeCall; - private readonly RunStepDeltaFileSearchToolCall _asFileSearchCall; - private readonly RunStepDeltaFunctionToolCall _asFunctionCall; - - /// - public string StepId => _delta?.Id; - - /// - public string CreatedMessageId => _asMessageCreation?.MessageCreation?.MessageId; - - /// - public string ToolCallId - => _asCodeCall?.Id - ?? _asFileSearchCall?.Id - ?? _asFunctionCall?.Id - ?? (_toolCall?.SerializedAdditionalRawData?.TryGetValue("id", out BinaryData idData) == true - ? idData.ToString() - : null); - - /// - public int? ToolCallIndex => _asCodeCall?.Index ?? _asFileSearchCall?.Index ?? _asFunctionCall?.Index; - - /// - public string CodeInterpreterInput => _asCodeCall?.CodeInterpreter?.Input; - - /// - public IReadOnlyList CodeInterpreterOutputs - => _asCodeCall?.CodeInterpreter?.Outputs; - - /// - public string FunctionName => _asFunctionCall.Function?.Name; - - /// - public string FunctionArguments => _asFunctionCall?.Function?.Arguments; - - /// - public string FunctionOutput => _asFunctionCall?.Function?.Output; - - internal RunStepDetailsUpdate( - RunStepDeltaChunk stepDelta, - RunStepDeltaToolCall toolCall = null) - : base(StreamingUpdateReason.RunStepUpdated) - { - _asMessageCreation = stepDelta?.Delta?.StepDetails as RunStepDeltaMessageCreation; - _asCodeCall = toolCall as RunStepDeltaCodeInterpreterToolCall; - _asFileSearchCall = toolCall as RunStepDeltaFileSearchToolCall; - _asFunctionCall = toolCall as RunStepDeltaFunctionToolCall; - _delta = stepDelta; - _toolCall = toolCall; - } - - internal static IEnumerable DeserializeRunStepDetailsUpdates( - JsonElement element, - StreamingUpdateReason updateKind, - ModelReaderWriterOptions options = null) - { - RunStepDeltaChunk stepDelta = RunStepDeltaChunk.DeserializeRunStepDeltaChunk(element, options); - List updates = []; - if (stepDelta?.Delta?.StepDetails is RunStepDeltaMessageCreation) - { - updates.Add(new RunStepDetailsUpdate(stepDelta)); - } - else if (stepDelta?.Delta?.StepDetails is RunStepDeltaToolCallObject toolCalls) - { - foreach (RunStepDeltaToolCall toolCall in toolCalls.ToolCalls) - { - updates.Add(new RunStepDetailsUpdate(stepDelta, toolCall)); - } - } - return updates; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepUpdate.cs deleted file mode 100644 index f92f0f4da9c4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunStepUpdate.cs +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when the status of a run step changes. -/// -public class RunStepUpdate : StreamingUpdate -{ - internal RunStepUpdate(RunStep runStep, StreamingUpdateReason updateKind) - : base(runStep, updateKind) - { } - - internal static IEnumerable> DeserializeRunStepUpdates( - JsonElement element, - StreamingUpdateReason updateKind, - ModelReaderWriterOptions options = null) - { - RunStep runStep = RunStep.DeserializeRunStep(element, options); - return updateKind switch - { - _ => new List> { new RunStepUpdate(runStep, updateKind) }, - }; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunUpdate.cs deleted file mode 100644 index f90c8e0f0cf4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/RunUpdate.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when the status of a has changed. -/// -public class RunUpdate : StreamingUpdate -{ - internal RunUpdate(ThreadRun run, StreamingUpdateReason updateKind) : base(run, updateKind) - { } - - internal static IEnumerable> DeserializeRunUpdates( - JsonElement element, - StreamingUpdateReason updateKind, - ModelReaderWriterOptions options = null) - { - ThreadRun run = ThreadRun.DeserializeThreadRun(element, options); - return updateKind switch - { - _ => new List> { new RunUpdate(run, updateKind) }, - }; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdate.cs deleted file mode 100644 index d284d1b0e156..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdate.cs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; -using System.Net.ServerSentEvents; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// Represents a single item of streamed Assistants API data. -/// -/// -/// Please note that this is the abstract base type. To access data, downcast an instance of this type to an -/// appropriate, derived update type: -/// -/// For messages: , -/// -/// -/// For runs and run steps: , , , -/// -/// -/// -/// For threads: -/// -/// -public abstract partial class StreamingUpdate -{ - /// - /// A value indicating what type of event this update represents. - /// - /// - /// Many events share the same response type. For example, and - /// are both associated with a instance. - /// You can use the value of to differentiate between these events when the type is not - /// sufficient to do so. - /// - public StreamingUpdateReason UpdateKind { get; } - - internal StreamingUpdate(StreamingUpdateReason updateKind) - { - UpdateKind = updateKind; - } - - internal static IEnumerable FromEvent(SseItem sseItem) - { - StreamingUpdateReason updateKind = StreamingUpdateReasonExtensions.FromSseEventLabel(sseItem.EventType); - using JsonDocument dataDocument = JsonDocument.Parse(sseItem.Data); - JsonElement e = dataDocument.RootElement; - - return updateKind switch - { - StreamingUpdateReason.ThreadCreated => ThreadUpdate.DeserializeThreadCreationUpdates(e, updateKind), - StreamingUpdateReason.RunCreated - or StreamingUpdateReason.RunQueued - or StreamingUpdateReason.RunInProgress - or StreamingUpdateReason.RunCompleted - or StreamingUpdateReason.RunIncomplete - or StreamingUpdateReason.RunFailed - or StreamingUpdateReason.RunCancelling - or StreamingUpdateReason.RunCancelled - or StreamingUpdateReason.RunExpired => RunUpdate.DeserializeRunUpdates(e, updateKind), - StreamingUpdateReason.RunRequiresAction => RequiredActionUpdate.DeserializeRequiredActionUpdates(e), - StreamingUpdateReason.RunStepCreated - or StreamingUpdateReason.RunStepInProgress - or StreamingUpdateReason.RunStepCompleted - or StreamingUpdateReason.RunStepFailed - or StreamingUpdateReason.RunStepCancelled - or StreamingUpdateReason.RunStepExpired => RunStepUpdate.DeserializeRunStepUpdates(e, updateKind), - StreamingUpdateReason.MessageCreated - or StreamingUpdateReason.MessageInProgress - or StreamingUpdateReason.MessageCompleted - or StreamingUpdateReason.MessageFailed => MessageStatusUpdate.DeserializeMessageStatusUpdates(e, updateKind), - StreamingUpdateReason.RunStepUpdated => RunStepDetailsUpdate.DeserializeRunStepDetailsUpdates(e, updateKind), - StreamingUpdateReason.MessageUpdated => MessageContentUpdate.DeserializeMessageContentUpdates(e, updateKind), - _ => null, - }; - } -} - -/// -/// Represents a single item of streamed data that encapsulates an underlying response value type. -/// -/// The response value type of the "delta" payload. -public partial class StreamingUpdate : StreamingUpdate - where T : class -{ - /// - /// The underlying response value received with the streaming event. - /// - public T Value { get; } - - internal StreamingUpdate(T value, StreamingUpdateReason updateKind) - : base(updateKind) - { - Value = value; - } - - /// - /// Implicit operator that allows the underlying value type of the to be used - /// directly. - /// - /// - public static implicit operator T(StreamingUpdate update) => update.Value; -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateCollection.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateCollection.cs deleted file mode 100644 index c2f0d5f417f4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateCollection.cs +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel; -using System.ClientModel.Primitives; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Net.ServerSentEvents; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; - -#nullable enable - -namespace Azure.AI.Projects; - -/// -/// Implementation of collection abstraction over streaming assistant updates. -/// -internal class StreamingUpdateCollection : CollectionResult -{ - private readonly Func _sendRequest; - private readonly CancellationToken _cancellationToken; - private readonly ToolCallsResolver? _toolCallsResolver; - private readonly Func, int, CollectionResult> _submitToolOutputsToStream; - private readonly int _maxRetry; - private int _currRetry; - private readonly Func> _cancelRun; - - public StreamingUpdateCollection( - CancellationToken cancellationToken, - AutoFunctionCallOptions autoFunctionCallOptions, - int currentRetry, - Func sendRequest, - Func> cancelRun, - Func, int, CollectionResult> submitToolOutputsToStream) - { - Argument.AssertNotNull(sendRequest, nameof(sendRequest)); - - _cancellationToken = cancellationToken; - _sendRequest = sendRequest; - _submitToolOutputsToStream = submitToolOutputsToStream; - if (autoFunctionCallOptions != null) - { - _toolCallsResolver = new(autoFunctionCallOptions.AutoFunctionCallDelegates); - _maxRetry = autoFunctionCallOptions.MaxRetry; - } - _currRetry = currentRetry; - _cancelRun = cancelRun; - } - - public override ContinuationToken? GetContinuationToken(ClientResult page) - // Continuation is not supported for SSE streams. - => null; - - public override IEnumerable GetRawPages() - { - Response response = _sendRequest(); - PipelineResponse scmResponse = new ResponseAdapter(response); - - // We don't currently support resuming a dropped connection from the - // last received event, so the response collection has a single element. - yield return ClientResult.FromResponse(scmResponse); - } - protected override IEnumerable GetValuesFromPage(ClientResult page) - { - ThreadRun? streamRun = null; - List toolOutputs = new(); - do - { - using IEnumerator enumerator = (toolOutputs.Count > 0 && streamRun != null) ? - _submitToolOutputsToStream(streamRun, toolOutputs, _currRetry).GetEnumerator() : - new StreamingUpdateEnumerator(page, _cancellationToken); - toolOutputs.Clear(); - bool hasError = false; - while (enumerator.MoveNext()) - { - var streamingUpdate = enumerator.Current; - if (streamingUpdate is RequiredActionUpdate newActionUpdate && _toolCallsResolver != null) - { - ToolOutput toolOutput; - try - { - toolOutput = _toolCallsResolver.GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - ); - } - catch (Exception ex) - { - string errorJson = JsonSerializer.Serialize(new { error = ex.GetBaseException().Message }); - toolOutput = new ToolOutput(newActionUpdate.ToolCallId, errorJson); - hasError = true; - } - toolOutputs.Add(toolOutput); - - streamRun = newActionUpdate.Value; - } - else - { - yield return streamingUpdate; - } - } - _currRetry = hasError ? _currRetry + 1 : _currRetry; - - if (streamRun != null && _currRetry > _maxRetry) - { - // Cancel the run if the max retry is reached - var cancelRunResponse = _cancelRun(streamRun.Id); - yield return new StreamingUpdate(cancelRunResponse.Value, StreamingUpdateReason.RunCancelled); - yield break; - } - } - while (toolOutputs.Count > 0); - } - - private sealed class StreamingUpdateEnumerator : IEnumerator - { - private static ReadOnlySpan TerminalData => "[DONE]"u8; - - private readonly CancellationToken _cancellationToken; - private readonly PipelineResponse _response; - - // These enumerators represent what is effectively a doubly-nested - // loop over the outer event collection and the inner update collection, - // i.e.: - // foreach (var sse in _events) { - // // get _updates from sse event - // foreach (var update in _updates) { ... } - // } - private IEnumerator>? _events; - private IEnumerator? _updates; - - private StreamingUpdate? _current; - private bool _started; - - public StreamingUpdateEnumerator(ClientResult page, CancellationToken cancellationToken) - { - Argument.AssertNotNull(page, nameof(page)); - - _response = page.GetRawResponse(); - _cancellationToken = cancellationToken; - } - - StreamingUpdate IEnumerator.Current - => _current!; - - object IEnumerator.Current => _current!; - - public bool MoveNext() - { - if (_events is null && _started) - { - throw new ObjectDisposedException(nameof(StreamingUpdateEnumerator)); - } - - _cancellationToken.ThrowIfCancellationRequested(); - _events ??= CreateEventEnumerator(); - _started = true; - - if (_updates is not null && _updates.MoveNext()) - { - _current = _updates.Current; - return true; - } - - if (_events.MoveNext()) - { - if (_events.Current.Data.AsSpan().SequenceEqual(TerminalData)) - { - _current = default; - return false; - } - - var updates = StreamingUpdate.FromEvent(_events.Current); - _updates = updates.GetEnumerator(); - - if (_updates.MoveNext()) - { - _current = _updates.Current; - return true; - } - } - - _current = default; - return false; - } - - private IEnumerator> CreateEventEnumerator() - { - if (_response.ContentStream is null) - { - throw new InvalidOperationException("Unable to create result from response with null ContentStream"); - } - - IEnumerable> enumerable = SseParser.Create(_response.ContentStream, (_, bytes) => bytes.ToArray()).Enumerate(); - return enumerable.GetEnumerator(); - } - - public void Reset() - { - throw new NotSupportedException("Cannot seek back in an SSE stream."); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - private void Dispose(bool disposing) - { - if (disposing && _events is not null) - { - _events.Dispose(); - _events = null; - - // Dispose the response so we don't leave the network connection open. - _response?.Dispose(); - } - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.Serialization.cs deleted file mode 100644 index e6786d15336e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.Serialization.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects; - -internal static class StreamingUpdateReasonExtensions -{ - internal static string ToSseEventLabel(this StreamingUpdateReason value) => value switch - { - StreamingUpdateReason.ThreadCreated => "thread.created", - StreamingUpdateReason.RunCreated => "thread.run.created", - StreamingUpdateReason.RunQueued => "thread.run.queued", - StreamingUpdateReason.RunInProgress => "thread.run.in_progress", - StreamingUpdateReason.RunRequiresAction => "thread.run.requires_action", - StreamingUpdateReason.RunCompleted => "thread.run.completed", - StreamingUpdateReason.RunFailed => "thread.run.failed", - StreamingUpdateReason.RunCancelling => "thread.run.cancelling", - StreamingUpdateReason.RunCancelled => "thread.run.cancelled", - StreamingUpdateReason.RunExpired => "thread.run.expired", - StreamingUpdateReason.RunStepCreated => "thread.run.step.created", - StreamingUpdateReason.RunStepInProgress => "thread.run.step.in_progress", - StreamingUpdateReason.RunStepUpdated => "thread.run.step.delta", - StreamingUpdateReason.RunStepCompleted => "thread.run.step.completed", - StreamingUpdateReason.RunStepFailed => "thread.run.step.failed", - StreamingUpdateReason.RunStepCancelled => "thread.run.step.cancelled", - StreamingUpdateReason.RunStepExpired => "thread.run.step.expired", - StreamingUpdateReason.MessageCreated => "thread.message.created", - StreamingUpdateReason.MessageInProgress => "thread.message.in_progress", - StreamingUpdateReason.MessageUpdated => "thread.message.delta", - StreamingUpdateReason.MessageCompleted => "thread.message.completed", - StreamingUpdateReason.MessageFailed => "thread.message.incomplete", - StreamingUpdateReason.Error => "error", - StreamingUpdateReason.Done => "done", - _ => string.Empty - }; - - internal static StreamingUpdateReason FromSseEventLabel(string label) => label switch - { - "thread.created" => StreamingUpdateReason.ThreadCreated, - "thread.run.created" => StreamingUpdateReason.RunCreated, - "thread.run.queued" => StreamingUpdateReason.RunQueued, - "thread.run.in_progress" => StreamingUpdateReason.RunInProgress, - "thread.run.requires_action" => StreamingUpdateReason.RunRequiresAction, - "thread.run.completed" => StreamingUpdateReason.RunCompleted, - "thread.run.incomplete" => StreamingUpdateReason.RunIncomplete, - "thread.run.failed" => StreamingUpdateReason.RunFailed, - "thread.run.cancelling" => StreamingUpdateReason.RunCancelling, - "thread.run.cancelled" => StreamingUpdateReason.RunCancelled, - "thread.run.expired" => StreamingUpdateReason.RunExpired, - "thread.run.step.created" => StreamingUpdateReason.RunStepCreated, - "thread.run.step.in_progress" => StreamingUpdateReason.RunStepInProgress, - "thread.run.step.delta" => StreamingUpdateReason.RunStepUpdated, - "thread.run.step.completed" => StreamingUpdateReason.RunStepCompleted, - "thread.run.step.failed" => StreamingUpdateReason.RunStepFailed, - "thread.run.step.cancelled" => StreamingUpdateReason.RunStepCancelled, - "thread.run.step.expired" => StreamingUpdateReason.RunStepExpired, - "thread.message.created" => StreamingUpdateReason.MessageCreated, - "thread.message.in_progress" => StreamingUpdateReason.MessageInProgress, - "thread.message.delta" => StreamingUpdateReason.MessageUpdated, - "thread.message.completed" => StreamingUpdateReason.MessageCompleted, - "thread.message.incomplete" => StreamingUpdateReason.MessageFailed, - "error" => StreamingUpdateReason.Error, - "done" => StreamingUpdateReason.Done, - _ => StreamingUpdateReason.Unknown, - }; -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.cs deleted file mode 100644 index 54a982496928..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/StreamingUpdateReason.cs +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Diagnostics.CodeAnalysis; - -namespace Azure.AI.Projects; - -/// -/// The collection of values associated with the event names of streaming update payloads. These correspond to the -/// expected downcast data type of the as well as to the expected data present in the -/// payload. -/// -public enum StreamingUpdateReason -{ - /// - /// Indicates that there is no known reason associated with the streaming update. - /// - Unknown, - /// - /// Indicates that an update was generated as part of a thread.created event. - /// - /// This reason is typically only associated with calls to - /// , - /// as other run-related methods operate on a thread that has previously been created. - /// - ThreadCreated, - /// - /// Indicates that an update was generated as part of a thread.run.created event. - /// - RunCreated, - /// - /// Indicates that an update was generated as part of a thread.run.queued event. - /// - RunQueued, - /// - /// Indicates that an update was generated as part of a thread.run.in_progress event. - /// - RunInProgress, - /// - /// Indicates that an update was generated as part of a thread.run.requires_action event. - /// - /// - /// Note that, if multiple actions occur within a single event, as can be the case with the parallel tool calling, - /// distinct instances will be generated for each - /// . - /// - RunRequiresAction, - /// - /// Indicates that an update was generated as part of a thread.run.completed event. - /// - RunCompleted, - /// - /// Indicates that an update was generated as part of a thread.run.incomplete event. - /// - RunIncomplete, - /// - /// Indicates that an update was generated as part of a thread.run.failed event. - /// - RunFailed, - /// - /// Indicates that an update was generated as part of a thread.run.cancelling event. - /// - RunCancelling, - /// - /// Indicates that an update was generated as part of a thread.run.cancelled event. - /// - RunCancelled, - /// - /// Indicates that an update was generated as part of a thread.run.expired event. - /// - RunExpired, - /// - /// Indicates that an update was generated as part of a thread.run.step.created event. - /// - RunStepCreated, - /// - /// Indicates that an update was generated as part of a thread.run.step.in_progress event. - /// - RunStepInProgress, - /// - /// Indicates that an update was generated as part of a thread.run.step.delta event. - /// - RunStepUpdated, - /// - /// Indicates that an update was generated as part of a thread.run.step.completed event. - /// - RunStepCompleted, - /// - /// Indicates that an update was generated as part of a thread.run.step.failed event. - /// - RunStepFailed, - /// - /// Indicates that an update was generated as part of a thread.run.step.cancelled event. - /// - RunStepCancelled, - /// - /// Indicates that an update was generated as part of a thread.run.step.expired event. - /// - RunStepExpired, - /// - /// Indicates that an update was generated as part of a thread.message.created event. - /// - MessageCreated, - /// - /// Indicates that an update was generated as part of a thread.message.in_progress event. - /// - MessageInProgress, - /// - /// Indicates that an update was generated as part of a thread.message.delta event. - /// - /// - /// Distinct instances will be created per each content update and/or content - /// annotation present on the event. - /// - MessageUpdated, - /// - /// Indicates that an update was generated as part of a thread.message.completed event. - /// - MessageCompleted, - /// - /// Indicates that an update was generated as part of a thread.message.failed event. - /// - MessageFailed, - /// - /// Indicates that an update was generated as part of a thread.message.error event. - /// - Error, - /// - /// Indicates the end of streaming update events. This value should never be typically observed. - /// - Done, -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/TextAnnotationUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/TextAnnotationUpdate.cs deleted file mode 100644 index 49ce05e50ea0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/TextAnnotationUpdate.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; - -namespace Azure.AI.Projects; - -public class TextAnnotationUpdate -{ - /// - /// The index of the content item that this annotation applies to. - /// - public int ContentIndex - => _fileSearchCitation?.Index - ?? _codeCitation?.Index - ?? _urlAnnotation?.Index - ?? (_internalAnnotation?.SerializedAdditionalRawData.TryGetValue("index", out BinaryData indexData) == true - ? int.Parse(indexData.ToString()) - : -1); - - /// - /// The index in the message content at which the citation begins. - /// - public int? StartIndex - => _fileSearchCitation?.StartIndex - ?? _codeCitation?.StartIndex - ?? _urlAnnotation?.StartIndex - ?? (_internalAnnotation?.SerializedAdditionalRawData.TryGetValue("start_index", out BinaryData indexData) == true - ? int.Parse(indexData.ToString()) - : null); - - /// - /// The index in the message content at which the citation ends. - /// - public int? EndIndex - => _fileSearchCitation?.EndIndex - ?? _codeCitation?.EndIndex - ?? _urlAnnotation?.EndIndex - ?? (_internalAnnotation?.SerializedAdditionalRawData.TryGetValue("start_index", out BinaryData indexData) == true - ? int.Parse(indexData.ToString()) - : null); - - /// - /// The text in the message content that should be replaced. - /// - public string TextToReplace - => _fileSearchCitation?.Text - ?? _codeCitation?.Text - ?? (_internalAnnotation?.SerializedAdditionalRawData?.TryGetValue("text", out BinaryData textData) == true - ? textData.ToString() - : null); - - /// - /// The ID of the file cited by the file_search tool for this annotation. - /// - public string InputFileId => _fileSearchCitation?.FileCitation?.FileId; - - /// - /// The url from url annotation if any. - /// - public string Url => _urlAnnotation?.UrlCitation?.Url; - - /// - /// The title from url annotation if any. - /// - public string Title => _urlAnnotation?.UrlCitation?.Title; - - /// - /// The ID of the file that was generated by the code_interpreter tool for this citation. - /// - public string OutputFileId => _codeCitation?.FilePath?.FileId; - - internal readonly MessageDeltaTextAnnotation _internalAnnotation; - private readonly MessageDeltaTextFileCitationAnnotation _fileSearchCitation; - private readonly MessageDeltaTextFilePathAnnotation _codeCitation; - private readonly MessageDeltaTextUrlCitationAnnotation _urlAnnotation; - - internal TextAnnotationUpdate(MessageDeltaTextAnnotation internalAnnotation) - { - _internalAnnotation = internalAnnotation; - _fileSearchCitation = internalAnnotation as MessageDeltaTextFileCitationAnnotation; - _codeCitation = internalAnnotation as MessageDeltaTextFilePathAnnotation; - _urlAnnotation = internalAnnotation as MessageDeltaTextUrlCitationAnnotation; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/ThreadUpdate.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/ThreadUpdate.cs deleted file mode 100644 index 21970cb04e4e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/Streaming/ThreadUpdate.cs +++ /dev/null @@ -1,41 +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.Diagnostics.CodeAnalysis; -using System.Text.Json; - -namespace Azure.AI.Projects; - -/// -/// The update type presented when a streamed event indicates a thread was created. -/// -public class ThreadUpdate : StreamingUpdate -{ - /// - public string Id => Value.Id; - /// - public IReadOnlyDictionary Metadata => Value.Metadata; - /// - public DateTimeOffset CreatedAt => Value.CreatedAt; - /// - public ToolResources ToolResources => Value.ToolResources; - - internal ThreadUpdate(AgentThread thread) : base(thread, StreamingUpdateReason.ThreadCreated) - { } - - internal static IEnumerable> DeserializeThreadCreationUpdates( - JsonElement element, - StreamingUpdateReason updateKind, - ModelReaderWriterOptions options = null) - { - AgentThread thread = AgentThread.DeserializeAgentThread(element, options); - return updateKind switch - { - StreamingUpdateReason.ThreadCreated => new List> { new ThreadUpdate(thread) }, - _ => new List> { new StreamingUpdate(thread, updateKind) }, - }; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/SubmitToolOutputsAction.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/SubmitToolOutputsAction.cs deleted file mode 100644 index 965a204eb470..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/SubmitToolOutputsAction.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Collections.Generic; - -namespace Azure.AI.Projects; - -public partial class SubmitToolOutputsAction : RequiredAction -{ - /* - * CUSTOM CODE DESCRIPTION: - * - * Used to superficially combine function tool calls and their vacuous container type. - * Before: toolOutputsAction.SubmitToolOutputs.ToolCalls - * After : toolOutputsAction.ToolCalls - */ - - /// - public IReadOnlyList ToolCalls => InternalDetails.ToolCalls; - - /// The details describing tools that should be called to submit tool outputs. - internal InternalSubmitToolOutputsDetails InternalDetails { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessage.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessage.cs deleted file mode 100644 index 47310b8f300b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessage.cs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - -public partial class ThreadMessage -{ - internal string Object { get; } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessageOptions.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessageOptions.cs deleted file mode 100644 index 836a740c83bd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadMessageOptions.cs +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// - /// Represents the options for creating or adding a message in an agent thread. This class provides - /// convenient ways to specify the message role (e.g., user or assistant) and the message content, - /// which can be either plain text or one or more structured content blocks (e.g., text, images). - /// - /// - /// This partial class builds on the generated code, offering two primary ways to define a message: - /// - /// - /// A single string for simple textual content. - /// - /// - /// - /// A list of items for more advanced scenarios, such - /// as including multiple blocks of text, images, or other media. - /// - /// - /// - /// - public partial class ThreadMessageOptions - { - /// - /// Initializes a new instance of the class, setting - /// the message content to a single, plain-text string. - /// - /// - /// The role of the entity creating the message (e.g., user or agent). - /// Valid values typically include or . - /// - /// - /// The plain-text content of the message. If is null, - /// an is thrown. - /// - /// Thrown when is null. - /// - /// The string is internally converted into a structure for further processing. - /// This overload suits simple scenarios where only a single text block is needed. - /// - public ThreadMessageOptions(MessageRole role, string content) - : this( - role, - content is null - ? throw new ArgumentNullException(nameof(content)) - : BinaryData.FromObjectAsJson(content)) - { - // Calls the generated constructor (MessageRole, BinaryData). - } - - /// - /// Initializes a new instance of the class, converting - /// one or more structured blocks into JSON and storing them as . - /// - /// - /// The role of the entity creating the message (e.g., user or agent). - /// Valid values typically include or . - /// - /// - /// A collection of specialized content blocks (e.g., , - /// , ) - /// that can include text, images, or other media. - /// - /// Thrown when is null. - /// - /// Each block expresses a particular piece of message content or media. This overload is best for advanced - /// scenarios where messages contain multiple text segments, embedded images, or a mix of different content types. - /// - public ThreadMessageOptions(MessageRole role, IEnumerable contentBlocks) - : this( - role, - contentBlocks is null - ? throw new ArgumentNullException(nameof(contentBlocks)) - : SerializeContentBlocks(contentBlocks)) - { - // Invokes the generated constructor (MessageRole, BinaryData). - } - - /// - /// Converts a collection of instances into - /// a JSON array, storing the resulting JSON as . - /// - /// The collection of content blocks to be serialized. - /// A instance containing the JSON array. - private static BinaryData SerializeContentBlocks(IEnumerable contentBlocks) - { - var jsonElements = new List(); - - foreach (MessageInputContentBlock block in contentBlocks) - { - using var memStream = new MemoryStream(); - - // Convert the block into a JSON payload by writing to a MemoryStream. - block.ToRequestContent().WriteTo(memStream, default); - - // Reset stream position to the beginning. - memStream.Position = 0; - - // Parse to a JsonDocument, then clone the root element for safe reuse. - using var tempDoc = JsonDocument.Parse(memStream); - jsonElements.Add(tempDoc.RootElement.Clone()); - } - - // Serialize the array of JsonElements into a single BinaryData. - return BinaryData.FromObjectAsJson(jsonElements); - } - - /// - /// Deserializes the underlying message content (stored as ) into a plain string. - /// - /// The original text string if the content was provided in that format; otherwise, a JSON parsing error may occur. - /// - /// Thrown if the binary content cannot be deserialized as a string (e.g., it was originally a collection of blocks). - /// - /// - /// Use this method when you know or expect that was originally provided as a single plain-text string. - /// For richer content, see . - /// - public string GetTextContent() => Content.ToObjectFromJson(); - - /// - /// Deserializes the underlying message content (stored as ) into a - /// collection of objects. - /// - /// - /// A sequence of content blocks if the original data was supplied as multiple structured elements. - /// - /// - /// Thrown if the binary content cannot be deserialized as a collection of . - /// - /// - /// Use this method when you know or expect that was provided as - /// one or more structured content blocks. If the message content was just a single string, - /// this may cause a deserialization error. - /// - public IEnumerable GetContentBlocks() - => Content.ToObjectFromJson>(); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadRun.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadRun.cs deleted file mode 100644 index c7ebaf9e23f1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ThreadRun.cs +++ /dev/null @@ -1,54 +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.CompilerServices; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects; - -[CodeGenSerialization(nameof(StartedAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(ExpiresAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(CompletedAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(CancelledAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -[CodeGenSerialization(nameof(FailedAt), DeserializationValueHook = nameof(DeserializeNullableDateTimeOffset))] -public partial class ThreadRun -{ - /* - * CUSTOM CODE DESCRIPTION: - * - * This change allows us to complete the customization of hiding an unnecessary "Object" discriminator. - */ - internal string Object { get; } - - /// - /// The list of required actions that must have their results submitted for the run to continue. - /// - /// - /// is the abstract base type for all required actions. Its - /// concrete type can be one of: - /// - /// - /// - /// - public IReadOnlyList RequiredActions => - RequiredAction is SubmitToolOutputsAction submitToolOutputsAction - ? submitToolOutputsAction.ToolCalls.OfType().ToList() - : new List(); - - /* - * CUSTOM CODE DESCRIPTION: - * - * "Required but nullable" utcDateTime doesn't emit the appropriate deserialization logic by default. - * - */ - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static void DeserializeNullableDateTimeOffset( - JsonProperty property, - ref DateTimeOffset? targetDateTimeOffset) - => CustomSerializationHelpers.DeserializeNullableDateTimeOffset(property, ref targetDateTimeOffset); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolCallsResolver.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolCallsResolver.cs deleted file mode 100644 index 6aa9b5be2e4b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolCallsResolver.cs +++ /dev/null @@ -1,214 +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.Reflection; -using System.Text.Json; - -namespace Azure.AI.Projects -{ - /// - /// ToolCallsResolver is used to resolve tool calls in the streaming API. - /// - internal class ToolCallsResolver - { - private readonly Dictionary _toolDelegates = new(); - - internal ToolCallsResolver(Dictionary toolDelegates) - { - _toolDelegates = toolDelegates; - } - - /// - /// Resolves the tool call by invoking the delegate associated with the function name. - /// It casts the function arguments to the appropriate types based on the delegate's parameters. - /// without knowing the answer. - /// - internal ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) - { - if (!_toolDelegates.TryGetValue(functionName, out var func)) - { - string error = $"Function {functionName} not found."; - throw new MissingMethodException(error); - } - - var result = Resolve(func, functionArguments); - return new ToolOutput(toolCallId, result == null ? "" : result.ToString()); - } - - /// - /// Resolves the function call by invoking the delegate associated with the function name. - /// - /// - /// - /// - internal static object Resolve(Delegate function, string functionArguments) - { - JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); - MethodInfo method = function.Method; - var args = new List(); - foreach (ParameterInfo param in function.Method.GetParameters()) - { - if (argumentsJson.RootElement.TryGetProperty(param.Name ?? "", out JsonElement element)) - { - object val = GetArgumentValue(param.Name, param.ParameterType, element); - args.Add(val); - } - else if (param.DefaultValue != null) - { - args.Add(param.DefaultValue); - } - // check if the value is not in arguments, but the parameter is required, throw error - else if (Nullable.GetUnderlyingType(param.ParameterType) == null) - { - throw new ArgumentException($"Missing required argument {param.Name} for function {function.Method.Name}"); - } - } - return function.DynamicInvoke(args.ToArray()); - } - - private static object GetArgumentValue(string name, Type type, JsonElement element) - { - if (type == typeof(string)) - { - return element.GetString(); - } - else if (type == typeof(int)) - { - if (element.TryGetInt32(out int val)) - return val; - } - else if (type == typeof(ushort)) - { - if (element.TryGetInt16(out short val)) - return val; - } - else if (type == typeof(float)) - { - if (element.TryGetSingle(out float val)) - return val; - } - else if (type == typeof(uint)) - { - if (element.TryGetUInt32(out uint val)) - return val; - } - else if (type == typeof(decimal)) - { - if (element.TryGetDecimal(out decimal val)) - return val; - } - else if (type == typeof(double)) - { - if (element.TryGetDouble(out double val)) - return val; - } - else if (type == typeof(long)) - { - if (element.TryGetInt64(out long val)) - return val; - } - else if (type == typeof(bool)) - { - if (TryParseBoolean(element, out bool? val)) - return val; - } - // TODO: the following code has been testedwith Dictionary, - // deserializable Address class with address and city fields - // and Address[]. But need more testings. - //else if (type == typeof(object)) - //{ - // return element.GetRawText(); - //} - //else if (IsDictionaryType(type)) - //{ - // Type[] genericArguments = type.GetGenericArguments(); - // Type dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeof(string), genericArguments[1]); - - // // Create an instance of the dictionary - // var dict = Activator.CreateInstance(dictionaryType); - - // MethodInfo addMethod = dictionaryType.GetMethod("Add"); - - // foreach (var prop in element.EnumerateObject()) - // { - // object val = GetArgumentValue(prop.Name, genericArguments[1], prop.Value); - // addMethod.Invoke(dict, [prop.Name, val]); - // } - // return dict; - //} - //else if (type.IsArray) - //{ - // Type elementType = type.GetElementType()!; - // Array array = Array.CreateInstance(elementType, element.GetArrayLength()); - // int i = 0; - // foreach (var item in element.EnumerateArray()) - // { - // object val = GetArgumentValue(name, elementType, item); - // array.SetValue(val, i++); - // } - // return array; - //} - //else if (TryDeserialize(element.GetRawText(), type, out object val)) - //{ - // return val; - //} - throw new ArgumentException($"Received {element.GetRawText()}, but {name} in function implementation is {type}"); - } - - /// - /// JsonElement doesn't offer TryGetBoolean but offers GetBoolean that can throw exception - /// With that said, we need to create a custom TryGetBoolean method - /// - private static bool TryParseBoolean(JsonElement element, out bool? value) - { - switch (element.ValueKind) - { - case JsonValueKind.True: - value = true; - return true; - case JsonValueKind.False: - value = false; - return true; - default: - value = default; - return false; - } - } - - // Uncommon this to support deserializable class - //private static bool TryDeserialize(string input, Type type, out object obj) - //{ - // try - // { - // obj = JsonSerializer.Deserialize(input, type, new JsonSerializerOptions() { PropertyNameCaseInsensitive = true }); - // return true; - // } - // catch (JsonException) - // { - // obj = null; - // return false; - // } - //} - - // Uncommon this to support dictionary - //private static bool IsDictionaryType(Type type) - //{ - // // Check if the type is a generic type - // if (type.IsGenericType) - // { - // // Get the generic type definition - // Type genericTypeDefinition = type.GetGenericTypeDefinition(); - - // // Check if the generic type definition is Dictionary<,> - // if (genericTypeDefinition == typeof(Dictionary<,>)) - // { - // return true; - // } - // } - - // return false; - //} - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolOutput.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolOutput.cs deleted file mode 100644 index f86386eb862f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/ToolOutput.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -namespace Azure.AI.Projects; - -/* - * CUSTOM CODE DESCRIPTION: - * - * This extends constructor support to allow broader combinations of tool call and output as parameters. - */ - -public partial class ToolOutput -{ - /// Initializes a new instance of . - /// The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. - /// - /// When using this constructor, the property should be set prior to submission. - /// - public ToolOutput(string toolCallId) - { - ToolCallId = toolCallId; - } - - /// Initializes a new instance of . - /// The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. - /// The output from the tool to be submitted. - public ToolOutput(string toolCallId, string output) - { - ToolCallId = toolCallId; - Output = output; - } - - /// Initializes a new instance of . - /// The tool call the output will resolve, as provided in a required action from a run. - /// - /// When using this constructor, the property should be set prior to submission. - /// - public ToolOutput(RequiredToolCall toolCall) - { - ToolCallId = toolCall.Id; - } - - /// Initializes a new instance of . - /// The tool call the output will resolve, as provided in a required action from a run. - /// The output from the tool to be submitted. - /// - /// When using this constructor, the property should be set prior to submission. - /// - public ToolOutput(RequiredToolCall toolCall, string output) - { - ToolCallId = toolCall.Id; - Output = output; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/UploadFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Agent/UploadFileRequest.Serialization.cs deleted file mode 100644 index 2b4bf72a4577..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Agent/UploadFileRequest.Serialization.cs +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.Projects; - -internal partial class UploadFileRequest : IUtf8JsonSerializable -{ - /* - * CUSTOM CODE DESCRIPTION: - * - * Manual, custom multipart/form-data serialization needed. - * - */ - - internal virtual MultipartFormDataRequestContent ToMultipartRequestContent() - { - MultipartFormDataRequestContent content = new(); - content.Add(Data.Contents, "file", Filename); - content.Add(Purpose.ToString(), "purpose"); - return content; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AuthenticationType.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AuthenticationType.Serialization.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/AuthenticationType.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Custom/AuthenticationType.Serialization.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AuthenticationType.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AuthenticationType.cs similarity index 100% rename from sdk/ai/Azure.AI.Projects/src/Generated/AuthenticationType.cs rename to sdk/ai/Azure.AI.Projects/src/Custom/AuthenticationType.cs diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/ClientHelper.cs b/sdk/ai/Azure.AI.Projects/src/Custom/ClientHelper.cs deleted file mode 100644 index eef17e25f154..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/ClientHelper.cs +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; - -namespace Azure.AI.Projects -{ - internal class ClientHelper - { - // Connection string format: ;;; - public static string ParseConnectionString(string connectionString, string resourceName) - { - Argument.AssertNotNullOrEmpty(connectionString, nameof(connectionString)); - - // Split the connection string by ';' - var parts = connectionString.Split(';'); - if (parts.Length != 4) - { - throw new ArgumentException("Invalid connection string format. Expected format: ;;;", nameof(connectionString)); - } - - switch (resourceName.ToLower()) - { - case "endpoint": - return "https://" + parts[0]; - case "subscriptionid": - return parts[1]; - case "resourcegroupname": - return parts[2]; - case "projectname": - return parts[3]; - default: - throw new ArgumentException($"Invalid resource name: {resourceName}"); - } - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionProperties.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionProperties.cs deleted file mode 100644 index 47ccd0c0c6e1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionProperties.cs +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.AI.Projects -{ - [CodeGenModel("InternalConnectionProperties")] - public abstract partial class ConnectionProperties - { - /// Authentication type of the connection target. - public AuthenticationType AuthType { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionPropertiesApiKeyAuth.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionPropertiesApiKeyAuth.cs deleted file mode 100644 index b3b7f41f6f4a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionPropertiesApiKeyAuth.cs +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core; - -namespace Azure.AI.Projects -{ - [CodeGenModel("InternalConnectionPropertiesApiKeyAuth")] - public partial class ConnectionPropertiesApiKeyAuth : ConnectionProperties - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionResponse.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionResponse.cs deleted file mode 100644 index f383d087dd2d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionResponse.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.AI.Projects -{ - /// Response from the listSecrets operation. - [CodeGenModel("GetConnectionResponse")] - public partial class ConnectionResponse - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionsClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionsClient.cs deleted file mode 100644 index c4e199b2d86b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/ConnectionsClient.cs +++ /dev/null @@ -1,653 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Threading.Tasks; -using System.Threading; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - /// The Endpoints sub-client. - [CodeGenClient("Connections")] - public partial class ConnectionsClient - { - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// is null. - /// - public ConnectionsClient(string connectionString, TokenCredential credential) : this(connectionString, credential, new AIProjectClientOptions()) - { - } - - /// - /// Initializes a new instance of AzureAIClient. - /// - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// is null. - /// is an empty string. - public ConnectionsClient(string connectionString, TokenCredential credential, AIProjectClientOptions options) - : this(new Uri(ClientHelper.ParseConnectionString(connectionString, "endpoint")), - ClientHelper.ParseConnectionString(connectionString, "subscriptionId"), - ClientHelper.ParseConnectionString(connectionString, "ResourceGroupName"), - ClientHelper.ParseConnectionString(connectionString, "ProjectName"), - credential, - options) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public ConnectionsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AIProjectClientOptions()) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public ConnectionsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AIProjectClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - Argument.AssertNotNull(credential, nameof(credential)); - options ??= new AIProjectClientOptions(); - - ClientDiagnostics = new ClientDiagnostics(options, true); - _tokenCredential = credential; - _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); - _endpoint = new Uri("https://management.azure.com"); - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = options.Version; - } - - /// Initializes a new instance of ConnectionsClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The token credential to copy. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// The API version to use for this operation. - internal ConnectionsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion) - { - ClientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - _tokenCredential = tokenCredential; - _endpoint = new Uri("https://management.azure.com"); - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = apiVersion; - } - - /// Gets the properties of the specified machine learning workspace. - /// The cancellation token to use. - public virtual async Task> GetWorkspaceAsync(CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetWorkspaceAsync(context).ConfigureAwait(false); - return Response.FromValue(GetWorkspaceResponse.FromResponse(response), response); - } - - /// Gets the properties of the specified machine learning workspace. - /// The cancellation token to use. - public virtual Response GetWorkspace(CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetWorkspace(context); - return Response.FromValue(GetWorkspaceResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets the properties of the specified machine learning workspace. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task GetWorkspaceAsync(RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetWorkspace"); - scope.Start(); - try - { - using HttpMessage message = CreateGetWorkspaceRequest(context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets the properties of the specified machine learning workspace. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response GetWorkspace(RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetWorkspace"); - scope.Start(); - try - { - using HttpMessage message = CreateGetWorkspaceRequest(context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List the details of all the connections (not including their credentials). - /// Category of the workspace connection. - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The cancellation token to use. - public virtual async Task> GetConnectionsAsync(ConnectionType? category = null, bool? includeAll = null, string target = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetConnectionsAsync(category?.ToString(), includeAll, target, context).ConfigureAwait(false); - return Response.FromValue(ListConnectionsResponse.FromResponse(response), response); - } - - /// List the details of all the connections (not including their credentials). - /// Category of the workspace connection. - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The cancellation token to use. - public virtual Response GetConnections(ConnectionType? category = null, bool? includeAll = null, string target = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetConnections(category?.ToString(), includeAll, target, context); - return Response.FromValue(ListConnectionsResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] List the details of all the connections (not including their credentials) - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Category of the workspace connection. Allowed values: "AzureOpenAI" | "Serverless" | "AzureBlob" | "AIServices" | "CognitiveSearch". - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task GetConnectionsAsync(string category, bool? includeAll, string target, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnections"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionsRequest(category, includeAll, target, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] List the details of all the connections (not including their credentials) - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Category of the workspace connection. Allowed values: "AzureOpenAI" | "Serverless" | "AzureBlob" | "AIServices" | "CognitiveSearch". - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response GetConnections(string category, bool? includeAll, string target, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnections"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionsRequest(category, includeAll, target, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the details of a single connection, without credentials. - /// Connection Name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetConnectionAsync(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetConnectionAsync(connectionName, context).ConfigureAwait(false); - return Response.FromValue(ConnectionResponse.FromResponse(response), response); - } - - /// Get the details of a single connection, without credentials. - /// Connection Name. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetConnection(string connectionName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetConnection(connectionName, context); - return Response.FromValue(ConnectionResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] Get the details of a single connection, without credentials. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Connection Name. - /// 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 GetConnectionAsync(string connectionName, RequestContext context) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnection"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionRequest(connectionName, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Get the details of a single connection, without credentials. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Connection Name. - /// 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 GetConnection(string connectionName, RequestContext context) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnection"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionRequest(connectionName, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Get the details of a single connection, including credentials (if available). - /// Connection Name. - /// The body is ignored. TODO: Can we remove this?. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetConnectionWithSecretsAsync(string connectionName, string ignored, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(ignored, nameof(ignored)); - - GetConnectionWithSecretsRequest getConnectionWithSecretsRequest = new GetConnectionWithSecretsRequest(ignored, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetConnectionWithSecretsAsync(connectionName, getConnectionWithSecretsRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(ConnectionResponse.FromResponse(response), response); - } - - /// Get the details of a single connection, including credentials (if available). - /// Connection Name. - /// The body is ignored. TODO: Can we remove this?. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetConnectionWithSecrets(string connectionName, string ignored, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(ignored, nameof(ignored)); - - GetConnectionWithSecretsRequest getConnectionWithSecretsRequest = new GetConnectionWithSecretsRequest(ignored, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetConnectionWithSecrets(connectionName, getConnectionWithSecretsRequest.ToRequestContent(), context); - return Response.FromValue(ConnectionResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] Get the details of a single connection, including credentials (if available). - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Connection Name. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 GetConnectionWithSecretsAsync(string connectionName, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnectionWithSecrets"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionWithSecretsRequest(connectionName, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Get the details of a single connection, including credentials (if available). - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Connection Name. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 GetConnectionWithSecrets(string connectionName, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(connectionName, nameof(connectionName)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConnectionsClient.GetConnectionWithSecrets"); - scope.Start(); - try - { - using HttpMessage message = CreateGetConnectionWithSecretsRequest(connectionName, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// List the details of all the connections (not including their credentials). - /// Category of the workspace connection. - /// - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The cancellation token to use. - public virtual async Task> GetDefaultConnectionAsync(ConnectionType category, bool? withCredential = null, bool? includeAll = null, string target = null, CancellationToken cancellationToken = default) - { - ListConnectionsResponse connections = await GetConnectionsAsync(category, includeAll, target, cancellationToken).ConfigureAwait(false); - - if (connections?.Value == null || connections.Value.Count == 0) - { - throw new InvalidOperationException("No connections found for the specified parameters."); - } - - var connection = connections.Value[0]; - return withCredential.GetValueOrDefault() - ? await GetConnectionWithSecretsAsync(connection.Name, "ignored").ConfigureAwait(false) - : Response.FromValue(connection, null); - ; - } - - /// Get the details of a single connection. - /// Category of the workspace connection. - /// - /// Indicates whether to list datastores. Service default: do not list datastores. - /// Target of the workspace connection. - /// The cancellation token to use. - public virtual Response GetDefaultConnection(ConnectionType category, bool? withCredential = null, bool? includeAll = null, string target = null, CancellationToken cancellationToken = default) - { - ListConnectionsResponse connections = GetConnections(category, includeAll, target, cancellationToken); - - if (connections?.Value == null || connections.Value.Count == 0) - { - throw new InvalidOperationException($"No connections found for '{category}'. At least one connection is required. Please add a new connection in the Azure AI Foundry portal by following the instructions here: https://aka.ms/azsdk/azure-ai-projects/how-to/connections-add"); - } - - ConnectionResponse connection = connections.Value[0]; - return withCredential.GetValueOrDefault() - ? GetConnectionWithSecrets(connection.Name, "ignored") - : Response.FromValue(connection, null); - } - - // CUSTOM: Fixed the request URI by removing "/agents/v1.0" - internal HttpMessage CreateGetConnectionsRequest(string category, bool? includeAll, string target, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/connections", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (category != null) - { - uri.AppendQuery("category", category, true); - } - if (includeAll != null) - { - uri.AppendQuery("includeAll", includeAll.Value, true); - } - if (target != null) - { - uri.AppendQuery("target", target, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetConnectionRequest(string connectionName, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetConnectionWithSecretsRequest(string connectionName, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/connections/", false); - uri.AppendPath(connectionName, true); - uri.AppendPath("/listsecrets", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetWorkspaceRequest(RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/CredentialsApiKeyAuth.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connection/CredentialsApiKeyAuth.cs deleted file mode 100644 index ab9278474ae9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Connection/CredentialsApiKeyAuth.cs +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -namespace Azure.AI.Projects -{ - /// The credentials needed for API key authentication. - public partial class CredentialsApiKeyAuth - { - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/ConnectionCacheManager.cs b/sdk/ai/Azure.AI.Projects/src/Custom/ConnectionCacheManager.cs index 7d8943adc245..897fa51e80ce 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/ConnectionCacheManager.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/ConnectionCacheManager.cs @@ -15,13 +15,13 @@ namespace Azure.AI.Projects internal class ConnectionCacheManager { private readonly TokenCredential _tokenCredential; - private readonly ConnectionsClient _connectionsClient; - private readonly ConcurrentDictionary _connectionCache = new(); + private readonly Uri _endpoint; + private readonly ConcurrentDictionary _connectionCache = new(); private readonly ConcurrentDictionary _connections = new(); - public ConnectionCacheManager(ConnectionsClient connectionsClient, TokenCredential tokenCredential) + public ConnectionCacheManager(Uri endpoint, TokenCredential tokenCredential) { - _connectionsClient = connectionsClient; + _endpoint = endpoint; _tokenCredential = tokenCredential; } @@ -36,38 +36,15 @@ public ClientConnection GetConnection(string connectionId) } var connectionType = GetConnectionTypeFromId(connectionId); - var connection = _connectionCache.GetOrAdd(connectionType, type => - _connectionsClient.GetDefaultConnection(type, true)); + var connection = _connectionCache.GetOrAdd(connectionType, _endpoint); - if (connection.Properties.AuthType == AuthenticationType.ApiKey) + if (string.IsNullOrWhiteSpace(_endpoint.AbsoluteUri)) { - ConnectionPropertiesApiKeyAuth apiKeyAuthProperties = connection.Properties as ConnectionPropertiesApiKeyAuth; - if (string.IsNullOrWhiteSpace(apiKeyAuthProperties.Target)) - { - throw new ArgumentException($"The API key authentication target URI is missing or invalid for {connectionId}."); - } - - if (apiKeyAuthProperties.Credentials?.Key is null or { Length: 0 }) - { - throw new ArgumentException($"The API key is missing or invalid for {connectionId}."); - } - - var newConnection = new ClientConnection(connectionId, apiKeyAuthProperties.Target, apiKeyAuthProperties.Credentials.Key, CredentialKind.ApiKeyString); - return _connections.GetOrAdd(connectionId, newConnection); - } - else if (connection.Properties.AuthType == AuthenticationType.EntraId) - { - InternalConnectionPropertiesAADAuth aadAuthProperties = connection.Properties as InternalConnectionPropertiesAADAuth; - if (string.IsNullOrWhiteSpace(aadAuthProperties.Target)) - { - throw new ArgumentException($"The AAD authentication target URI is missing or invalid for {connectionId}."); - } - - var newConnection = new ClientConnection(connectionId, aadAuthProperties.Target, _tokenCredential, CredentialKind.TokenCredential); - return _connections.GetOrAdd(connectionId, newConnection); + throw new ArgumentException($"The AAD authentication target URI is missing or invalid for {connectionId}."); } - throw new ArgumentException($"Cannot connect with {connectionId}! Unknown authentication type."); + var newConnection = new ClientConnection(connectionId, _endpoint.AbsoluteUri, _tokenCredential, CredentialKind.TokenCredential); + return _connections.GetOrAdd(connectionId, newConnection); } /// @@ -84,21 +61,22 @@ private ConnectionType GetConnectionTypeFromId(string connectionId) { // AzureOpenAI case "Azure.AI.OpenAI.AzureOpenAIClient": + case "Azure.AI.Agents.Persistent.PersistentAgentsClient": case "OpenAI.Chat.ChatClient": case "OpenAI.Embeddings.EmbeddingClient": return ConnectionType.AzureOpenAI; - // Inference - case "Azure.AI.Inference.ChatCompletionsClient": - case "Azure.AI.Inference.EmbeddingsClient": - return ConnectionType.Serverless; - // AzureAISearch case "Azure.Search.Documents.SearchClient": case "Azure.Search.Documents.Indexes.SearchIndexClient": case "Azure.Search.Documents.Indexes.SearchIndexerClient": return ConnectionType.AzureAISearch; + case "Azure.AI.Inference.ChatCompletionsClient": + case "Azure.AI.Inference.EmbeddingsClient": + case "Azure.AI.Inference.ImageEmbeddingsClient": + return new ConnectionType("Inference"); + default: throw new ArgumentException($"Unknown connection type for ID: {connectionId}"); } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Connections/Connections.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Connections/Connections.cs new file mode 100644 index 000000000000..e57d5e921bf2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Connections/Connections.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Azure.Storage.Blobs; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Projects +{ + public partial class Connections + { + /// + /// Get a connection by name. + /// + /// The name of the connection. Required. + /// Whether to include credentials in the response. Default is false. + /// A object. + /// Thrown when the request fails. + public Connection Get(string connectionName, bool includeCredentials = false) + { + if (string.IsNullOrWhiteSpace(connectionName)) + { + throw new ArgumentException("Connection name cannot be null or empty.", nameof(connectionName)); + } + + // Use the instance method instead of incorrectly calling it as static + if (includeCredentials) + { + return GetWithCredentials(connectionName); + } + + return GetConnection(connectionName); + } + + /// + /// Get a connection by name. + /// + /// The name of the connection. Required. + /// Whether to include credentials in the response. Default is false. + /// A object. + /// Thrown when the request fails. + public async Task> GetAsync(string connectionName, bool includeCredentials = false) + { + if (string.IsNullOrWhiteSpace(connectionName)) + { + throw new ArgumentException("Connection name cannot be null or empty.", nameof(connectionName)); + } + + // Use the instance method instead of incorrectly calling it as static + if (includeCredentials) + { + return await GetWithCredentialsAsync(connectionName).ConfigureAwait(false); + } + + return await GetConnectionAsync(connectionName).ConfigureAwait(false); + } + + /// + /// Get the default connection. + /// + /// List connections of this specific type. + /// Whether to include credentials in the response. Default is false. + /// A object. + /// Thrown when the request fails. + public Connection GetDefault(ConnectionType? connectionType = null, bool includeCredentials = false) + { + foreach (var connection in GetConnections(connectionType)) + { + // Use the instance method instead of incorrectly calling it as static + if (includeCredentials) + { + return GetWithCredentials(connection.Name); + } + + return GetConnection(connection.Name); + } + throw new RequestFailedException("No connections found."); + } + + /// + /// Get the default connection. + /// + /// List connections of this specific type. + /// Whether to include credentials in the response. Default is false. + /// A object. + /// Thrown when the request fails. + public async Task GetDefaultAsync(ConnectionType? connectionType = null, bool includeCredentials = false) + { + await foreach (var connection in GetConnectionsAsync().ConfigureAwait(false)) + { + // Use the instance method instead of incorrectly calling it as static + if (includeCredentials) + { + return await GetWithCredentialsAsync(connection.Name).ConfigureAwait(false); + } + + return await GetConnectionAsync(connection.Name).ConfigureAwait(false); + } + throw new RequestFailedException("No connections found."); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Datasets/Datasets.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Datasets/Datasets.cs new file mode 100644 index 000000000000..8e2111dbd2b7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Datasets/Datasets.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using Azure.Storage.Blobs; +using Azure.Core; +using Azure.Core.Pipeline; +using System.Runtime.InteropServices.ComTypes; + +namespace Azure.AI.Projects +{ + public partial class Datasets + { + /// + /// Internal helper method to create a new dataset and return a BlobContainerClient to the dataset's blob storage. + /// + private (BlobContainerClient ContainerClient, string OutputVersion) CreateDatasetAndGetContainerClient(string name, string inputVersion) + { + var pendingUploadResponse = PendingUpload( + name, + inputVersion, + new PendingUploadRequest(null, null, PendingUploadType.BlobReference, null) + ); + + string outputVersion = inputVersion; + + //if (pendingUploadResponse.Value.BlobReferenceForConsumption == null || + // pendingUploadResponse.Value.BlobReferenceForConsumption.Credential?.Type != CredentialType.SAS || + // string.IsNullOrEmpty(pendingUploadResponse.Value.BlobReferenceForConsumption.BlobUri)) + //{ + // throw new InvalidOperationException("Invalid blob reference for consumption."); + //} + + var containerClient = new BlobContainerClient(new Uri(pendingUploadResponse.Value.BlobReference.BlobUri)); + return (containerClient, outputVersion); + } + + /// + /// Uploads a file to blob storage and creates a dataset that references this file. + /// + public Response UploadFile(string name, string version, string filePath) + { + if (!File.Exists(filePath)) + { + Console.WriteLine($"File path: {filePath}"); + throw new ArgumentException($"The provided file does not exist: {filePath}."); + } + + var (containerClient, outputVersion) = CreateDatasetAndGetContainerClient(name, version); + + using (var fileStream = File.OpenRead(filePath)) + { + var blobName = Path.GetFileName(filePath); + var blobClient = containerClient.GetBlobClient(blobName); + blobClient.Upload(fileStream); + + RequestContent content = RequestContent.Create(new FileDatasetVersion(dataUri: blobClient.Uri.AbsoluteUri)); + + return CreateOrUpdate( + name, + outputVersion, + content + ); + } + } + + /// + /// Uploads all files in a folder to blob storage and creates a dataset that references this folder. + /// + public Response UploadFolder(string name, string version, string folderPath) + { + if (!Directory.Exists(folderPath)) + { + Console.WriteLine($"File path: {folderPath}"); + throw new ArgumentException($"The provided folder does not exist: {folderPath}"); + } + + var (containerClient, outputVersion) = CreateDatasetAndGetContainerClient(name, version); + + var filesUploaded = false; + foreach (var filePath in Directory.EnumerateFiles(folderPath, "*", SearchOption.AllDirectories)) + { + var relativePath = GetRelativePath(folderPath, filePath); + using (var fileStream = File.OpenRead(filePath)) + { + var blobClient = containerClient.GetBlobClient(relativePath); + blobClient.Upload(fileStream); + filesUploaded = true; + } + } + + if (!filesUploaded) + { + throw new ArgumentException("The provided folder is empty."); + } + + RequestContent content = RequestContent.Create(new FolderDatasetVersion(dataUri: containerClient.Uri.AbsoluteUri)); + return CreateOrUpdate( + name, + outputVersion, + content + ); + } + public static string GetRelativePath(string folderPath, string filePath) + { + if (string.IsNullOrEmpty(folderPath)) + throw new ArgumentNullException(nameof(folderPath)); + if (string.IsNullOrEmpty(filePath)) + throw new ArgumentNullException(nameof(filePath)); + + Uri folderUri = new Uri(folderPath); + Uri fileUri = new Uri(filePath); + + if (folderUri.Scheme != fileUri.Scheme) + { return filePath; } // path can't be made relative. + + Uri relativeUri = folderUri.MakeRelativeUri(fileUri); + string relativePath = Uri.UnescapeDataString(relativeUri.AbsoluteUri); + + if (fileUri.Scheme.Equals("file", StringComparison.InvariantCultureIgnoreCase)) + { + relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); + } + + return relativePath; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Evaluation/EvaluationsClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Evaluation/EvaluationsClient.cs deleted file mode 100644 index 86aca6c68985..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Evaluation/EvaluationsClient.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - /// The Evaluations sub-client. - [CodeGenClient("Evaluations")] - public partial class EvaluationsClient - { - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// is null. - /// - public EvaluationsClient(string connectionString, TokenCredential credential) : this(connectionString, credential, new AIProjectClientOptions()) - { - } - - /// - /// Initializes a new instance of AzureAIClient. - /// - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// is null. - /// is an empty string. - public EvaluationsClient(string connectionString, TokenCredential credential, AIProjectClientOptions options) - : this(new Uri(ClientHelper.ParseConnectionString(connectionString, "endpoint")), - ClientHelper.ParseConnectionString(connectionString, "subscriptionId"), - ClientHelper.ParseConnectionString(connectionString, "resourceGroupName"), - ClientHelper.ParseConnectionString(connectionString, "projectName"), - credential, - options) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public EvaluationsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AIProjectClientOptions()) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public EvaluationsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AIProjectClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - Argument.AssertNotNull(credential, nameof(credential)); - options ??= new AIProjectClientOptions(); - - ClientDiagnostics = new ClientDiagnostics(options, true); - _tokenCredential = credential; - _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = options.Version; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Evaluations/EvaluatorIDs.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Evaluations/EvaluatorIDs.cs new file mode 100644 index 000000000000..80c55c8c082b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Evaluations/EvaluatorIDs.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; + +namespace Azure.AI.Projects +{ + /// + /// Evaluator IDs for built-in evaluators. + /// + public static class EvaluatorIDs + { + public const string Relevance = "azureai://built-in/evaluators/relevance"; + public const string HateUnfairness = "azureai://built-in/evaluators/hate_unfairness"; + public const string Violence = "azureai://built-in/evaluators/violence"; + public const string Groundedness = "azureai://built-in/evaluators/groundedness"; + public const string GroundednessPro = "azureai://built-in/evaluators/groundedness_pro"; + public const string BleuScore = "azureai://built-in/evaluators/bleu_score"; + public const string CodeVulnerability = "azureai://built-in/evaluators/code_vulnerability"; + public const string Coherence = "azureai://built-in/evaluators/coherence"; + public const string ContentSafety = "azureai://built-in/evaluators/content_safety"; + public const string DocumentRetrieval = "azureai://built-in/evaluators/document_retrieval"; + public const string F1Score = "azureai://built-in/evaluators/f1_score"; + public const string Fluency = "azureai://built-in/evaluators/fluency"; + public const string GleuScore = "azureai://built-in/evaluators/gleu_score"; + public const string IndirectAttack = "azureai://built-in/evaluators/indirect_attack"; + public const string IntentResolution = "azureai://built-in/evaluators/intent_resolution"; + public const string MeteorScore = "azureai://built-in/evaluators/meteor_score"; + public const string ProtectedMaterial = "azureai://built-in/evaluators/protected_material"; + public const string QA = "azureai://built-in/evaluators/qa"; + public const string Retrieval = "azureai://built-in/evaluators/retrieval"; + public const string RougeScore = "azureai://built-in/evaluators/rouge_score"; + public const string SelfHarm = "azureai://built-in/evaluators/self_harm"; + public const string Sexual = "azureai://built-in/evaluators/sexual"; + public const string SimilarityScore = "azureai://built-in/evaluators/similarity_score"; + public const string TaskAdherence = "azureai://built-in/evaluators/task_adherence"; + public const string ToolCallAccuracy = "azureai://built-in/evaluators/tool_call_accuracy"; + public const string UngroundedAttributes = "azureai://built-in/evaluators/ungrounded_attributes"; + public const string ResponseCompleteness = "azureai://built-in/evaluators/response_completeness"; + + // AOAI Graders + public const string LabelGrader = "azureai://built-in/evaluators/label_grader"; + public const string StringCheckGrader = "azureai://built-in/evaluators/string_check_grader"; + public const string TextSimilarityGrader = "azureai://built-in/evaluators/text_similarity_grader"; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Inference/Inference.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Inference/Inference.cs new file mode 100644 index 000000000000..b4e2586dd45c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Inference/Inference.cs @@ -0,0 +1,266 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; +using Azure.AI.Inference; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.Identity; +using Azure.AI.OpenAI; +using OpenAI.Chat; + +namespace Azure.AI.Projects +{ + // Data plane generated client. + /// The AzureAI service client. + public partial class AIProjectClient : ClientConnectionProvider + { + #nullable enable + public ChatCompletionsClient GetChatCompletionsClient() + { + ChatCompletionsClientKey chatCompletionsClientKey = new(); + ChatCompletionsClient chatClient = this.Subclients.GetClient(chatCompletionsClientKey, () => CreateChatCompletionsClient()); + return chatClient; + } + + private ChatCompletionsClient CreateChatCompletionsClient() + { + ClientConnection connection = this.GetConnection(typeof(ChatCompletionsClient).FullName!); + + if (!connection.TryGetLocatorAsUri(out Uri? uri) || uri is null) + { + throw new InvalidOperationException("Invalid URI."); + } + uri = new Uri($"https://{uri.Host}/models"); + + AzureAIInferenceClientOptions options = new AzureAIInferenceClientOptions(); + BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy((TokenCredential)connection.Credential!, AuthorizationScopes); + options.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry); + + return connection.CredentialKind switch + { + CredentialKind.ApiKeyString => new ChatCompletionsClient(uri, new AzureKeyCredential((string)connection.Credential!)), + CredentialKind.TokenCredential => new ChatCompletionsClient(uri, (TokenCredential)connection.Credential!, options), + _ => throw new InvalidOperationException($"Unsupported credential kind: {connection.CredentialKind}") + }; + } + + private record ChatCompletionsClientKey(); + + /// + /// Gets the embeddings client. + /// + /// + public EmbeddingsClient GetEmbeddingsClient() + { + EmbeddingsClientKey embeddingsClientKey = new(); + EmbeddingsClient embeddingsClient = this.Subclients.GetClient(embeddingsClientKey, () => CreateEmbeddingsClient()); + return embeddingsClient; + } + + private EmbeddingsClient CreateEmbeddingsClient() + { + ClientConnection connection = this.GetConnection(typeof(ChatCompletionsClient).FullName!); + + if (!connection.TryGetLocatorAsUri(out Uri? uri) || uri is null) + { + throw new InvalidOperationException("Invalid URI."); + } + uri = new Uri($"https://{uri.Host}/models"); + + AzureAIInferenceClientOptions options = new AzureAIInferenceClientOptions(); + BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy((TokenCredential)connection.Credential!, AuthorizationScopes); + options.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry); + + return connection.CredentialKind switch + { + CredentialKind.ApiKeyString => new EmbeddingsClient(uri, new AzureKeyCredential((string)connection.Credential!)), + CredentialKind.TokenCredential => new EmbeddingsClient(uri, (TokenCredential)connection.Credential!, options), + _ => throw new InvalidOperationException($"Unsupported credential kind: {connection.CredentialKind}") + }; + } + + private record EmbeddingsClientKey(); + + /// + /// Gets the image embeddings client. + /// + /// + public ImageEmbeddingsClient GetImageEmbeddingsClient() + { + ImageEmbeddingsClientKey imageEmbeddingsClientKey = new(); + ImageEmbeddingsClient imageEmbeddingsClient = this.Subclients.GetClient(imageEmbeddingsClientKey, () => CreateImageEmbeddingsClient()); + return imageEmbeddingsClient; + } + + private ImageEmbeddingsClient CreateImageEmbeddingsClient() + { + ClientConnection connection = this.GetConnection(typeof(ImageEmbeddingsClient).FullName!); + + if (!connection.TryGetLocatorAsUri(out Uri? uri) || uri is null) + { + throw new InvalidOperationException("Invalid URI."); + } + uri = new Uri($"https://{uri.Host}/models"); + + AzureAIInferenceClientOptions options = new AzureAIInferenceClientOptions(); + OverrideApiVersionPolicy overrideApiVersionPolicy = new OverrideApiVersionPolicy("2024-05-01-preview"); + + options.AddPolicy(overrideApiVersionPolicy, HttpPipelinePosition.PerRetry); + BearerTokenAuthenticationPolicy tokenPolicy = new BearerTokenAuthenticationPolicy((TokenCredential)connection.Credential!, AuthorizationScopes); + options.AddPolicy(tokenPolicy, HttpPipelinePosition.PerRetry); + + return connection.CredentialKind switch + { + CredentialKind.ApiKeyString => new ImageEmbeddingsClient(uri, new AzureKeyCredential((string)connection.Credential!)), + CredentialKind.TokenCredential => new ImageEmbeddingsClient(uri, (TokenCredential)connection.Credential!, options), + _ => throw new InvalidOperationException($"Unsupported credential kind: {connection.CredentialKind}") + }; + } + + private record ImageEmbeddingsClientKey(); + + /// + /// Gets the OpenAI chat client. + /// + /// + /// + /// + /// + public ChatClient GetAzureOpenAIChatClient(string? connectionName = null, string? apiVersion = null, string? deploymentName = null) + { + ChatClientKey chatClientKey = new(); + AzureOpenAIClientKey openAIClientKey = new(); + + ChatClient chatClient = this.Subclients.GetClient(chatClientKey, () => + { + AzureOpenAIClient aoaiClient = this.Subclients.GetClient(openAIClientKey, () => CreateAzureOpenAIClient(connectionName, apiVersion)); + return this.CreateChatClient(aoaiClient, deploymentName); + }); + + return chatClient; + } + + private AzureOpenAIClient CreateAzureOpenAIClient(string? connectionName = null, string? apiVersion = null) + { + if (!string.IsNullOrEmpty(connectionName)) + { + Connection selectedConnection = this.GetConnectionsClient().Get(connectionName, includeCredentials: true); + if (selectedConnection.Type != ConnectionType.AzureOpenAI) + { + throw new InvalidOperationException($"Connection '{connectionName}' is not of type AzureOpenAI."); + } + string endpoint = selectedConnection.Target.EndsWith("/") + ? selectedConnection.Target.Substring(0, selectedConnection.Target.Length - 1) + : selectedConnection.Target; + + if (selectedConnection.Credentials is ApiKeyCredentials apiKeyCreds) + { + if (string.IsNullOrEmpty(apiKeyCreds.ApiKey)) + { + throw new InvalidOperationException("Connection does not have an api key."); + } + string apiKey = apiKeyCreds.ApiKey; + return new AzureOpenAIClient(new Uri(endpoint), new ApiKeyCredential(apiKey)); + } + ; + } + ClientConnection connection = this.GetConnection(typeof(AzureOpenAIClient).FullName!); + + if (!connection.TryGetLocatorAsUri(out Uri? uri) || uri is null) + { + throw new InvalidOperationException("Invalid URI."); + } + + uri = new Uri($"https://{uri.Host}"); + + AzureOpenAIClientOptions options = new AzureOpenAIClientOptions(); + + if (apiVersion != null) + { + OverrideApiVersionPolicyPipeline overrideApiVersionPolicy = new OverrideApiVersionPolicyPipeline(apiVersion); + options.AddPolicy(overrideApiVersionPolicy, PipelinePosition.PerTry); + } + + options.Audience = new AzureOpenAIAudience(AuthorizationScopes[0]); + + return connection.CredentialKind switch + { + CredentialKind.ApiKeyString => new AzureOpenAIClient(uri, new ApiKeyCredential((string)connection.Credential!)), + CredentialKind.TokenCredential => new AzureOpenAIClient(uri, (TokenCredential)connection.Credential!, options), + _ => throw new InvalidOperationException($"Unsupported credential kind: {connection.CredentialKind}") + }; + } + + private ChatClient CreateChatClient(AzureOpenAIClient client, string? deploymentName = null) + { + ClientConnection connection = this.GetConnection(typeof(ChatClient).FullName!); + ChatClient chat = client.GetChatClient(deploymentName ?? connection.Locator); + return chat; + } + + private record AzureOpenAIClientKey(); + private record ChatClientKey(); + private class OverrideApiVersionPolicy : HttpPipelinePolicy + { + private string ApiVersion { get; } + + public OverrideApiVersionPolicy(string apiVersion) + { + ApiVersion = apiVersion; + } + + public override void Process(HttpMessage message, ReadOnlyMemory pipeline) + { + message.Request.Uri.Query = $"?api-version={ApiVersion}"; + ProcessNext(message, pipeline); + } + + public override ValueTask ProcessAsync(HttpMessage message, ReadOnlyMemory pipeline) + { + message.Request.Uri.Query = $"?api-version={ApiVersion}"; + var task = ProcessNextAsync(message, pipeline); + + return task; + } + } + + private class OverrideApiVersionPolicyPipeline : PipelinePolicy + { + private string ApiVersion { get; } + + public OverrideApiVersionPolicyPipeline(string apiVersion) + { + ApiVersion = apiVersion; + } + + public override void Process(PipelineMessage message, IReadOnlyList pipeline, int index) + { + if (message.Request.Uri != null) + { + var uriBuilder = new UriBuilder(message.Request.Uri); + uriBuilder.Query = $"api-version={ApiVersion}"; + message.Request.Uri = uriBuilder.Uri; + } + ProcessNext(message, pipeline, index); + } + + public override ValueTask ProcessAsync(PipelineMessage message, IReadOnlyList pipeline, int index) + { + if (message.Request.Uri != null) + { + var uriBuilder = new UriBuilder(message.Request.Uri); + uriBuilder.Query = $"api-version={ApiVersion}"; + message.Request.Uri = uriBuilder.Uri; + } + return ProcessNextAsync(message, pipeline, index); + } + } + #nullable disable + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/Telemetry.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/Telemetry.cs new file mode 100644 index 000000000000..6826537e1e94 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/Telemetry.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Linq; +using Azure; +using Azure.Core; +using Azure.AI.Projects; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + public partial class AIProjectClient + { + private Telemetry _telemetry; + public Telemetry Telemetry => _telemetry ??= new Telemetry(this); + } + /// + /// Provides telemetry-related operations for the project. + /// + public partial class Telemetry + { + private readonly AIProjectClient _outerInstance; + private string _connectionString; + + /// + /// Initializes a new instance of the class. + /// + /// The parent AIProjectClient instance. + public Telemetry(AIProjectClient outerInstance) + { + _outerInstance = outerInstance; + } + + /// + /// Gets the Application Insights connection string associated with the Project's Application Insights resource. + /// + /// The Application Insights connection string if the resource was enabled for the Project. + /// Thrown if an Application Insights connection does not exist for this project. + /// Thrown if the connection does not use API Key credentials or the API key is missing. + public string GetConnectionString() + { + if (_connectionString == null) + { + Connections connectionsClient = _outerInstance.GetConnectionsClient(); + Connection connection = connectionsClient.GetDefault(ConnectionType.ApplicationInsights, includeCredentials: true); + if (connection == null) + { + throw new RequestFailedException("No Application Insights connection found."); + } + if (connection.Credentials is ApiKeyCredentials apiKeyCreds) + { + if (string.IsNullOrEmpty(apiKeyCreds.ApiKey)) + { + throw new InvalidOperationException("Application Insights connection does not have a connection string."); + } + _connectionString = apiKeyCreds.ApiKey; + } + else + { + throw new InvalidOperationException("Application Insights connection does not use API Key credentials."); + } + } + return _connectionString; + } + + /// + /// Gets the Application Insights connection string associated with the Project's Application Insights resource. + /// + /// The Application Insights connection string if the resource was enabled for the Project. + /// Thrown if an Application Insights connection does not exist for this project. + /// Thrown if the connection does not use API Key credentials or the API key is missing. + public async Task GetConnectionStringAsync() + { + if (_connectionString == null) + { + Connections connectionsClient = _outerInstance.GetConnectionsClient(); + Connection connection = await connectionsClient.GetDefaultAsync(ConnectionType.ApplicationInsights, includeCredentials: true).ConfigureAwait(false); + if (connection == null) + { + throw new RequestFailedException("No Application Insights connection found."); + } + if (connection.Credentials is ApiKeyCredentials apiKeyCreds) + { + if (string.IsNullOrEmpty(apiKeyCreds.ApiKey)) + { + throw new InvalidOperationException("Application Insights connection does not have a connection string."); + } + _connectionString = apiKeyCreds.ApiKey; + } + else + { + throw new InvalidOperationException("Application Insights connection does not use API Key credentials."); + } + } + return _connectionString; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/TelemetryClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/TelemetryClient.cs deleted file mode 100644 index 3942332b2b29..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Telemetry/TelemetryClient.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - /// The Evaluations sub-client. - [CodeGenClient("Telemetry")] - public partial class TelemetryClient - { - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// is null. - /// - public TelemetryClient(string connectionString, TokenCredential credential) : this(connectionString, credential, new AIProjectClientOptions()) - { - } - - /// - /// Initializes a new instance of AzureAIClient. - /// - /// The Azure AI Foundry project connection string, in the form `endpoint;subscription_id;resource_group_name;project_name`. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// is null. - /// is an empty string. - public TelemetryClient(string connectionString, TokenCredential credential, AIProjectClientOptions options) - : this(new Uri(ClientHelper.ParseConnectionString(connectionString, "endpoint")), - ClientHelper.ParseConnectionString(connectionString, "subscriptionId"), - ClientHelper.ParseConnectionString(connectionString, "resourceGroupName"), - ClientHelper.ParseConnectionString(connectionString, "projectName"), - credential, - options) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public TelemetryClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AIProjectClientOptions()) - { - } - - /// Initializes a new instance of AzureAIClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// The options for configuring the client. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public TelemetryClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AIProjectClientOptions options) - { - Argument.AssertNotNull(endpoint, nameof(endpoint)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(projectName, nameof(projectName)); - Argument.AssertNotNull(credential, nameof(credential)); - options ??= new AIProjectClientOptions(); - - ClientDiagnostics = new ClientDiagnostics(options, true); - _tokenCredential = credential; - _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = options.Version; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpMessageExtensions.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpMessageExtensions.cs deleted file mode 100644 index 728ceadde5c4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpMessageExtensions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel.Primitives; -using System.IO; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; - -#nullable enable - -namespace Azure.AI.Projects; - -internal static class HttpMessageExtensions -{ - public static Response ExtractResponse(this HttpMessage message) - { - Response? response = message.Response; - message.Response = null!; - return response; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpPipelineExtensions.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpPipelineExtensions.cs deleted file mode 100644 index 66e5c2a52e79..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/HttpPipelineExtensions.cs +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -#nullable enable - -namespace Azure.AI.Projects; - -internal static class HttpPipelineExtensions -{ - public static async ValueTask ProcessMessageAsync(this HttpPipeline pipeline, HttpMessage message, RequestContext? requestContext, CancellationToken cancellationToken = default) - { - var (userCt, statusOption) = ApplyRequestContext(requestContext); - if (!userCt.CanBeCanceled || !cancellationToken.CanBeCanceled) - { - await pipeline.SendAsync(message, cancellationToken.CanBeCanceled ? cancellationToken : userCt).ConfigureAwait(false); - } - else - { - using var cts = CancellationTokenSource.CreateLinkedTokenSource(userCt, cancellationToken); - await pipeline.SendAsync(message, cts.Token).ConfigureAwait(false); - } - - if (message.Response.IsError && (requestContext?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) - { - throw new RequestFailedException(message.Response); - } - - return message.BufferResponse ? - message.Response : - message.ExtractResponse(); - } - - public static Response ProcessMessage(this HttpPipeline pipeline, HttpMessage message, RequestContext? requestContext, CancellationToken cancellationToken = default) - { - var (userCt, statusOption) = ApplyRequestContext(requestContext); - if (!userCt.CanBeCanceled || !cancellationToken.CanBeCanceled) - { - pipeline.Send(message, cancellationToken.CanBeCanceled ? cancellationToken : userCt); - } - else - { - using var cts = CancellationTokenSource.CreateLinkedTokenSource(userCt, cancellationToken); - pipeline.Send(message, cts.Token); - } - - if (message.Response.IsError && (requestContext?.ErrorOptions & ErrorOptions.NoThrow) != ErrorOptions.NoThrow) - { - throw new RequestFailedException(message.Response); - } - - return message.BufferResponse ? - message.Response : - message.ExtractResponse(); - } - - public static async ValueTask> ProcessHeadAsBoolMessageAsync(this HttpPipeline pipeline, HttpMessage message, ClientDiagnostics clientDiagnostics, RequestContext? requestContext) - { - var response = await pipeline.ProcessMessageAsync(message, requestContext).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 ErrorResponse(response, new RequestFailedException(response)); - } - } - - public static Response ProcessHeadAsBoolMessage(this HttpPipeline pipeline, HttpMessage message, ClientDiagnostics clientDiagnostics, RequestContext? requestContext) - { - var response = pipeline.ProcessMessage(message, requestContext); - switch (response.Status) - { - case >= 200 and < 300: - return Response.FromValue(true, response); - case >= 400 and < 500: - return Response.FromValue(false, response); - default: - return new ErrorResponse(response, new RequestFailedException(response)); - } - } - - private static (CancellationToken CancellationToken, ErrorOptions ErrorOptions) ApplyRequestContext(RequestContext? requestContext) - { - if (requestContext == null) - { - return (CancellationToken.None, ErrorOptions.Default); - } - - return (requestContext.CancellationToken, requestContext.ErrorOptions); - } - - internal class ErrorResponse : Response - { - private readonly Response _response; - private readonly RequestFailedException _exception; - - public ErrorResponse(Response response, RequestFailedException exception) - { - _response = response; - _exception = exception; - } - - public override T Value { get => throw _exception; } - - public override Response GetRawResponse() => _response; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseAdapter.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseAdapter.cs deleted file mode 100644 index 458df3bfbd91..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseAdapter.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.ClientModel.Primitives; -using System.IO; -using System.Threading; -using System.Threading.Tasks; - -#nullable enable - -namespace Azure.AI.Projects; - -/// -/// Adapts an Azure.Core Response to an SCM PipelineResponse. -/// -internal class ResponseAdapter : PipelineResponse -{ - private readonly Response _azureResponse; - private PipelineResponseHeaders? _headers; - - public ResponseAdapter(Response azureResponse) - { - _azureResponse = azureResponse; - } - - public override int Status => _azureResponse.Status; - - public override string ReasonPhrase => _azureResponse.ReasonPhrase; - - public override Stream? ContentStream - { - get => _azureResponse?.ContentStream; - set => _azureResponse.ContentStream = value; - } - - public override BinaryData Content => _azureResponse.Content; - - protected override PipelineResponseHeaders HeadersCore => - _headers ??= new ResponseHeadersAdapter(_azureResponse.Headers); - - public override BinaryData BufferContent(CancellationToken cancellationToken = default) - { - throw new NotSupportedException("Content buffering is not supported for SSE response streams."); - } - - public override ValueTask BufferContentAsync(CancellationToken cancellationToken = default) - { - throw new NotSupportedException("Content buffering is not supported for SSE response streams."); - } - - public override void Dispose() => _azureResponse?.Dispose(); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseHeadersAdapter.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseHeadersAdapter.cs deleted file mode 100644 index 1e145f2dae09..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/ResponseHeadersAdapter.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.ClientModel.Primitives; -using System.Collections.Generic; -using Azure.Core; - -#nullable enable - -namespace Azure.AI.Projects; - -/// -/// Adapts an Azure.Core ResponseHeaders to an SCM PipelineResponseHeaders. -/// -internal class ResponseHeadersAdapter : PipelineResponseHeaders -{ - private readonly ResponseHeaders _azureHeaders; - - public ResponseHeadersAdapter(ResponseHeaders azureHeaders) - { - _azureHeaders = azureHeaders; - } - - public override IEnumerator> GetEnumerator() - { - foreach (HttpHeader header in _azureHeaders) - { - yield return new KeyValuePair(header.Name, header.Value); - } - } - - public override bool TryGetValue(string name, out string? value) - => _azureHeaders.TryGetValue(name, out value); - - public override bool TryGetValues(string name, out IEnumerable? values) - => _azureHeaders.TryGetValue(name, out values); -} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/System.Net.ServerSentEvents.cs b/sdk/ai/Azure.AI.Projects/src/Custom/Utility/System.Net.ServerSentEvents.cs deleted file mode 100644 index dc17e34c9cbd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Custom/Utility/System.Net.ServerSentEvents.cs +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// This file contains a source copy of: -// https://github.com/dotnet/runtime/tree/2bd15868f12ace7cee9999af61d5c130b2603f04/src/libraries/System.Net.ServerSentEvents/src/System/Net/ServerSentEvents -// Once the System.Net.ServerSentEvents package is available, this file should be removed and replaced with a package reference. -// -// The only changes made to this code from the original are: -// - Enabled nullable reference types at file scope, and use a few null suppression operators to work around the lack of [NotNull] -// - Put into a single file for ease of management (it should not be edited in this repo). -// - Changed public types to be internal. -// - Removed a use of a [NotNull] attribute to assist in netstandard2.0 compilation. -// - Replaced a reference to a .resx string with an inline constant. - -#nullable enable - -using System.Buffers; -using System.Collections.Generic; -using System.Diagnostics; -using System.Globalization; -using System.IO; -using System.Runtime.CompilerServices; -using System.Text; -using System.Threading.Tasks; -using System.Threading; - -namespace System.Net.ServerSentEvents -{ - /// Represents a server-sent event. - /// Specifies the type of data payload in the event. - internal readonly struct SseItem - { - /// Initializes the server-sent event. - /// The event's payload. - /// The event's type. - public SseItem(T data, string eventType) - { - Data = data; - EventType = eventType; - } - - /// Gets the event's payload. - public T Data { get; } - - /// Gets the event's type. - public string EventType { get; } - } - - /// Encapsulates a method for parsing the bytes payload of a server-sent event. - /// Specifies the type of the return value of the parser. - /// The event's type. - /// The event's payload bytes. - /// The parsed . - internal delegate T SseItemParser(string eventType, ReadOnlySpan data); - - /// Provides a parser for parsing server-sent events. - internal static class SseParser - { - /// The default ("message") for an event that did not explicitly specify a type. - public const string EventTypeDefault = "message"; - - /// Creates a parser for parsing a of server-sent events into a sequence of values. - /// The stream containing the data to parse. - /// - /// The enumerable of strings, which may be enumerated synchronously or asynchronously. The strings - /// are decoded from the UTF8-encoded bytes of the payload of each event. - /// - /// is null. - /// - /// This overload has behavior equivalent to calling with a delegate - /// that decodes the data of each event using 's GetString method. - /// - public static SseParser Create(Stream sseStream) => - Create(sseStream, static (_, bytes) => Utf8GetString(bytes)); - - /// Creates a parser for parsing a of server-sent events into a sequence of values. - /// Specifies the type of data in each event. - /// The stream containing the data to parse. - /// The parser to use to transform each payload of bytes into a data element. - /// The enumerable, which may be enumerated synchronously or asynchronously. - /// is null. - /// is null. - public static SseParser Create(Stream sseStream, SseItemParser itemParser) => - new SseParser( - sseStream ?? throw new ArgumentNullException(nameof(sseStream)), - itemParser ?? throw new ArgumentNullException(nameof(itemParser))); - - /// Encoding.UTF8.GetString(bytes) - internal static string Utf8GetString(ReadOnlySpan bytes) - { - return Encoding.UTF8.GetString(bytes.ToArray()); - //unsafe - //{ - // fixed (byte* ptr = bytes) - // { - // return ptr is null ? - // string.Empty : - // Encoding.UTF8.GetString(ptr, bytes.Length); - // } - //} - } - } - - /// Provides a parser for server-sent events information. - /// Specifies the type of data parsed from an event. - internal sealed class SseParser - { - // For reference: - // Specification: https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events - - /// Carriage Return. - private const byte CR = (byte)'\r'; - /// Line Feed. - private const byte LF = (byte)'\n'; - /// Carriage Return Line Feed. - private static ReadOnlySpan CRLF => "\r\n"u8; - - /// The default size of an ArrayPool buffer to rent. - /// Larger size used by default to minimize number of reads. Smaller size used in debug to stress growth/shifting logic. - private const int DefaultArrayPoolRentSize = -#if DEBUG - 16; -#else - 1024; -#endif - - /// The stream to be parsed. - private readonly Stream _stream; - /// The parser delegate used to transform bytes into a . - private readonly SseItemParser _itemParser; - - /// Indicates whether the enumerable has already been used for enumeration. - private int _used; - - /// Buffer, either empty or rented, containing the data being read from the stream while looking for the next line. - private byte[] _lineBuffer = []; - /// The starting offset of valid data in . - private int _lineOffset; - /// The length of valid data in , starting from . - private int _lineLength; - /// The index in where a newline ('\r', '\n', or "\r\n") was found. - private int _newlineIndex; - /// The index in of characters already checked for newlines. - /// - /// This is to avoid O(LineLength^2) behavior in the rare case where we have long lines that are built-up over multiple reads. - /// We want to avoid re-checking the same characters we've already checked over and over again. - /// - private int _lastSearchedForNewline; - /// Set when eof has been reached in the stream. - private bool _eof; - - /// Rented buffer containing buffered data for the next event. - private byte[]? _dataBuffer; - /// The length of valid data in , starting from index 0. - private int _dataLength; - /// Whether data has been appended to . - /// This can be different than != 0 if empty data was appended. - private bool _dataAppended; - - /// The event type for the next event. - private string _eventType = SseParser.EventTypeDefault; - - /// Initialize the enumerable. - /// The stream to parse. - /// The function to use to parse payload bytes into a . - internal SseParser(Stream stream, SseItemParser itemParser) - { - _stream = stream; - _itemParser = itemParser; - } - - /// Gets an enumerable of the server-sent events from this parser. - /// The parser has already been enumerated. Such an exception may propagate out of a call to "IEnumerator.MoveNext"/>. - public IEnumerable> Enumerate() - { - // Validate that the parser is only used for one enumeration. - ThrowIfNotFirstEnumeration(); - - // Rent a line buffer. This will grow as needed. The line buffer is what's passed to the stream, - // so we want it to be large enough to reduce the number of reads we need to do when data is - // arriving quickly. (In debug, we use a smaller buffer to stress the growth and shifting logic.) - _lineBuffer = ArrayPool.Shared.Rent(DefaultArrayPoolRentSize); - try - { - // Spec: "Event streams in this format must always be encoded as UTF-8". - // Skip a UTF8 BOM if it exists at the beginning of the stream. (The BOM is defined as optional in the SSE grammar.) - while (FillLineBuffer() != 0 && _lineLength < Utf8Bom.Length) ; - SkipBomIfPresent(); - - // Process all events in the stream. - while (true) - { - // See if there's a complete line in data already read from the stream. Lines are permitted to - // end with CR, LF, or CRLF. Look for all of them and if we find one, process the line. However, - // if we only find a CR and it's at the end of the read data, don't process it now, as we want - // to process it together with an LF that might immediately follow, rather than treating them - // as two separate characters, in which case we'd incorrectly process the CR as a line by itself. - GetNextSearchOffsetAndLength(out int searchOffset, out int searchLength); - _newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); - if (_newlineIndex >= 0) - { - _lastSearchedForNewline = -1; - _newlineIndex += searchOffset; - if (_lineBuffer[_newlineIndex] is LF || // the newline is LF - _newlineIndex - _lineOffset + 1 < _lineLength || // we must have CR and we have whatever comes after it - _eof) // if we get here, we know we have a CR at the end of the buffer, so it's definitely the whole newline if we've hit EOF - { - // Process the line. - if (ProcessLine(out SseItem sseItem, out int advance)) - { - yield return sseItem; - } - - // Move past the line. - _lineOffset += advance; - _lineLength -= advance; - continue; - } - } - else - { - // Record the last position searched for a newline. The next time we search, - // we'll search from here rather than from _lineOffset, in order to avoid searching - // the same characters again. - _lastSearchedForNewline = _lineOffset + _lineLength; - } - - // We've processed everything in the buffer we currently can, so if we've already read EOF, we're done. - if (_eof) - { - // Spec: "Once the end of the file is reached, any pending data must be discarded. (If the file ends in the middle of an - // event, before the final empty line, the incomplete event is not dispatched.)" - break; - } - - // Read more data into the buffer. - FillLineBuffer(); - } - } - finally - { - ArrayPool.Shared.Return(_lineBuffer); - if (_dataBuffer is not null) - { - ArrayPool.Shared.Return(_dataBuffer); - } - } - } - - /// Gets an asynchronous enumerable of the server-sent events from this parser. - /// The cancellation token to use to cancel the enumeration. - /// The parser has already been enumerated. Such an exception may propagate out of a call to . - /// The enumeration was canceled. Such an exception may propagate out of a call to . - public async IAsyncEnumerable> EnumerateAsync([EnumeratorCancellation] CancellationToken cancellationToken = default) - { - // Validate that the parser is only used for one enumeration. - ThrowIfNotFirstEnumeration(); - - // Rent a line buffer. This will grow as needed. The line buffer is what's passed to the stream, - // so we want it to be large enough to reduce the number of reads we need to do when data is - // arriving quickly. (In debug, we use a smaller buffer to stress the growth and shifting logic.) - _lineBuffer = ArrayPool.Shared.Rent(DefaultArrayPoolRentSize); - try - { - // Spec: "Event streams in this format must always be encoded as UTF-8". - // Skip a UTF8 BOM if it exists at the beginning of the stream. (The BOM is defined as optional in the SSE grammar.) - while (await FillLineBufferAsync(cancellationToken).ConfigureAwait(false) != 0 && _lineLength < Utf8Bom.Length) ; - SkipBomIfPresent(); - - // Process all events in the stream. - while (true) - { - // See if there's a complete line in data already read from the stream. Lines are permitted to - // end with CR, LF, or CRLF. Look for all of them and if we find one, process the line. However, - // if we only find a CR and it's at the end of the read data, don't process it now, as we want - // to process it together with an LF that might immediately follow, rather than treating them - // as two separate characters, in which case we'd incorrectly process the CR as a line by itself. - GetNextSearchOffsetAndLength(out int searchOffset, out int searchLength); - _newlineIndex = _lineBuffer.AsSpan(searchOffset, searchLength).IndexOfAny(CR, LF); - if (_newlineIndex >= 0) - { - _lastSearchedForNewline = -1; - _newlineIndex += searchOffset; - if (_lineBuffer[_newlineIndex] is LF || // newline is LF - _newlineIndex - _lineOffset + 1 < _lineLength || // newline is CR, and we have whatever comes after it - _eof) // if we get here, we know we have a CR at the end of the buffer, so it's definitely the whole newline if we've hit EOF - { - // Process the line. - if (ProcessLine(out SseItem sseItem, out int advance)) - { - yield return sseItem; - } - - // Move past the line. - _lineOffset += advance; - _lineLength -= advance; - continue; - } - } - else - { - // Record the last position searched for a newline. The next time we search, - // we'll search from here rather than from _lineOffset, in order to avoid searching - // the same characters again. - _lastSearchedForNewline = searchOffset + searchLength; - } - - // We've processed everything in the buffer we currently can, so if we've already read EOF, we're done. - if (_eof) - { - // Spec: "Once the end of the file is reached, any pending data must be discarded. (If the file ends in the middle of an - // event, before the final empty line, the incomplete event is not dispatched.)" - break; - } - - // Read more data into the buffer. - await FillLineBufferAsync(cancellationToken).ConfigureAwait(false); - } - } - finally - { - ArrayPool.Shared.Return(_lineBuffer); - if (_dataBuffer is not null) - { - ArrayPool.Shared.Return(_dataBuffer); - } - } - } - - /// Gets the next index and length with which to perform a newline search. - private void GetNextSearchOffsetAndLength(out int searchOffset, out int searchLength) - { - if (_lastSearchedForNewline > _lineOffset) - { - searchOffset = _lastSearchedForNewline; - searchLength = _lineLength - (_lastSearchedForNewline - _lineOffset); - } - else - { - searchOffset = _lineOffset; - searchLength = _lineLength; - } - - Debug.Assert(searchOffset >= _lineOffset, $"{searchOffset}, {_lineLength}"); - Debug.Assert(searchOffset <= _lineOffset + _lineLength, $"{searchOffset}, {_lineOffset}, {_lineLength}"); - Debug.Assert(searchOffset <= _lineBuffer.Length, $"{searchOffset}, {_lineBuffer.Length}"); - - Debug.Assert(searchLength >= 0, $"{searchLength}"); - Debug.Assert(searchLength <= _lineLength, $"{searchLength}, {_lineLength}"); - } - - private int GetNewLineLength() - { - Debug.Assert(_newlineIndex - _lineOffset < _lineLength, "Expected to be positioned at a non-empty newline"); - return _lineBuffer.AsSpan(_newlineIndex, _lineLength - (_newlineIndex - _lineOffset)).StartsWith(CRLF) ? 2 : 1; - } - - /// - /// If there's no room remaining in the line buffer, either shifts the contents - /// left or grows the buffer in order to make room for the next read. - /// - private void ShiftOrGrowLineBufferIfNecessary() - { - // If data we've read is butting up against the end of the buffer and - // it's not taking up the entire buffer, slide what's there down to - // the beginning, making room to read more data into the buffer (since - // there's no newline in the data that's there). Otherwise, if the whole - // buffer is full, grow the buffer to accommodate more data, since, again, - // what's there doesn't contain a newline and thus a line is longer than - // the current buffer accommodates. - if (_lineOffset + _lineLength == _lineBuffer.Length) - { - if (_lineOffset != 0) - { - _lineBuffer.AsSpan(_lineOffset, _lineLength).CopyTo(_lineBuffer); - if (_lastSearchedForNewline >= 0) - { - _lastSearchedForNewline -= _lineOffset; - } - _lineOffset = 0; - } - else if (_lineLength == _lineBuffer.Length) - { - GrowBuffer(ref _lineBuffer!, _lineBuffer.Length * 2); - } - } - } - - /// Processes a complete line from the SSE stream. - /// The parsed item if the method returns true. - /// How many characters to advance in the line buffer. - /// true if an SSE item was successfully parsed; otherwise, false. - private bool ProcessLine(out SseItem sseItem, out int advance) - { - ReadOnlySpan line = _lineBuffer.AsSpan(_lineOffset, _newlineIndex - _lineOffset); - - // Spec: "If the line is empty (a blank line) Dispatch the event" - if (line.IsEmpty) - { - advance = GetNewLineLength(); - - if (_dataAppended) - { - sseItem = new SseItem(_itemParser(_eventType, _dataBuffer.AsSpan(0, _dataLength)), _eventType); - _eventType = SseParser.EventTypeDefault; - _dataLength = 0; - _dataAppended = false; - return true; - } - - sseItem = default; - return false; - } - - // Find the colon separating the field name and value. - int colonPos = line.IndexOf((byte)':'); - ReadOnlySpan fieldName; - ReadOnlySpan fieldValue; - if (colonPos >= 0) - { - // Spec: "Collect the characters on the line before the first U+003A COLON character (:), and let field be that string." - fieldName = line.Slice(0, colonPos); - - // Spec: "Collect the characters on the line after the first U+003A COLON character (:), and let value be that string. - // If value starts with a U+0020 SPACE character, remove it from value." - fieldValue = line.Slice(colonPos + 1); - if (!fieldValue.IsEmpty && fieldValue[0] == (byte)' ') - { - fieldValue = fieldValue.Slice(1); - } - } - else - { - // Spec: "using the whole line as the field name, and the empty string as the field value." - fieldName = line; - fieldValue = []; - } - - if (fieldName.SequenceEqual("data"u8)) - { - // Spec: "Append the field value to the data buffer, then append a single U+000A LINE FEED (LF) character to the data buffer." - // Spec: "If the data buffer's last character is a U+000A LINE FEED (LF) character, then remove the last character from the data buffer." - - // If there's nothing currently in the data buffer and we can easily detect that this line is immediately followed by - // an empty line, we can optimize it to just handle the data directly from the line buffer, rather than first copying - // into the data buffer and dispatching from there. - if (!_dataAppended) - { - int newlineLength = GetNewLineLength(); - ReadOnlySpan remainder = _lineBuffer.AsSpan(_newlineIndex + newlineLength, _lineLength - line.Length - newlineLength); - if (!remainder.IsEmpty && - (remainder[0] is LF || (remainder[0] is CR && remainder.Length > 1))) - { - advance = line.Length + newlineLength + (remainder.StartsWith(CRLF) ? 2 : 1); - sseItem = new SseItem(_itemParser(_eventType, fieldValue), _eventType); - _eventType = SseParser.EventTypeDefault; - return true; - } - } - - // We need to copy the data from the data buffer to the line buffer. Make sure there's enough room. - if (_dataBuffer is null || _dataLength + _lineLength + 1 > _dataBuffer.Length) - { - GrowBuffer(ref _dataBuffer, _dataLength + _lineLength + 1); - } - - // Append a newline if there's already content in the buffer. - // Then copy the field value to the data buffer - if (_dataAppended) - { - _dataBuffer![_dataLength++] = LF; - } - fieldValue.CopyTo(_dataBuffer.AsSpan(_dataLength)); - _dataLength += fieldValue.Length; - _dataAppended = true; - } - else if (fieldName.SequenceEqual("event"u8)) - { - // Spec: "Set the event type buffer to field value." - _eventType = SseParser.Utf8GetString(fieldValue); - } - else if (fieldName.SequenceEqual("id"u8)) - { - // Spec: "If the field value does not contain U+0000 NULL, then set the last event ID buffer to the field value. Otherwise, ignore the field." - if (fieldValue.IndexOf((byte)'\0') < 0) - { - // Note that fieldValue might be empty, in which case LastEventId will naturally be reset to the empty string. This is per spec. - LastEventId = SseParser.Utf8GetString(fieldValue); - } - } - else if (fieldName.SequenceEqual("retry"u8)) - { - // Spec: "If the field value consists of only ASCII digits, then interpret the field value as an integer in base ten, - // and set the event stream's reconnection time to that integer. Otherwise, ignore the field." - if (long.TryParse( -#if NET7_0_OR_GREATER - fieldValue, -#else - SseParser.Utf8GetString(fieldValue), -#endif - NumberStyles.None, CultureInfo.InvariantCulture, out long milliseconds)) - { - ReconnectionInterval = TimeSpan.FromMilliseconds(milliseconds); - } - } - else - { - // We'll end up here if the line starts with a colon, producing an empty field name, or if the field name is otherwise unrecognized. - // Spec: "If the line starts with a U+003A COLON character (:) Ignore the line." - // Spec: "Otherwise, The field is ignored" - } - - advance = line.Length + GetNewLineLength(); - sseItem = default; - return false; - } - - /// Gets the last event ID. - /// This value is updated any time a new last event ID is parsed. It is not reset between SSE items. - public string LastEventId { get; private set; } = string.Empty; // Spec: "must be initialized to the empty string" - - /// Gets the reconnection interval. - /// - /// If no retry event was received, this defaults to , and it will only - /// ever be in that situation. If a client wishes to retry, the server-sent - /// events specification states that the interval may then be decided by the client implementation and should be a - /// few seconds. - /// - public TimeSpan ReconnectionInterval { get; private set; } = Timeout.InfiniteTimeSpan; - - /// Transitions the object to a used state, throwing if it's already been used. - private void ThrowIfNotFirstEnumeration() - { - if (Interlocked.Exchange(ref _used, 1) != 0) - { - throw new InvalidOperationException("The enumerable may be enumerated only once."); - } - } - - /// Reads data from the stream into the line buffer. - private int FillLineBuffer() - { - ShiftOrGrowLineBufferIfNecessary(); - - int offset = _lineOffset + _lineLength; - int bytesRead = _stream.Read( -#if NET - _lineBuffer.AsSpan(offset)); -#else - _lineBuffer, offset, _lineBuffer.Length - offset); -#endif - - if (bytesRead > 0) - { - _lineLength += bytesRead; - } - else - { - _eof = true; - bytesRead = 0; - } - - return bytesRead; - } - - /// Reads data asynchronously from the stream into the line buffer. - private async ValueTask FillLineBufferAsync(CancellationToken cancellationToken) - { - ShiftOrGrowLineBufferIfNecessary(); - - int offset = _lineOffset + _lineLength; - int bytesRead = await -#if NET - _stream.ReadAsync(_lineBuffer.AsMemory(offset), cancellationToken) -#else - new ValueTask(_stream.ReadAsync(_lineBuffer, offset, _lineBuffer.Length - offset, cancellationToken)) -#endif - .ConfigureAwait(false); - - if (bytesRead > 0) - { - _lineLength += bytesRead; - } - else - { - _eof = true; - bytesRead = 0; - } - - return bytesRead; - } - - /// Gets the UTF8 BOM. - private static ReadOnlySpan Utf8Bom => [0xEF, 0xBB, 0xBF]; - - /// Called at the beginning of processing to skip over an optional UTF8 byte order mark. - private void SkipBomIfPresent() - { - Debug.Assert(_lineOffset == 0, $"Expected _lineOffset == 0, got {_lineOffset}"); - - if (_lineBuffer.AsSpan(0, _lineLength).StartsWith(Utf8Bom)) - { - _lineOffset += 3; - _lineLength -= 3; - } - } - - /// Grows the buffer, returning the existing one to the ArrayPool and renting an ArrayPool replacement. - private static void GrowBuffer(ref byte[]? buffer, int minimumLength) - { - byte[]? toReturn = buffer; - buffer = ArrayPool.Shared.Rent(Math.Max(minimumLength, DefaultArrayPoolRentSize)); - if (toReturn is not null) - { - Array.Copy(toReturn, buffer, toReturn.Length); - ArrayPool.Shared.Return(toReturn); - } - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs index 9ca9276138fe..03aa9d36d483 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Threading; using Azure.Core; using Azure.Core.Pipeline; @@ -15,13 +16,10 @@ namespace Azure.AI.Projects /// The AIProject service client. public partial class AIProjectClient { - private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; private readonly TokenCredential _tokenCredential; private readonly HttpPipeline _pipeline; private readonly Uri _endpoint; - private readonly string _subscriptionId; - private readonly string _resourceGroupName; - private readonly string _projectName; /// The ClientDiagnostics is used to provide tracing support for the client library. internal ClientDiagnostics ClientDiagnostics { get; } @@ -29,56 +27,72 @@ public partial class AIProjectClient /// The HTTP pipeline for sending and receiving REST requests and responses. public virtual HttpPipeline Pipeline => _pipeline; - /// Initializes a new instance of AIProjectClient. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// A credential used to authenticate to an Azure Service. - /// , , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public AIProjectClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AIProjectClientOptions()) + private ServicePatterns _cachedServicePatterns; + + /// Initializes a new instance of ServicePatterns. + public virtual ServicePatterns GetServicePatternsClient() + { + return Volatile.Read(ref _cachedServicePatterns) ?? Interlocked.CompareExchange(ref _cachedServicePatterns, new ServicePatterns(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint), null) ?? _cachedServicePatterns; + } + + /// Initializes a new instance of Connections. + /// The API version to use for this operation. + /// is null. + public virtual Connections GetConnectionsClient(string apiVersion = "2025-05-15-preview") { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Connections(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); + } + + /// Initializes a new instance of Evaluations. + /// The API version to use for this operation. + /// is null. + public virtual Evaluations GetEvaluationsClient(string apiVersion = "2025-05-15-preview") + { + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + + return new Evaluations(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); } - /// Initializes a new instance of AgentsClient. + /// Initializes a new instance of Datasets. /// The API version to use for this operation. /// is null. - public virtual AgentsClient GetAgentsClient(string apiVersion = "2024-07-01-preview") + public virtual Datasets GetDatasetsClient(string apiVersion = "2025-05-15-preview") { Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - return new AgentsClient(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _subscriptionId, _resourceGroupName, _projectName, apiVersion); + return new Datasets(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); } - /// Initializes a new instance of ConnectionsClient. + /// Initializes a new instance of Indexes. /// The API version to use for this operation. /// is null. - public virtual ConnectionsClient GetConnectionsClient(string apiVersion = "2024-07-01-preview") + public virtual Indexes GetIndexesClient(string apiVersion = "2025-05-15-preview") { Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - return new ConnectionsClient(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _subscriptionId, _resourceGroupName, _projectName, apiVersion); + return new Indexes(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); } - /// Initializes a new instance of TelemetryClient. + /// Initializes a new instance of Deployments. /// The API version to use for this operation. /// is null. - public virtual TelemetryClient GetTelemetryClient(string apiVersion = "2024-07-01-preview") + public virtual Deployments GetDeploymentsClient(string apiVersion = "2025-05-15-preview") { Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - return new TelemetryClient(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _subscriptionId, _resourceGroupName, _projectName, apiVersion); + return new Deployments(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); } - /// Initializes a new instance of EvaluationsClient. + /// Initializes a new instance of RedTeams. /// The API version to use for this operation. /// is null. - public virtual EvaluationsClient GetEvaluationsClient(string apiVersion = "2024-07-01-preview") + public virtual RedTeams GetRedTeamsClient(string apiVersion = "2025-05-15-preview") { Argument.AssertNotNull(apiVersion, nameof(apiVersion)); - return new EvaluationsClient(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, _subscriptionId, _resourceGroupName, _projectName, apiVersion); + return new RedTeams(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint, apiVersion); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClientOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClientOptions.cs index ee91a3c1030c..bd7e9bf96efb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClientOptions.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClientOptions.cs @@ -13,13 +13,15 @@ namespace Azure.AI.Projects /// Client options for AIProjectClient. public partial class AIProjectClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01_Preview; + private const ServiceVersion LatestVersion = ServiceVersion.V2025_05_15_Preview; /// The version of the service to use. public enum ServiceVersion { - /// Service version "2024-07-01-preview". - V2024_07_01_Preview = 1, + /// Service version "2025-05-01". + V2025_05_01 = 1, + /// Service version "2025-05-15-preview". + V2025_05_15_Preview = 2, } internal string Version { get; } @@ -29,7 +31,8 @@ public AIProjectClientOptions(ServiceVersion version = LatestVersion) { Version = version switch { - ServiceVersion.V2024_07_01_Preview => "2024-07-01-preview", + ServiceVersion.V2025_05_01 => "2025-05-01", + ServiceVersion.V2025_05_15_Preview => "2025-05-15-preview", _ => throw new NotSupportedException() }; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsClientBuilderExtensions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsClientBuilderExtensions.cs index acd83ee1a217..4e1d42a02a2f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsClientBuilderExtensions.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsClientBuilderExtensions.cs @@ -16,14 +16,16 @@ public static partial class AIProjectsClientBuilderExtensions { /// Registers a instance. /// The builder to register with. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - public static IAzureClientBuilder AddAIProjectClient(this TBuilder builder, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName) + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + public static IAzureClientBuilder AddAIProjectClient(this TBuilder builder, Uri endpoint) where TBuilder : IAzureClientFactoryBuilderWithCredential { - return builder.RegisterClientFactory((options, cred) => new AIProjectClient(endpoint, subscriptionId, resourceGroupName, projectName, cred, options)); + return builder.RegisterClientFactory((options, cred) => new AIProjectClient(endpoint, cred, options)); } /// Registers a instance. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs index 8d636f59179e..c14834a5d317 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectsModelFactory.cs @@ -14,661 +14,85 @@ namespace Azure.AI.Projects /// Model factory for models. public static partial class AIProjectsModelFactory { - /// Initializes a new instance of . - /// The type of binding, which is always 'storage_queue'. - /// Storage queue. - /// A new instance for mocking. - public static AzureFunctionBinding AzureFunctionBinding(AzureFunctionBindingType type = default, AzureFunctionStorageQueue storageQueue = null) - { - return new AzureFunctionBinding(type, storageQueue, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Type. - /// The JSON schema, describing response format. - /// A new instance for mocking. - public static ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(ResponseFormatJsonSchemaTypeType type = default, ResponseFormatJsonSchema jsonSchema = null) - { - return new ResponseFormatJsonSchemaType(type, jsonSchema, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). + /// Initializes a new instance of . + /// The friendly name of the connection, provided by the user. + /// A unique identifier for the connection, generated by the service. + /// Category of the connection. + /// The connection URL to be used for this service. + /// Whether the connection is tagged as the default connection of its type. + /// + /// The credentials used by the connection + /// 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 list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static ThreadMessageOptions ThreadMessageOptions(MessageRole role = default, BinaryData content = null, IEnumerable attachments = null, IDictionary metadata = null) + /// Metadata of the connection. + /// A new instance for mocking. + public static Connection Connection(string name = null, string id = null, ConnectionType type = default, string target = null, bool isDefault = default, BaseCredentials credentials = null, IReadOnlyDictionary metadata = null) { - attachments ??= new List(); metadata ??= new Dictionary(); - return new ThreadMessageOptions(role, content, attachments?.ToList(), metadata, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The plain text content for this block. - /// A new instance for mocking. - public static MessageInputTextBlock MessageInputTextBlock(string text = null) - { - return new MessageInputTextBlock(MessageBlockType.Text, serializedAdditionalRawData: null, text); - } - - /// Initializes a new instance of . - /// Information about the referenced image file, including file ID and optional detail level. - /// A new instance for mocking. - public static MessageInputImageFileBlock MessageInputImageFileBlock(MessageImageFileParam imageFile = null) - { - return new MessageInputImageFileBlock(MessageBlockType.ImageFile, serializedAdditionalRawData: null, imageFile); - } - - /// Initializes a new instance of . - /// The ID of the previously uploaded image file. - /// Optional detail level for the image (auto, low, or high). - /// A new instance for mocking. - public static MessageImageFileParam MessageImageFileParam(string fileId = null, ImageDetailLevel? detail = null) - { - return new MessageImageFileParam(fileId, detail, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Information about the external image URL, including the URL and optional detail level. - /// A new instance for mocking. - public static MessageInputImageUrlBlock MessageInputImageUrlBlock(MessageImageUrlParam imageUrl = null) - { - return new MessageInputImageUrlBlock(MessageBlockType.ImageUrl, serializedAdditionalRawData: null, imageUrl); - } - - /// Initializes a new instance of . - /// The publicly accessible URL of the external image. - /// Optional detail level for the image (auto, low, or high). Defaults to 'auto' if not specified. - /// A new instance for mocking. - public static MessageImageUrlParam MessageImageUrlParam(string url = null, ImageDetailLevel? detail = null) - { - return new MessageImageUrlParam(url, detail, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The provided reason describing why the message was marked as incomplete. - /// A new instance for mocking. - public static MessageIncompleteDetails MessageIncompleteDetails(MessageIncompleteDetailsReason reason = default) - { - return new MessageIncompleteDetails(reason, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// A new instance for mocking. - public static MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null) - { - return new UnknownMessageTextAnnotation(type, text, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The textual content associated with this text annotation item. - /// The details of the URL citation. - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - /// A new instance for mocking. - public static MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, MessageTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null) - { - return new MessageTextUrlCitationAnnotation( - "url_citation", - text, - serializedAdditionalRawData: null, - urlCitation, - startIndex, - endIndex); - } - - /// Initializes a new instance of . - /// The URL associated with this citation. - /// The title of the URL. - /// A new instance for mocking. - public static MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null) - { - return new MessageTextUrlCitationDetails(url, title, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// A new instance for mocking. - public static RequiredToolCall RequiredToolCall(string type = null, string id = null) - { - return new UnknownRequiredToolCall(type, serializedAdditionalRawData: null, id); - } - - /// Initializes a new instance of . - /// The status for the error. - /// The human-readable text associated with the error. - /// A new instance for mocking. - public static RunError RunError(string code = null, string message = null) - { - return new RunError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run. - /// A new instance for mocking. - public static IncompleteRunDetails IncompleteRunDetails(IncompleteDetailsReason reason = default) - { - return new IncompleteRunDetails(reason, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run. - /// Number of prompt tokens used over the course of the run. - /// Total number of tokens used (prompt + completion). - /// A new instance for mocking. - public static RunCompletionUsage RunCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) - { - return new RunCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Information about the message creation associated with this run step. - /// A new instance for mocking. - public static RunStepMessageCreationDetails RunStepMessageCreationDetails(RunStepMessageCreationReference messageCreation = null) - { - return new RunStepMessageCreationDetails(RunStepType.MessageCreation, serializedAdditionalRawData: null, messageCreation); - } - - /// Initializes a new instance of . - /// The ID of the message created by this run step. - /// A new instance for mocking. - public static RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null) - { - return new RunStepMessageCreationReference(messageId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// A list of tool call details for this run 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 , , , , , , , and . - /// - /// A new instance for mocking. - public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null) - { - toolCalls ??= new List(); - - return new RunStepToolCallDetails(RunStepType.ToolCalls, serializedAdditionalRawData: null, toolCalls?.ToList()); - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// A new instance for mocking. - public static RunStepToolCall RunStepToolCall(string type = null, string id = null) - { - return new UnknownRunStepToolCall(type, id, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The serialized log output emitted by the code interpreter. - /// A new instance for mocking. - public static RunStepCodeInterpreterLogOutput RunStepCodeInterpreterLogOutput(string logs = null) - { - return new RunStepCodeInterpreterLogOutput("logs", serializedAdditionalRawData: null, logs); - } - - /// Initializes a new instance of . - /// Referential information for the image associated with this output. - /// A new instance for mocking. - public static RunStepCodeInterpreterImageOutput RunStepCodeInterpreterImageOutput(RunStepCodeInterpreterImageReference image = null) - { - return new RunStepCodeInterpreterImageOutput("image", serializedAdditionalRawData: null, image); - } - - /// Initializes a new instance of . - /// The ID of the file associated with this image. - /// A new instance for mocking. - public static RunStepCodeInterpreterImageReference RunStepCodeInterpreterImageReference(string fileId = null) - { - return new RunStepCodeInterpreterImageReference(fileId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// For now, this is always going to be an empty object. - /// A new instance for mocking. - public static RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, RunStepFileSearchToolCallResults fileSearch = null) - { - return new RunStepFileSearchToolCall("file_search", id, serializedAdditionalRawData: null, fileSearch); - } - - /// Initializes a new instance of . - /// Ranking options for file search. - /// The array of a file search results. - /// A new instance for mocking. - public static RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(FileSearchRankingOptions rankingOptions = null, IEnumerable results = null) - { - results ??= new List(); - - return new RunStepFileSearchToolCallResults(rankingOptions, results?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the file that result was found in. - /// The name of the file that result was found in. - /// The score of the result. All values must be a floating point number between 0 and 1. - /// The content of the result that was found. The content is only included if requested via the include query parameter. - /// A new instance for mocking. - public static RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = default, IEnumerable content = null) - { - content ??= new List(); - - return new RunStepFileSearchToolCallResult(fileId, fileName, score, content?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The type of the content. - /// The text content of the file. - /// A new instance for mocking. - public static FileSearchToolCallContent FileSearchToolCallContent(FileSearchToolCallContentType type = default, string text = null) - { - return new FileSearchToolCallContent(type, text, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, IReadOnlyDictionary bingGrounding = null) - { - bingGrounding ??= new Dictionary(); - - return new RunStepBingGroundingToolCall("bing_grounding", id, serializedAdditionalRawData: null, bingGrounding); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, IReadOnlyDictionary azureAISearch = null) - { - azureAISearch ??= new Dictionary(); - - return new RunStepAzureAISearchToolCall("azure_ai_search", id, serializedAdditionalRawData: null, azureAISearch); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, IReadOnlyDictionary sharePoint = null) - { - sharePoint ??= new Dictionary(); - - return new RunStepSharepointToolCall("sharepoint_grounding", id, serializedAdditionalRawData: null, sharePoint); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, IReadOnlyDictionary microsoftFabric = null) - { - microsoftFabric ??= new Dictionary(); - - return new RunStepMicrosoftFabricToolCall("fabric_dataagent", id, serializedAdditionalRawData: null, microsoftFabric); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepCustomSearchToolCall RunStepCustomSearchToolCall(string id = null, IReadOnlyDictionary bingCustomSearch = null) - { - bingCustomSearch ??= new Dictionary(); - - return new RunStepCustomSearchToolCall("bing_custom_search", id, serializedAdditionalRawData: null, bingCustomSearch); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepOpenAPIToolCall RunStepOpenAPIToolCall(string id = null, IReadOnlyDictionary openAPI = null) - { - openAPI ??= new Dictionary(); - - return new RunStepOpenAPIToolCall("openapi", id, serializedAdditionalRawData: null, openAPI); - } - - /// Initializes a new instance of . - /// The error code for this error. - /// The human-readable text associated with this error. - /// A new instance for mocking. - public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null) - { - return new RunStepError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run step. - /// Number of prompt tokens used over the course of the run step. - /// Total number of tokens used (prompt + completion). - /// A new instance for mocking. - public static RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default) - { - return new RunStepCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// A new instance for mocking. - public static AgentPageableListOfVectorStore AgentPageableListOfVectorStore(AgentPageableListOfVectorStoreObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) - { - data ??= new List(); - - return new AgentPageableListOfVectorStore( - @object, - data?.ToList(), - firstId, - lastId, - hasMore, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store`. - /// The Unix timestamp (in seconds) for when the vector store was created. - /// The name of the vector store. - /// The total number of bytes used by the files in the vector store. - /// Files count grouped by status processed or being processed by this vector store. - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. - /// Details on when this vector store expires. - /// The Unix timestamp (in seconds) for when the vector store will expire. - /// The Unix timestamp (in seconds) for when the vector store was last active. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// A new instance for mocking. - public static VectorStore VectorStore(string id = null, VectorStoreObject @object = default, DateTimeOffset createdAt = default, string name = null, int usageBytes = default, VectorStoreFileCount fileCounts = null, VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = null, DateTimeOffset? expiresAt = null, DateTimeOffset? lastActiveAt = null, IReadOnlyDictionary metadata = null) - { - metadata ??= new Dictionary(); - - return new VectorStore( - id, - @object, - createdAt, + return new Connection( name, - usageBytes, - fileCounts, - status, - expiresAfter, - expiresAt, - lastActiveAt, - metadata, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The number of files that are currently being processed. - /// The number of files that have been successfully processed. - /// The number of files that have failed to process. - /// The number of files that were cancelled. - /// The total number of files. - /// A new instance for mocking. - public static VectorStoreFileCount VectorStoreFileCount(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default) - { - return new VectorStoreFileCount( - inProgress, - completed, - failed, - cancelled, - total, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// A new instance for mocking. - public static VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(VectorStoreStaticChunkingStrategyOptions @static = null) - { - return new VectorStoreStaticChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType.Static, serializedAdditionalRawData: null, @static); - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// A new instance for mocking. - public static VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = default, VectorStoreDeletionStatusObject @object = default) - { - return new VectorStoreDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// A new instance for mocking. - public static AgentPageableListOfVectorStoreFile AgentPageableListOfVectorStoreFile(AgentPageableListOfVectorStoreFileObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default) - { - data ??= new List(); - - return new AgentPageableListOfVectorStoreFile( - @object, - data?.ToList(), - firstId, - lastId, - hasMore, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file`. - /// - /// The total vector store usage in bytes. Note that this may be different from the original file - /// size. - /// - /// The Unix timestamp (in seconds) for when the vector store file was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - /// The last error associated with this vector store file. Will be `null` if there are no errors. - /// - /// The strategy used to chunk the file. - /// 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. - public static VectorStoreFile VectorStoreFile(string id = null, VectorStoreFileObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileStatus status = default, VectorStoreFileError lastError = null, VectorStoreChunkingStrategyResponse chunkingStrategy = null) - { - return new VectorStoreFile( id, - @object, - usageBytes, - createdAt, - vectorStoreId, - status, - lastError, - chunkingStrategy, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// One of `server_error` or `rate_limit_exceeded`. - /// A human-readable description of the error. - /// A new instance for mocking. - public static VectorStoreFileError VectorStoreFileError(VectorStoreFileErrorCode code = default, string message = null) - { - return new VectorStoreFileError(code, message, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// A new instance for mocking. - public static VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(VectorStoreStaticChunkingStrategyOptions @static = null) - { - return new VectorStoreStaticChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType.Static, serializedAdditionalRawData: null, @static); - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// A new instance for mocking. - public static VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = default, VectorStoreFileDeletionStatusObject @object = default) - { - return new VectorStoreFileDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file_batch`. - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. - /// Files count grouped by status processed or being processed by this vector store. - /// A new instance for mocking. - public static VectorStoreFileBatch VectorStoreFileBatch(string id = null, VectorStoreFileBatchObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileBatchStatus status = default, VectorStoreFileCount fileCounts = null) - { - return new VectorStoreFileBatch( - id, - @object, - createdAt, - vectorStoreId, - status, - fileCounts, + type, + target, + isDefault, + credentials, + metadata, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// A unique identifier for the resource. - /// The name of the resource. - /// The properties of the resource. - /// A new instance for mocking. - public static GetWorkspaceResponse GetWorkspaceResponse(string id = null, string name = null, WorkspaceProperties properties = null) - { - return new GetWorkspaceResponse(id, name, properties, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// A new instance for mocking. - public static WorkspaceProperties WorkspaceProperties(string applicationInsights = null) + /// Initializes a new instance of . + /// API Key. + /// A new instance for mocking. + public static ApiKeyCredentials ApiKeyCredentials(string apiKey = null) { - return new WorkspaceProperties(applicationInsights, serializedAdditionalRawData: null); + return new ApiKeyCredentials(CredentialType.ApiKey, serializedAdditionalRawData: null, apiKey); } - /// Initializes a new instance of . - /// A list of connection list secrets. - /// A new instance for mocking. - public static ListConnectionsResponse ListConnectionsResponse(IEnumerable value = null) + /// Initializes a new instance of . + /// The credential type. + /// A new instance for mocking. + public static CustomCredential CustomCredential(IReadOnlyDictionary keys = null) { - value ??= new List(); + keys ??= new Dictionary(); - return new ListConnectionsResponse(value?.ToList(), serializedAdditionalRawData: null); + return new CustomCredential(CredentialType.Custom, serializedAdditionalRawData: null, keys); } - /// Initializes a new instance of . - /// A unique identifier for the connection. - /// The name of the resource. - /// - /// The properties of the 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. - public static ConnectionResponse ConnectionResponse(string id = null, string name = null, ConnectionProperties properties = null) + /// Initializes a new instance of . + /// SAS token. + /// A new instance for mocking. + public static SASCredentials SASCredentials(string sasToken = null) { - return new ConnectionResponse(id, name, properties, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// A new instance for mocking. - public static ConnectionProperties ConnectionProperties(ConnectionType category = default, string target = null) - { - return new UnknownInternalConnectionProperties(default, category, target, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// Credentials will only be present for authType=ApiKey. - /// A new instance for mocking. - public static ConnectionPropertiesApiKeyAuth ConnectionPropertiesApiKeyAuth(ConnectionType category = default, string target = null, CredentialsApiKeyAuth credentials = null) - { - return new ConnectionPropertiesApiKeyAuth(AuthenticationType.ApiKey, category, target, serializedAdditionalRawData: null, credentials); - } - - /// Initializes a new instance of . - /// The API key. - /// A new instance for mocking. - public static CredentialsApiKeyAuth CredentialsApiKeyAuth(string key = null) - { - return new CredentialsApiKeyAuth(key, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// A new instance for mocking. - public static InternalConnectionPropertiesCustomAuth InternalConnectionPropertiesCustomAuth(ConnectionType category = default, string target = null) - { - return new InternalConnectionPropertiesCustomAuth(AuthenticationType.Custom, category, target, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// A new instance for mocking. - public static InternalConnectionPropertiesNoAuth InternalConnectionPropertiesNoAuth(ConnectionType category = default, string target = null) - { - return new InternalConnectionPropertiesNoAuth(AuthenticationType.None, category, target, serializedAdditionalRawData: null); + return new SASCredentials(CredentialType.SAS, serializedAdditionalRawData: null, sasToken); } /// Initializes a new instance of . - /// Identifier of the evaluation. + /// Identifier of the evaluation. /// /// Data for evaluation. /// 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 . /// - /// Evaluation target specifying the model config and parameters. /// Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique. /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. - /// Metadata containing createdBy and modifiedBy information. /// Status of the evaluation. It is set by service and is read-only. /// Evaluation's tags. Unlike properties, tags are fully mutable. /// Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. /// Evaluators to be used for the evaluation. /// A new instance for mocking. - public static Evaluation Evaluation(string id = null, InputData data = null, EvaluationTarget target = null, string displayName = null, string description = null, SystemData systemData = null, string status = null, IDictionary tags = null, IDictionary properties = null, IDictionary evaluators = null) + public static Evaluation Evaluation(string name = null, InputData data = null, string displayName = null, string description = null, string status = null, IDictionary tags = null, IDictionary properties = null, IDictionary evaluators = null) { tags ??= new Dictionary(); properties ??= new Dictionary(); evaluators ??= new Dictionary(); return new Evaluation( - id, + name, data, - target, displayName, description, - systemData, status, tags, properties, @@ -676,370 +100,393 @@ public static Evaluation Evaluation(string id = null, InputData data = null, Eva serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The timestamp the resource was created at. - /// The identity that created the resource. - /// The identity type that created the resource. - /// The timestamp of resource last modification (UTC). - /// A new instance for mocking. - public static SystemData SystemData(DateTimeOffset? createdAt = null, string createdBy = null, string createdByType = null, DateTimeOffset? lastModifiedAt = null) - { - return new SystemData(createdAt, createdBy, createdByType, lastModifiedAt, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// Data for evaluation. - /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. - /// Metadata containing createdBy and modifiedBy information. - /// Provisioning State of the evaluation. It is set by service and is read-only. - /// Evaluation's tags. Unlike properties, tags are fully mutable. - /// Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. - /// Enabled status of the evaluation. It is set by service and is read-only. + /// Initializes a new instance of . + /// Identifier of the agent run. + /// Identifier of the agent thread. This field is mandatory currently, but it will be optional in the future. /// Evaluators to be used for the evaluation. - /// - /// Trigger for the evaluation. - /// 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. - public static EvaluationSchedule EvaluationSchedule(string name = null, ApplicationInsightsConfiguration data = null, string description = null, SystemData systemData = null, string provisioningState = null, IDictionary tags = null, IDictionary properties = null, string isEnabled = null, IDictionary evaluators = null, Trigger trigger = null) + /// Sampling configuration for the evaluation. + /// Redaction configuration for the evaluation. + /// Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs. + /// A new instance for mocking. + public static AgentEvaluationRequest AgentEvaluationRequest(string runId = null, string threadId = null, IDictionary evaluators = null, AgentEvaluationSamplingConfiguration samplingConfiguration = null, AgentEvaluationRedactionConfiguration redactionConfiguration = null, string appInsightsConnectionString = null) { - tags ??= new Dictionary(); - properties ??= new Dictionary(); evaluators ??= new Dictionary(); - return new EvaluationSchedule( - name, - data, - description, - systemData, - provisioningState, - tags, - properties, - isEnabled, + return new AgentEvaluationRequest( + runId, + threadId, evaluators, - trigger, + samplingConfiguration, + redactionConfiguration, + appInsightsConnectionString, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The identifier of the message, which can be referenced in API endpoints. - /// The object type, which is always `thread.message.delta`. - /// The delta containing the fields that have changed on the Message. - /// A new instance for mocking. - public static MessageDeltaChunk MessageDeltaChunk(string id = null, MessageDeltaChunkObject @object = default, MessageDelta delta = null) - { - return new MessageDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The entity that produced the message. - /// - /// The content of the message as an array of text and/or images. - /// 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. - public static MessageDelta MessageDelta(MessageRole role = default, IEnumerable content = null) + /// Initializes a new instance of . + /// Identifier of the agent evaluation run. + /// Status of the agent evaluation. Options: Running, Completed, Failed. + /// The reason of the request failure for the long running process, if applicable. + /// The agent evaluation result. + /// A new instance for mocking. + public static AgentEvaluation AgentEvaluation(string id = null, string status = null, string error = null, IEnumerable result = null) { - content ??= new List(); + result ??= new List(); - return new MessageDelta(role, content?.ToList(), serializedAdditionalRawData: null); + return new AgentEvaluation(id, status, error, result?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// A new instance for mocking. - public static MessageDeltaContent MessageDeltaContent(int index = default, string type = null) + /// Initializes a new instance of . + /// Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion. + /// Identifier of the evaluator. + /// Score of the given evaluator. No restriction on range. + /// Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable. + /// Reasoning for the evaluation result. + /// Version of the evaluator that was used to evaluate the agent's completion. + /// The unique identifier of the thread. + /// The unique identifier of the run. + /// A string explaining why there was an error, if applicable. + /// Additional properties relevant to the evaluator. These will differ between evaluators. + /// A new instance for mocking. + public static AgentEvaluationResult AgentEvaluationResult(string evaluator = null, string evaluatorId = null, float score = default, string status = null, string reason = null, string version = null, string threadId = null, string runId = null, string error = null, IReadOnlyDictionary additionalDetails = null) { - return new UnknownMessageDeltaContent(index, type, serializedAdditionalRawData: null); - } + additionalDetails ??= new Dictionary(); - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The image_file data. - /// A new instance for mocking. - public static MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = default, MessageDeltaImageFileContentObject imageFile = null) - { - return new MessageDeltaImageFileContent(index, "image_file", serializedAdditionalRawData: null, imageFile); + return new AgentEvaluationResult( + evaluator, + evaluatorId, + score, + status, + reason, + version, + threadId, + runId, + error, + additionalDetails, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The file ID of the image in the message content. - /// A new instance for mocking. - public static MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null) + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Dataset type. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// A new instance for mocking. + public static DatasetVersion DatasetVersion(string dataUri = null, string type = null, bool? isReference = null, string connectionName = null, string id = null, string name = null, string version = null, string description = null, IDictionary tags = null) { - return new MessageDeltaImageFileContentObject(fileId, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The text content details. - /// A new instance for mocking. - public static MessageDeltaTextContent MessageDeltaTextContent(int index = default, MessageDeltaTextContentObject text = null) - { - return new MessageDeltaTextContent(index, "text", serializedAdditionalRawData: null, text); + return new UnknownDatasetVersion( + dataUri, + type == null ? default : new DatasetType(type), + isReference, + connectionName, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The data that makes up the text. - /// - /// Annotations for the text. - /// 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. - public static MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, IEnumerable annotations = null) + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// A new instance for mocking. + public static FileDatasetVersion FileDatasetVersion(string dataUri = null, bool? isReference = null, string connectionName = null, string id = null, string name = null, string version = null, string description = null, IDictionary tags = null) { - annotations ??= new List(); + tags ??= new Dictionary(); - return new MessageDeltaTextContentObject(value, annotations?.ToList(), serializedAdditionalRawData: null); + return new FileDatasetVersion( + dataUri, + DatasetType.UriFile, + isReference, + connectionName, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// A new instance for mocking. - public static MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = default, string type = null) + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// A new instance for mocking. + public static FolderDatasetVersion FolderDatasetVersion(string dataUri = null, bool? isReference = null, string connectionName = null, string id = null, string name = null, string version = null, string description = null, IDictionary tags = null) { - return new UnknownMessageDeltaTextAnnotation(index, type, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The details of the URL citation. - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - /// A new instance for mocking. - public static MessageDeltaTextUrlCitationAnnotation MessageDeltaTextUrlCitationAnnotation(int index = default, MessageDeltaTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null) - { - return new MessageDeltaTextUrlCitationAnnotation( - index, - "url_citation", - serializedAdditionalRawData: null, - urlCitation, - startIndex, - endIndex); + return new FolderDatasetVersion( + dataUri, + DatasetType.UriFolder, + isReference, + connectionName, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The URL associated with this citation. - /// The title of the URL. - /// A new instance for mocking. - public static MessageDeltaTextUrlCitationDetails MessageDeltaTextUrlCitationDetails(string url = null, string title = null) + /// Initializes a new instance of . + /// If PendingUploadId is not provided, a random GUID will be used. + /// Azure Storage Account connection name to use for generating temporary SAS token. + /// BlobReference is the only supported type. + /// A new instance for mocking. + public static PendingUploadRequest PendingUploadRequest(string pendingUploadId = null, string connectionName = null, PendingUploadType pendingUploadType = default) { - return new MessageDeltaTextUrlCitationDetails(url, title, serializedAdditionalRawData: null); + return new PendingUploadRequest(pendingUploadId, connectionName, pendingUploadType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The file citation information. - /// The text in the message content that needs to be replaced. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - /// A new instance for mocking. - public static MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = default, MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = null, int? endIndex = null) + /// Initializes a new instance of . + /// Container-level read, write, list SAS. + /// ID for this upload request. + /// Version of asset to be created if user did not specify version when initially creating upload. + /// BlobReference is the only supported type. + /// A new instance for mocking. + public static PendingUploadResponse PendingUploadResponse(BlobReference blobReference = null, string pendingUploadId = null, string version = null, PendingUploadType pendingUploadType = default) { - return new MessageDeltaTextFileCitationAnnotation( - index, - "file_citation", - serializedAdditionalRawData: null, - fileCitation, - text, - startIndex, - endIndex); + return new PendingUploadResponse(blobReference, pendingUploadId, version, pendingUploadType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The ID of the specific file the citation is from. - /// The specific quote in the cited file. - /// A new instance for mocking. - public static MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null) + /// Initializes a new instance of . + /// Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path. + /// ARM ID of the storage account to use. + /// Credential info to access the storage account. + /// A new instance for mocking. + public static BlobReference BlobReference(string blobUri = null, string storageAccountArmId = null, SasCredential credential = null) { - return new MessageDeltaTextFileCitationAnnotationObject(fileId, quote, serializedAdditionalRawData: null); + return new BlobReference(blobUri, storageAccountArmId, credential, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The file path information. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - /// The text in the message content that needs to be replaced. - /// A new instance for mocking. - public static MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = default, MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = null, int? endIndex = null, string text = null) + /// Initializes a new instance of . + /// SAS uri. + /// Type of credential. + /// A new instance for mocking. + public static SasCredential SasCredential(string sasUri = null, SasCredentialType type = default) { - return new MessageDeltaTextFilePathAnnotation( - index, - "file_path", - serializedAdditionalRawData: null, - filePath, - startIndex, - endIndex, - text); + return new SasCredential(sasUri, type, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The file ID for the annotation. - /// A new instance for mocking. - public static MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null) + /// Initializes a new instance of . + /// Credential info to access the storage account. + /// A new instance for mocking. + public static AssetCredentialResponse AssetCredentialResponse(BlobReference blobReference = null) { - return new MessageDeltaTextFilePathAnnotationObject(fileId, serializedAdditionalRawData: null); + return new AssetCredentialResponse(blobReference, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The identifier of the run step, which can be referenced in API endpoints. - /// The object type, which is always `thread.run.step.delta`. - /// The delta containing the fields that have changed on the run step. - /// A new instance for mocking. - public static RunStepDeltaChunk RunStepDeltaChunk(string id = null, RunStepDeltaChunkObject @object = default, RunStepDelta delta = null) + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// A new instance for mocking. + public static Index Index(string type = null, string id = null, string name = null, string version = null, string description = null, IDictionary tags = null) { - return new RunStepDeltaChunk(id, @object, delta, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// - /// The details of the run 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 and . - /// - /// A new instance for mocking. - public static RunStepDelta RunStepDelta(RunStepDeltaDetail stepDetails = null) - { - return new RunStepDelta(stepDetails, serializedAdditionalRawData: null); + return new UnknownIndex( + type == null ? default : new IndexType(type), + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The message creation data. - /// A new instance for mocking. - public static RunStepDeltaMessageCreation RunStepDeltaMessageCreation(RunStepDeltaMessageCreationObject messageCreation = null) + /// Initializes a new instance of . + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Name of connection to Azure AI Search. + /// Name of index in Azure AI Search resource to attach. + /// Field mapping configuration. + /// A new instance for mocking. + public static AzureAISearchIndex AzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, IDictionary tags = null, string connectionName = null, string indexName = null, FieldMapping fieldMapping = null) { - return new RunStepDeltaMessageCreation("message_creation", serializedAdditionalRawData: null, messageCreation); - } + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// The ID of the newly-created message. - /// A new instance for mocking. - public static RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null) - { - return new RunStepDeltaMessageCreationObject(messageId, serializedAdditionalRawData: null); + return new AzureAISearchIndex( + IndexType.AzureSearch, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null, + connectionName, + indexName, + fieldMapping); } - /// Initializes a new instance of . - /// - /// The collection of tool calls for the tool call detail item. - /// 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. - public static RunStepDeltaToolCallObject RunStepDeltaToolCallObject(IEnumerable toolCalls = null) + /// Initializes a new instance of . + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Vector store id of managed index. + /// A new instance for mocking. + public static ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, IDictionary tags = null, string vectorStoreId = null) { - toolCalls ??= new List(); + tags ??= new Dictionary(); - return new RunStepDeltaToolCallObject("tool_calls", serializedAdditionalRawData: null, toolCalls?.ToList()); + return new ManagedAzureAISearchIndex( + IndexType.ManagedAzureSearch, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null, + vectorStoreId); } - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// A new instance for mocking. - public static RunStepDeltaToolCall RunStepDeltaToolCall(int index = default, string id = null, string type = null) + /// Initializes a new instance of . + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Name of connection to CosmosDB. + /// Name of the CosmosDB Database. + /// Name of CosmosDB Container. + /// Embedding model configuration. + /// Field mapping configuration. + /// A new instance for mocking. + public static CosmosDBIndex CosmosDBIndex(string id = null, string name = null, string version = null, string description = null, IDictionary tags = null, string connectionName = null, string databaseName = null, string containerName = null, EmbeddingConfiguration embeddingConfiguration = null, FieldMapping fieldMapping = null) { - return new UnknownRunStepDeltaToolCall(index, id, type, serializedAdditionalRawData: null); - } + tags ??= new Dictionary(); - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The function data for the tool call. - /// A new instance for mocking. - public static RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = default, string id = null, RunStepDeltaFunction function = null) - { - return new RunStepDeltaFunctionToolCall(index, id, "function", serializedAdditionalRawData: null, function); + return new CosmosDBIndex( + IndexType.CosmosDB, + id, + name, + version, + description, + tags, + serializedAdditionalRawData: null, + connectionName, + databaseName, + containerName, + embeddingConfiguration, + fieldMapping); } - /// Initializes a new instance of . - /// The name of the function. - /// The arguments passed to the function as input. - /// The output of the function, null if outputs have not yet been submitted. - /// A new instance for mocking. - public static RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null) + /// Initializes a new instance of . + /// The type of the deployment. + /// Name of the deployment. + /// A new instance for mocking. + public static Deployment Deployment(string type = null, string name = null) { - return new RunStepDeltaFunction(name, arguments, output, serializedAdditionalRawData: null); + return new UnknownDeployment(type == null ? default : new DeploymentType(type), name, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = default, string id = null, RunStepFileSearchToolCallResults fileSearch = null) + /// Initializes a new instance of . + /// Name of the deployment. + /// Publisher-specific name of the deployed model. + /// Publisher-specific version of the deployed model. + /// Name of the deployed model's publisher. + /// Capabilities of deployed model. + /// Sku of the model deployment. + /// Name of the connection the deployment comes from. + /// A new instance for mocking. + public static ModelDeployment ModelDeployment(string name = null, string modelName = null, string modelVersion = null, string modelPublisher = null, IReadOnlyDictionary capabilities = null, Sku sku = null, string connectionName = null) { - return new RunStepDeltaFileSearchToolCall(index, id, "file_search", serializedAdditionalRawData: null, fileSearch); - } + capabilities ??= new Dictionary(); - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The Code Interpreter data for the tool call. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = default, string id = null, RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null) - { - return new RunStepDeltaCodeInterpreterToolCall(index, id, "code_interpreter", serializedAdditionalRawData: null, codeInterpreter); + return new ModelDeployment( + DeploymentType.ModelDeployment, + name, + serializedAdditionalRawData: null, + modelName, + modelVersion, + modelPublisher, + capabilities, + sku, + connectionName); + } + + /// Initializes a new instance of . + /// Sku capacity. + /// Sku family. + /// Sku name. + /// Sku size. + /// Sku tier. + /// A new instance for mocking. + public static Sku Sku(long capacity = default, string family = null, string name = null, string size = null, string tier = null) + { + return new Sku( + capacity, + family, + name, + size, + tier, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The input into the Code Interpreter tool call. - /// - /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more - /// items, including text (`logs`) or images (`image`). Each of these are represented by a - /// different object type. - /// 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 . + /// Initializes a new instance of . + /// Identifier of the red team run. + /// Name of the red-team run. + /// Number of simulation rounds. + /// List of attack strategies or nested lists of attack strategies. + /// Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result. + /// List of risk categories to generate attack objectives for. + /// Application scenario for the red team operation, to generate scenario specific attacks. + /// Red team's tags. Unlike properties, tags are fully mutable. + /// Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. + /// Status of the red-team. It is set by service and is read-only. + /// + /// Target configuration for the red-team run. + /// 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 . /// - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, IEnumerable outputs = null) - { - outputs ??= new List(); - - return new RunStepDeltaCodeInterpreterDetailItemObject(input, outputs?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = default, string type = null) - { - return new UnknownRunStepDeltaCodeInterpreterOutput(index, type, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The text output from the Code Interpreter tool call. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = default, string logs = null) + /// A new instance for mocking. + public static RedTeam RedTeam(string name = null, string displayName = null, int? numTurns = null, IEnumerable attackStrategies = null, bool? simulationOnly = null, IEnumerable riskCategories = null, string applicationScenario = null, IDictionary tags = null, IDictionary properties = null, string status = null, TargetConfig target = null) { - return new RunStepDeltaCodeInterpreterLogOutput(index, "logs", serializedAdditionalRawData: null, logs); - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The image data for the Code Interpreter tool call output. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = default, RunStepDeltaCodeInterpreterImageOutputObject image = null) - { - return new RunStepDeltaCodeInterpreterImageOutput(index, "image", serializedAdditionalRawData: null, image); - } + attackStrategies ??= new List(); + riskCategories ??= new List(); + tags ??= new Dictionary(); + properties ??= new Dictionary(); - /// Initializes a new instance of . - /// The file ID for the image. - /// A new instance for mocking. - public static RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null) - { - return new RunStepDeltaCodeInterpreterImageOutputObject(fileId, serializedAdditionalRawData: null); + return new RedTeam( + name, + displayName, + numTurns, + attackStrategies?.ToList(), + simulationOnly, + riskCategories?.ToList(), + applicationScenario, + tags, + properties, + status, + target, + serializedAdditionalRawData: null); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.Serialization.cs deleted file mode 100644 index 8d9aa0b28e52..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.Serialization.cs +++ /dev/null @@ -1,197 +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.Projects -{ - public partial class AISearchIndexResource : 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(AISearchIndexResource)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("index_connection_id"u8); - writer.WriteStringValue(IndexConnectionId); - writer.WritePropertyName("index_name"u8); - writer.WriteStringValue(IndexName); - if (Optional.IsDefined(QueryType)) - { - writer.WritePropertyName("query_type"u8); - writer.WriteStringValue(QueryType.Value.ToString()); - } - if (Optional.IsDefined(TopK)) - { - writer.WritePropertyName("top_k"u8); - writer.WriteNumberValue(TopK.Value); - } - if (Optional.IsDefined(Filter)) - { - writer.WritePropertyName("filter"u8); - writer.WriteStringValue(Filter); - } - 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 - } - } - } - - AISearchIndexResource 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(AISearchIndexResource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAISearchIndexResource(document.RootElement, options); - } - - internal static AISearchIndexResource DeserializeAISearchIndexResource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string indexConnectionId = default; - string indexName = default; - AzureAISearchQueryType? queryType = default; - int? topK = default; - string filter = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("index_connection_id"u8)) - { - indexConnectionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("index_name"u8)) - { - indexName = property.Value.GetString(); - continue; - } - if (property.NameEquals("query_type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - queryType = new AzureAISearchQueryType(property.Value.GetString()); - continue; - } - if (property.NameEquals("top_k"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - topK = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("filter"u8)) - { - filter = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AISearchIndexResource( - indexConnectionId, - indexName, - queryType, - topK, - filter, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{options.Format}' format."); - } - } - - AISearchIndexResource 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 DeserializeAISearchIndexResource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AISearchIndexResource)} 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 AISearchIndexResource FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAISearchIndexResource(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/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.cs deleted file mode 100644 index 3958defefe9b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AISearchIndexResource.cs +++ /dev/null @@ -1,94 +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.Projects -{ - /// A AI Search Index resource. - public partial class AISearchIndexResource - { - /// - /// 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 index connection id in an IndexResource attached to this agent. - /// The name of an index in an IndexResource attached to this agent. - /// or is null. - public AISearchIndexResource(string indexConnectionId, string indexName) - { - Argument.AssertNotNull(indexConnectionId, nameof(indexConnectionId)); - Argument.AssertNotNull(indexName, nameof(indexName)); - - IndexConnectionId = indexConnectionId; - IndexName = indexName; - } - - /// Initializes a new instance of . - /// An index connection id in an IndexResource attached to this agent. - /// The name of an index in an IndexResource attached to this agent. - /// Type of query in an AIIndexResource attached to this agent. - /// Number of documents to retrieve from search and present to the model. - /// Odata filter string for search resource. - /// Keeps track of any properties unknown to the library. - internal AISearchIndexResource(string indexConnectionId, string indexName, AzureAISearchQueryType? queryType, int? topK, string filter, IDictionary serializedAdditionalRawData) - { - IndexConnectionId = indexConnectionId; - IndexName = indexName; - QueryType = queryType; - TopK = topK; - Filter = filter; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AISearchIndexResource() - { - } - - /// An index connection id in an IndexResource attached to this agent. - public string IndexConnectionId { get; set; } - /// The name of an index in an IndexResource attached to this agent. - public string IndexName { get; set; } - /// Type of query in an AIIndexResource attached to this agent. - public AzureAISearchQueryType? QueryType { get; set; } - /// Number of documents to retrieve from search and present to the model. - public int? TopK { get; set; } - /// Odata filter string for search resource. - public string Filter { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.Serialization.cs deleted file mode 100644 index 6c8eee6cc2a9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class AOAIModelConfig : 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(AOAIModelConfig)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("azureEndpoint"u8); - writer.WriteStringValue(AzureEndpoint); - writer.WritePropertyName("apiKey"u8); - writer.WriteStringValue(ApiKey); - writer.WritePropertyName("azureDeployment"u8); - writer.WriteStringValue(AzureDeployment); - } - - AOAIModelConfig 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(AOAIModelConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAOAIModelConfig(document.RootElement, options); - } - - internal static AOAIModelConfig DeserializeAOAIModelConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string azureEndpoint = default; - string apiKey = default; - string azureDeployment = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azureEndpoint"u8)) - { - azureEndpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("apiKey"u8)) - { - apiKey = property.Value.GetString(); - continue; - } - if (property.NameEquals("azureDeployment"u8)) - { - azureDeployment = 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 AOAIModelConfig(type, serializedAdditionalRawData, azureEndpoint, apiKey, azureDeployment); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AOAIModelConfig)} does not support writing '{options.Format}' format."); - } - } - - AOAIModelConfig 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 DeserializeAOAIModelConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AOAIModelConfig)} 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 new AOAIModelConfig FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAOAIModelConfig(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.cs deleted file mode 100644 index 1983a0c90b7b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AOAIModelConfig.cs +++ /dev/null @@ -1,58 +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.Projects -{ - /// Azure OpenAI model configuration. The API version would be selected by the service for querying the model. - public partial class AOAIModelConfig : TargetModelConfig - { - /// Initializes a new instance of . - /// Endpoint targetURI for AOAI model. - /// API Key for AOAI model. - /// Deployment name for AOAI model. - /// , or is null. - public AOAIModelConfig(string azureEndpoint, string apiKey, string azureDeployment) - { - Argument.AssertNotNull(azureEndpoint, nameof(azureEndpoint)); - Argument.AssertNotNull(apiKey, nameof(apiKey)); - Argument.AssertNotNull(azureDeployment, nameof(azureDeployment)); - - Type = "AOAI"; - AzureEndpoint = azureEndpoint; - ApiKey = apiKey; - AzureDeployment = azureDeployment; - } - - /// Initializes a new instance of . - /// Type of the model configuration. - /// Keeps track of any properties unknown to the library. - /// Endpoint targetURI for AOAI model. - /// API Key for AOAI model. - /// Deployment name for AOAI model. - internal AOAIModelConfig(string type, IDictionary serializedAdditionalRawData, string azureEndpoint, string apiKey, string azureDeployment) : base(type, serializedAdditionalRawData) - { - AzureEndpoint = azureEndpoint; - ApiKey = apiKey; - AzureDeployment = azureDeployment; - } - - /// Initializes a new instance of for deserialization. - internal AOAIModelConfig() - { - } - - /// Endpoint targetURI for AOAI model. - public string AzureEndpoint { get; set; } - /// API Key for AOAI model. - public string ApiKey { get; set; } - /// Deployment name for AOAI model. - public string AzureDeployment { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs deleted file mode 100644 index 71f87c864b7a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs +++ /dev/null @@ -1,379 +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.Projects -{ - public partial class Agent : 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(Agent)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - if (Description != null) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - if (Instructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - else - { - writer.WriteNull("instructions"); - } - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - 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 - } - } - } - - Agent 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(Agent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgent(document.RootElement, options); - } - - internal static Agent DeserializeAgent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string @object = default; - DateTimeOffset createdAt = default; - string name = default; - string description = default; - string model = default; - string instructions = default; - IReadOnlyList tools = default; - ToolResources toolResources = default; - float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; - IReadOnlyDictionary metadata = 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("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("tools"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new Agent( - id, - @object, - createdAt, - name, - description, - model, - instructions, - tools, - toolResources, - temperature, - topP, - responseFormat, - metadata, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(Agent)} does not support writing '{options.Format}' format."); - } - } - - Agent 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 DeserializeAgent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(Agent)} 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 Agent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgent(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/ai/Azure.AI.Projects/src/Generated/Agent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs deleted file mode 100644 index e3dca8de0f79..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs +++ /dev/null @@ -1,236 +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.Projects -{ - /// Represents an agent that can call the model and use tools. - public partial class Agent - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The name of the agent. - /// The description of the agent. - /// The ID of the model to use. - /// The system instructions for the agent to use. - /// - /// The collection of tools enabled for the agent. - /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// , or is null. - internal Agent(string id, DateTimeOffset createdAt, string name, string description, string model, string instructions, IEnumerable tools, ToolResources toolResources, float? temperature, float? topP, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(model, nameof(model)); - Argument.AssertNotNull(tools, nameof(tools)); - - Id = id; - CreatedAt = createdAt; - Name = name; - Description = description; - Model = model; - Instructions = instructions; - Tools = tools.ToList(); - ToolResources = toolResources; - Temperature = temperature; - TopP = topP; - Metadata = metadata; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always assistant. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The name of the agent. - /// The description of the agent. - /// The ID of the model to use. - /// The system instructions for the agent to use. - /// - /// The collection of tools enabled for the agent. - /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal Agent(string id, string @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - CreatedAt = createdAt; - Name = name; - Description = description; - Model = model; - Instructions = instructions; - Tools = tools; - ToolResources = toolResources; - Temperature = temperature; - TopP = topP; - ResponseFormat = responseFormat; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal Agent() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// The name of the agent. - public string Name { get; } - /// The description of the agent. - public string Description { get; } - /// The ID of the model to use. - public string Model { get; } - /// The system instructions for the agent to use. - public string Instructions { get; } - /// - /// The collection of tools enabled for the agent. - /// 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 IReadOnlyList Tools { get; } - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - public ToolResources ToolResources { get; } - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - public float? Temperature { get; } - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - public float? TopP { get; } - /// - /// The response format of the tool calls used by this agent. - /// - /// 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 ResponseFormat { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.Serialization.cs new file mode 100644 index 000000000000..c940e64139e4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) 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.Projects +{ + public partial class AgentEvaluation : 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(AgentEvaluation)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteStringValue(Error); + } + if (Optional.IsCollectionDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteStartArray(); + foreach (var item in Result) + { + 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 + } + } + } + + AgentEvaluation 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(AgentEvaluation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluation(document.RootElement, options); + } + + internal static AgentEvaluation DeserializeAgentEvaluation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string status = default; + string error = default; + IReadOnlyList result = 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("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (property.NameEquals("result"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AgentEvaluationResult.DeserializeAgentEvaluationResult(item, options)); + } + result = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AgentEvaluation(id, status, error, result ?? 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluation)} does not support writing '{options.Format}' format."); + } + } + + AgentEvaluation 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 DeserializeAgentEvaluation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluation)} 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 AgentEvaluation FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentEvaluation(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/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.cs new file mode 100644 index 000000000000..445a1ff982f7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluation.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.AI.Projects +{ + /// Evaluation response for agent evaluation run. + public partial class AgentEvaluation + { + /// + /// 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 . + /// Identifier of the agent evaluation run. + /// Status of the agent evaluation. Options: Running, Completed, Failed. + /// or is null. + internal AgentEvaluation(string id, string status) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(status, nameof(status)); + + Id = id; + Status = status; + Result = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Identifier of the agent evaluation run. + /// Status of the agent evaluation. Options: Running, Completed, Failed. + /// The reason of the request failure for the long running process, if applicable. + /// The agent evaluation result. + /// Keeps track of any properties unknown to the library. + internal AgentEvaluation(string id, string status, string error, IReadOnlyList result, IDictionary serializedAdditionalRawData) + { + Id = id; + Status = status; + Error = error; + Result = result; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AgentEvaluation() + { + } + + /// Identifier of the agent evaluation run. + public string Id { get; } + /// Status of the agent evaluation. Options: Running, Completed, Failed. + public string Status { get; } + /// The reason of the request failure for the long running process, if applicable. + public string Error { get; } + /// The agent evaluation result. + public IReadOnlyList Result { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.Serialization.cs new file mode 100644 index 000000000000..33d799d4dc50 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.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.AI.Projects +{ + public partial class AgentEvaluationRedactionConfiguration : 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(AgentEvaluationRedactionConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RedactScoreProperties)) + { + writer.WritePropertyName("redactScoreProperties"u8); + writer.WriteBooleanValue(RedactScoreProperties.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 + } + } + } + + AgentEvaluationRedactionConfiguration 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(AgentEvaluationRedactionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluationRedactionConfiguration(document.RootElement, options); + } + + internal static AgentEvaluationRedactionConfiguration DeserializeAgentEvaluationRedactionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? redactScoreProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("redactScoreProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactScoreProperties = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AgentEvaluationRedactionConfiguration(redactScoreProperties, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluationRedactionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AgentEvaluationRedactionConfiguration 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 DeserializeAgentEvaluationRedactionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluationRedactionConfiguration)} 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 AgentEvaluationRedactionConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentEvaluationRedactionConfiguration(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/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.cs new file mode 100644 index 000000000000..29f07516faca --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRedactionConfiguration.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.AI.Projects +{ + /// The redaction configuration will allow the user to control what is redacted. + public partial class AgentEvaluationRedactionConfiguration + { + /// + /// 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 AgentEvaluationRedactionConfiguration() + { + } + + /// Initializes a new instance of . + /// Redact score properties. If not specified, the default is to redact in production. + /// Keeps track of any properties unknown to the library. + internal AgentEvaluationRedactionConfiguration(bool? redactScoreProperties, IDictionary serializedAdditionalRawData) + { + RedactScoreProperties = redactScoreProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Redact score properties. If not specified, the default is to redact in production. + public bool? RedactScoreProperties { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.Serialization.cs new file mode 100644 index 000000000000..ca242f61c9a6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.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.AI.Projects +{ + public partial class AgentEvaluationRequest : 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(AgentEvaluationRequest)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + writer.WritePropertyName("evaluators"u8); + writer.WriteStartObject(); + foreach (var item in Evaluators) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + if (Optional.IsDefined(SamplingConfiguration)) + { + writer.WritePropertyName("samplingConfiguration"u8); + writer.WriteObjectValue(SamplingConfiguration, options); + } + if (Optional.IsDefined(RedactionConfiguration)) + { + writer.WritePropertyName("redactionConfiguration"u8); + writer.WriteObjectValue(RedactionConfiguration, options); + } + writer.WritePropertyName("appInsightsConnectionString"u8); + writer.WriteStringValue(AppInsightsConnectionString); + 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 + } + } + } + + AgentEvaluationRequest 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(AgentEvaluationRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluationRequest(document.RootElement, options); + } + + internal static AgentEvaluationRequest DeserializeAgentEvaluationRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string runId = default; + string threadId = default; + IDictionary evaluators = default; + AgentEvaluationSamplingConfiguration samplingConfiguration = default; + AgentEvaluationRedactionConfiguration redactionConfiguration = default; + string appInsightsConnectionString = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runId"u8)) + { + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + if (property.NameEquals("evaluators"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, EvaluatorConfiguration.DeserializeEvaluatorConfiguration(property0.Value, options)); + } + evaluators = dictionary; + continue; + } + if (property.NameEquals("samplingConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + samplingConfiguration = AgentEvaluationSamplingConfiguration.DeserializeAgentEvaluationSamplingConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("redactionConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + redactionConfiguration = AgentEvaluationRedactionConfiguration.DeserializeAgentEvaluationRedactionConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("appInsightsConnectionString"u8)) + { + appInsightsConnectionString = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AgentEvaluationRequest( + runId, + threadId, + evaluators, + samplingConfiguration, + redactionConfiguration, + appInsightsConnectionString, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluationRequest)} does not support writing '{options.Format}' format."); + } + } + + AgentEvaluationRequest 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 DeserializeAgentEvaluationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluationRequest)} 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 AgentEvaluationRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentEvaluationRequest(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/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.cs new file mode 100644 index 000000000000..941832665a14 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationRequest.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Evaluation request for agent run. + public partial class AgentEvaluationRequest + { + /// + /// 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 . + /// Identifier of the agent run. + /// Evaluators to be used for the evaluation. + /// Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs. + /// , or is null. + public AgentEvaluationRequest(string runId, IDictionary evaluators, string appInsightsConnectionString) + { + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(evaluators, nameof(evaluators)); + Argument.AssertNotNull(appInsightsConnectionString, nameof(appInsightsConnectionString)); + + RunId = runId; + Evaluators = evaluators; + AppInsightsConnectionString = appInsightsConnectionString; + } + + /// Initializes a new instance of . + /// Identifier of the agent run. + /// Identifier of the agent thread. This field is mandatory currently, but it will be optional in the future. + /// Evaluators to be used for the evaluation. + /// Sampling configuration for the evaluation. + /// Redaction configuration for the evaluation. + /// Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs. + /// Keeps track of any properties unknown to the library. + internal AgentEvaluationRequest(string runId, string threadId, IDictionary evaluators, AgentEvaluationSamplingConfiguration samplingConfiguration, AgentEvaluationRedactionConfiguration redactionConfiguration, string appInsightsConnectionString, IDictionary serializedAdditionalRawData) + { + RunId = runId; + ThreadId = threadId; + Evaluators = evaluators; + SamplingConfiguration = samplingConfiguration; + RedactionConfiguration = redactionConfiguration; + AppInsightsConnectionString = appInsightsConnectionString; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AgentEvaluationRequest() + { + } + + /// Identifier of the agent run. + public string RunId { get; } + /// Identifier of the agent thread. This field is mandatory currently, but it will be optional in the future. + public string ThreadId { get; set; } + /// Evaluators to be used for the evaluation. + public IDictionary Evaluators { get; } + /// Sampling configuration for the evaluation. + public AgentEvaluationSamplingConfiguration SamplingConfiguration { get; set; } + /// Redaction configuration for the evaluation. + public AgentEvaluationRedactionConfiguration RedactionConfiguration { get; set; } + /// Pass the AppInsights connection string to the agent evaluation for the evaluation results and the errors logs. + public string AppInsightsConnectionString { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.Serialization.cs new file mode 100644 index 000000000000..a6ee774b8f5e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) 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.Projects +{ + public partial class AgentEvaluationResult : 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(AgentEvaluationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("evaluator"u8); + writer.WriteStringValue(Evaluator); + writer.WritePropertyName("evaluatorId"u8); + writer.WriteStringValue(EvaluatorId); + writer.WritePropertyName("score"u8); + writer.WriteNumberValue(Score); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason); + } + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(ThreadId)) + { + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); + } + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteStringValue(Error); + } + if (Optional.IsCollectionDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteStartObject(); + foreach (var item in AdditionalDetails) + { + 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 + } + } + } + + AgentEvaluationResult 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(AgentEvaluationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluationResult(document.RootElement, options); + } + + internal static AgentEvaluationResult DeserializeAgentEvaluationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string evaluator = default; + string evaluatorId = default; + float score = default; + string status = default; + string reason = default; + string version = default; + string threadId = default; + string runId = default; + string error = default; + IReadOnlyDictionary additionalDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("evaluator"u8)) + { + evaluator = property.Value.GetString(); + continue; + } + if (property.NameEquals("evaluatorId"u8)) + { + evaluatorId = property.Value.GetString(); + continue; + } + if (property.NameEquals("score"u8)) + { + score = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + if (property.NameEquals("runId"u8)) + { + runId = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + error = property.Value.GetString(); + continue; + } + if (property.NameEquals("additionalDetails"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()); + } + additionalDetails = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AgentEvaluationResult( + evaluator, + evaluatorId, + score, + status, + reason, + version, + threadId, + runId, + error, + additionalDetails ?? 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluationResult)} does not support writing '{options.Format}' format."); + } + } + + AgentEvaluationResult 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 DeserializeAgentEvaluationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluationResult)} 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 AgentEvaluationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentEvaluationResult(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/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.cs new file mode 100644 index 000000000000..7e1a9fd0b5e9 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationResult.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.AI.Projects +{ + /// Result for the agent evaluation evaluator run. + public partial class AgentEvaluationResult + { + /// + /// 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 . + /// Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion. + /// Identifier of the evaluator. + /// Score of the given evaluator. No restriction on range. + /// Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable. + /// The unique identifier of the run. + /// , , or is null. + internal AgentEvaluationResult(string evaluator, string evaluatorId, float score, string status, string runId) + { + Argument.AssertNotNull(evaluator, nameof(evaluator)); + Argument.AssertNotNull(evaluatorId, nameof(evaluatorId)); + Argument.AssertNotNull(status, nameof(status)); + Argument.AssertNotNull(runId, nameof(runId)); + + Evaluator = evaluator; + EvaluatorId = evaluatorId; + Score = score; + Status = status; + RunId = runId; + AdditionalDetails = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion. + /// Identifier of the evaluator. + /// Score of the given evaluator. No restriction on range. + /// Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable. + /// Reasoning for the evaluation result. + /// Version of the evaluator that was used to evaluate the agent's completion. + /// The unique identifier of the thread. + /// The unique identifier of the run. + /// A string explaining why there was an error, if applicable. + /// Additional properties relevant to the evaluator. These will differ between evaluators. + /// Keeps track of any properties unknown to the library. + internal AgentEvaluationResult(string evaluator, string evaluatorId, float score, string status, string reason, string version, string threadId, string runId, string error, IReadOnlyDictionary additionalDetails, IDictionary serializedAdditionalRawData) + { + Evaluator = evaluator; + EvaluatorId = evaluatorId; + Score = score; + Status = status; + Reason = reason; + Version = version; + ThreadId = threadId; + RunId = runId; + Error = error; + AdditionalDetails = additionalDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AgentEvaluationResult() + { + } + + /// Evaluator's name. This is the name of the evaluator that was used to evaluate the agent's completion. + public string Evaluator { get; } + /// Identifier of the evaluator. + public string EvaluatorId { get; } + /// Score of the given evaluator. No restriction on range. + public float Score { get; } + /// Status of the evaluator result. Options: Running, Completed, Failed, NotApplicable. + public string Status { get; } + /// Reasoning for the evaluation result. + public string Reason { get; } + /// Version of the evaluator that was used to evaluate the agent's completion. + public string Version { get; } + /// The unique identifier of the thread. + public string ThreadId { get; } + /// The unique identifier of the run. + public string RunId { get; } + /// A string explaining why there was an error, if applicable. + public string Error { get; } + /// Additional properties relevant to the evaluator. These will differ between evaluators. + public IReadOnlyDictionary AdditionalDetails { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.Serialization.cs new file mode 100644 index 000000000000..95691048d7ff --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class AgentEvaluationSamplingConfiguration : 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(AgentEvaluationSamplingConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("samplingPercent"u8); + writer.WriteNumberValue(SamplingPercent); + writer.WritePropertyName("maxRequestRate"u8); + writer.WriteNumberValue(MaxRequestRate); + 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 + } + } + } + + AgentEvaluationSamplingConfiguration 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(AgentEvaluationSamplingConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluationSamplingConfiguration(document.RootElement, options); + } + + internal static AgentEvaluationSamplingConfiguration DeserializeAgentEvaluationSamplingConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + float samplingPercent = default; + float maxRequestRate = 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("samplingPercent"u8)) + { + samplingPercent = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("maxRequestRate"u8)) + { + maxRequestRate = property.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AgentEvaluationSamplingConfiguration(name, samplingPercent, maxRequestRate, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluationSamplingConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AgentEvaluationSamplingConfiguration 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 DeserializeAgentEvaluationSamplingConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluationSamplingConfiguration)} 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 AgentEvaluationSamplingConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentEvaluationSamplingConfiguration(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/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.cs new file mode 100644 index 000000000000..c984403bfaae --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AgentEvaluationSamplingConfiguration.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; + +namespace Azure.AI.Projects +{ + /// Definition for sampling strategy. + public partial class AgentEvaluationSamplingConfiguration + { + /// + /// 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 sampling strategy. + /// Percentage of sampling per hour (0-100). + /// Maximum request rate per hour (0 to 1000). + /// is null. + public AgentEvaluationSamplingConfiguration(string name, float samplingPercent, float maxRequestRate) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + SamplingPercent = samplingPercent; + MaxRequestRate = maxRequestRate; + } + + /// Initializes a new instance of . + /// Name of the sampling strategy. + /// Percentage of sampling per hour (0-100). + /// Maximum request rate per hour (0 to 1000). + /// Keeps track of any properties unknown to the library. + internal AgentEvaluationSamplingConfiguration(string name, float samplingPercent, float maxRequestRate, IDictionary serializedAdditionalRawData) + { + Name = name; + SamplingPercent = samplingPercent; + MaxRequestRate = maxRequestRate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AgentEvaluationSamplingConfiguration() + { + } + + /// Name of the sampling strategy. + public string Name { get; } + /// Percentage of sampling per hour (0-100). + public float SamplingPercent { get; } + /// Maximum request rate per hour (0 to 1000). + public float MaxRequestRate { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs deleted file mode 100644 index bbf8e7ac4208..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.Serialization.cs +++ /dev/null @@ -1,217 +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.Projects -{ - public partial class AgentFile : 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(AgentFile)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("bytes"u8); - writer.WriteNumberValue(Size); - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); - if (Optional.IsDefined(Status)) - { - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.Value.ToString()); - } - if (Optional.IsDefined(StatusDetails)) - { - writer.WritePropertyName("status_details"u8); - writer.WriteStringValue(StatusDetails); - } - 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 - } - } - } - - AgentFile 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(AgentFile)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentFile(document.RootElement, options); - } - - internal static AgentFile DeserializeAgentFile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string @object = default; - string id = default; - int bytes = default; - string filename = default; - DateTimeOffset createdAt = default; - AgentFilePurpose purpose = default; - FileState? status = default; - string statusDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("bytes"u8)) - { - DeserializeNullableSize(property, ref bytes); - continue; - } - if (property.NameEquals("filename"u8)) - { - filename = property.Value.GetString(); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("purpose"u8)) - { - purpose = new AgentFilePurpose(property.Value.GetString()); - continue; - } - if (property.NameEquals("status"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - status = new FileState(property.Value.GetString()); - continue; - } - if (property.NameEquals("status_details"u8)) - { - statusDetails = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentFile( - @object, - id, - bytes, - filename, - createdAt, - purpose, - status, - statusDetails, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentFile)} does not support writing '{options.Format}' format."); - } - } - - AgentFile 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 DeserializeAgentFile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentFile)} 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 AgentFile FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentFile(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/ai/Azure.AI.Projects/src/Generated/AgentFile.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.cs deleted file mode 100644 index 69b2db4aa1b8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFile.cs +++ /dev/null @@ -1,110 +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.Projects -{ - /// Represents an agent that can call the model and use tools. - public partial class AgentFile - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The size of the file, in bytes. - /// The name of the file. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The intended purpose of a file. - /// or is null. - internal AgentFile(string id, int size, string filename, DateTimeOffset createdAt, AgentFilePurpose purpose) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(filename, nameof(filename)); - - Id = id; - Size = size; - Filename = filename; - CreatedAt = createdAt; - Purpose = purpose; - } - - /// Initializes a new instance of . - /// The object type, which is always 'file'. - /// The identifier, which can be referenced in API endpoints. - /// The size of the file, in bytes. - /// The name of the file. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The intended purpose of a file. - /// The state of the file. This field is available in Azure OpenAI only. - /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. - /// Keeps track of any properties unknown to the library. - internal AgentFile(string @object, string id, int size, string filename, DateTimeOffset createdAt, AgentFilePurpose purpose, FileState? status, string statusDetails, IDictionary serializedAdditionalRawData) - { - Object = @object; - Id = id; - Size = size; - Filename = filename; - CreatedAt = createdAt; - Purpose = purpose; - Status = status; - StatusDetails = statusDetails; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AgentFile() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - /// The size of the file, in bytes. - public int Size { get; } - /// The name of the file. - public string Filename { get; } - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// The intended purpose of a file. - public AgentFilePurpose Purpose { get; } - /// The state of the file. This field is available in Azure OpenAI only. - public FileState? Status { get; } - /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only. - public string StatusDetails { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFilePurpose.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentFilePurpose.cs deleted file mode 100644 index 825a6ce4fe43..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentFilePurpose.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The possible values denoting the intended usage of a file. - public readonly partial struct AgentFilePurpose : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentFilePurpose(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FineTuneValue = "fine-tune"; - private const string FineTuneResultsValue = "fine-tune-results"; - private const string AgentsValue = "assistants"; - private const string AgentsOutputValue = "assistants_output"; - private const string BatchValue = "batch"; - private const string BatchOutputValue = "batch_output"; - private const string VisionValue = "vision"; - - /// Indicates a file is used for fine tuning input. - public static AgentFilePurpose FineTune { get; } = new AgentFilePurpose(FineTuneValue); - /// Indicates a file is used for fine tuning results. - public static AgentFilePurpose FineTuneResults { get; } = new AgentFilePurpose(FineTuneResultsValue); - /// Indicates a file is used as input to agents. - public static AgentFilePurpose Agents { get; } = new AgentFilePurpose(AgentsValue); - /// Indicates a file is used as output by agents. - public static AgentFilePurpose AgentsOutput { get; } = new AgentFilePurpose(AgentsOutputValue); - /// Indicates a file is used as input to . - public static AgentFilePurpose Batch { get; } = new AgentFilePurpose(BatchValue); - /// Indicates a file is used as output by a vector store batch operation. - public static AgentFilePurpose BatchOutput { get; } = new AgentFilePurpose(BatchOutputValue); - /// Indicates a file is used as input to a vision operation. - public static AgentFilePurpose Vision { get; } = new AgentFilePurpose(VisionValue); - /// Determines if two values are the same. - public static bool operator ==(AgentFilePurpose left, AgentFilePurpose right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentFilePurpose left, AgentFilePurpose right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentFilePurpose(string value) => new AgentFilePurpose(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentFilePurpose other && Equals(other); - /// - public bool Equals(AgentFilePurpose 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.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs deleted file mode 100644 index 7ec74eea2e7b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - public partial class AgentPageableListOfVectorStore : 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(AgentPageableListOfVectorStore)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - AgentPageableListOfVectorStore 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(AgentPageableListOfVectorStore)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPageableListOfVectorStore(document.RootElement, options); - } - - internal static AgentPageableListOfVectorStore DeserializeAgentPageableListOfVectorStore(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AgentPageableListOfVectorStoreObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new AgentPageableListOfVectorStoreObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStore.DeserializeVectorStore(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentPageableListOfVectorStore( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} does not support writing '{options.Format}' format."); - } - } - - AgentPageableListOfVectorStore 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 DeserializeAgentPageableListOfVectorStore(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStore)} 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 AgentPageableListOfVectorStore FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentPageableListOfVectorStore(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/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs deleted file mode 100644 index 2ea6213ac2b7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStore.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - public partial class AgentPageableListOfVectorStore - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal AgentPageableListOfVectorStore(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal AgentPageableListOfVectorStore(AgentPageableListOfVectorStoreObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AgentPageableListOfVectorStore() - { - } - - /// The object type, which is always list. - public AgentPageableListOfVectorStoreObject Object { get; } = AgentPageableListOfVectorStoreObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs deleted file mode 100644 index 8bf15aabdaf3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - public partial class AgentPageableListOfVectorStoreFile : 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(AgentPageableListOfVectorStoreFile)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - AgentPageableListOfVectorStoreFile 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(AgentPageableListOfVectorStoreFile)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPageableListOfVectorStoreFile(document.RootElement, options); - } - - internal static AgentPageableListOfVectorStoreFile DeserializeAgentPageableListOfVectorStoreFile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AgentPageableListOfVectorStoreFileObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new AgentPageableListOfVectorStoreFileObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStoreFile.DeserializeVectorStoreFile(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentPageableListOfVectorStoreFile( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} does not support writing '{options.Format}' format."); - } - } - - AgentPageableListOfVectorStoreFile 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 DeserializeAgentPageableListOfVectorStoreFile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentPageableListOfVectorStoreFile)} 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 AgentPageableListOfVectorStoreFile FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentPageableListOfVectorStoreFile(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/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs deleted file mode 100644 index d8d7fdb4b541..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFile.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - public partial class AgentPageableListOfVectorStoreFile - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal AgentPageableListOfVectorStoreFile(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal AgentPageableListOfVectorStoreFile(AgentPageableListOfVectorStoreFileObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AgentPageableListOfVectorStoreFile() - { - } - - /// The object type, which is always list. - public AgentPageableListOfVectorStoreFileObject Object { get; } = AgentPageableListOfVectorStoreFileObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs deleted file mode 100644 index 6adb77310e98..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreFileObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStoreFile_object. - public readonly partial struct AgentPageableListOfVectorStoreFileObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentPageableListOfVectorStoreFileObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static AgentPageableListOfVectorStoreFileObject List { get; } = new AgentPageableListOfVectorStoreFileObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(AgentPageableListOfVectorStoreFileObject left, AgentPageableListOfVectorStoreFileObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentPageableListOfVectorStoreFileObject left, AgentPageableListOfVectorStoreFileObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentPageableListOfVectorStoreFileObject(string value) => new AgentPageableListOfVectorStoreFileObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentPageableListOfVectorStoreFileObject other && Equals(other); - /// - public bool Equals(AgentPageableListOfVectorStoreFileObject 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.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs deleted file mode 100644 index 38c4b09c239a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentPageableListOfVectorStoreObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfVectorStore_object. - public readonly partial struct AgentPageableListOfVectorStoreObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentPageableListOfVectorStoreObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static AgentPageableListOfVectorStoreObject List { get; } = new AgentPageableListOfVectorStoreObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(AgentPageableListOfVectorStoreObject left, AgentPageableListOfVectorStoreObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentPageableListOfVectorStoreObject left, AgentPageableListOfVectorStoreObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentPageableListOfVectorStoreObject(string value) => new AgentPageableListOfVectorStoreObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentPageableListOfVectorStoreObject other && Equals(other); - /// - public bool Equals(AgentPageableListOfVectorStoreObject 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.Projects/src/Generated/AgentStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs deleted file mode 100644 index 97c4efa2a29e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// - /// Each event in a server-sent events stream has an `event` and `data` property: - /// - /// ``` - /// event: thread.created - /// data: {"id": "thread_123", "object": "thread", ...} - /// ``` - /// - /// We emit events whenever a new object is created, transitions to a new state, or is being - /// streamed in parts (deltas). For example, we emit `thread.run.created` when a new run - /// is created, `thread.run.completed` when a run completes, and so on. When an Agent chooses - /// to create a message during a run, we emit a `thread.message.created event`, a - /// `thread.message.in_progress` event, many `thread.message.delta` events, and finally a - /// `thread.message.completed` event. - /// - /// We may add additional events over time, so we recommend handling unknown events gracefully - /// in your code. - /// - public readonly partial struct AgentStreamEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentStreamEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadCreatedValue = "thread.created"; - private const string ThreadRunCreatedValue = "thread.run.created"; - private const string ThreadRunQueuedValue = "thread.run.queued"; - private const string ThreadRunInProgressValue = "thread.run.in_progress"; - private const string ThreadRunRequiresActionValue = "thread.run.requires_action"; - private const string ThreadRunCompletedValue = "thread.run.completed"; - private const string ThreadRunIncompleteValue = "thread.run.incomplete"; - private const string ThreadRunFailedValue = "thread.run.failed"; - private const string ThreadRunCancellingValue = "thread.run.cancelling"; - private const string ThreadRunCancelledValue = "thread.run.cancelled"; - private const string ThreadRunExpiredValue = "thread.run.expired"; - private const string ThreadRunStepCreatedValue = "thread.run.step.created"; - private const string ThreadRunStepInProgressValue = "thread.run.step.in_progress"; - private const string ThreadRunStepDeltaValue = "thread.run.step.delta"; - private const string ThreadRunStepCompletedValue = "thread.run.step.completed"; - private const string ThreadRunStepFailedValue = "thread.run.step.failed"; - private const string ThreadRunStepCancelledValue = "thread.run.step.cancelled"; - private const string ThreadRunStepExpiredValue = "thread.run.step.expired"; - private const string ThreadMessageCreatedValue = "thread.message.created"; - private const string ThreadMessageInProgressValue = "thread.message.in_progress"; - private const string ThreadMessageDeltaValue = "thread.message.delta"; - private const string ThreadMessageCompletedValue = "thread.message.completed"; - private const string ThreadMessageIncompleteValue = "thread.message.incomplete"; - private const string ErrorValue = "error"; - private const string DoneValue = "done"; - - /// Event sent when a new thread is created. The data of this event is of type AgentThread. - public static AgentStreamEvent ThreadCreated { get; } = new AgentStreamEvent(ThreadCreatedValue); - /// Event sent when a new run is created. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunCreated { get; } = new AgentStreamEvent(ThreadRunCreatedValue); - /// Event sent when a run moves to `queued` status. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunQueued { get; } = new AgentStreamEvent(ThreadRunQueuedValue); - /// Event sent when a run moves to `in_progress` status. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunInProgress { get; } = new AgentStreamEvent(ThreadRunInProgressValue); - /// Event sent when a run moves to `requires_action` status. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunRequiresAction { get; } = new AgentStreamEvent(ThreadRunRequiresActionValue); - /// Event sent when a run is completed. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunCompleted { get; } = new AgentStreamEvent(ThreadRunCompletedValue); - /// Event sent when a run ends incomplete. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunIncomplete { get; } = new AgentStreamEvent(ThreadRunIncompleteValue); - /// Event sent when a run fails. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunFailed { get; } = new AgentStreamEvent(ThreadRunFailedValue); - /// Event sent when a run moves to `cancelling` status. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunCancelling { get; } = new AgentStreamEvent(ThreadRunCancellingValue); - /// Event sent when a run is cancelled. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunCancelled { get; } = new AgentStreamEvent(ThreadRunCancelledValue); - /// Event sent when a run is expired. The data of this event is of type ThreadRun. - public static AgentStreamEvent ThreadRunExpired { get; } = new AgentStreamEvent(ThreadRunExpiredValue); - /// Event sent when a new thread run step is created. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepCreated { get; } = new AgentStreamEvent(ThreadRunStepCreatedValue); - /// Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepInProgress { get; } = new AgentStreamEvent(ThreadRunStepInProgressValue); - /// Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk. - public static AgentStreamEvent ThreadRunStepDelta { get; } = new AgentStreamEvent(ThreadRunStepDeltaValue); - /// Event sent when a run step is completed. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepCompleted { get; } = new AgentStreamEvent(ThreadRunStepCompletedValue); - /// Event sent when a run step fails. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepFailed { get; } = new AgentStreamEvent(ThreadRunStepFailedValue); - /// Event sent when a run step is cancelled. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepCancelled { get; } = new AgentStreamEvent(ThreadRunStepCancelledValue); - /// Event sent when a run step is expired. The data of this event is of type RunStep. - public static AgentStreamEvent ThreadRunStepExpired { get; } = new AgentStreamEvent(ThreadRunStepExpiredValue); - /// Event sent when a new message is created. The data of this event is of type ThreadMessage. - public static AgentStreamEvent ThreadMessageCreated { get; } = new AgentStreamEvent(ThreadMessageCreatedValue); - /// Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage. - public static AgentStreamEvent ThreadMessageInProgress { get; } = new AgentStreamEvent(ThreadMessageInProgressValue); - /// Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk. - public static AgentStreamEvent ThreadMessageDelta { get; } = new AgentStreamEvent(ThreadMessageDeltaValue); - /// Event sent when a message is completed. The data of this event is of type ThreadMessage. - public static AgentStreamEvent ThreadMessageCompleted { get; } = new AgentStreamEvent(ThreadMessageCompletedValue); - /// Event sent before a message is completed. The data of this event is of type ThreadMessage. - public static AgentStreamEvent ThreadMessageIncomplete { get; } = new AgentStreamEvent(ThreadMessageIncompleteValue); - /// Event sent when an error occurs, such as an internal server error or a timeout. - public static AgentStreamEvent Error { get; } = new AgentStreamEvent(ErrorValue); - /// Event sent when the stream is done. - public static AgentStreamEvent Done { get; } = new AgentStreamEvent(DoneValue); - /// Determines if two values are the same. - public static bool operator ==(AgentStreamEvent left, AgentStreamEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentStreamEvent left, AgentStreamEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentStreamEvent(string value) => new AgentStreamEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentStreamEvent other && Equals(other); - /// - public bool Equals(AgentStreamEvent 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.Projects/src/Generated/AgentThread.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs deleted file mode 100644 index 31ebe0a704e8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.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.AI.Projects -{ - public partial class AgentThread : 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(AgentThread)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - 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 - } - } - } - - AgentThread 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(AgentThread)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentThread(document.RootElement, options); - } - - internal static AgentThread DeserializeAgentThread(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string @object = default; - DateTimeOffset createdAt = default; - ToolResources toolResources = default; - IReadOnlyDictionary metadata = 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("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentThread( - id, - @object, - createdAt, - toolResources, - metadata, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentThread)} does not support writing '{options.Format}' format."); - } - } - - AgentThread 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 DeserializeAgentThread(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentThread)} 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 AgentThread FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentThread(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/ai/Azure.AI.Projects/src/Generated/AgentThread.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs deleted file mode 100644 index 3d11c01c11fd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs +++ /dev/null @@ -1,108 +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.Projects -{ - /// Information about a single thread associated with an agent. - public partial class AgentThread - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type - /// of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list - /// of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// is null. - internal AgentThread(string id, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - CreatedAt = createdAt; - ToolResources = toolResources; - Metadata = metadata; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always 'thread'. - /// The Unix timestamp, in seconds, representing when this object was created. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type - /// of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list - /// of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal AgentThread(string id, string @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - CreatedAt = createdAt; - ToolResources = toolResources; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AgentThread() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the type - /// of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list - /// of vector store IDs. - /// - public ToolResources ToolResources { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs deleted file mode 100644 index 7dc65d3d81df..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.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.AI.Projects -{ - public partial class AgentThreadCreationOptions : 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(AgentThreadCreationOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Messages)) - { - writer.WritePropertyName("messages"u8); - writer.WriteStartArray(); - foreach (var item in Messages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - AgentThreadCreationOptions 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(AgentThreadCreationOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentThreadCreationOptions(document.RootElement, options); - } - - internal static AgentThreadCreationOptions DeserializeAgentThreadCreationOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList messages = default; - ToolResources toolResources = default; - IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("messages"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadMessageOptions.DeserializeThreadMessageOptions(item, options)); - } - messages = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentThreadCreationOptions(messages ?? new ChangeTrackingList(), toolResources, metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentThreadCreationOptions)} does not support writing '{options.Format}' format."); - } - } - - AgentThreadCreationOptions 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 DeserializeAgentThreadCreationOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentThreadCreationOptions)} 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 AgentThreadCreationOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentThreadCreationOptions(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/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs deleted file mode 100644 index 384b24441047..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.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; - -namespace Azure.AI.Projects -{ - /// The details used to create a new agent thread. - public partial class AgentThreadCreationOptions - { - /// - /// 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 AgentThreadCreationOptions() - { - Messages = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The initial messages to associate with the new thread. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal AgentThreadCreationOptions(IList messages, ToolResources toolResources, IDictionary metadata, IDictionary serializedAdditionalRawData) - { - Messages = messages; - ToolResources = toolResources; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The initial messages to associate with the new thread. - public IList Messages { get; } - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - public ToolResources ToolResources { get; set; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IDictionary Metadata { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs deleted file mode 100644 index 6fa71a037e34..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs +++ /dev/null @@ -1,149 +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.Projects -{ - public partial class AgentsApiResponseFormat : 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(AgentsApiResponseFormat)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - AgentsApiResponseFormat 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(AgentsApiResponseFormat)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentsApiResponseFormat(document.RootElement, options); - } - - internal static AgentsApiResponseFormat DeserializeAgentsApiResponseFormat(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResponseFormat? type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new ResponseFormat(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentsApiResponseFormat(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentsApiResponseFormat)} does not support writing '{options.Format}' format."); - } - } - - AgentsApiResponseFormat 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 DeserializeAgentsApiResponseFormat(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentsApiResponseFormat)} 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 AgentsApiResponseFormat FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentsApiResponseFormat(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/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs deleted file mode 100644 index b481792951e0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs +++ /dev/null @@ -1,68 +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.Projects -{ - /// - /// An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. - /// If `text` the model can return text or any value needed. - /// - public partial class AgentsApiResponseFormat - { - /// - /// 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 AgentsApiResponseFormat() - { - } - - /// Initializes a new instance of . - /// Must be one of `text` or `json_object`. - /// Keeps track of any properties unknown to the library. - internal AgentsApiResponseFormat(ResponseFormat? type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Must be one of `text` or `json_object`. - public ResponseFormat? Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs deleted file mode 100644 index 283e0295f37b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.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.AI.Projects -{ - /// Represents the mode in which the model will handle the return format of a tool call. - public readonly partial struct AgentsApiResponseFormatMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentsApiResponseFormatMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutoValue = "auto"; - private const string NoneValue = "none"; - - /// Default value. Let the model handle the return format. - public static AgentsApiResponseFormatMode Auto { get; } = new AgentsApiResponseFormatMode(AutoValue); - /// Setting the value to `none`, will result in a 400 Bad request. - public static AgentsApiResponseFormatMode None { get; } = new AgentsApiResponseFormatMode(NoneValue); - /// Determines if two values are the same. - public static bool operator ==(AgentsApiResponseFormatMode left, AgentsApiResponseFormatMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentsApiResponseFormatMode left, AgentsApiResponseFormatMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentsApiResponseFormatMode(string value) => new AgentsApiResponseFormatMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentsApiResponseFormatMode other && Equals(other); - /// - public bool Equals(AgentsApiResponseFormatMode 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.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs deleted file mode 100644 index 7f7f9ab114ea..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.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.AI.Projects -{ - /// Specifies how the tool choice will be used. - public readonly partial struct AgentsApiToolChoiceOptionMode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentsApiToolChoiceOptionMode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string NoneValue = "none"; - private const string AutoValue = "auto"; - - /// The model will not call a function and instead generates a message. - public static AgentsApiToolChoiceOptionMode None { get; } = new AgentsApiToolChoiceOptionMode(NoneValue); - /// The model can pick between generating a message or calling a function. - public static AgentsApiToolChoiceOptionMode Auto { get; } = new AgentsApiToolChoiceOptionMode(AutoValue); - /// Determines if two values are the same. - public static bool operator ==(AgentsApiToolChoiceOptionMode left, AgentsApiToolChoiceOptionMode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentsApiToolChoiceOptionMode left, AgentsApiToolChoiceOptionMode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentsApiToolChoiceOptionMode(string value) => new AgentsApiToolChoiceOptionMode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentsApiToolChoiceOptionMode other && Equals(other); - /// - public bool Equals(AgentsApiToolChoiceOptionMode 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.Projects/src/Generated/AgentsClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs deleted file mode 100644 index 0ea97447ed7d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs +++ /dev/null @@ -1,6070 +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 System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - // Data plane generated sub-client. - /// The Agents sub-client. - public partial class AgentsClient - { - private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _subscriptionId; - private readonly string _resourceGroupName; - private readonly string _projectName; - 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 AgentsClient for mocking. - protected AgentsClient() - { - } - - /// Initializes a new instance of AgentsClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The token credential to copy. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// The API version to use for this operation. - internal AgentsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion) - { - ClientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - _tokenCredential = tokenCredential; - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = apiVersion; - } - - /// Creates a new agent. - /// The ID of the model to use. - /// The name of the new agent. - /// The description of the new agent. - /// The system instructions for the new agent to use. - /// The collection of tools to enable for the new agent. - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateAgentAsync(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(model, nameof(model)); - - CreateAgentRequest createAgentRequest = new CreateAgentRequest( - model, - name, - description, - instructions, - tools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateAgentAsync(createAgentRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// Creates a new agent. - /// The ID of the model to use. - /// The name of the new agent. - /// The description of the new agent. - /// The system instructions for the new agent to use. - /// The collection of tools to enable for the new agent. - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - public virtual Response CreateAgent(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(model, nameof(model)); - - CreateAgentRequest createAgentRequest = new CreateAgentRequest( - model, - name, - description, - instructions, - tools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateAgent(createAgentRequest.ToRequestContent(), context); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a new agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task CreateAgentAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateAgentRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a new agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response CreateAgent(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateAgentRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of agents that were previously created. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - internal virtual async Task> InternalGetAgentsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalGetAgentsAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response); - } - - /// Gets a list of agents that were previously created. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - internal virtual Response InternalGetAgents(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalGetAgents(limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of agents that were previously created. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual async Task InternalGetAgentsAsync(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetAgents"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetAgentsRequest(limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of agents that were previously created. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual Response InternalGetAgents(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetAgents"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetAgentsRequest(limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Retrieves an existing agent. - /// Identifier of the agent. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetAgentAsync(string assistantId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetAgentAsync(assistantId, context).ConfigureAwait(false); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// Retrieves an existing agent. - /// Identifier of the agent. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetAgent(string assistantId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetAgent(assistantId, context); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// - /// [Protocol Method] Retrieves an existing agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the agent. - /// 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 GetAgentAsync(string assistantId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateGetAgentRequest(assistantId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Retrieves an existing agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the agent. - /// 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 GetAgent(string assistantId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateGetAgentRequest(assistantId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Modifies an existing agent. - /// The ID of the agent to modify. - /// The ID of the model to use. - /// The modified name for the agent to use. - /// The modified description for the agent to use. - /// The modified system instructions for the new agent to use. - /// The modified collection of tools to enable for the agent. - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, - /// the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateAgentAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest( - model, - name, - description, - instructions, - tools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateAgentAsync(assistantId, updateAgentRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// Modifies an existing agent. - /// The ID of the agent to modify. - /// The ID of the model to use. - /// The modified name for the agent to use. - /// The modified description for the agent to use. - /// The modified system instructions for the new agent to use. - /// The modified collection of tools to enable for the agent. - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, - /// the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response UpdateAgent(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest( - model, - name, - description, - instructions, - tools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateAgent(assistantId, updateAgentRequest.ToRequestContent(), context); - return Response.FromValue(Agent.FromResponse(response), response); - } - - /// - /// [Protocol Method] Modifies an existing agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the agent to modify. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 UpdateAgentAsync(string assistantId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Modifies an existing agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the agent to modify. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 UpdateAgent(string assistantId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Deletes an agent. - /// Identifier of the agent. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalDeleteAgentAsync(string assistantId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalDeleteAgentAsync(assistantId, context).ConfigureAwait(false); - return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response); - } - - /// Deletes an agent. - /// Identifier of the agent. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalDeleteAgent(string assistantId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalDeleteAgent(assistantId, context); - return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response); - } - - /// - /// [Protocol Method] Deletes an agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the agent. - /// 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. - internal virtual async Task InternalDeleteAgentAsync(string assistantId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes an agent. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the agent. - /// 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. - internal virtual Response InternalDeleteAgent(string assistantId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates a new thread. Threads contain messages and can be run by agents. - /// The initial messages to associate with the new thread. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - public virtual async Task> CreateThreadAsync(IEnumerable messages = null, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - CreateThreadRequest createThreadRequest = new CreateThreadRequest(messages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateThreadAsync(createThreadRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// Creates a new thread. Threads contain messages and can be run by agents. - /// The initial messages to associate with the new thread. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - public virtual Response CreateThread(IEnumerable messages = null, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - CreateThreadRequest createThreadRequest = new CreateThreadRequest(messages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateThread(createThreadRequest.ToRequestContent(), context); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a new thread. Threads contain messages and can be run by agents. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task CreateThreadAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateThread"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateThreadRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a new thread. Threads contain messages and can be run by agents. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response CreateThread(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateThread"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateThreadRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets information about an existing thread. - /// Identifier of the thread. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetThreadAsync(string threadId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetThreadAsync(threadId, context).ConfigureAwait(false); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// Gets information about an existing thread. - /// Identifier of the thread. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetThread(string threadId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetThread(threadId, context); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets information about an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// 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 GetThreadAsync(string threadId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetThread"); - scope.Start(); - try - { - using HttpMessage message = CreateGetThreadRequest(threadId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets information about an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// 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 GetThread(string threadId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetThread"); - scope.Start(); - try - { - using HttpMessage message = CreateGetThreadRequest(threadId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Modifies an existing thread. - /// The ID of the thread to modify. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateThreadAsync(string threadId, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - UpdateThreadRequest updateThreadRequest = new UpdateThreadRequest(toolResources, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateThreadAsync(threadId, updateThreadRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// Modifies an existing thread. - /// The ID of the thread to modify. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response UpdateThread(string threadId, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - UpdateThreadRequest updateThreadRequest = new UpdateThreadRequest(toolResources, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateThread(threadId, updateThreadRequest.ToRequestContent(), context); - return Response.FromValue(AgentThread.FromResponse(response), response); - } - - /// - /// [Protocol Method] Modifies an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the thread to modify. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 UpdateThreadAsync(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateThread"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateThreadRequest(threadId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Modifies an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the thread to modify. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 UpdateThread(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateThread"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateThreadRequest(threadId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Deletes an existing thread. - /// Identifier of the thread. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalDeleteThreadAsync(string threadId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalDeleteThreadAsync(threadId, context).ConfigureAwait(false); - return Response.FromValue(ThreadDeletionStatus.FromResponse(response), response); - } - - /// Deletes an existing thread. - /// Identifier of the thread. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalDeleteThread(string threadId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalDeleteThread(threadId, context); - return Response.FromValue(ThreadDeletionStatus.FromResponse(response), response); - } - - /// - /// [Protocol Method] Deletes an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// 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. - internal virtual async Task InternalDeleteThreadAsync(string threadId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteThread"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteThreadRequest(threadId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// 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. - internal virtual Response InternalDeleteThread(string threadId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteThread"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteThreadRequest(threadId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of threads that were previously created. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - internal virtual async Task> InternalGetThreadsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalGetThreadsAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(OpenAIPageableListOfAgentThread.FromResponse(response), response); - } - - /// Gets a list of threads that were previously created. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - internal virtual Response InternalGetThreads(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalGetThreads(limit, order?.ToString(), after, before, context); - return Response.FromValue(OpenAIPageableListOfAgentThread.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of threads that were previously created. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual async Task InternalGetThreadsAsync(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetThreads"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetThreadsRequest(limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of threads that were previously created. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual Response InternalGetThreads(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetThreads"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetThreadsRequest(limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates a new message on a specified thread. - /// Identifier of the thread. - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// A list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateMessageAsync(string threadId, MessageRole role, BinaryData content, IEnumerable attachments = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - CreateMessageRequest createMessageRequest = new CreateMessageRequest(role, content, attachments?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateMessageAsync(threadId, createMessageRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// Creates a new message on a specified thread. - /// Identifier of the thread. - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// A list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response CreateMessage(string threadId, MessageRole role, BinaryData content, IEnumerable attachments = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - CreateMessageRequest createMessageRequest = new CreateMessageRequest(role, content, attachments?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateMessage(threadId, createMessageRequest.ToRequestContent(), context); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a new message on a specified thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateMessageAsync(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateMessageRequest(threadId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a new message on a specified thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateMessage(string threadId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateMessageRequest(threadId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of messages that exist on a thread. - /// Identifier of the thread. - /// Filter messages by the run ID that generated them. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetMessagesAsync(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalGetMessagesAsync(threadId, runId, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response); - } - - /// Gets a list of messages that exist on a thread. - /// Identifier of the thread. - /// Filter messages by the run ID that generated them. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetMessages(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalGetMessages(threadId, runId, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of messages that exist on a thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Filter messages by the run ID that generated them. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual async Task InternalGetMessagesAsync(string threadId, string runId, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetMessages"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetMessagesRequest(threadId, runId, limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of messages that exist on a thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Filter messages by the run ID that generated them. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual Response InternalGetMessages(string threadId, string runId, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetMessages"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetMessagesRequest(threadId, runId, limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets an existing message from an existing thread. - /// Identifier of the thread. - /// Identifier of the message. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetMessageAsync(threadId, messageId, context).ConfigureAwait(false); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// Gets an existing message from an existing thread. - /// Identifier of the thread. - /// Identifier of the message. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response GetMessage(string threadId, string messageId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetMessage(threadId, messageId, context); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets an existing message from an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the message. - /// 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 GetMessageAsync(string threadId, string messageId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateGetMessageRequest(threadId, messageId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets an existing message from an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the message. - /// 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 GetMessage(string threadId, string messageId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateGetMessageRequest(threadId, messageId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Modifies an existing message on an existing thread. - /// Identifier of the thread. - /// Identifier of the message. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateMessageAsync(string threadId, string messageId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - UpdateMessageRequest updateMessageRequest = new UpdateMessageRequest(metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateMessageAsync(threadId, messageId, updateMessageRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// Modifies an existing message on an existing thread. - /// Identifier of the thread. - /// Identifier of the message. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response UpdateMessage(string threadId, string messageId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - - UpdateMessageRequest updateMessageRequest = new UpdateMessageRequest(metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateMessage(threadId, messageId, updateMessageRequest.ToRequestContent(), context); - return Response.FromValue(ThreadMessage.FromResponse(response), response); - } - - /// - /// [Protocol Method] Modifies an existing message on an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the message. - /// The content to send as the body of the request. - /// 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 UpdateMessageAsync(string threadId, string messageId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateMessageRequest(threadId, messageId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Modifies an existing message on an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the message. - /// The content to send as the body of the request. - /// 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 UpdateMessage(string threadId, string messageId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(messageId, nameof(messageId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateMessage"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateMessageRequest(threadId, messageId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates a new run for an agent thread. - /// Identifier of the thread. - /// The ID of the agent that should run the thread. - /// The overridden model name that the agent should use to run the thread. - /// The overridden system instructions that the agent should use to run the thread. - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - /// Adds additional messages to the thread before creating the run. - /// The overridden list of enabled tools that the agent should use to run the thread. - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, - overrideModelName, - overrideInstructions, - additionalInstructions, - additionalMessages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateRunAsync(threadId, createRunRequest.ToRequestContent(), include, context).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Creates a new run for an agent thread. - /// Identifier of the thread. - /// The ID of the agent that should run the thread. - /// The overridden model name that the agent should use to run the thread. - /// The overridden system instructions that the agent should use to run the thread. - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - /// Adds additional messages to the thread before creating the run. - /// The overridden list of enabled tools that the agent should use to run the thread. - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateRunRequest createRunRequest = new CreateRunRequest( - assistantId, - overrideModelName, - overrideInstructions, - additionalInstructions, - additionalMessages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateRun(threadId, createRunRequest.ToRequestContent(), include, context); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a new run for an agent thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// The content to send as the body of the request. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateRunAsync(string threadId, RequestContent content, IEnumerable include = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRunRequest(threadId, content, include, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a new run for an agent thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// The content to send as the body of the request. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateRun(string threadId, RequestContent content, IEnumerable include = null, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRunRequest(threadId, content, include, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of runs for a specified thread. - /// Identifier of the thread. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetRunsAsync(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalGetRunsAsync(threadId, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response); - } - - /// Gets a list of runs for a specified thread. - /// Identifier of the thread. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetRuns(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalGetRuns(threadId, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of runs for a specified thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual async Task InternalGetRunsAsync(string threadId, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetRuns"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetRunsRequest(threadId, limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of runs for a specified thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual Response InternalGetRuns(string threadId, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetRuns"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetRunsRequest(threadId, limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets an existing run from an existing thread. - /// Identifier of the thread. - /// Identifier of the run. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetRunAsync(threadId, runId, context).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Gets an existing run from an existing thread. - /// Identifier of the thread. - /// Identifier of the run. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response GetRun(string threadId, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetRun(threadId, runId, context); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets an existing run from an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// 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 GetRunAsync(string threadId, string runId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetRun"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRunRequest(threadId, runId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets an existing run from an existing thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// 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 GetRun(string threadId, string runId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetRun"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRunRequest(threadId, runId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Modifies an existing thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> UpdateRunAsync(string threadId, string runId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - UpdateRunRequest updateRunRequest = new UpdateRunRequest(metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await UpdateRunAsync(threadId, runId, updateRunRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Modifies an existing thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response UpdateRun(string threadId, string runId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - UpdateRunRequest updateRunRequest = new UpdateRunRequest(metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = UpdateRun(threadId, runId, updateRunRequest.ToRequestContent(), context); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Modifies an existing thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// The content to send as the body of the request. - /// 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 UpdateRunAsync(string threadId, string runId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRunRequest(threadId, runId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Modifies an existing thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// The content to send as the body of the request. - /// 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 UpdateRun(string threadId, string runId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateRun"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRunRequest(threadId, runId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Cancels a run of an in progress thread. - /// Identifier of the thread. - /// Identifier of the run. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> CancelRunAsync(string threadId, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CancelRunAsync(threadId, runId, context).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Cancels a run of an in progress thread. - /// Identifier of the thread. - /// Identifier of the run. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response CancelRun(string threadId, string runId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CancelRun(threadId, runId, context); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Cancels a run of an in progress thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// 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 CancelRunAsync(string threadId, string runId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CancelRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCancelRunRequest(threadId, runId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Cancels a run of an in progress thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// 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 CancelRun(string threadId, string runId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CancelRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCancelRunRequest(threadId, runId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates a new agent thread and immediately starts a run using that new thread. - /// The ID of the agent for which the thread should be created. - /// The details used to create the new thread. If no thread is provided, an empty one will be created. - /// The overridden model that the agent should use to run the thread. - /// The overridden system instructions the agent should use to run the thread. - /// The overridden list of enabled tools the agent should use to run the thread. - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens - /// specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateThreadAndRunAsync(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest( - assistantId, - thread, - overrideModelName, - overrideInstructions, - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateThreadAndRunAsync(createThreadAndRunRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// Creates a new agent thread and immediately starts a run using that new thread. - /// The ID of the agent for which the thread should be created. - /// The details used to create the new thread. If no thread is provided, an empty one will be created. - /// The overridden model that the agent should use to run the thread. - /// The overridden system instructions the agent should use to run the thread. - /// The overridden list of enabled tools the agent should use to run the thread. - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens - /// specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - public virtual Response CreateThreadAndRun(string assistantId, AgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest( - assistantId, - thread, - overrideModelName, - overrideInstructions, - overrideTools?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - toolResources, - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateThreadAndRun(createThreadAndRunRequest.ToRequestContent(), context); - return Response.FromValue(ThreadRun.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a new agent thread and immediately starts a run using that new thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task CreateThreadAndRunAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateThreadAndRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateThreadAndRunRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a new agent thread and immediately starts a run using that new thread. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response CreateThreadAndRun(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateThreadAndRun"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateThreadAndRunRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a single run step from a thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// Identifier of the run step. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public virtual async Task> GetRunStepAsync(string threadId, string runId, string stepId, IEnumerable include = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetRunStepAsync(threadId, runId, stepId, include, context).ConfigureAwait(false); - return Response.FromValue(RunStep.FromResponse(response), response); - } - - /// Gets a single run step from a thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// Identifier of the run step. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public virtual Response GetRunStep(string threadId, string runId, string stepId, IEnumerable include = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetRunStep(threadId, runId, stepId, include, context); - return Response.FromValue(RunStep.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a single run step from a thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// Identifier of the run step. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// 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 GetRunStepAsync(string threadId, string runId, string stepId, IEnumerable include, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetRunStep"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRunStepRequest(threadId, runId, stepId, include, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a single run step from a thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// Identifier of the run step. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// 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 GetRunStep(string threadId, string runId, string stepId, IEnumerable include, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - Argument.AssertNotNullOrEmpty(stepId, nameof(stepId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetRunStep"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRunStepRequest(threadId, runId, stepId, include, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of run steps from a thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalGetRunStepsAsync(threadId, runId, include, limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response); - } - - /// Gets a list of run steps from a thread run. - /// Identifier of the thread. - /// Identifier of the run. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalGetRunSteps(threadId, runId, include, limit, order?.ToString(), after, before, context); - return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of run steps from a thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual async Task InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetRunSteps"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetRunStepsRequest(threadId, runId, include, limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of run steps from a thread run. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the thread. - /// Identifier of the run. - /// - /// A list of additional fields to include in the response. - /// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content. - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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. - internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); - Argument.AssertNotNullOrEmpty(runId, nameof(runId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalGetRunSteps"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalGetRunStepsRequest(threadId, runId, include, limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Gets a list of previously uploaded files. - /// The purpose of the file. - /// The cancellation token to use. - internal virtual async Task> InternalListFilesAsync(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalListFilesAsync(purpose?.ToString(), context).ConfigureAwait(false); - return Response.FromValue(InternalFileListResponse.FromResponse(response), response); - } - - /// Gets a list of previously uploaded files. - /// The purpose of the file. - /// The cancellation token to use. - internal virtual Response InternalListFiles(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalListFiles(purpose?.ToString(), context); - return Response.FromValue(InternalFileListResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets a list of previously uploaded files. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The purpose of the file. Allowed values: "fine-tune" | "fine-tune-results" | "assistants" | "assistants_output" | "batch" | "batch_output" | "vision". - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual async Task InternalListFilesAsync(string purpose, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalListFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalListFilesRequest(purpose, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a list of previously uploaded files. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The purpose of the file. Allowed values: "fine-tune" | "fine-tune-results" | "assistants" | "assistants_output" | "batch" | "batch_output" | "vision". - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual Response InternalListFiles(string purpose, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalListFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalListFilesRequest(purpose, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Uploads a file for use by other operations. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The name of the file to upload. Allowed values: "multipart/form-data". - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task UploadFileAsync(RequestContent content, string contentType, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UploadFile"); - scope.Start(); - try - { - using HttpMessage message = CreateUploadFileRequest(content, contentType, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Uploads a file for use by other operations. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The name of the file to upload. Allowed values: "multipart/form-data". - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response UploadFile(RequestContent content, string contentType, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.UploadFile"); - scope.Start(); - try - { - using HttpMessage message = CreateUploadFileRequest(content, contentType, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Delete a previously uploaded file. - /// The ID of the file to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> InternalDeleteFileAsync(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await InternalDeleteFileAsync(fileId, context).ConfigureAwait(false); - return Response.FromValue(InternalFileDeletionStatus.FromResponse(response), response); - } - - /// Delete a previously uploaded file. - /// The ID of the file to delete. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response InternalDeleteFile(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = InternalDeleteFile(fileId, context); - return Response.FromValue(InternalFileDeletionStatus.FromResponse(response), response); - } - - /// - /// [Protocol Method] Delete a previously uploaded file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to delete. - /// 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. - internal virtual async Task InternalDeleteFileAsync(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteFile"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteFileRequest(fileId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Delete a previously uploaded file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to delete. - /// 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. - internal virtual Response InternalDeleteFile(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteFile"); - scope.Start(); - try - { - using HttpMessage message = CreateInternalDeleteFileRequest(fileId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Returns information about a specific file. Does not retrieve file content. - /// The ID of the file to retrieve. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetFileAsync(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetFileAsync(fileId, context).ConfigureAwait(false); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /// Returns information about a specific file. Does not retrieve file content. - /// The ID of the file to retrieve. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetFile(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetFile(fileId, context); - return Response.FromValue(AgentFile.FromResponse(response), response); - } - - /// - /// [Protocol Method] Returns information about a specific file. Does not retrieve file content. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to retrieve. - /// 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 GetFileAsync(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetFile"); - scope.Start(); - try - { - using HttpMessage message = CreateGetFileRequest(fileId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Returns information about a specific file. Does not retrieve file content. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to retrieve. - /// 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 GetFile(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetFile"); - scope.Start(); - try - { - using HttpMessage message = CreateGetFileRequest(fileId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Retrieves the raw content of a specific file. - /// The ID of the file to retrieve. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetFileContentAsync(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetFileContentAsync(fileId, context).ConfigureAwait(false); - return Response.FromValue(response.Content, response); - } - - /// Retrieves the raw content of a specific file. - /// The ID of the file to retrieve. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetFileContent(string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetFileContent(fileId, context); - return Response.FromValue(response.Content, response); - } - - /// - /// [Protocol Method] Retrieves the raw content of a specific file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to retrieve. - /// 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 GetFileContentAsync(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetFileContent"); - scope.Start(); - try - { - using HttpMessage message = CreateGetFileContentRequest(fileId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Retrieves the raw content of a specific file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The ID of the file to retrieve. - /// 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 GetFileContent(string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetFileContent"); - scope.Start(); - try - { - using HttpMessage message = CreateGetFileContentRequest(fileId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Returns a list of vector stores. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - public virtual async Task> GetVectorStoresAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoresAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response); - } - - /// Returns a list of vector stores. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - public virtual Response GetVectorStores(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStores(limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response); - } - - /// - /// [Protocol Method] Returns a list of vector stores. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task GetVectorStoresAsync(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStores"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoresRequest(limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Returns a list of vector stores. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response GetVectorStores(int? limit, string order, string after, string before, RequestContext context) - { - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStores"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoresRequest(limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Creates a vector store. - /// A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// The name of the vector store. - /// The vector store configuration, used when vector store is created from Azure asset URIs. - /// Details on when this vector store expires. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - public virtual async Task> CreateVectorStoreAsync(IEnumerable fileIds = null, string name = null, VectorStoreConfiguration storeConfiguration = null, VectorStoreExpirationPolicy expiresAfter = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - CreateVectorStoreRequest createVectorStoreRequest = new CreateVectorStoreRequest( - fileIds?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - name, - storeConfiguration, - expiresAfter, - chunkingStrategy, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateVectorStoreAsync(createVectorStoreRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// Creates a vector store. - /// A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// The name of the vector store. - /// The vector store configuration, used when vector store is created from Azure asset URIs. - /// Details on when this vector store expires. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - public virtual Response CreateVectorStore(IEnumerable fileIds = null, string name = null, VectorStoreConfiguration storeConfiguration = null, VectorStoreExpirationPolicy expiresAfter = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - CreateVectorStoreRequest createVectorStoreRequest = new CreateVectorStoreRequest( - fileIds?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), - name, - storeConfiguration, - expiresAfter, - chunkingStrategy, - metadata ?? new ChangeTrackingDictionary(), - null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateVectorStore(createVectorStoreRequest.ToRequestContent(), context); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// - /// [Protocol Method] Creates a vector store. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task CreateVectorStoreAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a vector store. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response CreateVectorStore(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Returns the vector store object matching the specified ID. - /// Identifier of the vector store. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreAsync(string vectorStoreId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoreAsync(vectorStoreId, context).ConfigureAwait(false); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// Returns the vector store object matching the specified ID. - /// Identifier of the vector store. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStore(string vectorStoreId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStore(vectorStoreId, context); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// - /// [Protocol Method] Returns the vector store object matching the specified ID. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// 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 GetVectorStoreAsync(string vectorStoreId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreRequest(vectorStoreId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Returns the vector store object matching the specified ID. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// 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 GetVectorStore(string vectorStoreId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreRequest(vectorStoreId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// The ID of the vector store to modify. - /// Identifier of the vector store. - /// The name of the vector store. - /// Details on when this vector store expires. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> ModifyVectorStoreAsync(string vectorStoreId, string name = null, VectorStoreExpirationPolicy expiresAfter = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - ModifyVectorStoreRequest modifyVectorStoreRequest = new ModifyVectorStoreRequest(name, expiresAfter, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await ModifyVectorStoreAsync(vectorStoreId, modifyVectorStoreRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// The ID of the vector store to modify. - /// Identifier of the vector store. - /// The name of the vector store. - /// Details on when this vector store expires. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response ModifyVectorStore(string vectorStoreId, string name = null, VectorStoreExpirationPolicy expiresAfter = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - ModifyVectorStoreRequest modifyVectorStoreRequest = new ModifyVectorStoreRequest(name, expiresAfter, metadata ?? new ChangeTrackingDictionary(), null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = ModifyVectorStore(vectorStoreId, modifyVectorStoreRequest.ToRequestContent(), context); - return Response.FromValue(VectorStore.FromResponse(response), response); - } - - /// - /// [Protocol Method] The ID of the vector store to modify. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 ModifyVectorStoreAsync(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.ModifyVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateModifyVectorStoreRequest(vectorStoreId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] The ID of the vector store to modify. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 ModifyVectorStore(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.ModifyVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateModifyVectorStoreRequest(vectorStoreId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Deletes the vector store object matching the specified ID. - /// Identifier of the vector store. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> DeleteVectorStoreAsync(string vectorStoreId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DeleteVectorStoreAsync(vectorStoreId, context).ConfigureAwait(false); - return Response.FromValue(VectorStoreDeletionStatus.FromResponse(response), response); - } - - /// Deletes the vector store object matching the specified ID. - /// Identifier of the vector store. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response DeleteVectorStore(string vectorStoreId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = DeleteVectorStore(vectorStoreId, context); - return Response.FromValue(VectorStoreDeletionStatus.FromResponse(response), response); - } - - /// - /// [Protocol Method] Deletes the vector store object matching the specified ID. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// 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 DeleteVectorStoreAsync(string vectorStoreId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.DeleteVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteVectorStoreRequest(vectorStoreId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes the vector store object matching the specified ID. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// 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 DeleteVectorStore(string vectorStoreId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.DeleteVectorStore"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteVectorStoreRequest(vectorStoreId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Returns a list of vector store files. - /// Identifier of the vector store. - /// Filter by file status. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFilesAsync(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoreFilesAsync(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); - } - - /// Returns a list of vector store files. - /// Identifier of the vector store. - /// Filter by file status. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFiles(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStoreFiles(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); - } - - /// - /// [Protocol Method] Returns a list of vector store files. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Filter by file status. Allowed values: "in_progress" | "completed" | "failed" | "cancelled". - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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 GetVectorStoreFilesAsync(string vectorStoreId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFilesRequest(vectorStoreId, filter, limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Returns a list of vector store files. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Filter by file status. Allowed values: "in_progress" | "completed" | "failed" | "cancelled". - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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 GetVectorStoreFiles(string vectorStoreId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFilesRequest(vectorStoreId, filter, limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create a vector store file by attaching a file to a vector store. - /// Identifier of the vector store. - /// Identifier of the file. - /// Azure asset ID. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateVectorStoreFileAsync(string vectorStoreId, string fileId = null, VectorStoreDataSource dataSource = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - CreateVectorStoreFileRequest createVectorStoreFileRequest = new CreateVectorStoreFileRequest(fileId, dataSource, chunkingStrategy, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateVectorStoreFileAsync(vectorStoreId, createVectorStoreFileRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFile.FromResponse(response), response); - } - - /// Create a vector store file by attaching a file to a vector store. - /// Identifier of the vector store. - /// Identifier of the file. - /// Azure asset ID. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response CreateVectorStoreFile(string vectorStoreId, string fileId = null, VectorStoreDataSource dataSource = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - CreateVectorStoreFileRequest createVectorStoreFileRequest = new CreateVectorStoreFileRequest(fileId, dataSource, chunkingStrategy, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateVectorStoreFile(vectorStoreId, createVectorStoreFileRequest.ToRequestContent(), context); - return Response.FromValue(VectorStoreFile.FromResponse(response), response); - } - - /// - /// [Protocol Method] Create a vector store file by attaching a file to a vector store. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateVectorStoreFileAsync(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreFileRequest(vectorStoreId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Create a vector store file by attaching a file to a vector store. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateVectorStoreFile(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreFileRequest(vectorStoreId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Retrieves a vector store file. - /// Identifier of the vector store. - /// Identifier of the file. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoreFileAsync(vectorStoreId, fileId, context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFile.FromResponse(response), response); - } - - /// Retrieves a vector store file. - /// Identifier of the vector store. - /// Identifier of the file. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFile(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStoreFile(vectorStoreId, fileId, context); - return Response.FromValue(VectorStoreFile.FromResponse(response), response); - } - - /// - /// [Protocol Method] Retrieves a vector store file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// 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 GetVectorStoreFileAsync(string vectorStoreId, string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileRequest(vectorStoreId, fileId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Retrieves a vector store file. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// 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 GetVectorStoreFile(string vectorStoreId, string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileRequest(vectorStoreId, fileId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. - /// To delete the file, use the delete file endpoint. - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await DeleteVectorStoreFileAsync(vectorStoreId, fileId, context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFileDeletionStatus.FromResponse(response), response); - } - - /// - /// Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. - /// To delete the file, use the delete file endpoint. - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response DeleteVectorStoreFile(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = DeleteVectorStoreFile(vectorStoreId, fileId, context); - return Response.FromValue(VectorStoreFileDeletionStatus.FromResponse(response), response); - } - - /// - /// [Protocol Method] Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. - /// To delete the file, use the delete file endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// 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 DeleteVectorStoreFileAsync(string vectorStoreId, string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.DeleteVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteVectorStoreFileRequest(vectorStoreId, fileId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Delete a vector store file. This will remove the file from the vector store but the file itself will not be deleted. - /// To delete the file, use the delete file endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file. - /// 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 DeleteVectorStoreFile(string vectorStoreId, string fileId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.DeleteVectorStoreFile"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteVectorStoreFileRequest(vectorStoreId, fileId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create a vector store file batch. - /// Identifier of the vector store. - /// List of file identifiers. - /// List of Azure assets. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateVectorStoreFileBatchAsync(string vectorStoreId, IEnumerable fileIds = null, IEnumerable dataSources = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - CreateVectorStoreFileBatchRequest createVectorStoreFileBatchRequest = new CreateVectorStoreFileBatchRequest(fileIds?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), dataSources?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), chunkingStrategy, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateVectorStoreFileBatchAsync(vectorStoreId, createVectorStoreFileBatchRequest.ToRequestContent(), context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// Create a vector store file batch. - /// Identifier of the vector store. - /// List of file identifiers. - /// List of Azure assets. - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response CreateVectorStoreFileBatch(string vectorStoreId, IEnumerable fileIds = null, IEnumerable dataSources = null, VectorStoreChunkingStrategyRequest chunkingStrategy = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - - CreateVectorStoreFileBatchRequest createVectorStoreFileBatchRequest = new CreateVectorStoreFileBatchRequest(fileIds?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), dataSources?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), chunkingStrategy, null); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateVectorStoreFileBatch(vectorStoreId, createVectorStoreFileBatchRequest.ToRequestContent(), context); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// - /// [Protocol Method] Create a vector store file batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateVectorStoreFileBatchAsync(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreFileBatchRequest(vectorStoreId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Create a vector store file batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateVectorStoreFileBatch(string vectorStoreId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CreateVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateVectorStoreFileBatchRequest(vectorStoreId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Retrieve a vector store file batch. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoreFileBatchAsync(vectorStoreId, batchId, context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// Retrieve a vector store file batch. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStoreFileBatch(vectorStoreId, batchId, context); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// - /// [Protocol Method] Retrieve a vector store file batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// 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 GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Retrieve a vector store file batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// 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 GetVectorStoreFileBatch(string vectorStoreId, string batchId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileBatchRequest(vectorStoreId, batchId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CancelVectorStoreFileBatchAsync(vectorStoreId, batchId, context).ConfigureAwait(false); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CancelVectorStoreFileBatch(vectorStoreId, batchId, context); - return Response.FromValue(VectorStoreFileBatch.FromResponse(response), response); - } - - /// - /// [Protocol Method] Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// 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 CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CancelVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateCancelVectorStoreFileBatchRequest(vectorStoreId, batchId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// 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 CancelVectorStoreFileBatch(string vectorStoreId, string batchId, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.CancelVectorStoreFileBatch"); - scope.Start(); - try - { - using HttpMessage message = CreateCancelVectorStoreFileBatchRequest(vectorStoreId, batchId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Returns a list of vector store files in a batch. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// Filter by file status. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual async Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetVectorStoreFileBatchFilesAsync(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); - } - - /// Returns a list of vector store files in a batch. - /// Identifier of the vector store. - /// Identifier of the file batch. - /// Filter by file status. - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public virtual Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetVectorStoreFileBatchFiles(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context); - return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response); - } - - /// - /// [Protocol Method] Returns a list of vector store files in a batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// Filter by file status. Allowed values: "in_progress" | "completed" | "failed" | "cancelled". - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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 GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFileBatchFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileBatchFilesRequest(vectorStoreId, batchId, filter, limit, order, after, before, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Returns a list of vector store files in a batch. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the vector store. - /// Identifier of the file batch. - /// Filter by file status. Allowed values: "in_progress" | "completed" | "failed" | "cancelled". - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. - /// Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. Allowed values: "asc" | "desc". - /// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. - /// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. - /// 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 GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNullOrEmpty(batchId, nameof(batchId)); - - using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetVectorStoreFileBatchFiles"); - scope.Start(); - try - { - using HttpMessage message = CreateGetVectorStoreFileBatchFilesRequest(vectorStoreId, batchId, filter, limit, order, after, before, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - internal HttpMessage CreateCreateAgentRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/assistants", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalGetAgentsRequest(int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/assistants", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetAgentRequest(string assistantId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalDeleteAgentRequest(string assistantId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/assistants/", false); - uri.AppendPath(assistantId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateThreadRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetThreadRequest(string threadId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateThreadRequest(string threadId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalDeleteThreadRequest(string threadId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateInternalGetThreadsRequest(int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateMessageRequest(string threadId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalGetMessagesRequest(string threadId, string runId, int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (runId != null) - { - uri.AppendQuery("run_id", runId, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetMessageRequest(string threadId, string messageId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateMessageRequest(string threadId, string messageId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/messages/", false); - uri.AppendPath(messageId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateCreateRunRequest(string threadId, RequestContent content, IEnumerable include, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (include != null && !(include is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) - { - uri.AppendQueryDelimited("include[]", include, ",", true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalGetRunsRequest(string threadId, int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetRunRequest(string threadId, string runId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateRunRequest(string threadId, string runId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateSubmitToolOutputsToRunRequest(string threadId, string runId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/submit_tool_outputs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateCancelRunRequest(string threadId, string runId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateThreadAndRunRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/runs", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetRunStepRequest(string threadId, string runId, string stepId, IEnumerable include, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps/", false); - uri.AppendPath(stepId, true); - uri.AppendQuery("api-version", _apiVersion, true); - if (include != null && !(include is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) - { - uri.AppendQueryDelimited("include[]", include, ",", true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateInternalGetRunStepsRequest(string threadId, string runId, IEnumerable include, int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/threads/", false); - uri.AppendPath(threadId, true); - uri.AppendPath("/runs/", false); - uri.AppendPath(runId, true); - uri.AppendPath("/steps", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (include != null && !(include is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) - { - uri.AppendQueryDelimited("include[]", include, ",", true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateInternalListFilesRequest(string purpose, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/files", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (purpose != null) - { - uri.AppendQuery("purpose", purpose, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUploadFileRequest(RequestContent content, string contentType, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/files", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", contentType); - request.Content = content; - return message; - } - - internal HttpMessage CreateInternalDeleteFileRequest(string fileId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetFileRequest(string fileId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetFileContentRequest(string fileId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendPath("/content", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/octet-stream"); - return message; - } - - internal HttpMessage CreateGetVectorStoresRequest(int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateVectorStoreRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetVectorStoreRequest(string vectorStoreId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateModifyVectorStoreRequest(string vectorStoreId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateDeleteVectorStoreRequest(string vectorStoreId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetVectorStoreFilesRequest(string vectorStoreId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("filter", filter, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateVectorStoreFileRequest(string vectorStoreId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetVectorStoreFileRequest(string vectorStoreId, string fileId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateDeleteVectorStoreFileRequest(string vectorStoreId, string fileId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/files/", false); - uri.AppendPath(fileId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateVectorStoreFileBatchRequest(string vectorStoreId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCancelVectorStoreFileBatchRequest(string vectorStoreId, string batchId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/cancel", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetVectorStoreFileBatchFilesRequest(string vectorStoreId, string batchId, string filter, int? limit, string order, string after, string before, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/vector_stores/", false); - uri.AppendPath(vectorStoreId, true); - uri.AppendPath("/file_batches/", false); - uri.AppendPath(batchId, true); - uri.AppendPath("/files", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (filter != null) - { - uri.AppendQuery("filter", filter, true); - } - if (limit != null) - { - uri.AppendQuery("limit", limit.Value, true); - } - if (order != null) - { - uri.AppendQuery("order", order, true); - } - if (after != null) - { - uri.AppendQuery("after", after, true); - } - if (before != null) - { - uri.AppendQuery("before", before, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - private static RequestContext DefaultRequestContext = new RequestContext(); - internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) - { - if (!cancellationToken.CanBeCanceled) - { - return DefaultRequestContext; - } - - return new RequestContext() { CancellationToken = cancellationToken }; - } - - private static ResponseClassifier _responseClassifier200; - private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs deleted file mode 100644 index 2d1ecc9338c6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs +++ /dev/null @@ -1,157 +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.Projects -{ - public partial class AgentsNamedToolChoice : 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(AgentsNamedToolChoice)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - if (Optional.IsDefined(Function)) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, 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 - } - } - } - - AgentsNamedToolChoice 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(AgentsNamedToolChoice)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentsNamedToolChoice(document.RootElement, options); - } - - internal static AgentsNamedToolChoice DeserializeAgentsNamedToolChoice(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AgentsNamedToolChoiceType type = default; - FunctionName function = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new AgentsNamedToolChoiceType(property.Value.GetString()); - continue; - } - if (property.NameEquals("function"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - function = FunctionName.DeserializeFunctionName(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AgentsNamedToolChoice(type, function, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AgentsNamedToolChoice)} does not support writing '{options.Format}' format."); - } - } - - AgentsNamedToolChoice 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 DeserializeAgentsNamedToolChoice(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AgentsNamedToolChoice)} 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 AgentsNamedToolChoice FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentsNamedToolChoice(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/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs deleted file mode 100644 index eb7476192154..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Specifies a tool the model should use. Use to force the model to call a specific tool. - public partial class AgentsNamedToolChoice - { - /// - /// 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 tool. If type is `function`, the function name must be set. - public AgentsNamedToolChoice(AgentsNamedToolChoiceType type) - { - Type = type; - } - - /// Initializes a new instance of . - /// the type of tool. If type is `function`, the function name must be set. - /// The name of the function to call. - /// Keeps track of any properties unknown to the library. - internal AgentsNamedToolChoice(AgentsNamedToolChoiceType type, FunctionName function, IDictionary serializedAdditionalRawData) - { - Type = type; - Function = function; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AgentsNamedToolChoice() - { - } - - /// the type of tool. If type is `function`, the function name must be set. - public AgentsNamedToolChoiceType Type { get; set; } - /// The name of the function to call. - public FunctionName Function { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs deleted file mode 100644 index 6ea93850ecd6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.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.Projects -{ - /// Available tool types for agents named tools. - public readonly partial struct AgentsNamedToolChoiceType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AgentsNamedToolChoiceType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FunctionValue = "function"; - private const string CodeInterpreterValue = "code_interpreter"; - private const string FileSearchValue = "file_search"; - private const string BingGroundingValue = "bing_grounding"; - private const string MicrosoftFabricValue = "fabric_dataagent"; - private const string SharepointValue = "sharepoint_grounding"; - private const string AzureAISearchValue = "azure_ai_search"; - private const string BingCustomSearchValue = "bing_custom_search"; - private const string ConnectedAgentValue = "connected_agent"; - - /// Tool type `function`. - public static AgentsNamedToolChoiceType Function { get; } = new AgentsNamedToolChoiceType(FunctionValue); - /// Tool type `code_interpreter`. - public static AgentsNamedToolChoiceType CodeInterpreter { get; } = new AgentsNamedToolChoiceType(CodeInterpreterValue); - /// Tool type `file_search`. - public static AgentsNamedToolChoiceType FileSearch { get; } = new AgentsNamedToolChoiceType(FileSearchValue); - /// Tool type `bing_grounding`. - public static AgentsNamedToolChoiceType BingGrounding { get; } = new AgentsNamedToolChoiceType(BingGroundingValue); - /// Tool type `fabric_dataagent`. - public static AgentsNamedToolChoiceType MicrosoftFabric { get; } = new AgentsNamedToolChoiceType(MicrosoftFabricValue); - /// Tool type `sharepoint_grounding`. - public static AgentsNamedToolChoiceType Sharepoint { get; } = new AgentsNamedToolChoiceType(SharepointValue); - /// Tool type `azure_ai_search`. - public static AgentsNamedToolChoiceType AzureAISearch { get; } = new AgentsNamedToolChoiceType(AzureAISearchValue); - /// Tool type `bing_custom_search`. - public static AgentsNamedToolChoiceType BingCustomSearch { get; } = new AgentsNamedToolChoiceType(BingCustomSearchValue); - /// Tool type `connected_agent`. - public static AgentsNamedToolChoiceType ConnectedAgent { get; } = new AgentsNamedToolChoiceType(ConnectedAgentValue); - /// Determines if two values are the same. - public static bool operator ==(AgentsNamedToolChoiceType left, AgentsNamedToolChoiceType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AgentsNamedToolChoiceType left, AgentsNamedToolChoiceType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AgentsNamedToolChoiceType(string value) => new AgentsNamedToolChoiceType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AgentsNamedToolChoiceType other && Equals(other); - /// - public bool Equals(AgentsNamedToolChoiceType 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.Projects/src/Generated/ApiKeyCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ApiKeyCredentials.Serialization.cs new file mode 100644 index 000000000000..cf2a51356d10 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ApiKeyCredentials.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.AI.Projects +{ + public partial class ApiKeyCredentials : 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(ApiKeyCredentials)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("key"u8); + writer.WriteStringValue(ApiKey); + } + } + + ApiKeyCredentials 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(ApiKeyCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiKeyCredentials(document.RootElement, options); + } + + internal static ApiKeyCredentials DeserializeApiKeyCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + CredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiKeyCredentials(type, serializedAdditionalRawData, key); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiKeyCredentials)} does not support writing '{options.Format}' format."); + } + } + + ApiKeyCredentials 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 DeserializeApiKeyCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiKeyCredentials)} 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 new ApiKeyCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiKeyCredentials(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ApiKeyCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ApiKeyCredentials.cs new file mode 100644 index 000000000000..46417329b5b7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ApiKeyCredentials.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// API Key Credential definition. + public partial class ApiKeyCredentials : BaseCredentials + { + /// Initializes a new instance of . + internal ApiKeyCredentials() + { + Type = CredentialType.ApiKey; + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + /// API Key. + internal ApiKeyCredentials(CredentialType type, IDictionary serializedAdditionalRawData, string apiKey) : base(type, serializedAdditionalRawData) + { + ApiKey = apiKey; + } + + /// API Key. + public string ApiKey { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.Serialization.cs deleted file mode 100644 index 6437a738e27e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - internal partial class AppInsightsProperties : 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(AppInsightsProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("ConnectionString"u8); - writer.WriteStringValue(ConnectionString); - 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 - } - } - } - - AppInsightsProperties 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(AppInsightsProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAppInsightsProperties(document.RootElement, options); - } - - internal static AppInsightsProperties DeserializeAppInsightsProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string connectionString = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ConnectionString"u8)) - { - connectionString = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AppInsightsProperties(connectionString, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AppInsightsProperties)} does not support writing '{options.Format}' format."); - } - } - - AppInsightsProperties 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 DeserializeAppInsightsProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AppInsightsProperties)} 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 AppInsightsProperties FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAppInsightsProperties(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/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.cs deleted file mode 100644 index ce628644fcfa..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AppInsightsProperties.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; - -namespace Azure.AI.Projects -{ - /// The properties of the Application Insights resource. - internal partial class AppInsightsProperties - { - /// - /// 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 . - /// Authentication type of the connection target. - /// is null. - internal AppInsightsProperties(string connectionString) - { - Argument.AssertNotNull(connectionString, nameof(connectionString)); - - ConnectionString = connectionString; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Keeps track of any properties unknown to the library. - internal AppInsightsProperties(string connectionString, IDictionary serializedAdditionalRawData) - { - ConnectionString = connectionString; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AppInsightsProperties() - { - } - - /// Authentication type of the connection target. - public string ConnectionString { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.Serialization.cs deleted file mode 100644 index 89ee3b59f9b7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class ApplicationInsightsConfiguration : 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(ApplicationInsightsConfiguration)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("resourceId"u8); - writer.WriteStringValue(ResourceId); - writer.WritePropertyName("query"u8); - writer.WriteStringValue(Query); - if (Optional.IsDefined(ServiceName)) - { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ConnectionString)) - { - writer.WritePropertyName("connectionString"u8); - writer.WriteStringValue(ConnectionString); - } - } - - ApplicationInsightsConfiguration 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(ApplicationInsightsConfiguration)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeApplicationInsightsConfiguration(document.RootElement, options); - } - - internal static ApplicationInsightsConfiguration DeserializeApplicationInsightsConfiguration(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string resourceId = default; - string query = default; - string serviceName = default; - string connectionString = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("resourceId"u8)) - { - resourceId = property.Value.GetString(); - continue; - } - if (property.NameEquals("query"u8)) - { - query = property.Value.GetString(); - continue; - } - if (property.NameEquals("serviceName"u8)) - { - serviceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("connectionString"u8)) - { - connectionString = 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 ApplicationInsightsConfiguration( - type, - serializedAdditionalRawData, - resourceId, - query, - serviceName, - connectionString); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ApplicationInsightsConfiguration)} does not support writing '{options.Format}' format."); - } - } - - ApplicationInsightsConfiguration 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 DeserializeApplicationInsightsConfiguration(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ApplicationInsightsConfiguration)} 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 new ApplicationInsightsConfiguration FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeApplicationInsightsConfiguration(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.cs deleted file mode 100644 index 6658add0777d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ApplicationInsightsConfiguration.cs +++ /dev/null @@ -1,59 +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.Projects -{ - /// Data Source for Application Insights. - public partial class ApplicationInsightsConfiguration : InputData - { - /// Initializes a new instance of . - /// LogAnalytic Workspace resourceID associated with ApplicationInsights. - /// Query to fetch the data. - /// or is null. - public ApplicationInsightsConfiguration(string resourceId, string query) - { - Argument.AssertNotNull(resourceId, nameof(resourceId)); - Argument.AssertNotNull(query, nameof(query)); - - Type = "app_insights"; - ResourceId = resourceId; - Query = query; - } - - /// Initializes a new instance of . - /// Type of the data. - /// Keeps track of any properties unknown to the library. - /// LogAnalytic Workspace resourceID associated with ApplicationInsights. - /// Query to fetch the data. - /// Service name. - /// Connection String to connect to ApplicationInsights. - internal ApplicationInsightsConfiguration(string type, IDictionary serializedAdditionalRawData, string resourceId, string query, string serviceName, string connectionString) : base(type, serializedAdditionalRawData) - { - ResourceId = resourceId; - Query = query; - ServiceName = serviceName; - ConnectionString = connectionString; - } - - /// Initializes a new instance of for deserialization. - internal ApplicationInsightsConfiguration() - { - } - - /// LogAnalytic Workspace resourceID associated with ApplicationInsights. - public string ResourceId { get; set; } - /// Query to fetch the data. - public string Query { get; set; } - /// Service name. - public string ServiceName { get; set; } - /// Connection String to connect to ApplicationInsights. - public string ConnectionString { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.Serialization.cs new file mode 100644 index 000000000000..453d9da80e7c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.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.AI.Projects +{ + public partial class AssetCredentialResponse : 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(AssetCredentialResponse)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("blobReference"u8); + writer.WriteObjectValue(BlobReference, 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 + } + } + } + + AssetCredentialResponse 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(AssetCredentialResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAssetCredentialResponse(document.RootElement, options); + } + + internal static AssetCredentialResponse DeserializeAssetCredentialResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BlobReference blobReference = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobReference"u8)) + { + blobReference = BlobReference.DeserializeBlobReference(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AssetCredentialResponse(blobReference, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AssetCredentialResponse)} does not support writing '{options.Format}' format."); + } + } + + AssetCredentialResponse 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 DeserializeAssetCredentialResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AssetCredentialResponse)} 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 AssetCredentialResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAssetCredentialResponse(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/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.cs new file mode 100644 index 000000000000..6e8714d53f43 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AssetCredentialResponse.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.AI.Projects +{ + /// Represents a reference to a blob for consumption. + public partial class AssetCredentialResponse + { + /// + /// 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 . + /// Credential info to access the storage account. + /// is null. + internal AssetCredentialResponse(BlobReference blobReference) + { + Argument.AssertNotNull(blobReference, nameof(blobReference)); + + BlobReference = blobReference; + } + + /// Initializes a new instance of . + /// Credential info to access the storage account. + /// Keeps track of any properties unknown to the library. + internal AssetCredentialResponse(BlobReference blobReference, IDictionary serializedAdditionalRawData) + { + BlobReference = blobReference; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AssetCredentialResponse() + { + } + + /// Credential info to access the storage account. + public BlobReference BlobReference { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AttackStrategy.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AttackStrategy.cs new file mode 100644 index 000000000000..4b0119e3b1db --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AttackStrategy.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// Strategies for attacks. + public readonly partial struct AttackStrategy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AttackStrategy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EasyValue = "easy"; + private const string ModerateValue = "moderate"; + private const string DifficultValue = "difficult"; + private const string AsciiArtValue = "ascii_art"; + private const string AsciiSmugglerValue = "ascii_smuggler"; + private const string AtbashValue = "atbash"; + private const string Base64Value = "base64"; + private const string BinaryValue = "binary"; + private const string CaesarValue = "caesar"; + private const string CharacterSpaceValue = "character_space"; + private const string JailbreakValue = "jailbreak"; + private const string AnsiiAttackValue = "ansii_attack"; + private const string CharacterSwapValue = "character_swap"; + private const string SuffixAppendValue = "suffix_append"; + private const string StringJoinValue = "string_join"; + private const string UnicodeConfusableValue = "unicode_confusable"; + private const string UnicodeSubstitutionValue = "unicode_substitution"; + private const string DiacriticValue = "diacritic"; + private const string FlipValue = "flip"; + private const string LeetspeakValue = "leetspeak"; + private const string ROT13Value = "rot13"; + private const string MorseValue = "morse"; + private const string UrlValue = "url"; + private const string BaselineValue = "baseline"; + + /// Represents a default set of easy complexity attacks. Easy complexity attacks require less effort, such as translation of a prompt into some encoding, and does not require any Large Language Model to convert or orchestrate. + public static AttackStrategy Easy { get; } = new AttackStrategy(EasyValue); + /// Represents a default set of moderate complexity attacks. Moderate complexity attacks require having access to resources such as another generative AI model. + public static AttackStrategy Moderate { get; } = new AttackStrategy(ModerateValue); + /// Represents a default set of difficult complexity attacks. Difficult complexity attacks include attacks that require access to significant resources and effort to execute an attack such as knowledge of search-based algorithms in addition to a generative AI model. + public static AttackStrategy Difficult { get; } = new AttackStrategy(DifficultValue); + /// Generates visual art using ASCII characters, often used for creative or obfuscation purposes. + public static AttackStrategy AsciiArt { get; } = new AttackStrategy(AsciiArtValue); + /// Conceals data within ASCII characters, making it harder to detect. + public static AttackStrategy AsciiSmuggler { get; } = new AttackStrategy(AsciiSmugglerValue); + /// Implements the Atbash cipher, a simple substitution cipher where each letter is mapped to its reverse. + public static AttackStrategy Atbash { get; } = new AttackStrategy(AtbashValue); + /// Encodes binary data into a text format using Base64, commonly used for data transmission. + public static AttackStrategy Base64 { get; } = new AttackStrategy(Base64Value); + /// Converts text into binary code, representing data in a series of 0s and 1s. + public static AttackStrategy Binary { get; } = new AttackStrategy(BinaryValue); + /// Applies the Caesar cipher, a substitution cipher that shifts characters by a fixed number of positions. + public static AttackStrategy Caesar { get; } = new AttackStrategy(CaesarValue); + /// Alters text by adding spaces between characters, often used for obfuscation. + public static AttackStrategy CharacterSpace { get; } = new AttackStrategy(CharacterSpaceValue); + /// Injects specially crafted prompts to bypass AI safeguards, known as User Injected Prompt Attacks (UPIA). + public static AttackStrategy Jailbreak { get; } = new AttackStrategy(JailbreakValue); + /// Utilizes ANSI escape sequences to manipulate text appearance and behavior. + public static AttackStrategy AnsiiAttack { get; } = new AttackStrategy(AnsiiAttackValue); + /// Swaps characters within text to create variations or obfuscate the original content. + public static AttackStrategy CharacterSwap { get; } = new AttackStrategy(CharacterSwapValue); + /// Appends an adversarial suffix to the prompt. + public static AttackStrategy SuffixAppend { get; } = new AttackStrategy(SuffixAppendValue); + /// Joins multiple strings together, often used for concatenation or obfuscation. + public static AttackStrategy StringJoin { get; } = new AttackStrategy(StringJoinValue); + /// Uses Unicode characters that look similar to standard characters, creating visual confusion. + public static AttackStrategy UnicodeConfusable { get; } = new AttackStrategy(UnicodeConfusableValue); + /// Substitutes standard characters with Unicode equivalents, often for obfuscation. + public static AttackStrategy UnicodeSubstitution { get; } = new AttackStrategy(UnicodeSubstitutionValue); + /// Adds diacritical marks to characters, changing their appearance and sometimes their meaning. + public static AttackStrategy Diacritic { get; } = new AttackStrategy(DiacriticValue); + /// Flips characters from front to back, creating a mirrored effect. + public static AttackStrategy Flip { get; } = new AttackStrategy(FlipValue); + /// Transforms text into Leetspeak, a form of encoding that replaces letters with similar-looking numbers or symbols. + public static AttackStrategy Leetspeak { get; } = new AttackStrategy(LeetspeakValue); + /// Applies the ROT13 cipher, a simple substitution cipher that shifts characters by 13 positions. + public static AttackStrategy ROT13 { get; } = new AttackStrategy(ROT13Value); + /// Encodes text into Morse code, using dots and dashes to represent characters. + public static AttackStrategy Morse { get; } = new AttackStrategy(MorseValue); + /// Encodes text into URL format. + public static AttackStrategy Url { get; } = new AttackStrategy(UrlValue); + /// Represents the baseline direct adversarial probing, which is used by attack strategies as the attack objective. + public static AttackStrategy Baseline { get; } = new AttackStrategy(BaselineValue); + /// Determines if two values are the same. + public static bool operator ==(AttackStrategy left, AttackStrategy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AttackStrategy left, AttackStrategy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AttackStrategy(string value) => new AttackStrategy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AttackStrategy other && Equals(other); + /// + public bool Equals(AttackStrategy 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.Projects/src/Generated/AzureAISearchIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.Serialization.cs new file mode 100644 index 000000000000..225ec9c4b9fd --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.Serialization.cs @@ -0,0 +1,206 @@ +// Copyright (c) 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.Projects +{ + public partial class AzureAISearchIndex : 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(AzureAISearchIndex)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("connectionName"u8); + writer.WriteStringValue(ConnectionName); + writer.WritePropertyName("indexName"u8); + writer.WriteStringValue(IndexName); + if (Optional.IsDefined(FieldMapping)) + { + writer.WritePropertyName("fieldMapping"u8); + writer.WriteObjectValue(FieldMapping, options); + } + } + + AzureAISearchIndex 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(AzureAISearchIndex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureAISearchIndex(document.RootElement, options); + } + + internal static AzureAISearchIndex DeserializeAzureAISearchIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string connectionName = default; + string indexName = default; + FieldMapping fieldMapping = default; + IndexType type = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("indexName"u8)) + { + indexName = property.Value.GetString(); + continue; + } + if (property.NameEquals("fieldMapping"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fieldMapping = FieldMapping.DeserializeFieldMapping(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new IndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureAISearchIndex( + type, + id, + name, + version, + description, + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData, + connectionName, + indexName, + fieldMapping); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AzureAISearchIndex)} does not support writing '{options.Format}' format."); + } + } + + AzureAISearchIndex 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 DeserializeAzureAISearchIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureAISearchIndex)} 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 new AzureAISearchIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureAISearchIndex(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.cs new file mode 100644 index 000000000000..bef85c881912 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchIndex.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.Projects +{ + /// Azure AI Search Index Definition. + public partial class AzureAISearchIndex : Index + { + /// Initializes a new instance of . + /// Name of connection to Azure AI Search. + /// Name of index in Azure AI Search resource to attach. + /// or is null. + public AzureAISearchIndex(string connectionName, string indexName) + { + Argument.AssertNotNull(connectionName, nameof(connectionName)); + Argument.AssertNotNull(indexName, nameof(indexName)); + + Type = IndexType.AzureSearch; + ConnectionName = connectionName; + IndexName = indexName; + } + + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + /// Name of connection to Azure AI Search. + /// Name of index in Azure AI Search resource to attach. + /// Field mapping configuration. + internal AzureAISearchIndex(IndexType type, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData, string connectionName, string indexName, FieldMapping fieldMapping) : base(type, id, name, version, description, tags, serializedAdditionalRawData) + { + ConnectionName = connectionName; + IndexName = indexName; + FieldMapping = fieldMapping; + } + + /// Initializes a new instance of for deserialization. + internal AzureAISearchIndex() + { + } + + /// Name of connection to Azure AI Search. + public string ConnectionName { get; set; } + /// Name of index in Azure AI Search resource to attach. + public string IndexName { get; set; } + /// Field mapping configuration. + public FieldMapping FieldMapping { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchQueryType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchQueryType.cs deleted file mode 100644 index 731f00c9211f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchQueryType.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Available query types for Azure AI Search tool. - public readonly partial struct AzureAISearchQueryType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureAISearchQueryType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string SimpleValue = "simple"; - private const string SemanticValue = "semantic"; - private const string VectorValue = "vector"; - private const string VectorSimpleHybridValue = "vector_simple_hybrid"; - private const string VectorSemanticHybridValue = "vector_semantic_hybrid"; - - /// Query type `simple`. - public static AzureAISearchQueryType Simple { get; } = new AzureAISearchQueryType(SimpleValue); - /// Query type `semantic`. - public static AzureAISearchQueryType Semantic { get; } = new AzureAISearchQueryType(SemanticValue); - /// Query type `vector`. - public static AzureAISearchQueryType Vector { get; } = new AzureAISearchQueryType(VectorValue); - /// Query type `vector_simple_hybrid`. - public static AzureAISearchQueryType VectorSimpleHybrid { get; } = new AzureAISearchQueryType(VectorSimpleHybridValue); - /// Query type `vector_semantic_hybrid`. - public static AzureAISearchQueryType VectorSemanticHybrid { get; } = new AzureAISearchQueryType(VectorSemanticHybridValue); - /// Determines if two values are the same. - public static bool operator ==(AzureAISearchQueryType left, AzureAISearchQueryType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureAISearchQueryType left, AzureAISearchQueryType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AzureAISearchQueryType(string value) => new AzureAISearchQueryType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureAISearchQueryType other && Equals(other); - /// - public bool Equals(AzureAISearchQueryType 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.Projects/src/Generated/AzureAISearchResource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs deleted file mode 100644 index 451993b02c5d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.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.AI.Projects -{ - public partial class AzureAISearchResource : 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(AzureAISearchResource)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(IndexList)) - { - writer.WritePropertyName("indexes"u8); - writer.WriteStartArray(); - foreach (var item in IndexList) - { - 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 - } - } - } - - AzureAISearchResource 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(AzureAISearchResource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureAISearchResource(document.RootElement, options); - } - - internal static AzureAISearchResource DeserializeAzureAISearchResource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList indexes = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("indexes"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AISearchIndexResource.DeserializeAISearchIndexResource(item, options)); - } - indexes = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AzureAISearchResource(indexes ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AzureAISearchResource)} does not support writing '{options.Format}' format."); - } - } - - AzureAISearchResource 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 DeserializeAzureAISearchResource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureAISearchResource)} 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 AzureAISearchResource FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureAISearchResource(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/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs deleted file mode 100644 index 9ecdd9b7a676..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.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.Projects -{ - /// A set of index resources used by the `azure_ai_search` tool. - public partial class AzureAISearchResource - { - /// - /// 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 AzureAISearchResource() - { - IndexList = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// The indices attached to this agent. There can be a maximum of 1 index - /// resource attached to the agent. - /// - /// Keeps track of any properties unknown to the library. - internal AzureAISearchResource(IList indexList, IDictionary serializedAdditionalRawData) - { - IndexList = indexList; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The indices attached to this agent. There can be a maximum of 1 index - /// resource attached to the agent. - /// - public IList IndexList { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs deleted file mode 100644 index 47073371ae56..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - public partial class AzureAISearchToolDefinition : 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(AzureAISearchToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - AzureAISearchToolDefinition 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(AzureAISearchToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureAISearchToolDefinition(document.RootElement, options); - } - - internal static AzureAISearchToolDefinition DeserializeAzureAISearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 AzureAISearchToolDefinition(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - AzureAISearchToolDefinition 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 DeserializeAzureAISearchToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureAISearchToolDefinition)} 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 new AzureAISearchToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureAISearchToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs deleted file mode 100644 index b8e95d87f7ab..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The input definition information for an Azure AI search tool as used to configure an agent. - public partial class AzureAISearchToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - public AzureAISearchToolDefinition() - { - Type = "azure_ai_search"; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal AzureAISearchToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs deleted file mode 100644 index c4f00eb7f66e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class AzureFunctionBinding : 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(AzureFunctionBinding)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("storage_queue"u8); - writer.WriteObjectValue(StorageQueue, 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 - } - } - } - - AzureFunctionBinding 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(AzureFunctionBinding)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureFunctionBinding(document.RootElement, options); - } - - internal static AzureFunctionBinding DeserializeAzureFunctionBinding(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AzureFunctionBindingType type = default; - AzureFunctionStorageQueue storageQueue = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new AzureFunctionBindingType(property.Value.GetString()); - continue; - } - if (property.NameEquals("storage_queue"u8)) - { - storageQueue = AzureFunctionStorageQueue.DeserializeAzureFunctionStorageQueue(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AzureFunctionBinding(type, storageQueue, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AzureFunctionBinding)} does not support writing '{options.Format}' format."); - } - } - - AzureFunctionBinding 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 DeserializeAzureFunctionBinding(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureFunctionBinding)} 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 AzureFunctionBinding FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureFunctionBinding(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/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs deleted file mode 100644 index 86898f39d812..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The structure for keeping storage queue name and URI. - public partial class AzureFunctionBinding - { - /// - /// 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 . - /// Storage queue. - /// is null. - public AzureFunctionBinding(AzureFunctionStorageQueue storageQueue) - { - Argument.AssertNotNull(storageQueue, nameof(storageQueue)); - - StorageQueue = storageQueue; - } - - /// Initializes a new instance of . - /// The type of binding, which is always 'storage_queue'. - /// Storage queue. - /// Keeps track of any properties unknown to the library. - internal AzureFunctionBinding(AzureFunctionBindingType type, AzureFunctionStorageQueue storageQueue, IDictionary serializedAdditionalRawData) - { - Type = type; - StorageQueue = storageQueue; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AzureFunctionBinding() - { - } - - /// The type of binding, which is always 'storage_queue'. - public AzureFunctionBindingType Type { get; } = AzureFunctionBindingType.StorageQueue; - - /// Storage queue. - public AzureFunctionStorageQueue StorageQueue { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs deleted file mode 100644 index d3ef7652d782..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The AzureFunctionBinding_type. - public readonly partial struct AzureFunctionBindingType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public AzureFunctionBindingType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string StorageQueueValue = "storage_queue"; - - /// storage_queue. - public static AzureFunctionBindingType StorageQueue { get; } = new AzureFunctionBindingType(StorageQueueValue); - /// Determines if two values are the same. - public static bool operator ==(AzureFunctionBindingType left, AzureFunctionBindingType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(AzureFunctionBindingType left, AzureFunctionBindingType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator AzureFunctionBindingType(string value) => new AzureFunctionBindingType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is AzureFunctionBindingType other && Equals(other); - /// - public bool Equals(AzureFunctionBindingType 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.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs deleted file mode 100644 index 7e928c6d38d7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class AzureFunctionStorageQueue : 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(AzureFunctionStorageQueue)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("queue_service_endpoint"u8); - writer.WriteStringValue(StorageServiceEndpoint); - writer.WritePropertyName("queue_name"u8); - writer.WriteStringValue(QueueName); - 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 - } - } - } - - AzureFunctionStorageQueue 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(AzureFunctionStorageQueue)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureFunctionStorageQueue(document.RootElement, options); - } - - internal static AzureFunctionStorageQueue DeserializeAzureFunctionStorageQueue(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string queueServiceEndpoint = default; - string queueName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("queue_service_endpoint"u8)) - { - queueServiceEndpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("queue_name"u8)) - { - queueName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new AzureFunctionStorageQueue(queueServiceEndpoint, queueName, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} does not support writing '{options.Format}' format."); - } - } - - AzureFunctionStorageQueue 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 DeserializeAzureFunctionStorageQueue(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureFunctionStorageQueue)} 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 AzureFunctionStorageQueue FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureFunctionStorageQueue(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/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs deleted file mode 100644 index 1782ede5ac86..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// The structure for keeping storage queue name and URI. - public partial class AzureFunctionStorageQueue - { - /// - /// 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 . - /// URI to the Azure Storage Queue service allowing you to manipulate a queue. - /// The name of an Azure function storage queue. - /// or is null. - public AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName) - { - Argument.AssertNotNull(storageServiceEndpoint, nameof(storageServiceEndpoint)); - Argument.AssertNotNull(queueName, nameof(queueName)); - - StorageServiceEndpoint = storageServiceEndpoint; - QueueName = queueName; - } - - /// Initializes a new instance of . - /// URI to the Azure Storage Queue service allowing you to manipulate a queue. - /// The name of an Azure function storage queue. - /// Keeps track of any properties unknown to the library. - internal AzureFunctionStorageQueue(string storageServiceEndpoint, string queueName, IDictionary serializedAdditionalRawData) - { - StorageServiceEndpoint = storageServiceEndpoint; - QueueName = queueName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal AzureFunctionStorageQueue() - { - } - - /// URI to the Azure Storage Queue service allowing you to manipulate a queue. - public string StorageServiceEndpoint { get; set; } - /// The name of an Azure function storage queue. - public string QueueName { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs deleted file mode 100644 index b98aeece3d58..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class AzureFunctionToolDefinition : 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(AzureFunctionToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("azure_function"u8); - writer.WriteObjectValue(InternalAzureFunction, options); - } - - AzureFunctionToolDefinition 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(AzureFunctionToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureFunctionToolDefinition(document.RootElement, options); - } - - internal static AzureFunctionToolDefinition DeserializeAzureFunctionToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalAzureFunctionDefinition azureFunction = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azure_function"u8)) - { - azureFunction = InternalAzureFunctionDefinition.DeserializeInternalAzureFunctionDefinition(property.Value, options); - 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 AzureFunctionToolDefinition(type, serializedAdditionalRawData, azureFunction); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - AzureFunctionToolDefinition 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 DeserializeAzureFunctionToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(AzureFunctionToolDefinition)} 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 new AzureFunctionToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureFunctionToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs deleted file mode 100644 index 87032b76e501..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// The input definition information for a azure function tool as used to configure an agent. - public partial class AzureFunctionToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The definition of the concrete function that the function tool should call. - internal AzureFunctionToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalAzureFunctionDefinition internalAzureFunction) : base(type, serializedAdditionalRawData) - { - InternalAzureFunction = internalAzureFunction; - } - - /// Initializes a new instance of for deserialization. - internal AzureFunctionToolDefinition() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.Serialization.cs new file mode 100644 index 000000000000..4cfc10eb6ce1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.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.AI.Projects +{ + public partial class AzureOpenAIModelConfiguration : 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(AzureOpenAIModelConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("modelDeploymentName"u8); + writer.WriteStringValue(ModelDeploymentName); + } + + AzureOpenAIModelConfiguration 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(AzureOpenAIModelConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureOpenAIModelConfiguration(document.RootElement, options); + } + + internal static AzureOpenAIModelConfiguration DeserializeAzureOpenAIModelConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelDeploymentName = default; + string type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelDeploymentName"u8)) + { + modelDeploymentName = 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 AzureOpenAIModelConfiguration(type, serializedAdditionalRawData, modelDeploymentName); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AzureOpenAIModelConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AzureOpenAIModelConfiguration 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 DeserializeAzureOpenAIModelConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureOpenAIModelConfiguration)} 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 new AzureOpenAIModelConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureOpenAIModelConfiguration(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.cs new file mode 100644 index 000000000000..bba0687cbc42 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureOpenAIModelConfiguration.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Azure OpenAI model configuration. The API version would be selected by the service for querying the model. + public partial class AzureOpenAIModelConfiguration : TargetConfig + { + /// Initializes a new instance of . + /// Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (i.e. `my-aoai-connection/gpt-4o`. + /// is null. + public AzureOpenAIModelConfiguration(string modelDeploymentName) + { + Argument.AssertNotNull(modelDeploymentName, nameof(modelDeploymentName)); + + Type = "AzureOpenAIModel"; + ModelDeploymentName = modelDeploymentName; + } + + /// Initializes a new instance of . + /// Type of the model configuration. + /// Keeps track of any properties unknown to the library. + /// Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (i.e. `my-aoai-connection/gpt-4o`. + internal AzureOpenAIModelConfiguration(string type, IDictionary serializedAdditionalRawData, string modelDeploymentName) : base(type, serializedAdditionalRawData) + { + ModelDeploymentName = modelDeploymentName; + } + + /// Initializes a new instance of for deserialization. + internal AzureOpenAIModelConfiguration() + { + } + + /// Deployment name for AOAI model. Example: gpt-4o if in AIServices or connection based `connection_name/deployment_name` (i.e. `my-aoai-connection/gpt-4o`. + public string ModelDeploymentName { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BaseCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BaseCredentials.Serialization.cs new file mode 100644 index 000000000000..c686b983eff7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/BaseCredentials.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + [PersistableModelProxy(typeof(UnknownBaseCredentials))] + public partial class BaseCredentials : 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(BaseCredentials)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.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 + } + } + } + + BaseCredentials 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(BaseCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseCredentials(document.RootElement, options); + } + + internal static BaseCredentials DeserializeBaseCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AAD": return EntraIDCredentials.DeserializeEntraIDCredentials(element, options); + case "ApiKey": return ApiKeyCredentials.DeserializeApiKeyCredentials(element, options); + case "CustomKeys": return CustomCredential.DeserializeCustomCredential(element, options); + case "None": return NoAuthenticationCredentials.DeserializeNoAuthenticationCredentials(element, options); + case "SAS": return SASCredentials.DeserializeSASCredentials(element, options); + } + } + return UnknownBaseCredentials.DeserializeUnknownBaseCredentials(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(BaseCredentials)} does not support writing '{options.Format}' format."); + } + } + + BaseCredentials 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 DeserializeBaseCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseCredentials)} 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 BaseCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBaseCredentials(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/ai/Azure.AI.Projects/src/Generated/BaseCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BaseCredentials.cs new file mode 100644 index 000000000000..833c918e22ca --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/BaseCredentials.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.AI.Projects +{ + /// + /// A base class for connection credentials + /// 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 abstract partial class BaseCredentials + { + /// + /// 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 BaseCredentials() + { + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + internal BaseCredentials(CredentialType type, IDictionary serializedAdditionalRawData) + { + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of credential used by the connection. + internal CredentialType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.cs deleted file mode 100644 index 4e6749dbfe5b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingCustomSearchToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for a Bing custom search tool as used to configure an agent. - public partial class BingCustomSearchToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of search configurations used by the bing custom search tool. - /// is null. - public BingCustomSearchToolDefinition(SearchConfigurationList bingCustomSearch) - { - Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); - - Type = "bing_custom_search"; - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of search configurations used by the bing custom search tool. - internal BingCustomSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, SearchConfigurationList bingCustomSearch) : base(type, serializedAdditionalRawData) - { - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of for deserialization. - internal BingCustomSearchToolDefinition() - { - } - - /// The list of search configurations used by the bing custom search tool. - public SearchConfigurationList BingCustomSearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs deleted file mode 100644 index 245db11839bf..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class BingGroundingToolDefinition : 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(BingGroundingToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("bing_grounding"u8); - writer.WriteObjectValue(BingGrounding, options); - } - - BingGroundingToolDefinition 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(BingGroundingToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeBingGroundingToolDefinition(document.RootElement, options); - } - - internal static BingGroundingToolDefinition DeserializeBingGroundingToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ToolConnectionList bingGrounding = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bing_grounding"u8)) - { - bingGrounding = ToolConnectionList.DeserializeToolConnectionList(property.Value, options); - 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 BingGroundingToolDefinition(type, serializedAdditionalRawData, bingGrounding); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - BingGroundingToolDefinition 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 DeserializeBingGroundingToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(BingGroundingToolDefinition)} 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 new BingGroundingToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingGroundingToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs deleted file mode 100644 index a43df24739de..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for a bing grounding search tool as used to configure an agent. - public partial class BingGroundingToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of connections used by the bing grounding tool. - /// is null. - public BingGroundingToolDefinition(ToolConnectionList bingGrounding) - { - Argument.AssertNotNull(bingGrounding, nameof(bingGrounding)); - - Type = "bing_grounding"; - BingGrounding = bingGrounding; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of connections used by the bing grounding tool. - internal BingGroundingToolDefinition(string type, IDictionary serializedAdditionalRawData, ToolConnectionList bingGrounding) : base(type, serializedAdditionalRawData) - { - BingGrounding = bingGrounding; - } - - /// Initializes a new instance of for deserialization. - internal BingGroundingToolDefinition() - { - } - - /// The list of connections used by the bing grounding tool. - public ToolConnectionList BingGrounding { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BlobReference.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReference.Serialization.cs new file mode 100644 index 000000000000..91ffecb7bb29 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReference.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class BlobReference : 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(BlobReference)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("blobUri"u8); + writer.WriteStringValue(BlobUri); + writer.WritePropertyName("storageAccountArmId"u8); + writer.WriteStringValue(StorageAccountArmId); + writer.WritePropertyName("credential"u8); + writer.WriteObjectValue(Credential, 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 + } + } + } + + BlobReference 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(BlobReference)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBlobReference(document.RootElement, options); + } + + internal static BlobReference DeserializeBlobReference(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string blobUri = default; + string storageAccountArmId = default; + SasCredential credential = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobUri"u8)) + { + blobUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageAccountArmId"u8)) + { + storageAccountArmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("credential"u8)) + { + credential = SasCredential.DeserializeSasCredential(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BlobReference(blobUri, storageAccountArmId, credential, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(BlobReference)} does not support writing '{options.Format}' format."); + } + } + + BlobReference 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 DeserializeBlobReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BlobReference)} 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 BlobReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBlobReference(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/ai/Azure.AI.Projects/src/Generated/BlobReference.cs b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReference.cs new file mode 100644 index 000000000000..1781d55fc026 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/BlobReference.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Blob reference details. + public partial class BlobReference + { + /// + /// 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 . + /// Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path. + /// ARM ID of the storage account to use. + /// Credential info to access the storage account. + /// , or is null. + internal BlobReference(string blobUri, string storageAccountArmId, SasCredential credential) + { + Argument.AssertNotNull(blobUri, nameof(blobUri)); + Argument.AssertNotNull(storageAccountArmId, nameof(storageAccountArmId)); + Argument.AssertNotNull(credential, nameof(credential)); + + BlobUri = blobUri; + StorageAccountArmId = storageAccountArmId; + Credential = credential; + } + + /// Initializes a new instance of . + /// Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path. + /// ARM ID of the storage account to use. + /// Credential info to access the storage account. + /// Keeps track of any properties unknown to the library. + internal BlobReference(string blobUri, string storageAccountArmId, SasCredential credential, IDictionary serializedAdditionalRawData) + { + BlobUri = blobUri; + StorageAccountArmId = storageAccountArmId; + Credential = credential; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BlobReference() + { + } + + /// Blob URI path for client to upload data. Example: https://blob.windows.core.net/Container/Path. + public string BlobUri { get; } + /// ARM ID of the storage account to use. + public string StorageAccountArmId { get; } + /// Credential info to access the storage account. + public SasCredential Credential { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs deleted file mode 100644 index 7dcd5629f274..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - public partial class CodeInterpreterToolDefinition : 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(CodeInterpreterToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - CodeInterpreterToolDefinition 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(CodeInterpreterToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCodeInterpreterToolDefinition(document.RootElement, options); - } - - internal static CodeInterpreterToolDefinition DeserializeCodeInterpreterToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 CodeInterpreterToolDefinition(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - CodeInterpreterToolDefinition 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 DeserializeCodeInterpreterToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CodeInterpreterToolDefinition)} 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 new CodeInterpreterToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCodeInterpreterToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs deleted file mode 100644 index fbcc0b2aa891..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The input definition information for a code interpreter tool as used to configure an agent. - public partial class CodeInterpreterToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - public CodeInterpreterToolDefinition() - { - Type = "code_interpreter"; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal CodeInterpreterToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs deleted file mode 100644 index 1bb1bd95dc21..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class CodeInterpreterToolResource : 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(CodeInterpreterToolResource)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DataSources)) - { - writer.WritePropertyName("data_sources"u8); - writer.WriteStartArray(); - foreach (var item in DataSources) - { - 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 - } - } - } - - CodeInterpreterToolResource 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(CodeInterpreterToolResource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCodeInterpreterToolResource(document.RootElement, options); - } - - internal static CodeInterpreterToolResource DeserializeCodeInterpreterToolResource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList fileIds = default; - IList dataSources = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fileIds = array; - continue; - } - if (property.NameEquals("data_sources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStoreDataSource.DeserializeVectorStoreDataSource(item, options)); - } - dataSources = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CodeInterpreterToolResource(fileIds ?? new ChangeTrackingList(), dataSources ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CodeInterpreterToolResource)} does not support writing '{options.Format}' format."); - } - } - - CodeInterpreterToolResource 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 DeserializeCodeInterpreterToolResource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CodeInterpreterToolResource)} 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 CodeInterpreterToolResource FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCodeInterpreterToolResource(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/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs deleted file mode 100644 index 5eebfab8f085..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.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.AI.Projects -{ - /// A set of resources that are used by the `code_interpreter` tool. - public partial class CodeInterpreterToolResource - { - /// - /// 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 CodeInterpreterToolResource() - { - FileIds = new ChangeTrackingList(); - DataSources = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - /// The data sources to be used. This option is mutually exclusive with the `fileIds` property. - /// Keeps track of any properties unknown to the library. - internal CodeInterpreterToolResource(IList fileIds, IList dataSources, IDictionary serializedAdditionalRawData) - { - FileIds = fileIds; - DataSources = dataSources; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - public IList FileIds { get; } - /// The data sources to be used. This option is mutually exclusive with the `fileIds` property. - public IList DataSources { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.Serialization.cs deleted file mode 100644 index 714a6739f5d5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.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.Projects -{ - public partial class ConnectedAgentDetails : 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(ConnectedAgentDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - 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 - } - } - } - - ConnectedAgentDetails 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(ConnectedAgentDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectedAgentDetails(document.RootElement, options); - } - - internal static ConnectedAgentDetails DeserializeConnectedAgentDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string name = default; - string description = 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("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 ConnectedAgentDetails(id, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectedAgentDetails)} does not support writing '{options.Format}' format."); - } - } - - ConnectedAgentDetails 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 DeserializeConnectedAgentDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectedAgentDetails)} 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 ConnectedAgentDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectedAgentDetails(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/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.cs deleted file mode 100644 index 48727e8310ff..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentDetails.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.Projects -{ - /// Information for connecting one agent to another as a tool. - public partial class ConnectedAgentDetails - { - /// - /// 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 identifier of the child agent. - /// The name of the agent to be called. - /// A description of what the agent does, used by the model to choose when and how to call the agent. - /// , or is null. - public ConnectedAgentDetails(string id, string name, string description) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(description, nameof(description)); - - Id = id; - Name = name; - Description = description; - } - - /// Initializes a new instance of . - /// The identifier of the child agent. - /// The name of the agent to be called. - /// A description of what the agent does, used by the model to choose when and how to call the agent. - /// Keeps track of any properties unknown to the library. - internal ConnectedAgentDetails(string id, string name, string description, IDictionary serializedAdditionalRawData) - { - Id = id; - Name = name; - Description = description; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ConnectedAgentDetails() - { - } - - /// The identifier of the child agent. - public string Id { get; set; } - /// The name of the agent to be called. - public string Name { get; set; } - /// A description of what the agent does, used by the model to choose when and how to call the agent. - public string Description { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.Serialization.cs deleted file mode 100644 index 30a66cd9bc16..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class ConnectedAgentToolDefinition : 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(ConnectedAgentToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("connected_agent"u8); - writer.WriteObjectValue(ConnectedAgent, options); - } - - ConnectedAgentToolDefinition 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(ConnectedAgentToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectedAgentToolDefinition(document.RootElement, options); - } - - internal static ConnectedAgentToolDefinition DeserializeConnectedAgentToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ConnectedAgentDetails connectedAgent = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connected_agent"u8)) - { - connectedAgent = ConnectedAgentDetails.DeserializeConnectedAgentDetails(property.Value, options); - 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 ConnectedAgentToolDefinition(type, serializedAdditionalRawData, connectedAgent); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectedAgentToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - ConnectedAgentToolDefinition 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 DeserializeConnectedAgentToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectedAgentToolDefinition)} 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 new ConnectedAgentToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectedAgentToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.cs deleted file mode 100644 index 563a676c62a3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectedAgentToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for a connected agent tool which defines a domain specific sub-agent. - public partial class ConnectedAgentToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The sub-agent to connect. - /// is null. - public ConnectedAgentToolDefinition(ConnectedAgentDetails connectedAgent) - { - Argument.AssertNotNull(connectedAgent, nameof(connectedAgent)); - - Type = "connected_agent"; - ConnectedAgent = connectedAgent; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The sub-agent to connect. - internal ConnectedAgentToolDefinition(string type, IDictionary serializedAdditionalRawData, ConnectedAgentDetails connectedAgent) : base(type, serializedAdditionalRawData) - { - ConnectedAgent = connectedAgent; - } - - /// Initializes a new instance of for deserialization. - internal ConnectedAgentToolDefinition() - { - } - - /// The sub-agent to connect. - public ConnectedAgentDetails ConnectedAgent { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Connection.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Connection.Serialization.cs new file mode 100644 index 000000000000..cb5828e40f13 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Connection.Serialization.cs @@ -0,0 +1,230 @@ +// Copyright (c) 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.Projects +{ + public partial class Connection : 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(Connection)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("target"u8); + writer.WriteStringValue(Target); + } + if (options.Format != "W") + { + writer.WritePropertyName("isDefault"u8); + writer.WriteBooleanValue(IsDefault); + } + if (options.Format != "W") + { + writer.WritePropertyName("credentials"u8); + writer.WriteObjectValue(Credentials, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + 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 + } + } + } + + Connection 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(Connection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeConnection(document.RootElement, options); + } + + internal static Connection DeserializeConnection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string id = default; + ConnectionType type = default; + string target = default; + bool isDefault = default; + BaseCredentials credentials = default; + IReadOnlyDictionary metadata = 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("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ConnectionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("target"u8)) + { + target = property.Value.GetString(); + continue; + } + if (property.NameEquals("isDefault"u8)) + { + isDefault = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("credentials"u8)) + { + credentials = BaseCredentials.DeserializeBaseCredentials(property.Value, options); + continue; + } + if (property.NameEquals("metadata"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Connection( + name, + id, + type, + target, + isDefault, + credentials, + metadata, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Connection)} does not support writing '{options.Format}' format."); + } + } + + Connection 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 DeserializeConnection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Connection)} 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 Connection FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeConnection(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/ai/Azure.AI.Projects/src/Generated/Connection.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Connection.cs new file mode 100644 index 000000000000..1ef963bc4aa6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Connection.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.AI.Projects +{ + /// Response from the list and get connections operations. + public partial class Connection + { + /// + /// 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 Connection() + { + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The friendly name of the connection, provided by the user. + /// A unique identifier for the connection, generated by the service. + /// Category of the connection. + /// The connection URL to be used for this service. + /// Whether the connection is tagged as the default connection of its type. + /// + /// The credentials used by the connection + /// 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 . + /// + /// Metadata of the connection. + /// Keeps track of any properties unknown to the library. + internal Connection(string name, string id, ConnectionType type, string target, bool isDefault, BaseCredentials credentials, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + { + Name = name; + Id = id; + Type = type; + Target = target; + IsDefault = isDefault; + Credentials = credentials; + Metadata = metadata; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The friendly name of the connection, provided by the user. + public string Name { get; } + /// A unique identifier for the connection, generated by the service. + public string Id { get; } + /// Category of the connection. + public ConnectionType Type { get; } + /// The connection URL to be used for this service. + public string Target { get; } + /// Whether the connection is tagged as the default connection of its type. + public bool IsDefault { get; } + /// + /// The credentials used by the connection + /// 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 BaseCredentials Credentials { get; } + /// Metadata of the connection. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.Serialization.cs deleted file mode 100644 index 8813334bbd2a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownInternalConnectionProperties))] - public partial class ConnectionProperties : 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(ConnectionProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("authType"u8); - writer.WriteStringValue(AuthType.ToSerialString()); - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category.ToString()); - writer.WritePropertyName("target"u8); - writer.WriteStringValue(Target); - 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 - } - } - } - - ConnectionProperties 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(ConnectionProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectionProperties(document.RootElement, options); - } - - internal static ConnectionProperties DeserializeConnectionProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("authType", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AAD": return InternalConnectionPropertiesAADAuth.DeserializeInternalConnectionPropertiesAADAuth(element, options); - case "ApiKey": return ConnectionPropertiesApiKeyAuth.DeserializeConnectionPropertiesApiKeyAuth(element, options); - case "CustomKeys": return InternalConnectionPropertiesCustomAuth.DeserializeInternalConnectionPropertiesCustomAuth(element, options); - case "None": return InternalConnectionPropertiesNoAuth.DeserializeInternalConnectionPropertiesNoAuth(element, options); - case "SAS": return InternalConnectionPropertiesSASAuth.DeserializeInternalConnectionPropertiesSASAuth(element, options); - } - } - return UnknownInternalConnectionProperties.DeserializeUnknownInternalConnectionProperties(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectionProperties)} does not support writing '{options.Format}' format."); - } - } - - ConnectionProperties 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 DeserializeConnectionProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectionProperties)} 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 ConnectionProperties FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectionProperties(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/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.cs deleted file mode 100644 index f8422e640716..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionProperties.cs +++ /dev/null @@ -1,86 +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.Projects -{ - /// - /// Connection properties - /// 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 abstract partial class ConnectionProperties - { - /// - /// 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 . - /// Category of the connection. - /// The connection URL to be used for this service. - /// is null. - protected ConnectionProperties(ConnectionType category, string target) - { - Argument.AssertNotNull(target, nameof(target)); - - Category = category; - Target = target; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - internal ConnectionProperties(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData) - { - AuthType = authType; - Category = category; - Target = target; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ConnectionProperties() - { - } - /// Category of the connection. - public ConnectionType Category { get; } - /// The connection URL to be used for this service. - public string Target { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.Serialization.cs deleted file mode 100644 index 1b95023b1830..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.Serialization.cs +++ /dev/null @@ -1,146 +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.Projects -{ - public partial class ConnectionPropertiesApiKeyAuth : 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(ConnectionPropertiesApiKeyAuth)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); - } - - ConnectionPropertiesApiKeyAuth 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(ConnectionPropertiesApiKeyAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectionPropertiesApiKeyAuth(document.RootElement, options); - } - - internal static ConnectionPropertiesApiKeyAuth DeserializeConnectionPropertiesApiKeyAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CredentialsApiKeyAuth credentials = default; - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials"u8)) - { - credentials = CredentialsApiKeyAuth.DeserializeCredentialsApiKeyAuth(property.Value, options); - continue; - } - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConnectionPropertiesApiKeyAuth(authType, category, target, serializedAdditionalRawData, credentials); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectionPropertiesApiKeyAuth)} does not support writing '{options.Format}' format."); - } - } - - ConnectionPropertiesApiKeyAuth 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 DeserializeConnectionPropertiesApiKeyAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectionPropertiesApiKeyAuth)} 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 new ConnectionPropertiesApiKeyAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectionPropertiesApiKeyAuth(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.cs deleted file mode 100644 index 744b4576f2e1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionPropertiesApiKeyAuth.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Connection properties for connections with API key authentication. - public partial class ConnectionPropertiesApiKeyAuth : ConnectionProperties - { - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// Credentials will only be present for authType=ApiKey. - /// or is null. - internal ConnectionPropertiesApiKeyAuth(ConnectionType category, string target, CredentialsApiKeyAuth credentials) : base(category, target) - { - Argument.AssertNotNull(target, nameof(target)); - Argument.AssertNotNull(credentials, nameof(credentials)); - - AuthType = AuthenticationType.ApiKey; - Credentials = credentials; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - /// Credentials will only be present for authType=ApiKey. - internal ConnectionPropertiesApiKeyAuth(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData, CredentialsApiKeyAuth credentials) : base(authType, category, target, serializedAdditionalRawData) - { - Credentials = credentials; - } - - /// Initializes a new instance of for deserialization. - internal ConnectionPropertiesApiKeyAuth() - { - } - - /// Credentials will only be present for authType=ApiKey. - public CredentialsApiKeyAuth Credentials { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.Serialization.cs deleted file mode 100644 index a928ddd24acc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.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.Projects -{ - public partial class ConnectionResponse : 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(ConnectionResponse)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - 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 - } - } - } - - ConnectionResponse 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(ConnectionResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectionResponse(document.RootElement, options); - } - - internal static ConnectionResponse DeserializeConnectionResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string name = default; - ConnectionProperties properties = 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("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - properties = ConnectionProperties.DeserializeConnectionProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ConnectionResponse(id, name, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectionResponse)} does not support writing '{options.Format}' format."); - } - } - - ConnectionResponse 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 DeserializeConnectionResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectionResponse)} 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 ConnectionResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeConnectionResponse(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/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.cs deleted file mode 100644 index af78c22e4c85..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionResponse.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// Response from the listSecrets operation. - public partial class ConnectionResponse - { - /// - /// 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 unique identifier for the connection. - /// The name of the resource. - /// - /// The properties of the 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 . - /// - /// , or is null. - internal ConnectionResponse(string id, string name, ConnectionProperties properties) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Id = id; - Name = name; - Properties = properties; - } - - /// Initializes a new instance of . - /// A unique identifier for the connection. - /// The name of the resource. - /// - /// The properties of the 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 . - /// - /// Keeps track of any properties unknown to the library. - internal ConnectionResponse(string id, string name, ConnectionProperties properties, IDictionary serializedAdditionalRawData) - { - Id = id; - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ConnectionResponse() - { - } - - /// A unique identifier for the connection. - public string Id { get; } - /// The name of the resource. - public string Name { get; } - /// - /// The properties of the 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 . - /// - public ConnectionProperties Properties { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs index 8c7c10020180..5c1f164e4939 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionType.cs @@ -23,30 +23,33 @@ public ConnectionType(string value) } private const string AzureOpenAIValue = "AzureOpenAI"; - private const string ServerlessValue = "Serverless"; private const string AzureBlobStorageValue = "AzureBlob"; - private const string AzureAIServicesValue = "AIServices"; + private const string AzureStorageAccountValue = "AzureStorageAccount"; private const string AzureAISearchValue = "CognitiveSearch"; + private const string CosmosDBValue = "CosmosDB"; private const string APIKeyValue = "ApiKey"; + private const string ApplicationConfigurationValue = "AppConfig"; + private const string ApplicationInsightsValue = "AppInsights"; private const string CustomValue = "CustomKeys"; - private const string CognitiveServiceValue = "CognitiveService"; /// Azure OpenAI Service. public static ConnectionType AzureOpenAI { get; } = new ConnectionType(AzureOpenAIValue); - /// Serverless API Service. - public static ConnectionType Serverless { get; } = new ConnectionType(ServerlessValue); - /// Azure Blob Storage. + /// Azure Blob Storage, with specified container. public static ConnectionType AzureBlobStorage { get; } = new ConnectionType(AzureBlobStorageValue); - /// Azure AI Services. - public static ConnectionType AzureAIServices { get; } = new ConnectionType(AzureAIServicesValue); + /// Azure Blob Storage, with container not specified (used by Agents). + public static ConnectionType AzureStorageAccount { get; } = new ConnectionType(AzureStorageAccountValue); /// Azure AI Search. public static ConnectionType AzureAISearch { get; } = new ConnectionType(AzureAISearchValue); + /// CosmosDB. + public static ConnectionType CosmosDB { get; } = new ConnectionType(CosmosDBValue); /// Generic connection that uses API Key authentication. public static ConnectionType APIKey { get; } = new ConnectionType(APIKeyValue); - /// Generic connection that uses Custom authentication. + /// Application Configuration. + public static ConnectionType ApplicationConfiguration { get; } = new ConnectionType(ApplicationConfigurationValue); + /// Application Insights. + public static ConnectionType ApplicationInsights { get; } = new ConnectionType(ApplicationInsightsValue); + /// Custom Keys. public static ConnectionType Custom { get; } = new ConnectionType(CustomValue); - /// Cognitive Service. - public static ConnectionType CognitiveService { get; } = new ConnectionType(CognitiveServiceValue); /// Determines if two values are the same. public static bool operator ==(ConnectionType left, ConnectionType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Connections.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Connections.cs new file mode 100644 index 000000000000..e0d4e282a7ba --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Connections.cs @@ -0,0 +1,432 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The Connections sub-client. + public partial class Connections + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 Connections for mocking. + protected Connections() + { + } + + /// Initializes a new instance of Connections. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal Connections(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get a connection by name, without populating connection credentials. + /// The friendly name of the connection, provided by the user. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual async Task> GetConnectionAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetConnectionAsync(name, context).ConfigureAwait(false); + return Response.FromValue(Connection.FromResponse(response), response); + } + + /// Get a connection by name, without populating connection credentials. + /// The friendly name of the connection, provided by the user. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual Response GetConnection(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetConnection(name, context); + return Response.FromValue(Connection.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a connection by name, without populating connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The friendly name of the connection, provided by the user. + /// 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. + internal virtual async Task GetConnectionAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Connections.GetConnection"); + scope.Start(); + try + { + using HttpMessage message = CreateGetConnectionRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a connection by name, without populating connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The friendly name of the connection, provided by the user. + /// 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. + internal virtual Response GetConnection(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Connections.GetConnection"); + scope.Start(); + try + { + using HttpMessage message = CreateGetConnectionRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get a connection by name, with its connection credentials. + /// The friendly name of the connection, provided by the user. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual async Task> GetWithCredentialsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetWithCredentialsAsync(name, context).ConfigureAwait(false); + return Response.FromValue(Connection.FromResponse(response), response); + } + + /// Get a connection by name, with its connection credentials. + /// The friendly name of the connection, provided by the user. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + internal virtual Response GetWithCredentials(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetWithCredentials(name, context); + return Response.FromValue(Connection.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a connection by name, with its connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The friendly name of the connection, provided by the user. + /// 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. + internal virtual async Task GetWithCredentialsAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Connections.GetWithCredentials"); + scope.Start(); + try + { + using HttpMessage message = CreateGetWithCredentialsRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a connection by name, with its connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The friendly name of the connection, provided by the user. + /// 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. + internal virtual Response GetWithCredentials(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Connections.GetWithCredentials"); + scope.Start(); + try + { + using HttpMessage message = CreateGetWithCredentialsRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all connections in the project, without populating connection credentials. + /// List connections of this specific type. + /// List connections that are default connections. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetConnectionsAsync(ConnectionType? connectionType = null, bool? defaultConnection = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConnectionsRequest(connectionType?.ToString(), defaultConnection, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetConnectionsNextPageRequest(nextLink, connectionType?.ToString(), defaultConnection, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Connection.DeserializeConnection(e), ClientDiagnostics, _pipeline, "Connections.GetConnections", "value", "nextLink", context); + } + + /// List all connections in the project, without populating connection credentials. + /// List connections of this specific type. + /// List connections that are default connections. + /// The cancellation token to use. + /// + public virtual Pageable GetConnections(ConnectionType? connectionType = null, bool? defaultConnection = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConnectionsRequest(connectionType?.ToString(), defaultConnection, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetConnectionsNextPageRequest(nextLink, connectionType?.ToString(), defaultConnection, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Connection.DeserializeConnection(e), ClientDiagnostics, _pipeline, "Connections.GetConnections", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all connections in the project, without populating connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List connections of this specific type. Allowed values: "AzureOpenAI" | "AzureBlob" | "AzureStorageAccount" | "CognitiveSearch" | "CosmosDB" | "ApiKey" | "AppConfig" | "AppInsights" | "CustomKeys". + /// List connections that are default connections. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetConnectionsAsync(string connectionType, bool? defaultConnection, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConnectionsRequest(connectionType, defaultConnection, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetConnectionsNextPageRequest(nextLink, connectionType, defaultConnection, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Connections.GetConnections", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all connections in the project, without populating connection credentials + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// List connections of this specific type. Allowed values: "AzureOpenAI" | "AzureBlob" | "AzureStorageAccount" | "CognitiveSearch" | "CosmosDB" | "ApiKey" | "AppConfig" | "AppInsights" | "CustomKeys". + /// List connections that are default connections. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetConnections(string connectionType, bool? defaultConnection, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetConnectionsRequest(connectionType, defaultConnection, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetConnectionsNextPageRequest(nextLink, connectionType, defaultConnection, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Connections.GetConnections", "value", "nextLink", context); + } + + internal HttpMessage CreateGetConnectionRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/connections/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetWithCredentialsRequest(string name, 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("/connections/", false); + uri.AppendPath(name, true); + uri.AppendPath("/getConnectionWithCredentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetConnectionsRequest(string connectionType, bool? defaultConnection, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/connections", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (connectionType != null) + { + uri.AppendQuery("connectionType", connectionType, true); + } + if (defaultConnection != null) + { + uri.AppendQuery("defaultConnection", defaultConnection.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetConnectionsNextPageRequest(string nextLink, string connectionType, bool? defaultConnection, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionsClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionsClient.cs deleted file mode 100644 index a00d9049ec36..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ConnectionsClient.cs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - // Data plane generated sub-client. - /// The Connections sub-client. - public partial class ConnectionsClient - { - private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _subscriptionId; - private readonly string _resourceGroupName; - private readonly string _projectName; - 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 ConnectionsClient for mocking. - protected ConnectionsClient() - { - } - - private static RequestContext DefaultRequestContext = new RequestContext(); - internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) - { - if (!cancellationToken.CanBeCanceled) - { - return DefaultRequestContext; - } - - return new RequestContext() { CancellationToken = cancellationToken }; - } - - private static ResponseClassifier _responseClassifier200; - private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.Serialization.cs new file mode 100644 index 000000000000..840aed1e2fb4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.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.AI.Projects +{ + public partial class CosmosDBIndex : 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(CosmosDBIndex)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("connectionName"u8); + writer.WriteStringValue(ConnectionName); + writer.WritePropertyName("databaseName"u8); + writer.WriteStringValue(DatabaseName); + writer.WritePropertyName("containerName"u8); + writer.WriteStringValue(ContainerName); + writer.WritePropertyName("embeddingConfiguration"u8); + writer.WriteObjectValue(EmbeddingConfiguration, options); + writer.WritePropertyName("fieldMapping"u8); + writer.WriteObjectValue(FieldMapping, options); + } + + CosmosDBIndex 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(CosmosDBIndex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCosmosDBIndex(document.RootElement, options); + } + + internal static CosmosDBIndex DeserializeCosmosDBIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string connectionName = default; + string databaseName = default; + string containerName = default; + EmbeddingConfiguration embeddingConfiguration = default; + FieldMapping fieldMapping = default; + IndexType type = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("databaseName"u8)) + { + databaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("containerName"u8)) + { + containerName = property.Value.GetString(); + continue; + } + if (property.NameEquals("embeddingConfiguration"u8)) + { + embeddingConfiguration = EmbeddingConfiguration.DeserializeEmbeddingConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("fieldMapping"u8)) + { + fieldMapping = FieldMapping.DeserializeFieldMapping(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new IndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CosmosDBIndex( + type, + id, + name, + version, + description, + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData, + connectionName, + databaseName, + containerName, + embeddingConfiguration, + fieldMapping); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(CosmosDBIndex)} does not support writing '{options.Format}' format."); + } + } + + CosmosDBIndex 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 DeserializeCosmosDBIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CosmosDBIndex)} 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 new CosmosDBIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCosmosDBIndex(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.cs new file mode 100644 index 000000000000..b2a0b6b84fe6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CosmosDBIndex.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; + +namespace Azure.AI.Projects +{ + /// CosmosDB Vector Store Index Definition. + public partial class CosmosDBIndex : Index + { + /// Initializes a new instance of . + /// Name of connection to CosmosDB. + /// Name of the CosmosDB Database. + /// Name of CosmosDB Container. + /// Embedding model configuration. + /// Field mapping configuration. + /// , , , or is null. + public CosmosDBIndex(string connectionName, string databaseName, string containerName, EmbeddingConfiguration embeddingConfiguration, FieldMapping fieldMapping) + { + Argument.AssertNotNull(connectionName, nameof(connectionName)); + Argument.AssertNotNull(databaseName, nameof(databaseName)); + Argument.AssertNotNull(containerName, nameof(containerName)); + Argument.AssertNotNull(embeddingConfiguration, nameof(embeddingConfiguration)); + Argument.AssertNotNull(fieldMapping, nameof(fieldMapping)); + + Type = IndexType.CosmosDB; + ConnectionName = connectionName; + DatabaseName = databaseName; + ContainerName = containerName; + EmbeddingConfiguration = embeddingConfiguration; + FieldMapping = fieldMapping; + } + + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + /// Name of connection to CosmosDB. + /// Name of the CosmosDB Database. + /// Name of CosmosDB Container. + /// Embedding model configuration. + /// Field mapping configuration. + internal CosmosDBIndex(IndexType type, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData, string connectionName, string databaseName, string containerName, EmbeddingConfiguration embeddingConfiguration, FieldMapping fieldMapping) : base(type, id, name, version, description, tags, serializedAdditionalRawData) + { + ConnectionName = connectionName; + DatabaseName = databaseName; + ContainerName = containerName; + EmbeddingConfiguration = embeddingConfiguration; + FieldMapping = fieldMapping; + } + + /// Initializes a new instance of for deserialization. + internal CosmosDBIndex() + { + } + + /// Name of connection to CosmosDB. + public string ConnectionName { get; set; } + /// Name of the CosmosDB Database. + public string DatabaseName { get; set; } + /// Name of CosmosDB Container. + public string ContainerName { get; set; } + /// Embedding model configuration. + public EmbeddingConfiguration EmbeddingConfiguration { get; set; } + /// Field mapping configuration. + public FieldMapping FieldMapping { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs deleted file mode 100644 index dce8765f7a1d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs +++ /dev/null @@ -1,379 +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.Projects -{ - internal partial class CreateAgentRequest : 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(CreateAgentRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - if (Optional.IsDefined(Name)) - { - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(Instructions)) - { - if (Instructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - else - { - writer.WriteNull("instructions"); - } - } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - if (Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateAgentRequest 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(CreateAgentRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateAgentRequest(document.RootElement, options); - } - - internal static CreateAgentRequest DeserializeCreateAgentRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string model = default; - string name = default; - string description = default; - string instructions = default; - IReadOnlyList tools = default; - ToolResources toolResources = default; - float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateAgentRequest( - model, - name, - description, - instructions, - tools ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateAgentRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateAgentRequest 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 DeserializeCreateAgentRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateAgentRequest)} 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 CreateAgentRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateAgentRequest(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/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs deleted file mode 100644 index 47194c5840d6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs +++ /dev/null @@ -1,189 +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.Projects -{ - /// The CreateAgentRequest. - internal partial class CreateAgentRequest - { - /// - /// 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 model to use. - /// is null. - internal CreateAgentRequest(string model) - { - Argument.AssertNotNull(model, nameof(model)); - - Model = model; - Tools = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The ID of the model to use. - /// The name of the new agent. - /// The description of the new agent. - /// The system instructions for the new agent to use. - /// - /// The collection of tools to enable for the new agent. - /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateAgentRequest(string model, string name, string description, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Model = model; - Name = name; - Description = description; - Instructions = instructions; - Tools = tools; - ToolResources = toolResources; - Temperature = temperature; - TopP = topP; - ResponseFormat = responseFormat; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CreateAgentRequest() - { - } - - /// The ID of the model to use. - public string Model { get; } - /// The name of the new agent. - public string Name { get; } - /// The description of the new agent. - public string Description { get; } - /// The system instructions for the new agent to use. - public string Instructions { get; } - /// - /// The collection of tools to enable for the new agent. - /// 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 IReadOnlyList Tools { get; } - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` - /// tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - public ToolResources ToolResources { get; } - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - public float? Temperature { get; } - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - public float? TopP { get; } - /// - /// The response format of the tool calls used by this agent. - /// - /// 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 ResponseFormat { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs deleted file mode 100644 index c50fc9df5582..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs +++ /dev/null @@ -1,222 +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.Projects -{ - internal partial class CreateMessageRequest : 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(CreateMessageRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - if (Optional.IsCollectionDefined(Attachments)) - { - if (Attachments != null) - { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (var item in Attachments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateMessageRequest 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(CreateMessageRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateMessageRequest(document.RootElement, options); - } - - internal static CreateMessageRequest DeserializeCreateMessageRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageRole role = default; - BinaryData content = default; - IReadOnlyList attachments = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("role"u8)) - { - role = new MessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("content"u8)) - { - content = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("attachments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageAttachment.DeserializeMessageAttachment(item, options)); - } - attachments = array; - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateMessageRequest(role, content, attachments ?? new ChangeTrackingList(), metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateMessageRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateMessageRequest 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 DeserializeCreateMessageRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateMessageRequest)} 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 CreateMessageRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateMessageRequest(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/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs deleted file mode 100644 index 81df27722a94..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The CreateMessageRequest. - internal partial class CreateMessageRequest - { - /// - /// 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 role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// is null. - internal CreateMessageRequest(MessageRole role, BinaryData content) - { - Argument.AssertNotNull(content, nameof(content)); - - Role = role; - Content = content; - Attachments = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// A list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateMessageRequest(MessageRole role, BinaryData content, IReadOnlyList attachments, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Role = role; - Content = content; - Attachments = attachments; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CreateMessageRequest() - { - } - - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - public MessageRole Role { get; } - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// where T is of type - /// - /// - /// - /// 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 Content { get; } - /// A list of files attached to the message, and the tools they should be added to. - public IReadOnlyList Attachments { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs deleted file mode 100644 index ec58e04ede93..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs +++ /dev/null @@ -1,530 +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.Projects -{ - internal partial class CreateRunRequest : 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(CreateRunRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - if (Optional.IsDefined(OverrideModelName)) - { - if (OverrideModelName != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(OverrideModelName); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(OverrideInstructions)) - { - if (OverrideInstructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(OverrideInstructions); - } - else - { - writer.WriteNull("instructions"); - } - } - if (Optional.IsDefined(AdditionalInstructions)) - { - if (AdditionalInstructions != null) - { - writer.WritePropertyName("additional_instructions"u8); - writer.WriteStringValue(AdditionalInstructions); - } - else - { - writer.WriteNull("additional_instructions"); - } - } - if (Optional.IsCollectionDefined(AdditionalMessages)) - { - if (AdditionalMessages != null) - { - writer.WritePropertyName("additional_messages"u8); - writer.WriteStartArray(); - foreach (var item in AdditionalMessages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("additional_messages"); - } - } - if (Optional.IsCollectionDefined(OverrideTools)) - { - if (OverrideTools != null) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in OverrideTools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("tools"); - } - } - if (Optional.IsDefined(Stream)) - { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); - } - if (Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - } - if (Optional.IsDefined(MaxPromptTokens)) - { - if (MaxPromptTokens != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxPromptTokens.Value); - } - else - { - writer.WriteNull("max_prompt_tokens"); - } - } - if (Optional.IsDefined(MaxCompletionTokens)) - { - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else - { - writer.WriteNull("max_completion_tokens"); - } - } - if (Optional.IsDefined(TruncationStrategy)) - { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); - } - } - if (Optional.IsDefined(ToolChoice)) - { - if (ToolChoice != null) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("tool_choice"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - } - if (Optional.IsDefined(ParallelToolCalls)) - { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls.Value); - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateRunRequest 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(CreateRunRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateRunRequest(document.RootElement, options); - } - - internal static CreateRunRequest DeserializeCreateRunRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string assistantId = default; - string model = default; - string instructions = default; - string additionalInstructions = default; - IReadOnlyList additionalMessages = default; - IReadOnlyList tools = default; - bool? stream = default; - float? temperature = default; - float? topP = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; - TruncationObject truncationStrategy = default; - BinaryData toolChoice = default; - BinaryData responseFormat = default; - bool? parallelToolCalls = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("assistant_id"u8)) - { - assistantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("additional_instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - additionalInstructions = null; - continue; - } - additionalInstructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("additional_messages"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadMessageOptions.DeserializeThreadMessageOptions(item, options)); - } - additionalMessages = array; - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("stream"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stream = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_prompt_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxPromptTokens = null; - continue; - } - maxPromptTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("max_completion_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxCompletionTokens = null; - continue; - } - maxCompletionTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("truncation_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - truncationStrategy = null; - continue; - } - truncationStrategy = TruncationObject.DeserializeTruncationObject(property.Value, options); - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolChoice = null; - continue; - } - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parallel_tool_calls"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parallelToolCalls = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateRunRequest( - assistantId, - model, - instructions, - additionalInstructions, - additionalMessages ?? new ChangeTrackingList(), - tools ?? new ChangeTrackingList(), - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateRunRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateRunRequest 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 DeserializeCreateRunRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateRunRequest)} 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 CreateRunRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateRunRequest(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/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs deleted file mode 100644 index f7e4f5948cb5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs +++ /dev/null @@ -1,281 +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.Projects -{ - /// The CreateRunRequest. - internal partial class CreateRunRequest - { - /// - /// 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 agent that should run the thread. - /// is null. - internal CreateRunRequest(string assistantId) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - AssistantId = assistantId; - AdditionalMessages = new ChangeTrackingList(); - OverrideTools = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The ID of the agent that should run the thread. - /// The overridden model name that the agent should use to run the thread. - /// The overridden system instructions that the agent should use to run the thread. - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - /// Adds additional messages to the thread before creating the run. - /// - /// The overridden list of enabled tools that the agent should use to run the thread. - /// 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 . - /// - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateRunRequest(string assistantId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - AssistantId = assistantId; - OverrideModelName = overrideModelName; - OverrideInstructions = overrideInstructions; - AdditionalInstructions = additionalInstructions; - AdditionalMessages = additionalMessages; - OverrideTools = overrideTools; - Stream = stream; - Temperature = temperature; - TopP = topP; - MaxPromptTokens = maxPromptTokens; - MaxCompletionTokens = maxCompletionTokens; - TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ResponseFormat = responseFormat; - ParallelToolCalls = parallelToolCalls; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CreateRunRequest() - { - } - - /// The ID of the agent that should run the thread. - public string AssistantId { get; } - /// The overridden model name that the agent should use to run the thread. - public string OverrideModelName { get; } - /// The overridden system instructions that the agent should use to run the thread. - public string OverrideInstructions { get; } - /// - /// Additional instructions to append at the end of the instructions for the run. This is useful for modifying the behavior - /// on a per-run basis without overriding other instructions. - /// - public string AdditionalInstructions { get; } - /// Adds additional messages to the thread before creating the run. - public IReadOnlyList AdditionalMessages { get; } - /// - /// The overridden list of enabled tools that the agent should use to run the thread. - /// 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 IReadOnlyList OverrideTools { get; } - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - public bool? Stream { get; } - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - public float? Temperature { get; } - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - public float? TopP { get; } - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - public int? MaxPromptTokens { get; } - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort - /// to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of - /// completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - public int? MaxCompletionTokens { get; } - /// The strategy to use for dropping messages as the context windows moves forward. - public TruncationObject TruncationStrategy { get; } - /// - /// Controls whether or not and which tool is called by the model. - /// - /// 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; } - /// - /// Specifies the format that the model must output. - /// - /// 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 ResponseFormat { get; } - /// If `true` functions will run in parallel during tool use. - public bool? ParallelToolCalls { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs deleted file mode 100644 index 290df018f171..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs +++ /dev/null @@ -1,513 +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.Projects -{ - internal partial class CreateThreadAndRunRequest : 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(CreateThreadAndRunRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - if (Optional.IsDefined(Thread)) - { - writer.WritePropertyName("thread"u8); - writer.WriteObjectValue(Thread, options); - } - if (Optional.IsDefined(OverrideModelName)) - { - if (OverrideModelName != null) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(OverrideModelName); - } - else - { - writer.WriteNull("model"); - } - } - if (Optional.IsDefined(OverrideInstructions)) - { - if (OverrideInstructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(OverrideInstructions); - } - else - { - writer.WriteNull("instructions"); - } - } - if (Optional.IsCollectionDefined(OverrideTools)) - { - if (OverrideTools != null) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in OverrideTools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("tools"); - } - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - if (Optional.IsDefined(Stream)) - { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); - } - if (Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - } - if (Optional.IsDefined(MaxPromptTokens)) - { - if (MaxPromptTokens != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxPromptTokens.Value); - } - else - { - writer.WriteNull("max_prompt_tokens"); - } - } - if (Optional.IsDefined(MaxCompletionTokens)) - { - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else - { - writer.WriteNull("max_completion_tokens"); - } - } - if (Optional.IsDefined(TruncationStrategy)) - { - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); - } - } - if (Optional.IsDefined(ToolChoice)) - { - if (ToolChoice != null) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("tool_choice"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - } - if (Optional.IsDefined(ParallelToolCalls)) - { - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls.Value); - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateThreadAndRunRequest 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(CreateThreadAndRunRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateThreadAndRunRequest(document.RootElement, options); - } - - internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string assistantId = default; - AgentThreadCreationOptions thread = default; - string model = default; - string instructions = default; - IReadOnlyList tools = default; - UpdateToolResourcesOptions toolResources = default; - bool? stream = default; - float? temperature = default; - float? topP = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; - TruncationObject truncationStrategy = default; - BinaryData toolChoice = default; - BinaryData responseFormat = default; - bool? parallelToolCalls = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("assistant_id"u8)) - { - assistantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("thread"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - thread = AgentThreadCreationOptions.DeserializeAgentThreadCreationOptions(property.Value, options); - continue; - } - if (property.NameEquals("model"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - model = null; - continue; - } - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = UpdateToolResourcesOptions.DeserializeUpdateToolResourcesOptions(property.Value, options); - continue; - } - if (property.NameEquals("stream"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stream = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_prompt_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxPromptTokens = null; - continue; - } - maxPromptTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("max_completion_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxCompletionTokens = null; - continue; - } - maxCompletionTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("truncation_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - truncationStrategy = null; - continue; - } - truncationStrategy = TruncationObject.DeserializeTruncationObject(property.Value, options); - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolChoice = null; - continue; - } - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("parallel_tool_calls"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - parallelToolCalls = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateThreadAndRunRequest( - assistantId, - thread, - model, - instructions, - tools ?? new ChangeTrackingList(), - toolResources, - stream, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - parallelToolCalls, - metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateThreadAndRunRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateThreadAndRunRequest 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 DeserializeCreateThreadAndRunRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateThreadAndRunRequest)} 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 CreateThreadAndRunRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateThreadAndRunRequest(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/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs deleted file mode 100644 index d545c5ebca77..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs +++ /dev/null @@ -1,274 +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.Projects -{ - /// The CreateThreadAndRunRequest. - internal partial class CreateThreadAndRunRequest - { - /// - /// 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 agent for which the thread should be created. - /// is null. - internal CreateThreadAndRunRequest(string assistantId) - { - Argument.AssertNotNull(assistantId, nameof(assistantId)); - - AssistantId = assistantId; - OverrideTools = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The ID of the agent for which the thread should be created. - /// The details used to create the new thread. If no thread is provided, an empty one will be created. - /// The overridden model that the agent should use to run the thread. - /// The overridden system instructions the agent should use to run the thread. - /// - /// The overridden list of enabled tools the agent should use to run the thread. - /// 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 . - /// - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens - /// specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// Specifies the format that the model must output. - /// If `true` functions will run in parallel during tool use. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateThreadAndRunRequest(string assistantId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - AssistantId = assistantId; - Thread = thread; - OverrideModelName = overrideModelName; - OverrideInstructions = overrideInstructions; - OverrideTools = overrideTools; - ToolResources = toolResources; - Stream = stream; - Temperature = temperature; - TopP = topP; - MaxPromptTokens = maxPromptTokens; - MaxCompletionTokens = maxCompletionTokens; - TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ResponseFormat = responseFormat; - ParallelToolCalls = parallelToolCalls; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CreateThreadAndRunRequest() - { - } - - /// The ID of the agent for which the thread should be created. - public string AssistantId { get; } - /// The details used to create the new thread. If no thread is provided, an empty one will be created. - public AgentThreadCreationOptions Thread { get; } - /// The overridden model that the agent should use to run the thread. - public string OverrideModelName { get; } - /// The overridden system instructions the agent should use to run the thread. - public string OverrideInstructions { get; } - /// - /// The overridden list of enabled tools the agent should use to run the thread. - /// 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 IReadOnlyList OverrideTools { get; } - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - public UpdateToolResourcesOptions ToolResources { get; } - /// - /// If `true`, returns a stream of events that happen during the Run as server-sent events, - /// terminating when the Run enters a terminal state with a `data: [DONE]` message. - /// - public bool? Stream { get; } - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output - /// more random, while lower values like 0.2 will make it more focused and deterministic. - /// - public float? Temperature { get; } - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model - /// considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens - /// comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - public float? TopP { get; } - /// - /// The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, - /// the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - public int? MaxPromptTokens { get; } - /// - /// The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only - /// the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens - /// specified, the run will end with status `incomplete`. See `incomplete_details` for more info. - /// - public int? MaxCompletionTokens { get; } - /// The strategy to use for dropping messages as the context windows moves forward. - public TruncationObject TruncationStrategy { get; } - /// - /// Controls whether or not and which tool is called by the model. - /// - /// 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; } - /// - /// Specifies the format that the model must output. - /// - /// 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 ResponseFormat { get; } - /// If `true` functions will run in parallel during tool use. - public bool? ParallelToolCalls { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs deleted file mode 100644 index bd4367a1d496..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.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.AI.Projects -{ - internal partial class CreateThreadRequest : 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(CreateThreadRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Messages)) - { - writer.WritePropertyName("messages"u8); - writer.WriteStartArray(); - foreach (var item in Messages) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateThreadRequest 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(CreateThreadRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateThreadRequest(document.RootElement, options); - } - - internal static CreateThreadRequest DeserializeCreateThreadRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList messages = default; - ToolResources toolResources = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("messages"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadMessageOptions.DeserializeThreadMessageOptions(item, options)); - } - messages = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateThreadRequest(messages ?? new ChangeTrackingList(), toolResources, metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateThreadRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateThreadRequest 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 DeserializeCreateThreadRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateThreadRequest)} 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 CreateThreadRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateThreadRequest(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/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs deleted file mode 100644 index 786587e94f9b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.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; - -namespace Azure.AI.Projects -{ - /// The CreateThreadRequest. - internal partial class CreateThreadRequest - { - /// - /// 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 CreateThreadRequest() - { - Messages = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The initial messages to associate with the new thread. - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateThreadRequest(IReadOnlyList messages, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Messages = messages; - ToolResources = toolResources; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The initial messages to associate with the new thread. - public IReadOnlyList Messages { get; } - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs. - /// - public ToolResources ToolResources { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs deleted file mode 100644 index 5501a5ce37f2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs +++ /dev/null @@ -1,199 +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.Projects -{ - internal partial class CreateVectorStoreFileBatchRequest : 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(CreateVectorStoreFileBatchRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(DataSources)) - { - writer.WritePropertyName("data_sources"u8); - writer.WriteStartArray(); - foreach (var item in DataSources) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, 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 - } - } - } - - CreateVectorStoreFileBatchRequest 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(CreateVectorStoreFileBatchRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateVectorStoreFileBatchRequest(document.RootElement, options); - } - - internal static CreateVectorStoreFileBatchRequest DeserializeCreateVectorStoreFileBatchRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList fileIds = default; - IReadOnlyList dataSources = default; - VectorStoreChunkingStrategyRequest chunkingStrategy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fileIds = array; - continue; - } - if (property.NameEquals("data_sources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStoreDataSource.DeserializeVectorStoreDataSource(item, options)); - } - dataSources = array; - continue; - } - if (property.NameEquals("chunking_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - chunkingStrategy = VectorStoreChunkingStrategyRequest.DeserializeVectorStoreChunkingStrategyRequest(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateVectorStoreFileBatchRequest(fileIds ?? new ChangeTrackingList(), dataSources ?? new ChangeTrackingList(), chunkingStrategy, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateVectorStoreFileBatchRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateVectorStoreFileBatchRequest 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 DeserializeCreateVectorStoreFileBatchRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateVectorStoreFileBatchRequest)} 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 CreateVectorStoreFileBatchRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateVectorStoreFileBatchRequest(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/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs deleted file mode 100644 index a206331985f4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.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; - -namespace Azure.AI.Projects -{ - /// The CreateVectorStoreFileBatchRequest. - internal partial class CreateVectorStoreFileBatchRequest - { - /// - /// 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 CreateVectorStoreFileBatchRequest() - { - FileIds = new ChangeTrackingList(); - DataSources = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// List of file identifiers. - /// List of Azure assets. - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal CreateVectorStoreFileBatchRequest(IReadOnlyList fileIds, IReadOnlyList dataSources, VectorStoreChunkingStrategyRequest chunkingStrategy, IDictionary serializedAdditionalRawData) - { - FileIds = fileIds; - DataSources = dataSources; - ChunkingStrategy = chunkingStrategy; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// List of file identifiers. - public IReadOnlyList FileIds { get; } - /// List of Azure assets. - public IReadOnlyList DataSources { get; } - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// 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 VectorStoreChunkingStrategyRequest ChunkingStrategy { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs deleted file mode 100644 index e1cc32162dda..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs +++ /dev/null @@ -1,175 +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.Projects -{ - internal partial class CreateVectorStoreFileRequest : 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(CreateVectorStoreFileRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (Optional.IsDefined(DataSource)) - { - writer.WritePropertyName("data_source"u8); - writer.WriteObjectValue(DataSource, options); - } - if (Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, 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 - } - } - } - - CreateVectorStoreFileRequest 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(CreateVectorStoreFileRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateVectorStoreFileRequest(document.RootElement, options); - } - - internal static CreateVectorStoreFileRequest DeserializeCreateVectorStoreFileRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - VectorStoreDataSource dataSource = default; - VectorStoreChunkingStrategyRequest chunkingStrategy = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("data_source"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataSource = VectorStoreDataSource.DeserializeVectorStoreDataSource(property.Value, options); - continue; - } - if (property.NameEquals("chunking_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - chunkingStrategy = VectorStoreChunkingStrategyRequest.DeserializeVectorStoreChunkingStrategyRequest(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateVectorStoreFileRequest(fileId, dataSource, chunkingStrategy, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateVectorStoreFileRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateVectorStoreFileRequest 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 DeserializeCreateVectorStoreFileRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateVectorStoreFileRequest)} 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 CreateVectorStoreFileRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateVectorStoreFileRequest(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/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs deleted file mode 100644 index fba9287eb54a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs +++ /dev/null @@ -1,81 +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.Projects -{ - /// The CreateVectorStoreFileRequest. - internal partial class CreateVectorStoreFileRequest - { - /// - /// 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 CreateVectorStoreFileRequest() - { - } - - /// Initializes a new instance of . - /// Identifier of the file. - /// Azure asset ID. - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal CreateVectorStoreFileRequest(string fileId, VectorStoreDataSource dataSource, VectorStoreChunkingStrategyRequest chunkingStrategy, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - DataSource = dataSource; - ChunkingStrategy = chunkingStrategy; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Identifier of the file. - public string FileId { get; } - /// Azure asset ID. - public VectorStoreDataSource DataSource { get; } - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. - /// 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 VectorStoreChunkingStrategyRequest ChunkingStrategy { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs deleted file mode 100644 index 0c9a16fdf47b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs +++ /dev/null @@ -1,255 +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.Projects -{ - internal partial class CreateVectorStoreRequest : 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(CreateVectorStoreRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(StoreConfiguration)) - { - writer.WritePropertyName("configuration"u8); - writer.WriteObjectValue(StoreConfiguration, options); - } - if (Optional.IsDefined(ExpiresAfter)) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } - if (Optional.IsDefined(ChunkingStrategy)) - { - writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, options); - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - CreateVectorStoreRequest 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(CreateVectorStoreRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCreateVectorStoreRequest(document.RootElement, options); - } - - internal static CreateVectorStoreRequest DeserializeCreateVectorStoreRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList fileIds = default; - string name = default; - VectorStoreConfiguration configuration = default; - VectorStoreExpirationPolicy expiresAfter = default; - VectorStoreChunkingStrategyRequest chunkingStrategy = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fileIds = array; - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("configuration"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - configuration = VectorStoreConfiguration.DeserializeVectorStoreConfiguration(property.Value, options); - continue; - } - if (property.NameEquals("expires_after"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); - continue; - } - if (property.NameEquals("chunking_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - chunkingStrategy = VectorStoreChunkingStrategyRequest.DeserializeVectorStoreChunkingStrategyRequest(property.Value, options); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CreateVectorStoreRequest( - fileIds ?? new ChangeTrackingList(), - name, - configuration, - expiresAfter, - chunkingStrategy, - metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CreateVectorStoreRequest)} does not support writing '{options.Format}' format."); - } - } - - CreateVectorStoreRequest 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 DeserializeCreateVectorStoreRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CreateVectorStoreRequest)} 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 CreateVectorStoreRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCreateVectorStoreRequest(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/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs deleted file mode 100644 index fe9accc379e2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs +++ /dev/null @@ -1,95 +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.Projects -{ - /// The CreateVectorStoreRequest. - internal partial class CreateVectorStoreRequest - { - /// - /// 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 CreateVectorStoreRequest() - { - FileIds = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. - /// The name of the vector store. - /// The vector store configuration, used when vector store is created from Azure asset URIs. - /// Details on when this vector store expires. - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. - /// 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 set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal CreateVectorStoreRequest(IReadOnlyList fileIds, string name, VectorStoreConfiguration storeConfiguration, VectorStoreExpirationPolicy expiresAfter, VectorStoreChunkingStrategyRequest chunkingStrategy, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - FileIds = fileIds; - Name = name; - StoreConfiguration = storeConfiguration; - ExpiresAfter = expiresAfter; - ChunkingStrategy = chunkingStrategy; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. - public IReadOnlyList FileIds { get; } - /// The name of the vector store. - public string Name { get; } - /// The vector store configuration, used when vector store is created from Azure asset URIs. - public VectorStoreConfiguration StoreConfiguration { get; } - /// Details on when this vector store expires. - public VectorStoreExpirationPolicy ExpiresAfter { get; } - /// - /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. - /// 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 VectorStoreChunkingStrategyRequest ChunkingStrategy { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialType.cs new file mode 100644 index 000000000000..b3c14abc3729 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The credential type used by the connection. + internal readonly partial struct CredentialType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CredentialType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ApiKeyValue = "ApiKey"; + private const string EntraIdValue = "AAD"; + private const string SASValue = "SAS"; + private const string CustomValue = "CustomKeys"; + private const string NoneValue = "None"; + + /// API Key credential. + public static CredentialType ApiKey { get; } = new CredentialType(ApiKeyValue); + /// Entra ID credential (formerly known as AAD). + public static CredentialType EntraId { get; } = new CredentialType(EntraIdValue); + /// Shared Access Signature (SAS) credential. + public static CredentialType SAS { get; } = new CredentialType(SASValue); + /// Custom credential. + public static CredentialType Custom { get; } = new CredentialType(CustomValue); + /// No credential. + public static CredentialType None { get; } = new CredentialType(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(CredentialType left, CredentialType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CredentialType left, CredentialType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CredentialType(string value) => new CredentialType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CredentialType other && Equals(other); + /// + public bool Equals(CredentialType 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.Projects/src/Generated/CredentialsApiKeyAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsApiKeyAuth.Serialization.cs deleted file mode 100644 index bdf0f358ef6d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsApiKeyAuth.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class CredentialsApiKeyAuth : 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(CredentialsApiKeyAuth)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - 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 - } - } - } - - CredentialsApiKeyAuth 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(CredentialsApiKeyAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCredentialsApiKeyAuth(document.RootElement, options); - } - - internal static CredentialsApiKeyAuth DeserializeCredentialsApiKeyAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string key = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("key"u8)) - { - key = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CredentialsApiKeyAuth(key, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CredentialsApiKeyAuth)} does not support writing '{options.Format}' format."); - } - } - - CredentialsApiKeyAuth 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 DeserializeCredentialsApiKeyAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CredentialsApiKeyAuth)} 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 CredentialsApiKeyAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCredentialsApiKeyAuth(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/ai/Azure.AI.Projects/src/Generated/CredentialsApiKeyAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsApiKeyAuth.cs deleted file mode 100644 index 97faa0c97097..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsApiKeyAuth.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; - -namespace Azure.AI.Projects -{ - /// The credentials needed for API key authentication. - public partial class CredentialsApiKeyAuth - { - /// - /// 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 API key. - /// is null. - internal CredentialsApiKeyAuth(string key) - { - Argument.AssertNotNull(key, nameof(key)); - - Key = key; - } - - /// Initializes a new instance of . - /// The API key. - /// Keeps track of any properties unknown to the library. - internal CredentialsApiKeyAuth(string key, IDictionary serializedAdditionalRawData) - { - Key = key; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CredentialsApiKeyAuth() - { - } - - /// The API key. - public string Key { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.Serialization.cs deleted file mode 100644 index c79081df919f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - internal partial class CredentialsSASAuth : 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(CredentialsSASAuth)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("SAS"u8); - writer.WriteStringValue(SAS); - 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 - } - } - } - - CredentialsSASAuth 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(CredentialsSASAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCredentialsSASAuth(document.RootElement, options); - } - - internal static CredentialsSASAuth DeserializeCredentialsSASAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string sas = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("SAS"u8)) - { - sas = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new CredentialsSASAuth(sas, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CredentialsSASAuth)} does not support writing '{options.Format}' format."); - } - } - - CredentialsSASAuth 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 DeserializeCredentialsSASAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CredentialsSASAuth)} 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 CredentialsSASAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCredentialsSASAuth(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/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.cs deleted file mode 100644 index 5bf56c6a308c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CredentialsSASAuth.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; - -namespace Azure.AI.Projects -{ - /// The credentials needed for Shared Access Signatures (SAS) authentication. - internal partial class CredentialsSASAuth - { - /// - /// 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 Shared Access Signatures (SAS) token. - /// is null. - internal CredentialsSASAuth(string sas) - { - Argument.AssertNotNull(sas, nameof(sas)); - - SAS = sas; - } - - /// Initializes a new instance of . - /// The Shared Access Signatures (SAS) token. - /// Keeps track of any properties unknown to the library. - internal CredentialsSASAuth(string sas, IDictionary serializedAdditionalRawData) - { - SAS = sas; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal CredentialsSASAuth() - { - } - - /// The Shared Access Signatures (SAS) token. - public string SAS { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.Serialization.cs deleted file mode 100644 index d1d2ca30898d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class CronTrigger : 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(CronTrigger)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("expression"u8); - writer.WriteStringValue(Expression); - } - - CronTrigger 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(CronTrigger)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeCronTrigger(document.RootElement, options); - } - - internal static CronTrigger DeserializeCronTrigger(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string expression = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("expression"u8)) - { - expression = 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 CronTrigger(type, serializedAdditionalRawData, expression); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(CronTrigger)} does not support writing '{options.Format}' format."); - } - } - - CronTrigger 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 DeserializeCronTrigger(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(CronTrigger)} 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 new CronTrigger FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeCronTrigger(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.cs deleted file mode 100644 index f8e54d767f1e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CronTrigger.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// Cron Trigger Definition. - public partial class CronTrigger : Trigger - { - /// Initializes a new instance of . - /// Cron expression for the trigger. - /// is null. - public CronTrigger(string expression) - { - Argument.AssertNotNull(expression, nameof(expression)); - - Type = "Cron"; - Expression = expression; - } - - /// Initializes a new instance of . - /// Type of the trigger. - /// Keeps track of any properties unknown to the library. - /// Cron expression for the trigger. - internal CronTrigger(string type, IDictionary serializedAdditionalRawData, string expression) : base(type, serializedAdditionalRawData) - { - Expression = expression; - } - - /// Initializes a new instance of for deserialization. - internal CronTrigger() - { - } - - /// Cron expression for the trigger. - public string Expression { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.Serialization.cs new file mode 100644 index 000000000000..3ac16c3395ab --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.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.AI.Projects +{ + public partial class CustomCredential : 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(CustomCredential)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W") + { + writer.WritePropertyName("keys"u8); + writer.WriteStartObject(); + foreach (var item in Keys) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + CustomCredential 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(CustomCredential)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCustomCredential(document.RootElement, options); + } + + internal static CustomCredential DeserializeCustomCredential(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary keys = default; + CredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keys"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + keys = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CustomCredential(type, serializedAdditionalRawData, keys); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(CustomCredential)} does not support writing '{options.Format}' format."); + } + } + + CustomCredential 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 DeserializeCustomCredential(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CustomCredential)} 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 new CustomCredential FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCustomCredential(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.cs new file mode 100644 index 000000000000..f081ca86b583 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CustomCredential.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Custom credential definition. + public partial class CustomCredential : BaseCredentials + { + /// Initializes a new instance of . + internal CustomCredential() + { + Type = CredentialType.Custom; + Keys = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + /// The credential type. + internal CustomCredential(CredentialType type, IDictionary serializedAdditionalRawData, IReadOnlyDictionary keys) : base(type, serializedAdditionalRawData) + { + Keys = keys; + } + + /// The credential type. + public IReadOnlyDictionary Keys { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.Serialization.cs deleted file mode 100644 index 1399c69e7b54..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class Dataset : 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(Dataset)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - - Dataset 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(Dataset)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDataset(document.RootElement, options); - } - - internal static Dataset DeserializeDataset(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string type = 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("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new Dataset(type, serializedAdditionalRawData, id); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(Dataset)} does not support writing '{options.Format}' format."); - } - } - - Dataset 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 DeserializeDataset(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(Dataset)} 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 new Dataset FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeDataset(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.cs deleted file mode 100644 index e164284e2eee..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Dataset.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// Dataset as source for evaluation. - public partial class Dataset : InputData - { - /// Initializes a new instance of . - /// Evaluation input data. - /// is null. - public Dataset(string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Type = "dataset"; - Id = id; - } - - /// Initializes a new instance of . - /// Type of the data. - /// Keeps track of any properties unknown to the library. - /// Evaluation input data. - internal Dataset(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData) - { - Id = id; - } - - /// Initializes a new instance of for deserialization. - internal Dataset() - { - } - - /// Evaluation input data. - public string Id { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DatasetType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetType.cs new file mode 100644 index 000000000000..a4629543310f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetType.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.AI.Projects +{ + /// Enum to determine the type of data. + internal readonly partial struct DatasetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DatasetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UriFileValue = "uri_file"; + private const string UriFolderValue = "uri_folder"; + + /// URI file. + public static DatasetType UriFile { get; } = new DatasetType(UriFileValue); + /// URI folder. + public static DatasetType UriFolder { get; } = new DatasetType(UriFolderValue); + /// Determines if two values are the same. + public static bool operator ==(DatasetType left, DatasetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DatasetType left, DatasetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DatasetType(string value) => new DatasetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DatasetType other && Equals(other); + /// + public bool Equals(DatasetType 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.Projects/src/Generated/DatasetVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetVersion.Serialization.cs new file mode 100644 index 000000000000..6d2957778b00 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetVersion.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + [PersistableModelProxy(typeof(UnknownDatasetVersion))] + public partial class DatasetVersion : 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(DatasetVersion)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dataUri"u8); + writer.WriteStringValue(DataUri); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && Optional.IsDefined(IsReference)) + { + writer.WritePropertyName("isReference"u8); + writer.WriteBooleanValue(IsReference.Value); + } + if (Optional.IsDefined(ConnectionName)) + { + writer.WritePropertyName("connectionName"u8); + writer.WriteStringValue(ConnectionName); + } + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + DatasetVersion 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(DatasetVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetVersion(document.RootElement, options); + } + + internal static DatasetVersion DeserializeDatasetVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "uri_file": return FileDatasetVersion.DeserializeFileDatasetVersion(element, options); + case "uri_folder": return FolderDatasetVersion.DeserializeFolderDatasetVersion(element, options); + } + } + return UnknownDatasetVersion.DeserializeUnknownDatasetVersion(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetVersion)} does not support writing '{options.Format}' format."); + } + } + + DatasetVersion 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 DeserializeDatasetVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetVersion)} 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 DatasetVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatasetVersion(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/ai/Azure.AI.Projects/src/Generated/DatasetVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetVersion.cs new file mode 100644 index 000000000000..545e5a8b21c0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DatasetVersion.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// DatasetVersion Definition + /// 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 abstract partial class DatasetVersion + { + /// + /// 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 . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// is null. + protected DatasetVersion(string dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + DataUri = dataUri; + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Dataset type. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal DatasetVersion(string dataUri, DatasetType type, bool? isReference, string connectionName, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) + { + DataUri = dataUri; + Type = type; + IsReference = isReference; + ConnectionName = connectionName; + Id = id; + Name = name; + Version = version; + Description = description; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DatasetVersion() + { + } + + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + public string DataUri { get; set; } + /// Dataset type. + internal DatasetType Type { get; set; } + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + public bool? IsReference { get; } + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + public string ConnectionName { get; set; } + /// Asset ID, a unique identifier for the asset. + public string Id { get; } + /// The name of the resource. + public string Name { get; } + /// The version of the resource. + public string Version { get; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Datasets.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Datasets.cs new file mode 100644 index 000000000000..1787d746fc8e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Datasets.cs @@ -0,0 +1,909 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The Datasets sub-client. + public partial class Datasets + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 Datasets for mocking. + protected Datasets() + { + } + + /// Initializes a new instance of Datasets. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal Datasets(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get the specific version of the DatasetVersion. + /// The name of the resource. + /// The specific version id of the DatasetVersion to retrieve. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDatasetAsync(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDatasetAsync(name, version, context).ConfigureAwait(false); + return Response.FromValue(DatasetVersion.FromResponse(response), response); + } + + /// Get the specific version of the DatasetVersion. + /// The name of the resource. + /// The specific version id of the DatasetVersion to retrieve. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDataset(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDataset(name, version, context); + return Response.FromValue(DatasetVersion.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the specific version of the DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to retrieve. + /// 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 GetDatasetAsync(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.GetDataset"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDatasetRequest(name, version, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the specific version of the DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to retrieve. + /// 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 GetDataset(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.GetDataset"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDatasetRequest(name, version, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete the specific version of the DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The version of the DatasetVersion to delete. + /// 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 DeleteAsync(string name, string version, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, version, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete the specific version of the DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The version of the DatasetVersion to delete. + /// 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 Delete(string name, string version, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, version, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new or update an existing DatasetVersion with the given version id + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to create or replace. + /// The content to send as the body of the request. + /// 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 CreateOrUpdateAsync(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(name, version, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new or update an existing DatasetVersion with the given version id + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to create or replace. + /// The content to send as the body of the request. + /// 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 CreateOrUpdate(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(name, version, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Start a new or get an existing pending upload of a dataset for a specific version. + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// Parameters for the action. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> PendingUploadAsync(string name, string version, PendingUploadRequest body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await PendingUploadAsync(name, version, content, context).ConfigureAwait(false); + return Response.FromValue(PendingUploadResponse.FromResponse(response), response); + } + + /// Start a new or get an existing pending upload of a dataset for a specific version. + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// Parameters for the action. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response PendingUpload(string name, string version, PendingUploadRequest body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = PendingUpload(name, version, content, context); + return Response.FromValue(PendingUploadResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Start a new or get an existing pending upload of a dataset for a specific version. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// The content to send as the body of the request. + /// 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 PendingUploadAsync(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.PendingUpload"); + scope.Start(); + try + { + using HttpMessage message = CreatePendingUploadRequest(name, version, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Start a new or get an existing pending upload of a dataset for a specific version. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// The content to send as the body of the request. + /// 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 PendingUpload(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.PendingUpload"); + scope.Start(); + try + { + using HttpMessage message = CreatePendingUploadRequest(name, version, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Get the SAS credential to access the storage account associated with a Dataset version. + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetCredentialsAsync(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetCredentialsAsync(name, version, context).ConfigureAwait(false); + return Response.FromValue(AssetCredentialResponse.FromResponse(response), response); + } + + /// Get the SAS credential to access the storage account associated with a Dataset version. + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetCredentials(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetCredentials(name, version, context); + return Response.FromValue(AssetCredentialResponse.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the SAS credential to access the storage account associated with a Dataset version. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// 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 GetCredentialsAsync(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.GetCredentials"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCredentialsRequest(name, version, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the SAS credential to access the storage account associated with a Dataset version. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the DatasetVersion to operate on. + /// 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 GetCredentials(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Datasets.GetCredentials"); + scope.Start(); + try + { + using HttpMessage message = CreateGetCredentialsRequest(name, version, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all versions of the given DatasetVersion. + /// The name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetVersionsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatasetVersion.DeserializeDatasetVersion(e), ClientDiagnostics, _pipeline, "Datasets.GetVersions", "value", "nextLink", context); + } + + /// List all versions of the given DatasetVersion. + /// The name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetVersions(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatasetVersion.DeserializeDatasetVersion(e), ClientDiagnostics, _pipeline, "Datasets.GetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all versions of the given DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetVersionsAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Datasets.GetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all versions of the given DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetVersions(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Datasets.GetVersions", "value", "nextLink", context); + } + + /// List the latest version of each DatasetVersion. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetDatasetVersionsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDatasetVersionsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDatasetVersionsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => DatasetVersion.DeserializeDatasetVersion(e), ClientDiagnostics, _pipeline, "Datasets.GetDatasetVersions", "value", "nextLink", context); + } + + /// List the latest version of each DatasetVersion. + /// The cancellation token to use. + /// + public virtual Pageable GetDatasetVersions(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDatasetVersionsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDatasetVersionsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => DatasetVersion.DeserializeDatasetVersion(e), ClientDiagnostics, _pipeline, "Datasets.GetDatasetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List the latest version of each DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDatasetVersionsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDatasetVersionsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDatasetVersionsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Datasets.GetDatasetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List the latest version of each DatasetVersion + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDatasetVersions(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDatasetVersionsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDatasetVersionsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Datasets.GetDatasetVersions", "value", "nextLink", context); + } + + internal HttpMessage CreateGetVersionsRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDatasetVersionsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/datasets", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDatasetRequest(string name, string version, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string name, string version, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreatePendingUploadRequest(string name, string version, RequestContent content, 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("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetCredentialsRequest(string name, string version, 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("/datasets/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/credentials", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetVersionsNextPageRequest(string nextLink, string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + internal HttpMessage CreateGetDatasetVersionsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Deployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Deployment.Serialization.cs new file mode 100644 index 000000000000..046bf583b40d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Deployment.Serialization.cs @@ -0,0 +1,138 @@ +// 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.AI.Projects +{ + [PersistableModelProxy(typeof(UnknownDeployment))] + public partial class Deployment : 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(Deployment)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W") + { + 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 + } + } + } + + Deployment 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(Deployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployment(document.RootElement, options); + } + + internal static Deployment DeserializeDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ModelDeployment": return ModelDeployment.DeserializeModelDeployment(element, options); + } + } + return UnknownDeployment.DeserializeUnknownDeployment(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Deployment)} does not support writing '{options.Format}' format."); + } + } + + Deployment 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 DeserializeDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Deployment)} 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 Deployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDeployment(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/ai/Azure.AI.Projects/src/Generated/Deployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Deployment.cs new file mode 100644 index 000000000000..3d36e6d4fadc --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Deployment.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.AI.Projects +{ + /// + /// Model Deployment Definition + /// 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 Deployment + { + /// + /// 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 Deployment() + { + } + + /// Initializes a new instance of . + /// The type of the deployment. + /// Name of the deployment. + /// Keeps track of any properties unknown to the library. + internal Deployment(DeploymentType type, string name, IDictionary serializedAdditionalRawData) + { + Type = type; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of the deployment. + internal DeploymentType Type { get; set; } + /// Name of the deployment. + public string Name { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DeploymentType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DeploymentType.cs new file mode 100644 index 000000000000..d34cf84db649 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DeploymentType.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.AI.Projects +{ + /// The DeploymentType. + public readonly partial struct DeploymentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeploymentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ModelDeploymentValue = "ModelDeployment"; + + /// Model deployment. + public static DeploymentType ModelDeployment { get; } = new DeploymentType(ModelDeploymentValue); + /// Determines if two values are the same. + public static bool operator ==(DeploymentType left, DeploymentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeploymentType left, DeploymentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DeploymentType(string value) => new DeploymentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeploymentType other && Equals(other); + /// + public bool Equals(DeploymentType 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.Projects/src/Generated/Deployments.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Deployments.cs new file mode 100644 index 000000000000..b6da194612da --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Deployments.cs @@ -0,0 +1,322 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The Deployments sub-client. + public partial class Deployments + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 Deployments for mocking. + protected Deployments() + { + } + + /// Initializes a new instance of Deployments. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal Deployments(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get a deployed model. + /// Name of the deployment. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetDeploymentAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetDeploymentAsync(name, context).ConfigureAwait(false); + return Response.FromValue(Deployment.FromResponse(response), response); + } + + /// Get a deployed model. + /// Name of the deployment. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetDeployment(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetDeployment(name, context); + return Response.FromValue(Deployment.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a deployed model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of the deployment. + /// 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 GetDeploymentAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Deployments.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a deployed model. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Name of the deployment. + /// 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 GetDeployment(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Deployments.GetDeployment"); + scope.Start(); + try + { + using HttpMessage message = CreateGetDeploymentRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all deployed models in the project. + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetDeploymentsAsync(string modelPublisher = null, string modelName = null, DeploymentType? deploymentType = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(modelPublisher, modelName, deploymentType?.ToString(), context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, modelPublisher, modelName, deploymentType?.ToString(), context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Deployment.DeserializeDeployment(e), ClientDiagnostics, _pipeline, "Deployments.GetDeployments", "value", "nextLink", context); + } + + /// List all deployed models in the project. + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. + /// The cancellation token to use. + /// + public virtual Pageable GetDeployments(string modelPublisher = null, string modelName = null, DeploymentType? deploymentType = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(modelPublisher, modelName, deploymentType?.ToString(), context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, modelPublisher, modelName, deploymentType?.ToString(), context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Deployment.DeserializeDeployment(e), ClientDiagnostics, _pipeline, "Deployments.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all deployed models in the project + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. Allowed values: "ModelDeployment". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetDeploymentsAsync(string modelPublisher, string modelName, string deploymentType, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(modelPublisher, modelName, deploymentType, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, modelPublisher, modelName, deploymentType, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Deployments.GetDeployments", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all deployed models in the project + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Model publisher to filter models by. + /// Model name (the publisher specific name) to filter models by. + /// Type of deployment to filter list by. Allowed values: "ModelDeployment". + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetDeployments(string modelPublisher, string modelName, string deploymentType, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetDeploymentsRequest(modelPublisher, modelName, deploymentType, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetDeploymentsNextPageRequest(nextLink, modelPublisher, modelName, deploymentType, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Deployments.GetDeployments", "value", "nextLink", context); + } + + internal HttpMessage CreateGetDeploymentRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/deployments/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsRequest(string modelPublisher, string modelName, string deploymentType, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/deployments", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (modelPublisher != null) + { + uri.AppendQuery("modelPublisher", modelPublisher, true); + } + if (modelName != null) + { + uri.AppendQuery("modelName", modelName, true); + } + if (deploymentType != null) + { + uri.AppendQuery("deploymentType", deploymentType, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetDeploymentsNextPageRequest(string nextLink, string modelPublisher, string modelName, string deploymentType, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Connections.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Connections.xml new file mode 100644 index 000000000000..1cc0cd98f760 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Connections.xml @@ -0,0 +1,73 @@ + + + + + +This sample shows how to call GetConnectionsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + +await foreach (Connection item in client.GetConnectionsAsync()) +{ +} +]]> + + + +This sample shows how to call GetConnections. +"); +TokenCredential credential = new DefaultAzureCredential(); +Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + +foreach (Connection item in client.GetConnections()) +{ +} +]]> + + + +This sample shows how to call GetConnectionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetConnectionsAsync("AzureOpenAI", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("isDefault").ToString()); + Console.WriteLine(result.GetProperty("credentials").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetConnections and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetConnections("AzureOpenAI", true, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("isDefault").ToString()); + Console.WriteLine(result.GetProperty("credentials").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Datasets.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Datasets.xml new file mode 100644 index 000000000000..48ca95a6e1d1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Datasets.xml @@ -0,0 +1,749 @@ + + + + + +This sample shows how to call GetDatasetAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDatasetAsync("", ""); +]]> +This sample shows how to call GetDatasetAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDatasetAsync("", ""); +]]> + + + +This sample shows how to call GetDataset. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDataset("", ""); +]]> +This sample shows how to call GetDataset with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDataset("", ""); +]]> + + + +This sample shows how to call GetDatasetAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDatasetAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call GetDatasetAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDatasetAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("isReference").ToString()); +Console.WriteLine(result.GetProperty("connectionName").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetDataset and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDataset("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call GetDataset with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDataset("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("isReference").ToString()); +Console.WriteLine(result.GetProperty("connectionName").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.DeleteAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.DeleteAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.Delete("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.Delete("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "uri_file", + dataUri = "", +}); +Response response = await client.CreateOrUpdateAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "uri_file", + dataUri = "", + connectionName = "", + description = "", + tags = new + { + key = "", + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("isReference").ToString()); +Console.WriteLine(result.GetProperty("connectionName").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "uri_file", + dataUri = "", +}); +Response response = client.CreateOrUpdate("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "uri_file", + dataUri = "", + connectionName = "", + description = "", + tags = new + { + key = "", + }, +}); +Response response = client.CreateOrUpdate("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("dataUri").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("isReference").ToString()); +Console.WriteLine(result.GetProperty("connectionName").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call PendingUploadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +PendingUploadRequest body = new PendingUploadRequest +{ + PendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + ConnectionName = "bknvpmlisrqxaphkf", +}; +Response response = await client.PendingUploadAsync("sgrzyrpltz", "ozdqisviavgqgfbtnzk", body); +]]> +This sample shows how to call PendingUploadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +PendingUploadRequest body = new PendingUploadRequest(); +Response response = await client.PendingUploadAsync("duxoiaywfik", "yzzzt", body); +]]> + + + +This sample shows how to call PendingUpload. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +PendingUploadRequest body = new PendingUploadRequest +{ + PendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + ConnectionName = "bknvpmlisrqxaphkf", +}; +Response response = client.PendingUpload("sgrzyrpltz", "ozdqisviavgqgfbtnzk", body); +]]> +This sample shows how to call PendingUpload. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +PendingUploadRequest body = new PendingUploadRequest(); +Response response = client.PendingUpload("duxoiaywfik", "yzzzt", body); +]]> + + + +This sample shows how to call PendingUploadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + pendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + connectionName = "bknvpmlisrqxaphkf", + pendingUploadType = "BlobReference", +}); +Response response = await client.PendingUploadAsync("sgrzyrpltz", "ozdqisviavgqgfbtnzk", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); +]]> +This sample shows how to call PendingUploadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + pendingUploadType = "BlobReference", +}); +Response response = await client.PendingUploadAsync("duxoiaywfik", "yzzzt", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); +]]> + + + +This sample shows how to call PendingUpload and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + pendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + connectionName = "bknvpmlisrqxaphkf", + pendingUploadType = "BlobReference", +}); +Response response = client.PendingUpload("sgrzyrpltz", "ozdqisviavgqgfbtnzk", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); +]]> +This sample shows how to call PendingUpload and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + pendingUploadType = "BlobReference", +}); +Response response = client.PendingUpload("duxoiaywfik", "yzzzt", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); +Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); +]]> + + + +This sample shows how to call GetCredentialsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetCredentialsAsync("vzqmzhfdzfqegdk", "cuiflnznlzybcrc"); +]]> +This sample shows how to call GetCredentialsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetCredentialsAsync("sbblxkyqnfvdiqacezyygvts", "ikak"); +]]> + + + +This sample shows how to call GetCredentials. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetCredentials("vzqmzhfdzfqegdk", "cuiflnznlzybcrc"); +]]> +This sample shows how to call GetCredentials. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetCredentials("sbblxkyqnfvdiqacezyygvts", "ikak"); +]]> + + + +This sample shows how to call GetCredentialsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetCredentialsAsync("vzqmzhfdzfqegdk", "cuiflnznlzybcrc", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +]]> +This sample shows how to call GetCredentialsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetCredentialsAsync("sbblxkyqnfvdiqacezyygvts", "ikak", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetCredentials and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetCredentials("vzqmzhfdzfqegdk", "cuiflnznlzybcrc", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +]]> +This sample shows how to call GetCredentials and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetCredentials("sbblxkyqnfvdiqacezyygvts", "ikak", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); +Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetVersionsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (DatasetVersion item in client.GetVersionsAsync("")) +{ +} +]]> +This sample shows how to call GetVersionsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (DatasetVersion item in client.GetVersionsAsync("")) +{ +} +]]> + + + +This sample shows how to call GetVersions. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (DatasetVersion item in client.GetVersions("")) +{ +} +]]> +This sample shows how to call GetVersions with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (DatasetVersion item in client.GetVersions("")) +{ +} +]]> + + + +This sample shows how to call GetVersionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetVersionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetVersionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetVersionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetVersions and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetVersions("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetVersions with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetVersions("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetDatasetVersionsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (DatasetVersion item in client.GetDatasetVersionsAsync()) +{ +} +]]> +This sample shows how to call GetDatasetVersionsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (DatasetVersion item in client.GetDatasetVersionsAsync()) +{ +} +]]> + + + +This sample shows how to call GetDatasetVersions. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (DatasetVersion item in client.GetDatasetVersions()) +{ +} +]]> +This sample shows how to call GetDatasetVersions with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (DatasetVersion item in client.GetDatasetVersions()) +{ +} +]]> + + + +This sample shows how to call GetDatasetVersionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetDatasetVersionsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetDatasetVersionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetDatasetVersionsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetDatasetVersions and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetDatasetVersions(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetDatasetVersions with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetDatasetVersions(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Deployments.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Deployments.xml new file mode 100644 index 000000000000..016331ea6914 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Deployments.xml @@ -0,0 +1,115 @@ + + + + + +This sample shows how to call GetDeploymentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDeploymentAsync("qqvacpzjfk"); +]]> + + + +This sample shows how to call GetDeployment. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDeployment("qqvacpzjfk"); +]]> + + + +This sample shows how to call GetDeploymentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetDeploymentAsync("qqvacpzjfk", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetDeployment and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetDeployment("qqvacpzjfk", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +]]> + + + +This sample shows how to call GetDeploymentsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +await foreach (Deployment item in client.GetDeploymentsAsync()) +{ +} +]]> + + + +This sample shows how to call GetDeployments. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +foreach (Deployment item in client.GetDeployments()) +{ +} +]]> + + + +This sample shows how to call GetDeploymentsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetDeploymentsAsync("kznreojrvlwdq", "gplerszsuyisseeksnyvkaqperxox", null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); +} +]]> + + + +This sample shows how to call GetDeployments and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetDeployments("kznreojrvlwdq", "gplerszsuyisseeksnyvkaqperxox", null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Evaluations.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Evaluations.xml new file mode 100644 index 000000000000..ebaeb7b71e84 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Evaluations.xml @@ -0,0 +1,521 @@ + + + + + +This sample shows how to call GetEvaluationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetEvaluationAsync("so"); +]]> + + + +This sample shows how to call GetEvaluation. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetEvaluation("so"); +]]> + + + +This sample shows how to call GetEvaluationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetEvaluationAsync("so", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> + + + +This sample shows how to call GetEvaluation and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetEvaluation("so", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> + + + +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Evaluation evaluation = new Evaluation(null, new Dictionary +{ + ["key2735"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = + { + ["key7400"] = "ijkjfvoswni" + }, + } +}) +{ + DisplayName = "ymjxkodggqrhjnmusta", + Description = "cuviaxytqckkybxwc", + Tags = + { + ["key30"] = "nqrdpedyhkjzgrbtqhxbmkdmlpdf" + }, + Properties = + { + ["key9192"] = "e" + }, +}; +Response response = await client.CreateAsync(evaluation); +]]> +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Evaluation evaluation = new Evaluation(null, new Dictionary()); +Response response = await client.CreateAsync(evaluation); +]]> + + + +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Evaluation evaluation = new Evaluation(null, new Dictionary +{ + ["key2735"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = + { + ["key7400"] = "ijkjfvoswni" + }, + } +}) +{ + DisplayName = "ymjxkodggqrhjnmusta", + Description = "cuviaxytqckkybxwc", + Tags = + { + ["key30"] = "nqrdpedyhkjzgrbtqhxbmkdmlpdf" + }, + Properties = + { + ["key9192"] = "e" + }, +}; +Response response = client.Create(evaluation); +]]> +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +Evaluation evaluation = new Evaluation(null, new Dictionary()); +Response response = client.Create(evaluation); +]]> + + + +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "ymjxkodggqrhjnmusta", + description = "cuviaxytqckkybxwc", + tags = new + { + key30 = "nqrdpedyhkjzgrbtqhxbmkdmlpdf", + }, + properties = new + { + key9192 = "e", + }, + evaluators = new + { + key2735 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, +}); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + evaluators = new object(), +}); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> + + + +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "ymjxkodggqrhjnmusta", + description = "cuviaxytqckkybxwc", + tags = new + { + key30 = "nqrdpedyhkjzgrbtqhxbmkdmlpdf", + }, + properties = new + { + key9192 = "e", + }, + evaluators = new + { + key2735 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, +}); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + evaluators = new object(), +}); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +]]> + + + +This sample shows how to call CreateAgentEvaluationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary +{ + ["key2653"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = + { + ["key7400"] = "ijkjfvoswni" + }, + } +}, "dvcnrcwar") +{ + ThreadId = "cxjjsyhkeezgnaqqyerrdrbbth", + SamplingConfiguration = new AgentEvaluationSamplingConfiguration("tj", 7F, 8F), + RedactionConfiguration = new AgentEvaluationRedactionConfiguration + { + RedactScoreProperties = true, + }, +}; +Response response = await client.CreateAgentEvaluationAsync(evaluation); +]]> +This sample shows how to call CreateAgentEvaluationAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary(), "dvcnrcwar"); +Response response = await client.CreateAgentEvaluationAsync(evaluation); +]]> + + + +This sample shows how to call CreateAgentEvaluation. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary +{ + ["key2653"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = + { + ["key7400"] = "ijkjfvoswni" + }, + } +}, "dvcnrcwar") +{ + ThreadId = "cxjjsyhkeezgnaqqyerrdrbbth", + SamplingConfiguration = new AgentEvaluationSamplingConfiguration("tj", 7F, 8F), + RedactionConfiguration = new AgentEvaluationRedactionConfiguration + { + RedactScoreProperties = true, + }, +}; +Response response = client.CreateAgentEvaluation(evaluation); +]]> +This sample shows how to call CreateAgentEvaluation. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary(), "dvcnrcwar"); +Response response = client.CreateAgentEvaluation(evaluation); +]]> + + + +This sample shows how to call CreateAgentEvaluationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + runId = "ecfcffqsrdhpecocrufffiqz", + threadId = "cxjjsyhkeezgnaqqyerrdrbbth", + evaluators = new + { + key2653 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + samplingConfiguration = new + { + name = "tj", + samplingPercent = 7F, + maxRequestRate = 8F, + }, + redactionConfiguration = new + { + redactScoreProperties = true, + }, + appInsightsConnectionString = "dvcnrcwar", +}); +Response response = await client.CreateAgentEvaluationAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call CreateAgentEvaluationAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + runId = "ecfcffqsrdhpecocrufffiqz", + evaluators = new object(), + appInsightsConnectionString = "dvcnrcwar", +}); +Response response = await client.CreateAgentEvaluationAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> + + + +This sample shows how to call CreateAgentEvaluation and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + runId = "ecfcffqsrdhpecocrufffiqz", + threadId = "cxjjsyhkeezgnaqqyerrdrbbth", + evaluators = new + { + key2653 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + samplingConfiguration = new + { + name = "tj", + samplingPercent = 7F, + maxRequestRate = 8F, + }, + redactionConfiguration = new + { + redactScoreProperties = true, + }, + appInsightsConnectionString = "dvcnrcwar", +}); +Response response = client.CreateAgentEvaluation(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> +This sample shows how to call CreateAgentEvaluation and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + runId = "ecfcffqsrdhpecocrufffiqz", + evaluators = new object(), + appInsightsConnectionString = "dvcnrcwar", +}); +Response response = client.CreateAgentEvaluation(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +]]> + + + +This sample shows how to call GetEvaluationsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +await foreach (Evaluation item in client.GetEvaluationsAsync()) +{ +} +]]> + + + +This sample shows how to call GetEvaluations. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +foreach (Evaluation item in client.GetEvaluations()) +{ +} +]]> + + + +This sample shows how to call GetEvaluationsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetEvaluationsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +} +]]> + + + +This sample shows how to call GetEvaluations and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetEvaluations(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Indexes.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Indexes.xml new file mode 100644 index 000000000000..7a103b1f70cd --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/Indexes.xml @@ -0,0 +1,515 @@ + + + + + +This sample shows how to call GetIndexAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetIndexAsync("", ""); +]]> +This sample shows how to call GetIndexAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetIndexAsync("", ""); +]]> + + + +This sample shows how to call GetIndex. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetIndex("", ""); +]]> +This sample shows how to call GetIndex with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetIndex("", ""); +]]> + + + +This sample shows how to call GetIndexAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetIndexAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call GetIndexAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetIndexAsync("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetIndex and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetIndex("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call GetIndex with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetIndex("", "", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call DeleteAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.DeleteAsync("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call DeleteAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.DeleteAsync("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call Delete. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.Delete("", ""); + +Console.WriteLine(response.Status); +]]> +This sample shows how to call Delete with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +Response response = client.Delete("", ""); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call CreateOrUpdateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "AzureSearch", + connectionName = "", + indexName = "", +}); +Response response = await client.CreateOrUpdateAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call CreateOrUpdateAsync with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "AzureSearch", + connectionName = "", + indexName = "", + fieldMapping = new + { + contentFields = new object[] + { + "" + }, + filepathField = "", + titleField = "", + urlField = "", + vectorFields = new object[] + { + "" + }, + metadataFields = new object[] + { + "" + }, + }, + description = "", + tags = new + { + key = "", + }, +}); +Response response = await client.CreateOrUpdateAsync("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateOrUpdate and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "AzureSearch", + connectionName = "", + indexName = "", +}); +Response response = client.CreateOrUpdate("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +]]> +This sample shows how to call CreateOrUpdate with all parameters and request content and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + type = "AzureSearch", + connectionName = "", + indexName = "", + fieldMapping = new + { + contentFields = new object[] + { + "" + }, + filepathField = "", + titleField = "", + urlField = "", + vectorFields = new object[] + { + "" + }, + metadataFields = new object[] + { + "" + }, + }, + description = "", + tags = new + { + key = "", + }, +}); +Response response = client.CreateOrUpdate("", "", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("version").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetVersionsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (Index item in client.GetVersionsAsync("")) +{ +} +]]> +This sample shows how to call GetVersionsAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (Index item in client.GetVersionsAsync("")) +{ +} +]]> + + + +This sample shows how to call GetVersions. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (Index item in client.GetVersions("")) +{ +} +]]> +This sample shows how to call GetVersions with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (Index item in client.GetVersions("")) +{ +} +]]> + + + +This sample shows how to call GetVersionsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetVersionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetVersionsAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetVersionsAsync("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetVersions and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetVersions("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetVersions with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetVersions("", null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetIndicesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (Index item in client.GetIndicesAsync()) +{ +} +]]> +This sample shows how to call GetIndicesAsync with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (Index item in client.GetIndicesAsync()) +{ +} +]]> + + + +This sample shows how to call GetIndices. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (Index item in client.GetIndices()) +{ +} +]]> +This sample shows how to call GetIndices with all parameters. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (Index item in client.GetIndices()) +{ +} +]]> + + + +This sample shows how to call GetIndicesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetIndicesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetIndicesAsync with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetIndicesAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetIndices and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetIndices(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); +} +]]> +This sample shows how to call GetIndices with all parameters and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetIndices(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Docs/RedTeams.xml b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/RedTeams.xml new file mode 100644 index 000000000000..76a475b7d29a --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Docs/RedTeams.xml @@ -0,0 +1,323 @@ + + + + + +This sample shows how to call GetRedTeamAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetRedTeamAsync("apwpcf"); +]]> + + + +This sample shows how to call GetRedTeam. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetRedTeam("apwpcf"); +]]> + + + +This sample shows how to call GetRedTeamAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +Response response = await client.GetRedTeamAsync("apwpcf", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetRedTeam and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +Response response = client.GetRedTeam("apwpcf", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +RedTeam redTeam = new RedTeam(null) +{ + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + ApplicationScenario = "qaxxxhjp", + Tags = + { + ["key1287"] = "gbklekkgmxkfbhehgh" + }, + Properties = + { + ["key9280"] = "fwzjtipl" + }, +}; +Response response = await client.CreateAsync(redTeam); +]]> +This sample shows how to call CreateAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +RedTeam redTeam = new RedTeam(null) +{ + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, +}; +Response response = await client.CreateAsync(redTeam); +]]> + + + +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +RedTeam redTeam = new RedTeam(null) +{ + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + ApplicationScenario = "qaxxxhjp", + Tags = + { + ["key1287"] = "gbklekkgmxkfbhehgh" + }, + Properties = + { + ["key9280"] = "fwzjtipl" + }, +}; +Response response = client.Create(redTeam); +]]> +This sample shows how to call Create. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +RedTeam redTeam = new RedTeam(null) +{ + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, +}; +Response response = client.Create(redTeam); +]]> + + + +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + numTurns = 10, + attackStrategies = new object[] + { + "easy" + }, + simulationOnly = true, + riskCategories = new object[] + { + "HateUnfairness" + }, + applicationScenario = "qaxxxhjp", + tags = new + { + key1287 = "gbklekkgmxkfbhehgh", + }, + properties = new + { + key9280 = "fwzjtipl", + }, +}); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> +This sample shows how to call CreateAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + numTurns = 10, + attackStrategies = new object[] + { + "easy" + }, + simulationOnly = true, + riskCategories = new object[] + { + "HateUnfairness" + }, +}); +Response response = await client.CreateAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + numTurns = 10, + attackStrategies = new object[] + { + "easy" + }, + simulationOnly = true, + riskCategories = new object[] + { + "HateUnfairness" + }, + applicationScenario = "qaxxxhjp", + tags = new + { + key1287 = "gbklekkgmxkfbhehgh", + }, + properties = new + { + key9280 = "fwzjtipl", + }, +}); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> +This sample shows how to call Create and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +using RequestContent content = RequestContent.Create(new +{ + numTurns = 10, + attackStrategies = new object[] + { + "easy" + }, + simulationOnly = true, + riskCategories = new object[] + { + "HateUnfairness" + }, +}); +Response response = client.Create(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetRedTeamsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +await foreach (RedTeam item in client.GetRedTeamsAsync()) +{ +} +]]> + + + +This sample shows how to call GetRedTeams. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +foreach (RedTeam item in client.GetRedTeams()) +{ +} +]]> + + + +This sample shows how to call GetRedTeamsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +await foreach (BinaryData item in client.GetRedTeamsAsync(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +} +]]> + + + +This sample shows how to call GetRedTeams and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + +foreach (BinaryData item in client.GetRedTeams(null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs deleted file mode 100644 index 9f658de4258c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Terminal event indicating the successful end of a stream. - public readonly partial struct DoneEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public DoneEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string DoneValue = "done"; - - /// Event sent when the stream is done. - public static DoneEvent Done { get; } = new DoneEvent(DoneValue); - /// Determines if two values are the same. - public static bool operator ==(DoneEvent left, DoneEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(DoneEvent left, DoneEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator DoneEvent(string value) => new DoneEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is DoneEvent other && Equals(other); - /// - public bool Equals(DoneEvent 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.Projects/src/Generated/EmbeddingConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.Serialization.cs new file mode 100644 index 000000000000..a61517c1eee2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.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; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class EmbeddingConfiguration : 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(EmbeddingConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("modelDeploymentName"u8); + writer.WriteStringValue(ModelDeploymentName); + writer.WritePropertyName("embeddingField"u8); + writer.WriteStringValue(EmbeddingField); + 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 + } + } + } + + EmbeddingConfiguration 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(EmbeddingConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEmbeddingConfiguration(document.RootElement, options); + } + + internal static EmbeddingConfiguration DeserializeEmbeddingConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelDeploymentName = default; + string embeddingField = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelDeploymentName"u8)) + { + modelDeploymentName = property.Value.GetString(); + continue; + } + if (property.NameEquals("embeddingField"u8)) + { + embeddingField = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EmbeddingConfiguration(modelDeploymentName, embeddingField, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EmbeddingConfiguration)} does not support writing '{options.Format}' format."); + } + } + + EmbeddingConfiguration 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 DeserializeEmbeddingConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EmbeddingConfiguration)} 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 EmbeddingConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEmbeddingConfiguration(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/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.cs new file mode 100644 index 000000000000..ecef0ee3ad8b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EmbeddingConfiguration.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.AI.Projects +{ + /// Embedding configuration class. + public partial class EmbeddingConfiguration + { + /// + /// 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 . + /// Deployment name of embedding model. It can point to a model deployment either in the parent AIServices or a connection. + /// Embedding field. + /// or is null. + public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) + { + Argument.AssertNotNull(modelDeploymentName, nameof(modelDeploymentName)); + Argument.AssertNotNull(embeddingField, nameof(embeddingField)); + + ModelDeploymentName = modelDeploymentName; + EmbeddingField = embeddingField; + } + + /// Initializes a new instance of . + /// Deployment name of embedding model. It can point to a model deployment either in the parent AIServices or a connection. + /// Embedding field. + /// Keeps track of any properties unknown to the library. + internal EmbeddingConfiguration(string modelDeploymentName, string embeddingField, IDictionary serializedAdditionalRawData) + { + ModelDeploymentName = modelDeploymentName; + EmbeddingField = embeddingField; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EmbeddingConfiguration() + { + } + + /// Deployment name of embedding model. It can point to a model deployment either in the parent AIServices or a connection. + public string ModelDeploymentName { get; set; } + /// Embedding field. + public string EmbeddingField { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.Serialization.cs new file mode 100644 index 000000000000..6ba161089e55 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.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.AI.Projects +{ + public partial class EntraIDCredentials : 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(EntraIDCredentials)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + EntraIDCredentials 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(EntraIDCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntraIDCredentials(document.RootElement, options); + } + + internal static EntraIDCredentials DeserializeEntraIDCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EntraIDCredentials(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EntraIDCredentials)} does not support writing '{options.Format}' format."); + } + } + + EntraIDCredentials 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 DeserializeEntraIDCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntraIDCredentials)} 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 new EntraIDCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEntraIDCredentials(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.cs new file mode 100644 index 000000000000..2dcdb9431743 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EntraIDCredentials.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.AI.Projects +{ + /// Entra ID credential definition. + public partial class EntraIDCredentials : BaseCredentials + { + /// Initializes a new instance of . + internal EntraIDCredentials() + { + Type = CredentialType.EntraId; + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + internal EntraIDCredentials(CredentialType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs deleted file mode 100644 index ea570033f684..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Terminal event indicating a server side error while streaming. - public readonly partial struct ErrorEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ErrorEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ErrorValue = "error"; - - /// Event sent when an error occurs, such as an internal server error or a timeout. - public static ErrorEvent Error { get; } = new ErrorEvent(ErrorValue); - /// Determines if two values are the same. - public static bool operator ==(ErrorEvent left, ErrorEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ErrorEvent left, ErrorEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ErrorEvent(string value) => new ErrorEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ErrorEvent other && Equals(other); - /// - public bool Equals(ErrorEvent 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.Projects/src/Generated/Evaluation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.Serialization.cs index 089900fbbd61..f5a8926a18bd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.Serialization.cs @@ -37,15 +37,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (options.Format != "W") { writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WriteStringValue(Name); } writer.WritePropertyName("data"u8); writer.WriteObjectValue(Data, options); - if (Optional.IsDefined(Target)) - { - writer.WritePropertyName("target"u8); - writer.WriteObjectValue(Target, options); - } if (Optional.IsDefined(DisplayName)) { writer.WritePropertyName("displayName"u8); @@ -56,11 +51,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - writer.WriteObjectValue(SystemData, options); - } if (options.Format != "W" && Optional.IsDefined(Status)) { writer.WritePropertyName("status"u8); @@ -135,10 +125,8 @@ internal static Evaluation DeserializeEvaluation(JsonElement element, ModelReade } string id = default; InputData data = default; - EvaluationTarget target = default; string displayName = default; string description = default; - SystemData systemData = default; string status = default; IDictionary tags = default; IDictionary properties = default; @@ -157,15 +145,6 @@ internal static Evaluation DeserializeEvaluation(JsonElement element, ModelReade data = InputData.DeserializeInputData(property.Value, options); continue; } - if (property.NameEquals("target"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - target = EvaluationTarget.DeserializeEvaluationTarget(property.Value, options); - continue; - } if (property.NameEquals("displayName"u8)) { displayName = property.Value.GetString(); @@ -176,15 +155,6 @@ internal static Evaluation DeserializeEvaluation(JsonElement element, ModelReade description = property.Value.GetString(); continue; } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value, options); - continue; - } if (property.NameEquals("status"u8)) { status = property.Value.GetString(); @@ -237,10 +207,8 @@ internal static Evaluation DeserializeEvaluation(JsonElement element, ModelReade return new Evaluation( id, data, - target, displayName, description, - systemData, status, tags ?? new ChangeTrackingDictionary(), properties ?? new ChangeTrackingDictionary(), diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.cs index f40d8ceaad92..66db63de881c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluation.cs @@ -49,7 +49,7 @@ public partial class Evaluation /// /// Data for evaluation. /// 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 . /// /// Evaluators to be used for the evaluation. /// or is null. @@ -65,29 +65,25 @@ public Evaluation(InputData data, IDictionary ev } /// Initializes a new instance of . - /// Identifier of the evaluation. + /// Identifier of the evaluation. /// /// Data for evaluation. /// 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 . /// - /// Evaluation target specifying the model config and parameters. /// Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique. /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. - /// Metadata containing createdBy and modifiedBy information. /// Status of the evaluation. It is set by service and is read-only. /// Evaluation's tags. Unlike properties, tags are fully mutable. /// Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. /// Evaluators to be used for the evaluation. /// Keeps track of any properties unknown to the library. - internal Evaluation(string id, InputData data, EvaluationTarget target, string displayName, string description, SystemData systemData, string status, IDictionary tags, IDictionary properties, IDictionary evaluators, IDictionary serializedAdditionalRawData) + internal Evaluation(string name, InputData data, string displayName, string description, string status, IDictionary tags, IDictionary properties, IDictionary evaluators, IDictionary serializedAdditionalRawData) { - Id = id; + Name = name; Data = data; - Target = target; DisplayName = displayName; Description = description; - SystemData = systemData; Status = status; Tags = tags; Properties = properties; @@ -101,21 +97,17 @@ internal Evaluation() } /// Identifier of the evaluation. - public string Id { get; } + public string Name { get; } /// /// Data for evaluation. /// 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 . /// public InputData Data { get; set; } - /// Evaluation target specifying the model config and parameters. - public EvaluationTarget Target { get; set; } /// Display Name for evaluation. It helps to find the evaluation easily in AI Foundry. It does not need to be unique. public string DisplayName { get; set; } /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. public string Description { get; set; } - /// Metadata containing createdBy and modifiedBy information. - public SystemData SystemData { get; } /// Status of the evaluation. It is set by service and is read-only. public string Status { get; } /// Evaluation's tags. Unlike properties, tags are fully mutable. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.Serialization.cs deleted file mode 100644 index af0f860410c6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.Serialization.cs +++ /dev/null @@ -1,291 +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.Projects -{ - public partial class EvaluationSchedule : 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(EvaluationSchedule)} does not support writing '{format}' format."); - } - - if (options.Format != "W") - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - writer.WritePropertyName("data"u8); - writer.WriteObjectValue(Data, options); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - if (options.Format != "W" && Optional.IsDefined(SystemData)) - { - writer.WritePropertyName("systemData"u8); - writer.WriteObjectValue(SystemData, options); - } - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) - { - writer.WritePropertyName("provisioningState"u8); - writer.WriteStringValue(ProvisioningState); - } - 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.IsCollectionDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - foreach (var item in Properties) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (options.Format != "W" && Optional.IsDefined(IsEnabled)) - { - writer.WritePropertyName("isEnabled"u8); - writer.WriteStringValue(IsEnabled); - } - writer.WritePropertyName("evaluators"u8); - writer.WriteStartObject(); - foreach (var item in Evaluators) - { - writer.WritePropertyName(item.Key); - writer.WriteObjectValue(item.Value, options); - } - writer.WriteEndObject(); - writer.WritePropertyName("trigger"u8); - writer.WriteObjectValue(Trigger, 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 - } - } - } - - EvaluationSchedule 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(EvaluationSchedule)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEvaluationSchedule(document.RootElement, options); - } - - internal static EvaluationSchedule DeserializeEvaluationSchedule(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - ApplicationInsightsConfiguration data = default; - string description = default; - SystemData systemData = default; - string provisioningState = default; - IDictionary tags = default; - IDictionary properties = default; - string isEnabled = default; - IDictionary evaluators = default; - Trigger trigger = 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("data"u8)) - { - data = ApplicationInsightsConfiguration.DeserializeApplicationInsightsConfiguration(property.Value, options); - continue; - } - if (property.NameEquals("description"u8)) - { - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = SystemData.DeserializeSystemData(property.Value, options); - continue; - } - if (property.NameEquals("provisioningState"u8)) - { - provisioningState = 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("properties"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()); - } - properties = dictionary; - continue; - } - if (property.NameEquals("isEnabled"u8)) - { - isEnabled = property.Value.GetString(); - continue; - } - if (property.NameEquals("evaluators"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, EvaluatorConfiguration.DeserializeEvaluatorConfiguration(property0.Value, options)); - } - evaluators = dictionary; - continue; - } - if (property.NameEquals("trigger"u8)) - { - trigger = Trigger.DeserializeTrigger(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EvaluationSchedule( - name, - data, - description, - systemData, - provisioningState, - tags ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary(), - isEnabled, - evaluators, - trigger, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(EvaluationSchedule)} does not support writing '{options.Format}' format."); - } - } - - EvaluationSchedule 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 DeserializeEvaluationSchedule(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EvaluationSchedule)} 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 EvaluationSchedule FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeEvaluationSchedule(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/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.cs deleted file mode 100644 index ad1104435458..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationSchedule.cs +++ /dev/null @@ -1,131 +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.Projects -{ - /// Evaluation Schedule Definition. - public partial class EvaluationSchedule - { - /// - /// 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 . - /// Data for evaluation. - /// Evaluators to be used for the evaluation. - /// - /// Trigger for the evaluation. - /// 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 EvaluationSchedule(ApplicationInsightsConfiguration data, IDictionary evaluators, Trigger trigger) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(evaluators, nameof(evaluators)); - Argument.AssertNotNull(trigger, nameof(trigger)); - - Data = data; - Tags = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); - Evaluators = evaluators; - Trigger = trigger; - } - - /// Initializes a new instance of . - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// Data for evaluation. - /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. - /// Metadata containing createdBy and modifiedBy information. - /// Provisioning State of the evaluation. It is set by service and is read-only. - /// Evaluation's tags. Unlike properties, tags are fully mutable. - /// Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. - /// Enabled status of the evaluation. It is set by service and is read-only. - /// Evaluators to be used for the evaluation. - /// - /// Trigger for the evaluation. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal EvaluationSchedule(string name, ApplicationInsightsConfiguration data, string description, SystemData systemData, string provisioningState, IDictionary tags, IDictionary properties, string isEnabled, IDictionary evaluators, Trigger trigger, IDictionary serializedAdditionalRawData) - { - Name = name; - Data = data; - Description = description; - SystemData = systemData; - ProvisioningState = provisioningState; - Tags = tags; - Properties = properties; - IsEnabled = isEnabled; - Evaluators = evaluators; - Trigger = trigger; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal EvaluationSchedule() - { - } - - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - public string Name { get; } - /// Data for evaluation. - public ApplicationInsightsConfiguration Data { get; set; } - /// Description of the evaluation. It can be used to store additional information about the evaluation and is mutable. - public string Description { get; set; } - /// Metadata containing createdBy and modifiedBy information. - public SystemData SystemData { get; } - /// Provisioning State of the evaluation. It is set by service and is read-only. - public string ProvisioningState { get; } - /// Evaluation's tags. Unlike properties, tags are fully mutable. - public IDictionary Tags { get; } - /// Evaluation's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. - public IDictionary Properties { get; } - /// Enabled status of the evaluation. It is set by service and is read-only. - public string IsEnabled { get; } - /// Evaluators to be used for the evaluation. - public IDictionary Evaluators { get; } - /// - /// Trigger for the evaluation. - /// 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 Trigger Trigger { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.Serialization.cs deleted file mode 100644 index 0a8a83d8bae0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class EvaluationTarget : 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(EvaluationTarget)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("systemMessage"u8); - writer.WriteStringValue(SystemMessage); - writer.WritePropertyName("modelConfig"u8); - writer.WriteObjectValue(ModelConfig, options); - if (Optional.IsCollectionDefined(ModelParams)) - { - writer.WritePropertyName("modelParams"u8); - writer.WriteStartObject(); - foreach (var item in ModelParams) - { - 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 - } - } - } - - EvaluationTarget 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(EvaluationTarget)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeEvaluationTarget(document.RootElement, options); - } - - internal static EvaluationTarget DeserializeEvaluationTarget(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string systemMessage = default; - TargetModelConfig modelConfig = default; - IDictionary modelParams = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("systemMessage"u8)) - { - systemMessage = property.Value.GetString(); - continue; - } - if (property.NameEquals("modelConfig"u8)) - { - modelConfig = TargetModelConfig.DeserializeTargetModelConfig(property.Value, options); - continue; - } - if (property.NameEquals("modelParams"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())); - } - } - modelParams = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new EvaluationTarget(systemMessage, modelConfig, modelParams ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(EvaluationTarget)} does not support writing '{options.Format}' format."); - } - } - - EvaluationTarget 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 DeserializeEvaluationTarget(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(EvaluationTarget)} 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 EvaluationTarget FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeEvaluationTarget(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/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.cs deleted file mode 100644 index 0e34a83c1531..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationTarget.cs +++ /dev/null @@ -1,128 +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.Projects -{ - /// Target for the evaluation process. - public partial class EvaluationTarget - { - /// - /// 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 . - /// System message related to the evaluation target. - /// - /// Model configuration for the evaluation. - /// 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 EvaluationTarget(string systemMessage, TargetModelConfig modelConfig) - { - Argument.AssertNotNull(systemMessage, nameof(systemMessage)); - Argument.AssertNotNull(modelConfig, nameof(modelConfig)); - - SystemMessage = systemMessage; - ModelConfig = modelConfig; - ModelParams = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// System message related to the evaluation target. - /// - /// Model configuration for the evaluation. - /// 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 dictionary of parameters for the model. - /// Keeps track of any properties unknown to the library. - internal EvaluationTarget(string systemMessage, TargetModelConfig modelConfig, IDictionary modelParams, IDictionary serializedAdditionalRawData) - { - SystemMessage = systemMessage; - ModelConfig = modelConfig; - ModelParams = modelParams; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal EvaluationTarget() - { - } - - /// System message related to the evaluation target. - public string SystemMessage { get; set; } - /// - /// Model configuration for the evaluation. - /// 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 TargetModelConfig ModelConfig { get; set; } - /// - /// A dictionary of parameters for the model. - /// - /// 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 ModelParams { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Evaluations.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluations.cs new file mode 100644 index 000000000000..2811741a3f4b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Evaluations.cs @@ -0,0 +1,548 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The Evaluations sub-client. + public partial class Evaluations + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 Evaluations for mocking. + protected Evaluations() + { + } + + /// Initializes a new instance of Evaluations. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal Evaluations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get an evaluation run by name. + /// Identifier of the evaluation. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetEvaluationAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetEvaluationAsync(name, context).ConfigureAwait(false); + return Response.FromValue(Evaluation.FromResponse(response), response); + } + + /// Get an evaluation run by name. + /// Identifier of the evaluation. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetEvaluation(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetEvaluation(name, context); + return Response.FromValue(Evaluation.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get an evaluation run by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the evaluation. + /// 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 GetEvaluationAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.GetEvaluation"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get an evaluation run by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the evaluation. + /// 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 GetEvaluation(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.GetEvaluation"); + scope.Start(); + try + { + using HttpMessage message = CreateGetEvaluationRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates an evaluation run. + /// Evaluation to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateAsync(Evaluation evaluation, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluation, nameof(evaluation)); + + using RequestContent content = evaluation.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(Evaluation.FromResponse(response), response); + } + + /// Creates an evaluation run. + /// Evaluation to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Create(Evaluation evaluation, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluation, nameof(evaluation)); + + using RequestContent content = evaluation.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Create(content, context); + return Response.FromValue(Evaluation.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates an evaluation run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates an evaluation run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates an agent evaluation run. + /// Agent evaluation to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateAgentEvaluationAsync(AgentEvaluationRequest evaluation, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluation, nameof(evaluation)); + + using RequestContent content = evaluation.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateAgentEvaluationAsync(content, context).ConfigureAwait(false); + return Response.FromValue(AgentEvaluation.FromResponse(response), response); + } + + /// Creates an agent evaluation run. + /// Agent evaluation to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual Response CreateAgentEvaluation(AgentEvaluationRequest evaluation, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(evaluation, nameof(evaluation)); + + using RequestContent content = evaluation.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateAgentEvaluation(content, context); + return Response.FromValue(AgentEvaluation.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates an agent evaluation run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAgentEvaluationAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.CreateAgentEvaluation"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateAgentEvaluationRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates an agent evaluation run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response CreateAgentEvaluation(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Evaluations.CreateAgentEvaluation"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateAgentEvaluationRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List evaluation runs. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetEvaluationsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Evaluation.DeserializeEvaluation(e), ClientDiagnostics, _pipeline, "Evaluations.GetEvaluations", "value", "nextLink", context); + } + + /// List evaluation runs. + /// The cancellation token to use. + /// + public virtual Pageable GetEvaluations(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Evaluation.DeserializeEvaluation(e), ClientDiagnostics, _pipeline, "Evaluations.GetEvaluations", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List evaluation runs + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetEvaluationsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Evaluations.GetEvaluations", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List evaluation runs + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetEvaluations(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Evaluations.GetEvaluations", "value", "nextLink", context); + } + + internal HttpMessage CreateGetEvaluationRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluations/runs/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetEvaluationsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluations/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluations/runs:run", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateCreateAgentEvaluationRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluations/runs:runAgent", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetEvaluationsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier201; + private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationsClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationsClient.cs deleted file mode 100644 index 017c3b1d7274..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluationsClient.cs +++ /dev/null @@ -1,1052 +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; - -namespace Azure.AI.Projects -{ - // Data plane generated sub-client. - /// The Evaluations sub-client. - public partial class EvaluationsClient - { - private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _subscriptionId; - private readonly string _resourceGroupName; - private readonly string _projectName; - 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 EvaluationsClient for mocking. - protected EvaluationsClient() - { - } - - /// Initializes a new instance of EvaluationsClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The token credential to copy. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// The API version to use for this operation. - internal EvaluationsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion) - { - ClientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - _tokenCredential = tokenCredential; - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = apiVersion; - } - - /// Resource read operation template. - /// Identifier of the evaluation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetEvaluationAsync(string id, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetEvaluationAsync(id, context).ConfigureAwait(false); - return Response.FromValue(Evaluation.FromResponse(response), response); - } - - /// Resource read operation template. - /// Identifier of the evaluation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetEvaluation(string id, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetEvaluation(id, context); - return Response.FromValue(Evaluation.FromResponse(response), response); - } - - /// - /// [Protocol Method] Resource read operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the evaluation. - /// 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 GetEvaluationAsync(string id, RequestContext context) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.GetEvaluation"); - scope.Start(); - try - { - using HttpMessage message = CreateGetEvaluationRequest(id, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Resource read operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Identifier of the evaluation. - /// 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 GetEvaluation(string id, RequestContext context) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.GetEvaluation"); - scope.Start(); - try - { - using HttpMessage message = CreateGetEvaluationRequest(id, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Run the evaluation. - /// Evaluation to run. - /// The cancellation token to use. - /// is null. - public virtual async Task> CreateAsync(Evaluation evaluation, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(evaluation, nameof(evaluation)); - - using RequestContent content = evaluation.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateAsync(content, context).ConfigureAwait(false); - return Response.FromValue(Evaluation.FromResponse(response), response); - } - - /// Run the evaluation. - /// Evaluation to run. - /// The cancellation token to use. - /// is null. - public virtual Response Create(Evaluation evaluation, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(evaluation, nameof(evaluation)); - - using RequestContent content = evaluation.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = Create(content, context); - return Response.FromValue(Evaluation.FromResponse(response), response); - } - - /// - /// [Protocol Method] Run the evaluation. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.Create"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Run the evaluation. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual Response Create(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.Create"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Resource update operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Identifier of the evaluation. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 UpdateAsync(string id, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.Update"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRequest(id, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Resource update operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Identifier of the evaluation. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 Update(string id, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(id, nameof(id)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.Update"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRequest(id, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Resource read operation template. - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> GetScheduleAsync(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetScheduleAsync(name, context).ConfigureAwait(false); - return Response.FromValue(EvaluationSchedule.FromResponse(response), response); - } - - /// Resource read operation template. - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response GetSchedule(string name, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetSchedule(name, context); - return Response.FromValue(EvaluationSchedule.FromResponse(response), response); - } - - /// - /// [Protocol Method] Resource read operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// 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 GetScheduleAsync(string name, RequestContext context) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.GetSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateGetScheduleRequest(name, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Resource read operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// 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 GetSchedule(string name, RequestContext context) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.GetSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateGetScheduleRequest(name, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Create or replace operation template. - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The resource instance. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual async Task> CreateOrReplaceScheduleAsync(string name, EvaluationSchedule resource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(resource, nameof(resource)); - - using RequestContent content = resource.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await CreateOrReplaceScheduleAsync(name, content, context).ConfigureAwait(false); - return Response.FromValue(EvaluationSchedule.FromResponse(response), response); - } - - /// Create or replace operation template. - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The resource instance. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public virtual Response CreateOrReplaceSchedule(string name, EvaluationSchedule resource, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(resource, nameof(resource)); - - using RequestContent content = resource.ToRequestContent(); - RequestContext context = FromCancellationToken(cancellationToken); - Response response = CreateOrReplaceSchedule(name, content, context); - return Response.FromValue(EvaluationSchedule.FromResponse(response), response); - } - - /// - /// [Protocol Method] Create or replace operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateOrReplaceScheduleAsync(string name, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.CreateOrReplaceSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrReplaceScheduleRequest(name, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Create or replace operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// Name of the schedule, which also serves as the unique identifier for the evaluation. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or 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 CreateOrReplaceSchedule(string name, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.CreateOrReplaceSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrReplaceScheduleRequest(name, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Disable the evaluation schedule. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Name of the evaluation schedule. - /// 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 DisableScheduleAsync(string name, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.DisableSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateDisableScheduleRequest(name, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Disable the evaluation schedule. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Name of the evaluation schedule. - /// 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 DisableSchedule(string name, RequestContext context = null) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - using var scope = ClientDiagnostics.CreateScope("EvaluationsClient.DisableSchedule"); - scope.Start(); - try - { - using HttpMessage message = CreateDisableScheduleRequest(name, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// Resource list operation template. - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The cancellation token to use. - public virtual AsyncPageable GetEvaluationsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Evaluation.DeserializeEvaluation(e), ClientDiagnostics, _pipeline, "EvaluationsClient.GetEvaluations", "value", "nextLink", maxpagesize, context); - } - - /// Resource list operation template. - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The cancellation token to use. - public virtual Pageable GetEvaluations(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Evaluation.DeserializeEvaluation(e), ClientDiagnostics, _pipeline, "EvaluationsClient.GetEvaluations", "value", "nextLink", maxpagesize, context); - } - - /// - /// [Protocol Method] Resource list operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - public virtual AsyncPageable GetEvaluationsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EvaluationsClient.GetEvaluations", "value", "nextLink", maxpagesize, context); - } - - /// - /// [Protocol Method] Resource list operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - public virtual Pageable GetEvaluations(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetEvaluationsRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetEvaluationsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EvaluationsClient.GetEvaluations", "value", "nextLink", maxpagesize, context); - } - - /// Resource list operation template. - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The cancellation token to use. - public virtual AsyncPageable GetSchedulesAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchedulesRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchedulesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => EvaluationSchedule.DeserializeEvaluationSchedule(e), ClientDiagnostics, _pipeline, "EvaluationsClient.GetSchedules", "value", "nextLink", maxpagesize, context); - } - - /// Resource list operation template. - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The cancellation token to use. - public virtual Pageable GetSchedules(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) - { - RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchedulesRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchedulesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => EvaluationSchedule.DeserializeEvaluationSchedule(e), ClientDiagnostics, _pipeline, "EvaluationsClient.GetSchedules", "value", "nextLink", maxpagesize, context); - } - - /// - /// [Protocol Method] Resource list operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - public virtual AsyncPageable GetSchedulesAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchedulesRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchedulesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EvaluationsClient.GetSchedules", "value", "nextLink", maxpagesize, context); - } - - /// - /// [Protocol Method] Resource list operation template. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The number of result items to return. - /// The number of result items to skip. - /// The maximum number of result items per page. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - public virtual Pageable GetSchedules(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetSchedulesRequest(maxCount, skip, pageSizeHint, context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetSchedulesNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "EvaluationsClient.GetSchedules", "value", "nextLink", maxpagesize, context); - } - - internal HttpMessage CreateGetEvaluationRequest(string id, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/runs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier201); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/runs:run", false); - uri.AppendQuery("apiVersion", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetEvaluationsRequest(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/runs", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (maxCount != null) - { - uri.AppendQuery("top", maxCount.Value, true); - } - if (skip != null) - { - uri.AppendQuery("skip", skip.Value, true); - } - if (maxpagesize != null) - { - uri.AppendQuery("maxpagesize", maxpagesize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateRequest(string id, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/runs/", false); - uri.AppendPath(id, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/merge-patch+json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetScheduleRequest(string name, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/schedules/", false); - uri.AppendPath(name, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateOrReplaceScheduleRequest(string name, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200201); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/schedules/", 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"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetSchedulesRequest(int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/schedules", false); - uri.AppendQuery("api-version", _apiVersion, true); - if (maxCount != null) - { - uri.AppendQuery("top", maxCount.Value, true); - } - if (skip != null) - { - uri.AppendQuery("skip", skip.Value, true); - } - if (maxpagesize != null) - { - uri.AppendQuery("maxpagesize", maxpagesize.Value, true); - } - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateDisableScheduleRequest(string name, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier204); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/evaluations/schedules/", false); - uri.AppendPath(name, true); - uri.AppendPath("/disable", false); - uri.AppendQuery("apiVersion", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetEvaluationsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetSchedulesNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - private static RequestContext DefaultRequestContext = new RequestContext(); - internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) - { - if (!cancellationToken.CanBeCanceled) - { - return DefaultRequestContext; - } - - return new RequestContext() { CancellationToken = cancellationToken }; - } - - private static ResponseClassifier _responseClassifier200; - private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); - private static ResponseClassifier _responseClassifier201; - private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 }); - private static ResponseClassifier _responseClassifier200201; - private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); - private static ResponseClassifier _responseClassifier204; - private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FieldMapping.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FieldMapping.Serialization.cs new file mode 100644 index 000000000000..61b92b5733f3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FieldMapping.Serialization.cs @@ -0,0 +1,242 @@ +// Copyright (c) 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.Projects +{ + public partial class FieldMapping : 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(FieldMapping)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("contentFields"u8); + writer.WriteStartArray(); + foreach (var item in ContentFields) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(FilepathField)) + { + writer.WritePropertyName("filepathField"u8); + writer.WriteStringValue(FilepathField); + } + if (Optional.IsDefined(TitleField)) + { + writer.WritePropertyName("titleField"u8); + writer.WriteStringValue(TitleField); + } + if (Optional.IsDefined(UrlField)) + { + writer.WritePropertyName("urlField"u8); + writer.WriteStringValue(UrlField); + } + if (Optional.IsCollectionDefined(VectorFields)) + { + writer.WritePropertyName("vectorFields"u8); + writer.WriteStartArray(); + foreach (var item in VectorFields) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(MetadataFields)) + { + writer.WritePropertyName("metadataFields"u8); + writer.WriteStartArray(); + foreach (var item in MetadataFields) + { + 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 + } + } + } + + FieldMapping 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(FieldMapping)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFieldMapping(document.RootElement, options); + } + + internal static FieldMapping DeserializeFieldMapping(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList contentFields = default; + string filepathField = default; + string titleField = default; + string urlField = default; + IList vectorFields = default; + IList metadataFields = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("contentFields"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + contentFields = array; + continue; + } + if (property.NameEquals("filepathField"u8)) + { + filepathField = property.Value.GetString(); + continue; + } + if (property.NameEquals("titleField"u8)) + { + titleField = property.Value.GetString(); + continue; + } + if (property.NameEquals("urlField"u8)) + { + urlField = property.Value.GetString(); + continue; + } + if (property.NameEquals("vectorFields"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vectorFields = array; + continue; + } + if (property.NameEquals("metadataFields"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + metadataFields = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FieldMapping( + contentFields, + filepathField, + titleField, + urlField, + vectorFields ?? new ChangeTrackingList(), + metadataFields ?? 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(FieldMapping)} does not support writing '{options.Format}' format."); + } + } + + FieldMapping 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 DeserializeFieldMapping(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FieldMapping)} 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 FieldMapping FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFieldMapping(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/ai/Azure.AI.Projects/src/Generated/FieldMapping.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FieldMapping.cs new file mode 100644 index 000000000000..d96f7baa2696 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FieldMapping.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 System.Linq; + +namespace Azure.AI.Projects +{ + /// Field mapping configuration class. + public partial class FieldMapping + { + /// + /// 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 fields with text content. + /// is null. + public FieldMapping(IEnumerable contentFields) + { + Argument.AssertNotNull(contentFields, nameof(contentFields)); + + ContentFields = contentFields.ToList(); + VectorFields = new ChangeTrackingList(); + MetadataFields = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of fields with text content. + /// Path of file to be used as a source of text content. + /// Field containing the title of the document. + /// Field containing the url of the document. + /// List of fields with vector content. + /// List of fields with metadata content. + /// Keeps track of any properties unknown to the library. + internal FieldMapping(IList contentFields, string filepathField, string titleField, string urlField, IList vectorFields, IList metadataFields, IDictionary serializedAdditionalRawData) + { + ContentFields = contentFields; + FilepathField = filepathField; + TitleField = titleField; + UrlField = urlField; + VectorFields = vectorFields; + MetadataFields = metadataFields; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FieldMapping() + { + } + + /// List of fields with text content. + public IList ContentFields { get; } + /// Path of file to be used as a source of text content. + public string FilepathField { get; set; } + /// Field containing the title of the document. + public string TitleField { get; set; } + /// Field containing the url of the document. + public string UrlField { get; set; } + /// List of fields with vector content. + public IList VectorFields { get; } + /// List of fields with metadata content. + public IList MetadataFields { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/File.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/File.Serialization.cs deleted file mode 100644 index 84b2ea8f150c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/File.Serialization.cs +++ /dev/null @@ -1,164 +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.Projects -{ - internal partial class File : 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(File)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ContentType)) - { - writer.WritePropertyName("contentType"u8); - writer.WriteStringValue(ContentType); - } - if (Optional.IsDefined(Filename)) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - writer.WritePropertyName("contents"u8); - writer.WriteBase64StringValue(Contents.ToArray(), "D"); - 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 - } - } - } - - File 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(File)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFile(document.RootElement, options); - } - - internal static File DeserializeFile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string contentType = default; - string filename = default; - BinaryData contents = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("contentType"u8)) - { - contentType = property.Value.GetString(); - continue; - } - if (property.NameEquals("filename"u8)) - { - filename = property.Value.GetString(); - continue; - } - if (property.NameEquals("contents"u8)) - { - contents = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new File(contentType, filename, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(File)} does not support writing '{options.Format}' format."); - } - } - - File 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 DeserializeFile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(File)} 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 File FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFile(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/ai/Azure.AI.Projects/src/Generated/File.cs b/sdk/ai/Azure.AI.Projects/src/Generated/File.cs deleted file mode 100644 index 90eb74955fc6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/File.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A file in an HTTP request, response, or multipart payload. - /// - /// Files have a special meaning that the HTTP library understands. When the body of an HTTP request, response, - /// or multipart payload is _effectively_ an instance of `TypeSpec.Http.File` or any type that extends it, the - /// operation is treated as a file upload or download. - /// - /// When using file bodies, the fields of the file model are defined to come from particular locations by default: - /// - /// - `contentType`: The `Content-Type` header of the request, response, or multipart payload (CANNOT be overridden or changed). - /// - `contents`: The body of the request, response, or multipart payload (CANNOT be overridden or changed). - /// - `filename`: The `filename` parameter value of the `Content-Disposition` header of the response or multipart payload - /// (MAY be overridden or changed). - /// - /// A File may be used as a normal structured JSON object in a request or response, if the request specifies an explicit - /// `Content-Type` header. In this case, the entire File model is serialized as if it were any other model. In a JSON payload, - /// it will have a structure like: - /// - /// ``` - /// { - /// "contentType": <string?>, - /// "filename": <string?>, - /// "contents": <string, base64> - /// } - /// ``` - /// - /// The `contentType` _within_ the file defines what media types the data inside the file can be, but if the specification - /// defines a `Content-Type` for the payload as HTTP metadata, that `Content-Type` metadata defines _how the file is - /// serialized_. See the examples below for more information. - /// - /// NOTE: The `filename` and `contentType` fields are optional. Furthermore, the default location of `filename` - /// (`Content-Disposition: <disposition>; filename=<filename>`) is only valid in HTTP responses and multipart payloads. If - /// you wish to send the `filename` in a request, you must use HTTP metadata decorators to describe the location of the - /// `filename` field. You can combine the metadata decorators with `@visibility` to control when the `filename` location - /// is overridden, as shown in the examples below. - /// - internal partial class File - { - /// - /// 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 contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// is null. - public File(BinaryData contents) - { - Argument.AssertNotNull(contents, nameof(contents)); - - Contents = contents; - } - - /// Initializes a new instance of . - /// - /// The allowed media (MIME) types of the file contents. - /// - /// In file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// NOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but - /// it will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the - /// _contents_ of the file, and not necessarily the way the file itself is transmitted or serialized. - /// - /// - /// The name of the file, if any. - /// - /// In file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response - /// or multipart payload. In JSON bodies, this value is serialized as a field in the response. - /// - /// NOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart - /// payloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request, - /// you must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata - /// decorators. - /// - /// - /// The contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// Keeps track of any properties unknown to the library. - internal File(string contentType, string filename, BinaryData contents, IDictionary serializedAdditionalRawData) - { - ContentType = contentType; - Filename = filename; - Contents = contents; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal File() - { - } - - /// - /// The allowed media (MIME) types of the file contents. - /// - /// In file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// NOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but - /// it will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the - /// _contents_ of the file, and not necessarily the way the file itself is transmitted or serialized. - /// - public string ContentType { get; set; } - /// - /// The name of the file, if any. - /// - /// In file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response - /// or multipart payload. In JSON bodies, this value is serialized as a field in the response. - /// - /// NOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart - /// payloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request, - /// you must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata - /// decorators. - /// - public string Filename { get; set; } - /// - /// The contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// To assign a byte[] to this property use . - /// The byte[] will be serialized to a Base64 encoded string. - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) - /// Creates a payload of "AQID". - /// - /// - /// - /// - public BinaryData Contents { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.Serialization.cs new file mode 100644 index 000000000000..2c1e1d12fb2f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class FileDatasetVersion : 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(FileDatasetVersion)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FileDatasetVersion 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(FileDatasetVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileDatasetVersion(document.RootElement, options); + } + + internal static FileDatasetVersion DeserializeFileDatasetVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dataUri = default; + DatasetType type = default; + bool? isReference = default; + string connectionName = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataUri"u8)) + { + dataUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DatasetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReference = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FileDatasetVersion( + dataUri, + type, + isReference, + connectionName, + id, + name, + version, + description, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(FileDatasetVersion)} does not support writing '{options.Format}' format."); + } + } + + FileDatasetVersion 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 DeserializeFileDatasetVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileDatasetVersion)} 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 new FileDatasetVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFileDatasetVersion(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.cs new file mode 100644 index 000000000000..b71b168e600b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FileDatasetVersion.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// FileDatasetVersion Definition. + public partial class FileDatasetVersion : DatasetVersion + { + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// is null. + public FileDatasetVersion(string dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + Type = DatasetType.UriFile; + } + + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Dataset type. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal FileDatasetVersion(string dataUri, DatasetType type, bool? isReference, string connectionName, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) : base(dataUri, type, isReference, connectionName, id, name, version, description, tags, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal FileDatasetVersion() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs deleted file mode 100644 index c7f638392544..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class FileSearchRankingOptions : 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(FileSearchRankingOptions)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("ranker"u8); - writer.WriteStringValue(Ranker); - writer.WritePropertyName("score_threshold"u8); - writer.WriteNumberValue(ScoreThreshold); - 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 - } - } - } - - FileSearchRankingOptions 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(FileSearchRankingOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFileSearchRankingOptions(document.RootElement, options); - } - - internal static FileSearchRankingOptions DeserializeFileSearchRankingOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string ranker = default; - float scoreThreshold = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ranker"u8)) - { - ranker = property.Value.GetString(); - continue; - } - if (property.NameEquals("score_threshold"u8)) - { - scoreThreshold = property.Value.GetSingle(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchRankingOptions(ranker, scoreThreshold, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FileSearchRankingOptions)} does not support writing '{options.Format}' format."); - } - } - - FileSearchRankingOptions 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 DeserializeFileSearchRankingOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FileSearchRankingOptions)} 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 FileSearchRankingOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFileSearchRankingOptions(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/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs deleted file mode 100644 index ca7922f55151..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs +++ /dev/null @@ -1,81 +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.Projects -{ - /// Ranking options for file search. - public partial class FileSearchRankingOptions - { - /// - /// 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 . - /// File search ranker. - /// Ranker search threshold. - /// is null. - public FileSearchRankingOptions(string ranker, float scoreThreshold) - { - Argument.AssertNotNull(ranker, nameof(ranker)); - - Ranker = ranker; - ScoreThreshold = scoreThreshold; - } - - /// Initializes a new instance of . - /// File search ranker. - /// Ranker search threshold. - /// Keeps track of any properties unknown to the library. - internal FileSearchRankingOptions(string ranker, float scoreThreshold, IDictionary serializedAdditionalRawData) - { - Ranker = ranker; - ScoreThreshold = scoreThreshold; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal FileSearchRankingOptions() - { - } - - /// File search ranker. - public string Ranker { get; set; } - /// Ranker search threshold. - public float ScoreThreshold { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs deleted file mode 100644 index ef5f0fc4ea59..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class FileSearchToolCallContent : 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(FileSearchToolCallContent)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - 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 - } - } - } - - FileSearchToolCallContent 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(FileSearchToolCallContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFileSearchToolCallContent(document.RootElement, options); - } - - internal static FileSearchToolCallContent DeserializeFileSearchToolCallContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FileSearchToolCallContentType type = default; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new FileSearchToolCallContentType(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 FileSearchToolCallContent(type, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FileSearchToolCallContent)} does not support writing '{options.Format}' format."); - } - } - - FileSearchToolCallContent 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 DeserializeFileSearchToolCallContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FileSearchToolCallContent)} 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 FileSearchToolCallContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFileSearchToolCallContent(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/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs deleted file mode 100644 index 657101f969fe..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The file search result content object. - public partial class FileSearchToolCallContent - { - /// - /// 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 text content of the file. - /// is null. - internal FileSearchToolCallContent(string text) - { - Argument.AssertNotNull(text, nameof(text)); - - Text = text; - } - - /// Initializes a new instance of . - /// The type of the content. - /// The text content of the file. - /// Keeps track of any properties unknown to the library. - internal FileSearchToolCallContent(FileSearchToolCallContentType type, string text, IDictionary serializedAdditionalRawData) - { - Type = type; - Text = text; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal FileSearchToolCallContent() - { - } - - /// The type of the content. - public FileSearchToolCallContentType Type { get; } = FileSearchToolCallContentType.Text; - - /// The text content of the file. - public string Text { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs deleted file mode 100644 index 177f40ed440f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The FileSearchToolCallContent_type. - public readonly partial struct FileSearchToolCallContentType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FileSearchToolCallContentType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TextValue = "text"; - - /// text. - public static FileSearchToolCallContentType Text { get; } = new FileSearchToolCallContentType(TextValue); - /// Determines if two values are the same. - public static bool operator ==(FileSearchToolCallContentType left, FileSearchToolCallContentType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FileSearchToolCallContentType left, FileSearchToolCallContentType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator FileSearchToolCallContentType(string value) => new FileSearchToolCallContentType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FileSearchToolCallContentType other && Equals(other); - /// - public bool Equals(FileSearchToolCallContentType 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.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs deleted file mode 100644 index 7848398bb734..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class FileSearchToolDefinition : 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(FileSearchToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - } - - FileSearchToolDefinition 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(FileSearchToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFileSearchToolDefinition(document.RootElement, options); - } - - internal static FileSearchToolDefinition DeserializeFileSearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FileSearchToolDefinitionDetails fileSearch = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSearch = FileSearchToolDefinitionDetails.DeserializeFileSearchToolDefinitionDetails(property.Value, options); - 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 FileSearchToolDefinition(type, serializedAdditionalRawData, fileSearch); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FileSearchToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - FileSearchToolDefinition 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 DeserializeFileSearchToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FileSearchToolDefinition)} 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 new FileSearchToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFileSearchToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs deleted file mode 100644 index 1a1015fb4e16..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs +++ /dev/null @@ -1,34 +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.Projects -{ - /// The input definition information for a file search tool as used to configure an agent. - public partial class FileSearchToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - public FileSearchToolDefinition() - { - Type = "file_search"; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// Options overrides for the file search tool. - internal FileSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, FileSearchToolDefinitionDetails fileSearch) : base(type, serializedAdditionalRawData) - { - FileSearch = fileSearch; - } - - /// Options overrides for the file search tool. - public FileSearchToolDefinitionDetails FileSearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs deleted file mode 100644 index 88abc77cb4da..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs +++ /dev/null @@ -1,164 +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.Projects -{ - public partial class FileSearchToolDefinitionDetails : 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(FileSearchToolDefinitionDetails)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(MaxNumResults)) - { - writer.WritePropertyName("max_num_results"u8); - writer.WriteNumberValue(MaxNumResults.Value); - } - if (Optional.IsDefined(RankingOptions)) - { - writer.WritePropertyName("ranking_options"u8); - writer.WriteObjectValue(RankingOptions, 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 - } - } - } - - FileSearchToolDefinitionDetails 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(FileSearchToolDefinitionDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFileSearchToolDefinitionDetails(document.RootElement, options); - } - - internal static FileSearchToolDefinitionDetails DeserializeFileSearchToolDefinitionDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int? maxNumResults = default; - FileSearchRankingOptions rankingOptions = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("max_num_results"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - maxNumResults = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("ranking_options"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchToolDefinitionDetails(maxNumResults, rankingOptions, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FileSearchToolDefinitionDetails)} does not support writing '{options.Format}' format."); - } - } - - FileSearchToolDefinitionDetails 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 DeserializeFileSearchToolDefinitionDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FileSearchToolDefinitionDetails)} 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 FileSearchToolDefinitionDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFileSearchToolDefinitionDetails(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/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs deleted file mode 100644 index a2445583f91c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.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.AI.Projects -{ - /// Options overrides for the file search tool. - public partial class FileSearchToolDefinitionDetails - { - /// - /// 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 FileSearchToolDefinitionDetails() - { - } - - /// Initializes a new instance of . - /// - /// The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. - /// - /// Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. - /// - /// Ranking options for file search. - /// Keeps track of any properties unknown to the library. - internal FileSearchToolDefinitionDetails(int? maxNumResults, FileSearchRankingOptions rankingOptions, IDictionary serializedAdditionalRawData) - { - MaxNumResults = maxNumResults; - RankingOptions = rankingOptions; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive. - /// - /// Note that the file search tool may output fewer than `max_num_results` results. See the file search tool documentation for more information. - /// - public int? MaxNumResults { get; set; } - /// Ranking options for file search. - public FileSearchRankingOptions RankingOptions { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs deleted file mode 100644 index e1e8d6e5aa33..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class FileSearchToolResource : 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(FileSearchToolResource)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(VectorStoreIds)) - { - writer.WritePropertyName("vector_store_ids"u8); - writer.WriteStartArray(); - foreach (var item in VectorStoreIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(VectorStores)) - { - writer.WritePropertyName("vector_stores"u8); - writer.WriteStartArray(); - foreach (var item in VectorStores) - { - 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 - } - } - } - - FileSearchToolResource 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(FileSearchToolResource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFileSearchToolResource(document.RootElement, options); - } - - internal static FileSearchToolResource DeserializeFileSearchToolResource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList vectorStoreIds = default; - IList vectorStores = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vector_store_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vectorStoreIds = array; - continue; - } - if (property.NameEquals("vector_stores"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStoreConfigurations.DeserializeVectorStoreConfigurations(item, options)); - } - vectorStores = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FileSearchToolResource(vectorStoreIds ?? new ChangeTrackingList(), vectorStores ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FileSearchToolResource)} does not support writing '{options.Format}' format."); - } - } - - FileSearchToolResource 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 DeserializeFileSearchToolResource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FileSearchToolResource)} 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 FileSearchToolResource FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFileSearchToolResource(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/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs deleted file mode 100644 index 9dc2301d67ea..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.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.AI.Projects -{ - /// A set of resources that are used by the `file_search` tool. - public partial class FileSearchToolResource - { - /// - /// 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 FileSearchToolResource() - { - VectorStoreIds = new ChangeTrackingList(); - VectorStores = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// The ID of the vector store attached to this agent. There can be a maximum of 1 vector - /// store attached to the agent. - /// - /// - /// The list of vector store configuration objects from Azure. - /// This list is limited to one element. - /// The only element of this list contains the list of azure asset IDs used by the search tool. - /// - /// Keeps track of any properties unknown to the library. - internal FileSearchToolResource(IList vectorStoreIds, IList vectorStores, IDictionary serializedAdditionalRawData) - { - VectorStoreIds = vectorStoreIds; - VectorStores = vectorStores; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The ID of the vector store attached to this agent. There can be a maximum of 1 vector - /// store attached to the agent. - /// - public IList VectorStoreIds { get; } - /// - /// The list of vector store configuration objects from Azure. - /// This list is limited to one element. - /// The only element of this list contains the list of azure asset IDs used by the search tool. - /// - public IList VectorStores { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs deleted file mode 100644 index 7b3b0dcba332..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The state of the file. - public readonly partial struct FileState : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public FileState(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UploadedValue = "uploaded"; - private const string PendingValue = "pending"; - private const string RunningValue = "running"; - private const string ProcessedValue = "processed"; - private const string ErrorValue = "error"; - private const string DeletingValue = "deleting"; - private const string DeletedValue = "deleted"; - - /// - /// The file has been uploaded but it's not yet processed. This state is not returned by Azure OpenAI and exposed only for - /// compatibility. It can be categorized as an inactive state. - /// - public static FileState Uploaded { get; } = new FileState(UploadedValue); - /// The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state. - public static FileState Pending { get; } = new FileState(PendingValue); - /// The operation has started to be processed. It can be categorized as an active state. - public static FileState Running { get; } = new FileState(RunningValue); - /// The operation has successfully processed and is ready for consumption. It can be categorized as a terminal state. - public static FileState Processed { get; } = new FileState(ProcessedValue); - /// The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state. - public static FileState Error { get; } = new FileState(ErrorValue); - /// - /// The entity is in the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility. - /// It can be categorized as an active state. - /// - public static FileState Deleting { get; } = new FileState(DeletingValue); - /// - /// The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a - /// terminal state. - /// - public static FileState Deleted { get; } = new FileState(DeletedValue); - /// Determines if two values are the same. - public static bool operator ==(FileState left, FileState right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(FileState left, FileState right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator FileState(string value) => new FileState(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is FileState other && Equals(other); - /// - public bool Equals(FileState 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.Projects/src/Generated/FolderDatasetVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDatasetVersion.Serialization.cs new file mode 100644 index 000000000000..3aebab7381f7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDatasetVersion.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class FolderDatasetVersion : 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(FolderDatasetVersion)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FolderDatasetVersion 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(FolderDatasetVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFolderDatasetVersion(document.RootElement, options); + } + + internal static FolderDatasetVersion DeserializeFolderDatasetVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dataUri = default; + DatasetType type = default; + bool? isReference = default; + string connectionName = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataUri"u8)) + { + dataUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DatasetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReference = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FolderDatasetVersion( + dataUri, + type, + isReference, + connectionName, + id, + name, + version, + description, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(FolderDatasetVersion)} does not support writing '{options.Format}' format."); + } + } + + FolderDatasetVersion 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 DeserializeFolderDatasetVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FolderDatasetVersion)} 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 new FolderDatasetVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeFolderDatasetVersion(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FolderDatasetVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDatasetVersion.cs new file mode 100644 index 000000000000..11102394c72c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/FolderDatasetVersion.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// FileDatasetVersion Definition. + public partial class FolderDatasetVersion : DatasetVersion + { + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// is null. + public FolderDatasetVersion(string dataUri) : base(dataUri) + { + Argument.AssertNotNull(dataUri, nameof(dataUri)); + + Type = DatasetType.UriFolder; + } + + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Dataset type. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal FolderDatasetVersion(string dataUri, DatasetType type, bool? isReference, string connectionName, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) : base(dataUri, type, isReference, connectionName, id, name, version, description, tags, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal FolderDatasetVersion() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Frequency.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Frequency.cs deleted file mode 100644 index 8482e6c67836..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Frequency.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Frequency of the schedule - day, week, month, hour, minute. - public readonly partial struct Frequency : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public Frequency(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MonthValue = "Month"; - private const string WeekValue = "Week"; - private const string DayValue = "Day"; - private const string HourValue = "Hour"; - private const string MinuteValue = "Minute"; - - /// Month. - public static Frequency Month { get; } = new Frequency(MonthValue); - /// Week. - public static Frequency Week { get; } = new Frequency(WeekValue); - /// Day. - public static Frequency Day { get; } = new Frequency(DayValue); - /// Hour. - public static Frequency Hour { get; } = new Frequency(HourValue); - /// Minute. - public static Frequency Minute { get; } = new Frequency(MinuteValue); - /// Determines if two values are the same. - public static bool operator ==(Frequency left, Frequency right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Frequency left, Frequency right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator Frequency(string value) => new Frequency(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Frequency other && Equals(other); - /// - public bool Equals(Frequency 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.Projects/src/Generated/FunctionName.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs deleted file mode 100644 index 8679f1ce8baa..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class FunctionName : 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(FunctionName)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - FunctionName 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(FunctionName)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFunctionName(document.RootElement, options); - } - - internal static FunctionName DeserializeFunctionName(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = 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 (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new FunctionName(name, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FunctionName)} does not support writing '{options.Format}' format."); - } - } - - FunctionName 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 DeserializeFunctionName(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FunctionName)} 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 FunctionName FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFunctionName(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/ai/Azure.AI.Projects/src/Generated/FunctionName.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs deleted file mode 100644 index f0388befdeda..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.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; - -namespace Azure.AI.Projects -{ - /// The function name that will be used, if using the `function` tool. - public partial class FunctionName - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the function to call. - /// is null. - public FunctionName(string name) - { - Argument.AssertNotNull(name, nameof(name)); - - Name = name; - } - - /// Initializes a new instance of . - /// The name of the function to call. - /// Keeps track of any properties unknown to the library. - internal FunctionName(string name, IDictionary serializedAdditionalRawData) - { - Name = name; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal FunctionName() - { - } - - /// The name of the function to call. - public string Name { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs deleted file mode 100644 index f942730b72b4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class FunctionToolDefinition : 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(FunctionToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalFunction, options); - } - - FunctionToolDefinition 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(FunctionToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFunctionToolDefinition(document.RootElement, options); - } - - internal static FunctionToolDefinition DeserializeFunctionToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalFunctionDefinition function = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(property.Value, options); - 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 FunctionToolDefinition(type, serializedAdditionalRawData, function); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(FunctionToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - FunctionToolDefinition 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 DeserializeFunctionToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(FunctionToolDefinition)} 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 new FunctionToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFunctionToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs deleted file mode 100644 index f87f3594f991..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// The input definition information for a function tool as used to configure an agent. - public partial class FunctionToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The definition of the concrete function that the function tool should call. - internal FunctionToolDefinition(string type, IDictionary serializedAdditionalRawData, InternalFunctionDefinition internalFunction) : base(type, serializedAdditionalRawData) - { - InternalFunction = internalFunction; - } - - /// Initializes a new instance of for deserialization. - internal FunctionToolDefinition() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.Serialization.cs deleted file mode 100644 index 276e6326583b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.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.Projects -{ - internal partial class GetAppInsightsResponse : 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(GetAppInsightsResponse)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - 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 - } - } - } - - GetAppInsightsResponse 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(GetAppInsightsResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGetAppInsightsResponse(document.RootElement, options); - } - - internal static GetAppInsightsResponse DeserializeGetAppInsightsResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string name = default; - AppInsightsProperties properties = 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("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - properties = AppInsightsProperties.DeserializeAppInsightsProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new GetAppInsightsResponse(id, name, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(GetAppInsightsResponse)} does not support writing '{options.Format}' format."); - } - } - - GetAppInsightsResponse 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 DeserializeGetAppInsightsResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(GetAppInsightsResponse)} 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 GetAppInsightsResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeGetAppInsightsResponse(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/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.cs deleted file mode 100644 index 2eeb98151a61..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetAppInsightsResponse.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.Projects -{ - /// Response from getting properties of the Application Insights resource. - internal partial class GetAppInsightsResponse - { - /// - /// 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 unique identifier for the resource. - /// The name of the resource. - /// The properties of the resource. - /// , or is null. - internal GetAppInsightsResponse(string id, string name, AppInsightsProperties properties) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Id = id; - Name = name; - Properties = properties; - } - - /// Initializes a new instance of . - /// A unique identifier for the resource. - /// The name of the resource. - /// The properties of the resource. - /// Keeps track of any properties unknown to the library. - internal GetAppInsightsResponse(string id, string name, AppInsightsProperties properties, IDictionary serializedAdditionalRawData) - { - Id = id; - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetAppInsightsResponse() - { - } - - /// A unique identifier for the resource. - public string Id { get; } - /// The name of the resource. - public string Name { get; } - /// The properties of the resource. - public AppInsightsProperties Properties { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.Serialization.cs deleted file mode 100644 index bf3e708a01be..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - internal partial class GetConnectionWithSecretsRequest : 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(GetConnectionWithSecretsRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("ignored"u8); - writer.WriteStringValue(Ignored); - 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 - } - } - } - - GetConnectionWithSecretsRequest 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(GetConnectionWithSecretsRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGetConnectionWithSecretsRequest(document.RootElement, options); - } - - internal static GetConnectionWithSecretsRequest DeserializeGetConnectionWithSecretsRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string ignored = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ignored"u8)) - { - ignored = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new GetConnectionWithSecretsRequest(ignored, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(GetConnectionWithSecretsRequest)} does not support writing '{options.Format}' format."); - } - } - - GetConnectionWithSecretsRequest 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 DeserializeGetConnectionWithSecretsRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(GetConnectionWithSecretsRequest)} 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 GetConnectionWithSecretsRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeGetConnectionWithSecretsRequest(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/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.cs deleted file mode 100644 index 24c528083985..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetConnectionWithSecretsRequest.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; - -namespace Azure.AI.Projects -{ - /// The GetConnectionWithSecretsRequest. - internal partial class GetConnectionWithSecretsRequest - { - /// - /// 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 body is ignored. TODO: Can we remove this?. - /// is null. - internal GetConnectionWithSecretsRequest(string ignored) - { - Argument.AssertNotNull(ignored, nameof(ignored)); - - Ignored = ignored; - } - - /// Initializes a new instance of . - /// The body is ignored. TODO: Can we remove this?. - /// Keeps track of any properties unknown to the library. - internal GetConnectionWithSecretsRequest(string ignored, IDictionary serializedAdditionalRawData) - { - Ignored = ignored; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetConnectionWithSecretsRequest() - { - } - - /// The body is ignored. TODO: Can we remove this?. - public string Ignored { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.Serialization.cs deleted file mode 100644 index c3ade2bf8c57..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.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.Projects -{ - public partial class GetWorkspaceResponse : 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(GetWorkspaceResponse)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - 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 - } - } - } - - GetWorkspaceResponse 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(GetWorkspaceResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeGetWorkspaceResponse(document.RootElement, options); - } - - internal static GetWorkspaceResponse DeserializeGetWorkspaceResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string name = default; - WorkspaceProperties properties = 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("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("properties"u8)) - { - properties = WorkspaceProperties.DeserializeWorkspaceProperties(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new GetWorkspaceResponse(id, name, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(GetWorkspaceResponse)} does not support writing '{options.Format}' format."); - } - } - - GetWorkspaceResponse 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 DeserializeGetWorkspaceResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(GetWorkspaceResponse)} 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 GetWorkspaceResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeGetWorkspaceResponse(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/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.cs deleted file mode 100644 index 856f903c20c9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/GetWorkspaceResponse.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.Projects -{ - /// Response from the Workspace - Get operation. - public partial class GetWorkspaceResponse - { - /// - /// 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 unique identifier for the resource. - /// The name of the resource. - /// The properties of the resource. - /// , or is null. - internal GetWorkspaceResponse(string id, string name, WorkspaceProperties properties) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(properties, nameof(properties)); - - Id = id; - Name = name; - Properties = properties; - } - - /// Initializes a new instance of . - /// A unique identifier for the resource. - /// The name of the resource. - /// The properties of the resource. - /// Keeps track of any properties unknown to the library. - internal GetWorkspaceResponse(string id, string name, WorkspaceProperties properties, IDictionary serializedAdditionalRawData) - { - Id = id; - Name = name; - Properties = properties; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal GetWorkspaceResponse() - { - } - - /// A unique identifier for the resource. - public string Id { get; } - /// The name of the resource. - public string Name { get; } - /// The properties of the resource. - public WorkspaceProperties Properties { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ImageDetailLevel.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ImageDetailLevel.cs deleted file mode 100644 index 96fd8c43e7de..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ImageDetailLevel.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Specifies an image's detail level. Can be 'auto', 'low', 'high', or an unknown future value. - public readonly partial struct ImageDetailLevel : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ImageDetailLevel(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutoValue = "auto"; - private const string LowValue = "low"; - private const string HighValue = "high"; - - /// Automatically select an appropriate detail level. - public static ImageDetailLevel Auto { get; } = new ImageDetailLevel(AutoValue); - /// Use a lower detail level to reduce bandwidth or cost. - public static ImageDetailLevel Low { get; } = new ImageDetailLevel(LowValue); - /// Use a higher detail level—potentially more resource-intensive. - public static ImageDetailLevel High { get; } = new ImageDetailLevel(HighValue); - /// Determines if two values are the same. - public static bool operator ==(ImageDetailLevel left, ImageDetailLevel right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ImageDetailLevel left, ImageDetailLevel right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ImageDetailLevel(string value) => new ImageDetailLevel(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ImageDetailLevel other && Equals(other); - /// - public bool Equals(ImageDetailLevel 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.Projects/src/Generated/IncompleteDetailsReason.cs b/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs deleted file mode 100644 index 517961f355be..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.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.AI.Projects -{ - /// The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. - public readonly partial struct IncompleteDetailsReason : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public IncompleteDetailsReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MaxCompletionTokensValue = "max_completion_tokens"; - private const string MaxPromptTokensValue = "max_prompt_tokens"; - - /// Maximum completion tokens exceeded. - public static IncompleteDetailsReason MaxCompletionTokens { get; } = new IncompleteDetailsReason(MaxCompletionTokensValue); - /// Maximum prompt tokens exceeded. - public static IncompleteDetailsReason MaxPromptTokens { get; } = new IncompleteDetailsReason(MaxPromptTokensValue); - /// Determines if two values are the same. - public static bool operator ==(IncompleteDetailsReason left, IncompleteDetailsReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(IncompleteDetailsReason left, IncompleteDetailsReason right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator IncompleteDetailsReason(string value) => new IncompleteDetailsReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is IncompleteDetailsReason other && Equals(other); - /// - public bool Equals(IncompleteDetailsReason 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.Projects/src/Generated/IncompleteRunDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs deleted file mode 100644 index 74cf6371ce62..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class IncompleteRunDetails : 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(IncompleteRunDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.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 - } - } - } - - IncompleteRunDetails 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(IncompleteRunDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeIncompleteRunDetails(document.RootElement, options); - } - - internal static IncompleteRunDetails DeserializeIncompleteRunDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IncompleteDetailsReason reason = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("reason"u8)) - { - reason = new IncompleteDetailsReason(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new IncompleteRunDetails(reason, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(IncompleteRunDetails)} does not support writing '{options.Format}' format."); - } - } - - IncompleteRunDetails 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 DeserializeIncompleteRunDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(IncompleteRunDetails)} 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 IncompleteRunDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeIncompleteRunDetails(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/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs deleted file mode 100644 index 786489fd3369..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.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.Projects -{ - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. - public partial class IncompleteRunDetails - { - /// - /// 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 reason why the run is incomplete. This indicates which specific token limit was reached during the run. - internal IncompleteRunDetails(IncompleteDetailsReason reason) - { - Reason = reason; - } - - /// Initializes a new instance of . - /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run. - /// Keeps track of any properties unknown to the library. - internal IncompleteRunDetails(IncompleteDetailsReason reason, IDictionary serializedAdditionalRawData) - { - Reason = reason; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal IncompleteRunDetails() - { - } - - /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run. - public IncompleteDetailsReason Reason { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Index.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Index.Serialization.cs new file mode 100644 index 000000000000..8b847e79dd40 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Index.Serialization.cs @@ -0,0 +1,166 @@ +// 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.AI.Projects +{ + [PersistableModelProxy(typeof(UnknownIndex))] + public partial class Index : 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(Index)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + Index 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(Index)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIndex(document.RootElement, options); + } + + internal static Index DeserializeIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureSearch": return AzureAISearchIndex.DeserializeAzureAISearchIndex(element, options); + case "CosmosDBNoSqlVectorStore": return CosmosDBIndex.DeserializeCosmosDBIndex(element, options); + case "ManagedAzureSearch": return ManagedAzureAISearchIndex.DeserializeManagedAzureAISearchIndex(element, options); + } + } + return UnknownIndex.DeserializeUnknownIndex(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Index)} does not support writing '{options.Format}' format."); + } + } + + Index 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 DeserializeIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Index)} 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 Index FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeIndex(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/ai/Azure.AI.Projects/src/Generated/Index.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Index.cs new file mode 100644 index 000000000000..7724765d65ad --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Index.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.AI.Projects +{ + /// + /// Index resource Definition + /// 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 abstract partial class Index + { + /// + /// 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 Index() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal Index(IndexType type, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) + { + Type = type; + Id = id; + Name = name; + Version = version; + Description = description; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of index. + internal IndexType Type { get; set; } + /// Asset ID, a unique identifier for the asset. + public string Id { get; } + /// The name of the resource. + public string Name { get; } + /// The version of the resource. + public string Version { get; } + /// The asset description text. + public string Description { get; set; } + /// Tag dictionary. Tags can be added, removed, and updated. + public IDictionary Tags { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IndexType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/IndexType.cs new file mode 100644 index 000000000000..ccd901ba0b11 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/IndexType.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.AI.Projects +{ + /// The IndexType. + internal readonly partial struct IndexType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IndexType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureSearchValue = "AzureSearch"; + private const string CosmosDBValue = "CosmosDBNoSqlVectorStore"; + private const string ManagedAzureSearchValue = "ManagedAzureSearch"; + + /// Azure search. + public static IndexType AzureSearch { get; } = new IndexType(AzureSearchValue); + /// CosmosDB. + public static IndexType CosmosDB { get; } = new IndexType(CosmosDBValue); + /// Managed Azure Search. + public static IndexType ManagedAzureSearch { get; } = new IndexType(ManagedAzureSearchValue); + /// Determines if two values are the same. + public static bool operator ==(IndexType left, IndexType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IndexType left, IndexType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IndexType(string value) => new IndexType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IndexType other && Equals(other); + /// + public bool Equals(IndexType 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.Projects/src/Generated/Indexes.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Indexes.cs new file mode 100644 index 000000000000..476c41d10d74 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Indexes.cs @@ -0,0 +1,625 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The Indexes sub-client. + public partial class Indexes + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 Indexes for mocking. + protected Indexes() + { + } + + /// Initializes a new instance of Indexes. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal Indexes(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get the specific version of the Index. + /// The name of the resource. + /// The specific version id of the Index to retrieve. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetIndexAsync(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetIndexAsync(name, version, context).ConfigureAwait(false); + return Response.FromValue(Index.FromResponse(response), response); + } + + /// Get the specific version of the Index. + /// The name of the resource. + /// The specific version id of the Index to retrieve. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// + public virtual Response GetIndex(string name, string version, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetIndex(name, version, context); + return Response.FromValue(Index.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get the specific version of the Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the Index to retrieve. + /// 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 GetIndexAsync(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.GetIndex"); + scope.Start(); + try + { + using HttpMessage message = CreateGetIndexRequest(name, version, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get the specific version of the Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the Index to retrieve. + /// 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 GetIndex(string name, string version, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.GetIndex"); + scope.Start(); + try + { + using HttpMessage message = CreateGetIndexRequest(name, version, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete the specific version of the Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The version of the Index to delete. + /// 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 DeleteAsync(string name, string version, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, version, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Delete the specific version of the Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The version of the Index to delete. + /// 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 Delete(string name, string version, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.Delete"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteRequest(name, version, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new or update an existing Index with the given version id + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the Index to create or replace. + /// The content to send as the body of the request. + /// 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 CreateOrUpdateAsync(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(name, version, content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Create a new or update an existing Index with the given version id + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The name of the resource. + /// The specific version id of the Index to create or replace. + /// The content to send as the body of the request. + /// 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 CreateOrUpdate(string name, string version, RequestContent content, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("Indexes.CreateOrUpdate"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateRequest(name, version, content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List all versions of the given Index. + /// The name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual AsyncPageable GetVersionsAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Index.DeserializeIndex(e), ClientDiagnostics, _pipeline, "Indexes.GetVersions", "value", "nextLink", context); + } + + /// List all versions of the given Index. + /// The name of the resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Pageable GetVersions(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Index.DeserializeIndex(e), ClientDiagnostics, _pipeline, "Indexes.GetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all versions of the given Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetVersionsAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Indexes.GetVersions", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List all versions of the given Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The name of the resource. + /// 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 from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetVersions(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetVersionsRequest(name, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetVersionsNextPageRequest(nextLink, name, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Indexes.GetVersions", "value", "nextLink", context); + } + + /// List the latest version of each Index. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetIndicesAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetIndicesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetIndicesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => Index.DeserializeIndex(e), ClientDiagnostics, _pipeline, "Indexes.GetIndices", "value", "nextLink", context); + } + + /// List the latest version of each Index. + /// The cancellation token to use. + /// + public virtual Pageable GetIndices(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetIndicesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetIndicesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => Index.DeserializeIndex(e), ClientDiagnostics, _pipeline, "Indexes.GetIndices", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List the latest version of each Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetIndicesAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetIndicesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetIndicesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Indexes.GetIndices", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List the latest version of each Index + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetIndices(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetIndicesRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetIndicesNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "Indexes.GetIndices", "value", "nextLink", context); + } + + internal HttpMessage CreateGetVersionsRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetIndicesRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetIndexRequest(string name, string version, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateDeleteRequest(string name, string version, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string name, string version, RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/indexes/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetVersionsNextPageRequest(string nextLink, string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + internal HttpMessage CreateGetIndicesNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InputData.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InputData.Serialization.cs index cb3327d29e79..b552950e0e96 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InputData.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/InputData.Serialization.cs @@ -77,8 +77,7 @@ internal static InputData DeserializeInputData(JsonElement element, ModelReaderW { switch (discriminator.GetString()) { - case "app_insights": return ApplicationInsightsConfiguration.DeserializeApplicationInsightsConfiguration(element, options); - case "dataset": return Dataset.DeserializeDataset(element, options); + case "dataset": return InputDataset.DeserializeInputDataset(element, options); } } return UnknownInputData.DeserializeUnknownInputData(element, options); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InputData.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InputData.cs index 0e7e1c295373..f709fb641cd9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InputData.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/InputData.cs @@ -11,9 +11,9 @@ namespace Azure.AI.Projects { /// - /// Abstract data class for input data configuration. + /// Abstract data class. /// 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 . /// public abstract partial class InputData { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.Serialization.cs new file mode 100644 index 000000000000..ad49f7ef12cc --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.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.AI.Projects +{ + public partial class InputDataset : 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(InputDataset)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + + InputDataset 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(InputDataset)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInputDataset(document.RootElement, options); + } + + internal static InputDataset DeserializeInputDataset(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string type = 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("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InputDataset(type, serializedAdditionalRawData, id); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(InputDataset)} does not support writing '{options.Format}' format."); + } + } + + InputDataset 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 DeserializeInputDataset(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InputDataset)} 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 new InputDataset FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInputDataset(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.cs new file mode 100644 index 000000000000..888e5f375fa5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/InputDataset.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dataset as source for evaluation. + public partial class InputDataset : InputData + { + /// Initializes a new instance of . + /// Evaluation input data. + /// is null. + public InputDataset(string id) + { + Argument.AssertNotNull(id, nameof(id)); + + Type = "dataset"; + Id = id; + } + + /// Initializes a new instance of . + /// Type of the data. + /// Keeps track of any properties unknown to the library. + /// Evaluation input data. + internal InputDataset(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData) + { + Id = id; + } + + /// Initializes a new instance of for deserialization. + internal InputDataset() + { + } + + /// Evaluation input data. + public string Id { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Internal/MultipartFormDataRequestContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Internal/MultipartFormDataRequestContent.cs deleted file mode 100644 index cf86085604bd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Internal/MultipartFormDataRequestContent.cs +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Globalization; -using System.IO; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.Pipeline; - -namespace Azure.AI.Projects -{ - internal class MultipartFormDataRequestContent : RequestContent - { - private readonly System.Net.Http.MultipartFormDataContent _multipartContent; - private static readonly Random _random = new Random(); - private static readonly char[] _boundaryValues = "0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".ToCharArray(); - - public MultipartFormDataRequestContent() - { - _multipartContent = new System.Net.Http.MultipartFormDataContent(CreateBoundary()); - } - - public string ContentType - { - get - { - return _multipartContent.Headers.ContentType.ToString(); - } - } - - internal HttpContent HttpContent => _multipartContent; - - private static string CreateBoundary() - { - Span chars = new char[70]; - byte[] random = new byte[70]; - _random.NextBytes(random); - int mask = 255 >> 2; - for (int i = 0; i < 70; i++) - { - chars[i] = _boundaryValues[random[i] & mask]; - } - return chars.ToString(); - } - - public void Add(string content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StringContent(content), name, filename, contentType); - } - - public void Add(int content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(long content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(float content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(double content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(decimal content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content.ToString("G", CultureInfo.InvariantCulture); - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(bool content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - string value = content ? "true" : "false"; - Add(new StringContent(value), name, filename, contentType); - } - - public void Add(Stream content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new StreamContent(content), name, filename, contentType); - } - - public void Add(byte[] content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content), name, filename, contentType); - } - - public void Add(BinaryData content, string name, string filename = null, string contentType = null) - { - Argument.AssertNotNull(content, nameof(content)); - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - Add(new ByteArrayContent(content.ToArray()), name, filename, contentType); - } - - private void Add(HttpContent content, string name, string filename, string contentType) - { - if (filename != null) - { - Argument.AssertNotNullOrEmpty(filename, nameof(filename)); - AddFilenameHeader(content, name, filename); - } - if (contentType != null) - { - Argument.AssertNotNullOrEmpty(contentType, nameof(contentType)); - AddContentTypeHeader(content, contentType); - } - _multipartContent.Add(content, name); - } - - public static void AddFilenameHeader(HttpContent content, string name, string filename) - { - ContentDispositionHeaderValue header = new ContentDispositionHeaderValue("form-data") { Name = name, FileName = filename }; - content.Headers.ContentDisposition = header; - } - - public static void AddContentTypeHeader(HttpContent content, string contentType) - { - MediaTypeHeaderValue header = new MediaTypeHeaderValue(contentType); - content.Headers.ContentType = header; - } - - public override bool TryComputeLength(out long length) - { - if (_multipartContent.Headers.ContentLength is long contentLength) - { - length = contentLength; - return true; - } - length = 0; - return false; - } - - public override void WriteTo(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - _multipartContent.CopyTo(stream, default, cancellationToken); -#else -#pragma warning disable AZC0107 - _multipartContent.CopyToAsync(stream).EnsureCompleted(); -#pragma warning restore AZC0107 -#endif - } - - public override async Task WriteToAsync(Stream stream, CancellationToken cancellationToken = default) - { -#if NET6_0_OR_GREATER - await _multipartContent.CopyToAsync(stream, cancellationToken).ConfigureAwait(false); -#else - await _multipartContent.CopyToAsync(stream).ConfigureAwait(false); -#endif - } - - public override void Dispose() - { - _multipartContent.Dispose(); - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.Serialization.cs deleted file mode 100644 index e145adf83f8a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.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.Projects -{ - internal partial class InternalAgentDeletionStatus : 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(InternalAgentDeletionStatus)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.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 - } - } - } - - InternalAgentDeletionStatus 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(InternalAgentDeletionStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalAgentDeletionStatus(document.RootElement, options); - } - - internal static InternalAgentDeletionStatus DeserializeInternalAgentDeletionStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - bool deleted = default; - InternalAgentDeletionStatusObject @object = 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("deleted"u8)) - { - deleted = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalAgentDeletionStatusObject(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAgentDeletionStatus(id, deleted, @object, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalAgentDeletionStatus)} does not support writing '{options.Format}' format."); - } - } - - InternalAgentDeletionStatus 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 DeserializeInternalAgentDeletionStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalAgentDeletionStatus)} 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 InternalAgentDeletionStatus FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalAgentDeletionStatus(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/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.cs deleted file mode 100644 index 7eeef0999788..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatus.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.AI.Projects -{ - /// The status of an agent deletion operation. - internal partial class InternalAgentDeletionStatus - { - /// - /// 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 resource specified for deletion. - /// A value indicating whether deletion was successful. - /// is null. - internal InternalAgentDeletionStatus(string id, bool deleted) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - Deleted = deleted; - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'assistant.deleted'. - /// Keeps track of any properties unknown to the library. - internal InternalAgentDeletionStatus(string id, bool deleted, InternalAgentDeletionStatusObject @object, IDictionary serializedAdditionalRawData) - { - Id = id; - Deleted = deleted; - Object = @object; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalAgentDeletionStatus() - { - } - - /// The ID of the resource specified for deletion. - public string Id { get; } - /// A value indicating whether deletion was successful. - public bool Deleted { get; } - /// The object type, which is always 'assistant.deleted'. - public InternalAgentDeletionStatusObject Object { get; } = InternalAgentDeletionStatusObject.AssistantDeleted; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs deleted file mode 100644 index 00e557b64a84..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAgentDeletionStatusObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The InternalAgentDeletionStatus_object. - internal readonly partial struct InternalAgentDeletionStatusObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InternalAgentDeletionStatusObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AssistantDeletedValue = "assistant.deleted"; - - /// assistant.deleted. - public static InternalAgentDeletionStatusObject AssistantDeleted { get; } = new InternalAgentDeletionStatusObject(AssistantDeletedValue); - /// Determines if two values are the same. - public static bool operator ==(InternalAgentDeletionStatusObject left, InternalAgentDeletionStatusObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InternalAgentDeletionStatusObject left, InternalAgentDeletionStatusObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator InternalAgentDeletionStatusObject(string value) => new InternalAgentDeletionStatusObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalAgentDeletionStatusObject other && Equals(other); - /// - public bool Equals(InternalAgentDeletionStatusObject 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.Projects/src/Generated/InternalAzureFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.Serialization.cs deleted file mode 100644 index e1a6bf019ddc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.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.Projects -{ - internal partial class InternalAzureFunctionDefinition : 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(InternalAzureFunctionDefinition)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - writer.WritePropertyName("input_binding"u8); - writer.WriteObjectValue(InputBinding, options); - writer.WritePropertyName("output_binding"u8); - writer.WriteObjectValue(OutputBinding, 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 - } - } - } - - InternalAzureFunctionDefinition 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(InternalAzureFunctionDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalAzureFunctionDefinition(document.RootElement, options); - } - - internal static InternalAzureFunctionDefinition DeserializeInternalAzureFunctionDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalFunctionDefinition function = default; - AzureFunctionBinding inputBinding = default; - AzureFunctionBinding outputBinding = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - function = InternalFunctionDefinition.DeserializeInternalFunctionDefinition(property.Value, options); - continue; - } - if (property.NameEquals("input_binding"u8)) - { - inputBinding = AzureFunctionBinding.DeserializeAzureFunctionBinding(property.Value, options); - continue; - } - if (property.NameEquals("output_binding"u8)) - { - outputBinding = AzureFunctionBinding.DeserializeAzureFunctionBinding(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalAzureFunctionDefinition(function, inputBinding, outputBinding, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalAzureFunctionDefinition)} does not support writing '{options.Format}' format."); - } - } - - InternalAzureFunctionDefinition 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 DeserializeInternalAzureFunctionDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalAzureFunctionDefinition)} 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 InternalAzureFunctionDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalAzureFunctionDefinition(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/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.cs deleted file mode 100644 index f566ee9d15b9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalAzureFunctionDefinition.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.Projects -{ - /// The definition of Azure function. - internal partial class InternalAzureFunctionDefinition - { - /// - /// 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 definition of azure function and its parameters. - /// Input storage queue. The queue storage trigger runs a function as messages are added to it. - /// Output storage queue. The function writes output to this queue when the input items are processed. - /// , or is null. - public InternalAzureFunctionDefinition(InternalFunctionDefinition function, AzureFunctionBinding inputBinding, AzureFunctionBinding outputBinding) - { - Argument.AssertNotNull(function, nameof(function)); - Argument.AssertNotNull(inputBinding, nameof(inputBinding)); - Argument.AssertNotNull(outputBinding, nameof(outputBinding)); - - Function = function; - InputBinding = inputBinding; - OutputBinding = outputBinding; - } - - /// Initializes a new instance of . - /// The definition of azure function and its parameters. - /// Input storage queue. The queue storage trigger runs a function as messages are added to it. - /// Output storage queue. The function writes output to this queue when the input items are processed. - /// Keeps track of any properties unknown to the library. - internal InternalAzureFunctionDefinition(InternalFunctionDefinition function, AzureFunctionBinding inputBinding, AzureFunctionBinding outputBinding, IDictionary serializedAdditionalRawData) - { - Function = function; - InputBinding = inputBinding; - OutputBinding = outputBinding; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalAzureFunctionDefinition() - { - } - - /// The definition of azure function and its parameters. - public InternalFunctionDefinition Function { get; set; } - /// Input storage queue. The queue storage trigger runs a function as messages are added to it. - public AzureFunctionBinding InputBinding { get; set; } - /// Output storage queue. The function writes output to this queue when the input items are processed. - public AzureFunctionBinding OutputBinding { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.cs deleted file mode 100644 index 9ba5254421ca..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class InternalCodeInterpreterToolCallDetails : 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(InternalCodeInterpreterToolCallDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("input"u8); - writer.WriteStringValue(Input); - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - 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 - } - } - } - - InternalCodeInterpreterToolCallDetails 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(InternalCodeInterpreterToolCallDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalCodeInterpreterToolCallDetails(document.RootElement, options); - } - - internal static InternalCodeInterpreterToolCallDetails DeserializeInternalCodeInterpreterToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string input = default; - IReadOnlyList outputs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("input"u8)) - { - input = property.Value.GetString(); - continue; - } - if (property.NameEquals("outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStepCodeInterpreterToolCallOutput.DeserializeRunStepCodeInterpreterToolCallOutput(item, options)); - } - outputs = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalCodeInterpreterToolCallDetails(input, outputs, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalCodeInterpreterToolCallDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalCodeInterpreterToolCallDetails 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 DeserializeInternalCodeInterpreterToolCallDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalCodeInterpreterToolCallDetails)} 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 InternalCodeInterpreterToolCallDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalCodeInterpreterToolCallDetails(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/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs deleted file mode 100644 index 2a54a1c73402..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalCodeInterpreterToolCallDetails.cs +++ /dev/null @@ -1,95 +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.Projects -{ - /// The detailed information about a code interpreter invocation by the model. - internal partial class InternalCodeInterpreterToolCallDetails - { - /// - /// 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 input provided by the model to the code interpreter tool. - /// - /// The outputs produced by the code interpreter tool back to the model in response to the tool call. - /// 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. - internal InternalCodeInterpreterToolCallDetails(string input, IEnumerable outputs) - { - Argument.AssertNotNull(input, nameof(input)); - Argument.AssertNotNull(outputs, nameof(outputs)); - - Input = input; - Outputs = outputs.ToList(); - } - - /// Initializes a new instance of . - /// The input provided by the model to the code interpreter tool. - /// - /// The outputs produced by the code interpreter tool back to the model in response to the tool call. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal InternalCodeInterpreterToolCallDetails(string input, IReadOnlyList outputs, IDictionary serializedAdditionalRawData) - { - Input = input; - Outputs = outputs; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalCodeInterpreterToolCallDetails() - { - } - - /// The input provided by the model to the code interpreter tool. - public string Input { get; } - /// - /// The outputs produced by the code interpreter tool back to the model in response to the tool call. - /// 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 IReadOnlyList Outputs { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.Serialization.cs deleted file mode 100644 index 6e89264541b9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.Serialization.cs +++ /dev/null @@ -1,138 +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.Projects -{ - internal partial class InternalConnectionPropertiesAADAuth : 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(InternalConnectionPropertiesAADAuth)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - InternalConnectionPropertiesAADAuth 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(InternalConnectionPropertiesAADAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalConnectionPropertiesAADAuth(document.RootElement, options); - } - - internal static InternalConnectionPropertiesAADAuth DeserializeInternalConnectionPropertiesAADAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalConnectionPropertiesAADAuth(authType, category, target, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesAADAuth)} does not support writing '{options.Format}' format."); - } - } - - InternalConnectionPropertiesAADAuth 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 DeserializeInternalConnectionPropertiesAADAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesAADAuth)} 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 new InternalConnectionPropertiesAADAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalConnectionPropertiesAADAuth(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.cs deleted file mode 100644 index 8e5ae6c65b87..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesAADAuth.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Connection properties for connections with AAD authentication (aka `Entra ID passthrough`). - internal partial class InternalConnectionPropertiesAADAuth : ConnectionProperties - { - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// is null. - internal InternalConnectionPropertiesAADAuth(ConnectionType category, string target) : base(category, target) - { - Argument.AssertNotNull(target, nameof(target)); - - AuthType = AuthenticationType.EntraId; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - internal InternalConnectionPropertiesAADAuth(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData) : base(authType, category, target, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal InternalConnectionPropertiesAADAuth() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.Serialization.cs deleted file mode 100644 index 66efdd57854f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.Serialization.cs +++ /dev/null @@ -1,138 +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.Projects -{ - public partial class InternalConnectionPropertiesCustomAuth : 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(InternalConnectionPropertiesCustomAuth)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - InternalConnectionPropertiesCustomAuth 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(InternalConnectionPropertiesCustomAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalConnectionPropertiesCustomAuth(document.RootElement, options); - } - - internal static InternalConnectionPropertiesCustomAuth DeserializeInternalConnectionPropertiesCustomAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalConnectionPropertiesCustomAuth(authType, category, target, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesCustomAuth)} does not support writing '{options.Format}' format."); - } - } - - InternalConnectionPropertiesCustomAuth 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 DeserializeInternalConnectionPropertiesCustomAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesCustomAuth)} 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 new InternalConnectionPropertiesCustomAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalConnectionPropertiesCustomAuth(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.cs deleted file mode 100644 index ec5553dbe294..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesCustomAuth.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Connection properties for connections with Custom authentication. - public partial class InternalConnectionPropertiesCustomAuth : ConnectionProperties - { - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// is null. - internal InternalConnectionPropertiesCustomAuth(ConnectionType category, string target) : base(category, target) - { - Argument.AssertNotNull(target, nameof(target)); - - AuthType = AuthenticationType.Custom; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - internal InternalConnectionPropertiesCustomAuth(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData) : base(authType, category, target, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal InternalConnectionPropertiesCustomAuth() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.Serialization.cs deleted file mode 100644 index 014aef5a7676..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.Serialization.cs +++ /dev/null @@ -1,138 +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.Projects -{ - public partial class InternalConnectionPropertiesNoAuth : 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(InternalConnectionPropertiesNoAuth)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - InternalConnectionPropertiesNoAuth 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(InternalConnectionPropertiesNoAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalConnectionPropertiesNoAuth(document.RootElement, options); - } - - internal static InternalConnectionPropertiesNoAuth DeserializeInternalConnectionPropertiesNoAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalConnectionPropertiesNoAuth(authType, category, target, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesNoAuth)} does not support writing '{options.Format}' format."); - } - } - - InternalConnectionPropertiesNoAuth 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 DeserializeInternalConnectionPropertiesNoAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesNoAuth)} 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 new InternalConnectionPropertiesNoAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalConnectionPropertiesNoAuth(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.cs deleted file mode 100644 index 75ba735d790d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesNoAuth.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Connection properties for connections with no authentication. - public partial class InternalConnectionPropertiesNoAuth : ConnectionProperties - { - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// is null. - internal InternalConnectionPropertiesNoAuth(ConnectionType category, string target) : base(category, target) - { - Argument.AssertNotNull(target, nameof(target)); - - AuthType = AuthenticationType.None; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - internal InternalConnectionPropertiesNoAuth(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData) : base(authType, category, target, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal InternalConnectionPropertiesNoAuth() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.Serialization.cs deleted file mode 100644 index 4b957704bcc1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.Serialization.cs +++ /dev/null @@ -1,146 +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.Projects -{ - internal partial class InternalConnectionPropertiesSASAuth : 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(InternalConnectionPropertiesSASAuth)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("credentials"u8); - writer.WriteObjectValue(Credentials, options); - } - - InternalConnectionPropertiesSASAuth 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(InternalConnectionPropertiesSASAuth)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalConnectionPropertiesSASAuth(document.RootElement, options); - } - - internal static InternalConnectionPropertiesSASAuth DeserializeInternalConnectionPropertiesSASAuth(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CredentialsSASAuth credentials = default; - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("credentials"u8)) - { - credentials = CredentialsSASAuth.DeserializeCredentialsSASAuth(property.Value, options); - continue; - } - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalConnectionPropertiesSASAuth(authType, category, target, serializedAdditionalRawData, credentials); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesSASAuth)} does not support writing '{options.Format}' format."); - } - } - - InternalConnectionPropertiesSASAuth 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 DeserializeInternalConnectionPropertiesSASAuth(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalConnectionPropertiesSASAuth)} 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 new InternalConnectionPropertiesSASAuth FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalConnectionPropertiesSASAuth(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.cs deleted file mode 100644 index cf7a52fbbe22..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalConnectionPropertiesSASAuth.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Connection properties for connections with SAS authentication. - internal partial class InternalConnectionPropertiesSASAuth : ConnectionProperties - { - /// Initializes a new instance of . - /// Category of the connection. - /// The connection URL to be used for this service. - /// Credentials will only be present for authType=ApiKey. - /// or is null. - internal InternalConnectionPropertiesSASAuth(ConnectionType category, string target, CredentialsSASAuth credentials) : base(category, target) - { - Argument.AssertNotNull(target, nameof(target)); - Argument.AssertNotNull(credentials, nameof(credentials)); - - AuthType = AuthenticationType.SAS; - Credentials = credentials; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - /// Credentials will only be present for authType=ApiKey. - internal InternalConnectionPropertiesSASAuth(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData, CredentialsSASAuth credentials) : base(authType, category, target, serializedAdditionalRawData) - { - Credentials = credentials; - } - - /// Initializes a new instance of for deserialization. - internal InternalConnectionPropertiesSASAuth() - { - } - - /// Credentials will only be present for authType=ApiKey. - public CredentialsSASAuth Credentials { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.Serialization.cs deleted file mode 100644 index c9f1b6e4fd37..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.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.Projects -{ - internal partial class InternalFileDeletionStatus : 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(InternalFileDeletionStatus)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.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 - } - } - } - - InternalFileDeletionStatus 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(InternalFileDeletionStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalFileDeletionStatus(document.RootElement, options); - } - - internal static InternalFileDeletionStatus DeserializeInternalFileDeletionStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - bool deleted = default; - InternalFileDeletionStatusObject @object = 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("deleted"u8)) - { - deleted = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new InternalFileDeletionStatusObject(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFileDeletionStatus(id, deleted, @object, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalFileDeletionStatus)} does not support writing '{options.Format}' format."); - } - } - - InternalFileDeletionStatus 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 DeserializeInternalFileDeletionStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalFileDeletionStatus)} 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 InternalFileDeletionStatus FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalFileDeletionStatus(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/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.cs deleted file mode 100644 index 445d86d04e67..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatus.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.AI.Projects -{ - /// A status response from a file deletion operation. - internal partial class InternalFileDeletionStatus - { - /// - /// 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 resource specified for deletion. - /// A value indicating whether deletion was successful. - /// is null. - internal InternalFileDeletionStatus(string id, bool deleted) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - Deleted = deleted; - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'file'. - /// Keeps track of any properties unknown to the library. - internal InternalFileDeletionStatus(string id, bool deleted, InternalFileDeletionStatusObject @object, IDictionary serializedAdditionalRawData) - { - Id = id; - Deleted = deleted; - Object = @object; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalFileDeletionStatus() - { - } - - /// The ID of the resource specified for deletion. - public string Id { get; } - /// A value indicating whether deletion was successful. - public bool Deleted { get; } - /// The object type, which is always 'file'. - public InternalFileDeletionStatusObject Object { get; } = InternalFileDeletionStatusObject.File; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs deleted file mode 100644 index 2134fdb513f9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileDeletionStatusObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The InternalFileDeletionStatus_object. - internal readonly partial struct InternalFileDeletionStatusObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InternalFileDeletionStatusObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FileValue = "file"; - - /// file. - public static InternalFileDeletionStatusObject File { get; } = new InternalFileDeletionStatusObject(FileValue); - /// Determines if two values are the same. - public static bool operator ==(InternalFileDeletionStatusObject left, InternalFileDeletionStatusObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InternalFileDeletionStatusObject left, InternalFileDeletionStatusObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator InternalFileDeletionStatusObject(string value) => new InternalFileDeletionStatusObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalFileDeletionStatusObject other && Equals(other); - /// - public bool Equals(InternalFileDeletionStatusObject 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.Projects/src/Generated/InternalFileListResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.Serialization.cs deleted file mode 100644 index bbeeb53b2fbf..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class InternalFileListResponse : 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(InternalFileListResponse)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - 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 - } - } - } - - InternalFileListResponse 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(InternalFileListResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalFileListResponse(document.RootElement, options); - } - - internal static InternalFileListResponse DeserializeInternalFileListResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalFileListResponseObject @object = default; - IReadOnlyList data = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new InternalFileListResponseObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AgentFile.DeserializeAgentFile(item, options)); - } - data = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFileListResponse(@object, data, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalFileListResponse)} does not support writing '{options.Format}' format."); - } - } - - InternalFileListResponse 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 DeserializeInternalFileListResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalFileListResponse)} 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 InternalFileListResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalFileListResponse(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/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs deleted file mode 100644 index f86f2ab77484..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponse.cs +++ /dev/null @@ -1,81 +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.Projects -{ - /// The response data from a file list operation. - internal partial class InternalFileListResponse - { - /// - /// 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 files returned for the request. - /// is null. - internal InternalFileListResponse(IEnumerable data) - { - Argument.AssertNotNull(data, nameof(data)); - - Data = data.ToList(); - } - - /// Initializes a new instance of . - /// The object type, which is always 'list'. - /// The files returned for the request. - /// Keeps track of any properties unknown to the library. - internal InternalFileListResponse(InternalFileListResponseObject @object, IReadOnlyList data, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalFileListResponse() - { - } - - /// The object type, which is always 'list'. - public InternalFileListResponseObject Object { get; } = InternalFileListResponseObject.List; - - /// The files returned for the request. - public IReadOnlyList Data { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs deleted file mode 100644 index 9129c26b86bc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFileListResponseObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The InternalFileListResponse_object. - internal readonly partial struct InternalFileListResponseObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public InternalFileListResponseObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static InternalFileListResponseObject List { get; } = new InternalFileListResponseObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(InternalFileListResponseObject left, InternalFileListResponseObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(InternalFileListResponseObject left, InternalFileListResponseObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator InternalFileListResponseObject(string value) => new InternalFileListResponseObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is InternalFileListResponseObject other && Equals(other); - /// - public bool Equals(InternalFileListResponseObject 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.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs deleted file mode 100644 index 6fcaeb7f07f2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.Serialization.cs +++ /dev/null @@ -1,168 +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.Projects -{ - internal partial class InternalFunctionDefinition : 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(InternalFunctionDefinition)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("parameters"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Parameters); -#else - using (JsonDocument document = JsonDocument.Parse(Parameters, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - 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 - } - } - } - - InternalFunctionDefinition 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(InternalFunctionDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalFunctionDefinition(document.RootElement, options); - } - - internal static InternalFunctionDefinition DeserializeInternalFunctionDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string description = default; - BinaryData parameters = 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("parameters"u8)) - { - parameters = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalFunctionDefinition(name, description, parameters, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalFunctionDefinition)} does not support writing '{options.Format}' format."); - } - } - - InternalFunctionDefinition 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 DeserializeInternalFunctionDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalFunctionDefinition)} 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 InternalFunctionDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalFunctionDefinition(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/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs deleted file mode 100644 index e49213f1237b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalFunctionDefinition.cs +++ /dev/null @@ -1,115 +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.Projects -{ - /// The input definition information for a function. - internal partial class InternalFunctionDefinition - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the function to be called. - /// The parameters the functions accepts, described as a JSON Schema object. - /// or is null. - public InternalFunctionDefinition(string name, BinaryData parameters) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(parameters, nameof(parameters)); - - Name = name; - Parameters = parameters; - } - - /// Initializes a new instance of . - /// The name of the function to be called. - /// A description of what the function does, used by the model to choose when and how to call the function. - /// The parameters the functions accepts, described as a JSON Schema object. - /// Keeps track of any properties unknown to the library. - internal InternalFunctionDefinition(string name, string description, BinaryData parameters, IDictionary serializedAdditionalRawData) - { - Name = name; - Description = description; - Parameters = parameters; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalFunctionDefinition() - { - } - - /// The name of the function to be called. - public string Name { get; set; } - /// A description of what the function does, used by the model to choose when and how to call the function. - public string Description { get; set; } - /// - /// The parameters the functions accepts, described as a JSON Schema object. - /// - /// To assign an object to 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 BinaryData Parameters { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs deleted file mode 100644 index e1fcc47c2499..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - internal partial class InternalMessageImageFileDetails : 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(InternalMessageImageFileDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(InternalDetails); - 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 - } - } - } - - InternalMessageImageFileDetails 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(InternalMessageImageFileDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalMessageImageFileDetails(document.RootElement, options); - } - - internal static InternalMessageImageFileDetails DeserializeInternalMessageImageFileDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageImageFileDetails(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalMessageImageFileDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalMessageImageFileDetails 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 DeserializeInternalMessageImageFileDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalMessageImageFileDetails)} 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 InternalMessageImageFileDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalMessageImageFileDetails(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/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.cs deleted file mode 100644 index 150277d11fba..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageImageFileDetails.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; - -namespace Azure.AI.Projects -{ - /// An image reference, as represented in thread message content. - internal partial class InternalMessageImageFileDetails - { - /// - /// 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 for the file associated with this image. - /// is null. - internal InternalMessageImageFileDetails(string internalDetails) - { - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - InternalDetails = internalDetails; - } - - /// Initializes a new instance of . - /// The ID for the file associated with this image. - /// Keeps track of any properties unknown to the library. - internal InternalMessageImageFileDetails(string internalDetails, IDictionary serializedAdditionalRawData) - { - InternalDetails = internalDetails; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalMessageImageFileDetails() - { - } - - /// The ID for the file associated with this image. - public string InternalDetails { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.cs deleted file mode 100644 index 8e16af5676c8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class InternalMessageTextDetails : 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(InternalMessageTextDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Text); - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - 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 - } - } - } - - InternalMessageTextDetails 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(InternalMessageTextDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalMessageTextDetails(document.RootElement, options); - } - - internal static InternalMessageTextDetails DeserializeInternalMessageTextDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string value = default; - IReadOnlyList annotations = 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("annotations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageTextAnnotation.DeserializeMessageTextAnnotation(item, options)); - } - annotations = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageTextDetails(value, annotations, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalMessageTextDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalMessageTextDetails 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 DeserializeInternalMessageTextDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalMessageTextDetails)} 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 InternalMessageTextDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalMessageTextDetails(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/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs deleted file mode 100644 index 67b453a23b4b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextDetails.cs +++ /dev/null @@ -1,95 +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.Projects -{ - /// The text and associated annotations for a single item of agent thread message content. - internal partial class InternalMessageTextDetails - { - /// - /// 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 text data. - /// - /// A list of annotations associated with this text. - /// 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. - internal InternalMessageTextDetails(string text, IEnumerable annotations) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(annotations, nameof(annotations)); - - Text = text; - Annotations = annotations.ToList(); - } - - /// Initializes a new instance of . - /// The text data. - /// - /// A list of annotations associated with this text. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal InternalMessageTextDetails(string text, IReadOnlyList annotations, IDictionary serializedAdditionalRawData) - { - Text = text; - Annotations = annotations; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalMessageTextDetails() - { - } - - /// The text data. - public string Text { get; } - /// - /// A list of annotations associated with this text. - /// 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 IReadOnlyList Annotations { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs deleted file mode 100644 index 19d9920b5fc4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - internal partial class InternalMessageTextFileCitationDetails : 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(InternalMessageTextFileCitationDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - writer.WritePropertyName("quote"u8); - writer.WriteStringValue(Quote); - 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 - } - } - } - - InternalMessageTextFileCitationDetails 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(InternalMessageTextFileCitationDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalMessageTextFileCitationDetails(document.RootElement, options); - } - - internal static InternalMessageTextFileCitationDetails DeserializeInternalMessageTextFileCitationDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - string quote = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("quote"u8)) - { - quote = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageTextFileCitationDetails(fileId, quote, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalMessageTextFileCitationDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalMessageTextFileCitationDetails 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 DeserializeInternalMessageTextFileCitationDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalMessageTextFileCitationDetails)} 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 InternalMessageTextFileCitationDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalMessageTextFileCitationDetails(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/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs deleted file mode 100644 index e61364394d03..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFileCitationDetails.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// A representation of a file-based text citation, as used in a file-based annotation of text thread message content. - internal partial class InternalMessageTextFileCitationDetails - { - /// - /// 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 file associated with this citation. - /// The specific quote cited in the associated file. - /// or is null. - internal InternalMessageTextFileCitationDetails(string fileId, string quote) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(quote, nameof(quote)); - - FileId = fileId; - Quote = quote; - } - - /// Initializes a new instance of . - /// The ID of the file associated with this citation. - /// The specific quote cited in the associated file. - /// Keeps track of any properties unknown to the library. - internal InternalMessageTextFileCitationDetails(string fileId, string quote, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - Quote = quote; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalMessageTextFileCitationDetails() - { - } - - /// The ID of the file associated with this citation. - public string FileId { get; } - /// The specific quote cited in the associated file. - public string Quote { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs deleted file mode 100644 index 7733481628e8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - internal partial class InternalMessageTextFilePathDetails : 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(InternalMessageTextFilePathDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - 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 - } - } - } - - InternalMessageTextFilePathDetails 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(InternalMessageTextFilePathDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalMessageTextFilePathDetails(document.RootElement, options); - } - - internal static InternalMessageTextFilePathDetails DeserializeInternalMessageTextFilePathDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalMessageTextFilePathDetails(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalMessageTextFilePathDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalMessageTextFilePathDetails 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 DeserializeInternalMessageTextFilePathDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalMessageTextFilePathDetails)} 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 InternalMessageTextFilePathDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalMessageTextFilePathDetails(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/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.cs deleted file mode 100644 index 2315f125f95e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalMessageTextFilePathDetails.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; - -namespace Azure.AI.Projects -{ - /// An encapsulation of an image file ID, as used by message image content. - internal partial class InternalMessageTextFilePathDetails - { - /// - /// 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 specific file that the citation is from. - /// is null. - internal InternalMessageTextFilePathDetails(string fileId) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - - FileId = fileId; - } - - /// Initializes a new instance of . - /// The ID of the specific file that the citation is from. - /// Keeps track of any properties unknown to the library. - internal InternalMessageTextFilePathDetails(string fileId, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalMessageTextFilePathDetails() - { - } - - /// The ID of the specific file that the citation is from. - public string FileId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs deleted file mode 100644 index ba709acdd6eb..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class InternalOpenAIPageableListOfAgent : 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(InternalOpenAIPageableListOfAgent)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - InternalOpenAIPageableListOfAgent 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(InternalOpenAIPageableListOfAgent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfAgent(document.RootElement, options); - } - - internal static InternalOpenAIPageableListOfAgent DeserializeInternalOpenAIPageableListOfAgent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfAgentObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfAgentObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(Agent.DeserializeAgent(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfAgent( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} does not support writing '{options.Format}' format."); - } - } - - InternalOpenAIPageableListOfAgent 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 DeserializeInternalOpenAIPageableListOfAgent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfAgent)} 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 InternalOpenAIPageableListOfAgent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalOpenAIPageableListOfAgent(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/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs deleted file mode 100644 index 84aaa431daf7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfAgent.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfAgent - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal InternalOpenAIPageableListOfAgent(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfAgent(OpenAIPageableListOfAgentObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfAgent() - { - } - - /// The object type, which is always list. - public OpenAIPageableListOfAgentObject Object { get; } = OpenAIPageableListOfAgentObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs deleted file mode 100644 index 772ef1a40542..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class InternalOpenAIPageableListOfRunStep : 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(InternalOpenAIPageableListOfRunStep)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - InternalOpenAIPageableListOfRunStep 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(InternalOpenAIPageableListOfRunStep)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfRunStep(document.RootElement, options); - } - - internal static InternalOpenAIPageableListOfRunStep DeserializeInternalOpenAIPageableListOfRunStep(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfRunStepObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfRunStepObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStep.DeserializeRunStep(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfRunStep( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} does not support writing '{options.Format}' format."); - } - } - - InternalOpenAIPageableListOfRunStep 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 DeserializeInternalOpenAIPageableListOfRunStep(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfRunStep)} 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 InternalOpenAIPageableListOfRunStep FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalOpenAIPageableListOfRunStep(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/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs deleted file mode 100644 index ce4995ab4380..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfRunStep.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfRunStep - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal InternalOpenAIPageableListOfRunStep(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfRunStep(OpenAIPageableListOfRunStepObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfRunStep() - { - } - - /// The object type, which is always list. - public OpenAIPageableListOfRunStepObject Object { get; } = OpenAIPageableListOfRunStepObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs deleted file mode 100644 index 7daa22d9d59a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class InternalOpenAIPageableListOfThreadMessage : 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(InternalOpenAIPageableListOfThreadMessage)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - InternalOpenAIPageableListOfThreadMessage 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(InternalOpenAIPageableListOfThreadMessage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfThreadMessage(document.RootElement, options); - } - - internal static InternalOpenAIPageableListOfThreadMessage DeserializeInternalOpenAIPageableListOfThreadMessage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfThreadMessageObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfThreadMessageObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadMessage.DeserializeThreadMessage(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfThreadMessage( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} does not support writing '{options.Format}' format."); - } - } - - InternalOpenAIPageableListOfThreadMessage 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 DeserializeInternalOpenAIPageableListOfThreadMessage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadMessage)} 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 InternalOpenAIPageableListOfThreadMessage FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalOpenAIPageableListOfThreadMessage(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/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs deleted file mode 100644 index 7b92140f7189..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadMessage.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfThreadMessage - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal InternalOpenAIPageableListOfThreadMessage(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfThreadMessage(OpenAIPageableListOfThreadMessageObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfThreadMessage() - { - } - - /// The object type, which is always list. - public OpenAIPageableListOfThreadMessageObject Object { get; } = OpenAIPageableListOfThreadMessageObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs deleted file mode 100644 index 3542f7af6510..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class InternalOpenAIPageableListOfThreadRun : 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(InternalOpenAIPageableListOfThreadRun)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - InternalOpenAIPageableListOfThreadRun 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(InternalOpenAIPageableListOfThreadRun)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalOpenAIPageableListOfThreadRun(document.RootElement, options); - } - - internal static InternalOpenAIPageableListOfThreadRun DeserializeInternalOpenAIPageableListOfThreadRun(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfThreadRunObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfThreadRunObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ThreadRun.DeserializeThreadRun(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalOpenAIPageableListOfThreadRun( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} does not support writing '{options.Format}' format."); - } - } - - InternalOpenAIPageableListOfThreadRun 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 DeserializeInternalOpenAIPageableListOfThreadRun(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalOpenAIPageableListOfThreadRun)} 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 InternalOpenAIPageableListOfThreadRun FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalOpenAIPageableListOfThreadRun(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/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs deleted file mode 100644 index 92d7bde1e0e7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalOpenAIPageableListOfThreadRun.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - internal partial class InternalOpenAIPageableListOfThreadRun - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal InternalOpenAIPageableListOfThreadRun(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal InternalOpenAIPageableListOfThreadRun(OpenAIPageableListOfThreadRunObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalOpenAIPageableListOfThreadRun() - { - } - - /// The object type, which is always list. - public OpenAIPageableListOfThreadRunObject Object { get; } = OpenAIPageableListOfThreadRunObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs deleted file mode 100644 index df69554b3412..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - internal partial class InternalRequiredFunctionToolCallDetails : 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(InternalRequiredFunctionToolCallDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - 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 - } - } - } - - InternalRequiredFunctionToolCallDetails 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(InternalRequiredFunctionToolCallDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRequiredFunctionToolCallDetails(document.RootElement, options); - } - - internal static InternalRequiredFunctionToolCallDetails DeserializeInternalRequiredFunctionToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string arguments = 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("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRequiredFunctionToolCallDetails(name, arguments, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalRequiredFunctionToolCallDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRequiredFunctionToolCallDetails 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 DeserializeInternalRequiredFunctionToolCallDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRequiredFunctionToolCallDetails)} 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 InternalRequiredFunctionToolCallDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalRequiredFunctionToolCallDetails(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/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs deleted file mode 100644 index 9c17e43e2e0b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRequiredFunctionToolCallDetails.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// The detailed information for a function invocation, as provided by a required action invoking a function tool, that includes the name of and arguments to the function. - internal partial class InternalRequiredFunctionToolCallDetails - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. - /// or is null. - internal InternalRequiredFunctionToolCallDetails(string name, string arguments) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); - - Name = name; - Arguments = arguments; - } - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. - /// Keeps track of any properties unknown to the library. - internal InternalRequiredFunctionToolCallDetails(string name, string arguments, IDictionary serializedAdditionalRawData) - { - Name = name; - Arguments = arguments; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalRequiredFunctionToolCallDetails() - { - } - - /// The name of the function. - public string Name { get; } - /// The arguments to use when invoking the named function, as provided by the model. Arguments are presented as a JSON document that should be validated and parsed for evaluation. - public string Arguments { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs deleted file mode 100644 index 45f35da0b778..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class InternalRunStepFunctionToolCallDetails : 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(InternalRunStepFunctionToolCallDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - if (Output != null) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - else - { - writer.WriteNull("output"); - } - 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 - } - } - } - - InternalRunStepFunctionToolCallDetails 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(InternalRunStepFunctionToolCallDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement, options); - } - - internal static InternalRunStepFunctionToolCallDetails DeserializeInternalRunStepFunctionToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string arguments = default; - string output = 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("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("output"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - output = null; - continue; - } - output = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalRunStepFunctionToolCallDetails(name, arguments, output, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalRunStepFunctionToolCallDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalRunStepFunctionToolCallDetails 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 DeserializeInternalRunStepFunctionToolCallDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalRunStepFunctionToolCallDetails)} 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 InternalRunStepFunctionToolCallDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalRunStepFunctionToolCallDetails(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/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs deleted file mode 100644 index ff1b24bd121c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalRunStepFunctionToolCallDetails.cs +++ /dev/null @@ -1,88 +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.Projects -{ - /// The detailed information about the function called by the model. - internal partial class InternalRunStepFunctionToolCallDetails - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments that the model requires are provided to the named function. - /// The output of the function, only populated for function calls that have already have had their outputs submitted. - /// or is null. - internal InternalRunStepFunctionToolCallDetails(string name, string arguments, string output) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(arguments, nameof(arguments)); - - Name = name; - Arguments = arguments; - Output = output; - } - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments that the model requires are provided to the named function. - /// The output of the function, only populated for function calls that have already have had their outputs submitted. - /// Keeps track of any properties unknown to the library. - internal InternalRunStepFunctionToolCallDetails(string name, string arguments, string output, IDictionary serializedAdditionalRawData) - { - Name = name; - Arguments = arguments; - Output = output; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalRunStepFunctionToolCallDetails() - { - } - - /// The name of the function. - public string Name { get; } - /// The arguments that the model requires are provided to the named function. - public string Arguments { get; } - /// The output of the function, only populated for function calls that have already have had their outputs submitted. - public string Output { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs deleted file mode 100644 index dd92c38d070e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.Serialization.cs +++ /dev/null @@ -1,152 +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.Projects -{ - internal partial class InternalSubmitToolOutputsDetails : 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(InternalSubmitToolOutputsDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - 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 - } - } - } - - InternalSubmitToolOutputsDetails 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(InternalSubmitToolOutputsDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeInternalSubmitToolOutputsDetails(document.RootElement, options); - } - - internal static InternalSubmitToolOutputsDetails DeserializeInternalSubmitToolOutputsDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList toolCalls = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_calls"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RequiredToolCall.DeserializeRequiredToolCall(item, options)); - } - toolCalls = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new InternalSubmitToolOutputsDetails(toolCalls, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(InternalSubmitToolOutputsDetails)} does not support writing '{options.Format}' format."); - } - } - - InternalSubmitToolOutputsDetails 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 DeserializeInternalSubmitToolOutputsDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(InternalSubmitToolOutputsDetails)} 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 InternalSubmitToolOutputsDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeInternalSubmitToolOutputsDetails(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/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs deleted file mode 100644 index 368d47db64fd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/InternalSubmitToolOutputsDetails.cs +++ /dev/null @@ -1,88 +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.Projects -{ - /// The details describing tools that should be called to submit tool outputs. - internal partial class InternalSubmitToolOutputsDetails - { - /// - /// 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 tool calls that must be resolved for the agent thread run to continue. - /// 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 . - /// - /// is null. - internal InternalSubmitToolOutputsDetails(IEnumerable toolCalls) - { - Argument.AssertNotNull(toolCalls, nameof(toolCalls)); - - ToolCalls = toolCalls.ToList(); - } - - /// Initializes a new instance of . - /// - /// The list of tool calls that must be resolved for the agent thread run to continue. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// Keeps track of any properties unknown to the library. - internal InternalSubmitToolOutputsDetails(IReadOnlyList toolCalls, IDictionary serializedAdditionalRawData) - { - ToolCalls = toolCalls; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal InternalSubmitToolOutputsDetails() - { - } - - /// - /// The list of tool calls that must be resolved for the agent thread run to continue. - /// 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 IReadOnlyList ToolCalls { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.Serialization.cs deleted file mode 100644 index 3c03bfdb7122..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.Serialization.cs +++ /dev/null @@ -1,152 +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.Projects -{ - public partial class ListConnectionsResponse : 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(ListConnectionsResponse)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - ListConnectionsResponse 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(ListConnectionsResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeListConnectionsResponse(document.RootElement, options); - } - - internal static ListConnectionsResponse DeserializeListConnectionsResponse(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)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ConnectionResponse.DeserializeConnectionResponse(item, options)); - } - value = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ListConnectionsResponse(value, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ListConnectionsResponse)} does not support writing '{options.Format}' format."); - } - } - - ListConnectionsResponse 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 DeserializeListConnectionsResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ListConnectionsResponse)} 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 ListConnectionsResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeListConnectionsResponse(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/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.cs deleted file mode 100644 index 7dd047b9eb69..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ListConnectionsResponse.cs +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Projects -{ - /// Response from the list operation. - public partial class ListConnectionsResponse - { - /// - /// 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 connection list secrets. - /// is null. - internal ListConnectionsResponse(IEnumerable value) - { - Argument.AssertNotNull(value, nameof(value)); - - Value = value.ToList(); - } - - /// Initializes a new instance of . - /// A list of connection list secrets. - /// Keeps track of any properties unknown to the library. - internal ListConnectionsResponse(IReadOnlyList value, IDictionary serializedAdditionalRawData) - { - Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ListConnectionsResponse() - { - } - - /// A list of connection list secrets. - public IReadOnlyList Value { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.cs deleted file mode 100644 index 52bbc7987e71..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ListSortOrder.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.AI.Projects -{ - /// The available sorting options when requesting a list of response objects. - public readonly partial struct ListSortOrder : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ListSortOrder(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AscendingValue = "asc"; - private const string DescendingValue = "desc"; - - /// Specifies an ascending sort order. - public static ListSortOrder Ascending { get; } = new ListSortOrder(AscendingValue); - /// Specifies a descending sort order. - public static ListSortOrder Descending { get; } = new ListSortOrder(DescendingValue); - /// Determines if two values are the same. - public static bool operator ==(ListSortOrder left, ListSortOrder right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ListSortOrder left, ListSortOrder right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ListSortOrder(string value) => new ListSortOrder(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ListSortOrder other && Equals(other); - /// - public bool Equals(ListSortOrder 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.Projects/src/Generated/MAASModelConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MAASModelConfig.Serialization.cs deleted file mode 100644 index 035ac9f054f4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MAASModelConfig.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class MAASModelConfig : 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(MAASModelConfig)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("azureEndpoint"u8); - writer.WriteStringValue(AzureEndpoint); - writer.WritePropertyName("apiKey"u8); - writer.WriteStringValue(ApiKey); - } - - MAASModelConfig 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(MAASModelConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMAASModelConfig(document.RootElement, options); - } - - internal static MAASModelConfig DeserializeMAASModelConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string azureEndpoint = default; - string apiKey = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azureEndpoint"u8)) - { - azureEndpoint = property.Value.GetString(); - continue; - } - if (property.NameEquals("apiKey"u8)) - { - apiKey = 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 MAASModelConfig(type, serializedAdditionalRawData, azureEndpoint, apiKey); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MAASModelConfig)} does not support writing '{options.Format}' format."); - } - } - - MAASModelConfig 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 DeserializeMAASModelConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MAASModelConfig)} 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 new MAASModelConfig FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMAASModelConfig(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MAASModelConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MAASModelConfig.cs deleted file mode 100644 index 92712dbc0601..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MAASModelConfig.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// MaaS model configuration. The API version would be selected by the service for querying the model. - public partial class MAASModelConfig : TargetModelConfig - { - /// Initializes a new instance of . - /// Endpoint targetURI for MAAS model. - /// API Key for MAAS model. - /// or is null. - public MAASModelConfig(string azureEndpoint, string apiKey) - { - Argument.AssertNotNull(azureEndpoint, nameof(azureEndpoint)); - Argument.AssertNotNull(apiKey, nameof(apiKey)); - - Type = "MAAS"; - AzureEndpoint = azureEndpoint; - ApiKey = apiKey; - } - - /// Initializes a new instance of . - /// Type of the model configuration. - /// Keeps track of any properties unknown to the library. - /// Endpoint targetURI for MAAS model. - /// API Key for MAAS model. - internal MAASModelConfig(string type, IDictionary serializedAdditionalRawData, string azureEndpoint, string apiKey) : base(type, serializedAdditionalRawData) - { - AzureEndpoint = azureEndpoint; - ApiKey = apiKey; - } - - /// Initializes a new instance of for deserialization. - internal MAASModelConfig() - { - } - - /// Endpoint targetURI for MAAS model. - public string AzureEndpoint { get; set; } - /// API Key for MAAS model. - public string ApiKey { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs new file mode 100644 index 000000000000..4f782226d6fb --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.Serialization.cs @@ -0,0 +1,181 @@ +// Copyright (c) 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.Projects +{ + public partial class ManagedAzureAISearchIndex : 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(ManagedAzureAISearchIndex)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("vectorStoreId"u8); + writer.WriteStringValue(VectorStoreId); + } + + ManagedAzureAISearchIndex 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(ManagedAzureAISearchIndex)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeManagedAzureAISearchIndex(document.RootElement, options); + } + + internal static ManagedAzureAISearchIndex DeserializeManagedAzureAISearchIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vectorStoreId = default; + IndexType type = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vectorStoreId"u8)) + { + vectorStoreId = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new IndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ManagedAzureAISearchIndex( + type, + id, + name, + version, + description, + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData, + vectorStoreId); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ManagedAzureAISearchIndex)} does not support writing '{options.Format}' format."); + } + } + + ManagedAzureAISearchIndex 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 DeserializeManagedAzureAISearchIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ManagedAzureAISearchIndex)} 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 new ManagedAzureAISearchIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeManagedAzureAISearchIndex(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.cs new file mode 100644 index 000000000000..5ba94ebd30f3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ManagedAzureAISearchIndex.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; + +namespace Azure.AI.Projects +{ + /// Managed Azure AI Search Index Definition. + public partial class ManagedAzureAISearchIndex : Index + { + /// Initializes a new instance of . + /// Vector store id of managed index. + /// is null. + public ManagedAzureAISearchIndex(string vectorStoreId) + { + Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); + + Type = IndexType.ManagedAzureSearch; + VectorStoreId = vectorStoreId; + } + + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + /// Vector store id of managed index. + internal ManagedAzureAISearchIndex(IndexType type, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData, string vectorStoreId) : base(type, id, name, version, description, tags, serializedAdditionalRawData) + { + VectorStoreId = vectorStoreId; + } + + /// Initializes a new instance of for deserialization. + internal ManagedAzureAISearchIndex() + { + } + + /// Vector store id of managed index. + public string VectorStoreId { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs deleted file mode 100644 index a207c79f776f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.Serialization.cs +++ /dev/null @@ -1,197 +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.Projects -{ - public partial class MessageAttachment : 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(MessageAttachment)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (Optional.IsDefined(DataSource)) - { - writer.WritePropertyName("data_source"u8); - writer.WriteObjectValue(DataSource, options); - } - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - 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 - } - } - } - - MessageAttachment 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(MessageAttachment)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageAttachment(document.RootElement, options); - } - - internal static MessageAttachment DeserializeMessageAttachment(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - VectorStoreDataSource dataSource = default; - IList tools = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("data_source"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - dataSource = VectorStoreDataSource.DeserializeVectorStoreDataSource(property.Value, options); - continue; - } - if (property.NameEquals("tools"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } - } - tools = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageAttachment(fileId, dataSource, tools, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageAttachment)} does not support writing '{options.Format}' format."); - } - } - - MessageAttachment 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 DeserializeMessageAttachment(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageAttachment)} 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 MessageAttachment FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageAttachment(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/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs deleted file mode 100644 index be25230a7c4c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageAttachment.cs +++ /dev/null @@ -1,121 +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.Projects -{ - /// This describes to which tools a file has been attached. - public partial class MessageAttachment - { - /// - /// 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 tools to add to this file. - /// is null. - public MessageAttachment(IEnumerable tools) - { - Argument.AssertNotNull(tools, nameof(tools)); - - Tools = tools.ToList(); - } - - /// Initializes a new instance of . - /// The ID of the file to attach to the message. - /// Azure asset ID. - /// The tools to add to this file. - /// Keeps track of any properties unknown to the library. - internal MessageAttachment(string fileId, VectorStoreDataSource dataSource, IList tools, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - DataSource = dataSource; - Tools = tools; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageAttachment() - { - } - - /// The ID of the file to attach to the message. - public string FileId { get; set; } - /// Azure asset ID. - public VectorStoreDataSource DataSource { get; set; } - /// - /// The tools to add to this file. - /// - /// To assign an object to the element of 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 IList Tools { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageBlockType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageBlockType.cs deleted file mode 100644 index c39ca285de4d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageBlockType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Specifies the kind of content block within a message. Could be text, an image file, an external image URL, or an unknown future type. - internal readonly partial struct MessageBlockType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageBlockType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TextValue = "text"; - private const string ImageFileValue = "image_file"; - private const string ImageUrlValue = "image_url"; - - /// Indicates a block containing text content. - public static MessageBlockType Text { get; } = new MessageBlockType(TextValue); - /// Indicates a block referencing an internally uploaded image file. - public static MessageBlockType ImageFile { get; } = new MessageBlockType(ImageFileValue); - /// Indicates a block referencing an external image URL. - public static MessageBlockType ImageUrl { get; } = new MessageBlockType(ImageUrlValue); - /// Determines if two values are the same. - public static bool operator ==(MessageBlockType left, MessageBlockType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageBlockType left, MessageBlockType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageBlockType(string value) => new MessageBlockType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageBlockType other && Equals(other); - /// - public bool Equals(MessageBlockType 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.Projects/src/Generated/MessageContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.Serialization.cs deleted file mode 100644 index 1b20f90b5074..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownMessageContent))] - public partial class MessageContent : 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(MessageContent)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - MessageContent 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(MessageContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageContent(document.RootElement, options); - } - - internal static MessageContent DeserializeMessageContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image_file": return MessageImageFileContent.DeserializeMessageImageFileContent(element, options); - case "text": return MessageTextContent.DeserializeMessageTextContent(element, options); - } - } - return UnknownMessageContent.DeserializeUnknownMessageContent(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{options.Format}' format."); - } - } - - MessageContent 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 DeserializeMessageContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageContent)} 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 MessageContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageContent(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/ai/Azure.AI.Projects/src/Generated/MessageContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.cs deleted file mode 100644 index 17682f30308e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageContent.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.AI.Projects -{ - /// - /// An abstract representation of a single item of thread message content. - /// 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 abstract partial class MessageContent - { - /// - /// 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 MessageContent() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal MessageContent(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.cs deleted file mode 100644 index 3b46597d62d1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDelta : 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(MessageDelta)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - 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 - } - } - } - - MessageDelta 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(MessageDelta)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDelta(document.RootElement, options); - } - - internal static MessageDelta DeserializeMessageDelta(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageRole role = default; - IReadOnlyList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("role"u8)) - { - role = new MessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageDeltaContent.DeserializeMessageDeltaContent(item, options)); - } - content = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDelta(role, content, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDelta)} does not support writing '{options.Format}' format."); - } - } - - MessageDelta 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 DeserializeMessageDelta(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDelta)} 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 MessageDelta FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDelta(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/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs deleted file mode 100644 index 764571c6aa11..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDelta.cs +++ /dev/null @@ -1,94 +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.Projects -{ - /// Represents the typed 'delta' payload within a streaming message delta chunk. - public partial class MessageDelta - { - /// - /// 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 entity that produced the message. - /// - /// The content of the message as an array of text and/or images. - /// 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 . - /// - /// is null. - internal MessageDelta(MessageRole role, IEnumerable content) - { - Argument.AssertNotNull(content, nameof(content)); - - Role = role; - Content = content.ToList(); - } - - /// Initializes a new instance of . - /// The entity that produced the message. - /// - /// The content of the message as an array of text and/or images. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal MessageDelta(MessageRole role, IReadOnlyList content, IDictionary serializedAdditionalRawData) - { - Role = role; - Content = content; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageDelta() - { - } - - /// The entity that produced the message. - public MessageRole Role { get; } - /// - /// The content of the message as an array of text and/or images. - /// 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 IReadOnlyList Content { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.Serialization.cs deleted file mode 100644 index 1cb2c5eaa99d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.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.Projects -{ - public partial class MessageDeltaChunk : 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(MessageDeltaChunk)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("delta"u8); - writer.WriteObjectValue(Delta, 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 - } - } - } - - MessageDeltaChunk 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(MessageDeltaChunk)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaChunk(document.RootElement, options); - } - - internal static MessageDeltaChunk DeserializeMessageDeltaChunk(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - MessageDeltaChunkObject @object = default; - MessageDelta delta = 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("object"u8)) - { - @object = new MessageDeltaChunkObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = MessageDelta.DeserializeMessageDelta(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaChunk(id, @object, delta, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaChunk)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaChunk 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 DeserializeMessageDeltaChunk(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaChunk)} 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 MessageDeltaChunk FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaChunk(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.cs deleted file mode 100644 index cf40d797394f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunk.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents a message delta i.e. any changed fields on a message during streaming. - public partial class MessageDeltaChunk - { - /// - /// 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 identifier of the message, which can be referenced in API endpoints. - /// The delta containing the fields that have changed on the Message. - /// or is null. - internal MessageDeltaChunk(string id, MessageDelta delta) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(delta, nameof(delta)); - - Id = id; - Delta = delta; - } - - /// Initializes a new instance of . - /// The identifier of the message, which can be referenced in API endpoints. - /// The object type, which is always `thread.message.delta`. - /// The delta containing the fields that have changed on the Message. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaChunk(string id, MessageDeltaChunkObject @object, MessageDelta delta, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - Delta = delta; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaChunk() - { - } - - /// The identifier of the message, which can be referenced in API endpoints. - public string Id { get; } - /// The object type, which is always `thread.message.delta`. - public MessageDeltaChunkObject Object { get; } = MessageDeltaChunkObject.ThreadMessageDelta; - - /// The delta containing the fields that have changed on the Message. - public MessageDelta Delta { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs deleted file mode 100644 index d21c2b7731b4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaChunkObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The MessageDeltaChunk_object. - public readonly partial struct MessageDeltaChunkObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageDeltaChunkObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadMessageDeltaValue = "thread.message.delta"; - - /// thread.message.delta. - public static MessageDeltaChunkObject ThreadMessageDelta { get; } = new MessageDeltaChunkObject(ThreadMessageDeltaValue); - /// Determines if two values are the same. - public static bool operator ==(MessageDeltaChunkObject left, MessageDeltaChunkObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageDeltaChunkObject left, MessageDeltaChunkObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageDeltaChunkObject(string value) => new MessageDeltaChunkObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageDeltaChunkObject other && Equals(other); - /// - public bool Equals(MessageDeltaChunkObject 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.Projects/src/Generated/MessageDeltaContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.Serialization.cs deleted file mode 100644 index 06b3dbaa6e0b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.Serialization.cs +++ /dev/null @@ -1,136 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownMessageDeltaContent))] - public partial class MessageDeltaContent : 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(MessageDeltaContent)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - 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 - } - } - } - - MessageDeltaContent 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(MessageDeltaContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaContent(document.RootElement, options); - } - - internal static MessageDeltaContent DeserializeMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image_file": return MessageDeltaImageFileContent.DeserializeMessageDeltaImageFileContent(element, options); - case "text": return MessageDeltaTextContent.DeserializeMessageDeltaTextContent(element, options); - } - } - return UnknownMessageDeltaContent.DeserializeUnknownMessageDeltaContent(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaContent)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaContent 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 DeserializeMessageDeltaContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaContent)} 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 MessageDeltaContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaContent(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs deleted file mode 100644 index 367980dcb8a0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaContent.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// The abstract base representation of a partial streamed message content payload. - /// 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 abstract partial class MessageDeltaContent - { - /// - /// 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 . - /// The index of the content part of the message. - protected MessageDeltaContent(int index) - { - Index = index; - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaContent(int index, string type, IDictionary serializedAdditionalRawData) - { - Index = index; - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaContent() - { - } - - /// The index of the content part of the message. - public int Index { get; } - /// The type of content for this content part. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs deleted file mode 100644 index c0e90a53d7bd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaImageFileContent : 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(MessageDeltaImageFileContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(ImageFile)) - { - writer.WritePropertyName("image_file"u8); - writer.WriteObjectValue(ImageFile, options); - } - } - - MessageDeltaImageFileContent 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(MessageDeltaImageFileContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaImageFileContent(document.RootElement, options); - } - - internal static MessageDeltaImageFileContent DeserializeMessageDeltaImageFileContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageDeltaImageFileContentObject imageFile = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image_file"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - imageFile = MessageDeltaImageFileContentObject.DeserializeMessageDeltaImageFileContentObject(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 MessageDeltaImageFileContent(index, type, serializedAdditionalRawData, imageFile); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaImageFileContent)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaImageFileContent 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 DeserializeMessageDeltaImageFileContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaImageFileContent)} 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 new MessageDeltaImageFileContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaImageFileContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs deleted file mode 100644 index 782ee27b4b55..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContent.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Represents a streamed image file content part within a streaming message delta chunk. - public partial class MessageDeltaImageFileContent : MessageDeltaContent - { - /// Initializes a new instance of . - /// The index of the content part of the message. - internal MessageDeltaImageFileContent(int index) : base(index) - { - Type = "image_file"; - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// Keeps track of any properties unknown to the library. - /// The image_file data. - internal MessageDeltaImageFileContent(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaImageFileContentObject imageFile) : base(index, type, serializedAdditionalRawData) - { - ImageFile = imageFile; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaImageFileContent() - { - } - - /// The image_file data. - public MessageDeltaImageFileContentObject ImageFile { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs deleted file mode 100644 index 92257c0cadc5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.Serialization.cs +++ /dev/null @@ -1,145 +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.Projects -{ - public partial class MessageDeltaImageFileContentObject : 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(MessageDeltaImageFileContentObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - 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 - } - } - } - - MessageDeltaImageFileContentObject 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(MessageDeltaImageFileContentObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaImageFileContentObject(document.RootElement, options); - } - - internal static MessageDeltaImageFileContentObject DeserializeMessageDeltaImageFileContentObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaImageFileContentObject(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaImageFileContentObject)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaImageFileContentObject 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 DeserializeMessageDeltaImageFileContentObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaImageFileContentObject)} 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 MessageDeltaImageFileContentObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaImageFileContentObject(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.cs deleted file mode 100644 index e62ccc339207..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaImageFileContentObject.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents the 'image_file' payload within streaming image file content. - public partial class MessageDeltaImageFileContentObject - { - /// - /// 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 MessageDeltaImageFileContentObject() - { - } - - /// Initializes a new instance of . - /// The file ID of the image in the message content. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaImageFileContentObject(string fileId, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The file ID of the image in the message content. - public string FileId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs deleted file mode 100644 index 0ebf9a44c4e2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.Serialization.cs +++ /dev/null @@ -1,137 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownMessageDeltaTextAnnotation))] - public partial class MessageDeltaTextAnnotation : 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(MessageDeltaTextAnnotation)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - 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 - } - } - } - - MessageDeltaTextAnnotation 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(MessageDeltaTextAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextAnnotation(document.RootElement, options); - } - - internal static MessageDeltaTextAnnotation DeserializeMessageDeltaTextAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "file_citation": return MessageDeltaTextFileCitationAnnotation.DeserializeMessageDeltaTextFileCitationAnnotation(element, options); - case "file_path": return MessageDeltaTextFilePathAnnotation.DeserializeMessageDeltaTextFilePathAnnotation(element, options); - case "url_citation": return MessageDeltaTextUrlCitationAnnotation.DeserializeMessageDeltaTextUrlCitationAnnotation(element, options); - } - } - return UnknownMessageDeltaTextAnnotation.DeserializeUnknownMessageDeltaTextAnnotation(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextAnnotation 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 DeserializeMessageDeltaTextAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextAnnotation)} 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 MessageDeltaTextAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextAnnotation(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs deleted file mode 100644 index f3dea9aa929d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextAnnotation.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// The abstract base representation of a streamed text content part's text annotation. - /// 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 abstract partial class MessageDeltaTextAnnotation - { - /// - /// 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 . - /// The index of the annotation within a text content part. - protected MessageDeltaTextAnnotation(int index) - { - Index = index; - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaTextAnnotation(int index, string type, IDictionary serializedAdditionalRawData) - { - Index = index; - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextAnnotation() - { - } - - /// The index of the annotation within a text content part. - public int Index { get; } - /// The type of the text content annotation. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs deleted file mode 100644 index a29d76a0c1e1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextContent : 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(MessageDeltaTextContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Text)) - { - writer.WritePropertyName("text"u8); - writer.WriteObjectValue(Text, options); - } - } - - MessageDeltaTextContent 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(MessageDeltaTextContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextContent(document.RootElement, options); - } - - internal static MessageDeltaTextContent DeserializeMessageDeltaTextContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageDeltaTextContentObject text = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - text = MessageDeltaTextContentObject.DeserializeMessageDeltaTextContentObject(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 MessageDeltaTextContent(index, type, serializedAdditionalRawData, text); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextContent)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextContent 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 DeserializeMessageDeltaTextContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextContent)} 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 new MessageDeltaTextContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs deleted file mode 100644 index af3ed70f6d9c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContent.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Represents a streamed text content part within a streaming message delta chunk. - public partial class MessageDeltaTextContent : MessageDeltaContent - { - /// Initializes a new instance of . - /// The index of the content part of the message. - internal MessageDeltaTextContent(int index) : base(index) - { - Type = "text"; - } - - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// Keeps track of any properties unknown to the library. - /// The text content details. - internal MessageDeltaTextContent(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaTextContentObject text) : base(index, type, serializedAdditionalRawData) - { - Text = text; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextContent() - { - } - - /// The text content details. - public MessageDeltaTextContentObject Text { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs deleted file mode 100644 index 8660b0da04b6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextContentObject : 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(MessageDeltaTextContentObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Value)) - { - writer.WritePropertyName("value"u8); - writer.WriteStringValue(Value); - } - if (Optional.IsCollectionDefined(Annotations)) - { - writer.WritePropertyName("annotations"u8); - writer.WriteStartArray(); - foreach (var item in Annotations) - { - 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 - } - } - } - - MessageDeltaTextContentObject 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(MessageDeltaTextContentObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextContentObject(document.RootElement, options); - } - - internal static MessageDeltaTextContentObject DeserializeMessageDeltaTextContentObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string value = default; - IReadOnlyList annotations = 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("annotations"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageDeltaTextAnnotation.DeserializeMessageDeltaTextAnnotation(item, options)); - } - annotations = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaTextContentObject(value, annotations ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextContentObject)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextContentObject 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 DeserializeMessageDeltaTextContentObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextContentObject)} 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 MessageDeltaTextContentObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextContentObject(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.cs deleted file mode 100644 index 58f826ce5db7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextContentObject.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.AI.Projects -{ - /// Represents the data of a streamed text content part within a streaming message delta chunk. - public partial class MessageDeltaTextContentObject - { - /// - /// 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 MessageDeltaTextContentObject() - { - Annotations = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The data that makes up the text. - /// - /// Annotations for the text. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal MessageDeltaTextContentObject(string value, IReadOnlyList annotations, IDictionary serializedAdditionalRawData) - { - Value = value; - Annotations = annotations; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The data that makes up the text. - public string Value { get; } - /// - /// Annotations for the text. - /// 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 IReadOnlyList Annotations { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs deleted file mode 100644 index 47ee6ede6619..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextFileCitationAnnotation : 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(MessageDeltaTextFileCitationAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(FileCitation)) - { - writer.WritePropertyName("file_citation"u8); - writer.WriteObjectValue(FileCitation, options); - } - if (Optional.IsDefined(Text)) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - } - - MessageDeltaTextFileCitationAnnotation 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(MessageDeltaTextFileCitationAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextFileCitationAnnotation(document.RootElement, options); - } - - internal static MessageDeltaTextFileCitationAnnotation DeserializeMessageDeltaTextFileCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageDeltaTextFileCitationAnnotationObject fileCitation = default; - string text = default; - int? startIndex = default; - int? endIndex = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_citation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileCitation = MessageDeltaTextFileCitationAnnotationObject.DeserializeMessageDeltaTextFileCitationAnnotationObject(property.Value, options); - continue; - } - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 MessageDeltaTextFileCitationAnnotation( - index, - type, - serializedAdditionalRawData, - fileCitation, - text, - startIndex, - endIndex); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFileCitationAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextFileCitationAnnotation 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 DeserializeMessageDeltaTextFileCitationAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFileCitationAnnotation)} 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 new MessageDeltaTextFileCitationAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextFileCitationAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs deleted file mode 100644 index f22164e3a330..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotation.cs +++ /dev/null @@ -1,53 +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.Projects -{ - /// Represents a streamed file citation applied to a streaming text content part. - public partial class MessageDeltaTextFileCitationAnnotation : MessageDeltaTextAnnotation - { - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - internal MessageDeltaTextFileCitationAnnotation(int index) : base(index) - { - Type = "file_citation"; - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// Keeps track of any properties unknown to the library. - /// The file citation information. - /// The text in the message content that needs to be replaced. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - internal MessageDeltaTextFileCitationAnnotation(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaTextFileCitationAnnotationObject fileCitation, string text, int? startIndex, int? endIndex) : base(index, type, serializedAdditionalRawData) - { - FileCitation = fileCitation; - Text = text; - StartIndex = startIndex; - EndIndex = endIndex; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextFileCitationAnnotation() - { - } - - /// The file citation information. - public MessageDeltaTextFileCitationAnnotationObject FileCitation { get; } - /// The text in the message content that needs to be replaced. - public string Text { get; } - /// The start index of this annotation in the content text. - public int? StartIndex { get; } - /// The end index of this annotation in the content text. - public int? EndIndex { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs deleted file mode 100644 index ea535eec934f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextFileCitationAnnotationObject : 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(MessageDeltaTextFileCitationAnnotationObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - if (Optional.IsDefined(Quote)) - { - writer.WritePropertyName("quote"u8); - writer.WriteStringValue(Quote); - } - 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 - } - } - } - - MessageDeltaTextFileCitationAnnotationObject 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(MessageDeltaTextFileCitationAnnotationObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextFileCitationAnnotationObject(document.RootElement, options); - } - - internal static MessageDeltaTextFileCitationAnnotationObject DeserializeMessageDeltaTextFileCitationAnnotationObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - string quote = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("quote"u8)) - { - quote = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaTextFileCitationAnnotationObject(fileId, quote, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFileCitationAnnotationObject)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextFileCitationAnnotationObject 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 DeserializeMessageDeltaTextFileCitationAnnotationObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFileCitationAnnotationObject)} 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 MessageDeltaTextFileCitationAnnotationObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextFileCitationAnnotationObject(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.cs deleted file mode 100644 index ef326afe631b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFileCitationAnnotationObject.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.AI.Projects -{ - /// Represents the data of a streamed file citation as applied to a streaming text content part. - public partial class MessageDeltaTextFileCitationAnnotationObject - { - /// - /// 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 MessageDeltaTextFileCitationAnnotationObject() - { - } - - /// Initializes a new instance of . - /// The ID of the specific file the citation is from. - /// The specific quote in the cited file. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaTextFileCitationAnnotationObject(string fileId, string quote, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - Quote = quote; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The ID of the specific file the citation is from. - public string FileId { get; } - /// The specific quote in the cited file. - public string Quote { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs deleted file mode 100644 index 4508bad7e0ce..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.Serialization.cs +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextFilePathAnnotation : 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(MessageDeltaTextFilePathAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(FilePath)) - { - writer.WritePropertyName("file_path"u8); - writer.WriteObjectValue(FilePath, options); - } - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - if (Optional.IsDefined(Text)) - { - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - } - - MessageDeltaTextFilePathAnnotation 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(MessageDeltaTextFilePathAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextFilePathAnnotation(document.RootElement, options); - } - - internal static MessageDeltaTextFilePathAnnotation DeserializeMessageDeltaTextFilePathAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageDeltaTextFilePathAnnotationObject filePath = default; - int? startIndex = default; - int? endIndex = default; - string text = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_path"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - filePath = MessageDeltaTextFilePathAnnotationObject.DeserializeMessageDeltaTextFilePathAnnotationObject(property.Value, options); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 MessageDeltaTextFilePathAnnotation( - index, - type, - serializedAdditionalRawData, - filePath, - startIndex, - endIndex, - text); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFilePathAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextFilePathAnnotation 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 DeserializeMessageDeltaTextFilePathAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFilePathAnnotation)} 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 new MessageDeltaTextFilePathAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextFilePathAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs deleted file mode 100644 index 90bf54d5059b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotation.cs +++ /dev/null @@ -1,53 +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.Projects -{ - /// Represents a streamed file path annotation applied to a streaming text content part. - public partial class MessageDeltaTextFilePathAnnotation : MessageDeltaTextAnnotation - { - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - internal MessageDeltaTextFilePathAnnotation(int index) : base(index) - { - Type = "file_path"; - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// Keeps track of any properties unknown to the library. - /// The file path information. - /// The start index of this annotation in the content text. - /// The end index of this annotation in the content text. - /// The text in the message content that needs to be replaced. - internal MessageDeltaTextFilePathAnnotation(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaTextFilePathAnnotationObject filePath, int? startIndex, int? endIndex, string text) : base(index, type, serializedAdditionalRawData) - { - FilePath = filePath; - StartIndex = startIndex; - EndIndex = endIndex; - Text = text; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextFilePathAnnotation() - { - } - - /// The file path information. - public MessageDeltaTextFilePathAnnotationObject FilePath { get; } - /// The start index of this annotation in the content text. - public int? StartIndex { get; } - /// The end index of this annotation in the content text. - public int? EndIndex { get; } - /// The text in the message content that needs to be replaced. - public string Text { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs deleted file mode 100644 index 1f556c48c323..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.Serialization.cs +++ /dev/null @@ -1,145 +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.Projects -{ - public partial class MessageDeltaTextFilePathAnnotationObject : 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(MessageDeltaTextFilePathAnnotationObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - 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 - } - } - } - - MessageDeltaTextFilePathAnnotationObject 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(MessageDeltaTextFilePathAnnotationObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextFilePathAnnotationObject(document.RootElement, options); - } - - internal static MessageDeltaTextFilePathAnnotationObject DeserializeMessageDeltaTextFilePathAnnotationObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaTextFilePathAnnotationObject(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFilePathAnnotationObject)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextFilePathAnnotationObject 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 DeserializeMessageDeltaTextFilePathAnnotationObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextFilePathAnnotationObject)} 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 MessageDeltaTextFilePathAnnotationObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextFilePathAnnotationObject(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.cs deleted file mode 100644 index 0bc0e8a00517..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextFilePathAnnotationObject.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents the data of a streamed file path annotation as applied to a streaming text content part. - public partial class MessageDeltaTextFilePathAnnotationObject - { - /// - /// 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 MessageDeltaTextFilePathAnnotationObject() - { - } - - /// Initializes a new instance of . - /// The file ID for the annotation. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaTextFilePathAnnotationObject(string fileId, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The file ID for the annotation. - public string FileId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.Serialization.cs deleted file mode 100644 index ffebf235d348..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.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.Projects -{ - public partial class MessageDeltaTextUrlCitationAnnotation : 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(MessageDeltaTextUrlCitationAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("url_citation"u8); - writer.WriteObjectValue(UrlCitation, options); - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - } - - MessageDeltaTextUrlCitationAnnotation 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(MessageDeltaTextUrlCitationAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement, options); - } - - internal static MessageDeltaTextUrlCitationAnnotation DeserializeMessageDeltaTextUrlCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageDeltaTextUrlCitationDetails urlCitation = default; - int? startIndex = default; - int? endIndex = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url_citation"u8)) - { - urlCitation = MessageDeltaTextUrlCitationDetails.DeserializeMessageDeltaTextUrlCitationDetails(property.Value, options); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 MessageDeltaTextUrlCitationAnnotation( - index, - type, - serializedAdditionalRawData, - urlCitation, - startIndex, - endIndex); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextUrlCitationAnnotation 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 DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationAnnotation)} 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 new MessageDeltaTextUrlCitationAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextUrlCitationAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs deleted file mode 100644 index 6901df6957b2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationAnnotation.cs +++ /dev/null @@ -1,54 +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.Projects -{ - /// A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet. - public partial class MessageDeltaTextUrlCitationAnnotation : MessageDeltaTextAnnotation - { - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The details of the URL citation. - /// is null. - internal MessageDeltaTextUrlCitationAnnotation(int index, MessageDeltaTextUrlCitationDetails urlCitation) : base(index) - { - Argument.AssertNotNull(urlCitation, nameof(urlCitation)); - - Type = "url_citation"; - UrlCitation = urlCitation; - } - - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// Keeps track of any properties unknown to the library. - /// The details of the URL citation. - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - internal MessageDeltaTextUrlCitationAnnotation(int index, string type, IDictionary serializedAdditionalRawData, MessageDeltaTextUrlCitationDetails urlCitation, int? startIndex, int? endIndex) : base(index, type, serializedAdditionalRawData) - { - UrlCitation = urlCitation; - StartIndex = startIndex; - EndIndex = endIndex; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextUrlCitationAnnotation() - { - } - - /// The details of the URL citation. - public MessageDeltaTextUrlCitationDetails UrlCitation { get; } - /// The first text index associated with this text annotation. - public int? StartIndex { get; } - /// The last text index associated with this text annotation. - public int? EndIndex { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.cs deleted file mode 100644 index 0ecf60293a41..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageDeltaTextUrlCitationDetails : 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(MessageDeltaTextUrlCitationDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url); - if (Optional.IsDefined(Title)) - { - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); - } - 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 - } - } - } - - MessageDeltaTextUrlCitationDetails 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(MessageDeltaTextUrlCitationDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextUrlCitationDetails(document.RootElement, options); - } - - internal static MessageDeltaTextUrlCitationDetails DeserializeMessageDeltaTextUrlCitationDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string url = default; - string title = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - url = property.Value.GetString(); - continue; - } - if (property.NameEquals("title"u8)) - { - title = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageDeltaTextUrlCitationDetails(url, title, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextUrlCitationDetails 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 DeserializeMessageDeltaTextUrlCitationDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextUrlCitationDetails)} 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 MessageDeltaTextUrlCitationDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageDeltaTextUrlCitationDetails(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/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.cs deleted file mode 100644 index 26223d2ee019..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageDeltaTextUrlCitationDetails.cs +++ /dev/null @@ -1,79 +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.Projects -{ - /// A representation of a URL citation, as used in text thread message content. - public partial class MessageDeltaTextUrlCitationDetails - { - /// - /// 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 URL associated with this citation. - /// is null. - internal MessageDeltaTextUrlCitationDetails(string url) - { - Argument.AssertNotNull(url, nameof(url)); - - Url = url; - } - - /// Initializes a new instance of . - /// The URL associated with this citation. - /// The title of the URL. - /// Keeps track of any properties unknown to the library. - internal MessageDeltaTextUrlCitationDetails(string url, string title, IDictionary serializedAdditionalRawData) - { - Url = url; - Title = title; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageDeltaTextUrlCitationDetails() - { - } - - /// The URL associated with this citation. - public string Url { get; } - /// The title of the URL. - public string Title { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs deleted file mode 100644 index d3d3e82b7990..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class MessageImageFileContent : 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(MessageImageFileContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("image_file"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - MessageImageFileContent 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(MessageImageFileContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageImageFileContent(document.RootElement, options); - } - - internal static MessageImageFileContent DeserializeMessageImageFileContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalMessageImageFileDetails imageFile = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image_file"u8)) - { - imageFile = InternalMessageImageFileDetails.DeserializeInternalMessageImageFileDetails(property.Value, options); - 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 MessageImageFileContent(type, serializedAdditionalRawData, imageFile); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageImageFileContent)} does not support writing '{options.Format}' format."); - } - } - - MessageImageFileContent 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 DeserializeMessageImageFileContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageImageFileContent)} 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 new MessageImageFileContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageImageFileContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs deleted file mode 100644 index 02acadb61ba2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileContent.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// A representation of image file content in a thread message. - public partial class MessageImageFileContent : MessageContent - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The image file for this thread message content item. - internal MessageImageFileContent(string type, IDictionary serializedAdditionalRawData, InternalMessageImageFileDetails internalDetails) : base(type, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal MessageImageFileContent() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.Serialization.cs deleted file mode 100644 index 64b54d66f018..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.Serialization.cs +++ /dev/null @@ -1,157 +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.Projects -{ - public partial class MessageImageFileParam : 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(MessageImageFileParam)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - if (Optional.IsDefined(Detail)) - { - writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.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 - } - } - } - - MessageImageFileParam 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(MessageImageFileParam)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageImageFileParam(document.RootElement, options); - } - - internal static MessageImageFileParam DeserializeMessageImageFileParam(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - ImageDetailLevel? detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("detail"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detail = new ImageDetailLevel(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageImageFileParam(fileId, detail, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageImageFileParam)} does not support writing '{options.Format}' format."); - } - } - - MessageImageFileParam 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 DeserializeMessageImageFileParam(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageImageFileParam)} 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 MessageImageFileParam FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageImageFileParam(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/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.cs deleted file mode 100644 index 7d8ac41222aa..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageFileParam.cs +++ /dev/null @@ -1,79 +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.Projects -{ - /// Defines how an internally uploaded image file is referenced when creating an image-file block. - public partial class MessageImageFileParam - { - /// - /// 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 previously uploaded image file. - /// is null. - public MessageImageFileParam(string fileId) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - - FileId = fileId; - } - - /// Initializes a new instance of . - /// The ID of the previously uploaded image file. - /// Optional detail level for the image (auto, low, or high). - /// Keeps track of any properties unknown to the library. - internal MessageImageFileParam(string fileId, ImageDetailLevel? detail, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - Detail = detail; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageImageFileParam() - { - } - - /// The ID of the previously uploaded image file. - public string FileId { get; } - /// Optional detail level for the image (auto, low, or high). - public ImageDetailLevel? Detail { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.Serialization.cs deleted file mode 100644 index da595d4f3f83..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.Serialization.cs +++ /dev/null @@ -1,157 +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.Projects -{ - public partial class MessageImageUrlParam : 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(MessageImageUrlParam)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url); - if (Optional.IsDefined(Detail)) - { - writer.WritePropertyName("detail"u8); - writer.WriteStringValue(Detail.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 - } - } - } - - MessageImageUrlParam 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(MessageImageUrlParam)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageImageUrlParam(document.RootElement, options); - } - - internal static MessageImageUrlParam DeserializeMessageImageUrlParam(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string url = default; - ImageDetailLevel? detail = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - url = property.Value.GetString(); - continue; - } - if (property.NameEquals("detail"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - detail = new ImageDetailLevel(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageImageUrlParam(url, detail, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageImageUrlParam)} does not support writing '{options.Format}' format."); - } - } - - MessageImageUrlParam 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 DeserializeMessageImageUrlParam(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageImageUrlParam)} 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 MessageImageUrlParam FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageImageUrlParam(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/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.cs deleted file mode 100644 index 5bdb1cda03f9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageImageUrlParam.cs +++ /dev/null @@ -1,79 +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.Projects -{ - /// Defines how an external image URL is referenced when creating an image-URL block. - public partial class MessageImageUrlParam - { - /// - /// 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 publicly accessible URL of the external image. - /// is null. - public MessageImageUrlParam(string url) - { - Argument.AssertNotNull(url, nameof(url)); - - Url = url; - } - - /// Initializes a new instance of . - /// The publicly accessible URL of the external image. - /// Optional detail level for the image (auto, low, or high). Defaults to 'auto' if not specified. - /// Keeps track of any properties unknown to the library. - internal MessageImageUrlParam(string url, ImageDetailLevel? detail, IDictionary serializedAdditionalRawData) - { - Url = url; - Detail = detail; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageImageUrlParam() - { - } - - /// The publicly accessible URL of the external image. - public string Url { get; } - /// Optional detail level for the image (auto, low, or high). Defaults to 'auto' if not specified. - public ImageDetailLevel? Detail { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs deleted file mode 100644 index 0a98936f9c18..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class MessageIncompleteDetails : 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(MessageIncompleteDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("reason"u8); - writer.WriteStringValue(Reason.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 - } - } - } - - MessageIncompleteDetails 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(MessageIncompleteDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageIncompleteDetails(document.RootElement, options); - } - - internal static MessageIncompleteDetails DeserializeMessageIncompleteDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageIncompleteDetailsReason reason = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("reason"u8)) - { - reason = new MessageIncompleteDetailsReason(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageIncompleteDetails(reason, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageIncompleteDetails)} does not support writing '{options.Format}' format."); - } - } - - MessageIncompleteDetails 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 DeserializeMessageIncompleteDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageIncompleteDetails)} 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 MessageIncompleteDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageIncompleteDetails(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/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.cs deleted file mode 100644 index 5688889deda3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetails.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.Projects -{ - /// Information providing additional detail about a message entering an incomplete status. - public partial class MessageIncompleteDetails - { - /// - /// 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 provided reason describing why the message was marked as incomplete. - internal MessageIncompleteDetails(MessageIncompleteDetailsReason reason) - { - Reason = reason; - } - - /// Initializes a new instance of . - /// The provided reason describing why the message was marked as incomplete. - /// Keeps track of any properties unknown to the library. - internal MessageIncompleteDetails(MessageIncompleteDetailsReason reason, IDictionary serializedAdditionalRawData) - { - Reason = reason; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageIncompleteDetails() - { - } - - /// The provided reason describing why the message was marked as incomplete. - public MessageIncompleteDetailsReason Reason { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.cs deleted file mode 100644 index 46c6f650afab..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageIncompleteDetailsReason.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// A set of reasons describing why a message is marked as incomplete. - public readonly partial struct MessageIncompleteDetailsReason : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageIncompleteDetailsReason(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ContentFilterValue = "content_filter"; - private const string MaxTokensValue = "max_tokens"; - private const string RunCancelledValue = "run_cancelled"; - private const string RunFailedValue = "run_failed"; - private const string RunExpiredValue = "run_expired"; - - /// The run generating the message was terminated due to content filter flagging. - public static MessageIncompleteDetailsReason ContentFilter { get; } = new MessageIncompleteDetailsReason(ContentFilterValue); - /// The run generating the message exhausted available tokens before completion. - public static MessageIncompleteDetailsReason MaxTokens { get; } = new MessageIncompleteDetailsReason(MaxTokensValue); - /// The run generating the message was cancelled before completion. - public static MessageIncompleteDetailsReason RunCancelled { get; } = new MessageIncompleteDetailsReason(RunCancelledValue); - /// The run generating the message failed. - public static MessageIncompleteDetailsReason RunFailed { get; } = new MessageIncompleteDetailsReason(RunFailedValue); - /// The run generating the message expired. - public static MessageIncompleteDetailsReason RunExpired { get; } = new MessageIncompleteDetailsReason(RunExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(MessageIncompleteDetailsReason left, MessageIncompleteDetailsReason right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageIncompleteDetailsReason left, MessageIncompleteDetailsReason right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageIncompleteDetailsReason(string value) => new MessageIncompleteDetailsReason(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageIncompleteDetailsReason other && Equals(other); - /// - public bool Equals(MessageIncompleteDetailsReason 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.Projects/src/Generated/MessageInputContentBlock.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputContentBlock.Serialization.cs deleted file mode 100644 index 8c24963a5b8f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputContentBlock.Serialization.cs +++ /dev/null @@ -1,135 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownMessageInputContentBlock))] - public partial class MessageInputContentBlock : 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(MessageInputContentBlock)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - MessageInputContentBlock 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(MessageInputContentBlock)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageInputContentBlock(document.RootElement, options); - } - - internal static MessageInputContentBlock DeserializeMessageInputContentBlock(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image_file": return MessageInputImageFileBlock.DeserializeMessageInputImageFileBlock(element, options); - case "image_url": return MessageInputImageUrlBlock.DeserializeMessageInputImageUrlBlock(element, options); - case "text": return MessageInputTextBlock.DeserializeMessageInputTextBlock(element, options); - } - } - return UnknownMessageInputContentBlock.DeserializeUnknownMessageInputContentBlock(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageInputContentBlock)} does not support writing '{options.Format}' format."); - } - } - - MessageInputContentBlock 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 DeserializeMessageInputContentBlock(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageInputContentBlock)} 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 MessageInputContentBlock FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageInputContentBlock(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/ai/Azure.AI.Projects/src/Generated/MessageInputContentBlock.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputContentBlock.cs deleted file mode 100644 index 833cdad0dbcf..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputContentBlock.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.AI.Projects -{ - /// - /// Defines a single content block when creating a message. The 'type' field determines whether it is text, an image file, or an external image URL, etc. - /// 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 abstract partial class MessageInputContentBlock - { - /// - /// 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 MessageInputContentBlock() - { - } - - /// Initializes a new instance of . - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - /// Keeps track of any properties unknown to the library. - internal MessageInputContentBlock(MessageBlockType type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - internal MessageBlockType Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.Serialization.cs deleted file mode 100644 index 26cbf3ff5d31..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class MessageInputImageFileBlock : 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(MessageInputImageFileBlock)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("image_file"u8); - writer.WriteObjectValue(ImageFile, options); - } - - MessageInputImageFileBlock 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(MessageInputImageFileBlock)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageInputImageFileBlock(document.RootElement, options); - } - - internal static MessageInputImageFileBlock DeserializeMessageInputImageFileBlock(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageImageFileParam imageFile = default; - MessageBlockType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image_file"u8)) - { - imageFile = MessageImageFileParam.DeserializeMessageImageFileParam(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new MessageBlockType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageInputImageFileBlock(type, serializedAdditionalRawData, imageFile); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageInputImageFileBlock)} does not support writing '{options.Format}' format."); - } - } - - MessageInputImageFileBlock 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 DeserializeMessageInputImageFileBlock(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageInputImageFileBlock)} 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 new MessageInputImageFileBlock FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageInputImageFileBlock(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.cs deleted file mode 100644 index fe86d8a41677..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageFileBlock.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// An image-file block in a new message, referencing an internally uploaded image by file ID. - public partial class MessageInputImageFileBlock : MessageInputContentBlock - { - /// Initializes a new instance of . - /// Information about the referenced image file, including file ID and optional detail level. - /// is null. - public MessageInputImageFileBlock(MessageImageFileParam imageFile) - { - Argument.AssertNotNull(imageFile, nameof(imageFile)); - - Type = MessageBlockType.ImageFile; - ImageFile = imageFile; - } - - /// Initializes a new instance of . - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - /// Keeps track of any properties unknown to the library. - /// Information about the referenced image file, including file ID and optional detail level. - internal MessageInputImageFileBlock(MessageBlockType type, IDictionary serializedAdditionalRawData, MessageImageFileParam imageFile) : base(type, serializedAdditionalRawData) - { - ImageFile = imageFile; - } - - /// Initializes a new instance of for deserialization. - internal MessageInputImageFileBlock() - { - } - - /// Information about the referenced image file, including file ID and optional detail level. - public MessageImageFileParam ImageFile { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.Serialization.cs deleted file mode 100644 index c2f3dbd02e11..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class MessageInputImageUrlBlock : 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(MessageInputImageUrlBlock)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("image_url"u8); - writer.WriteObjectValue(ImageUrl, options); - } - - MessageInputImageUrlBlock 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(MessageInputImageUrlBlock)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageInputImageUrlBlock(document.RootElement, options); - } - - internal static MessageInputImageUrlBlock DeserializeMessageInputImageUrlBlock(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageImageUrlParam imageUrl = default; - MessageBlockType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image_url"u8)) - { - imageUrl = MessageImageUrlParam.DeserializeMessageImageUrlParam(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new MessageBlockType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageInputImageUrlBlock(type, serializedAdditionalRawData, imageUrl); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageInputImageUrlBlock)} does not support writing '{options.Format}' format."); - } - } - - MessageInputImageUrlBlock 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 DeserializeMessageInputImageUrlBlock(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageInputImageUrlBlock)} 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 new MessageInputImageUrlBlock FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageInputImageUrlBlock(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.cs deleted file mode 100644 index 7bcaf487cecc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputImageUrlBlock.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// An image-URL block in a new message, referencing an external image by URL. - public partial class MessageInputImageUrlBlock : MessageInputContentBlock - { - /// Initializes a new instance of . - /// Information about the external image URL, including the URL and optional detail level. - /// is null. - public MessageInputImageUrlBlock(MessageImageUrlParam imageUrl) - { - Argument.AssertNotNull(imageUrl, nameof(imageUrl)); - - Type = MessageBlockType.ImageUrl; - ImageUrl = imageUrl; - } - - /// Initializes a new instance of . - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - /// Keeps track of any properties unknown to the library. - /// Information about the external image URL, including the URL and optional detail level. - internal MessageInputImageUrlBlock(MessageBlockType type, IDictionary serializedAdditionalRawData, MessageImageUrlParam imageUrl) : base(type, serializedAdditionalRawData) - { - ImageUrl = imageUrl; - } - - /// Initializes a new instance of for deserialization. - internal MessageInputImageUrlBlock() - { - } - - /// Information about the external image URL, including the URL and optional detail level. - public MessageImageUrlParam ImageUrl { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.Serialization.cs deleted file mode 100644 index f9d2e5a7174b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class MessageInputTextBlock : 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(MessageInputTextBlock)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); - writer.WriteStringValue(Text); - } - - MessageInputTextBlock 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(MessageInputTextBlock)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageInputTextBlock(document.RootElement, options); - } - - internal static MessageInputTextBlock DeserializeMessageInputTextBlock(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string text = default; - MessageBlockType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new MessageBlockType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageInputTextBlock(type, serializedAdditionalRawData, text); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageInputTextBlock)} does not support writing '{options.Format}' format."); - } - } - - MessageInputTextBlock 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 DeserializeMessageInputTextBlock(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageInputTextBlock)} 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 new MessageInputTextBlock FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageInputTextBlock(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.cs deleted file mode 100644 index 1e7846da5eb5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageInputTextBlock.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// A text block in a new message, containing plain text content. - public partial class MessageInputTextBlock : MessageInputContentBlock - { - /// Initializes a new instance of . - /// The plain text content for this block. - /// is null. - public MessageInputTextBlock(string text) - { - Argument.AssertNotNull(text, nameof(text)); - - Type = MessageBlockType.Text; - Text = text; - } - - /// Initializes a new instance of . - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - /// Keeps track of any properties unknown to the library. - /// The plain text content for this block. - internal MessageInputTextBlock(MessageBlockType type, IDictionary serializedAdditionalRawData, string text) : base(type, serializedAdditionalRawData) - { - Text = text; - } - - /// Initializes a new instance of for deserialization. - internal MessageInputTextBlock() - { - } - - /// The plain text content for this block. - public string Text { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.cs deleted file mode 100644 index e60b22c12089..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageRole.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.AI.Projects -{ - /// The possible values for roles attributed to messages in a thread. - public readonly partial struct MessageRole : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageRole(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserValue = "user"; - private const string AgentValue = "assistant"; - - /// The role representing the end-user. - public static MessageRole User { get; } = new MessageRole(UserValue); - /// The role representing the agent. - public static MessageRole Agent { get; } = new MessageRole(AgentValue); - /// Determines if two values are the same. - public static bool operator ==(MessageRole left, MessageRole right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageRole left, MessageRole right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageRole(string value) => new MessageRole(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageRole other && Equals(other); - /// - public bool Equals(MessageRole 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.Projects/src/Generated/MessageStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageStatus.cs deleted file mode 100644 index 79b8382bc0ef..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The possible execution status values for a thread message. - public readonly partial struct MessageStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string IncompleteValue = "incomplete"; - private const string CompletedValue = "completed"; - - /// A run is currently creating this message. - public static MessageStatus InProgress { get; } = new MessageStatus(InProgressValue); - /// This message is incomplete. See incomplete_details for more information. - public static MessageStatus Incomplete { get; } = new MessageStatus(IncompleteValue); - /// This message was successfully completed by a run. - public static MessageStatus Completed { get; } = new MessageStatus(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(MessageStatus left, MessageStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageStatus left, MessageStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageStatus(string value) => new MessageStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageStatus other && Equals(other); - /// - public bool Equals(MessageStatus 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.Projects/src/Generated/MessageStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageStreamEvent.cs deleted file mode 100644 index 333c12b43a3f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageStreamEvent.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Message operation related streaming events. - public readonly partial struct MessageStreamEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MessageStreamEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadMessageCreatedValue = "thread.message.created"; - private const string ThreadMessageInProgressValue = "thread.message.in_progress"; - private const string ThreadMessageDeltaValue = "thread.message.delta"; - private const string ThreadMessageCompletedValue = "thread.message.completed"; - private const string ThreadMessageIncompleteValue = "thread.message.incomplete"; - - /// Event sent when a new message is created. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageCreated { get; } = new MessageStreamEvent(ThreadMessageCreatedValue); - /// Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageInProgress { get; } = new MessageStreamEvent(ThreadMessageInProgressValue); - /// Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk. - public static MessageStreamEvent ThreadMessageDelta { get; } = new MessageStreamEvent(ThreadMessageDeltaValue); - /// Event sent when a message is completed. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageCompleted { get; } = new MessageStreamEvent(ThreadMessageCompletedValue); - /// Event sent before a message is completed. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageIncomplete { get; } = new MessageStreamEvent(ThreadMessageIncompleteValue); - /// Determines if two values are the same. - public static bool operator ==(MessageStreamEvent left, MessageStreamEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MessageStreamEvent left, MessageStreamEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator MessageStreamEvent(string value) => new MessageStreamEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MessageStreamEvent other && Equals(other); - /// - public bool Equals(MessageStreamEvent 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.Projects/src/Generated/MessageTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.Serialization.cs deleted file mode 100644 index 24918365780e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.Serialization.cs +++ /dev/null @@ -1,137 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownMessageTextAnnotation))] - public partial class MessageTextAnnotation : 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(MessageTextAnnotation)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - 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 - } - } - } - - MessageTextAnnotation 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(MessageTextAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextAnnotation(document.RootElement, options); - } - - internal static MessageTextAnnotation DeserializeMessageTextAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "file_citation": return MessageTextFileCitationAnnotation.DeserializeMessageTextFileCitationAnnotation(element, options); - case "file_path": return MessageTextFilePathAnnotation.DeserializeMessageTextFilePathAnnotation(element, options); - case "url_citation": return MessageTextUrlCitationAnnotation.DeserializeMessageTextUrlCitationAnnotation(element, options); - } - } - return UnknownMessageTextAnnotation.DeserializeUnknownMessageTextAnnotation(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageTextAnnotation 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 DeserializeMessageTextAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextAnnotation)} 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 MessageTextAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextAnnotation(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/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.cs deleted file mode 100644 index 833119a2a8ec..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextAnnotation.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; - -namespace Azure.AI.Projects -{ - /// - /// An abstract representation of an annotation to text thread message content. - /// 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 abstract partial class MessageTextAnnotation - { - /// - /// 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 . - /// The textual content associated with this text annotation item. - /// is null. - protected MessageTextAnnotation(string text) - { - Argument.AssertNotNull(text, nameof(text)); - - Text = text; - } - - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// Keeps track of any properties unknown to the library. - internal MessageTextAnnotation(string type, string text, IDictionary serializedAdditionalRawData) - { - Type = type; - Text = text; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextAnnotation() - { - } - - /// The object type. - internal string Type { get; set; } - /// The textual content associated with this text annotation item. - public string Text { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs deleted file mode 100644 index 04834c424bca..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class MessageTextContent : 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(MessageTextContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("text"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - MessageTextContent 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(MessageTextContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextContent(document.RootElement, options); - } - - internal static MessageTextContent DeserializeMessageTextContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalMessageTextDetails text = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("text"u8)) - { - text = InternalMessageTextDetails.DeserializeInternalMessageTextDetails(property.Value, options); - 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 MessageTextContent(type, serializedAdditionalRawData, text); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextContent)} does not support writing '{options.Format}' format."); - } - } - - MessageTextContent 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 DeserializeMessageTextContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextContent)} 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 new MessageTextContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs deleted file mode 100644 index bfc181bb0a23..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextContent.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// A representation of a textual item of thread message content. - public partial class MessageTextContent : MessageContent - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The text and associated annotations for this thread message content item. - internal MessageTextContent(string type, IDictionary serializedAdditionalRawData, InternalMessageTextDetails internalDetails) : base(type, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextContent() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.Serialization.cs deleted file mode 100644 index 63c715ceee47..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.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.Projects -{ - public partial class MessageTextFileCitationAnnotation : 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(MessageTextFileCitationAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("file_citation"u8); - writer.WriteObjectValue(InternalDetails, options); - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - } - - MessageTextFileCitationAnnotation 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(MessageTextFileCitationAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextFileCitationAnnotation(document.RootElement, options); - } - - internal static MessageTextFileCitationAnnotation DeserializeMessageTextFileCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalMessageTextFileCitationDetails fileCitation = default; - int? startIndex = default; - int? endIndex = default; - string type = default; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_citation"u8)) - { - fileCitation = InternalMessageTextFileCitationDetails.DeserializeInternalMessageTextFileCitationDetails(property.Value, options); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = 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 MessageTextFileCitationAnnotation( - type, - text, - serializedAdditionalRawData, - fileCitation, - startIndex, - endIndex); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextFileCitationAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageTextFileCitationAnnotation 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 DeserializeMessageTextFileCitationAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextFileCitationAnnotation)} 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 new MessageTextFileCitationAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextFileCitationAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs deleted file mode 100644 index f1295b6fa3d9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFileCitationAnnotation.cs +++ /dev/null @@ -1,42 +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.Projects -{ - /// A citation within the message that points to a specific quote from a specific File associated with the agent or the message. Generated when the agent uses the 'file_search' tool to search files. - public partial class MessageTextFileCitationAnnotation : MessageTextAnnotation - { - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// Keeps track of any properties unknown to the library. - /// - /// A citation within the message that points to a specific quote from a specific file. - /// Generated when the agent uses the "file_search" tool to search files. - /// - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - internal MessageTextFileCitationAnnotation(string type, string text, IDictionary serializedAdditionalRawData, InternalMessageTextFileCitationDetails internalDetails, int? startIndex, int? endIndex) : base(type, text, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - StartIndex = startIndex; - EndIndex = endIndex; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextFileCitationAnnotation() - { - } - /// The first text index associated with this text annotation. - public int? StartIndex { get; } - /// The last text index associated with this text annotation. - public int? EndIndex { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.Serialization.cs deleted file mode 100644 index fa8c84e7d44b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.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.Projects -{ - public partial class MessageTextFilePathAnnotation : 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(MessageTextFilePathAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("file_path"u8); - writer.WriteObjectValue(InternalDetails, options); - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - } - - MessageTextFilePathAnnotation 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(MessageTextFilePathAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextFilePathAnnotation(document.RootElement, options); - } - - internal static MessageTextFilePathAnnotation DeserializeMessageTextFilePathAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalMessageTextFilePathDetails filePath = default; - int? startIndex = default; - int? endIndex = default; - string type = default; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_path"u8)) - { - filePath = InternalMessageTextFilePathDetails.DeserializeInternalMessageTextFilePathDetails(property.Value, options); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = 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 MessageTextFilePathAnnotation( - type, - text, - serializedAdditionalRawData, - filePath, - startIndex, - endIndex); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextFilePathAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageTextFilePathAnnotation 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 DeserializeMessageTextFilePathAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextFilePathAnnotation)} 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 new MessageTextFilePathAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextFilePathAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs deleted file mode 100644 index ccf74d5173f4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextFilePathAnnotation.cs +++ /dev/null @@ -1,39 +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.Projects -{ - /// A citation within the message that points to a file located at a specific path. - public partial class MessageTextFilePathAnnotation : MessageTextAnnotation - { - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// Keeps track of any properties unknown to the library. - /// A URL for the file that's generated when the agent used the code_interpreter tool to generate a file. - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - internal MessageTextFilePathAnnotation(string type, string text, IDictionary serializedAdditionalRawData, InternalMessageTextFilePathDetails internalDetails, int? startIndex, int? endIndex) : base(type, text, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - StartIndex = startIndex; - EndIndex = endIndex; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextFilePathAnnotation() - { - } - /// The first text index associated with this text annotation. - public int? StartIndex { get; } - /// The last text index associated with this text annotation. - public int? EndIndex { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.Serialization.cs deleted file mode 100644 index b8d785ed3cb9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.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.Projects -{ - public partial class MessageTextUrlCitationAnnotation : 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(MessageTextUrlCitationAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("url_citation"u8); - writer.WriteObjectValue(UrlCitation, options); - if (Optional.IsDefined(StartIndex)) - { - writer.WritePropertyName("start_index"u8); - writer.WriteNumberValue(StartIndex.Value); - } - if (Optional.IsDefined(EndIndex)) - { - writer.WritePropertyName("end_index"u8); - writer.WriteNumberValue(EndIndex.Value); - } - } - - MessageTextUrlCitationAnnotation 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(MessageTextUrlCitationAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextUrlCitationAnnotation(document.RootElement, options); - } - - internal static MessageTextUrlCitationAnnotation DeserializeMessageTextUrlCitationAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageTextUrlCitationDetails urlCitation = default; - int? startIndex = default; - int? endIndex = default; - string type = default; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url_citation"u8)) - { - urlCitation = MessageTextUrlCitationDetails.DeserializeMessageTextUrlCitationDetails(property.Value, options); - continue; - } - if (property.NameEquals("start_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - startIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("end_index"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - endIndex = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = 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 MessageTextUrlCitationAnnotation( - type, - text, - serializedAdditionalRawData, - urlCitation, - startIndex, - endIndex); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageTextUrlCitationAnnotation 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 DeserializeMessageTextUrlCitationAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextUrlCitationAnnotation)} 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 new MessageTextUrlCitationAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextUrlCitationAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.cs deleted file mode 100644 index 7ffa68e389a4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationAnnotation.cs +++ /dev/null @@ -1,55 +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.Projects -{ - /// A citation within the message that points to a specific URL associated with the message. Generated when the agent uses tools such as 'bing_grounding' to search the Internet. - public partial class MessageTextUrlCitationAnnotation : MessageTextAnnotation - { - /// Initializes a new instance of . - /// The textual content associated with this text annotation item. - /// The details of the URL citation. - /// or is null. - internal MessageTextUrlCitationAnnotation(string text, MessageTextUrlCitationDetails urlCitation) : base(text) - { - Argument.AssertNotNull(text, nameof(text)); - Argument.AssertNotNull(urlCitation, nameof(urlCitation)); - - Type = "url_citation"; - UrlCitation = urlCitation; - } - - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// Keeps track of any properties unknown to the library. - /// The details of the URL citation. - /// The first text index associated with this text annotation. - /// The last text index associated with this text annotation. - internal MessageTextUrlCitationAnnotation(string type, string text, IDictionary serializedAdditionalRawData, MessageTextUrlCitationDetails urlCitation, int? startIndex, int? endIndex) : base(type, text, serializedAdditionalRawData) - { - UrlCitation = urlCitation; - StartIndex = startIndex; - EndIndex = endIndex; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextUrlCitationAnnotation() - { - } - - /// The details of the URL citation. - public MessageTextUrlCitationDetails UrlCitation { get; } - /// The first text index associated with this text annotation. - public int? StartIndex { get; } - /// The last text index associated with this text annotation. - public int? EndIndex { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.Serialization.cs deleted file mode 100644 index 11e9be98e53d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class MessageTextUrlCitationDetails : 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(MessageTextUrlCitationDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("url"u8); - writer.WriteStringValue(Url); - if (Optional.IsDefined(Title)) - { - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); - } - 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 - } - } - } - - MessageTextUrlCitationDetails 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(MessageTextUrlCitationDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextUrlCitationDetails(document.RootElement, options); - } - - internal static MessageTextUrlCitationDetails DeserializeMessageTextUrlCitationDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string url = default; - string title = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("url"u8)) - { - url = property.Value.GetString(); - continue; - } - if (property.NameEquals("title"u8)) - { - title = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MessageTextUrlCitationDetails(url, title, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} does not support writing '{options.Format}' format."); - } - } - - MessageTextUrlCitationDetails 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 DeserializeMessageTextUrlCitationDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextUrlCitationDetails)} 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 MessageTextUrlCitationDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMessageTextUrlCitationDetails(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/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.cs deleted file mode 100644 index b39dd77505c7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MessageTextUrlCitationDetails.cs +++ /dev/null @@ -1,79 +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.Projects -{ - /// A representation of a URL citation, as used in text thread message content. - public partial class MessageTextUrlCitationDetails - { - /// - /// 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 URL associated with this citation. - /// is null. - internal MessageTextUrlCitationDetails(string url) - { - Argument.AssertNotNull(url, nameof(url)); - - Url = url; - } - - /// Initializes a new instance of . - /// The URL associated with this citation. - /// The title of the URL. - /// Keeps track of any properties unknown to the library. - internal MessageTextUrlCitationDetails(string url, string title, IDictionary serializedAdditionalRawData) - { - Url = url; - Title = title; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal MessageTextUrlCitationDetails() - { - } - - /// The URL associated with this citation. - public string Url { get; } - /// The title of the URL. - public string Title { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs deleted file mode 100644 index abed6492094f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/MicrosoftFabricToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for a Microsoft Fabric tool as used to configure an agent. - public partial class MicrosoftFabricToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of connections used by the Microsoft Fabric tool. - /// is null. - public MicrosoftFabricToolDefinition(ToolConnectionList fabricDataagent) - { - Argument.AssertNotNull(fabricDataagent, nameof(fabricDataagent)); - - Type = "fabric_dataagent"; - FabricDataagent = fabricDataagent; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of connections used by the Microsoft Fabric tool. - internal MicrosoftFabricToolDefinition(string type, IDictionary serializedAdditionalRawData, ToolConnectionList fabricDataagent) : base(type, serializedAdditionalRawData) - { - FabricDataagent = fabricDataagent; - } - - /// Initializes a new instance of for deserialization. - internal MicrosoftFabricToolDefinition() - { - } - - /// The list of connections used by the Microsoft Fabric tool. - public ToolConnectionList FabricDataagent { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.Serialization.cs new file mode 100644 index 000000000000..d63ac9b72f37 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.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.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + public partial class ModelDeployment : 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(ModelDeployment)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W") + { + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + } + if (options.Format != "W") + { + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + } + if (options.Format != "W") + { + writer.WritePropertyName("modelPublisher"u8); + writer.WriteStringValue(ModelPublisher); + } + if (options.Format != "W") + { + writer.WritePropertyName("capabilities"u8); + writer.WriteStartObject(); + foreach (var item in Capabilities) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W") + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && Optional.IsDefined(ConnectionName)) + { + writer.WritePropertyName("connectionName"u8); + writer.WriteStringValue(ConnectionName); + } + } + + ModelDeployment 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(ModelDeployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeModelDeployment(document.RootElement, options); + } + + internal static ModelDeployment DeserializeModelDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string modelName = default; + string modelVersion = default; + string modelPublisher = default; + IReadOnlyDictionary capabilities = default; + Sku sku = default; + string connectionName = default; + DeploymentType type = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("modelName"u8)) + { + modelName = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelVersion"u8)) + { + modelVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("modelPublisher"u8)) + { + modelPublisher = property.Value.GetString(); + continue; + } + if (property.NameEquals("capabilities"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + capabilities = dictionary; + continue; + } + if (property.NameEquals("sku"u8)) + { + sku = Sku.DeserializeSku(property.Value, options); + continue; + } + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DeploymentType(property.Value.GetString()); + 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 ModelDeployment( + type, + name, + serializedAdditionalRawData, + modelName, + modelVersion, + modelPublisher, + capabilities, + sku, + connectionName); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ModelDeployment)} does not support writing '{options.Format}' format."); + } + } + + ModelDeployment 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 DeserializeModelDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ModelDeployment)} 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 new ModelDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeModelDeployment(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.cs new file mode 100644 index 000000000000..4ba31da12dda --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ModelDeployment.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; + +namespace Azure.AI.Projects +{ + /// Model Deployment Definition. + public partial class ModelDeployment : Deployment + { + /// Initializes a new instance of . + internal ModelDeployment() + { + Type = DeploymentType.ModelDeployment; + Capabilities = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of the deployment. + /// Name of the deployment. + /// Keeps track of any properties unknown to the library. + /// Publisher-specific name of the deployed model. + /// Publisher-specific version of the deployed model. + /// Name of the deployed model's publisher. + /// Capabilities of deployed model. + /// Sku of the model deployment. + /// Name of the connection the deployment comes from. + internal ModelDeployment(DeploymentType type, string name, IDictionary serializedAdditionalRawData, string modelName, string modelVersion, string modelPublisher, IReadOnlyDictionary capabilities, Sku sku, string connectionName) : base(type, name, serializedAdditionalRawData) + { + ModelName = modelName; + ModelVersion = modelVersion; + ModelPublisher = modelPublisher; + Capabilities = capabilities; + Sku = sku; + ConnectionName = connectionName; + } + + /// Publisher-specific name of the deployed model. + public string ModelName { get; } + /// Publisher-specific version of the deployed model. + public string ModelVersion { get; } + /// Name of the deployed model's publisher. + public string ModelPublisher { get; } + /// Capabilities of deployed model. + public IReadOnlyDictionary Capabilities { get; } + /// Sku of the model deployment. + public Sku Sku { get; } + /// Name of the connection the deployment comes from. + public string ConnectionName { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs deleted file mode 100644 index 77c6b8954451..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.Serialization.cs +++ /dev/null @@ -1,213 +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.Projects -{ - internal partial class ModifyVectorStoreRequest : 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(ModifyVectorStoreRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - } - if (Optional.IsDefined(ExpiresAfter)) - { - if (ExpiresAfter != null) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } - else - { - writer.WriteNull("expires_after"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - ModifyVectorStoreRequest 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(ModifyVectorStoreRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeModifyVectorStoreRequest(document.RootElement, options); - } - - internal static ModifyVectorStoreRequest DeserializeModifyVectorStoreRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - VectorStoreExpirationPolicy expiresAfter = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("expires_after"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - expiresAfter = null; - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ModifyVectorStoreRequest(name, expiresAfter, metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ModifyVectorStoreRequest)} does not support writing '{options.Format}' format."); - } - } - - ModifyVectorStoreRequest 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 DeserializeModifyVectorStoreRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ModifyVectorStoreRequest)} 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 ModifyVectorStoreRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeModifyVectorStoreRequest(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/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs deleted file mode 100644 index dc1d4cb9889d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ModifyVectorStoreRequest.cs +++ /dev/null @@ -1,74 +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.Projects -{ - /// The ModifyVectorStoreRequest. - internal partial class ModifyVectorStoreRequest - { - /// - /// 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 ModifyVectorStoreRequest() - { - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The name of the vector store. - /// Details on when this vector store expires. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal ModifyVectorStoreRequest(string name, VectorStoreExpirationPolicy expiresAfter, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Name = name; - ExpiresAfter = expiresAfter; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the vector store. - public string Name { get; } - /// Details on when this vector store expires. - public VectorStoreExpirationPolicy ExpiresAfter { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.Serialization.cs new file mode 100644 index 000000000000..8931615e18aa --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.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.AI.Projects +{ + public partial class NoAuthenticationCredentials : 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(NoAuthenticationCredentials)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + NoAuthenticationCredentials 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(NoAuthenticationCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNoAuthenticationCredentials(document.RootElement, options); + } + + internal static NoAuthenticationCredentials DeserializeNoAuthenticationCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NoAuthenticationCredentials(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(NoAuthenticationCredentials)} does not support writing '{options.Format}' format."); + } + } + + NoAuthenticationCredentials 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 DeserializeNoAuthenticationCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NoAuthenticationCredentials)} 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 new NoAuthenticationCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeNoAuthenticationCredentials(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.cs new file mode 100644 index 000000000000..fc049c3e628c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/NoAuthenticationCredentials.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.AI.Projects +{ + /// Credentials that do not require authentication. + public partial class NoAuthenticationCredentials : BaseCredentials + { + /// Initializes a new instance of . + internal NoAuthenticationCredentials() + { + Type = CredentialType.None; + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + internal NoAuthenticationCredentials(CredentialType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs deleted file mode 100644 index 4b60fb3f9fac..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfAgent_object. - internal readonly partial struct OpenAIPageableListOfAgentObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIPageableListOfAgentObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static OpenAIPageableListOfAgentObject List { get; } = new OpenAIPageableListOfAgentObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIPageableListOfAgentObject left, OpenAIPageableListOfAgentObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIPageableListOfAgentObject left, OpenAIPageableListOfAgentObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenAIPageableListOfAgentObject(string value) => new OpenAIPageableListOfAgentObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIPageableListOfAgentObject other && Equals(other); - /// - public bool Equals(OpenAIPageableListOfAgentObject 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.Projects/src/Generated/OpenAIPageableListOfAgentThread.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThread.Serialization.cs deleted file mode 100644 index 275833d642ea..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThread.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class OpenAIPageableListOfAgentThread : 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(OpenAIPageableListOfAgentThread)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("data"u8); - writer.WriteStartArray(); - foreach (var item in Data) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("first_id"u8); - writer.WriteStringValue(FirstId); - writer.WritePropertyName("last_id"u8); - writer.WriteStringValue(LastId); - writer.WritePropertyName("has_more"u8); - writer.WriteBooleanValue(HasMore); - 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 - } - } - } - - OpenAIPageableListOfAgentThread 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(OpenAIPageableListOfAgentThread)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenAIPageableListOfAgentThread(document.RootElement, options); - } - - internal static OpenAIPageableListOfAgentThread DeserializeOpenAIPageableListOfAgentThread(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenAIPageableListOfAgentThreadObject @object = default; - IReadOnlyList data = default; - string firstId = default; - string lastId = default; - bool hasMore = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("object"u8)) - { - @object = new OpenAIPageableListOfAgentThreadObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("data"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(AgentThread.DeserializeAgentThread(item, options)); - } - data = array; - continue; - } - if (property.NameEquals("first_id"u8)) - { - firstId = property.Value.GetString(); - continue; - } - if (property.NameEquals("last_id"u8)) - { - lastId = property.Value.GetString(); - continue; - } - if (property.NameEquals("has_more"u8)) - { - hasMore = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenAIPageableListOfAgentThread( - @object, - data, - firstId, - lastId, - hasMore, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenAIPageableListOfAgentThread)} does not support writing '{options.Format}' format."); - } - } - - OpenAIPageableListOfAgentThread 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 DeserializeOpenAIPageableListOfAgentThread(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenAIPageableListOfAgentThread)} 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 OpenAIPageableListOfAgentThread FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenAIPageableListOfAgentThread(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/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThread.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThread.cs deleted file mode 100644 index 5fcae9960350..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThread.cs +++ /dev/null @@ -1,101 +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.Projects -{ - /// The response data for a requested list of items. - internal partial class OpenAIPageableListOfAgentThread - { - /// - /// 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 requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// , or is null. - internal OpenAIPageableListOfAgentThread(IEnumerable data, string firstId, string lastId, bool hasMore) - { - Argument.AssertNotNull(data, nameof(data)); - Argument.AssertNotNull(firstId, nameof(firstId)); - Argument.AssertNotNull(lastId, nameof(lastId)); - - Data = data.ToList(); - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - } - - /// Initializes a new instance of . - /// The object type, which is always list. - /// The requested list of items. - /// The first ID represented in this list. - /// The last ID represented in this list. - /// A value indicating whether there are additional values available not captured in this list. - /// Keeps track of any properties unknown to the library. - internal OpenAIPageableListOfAgentThread(OpenAIPageableListOfAgentThreadObject @object, IReadOnlyList data, string firstId, string lastId, bool hasMore, IDictionary serializedAdditionalRawData) - { - Object = @object; - Data = data; - FirstId = firstId; - LastId = lastId; - HasMore = hasMore; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal OpenAIPageableListOfAgentThread() - { - } - - /// The object type, which is always list. - public OpenAIPageableListOfAgentThreadObject Object { get; } = OpenAIPageableListOfAgentThreadObject.List; - - /// The requested list of items. - public IReadOnlyList Data { get; } - /// The first ID represented in this list. - public string FirstId { get; } - /// The last ID represented in this list. - public string LastId { get; } - /// A value indicating whether there are additional values available not captured in this list. - public bool HasMore { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThreadObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThreadObject.cs deleted file mode 100644 index 08aad6c532f8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfAgentThreadObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfAgentThread_object. - internal readonly partial struct OpenAIPageableListOfAgentThreadObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIPageableListOfAgentThreadObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static OpenAIPageableListOfAgentThreadObject List { get; } = new OpenAIPageableListOfAgentThreadObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIPageableListOfAgentThreadObject left, OpenAIPageableListOfAgentThreadObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIPageableListOfAgentThreadObject left, OpenAIPageableListOfAgentThreadObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenAIPageableListOfAgentThreadObject(string value) => new OpenAIPageableListOfAgentThreadObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIPageableListOfAgentThreadObject other && Equals(other); - /// - public bool Equals(OpenAIPageableListOfAgentThreadObject 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.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs deleted file mode 100644 index 5e8c1a1ffd1a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfRunStepObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfRunStep_object. - internal readonly partial struct OpenAIPageableListOfRunStepObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIPageableListOfRunStepObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static OpenAIPageableListOfRunStepObject List { get; } = new OpenAIPageableListOfRunStepObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIPageableListOfRunStepObject left, OpenAIPageableListOfRunStepObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIPageableListOfRunStepObject left, OpenAIPageableListOfRunStepObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenAIPageableListOfRunStepObject(string value) => new OpenAIPageableListOfRunStepObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIPageableListOfRunStepObject other && Equals(other); - /// - public bool Equals(OpenAIPageableListOfRunStepObject 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.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs deleted file mode 100644 index 6731097a1547..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadMessageObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfThreadMessage_object. - internal readonly partial struct OpenAIPageableListOfThreadMessageObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIPageableListOfThreadMessageObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static OpenAIPageableListOfThreadMessageObject List { get; } = new OpenAIPageableListOfThreadMessageObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIPageableListOfThreadMessageObject left, OpenAIPageableListOfThreadMessageObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIPageableListOfThreadMessageObject left, OpenAIPageableListOfThreadMessageObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenAIPageableListOfThreadMessageObject(string value) => new OpenAIPageableListOfThreadMessageObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIPageableListOfThreadMessageObject other && Equals(other); - /// - public bool Equals(OpenAIPageableListOfThreadMessageObject 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.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs deleted file mode 100644 index 3a2f9d250bb6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenAIPageableListOfThreadRunObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The OpenAIPageableListOfThreadRun_object. - internal readonly partial struct OpenAIPageableListOfThreadRunObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenAIPageableListOfThreadRunObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ListValue = "list"; - - /// list. - public static OpenAIPageableListOfThreadRunObject List { get; } = new OpenAIPageableListOfThreadRunObject(ListValue); - /// Determines if two values are the same. - public static bool operator ==(OpenAIPageableListOfThreadRunObject left, OpenAIPageableListOfThreadRunObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenAIPageableListOfThreadRunObject left, OpenAIPageableListOfThreadRunObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenAIPageableListOfThreadRunObject(string value) => new OpenAIPageableListOfThreadRunObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenAIPageableListOfThreadRunObject other && Equals(other); - /// - public bool Equals(OpenAIPageableListOfThreadRunObject 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.Projects/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs deleted file mode 100644 index 5f9aae0a88c7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - public partial class OpenApiAnonymousAuthDetails : 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(OpenApiAnonymousAuthDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - OpenApiAnonymousAuthDetails 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(OpenApiAnonymousAuthDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiAnonymousAuthDetails(document.RootElement, options); - } - - internal static OpenApiAnonymousAuthDetails DeserializeOpenApiAnonymousAuthDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenApiAuthType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new OpenApiAuthType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiAnonymousAuthDetails(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiAnonymousAuthDetails)} does not support writing '{options.Format}' format."); - } - } - - OpenApiAnonymousAuthDetails 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 DeserializeOpenApiAnonymousAuthDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiAnonymousAuthDetails)} 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 new OpenApiAnonymousAuthDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiAnonymousAuthDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.cs deleted file mode 100644 index 5a86750c6c95..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAnonymousAuthDetails.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Security details for OpenApi anonymous authentication. - public partial class OpenApiAnonymousAuthDetails : OpenApiAuthDetails - { - /// Initializes a new instance of . - public OpenApiAnonymousAuthDetails() - { - Type = OpenApiAuthType.Anonymous; - } - - /// Initializes a new instance of . - /// The type of authentication, must be anonymous/connection/managed_identity. - /// Keeps track of any properties unknown to the library. - internal OpenApiAnonymousAuthDetails(OpenApiAuthType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs deleted file mode 100644 index a1644cb757af..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.Serialization.cs +++ /dev/null @@ -1,135 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownOpenApiAuthDetails))] - public partial class OpenApiAuthDetails : 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(OpenApiAuthDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - OpenApiAuthDetails 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(OpenApiAuthDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiAuthDetails(document.RootElement, options); - } - - internal static OpenApiAuthDetails DeserializeOpenApiAuthDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "anonymous": return OpenApiAnonymousAuthDetails.DeserializeOpenApiAnonymousAuthDetails(element, options); - case "connection": return OpenApiConnectionAuthDetails.DeserializeOpenApiConnectionAuthDetails(element, options); - case "managed_identity": return OpenApiManagedAuthDetails.DeserializeOpenApiManagedAuthDetails(element, options); - } - } - return UnknownOpenApiAuthDetails.DeserializeUnknownOpenApiAuthDetails(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiAuthDetails)} does not support writing '{options.Format}' format."); - } - } - - OpenApiAuthDetails 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 DeserializeOpenApiAuthDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiAuthDetails)} 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 OpenApiAuthDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiAuthDetails(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/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.cs deleted file mode 100644 index 596d594a2488..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthDetails.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.AI.Projects -{ - /// - /// authentication details for OpenApiFunctionDefinition - /// 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 abstract partial class OpenApiAuthDetails - { - /// - /// 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 OpenApiAuthDetails() - { - } - - /// Initializes a new instance of . - /// The type of authentication, must be anonymous/connection/managed_identity. - /// Keeps track of any properties unknown to the library. - internal OpenApiAuthDetails(OpenApiAuthType type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The type of authentication, must be anonymous/connection/managed_identity. - internal OpenApiAuthType Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs deleted file mode 100644 index 230257cdbd7b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiAuthType.cs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// - /// Authentication type for OpenApi endpoint. Allowed types are: - /// - Anonymous (no authentication required) - /// - Connection (requires connection_id to endpoint, as setup in AI Foundry) - /// - Managed_Identity (requires audience for identity based auth) - /// - internal readonly partial struct OpenApiAuthType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public OpenApiAuthType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AnonymousValue = "anonymous"; - private const string ConnectionValue = "connection"; - private const string ManagedIdentityValue = "managed_identity"; - - /// anonymous. - public static OpenApiAuthType Anonymous { get; } = new OpenApiAuthType(AnonymousValue); - /// connection. - public static OpenApiAuthType Connection { get; } = new OpenApiAuthType(ConnectionValue); - /// managed_identity. - public static OpenApiAuthType ManagedIdentity { get; } = new OpenApiAuthType(ManagedIdentityValue); - /// Determines if two values are the same. - public static bool operator ==(OpenApiAuthType left, OpenApiAuthType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(OpenApiAuthType left, OpenApiAuthType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator OpenApiAuthType(string value) => new OpenApiAuthType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is OpenApiAuthType other && Equals(other); - /// - public bool Equals(OpenApiAuthType 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.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs deleted file mode 100644 index b60046b7233e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class OpenApiConnectionAuthDetails : 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(OpenApiConnectionAuthDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("security_scheme"u8); - writer.WriteObjectValue(SecurityScheme, options); - } - - OpenApiConnectionAuthDetails 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(OpenApiConnectionAuthDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiConnectionAuthDetails(document.RootElement, options); - } - - internal static OpenApiConnectionAuthDetails DeserializeOpenApiConnectionAuthDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenApiConnectionSecurityScheme securityScheme = default; - OpenApiAuthType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("security_scheme"u8)) - { - securityScheme = OpenApiConnectionSecurityScheme.DeserializeOpenApiConnectionSecurityScheme(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new OpenApiAuthType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiConnectionAuthDetails(type, serializedAdditionalRawData, securityScheme); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiConnectionAuthDetails)} does not support writing '{options.Format}' format."); - } - } - - OpenApiConnectionAuthDetails 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 DeserializeOpenApiConnectionAuthDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiConnectionAuthDetails)} 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 new OpenApiConnectionAuthDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiConnectionAuthDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs deleted file mode 100644 index 8c2771c0f3b9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionAuthDetails.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// Security details for OpenApi connection authentication. - public partial class OpenApiConnectionAuthDetails : OpenApiAuthDetails - { - /// Initializes a new instance of . - /// Connection auth security details. - /// is null. - public OpenApiConnectionAuthDetails(OpenApiConnectionSecurityScheme securityScheme) - { - Argument.AssertNotNull(securityScheme, nameof(securityScheme)); - - Type = OpenApiAuthType.Connection; - SecurityScheme = securityScheme; - } - - /// Initializes a new instance of . - /// The type of authentication, must be anonymous/connection/managed_identity. - /// Keeps track of any properties unknown to the library. - /// Connection auth security details. - internal OpenApiConnectionAuthDetails(OpenApiAuthType type, IDictionary serializedAdditionalRawData, OpenApiConnectionSecurityScheme securityScheme) : base(type, serializedAdditionalRawData) - { - SecurityScheme = securityScheme; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiConnectionAuthDetails() - { - } - - /// Connection auth security details. - public OpenApiConnectionSecurityScheme SecurityScheme { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs deleted file mode 100644 index 97b215184bfc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class OpenApiConnectionSecurityScheme : 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(OpenApiConnectionSecurityScheme)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("connection_id"u8); - writer.WriteStringValue(ConnectionId); - 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 - } - } - } - - OpenApiConnectionSecurityScheme 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(OpenApiConnectionSecurityScheme)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiConnectionSecurityScheme(document.RootElement, options); - } - - internal static OpenApiConnectionSecurityScheme DeserializeOpenApiConnectionSecurityScheme(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string connectionId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connection_id"u8)) - { - connectionId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiConnectionSecurityScheme(connectionId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiConnectionSecurityScheme)} does not support writing '{options.Format}' format."); - } - } - - OpenApiConnectionSecurityScheme 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 DeserializeOpenApiConnectionSecurityScheme(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiConnectionSecurityScheme)} 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 OpenApiConnectionSecurityScheme FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiConnectionSecurityScheme(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/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.cs deleted file mode 100644 index d74d1bae8a27..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiConnectionSecurityScheme.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; - -namespace Azure.AI.Projects -{ - /// Security scheme for OpenApi managed_identity authentication. - public partial class OpenApiConnectionSecurityScheme - { - /// - /// 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 . - /// Connection id for Connection auth type. - /// is null. - public OpenApiConnectionSecurityScheme(string connectionId) - { - Argument.AssertNotNull(connectionId, nameof(connectionId)); - - ConnectionId = connectionId; - } - - /// Initializes a new instance of . - /// Connection id for Connection auth type. - /// Keeps track of any properties unknown to the library. - internal OpenApiConnectionSecurityScheme(string connectionId, IDictionary serializedAdditionalRawData) - { - ConnectionId = connectionId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiConnectionSecurityScheme() - { - } - - /// Connection id for Connection auth type. - public string ConnectionId { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.Serialization.cs deleted file mode 100644 index 26fccbb0ac9c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.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; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class OpenApiFunctionDefinition : 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(OpenApiFunctionDefinition)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("spec"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Spec); -#else - using (JsonDocument document = JsonDocument.Parse(Spec, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - writer.WritePropertyName("auth"u8); - writer.WriteObjectValue(Auth, options); - if (Optional.IsCollectionDefined(DefaultParams)) - { - writer.WritePropertyName("default_params"u8); - writer.WriteStartArray(); - foreach (var item in DefaultParams) - { - 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 - } - } - } - - OpenApiFunctionDefinition 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(OpenApiFunctionDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiFunctionDefinition(document.RootElement, options); - } - - internal static OpenApiFunctionDefinition DeserializeOpenApiFunctionDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string description = default; - BinaryData spec = default; - OpenApiAuthDetails auth = default; - IList defaultParams = 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("spec"u8)) - { - spec = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("auth"u8)) - { - auth = OpenApiAuthDetails.DeserializeOpenApiAuthDetails(property.Value, options); - continue; - } - if (property.NameEquals("default_params"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - defaultParams = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiFunctionDefinition( - name, - description, - spec, - auth, - defaultParams ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiFunctionDefinition)} does not support writing '{options.Format}' format."); - } - } - - OpenApiFunctionDefinition 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 DeserializeOpenApiFunctionDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiFunctionDefinition)} 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 OpenApiFunctionDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiFunctionDefinition(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/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs deleted file mode 100644 index b6ace6e72956..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiFunctionDefinition.cs +++ /dev/null @@ -1,139 +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.Projects -{ - /// The input definition information for an openapi function. - public partial class OpenApiFunctionDefinition - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of the function to be called. - /// The openapi function shape, described as a JSON Schema object. - /// - /// Open API authentication details - /// 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 OpenApiFunctionDefinition(string name, BinaryData spec, OpenApiAuthDetails auth) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(spec, nameof(spec)); - Argument.AssertNotNull(auth, nameof(auth)); - - Name = name; - Spec = spec; - Auth = auth; - DefaultParams = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The name of the function to be called. - /// A description of what the function does, used by the model to choose when and how to call the function. - /// The openapi function shape, described as a JSON Schema object. - /// - /// Open API authentication details - /// 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 . - /// - /// List of OpenAPI spec parameters that will use user-provided defaults. - /// Keeps track of any properties unknown to the library. - internal OpenApiFunctionDefinition(string name, string description, BinaryData spec, OpenApiAuthDetails auth, IList defaultParams, IDictionary serializedAdditionalRawData) - { - Name = name; - Description = description; - Spec = spec; - Auth = auth; - DefaultParams = defaultParams; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiFunctionDefinition() - { - } - - /// The name of the function to be called. - public string Name { get; set; } - /// A description of what the function does, used by the model to choose when and how to call the function. - public string Description { get; set; } - /// - /// The openapi function shape, described as a JSON Schema object. - /// - /// To assign an object to 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 BinaryData Spec { get; set; } - /// - /// Open API authentication details - /// 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 OpenApiAuthDetails Auth { get; set; } - /// List of OpenAPI spec parameters that will use user-provided defaults. - public IList DefaultParams { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs deleted file mode 100644 index 8189b5d52434..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class OpenApiManagedAuthDetails : 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(OpenApiManagedAuthDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("security_scheme"u8); - writer.WriteObjectValue(SecurityScheme, options); - } - - OpenApiManagedAuthDetails 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(OpenApiManagedAuthDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiManagedAuthDetails(document.RootElement, options); - } - - internal static OpenApiManagedAuthDetails DeserializeOpenApiManagedAuthDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenApiManagedSecurityScheme securityScheme = default; - OpenApiAuthType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("security_scheme"u8)) - { - securityScheme = OpenApiManagedSecurityScheme.DeserializeOpenApiManagedSecurityScheme(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new OpenApiAuthType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiManagedAuthDetails(type, serializedAdditionalRawData, securityScheme); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiManagedAuthDetails)} does not support writing '{options.Format}' format."); - } - } - - OpenApiManagedAuthDetails 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 DeserializeOpenApiManagedAuthDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiManagedAuthDetails)} 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 new OpenApiManagedAuthDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiManagedAuthDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs deleted file mode 100644 index 9a51a510225c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedAuthDetails.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// Security details for OpenApi managed_identity authentication. - public partial class OpenApiManagedAuthDetails : OpenApiAuthDetails - { - /// Initializes a new instance of . - /// Connection auth security details. - /// is null. - public OpenApiManagedAuthDetails(OpenApiManagedSecurityScheme securityScheme) - { - Argument.AssertNotNull(securityScheme, nameof(securityScheme)); - - Type = OpenApiAuthType.ManagedIdentity; - SecurityScheme = securityScheme; - } - - /// Initializes a new instance of . - /// The type of authentication, must be anonymous/connection/managed_identity. - /// Keeps track of any properties unknown to the library. - /// Connection auth security details. - internal OpenApiManagedAuthDetails(OpenApiAuthType type, IDictionary serializedAdditionalRawData, OpenApiManagedSecurityScheme securityScheme) : base(type, serializedAdditionalRawData) - { - SecurityScheme = securityScheme; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiManagedAuthDetails() - { - } - - /// Connection auth security details. - public OpenApiManagedSecurityScheme SecurityScheme { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs deleted file mode 100644 index 36794d4deb51..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class OpenApiManagedSecurityScheme : 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(OpenApiManagedSecurityScheme)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("audience"u8); - writer.WriteStringValue(Audience); - 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 - } - } - } - - OpenApiManagedSecurityScheme 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(OpenApiManagedSecurityScheme)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiManagedSecurityScheme(document.RootElement, options); - } - - internal static OpenApiManagedSecurityScheme DeserializeOpenApiManagedSecurityScheme(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string audience = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("audience"u8)) - { - audience = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new OpenApiManagedSecurityScheme(audience, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiManagedSecurityScheme)} does not support writing '{options.Format}' format."); - } - } - - OpenApiManagedSecurityScheme 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 DeserializeOpenApiManagedSecurityScheme(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiManagedSecurityScheme)} 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 OpenApiManagedSecurityScheme FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiManagedSecurityScheme(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/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.cs deleted file mode 100644 index e1c3d9970098..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiManagedSecurityScheme.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; - -namespace Azure.AI.Projects -{ - /// Security scheme for OpenApi managed_identity authentication. - public partial class OpenApiManagedSecurityScheme - { - /// - /// 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 . - /// Authentication scope for managed_identity auth type. - /// is null. - public OpenApiManagedSecurityScheme(string audience) - { - Argument.AssertNotNull(audience, nameof(audience)); - - Audience = audience; - } - - /// Initializes a new instance of . - /// Authentication scope for managed_identity auth type. - /// Keeps track of any properties unknown to the library. - internal OpenApiManagedSecurityScheme(string audience, IDictionary serializedAdditionalRawData) - { - Audience = audience; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiManagedSecurityScheme() - { - } - - /// Authentication scope for managed_identity auth type. - public string Audience { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs deleted file mode 100644 index e5d90cf0a181..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class OpenApiToolDefinition : 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(OpenApiToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("openapi"u8); - writer.WriteObjectValue(Openapi, options); - } - - OpenApiToolDefinition 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(OpenApiToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiToolDefinition(document.RootElement, options); - } - - internal static OpenApiToolDefinition DeserializeOpenApiToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenApiFunctionDefinition openapi = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("openapi"u8)) - { - openapi = OpenApiFunctionDefinition.DeserializeOpenApiFunctionDefinition(property.Value, options); - 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 OpenApiToolDefinition(type, serializedAdditionalRawData, openapi); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - OpenApiToolDefinition 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 DeserializeOpenApiToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiToolDefinition)} 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 new OpenApiToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeOpenApiToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs deleted file mode 100644 index f56708e3d6e5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/OpenApiToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for an OpenAPI tool as used to configure an agent. - public partial class OpenApiToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The openapi function definition. - /// is null. - public OpenApiToolDefinition(OpenApiFunctionDefinition openapi) - { - Argument.AssertNotNull(openapi, nameof(openapi)); - - Type = "openapi"; - Openapi = openapi; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The openapi function definition. - internal OpenApiToolDefinition(string type, IDictionary serializedAdditionalRawData, OpenApiFunctionDefinition openapi) : base(type, serializedAdditionalRawData) - { - Openapi = openapi; - } - - /// Initializes a new instance of for deserialization. - internal OpenApiToolDefinition() - { - } - - /// The openapi function definition. - public OpenApiFunctionDefinition Openapi { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.Serialization.cs new file mode 100644 index 000000000000..8ee48f049445 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) 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.Projects +{ + public partial class PendingUploadRequest : 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(PendingUploadRequest)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(PendingUploadId)) + { + writer.WritePropertyName("pendingUploadId"u8); + writer.WriteStringValue(PendingUploadId); + } + if (Optional.IsDefined(ConnectionName)) + { + writer.WritePropertyName("connectionName"u8); + writer.WriteStringValue(ConnectionName); + } + writer.WritePropertyName("pendingUploadType"u8); + writer.WriteStringValue(PendingUploadType.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 + } + } + } + + PendingUploadRequest 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(PendingUploadRequest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePendingUploadRequest(document.RootElement, options); + } + + internal static PendingUploadRequest DeserializePendingUploadRequest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string pendingUploadId = default; + string connectionName = default; + PendingUploadType pendingUploadType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("pendingUploadId"u8)) + { + pendingUploadId = property.Value.GetString(); + continue; + } + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("pendingUploadType"u8)) + { + pendingUploadType = new PendingUploadType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PendingUploadRequest(pendingUploadId, connectionName, pendingUploadType, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(PendingUploadRequest)} does not support writing '{options.Format}' format."); + } + } + + PendingUploadRequest 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 DeserializePendingUploadRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PendingUploadRequest)} 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 PendingUploadRequest FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePendingUploadRequest(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/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.cs new file mode 100644 index 000000000000..33ab5a20a0dd --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadRequest.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.AI.Projects +{ + /// Represents a request for a pending upload. + public partial class PendingUploadRequest + { + /// + /// 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 PendingUploadRequest() + { + } + + /// Initializes a new instance of . + /// If PendingUploadId is not provided, a random GUID will be used. + /// Azure Storage Account connection name to use for generating temporary SAS token. + /// BlobReference is the only supported type. + /// Keeps track of any properties unknown to the library. + internal PendingUploadRequest(string pendingUploadId, string connectionName, PendingUploadType pendingUploadType, IDictionary serializedAdditionalRawData) + { + PendingUploadId = pendingUploadId; + ConnectionName = connectionName; + PendingUploadType = pendingUploadType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// If PendingUploadId is not provided, a random GUID will be used. + public string PendingUploadId { get; set; } + /// Azure Storage Account connection name to use for generating temporary SAS token. + public string ConnectionName { get; set; } + /// BlobReference is the only supported type. + public PendingUploadType PendingUploadType { get; } = PendingUploadType.BlobReference; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.Serialization.cs new file mode 100644 index 000000000000..e8f43260f3bd --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.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.AI.Projects +{ + public partial class PendingUploadResponse : 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(PendingUploadResponse)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("blobReference"u8); + writer.WriteObjectValue(BlobReference, options); + writer.WritePropertyName("pendingUploadId"u8); + writer.WriteStringValue(PendingUploadId); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + writer.WritePropertyName("pendingUploadType"u8); + writer.WriteStringValue(PendingUploadType.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 + } + } + } + + PendingUploadResponse 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(PendingUploadResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePendingUploadResponse(document.RootElement, options); + } + + internal static PendingUploadResponse DeserializePendingUploadResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BlobReference blobReference = default; + string pendingUploadId = default; + string version = default; + PendingUploadType pendingUploadType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("blobReference"u8)) + { + blobReference = BlobReference.DeserializeBlobReference(property.Value, options); + continue; + } + if (property.NameEquals("pendingUploadId"u8)) + { + pendingUploadId = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("pendingUploadType"u8)) + { + pendingUploadType = new PendingUploadType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PendingUploadResponse(blobReference, pendingUploadId, version, pendingUploadType, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(PendingUploadResponse)} does not support writing '{options.Format}' format."); + } + } + + PendingUploadResponse 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 DeserializePendingUploadResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PendingUploadResponse)} 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 PendingUploadResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePendingUploadResponse(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/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.cs new file mode 100644 index 000000000000..accce225f1ea --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadResponse.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.AI.Projects +{ + /// Represents the response for a pending upload request. + public partial class PendingUploadResponse + { + /// + /// 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 . + /// Container-level read, write, list SAS. + /// ID for this upload request. + /// or is null. + internal PendingUploadResponse(BlobReference blobReference, string pendingUploadId) + { + Argument.AssertNotNull(blobReference, nameof(blobReference)); + Argument.AssertNotNull(pendingUploadId, nameof(pendingUploadId)); + + BlobReference = blobReference; + PendingUploadId = pendingUploadId; + } + + /// Initializes a new instance of . + /// Container-level read, write, list SAS. + /// ID for this upload request. + /// Version of asset to be created if user did not specify version when initially creating upload. + /// BlobReference is the only supported type. + /// Keeps track of any properties unknown to the library. + internal PendingUploadResponse(BlobReference blobReference, string pendingUploadId, string version, PendingUploadType pendingUploadType, IDictionary serializedAdditionalRawData) + { + BlobReference = blobReference; + PendingUploadId = pendingUploadId; + Version = version; + PendingUploadType = pendingUploadType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PendingUploadResponse() + { + } + + /// Container-level read, write, list SAS. + public BlobReference BlobReference { get; } + /// ID for this upload request. + public string PendingUploadId { get; } + /// Version of asset to be created if user did not specify version when initially creating upload. + public string Version { get; } + /// BlobReference is the only supported type. + public PendingUploadType PendingUploadType { get; } = PendingUploadType.BlobReference; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadType.cs new file mode 100644 index 000000000000..241a6edb544e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/PendingUploadType.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.AI.Projects +{ + /// The type of pending upload. + public readonly partial struct PendingUploadType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PendingUploadType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string BlobReferenceValue = "BlobReference"; + + /// No pending upload. + public static PendingUploadType None { get; } = new PendingUploadType(NoneValue); + /// Blob Reference is the only supported type. + public static PendingUploadType BlobReference { get; } = new PendingUploadType(BlobReferenceValue); + /// Determines if two values are the same. + public static bool operator ==(PendingUploadType left, PendingUploadType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PendingUploadType left, PendingUploadType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PendingUploadType(string value) => new PendingUploadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PendingUploadType other && Equals(other); + /// + public bool Equals(PendingUploadType 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.Projects/src/Generated/RecurrenceSchedule.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceSchedule.Serialization.cs deleted file mode 100644 index f3c37ccd79f0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceSchedule.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RecurrenceSchedule : 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(RecurrenceSchedule)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("hours"u8); - writer.WriteStartArray(); - foreach (var item in Hours) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - writer.WritePropertyName("minutes"u8); - writer.WriteStartArray(); - foreach (var item in Minutes) - { - writer.WriteNumberValue(item); - } - writer.WriteEndArray(); - if (Optional.IsCollectionDefined(WeekDays)) - { - writer.WritePropertyName("weekDays"u8); - writer.WriteStartArray(); - foreach (var item in WeekDays) - { - writer.WriteStringValue(item.ToString()); - } - writer.WriteEndArray(); - } - if (Optional.IsCollectionDefined(MonthDays)) - { - writer.WritePropertyName("monthDays"u8); - writer.WriteStartArray(); - foreach (var item in MonthDays) - { - writer.WriteNumberValue(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 - } - } - } - - RecurrenceSchedule 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(RecurrenceSchedule)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRecurrenceSchedule(document.RootElement, options); - } - - internal static RecurrenceSchedule DeserializeRecurrenceSchedule(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList hours = default; - IList minutes = default; - IList weekDays = default; - IList monthDays = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("hours"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - hours = array; - continue; - } - if (property.NameEquals("minutes"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - minutes = array; - continue; - } - if (property.NameEquals("weekDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(new WeekDays(item.GetString())); - } - weekDays = array; - continue; - } - if (property.NameEquals("monthDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetInt32()); - } - monthDays = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RecurrenceSchedule(hours, minutes, weekDays ?? new ChangeTrackingList(), monthDays ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RecurrenceSchedule)} does not support writing '{options.Format}' format."); - } - } - - RecurrenceSchedule 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 DeserializeRecurrenceSchedule(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RecurrenceSchedule)} 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 RecurrenceSchedule FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRecurrenceSchedule(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/ai/Azure.AI.Projects/src/Generated/RecurrenceSchedule.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceSchedule.cs deleted file mode 100644 index 5caa77ae3151..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceSchedule.cs +++ /dev/null @@ -1,93 +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.Projects -{ - /// RecurrenceSchedule Definition. - public partial class RecurrenceSchedule - { - /// - /// 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 hours for the schedule. - /// List of minutes for the schedule. - /// or is null. - public RecurrenceSchedule(IEnumerable hours, IEnumerable minutes) - { - Argument.AssertNotNull(hours, nameof(hours)); - Argument.AssertNotNull(minutes, nameof(minutes)); - - Hours = hours.ToList(); - Minutes = minutes.ToList(); - WeekDays = new ChangeTrackingList(); - MonthDays = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// List of hours for the schedule. - /// List of minutes for the schedule. - /// List of days for the schedule. - /// List of month days for the schedule. - /// Keeps track of any properties unknown to the library. - internal RecurrenceSchedule(IList hours, IList minutes, IList weekDays, IList monthDays, IDictionary serializedAdditionalRawData) - { - Hours = hours; - Minutes = minutes; - WeekDays = weekDays; - MonthDays = monthDays; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RecurrenceSchedule() - { - } - - /// List of hours for the schedule. - public IList Hours { get; } - /// List of minutes for the schedule. - public IList Minutes { get; } - /// List of days for the schedule. - public IList WeekDays { get; } - /// List of month days for the schedule. - public IList MonthDays { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.Serialization.cs deleted file mode 100644 index 1f4baf19002c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.Serialization.cs +++ /dev/null @@ -1,157 +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.Projects -{ - public partial class RecurrenceTrigger : 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(RecurrenceTrigger)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("frequency"u8); - writer.WriteStringValue(Frequency.ToString()); - writer.WritePropertyName("interval"u8); - writer.WriteNumberValue(Interval); - if (Optional.IsDefined(Schedule)) - { - writer.WritePropertyName("schedule"u8); - writer.WriteObjectValue(Schedule, options); - } - } - - RecurrenceTrigger 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(RecurrenceTrigger)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRecurrenceTrigger(document.RootElement, options); - } - - internal static RecurrenceTrigger DeserializeRecurrenceTrigger(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Frequency frequency = default; - int interval = default; - RecurrenceSchedule schedule = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("frequency"u8)) - { - frequency = new Frequency(property.Value.GetString()); - continue; - } - if (property.NameEquals("interval"u8)) - { - interval = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("schedule"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - schedule = RecurrenceSchedule.DeserializeRecurrenceSchedule(property.Value, options); - 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 RecurrenceTrigger(type, serializedAdditionalRawData, frequency, interval, schedule); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RecurrenceTrigger)} does not support writing '{options.Format}' format."); - } - } - - RecurrenceTrigger 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 DeserializeRecurrenceTrigger(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RecurrenceTrigger)} 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 new RecurrenceTrigger FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRecurrenceTrigger(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.cs deleted file mode 100644 index 2d88ffb17eb1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RecurrenceTrigger.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Recurrence Trigger Definition. - public partial class RecurrenceTrigger : Trigger - { - /// Initializes a new instance of . - /// The frequency to trigger schedule. - /// Specifies schedule interval in conjunction with frequency. - public RecurrenceTrigger(Frequency frequency, int interval) - { - Type = "Recurrence"; - Frequency = frequency; - Interval = interval; - } - - /// Initializes a new instance of . - /// Type of the trigger. - /// Keeps track of any properties unknown to the library. - /// The frequency to trigger schedule. - /// Specifies schedule interval in conjunction with frequency. - /// The recurrence schedule. - internal RecurrenceTrigger(string type, IDictionary serializedAdditionalRawData, Frequency frequency, int interval, RecurrenceSchedule schedule) : base(type, serializedAdditionalRawData) - { - Frequency = frequency; - Interval = interval; - Schedule = schedule; - } - - /// Initializes a new instance of for deserialization. - internal RecurrenceTrigger() - { - } - - /// The frequency to trigger schedule. - public Frequency Frequency { get; set; } - /// Specifies schedule interval in conjunction with frequency. - public int Interval { get; set; } - /// The recurrence schedule. - public RecurrenceSchedule Schedule { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RedTeam.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeam.Serialization.cs new file mode 100644 index 000000000000..4565aa83f005 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeam.Serialization.cs @@ -0,0 +1,330 @@ +// Copyright (c) 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.Projects +{ + public partial class RedTeam : 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(RedTeam)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(NumTurns)) + { + writer.WritePropertyName("numTurns"u8); + writer.WriteNumberValue(NumTurns.Value); + } + if (Optional.IsCollectionDefined(AttackStrategies)) + { + writer.WritePropertyName("attackStrategies"u8); + writer.WriteStartArray(); + foreach (var item in AttackStrategies) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(SimulationOnly)) + { + writer.WritePropertyName("simulationOnly"u8); + writer.WriteBooleanValue(SimulationOnly.Value); + } + if (Optional.IsCollectionDefined(RiskCategories)) + { + writer.WritePropertyName("riskCategories"u8); + writer.WriteStartArray(); + foreach (var item in RiskCategories) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(ApplicationScenario)) + { + writer.WritePropertyName("applicationScenario"u8); + writer.WriteStringValue(ApplicationScenario); + } + 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.IsCollectionDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + foreach (var item in Properties) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + writer.WritePropertyName("target"u8); + writer.WriteObjectValue(Target, 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 + } + } + } + + RedTeam 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(RedTeam)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRedTeam(document.RootElement, options); + } + + internal static RedTeam DeserializeRedTeam(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string displayName = default; + int? numTurns = default; + IList attackStrategies = default; + bool? simulationOnly = default; + IList riskCategories = default; + string applicationScenario = default; + IDictionary tags = default; + IDictionary properties = default; + string status = default; + TargetConfig target = 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("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("numTurns"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + numTurns = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("attackStrategies"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AttackStrategy(item.GetString())); + } + attackStrategies = array; + continue; + } + if (property.NameEquals("simulationOnly"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + simulationOnly = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("riskCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new RiskCategory(item.GetString())); + } + riskCategories = array; + continue; + } + if (property.NameEquals("applicationScenario"u8)) + { + applicationScenario = 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("properties"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()); + } + properties = dictionary; + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("target"u8)) + { + target = TargetConfig.DeserializeTargetConfig(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RedTeam( + id, + displayName, + numTurns, + attackStrategies ?? new ChangeTrackingList(), + simulationOnly, + riskCategories ?? new ChangeTrackingList(), + applicationScenario, + tags ?? new ChangeTrackingDictionary(), + properties ?? new ChangeTrackingDictionary(), + status, + target, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RedTeam)} does not support writing '{options.Format}' format."); + } + } + + RedTeam 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 DeserializeRedTeam(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RedTeam)} 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 RedTeam FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRedTeam(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/ai/Azure.AI.Projects/src/Generated/RedTeam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeam.cs new file mode 100644 index 000000000000..b2bb39f82682 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeam.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Red team details. + public partial class RedTeam + { + /// + /// 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 . + /// + /// Target configuration for the red-team run. + /// 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 . + /// + /// is null. + public RedTeam(TargetConfig target) + { + Argument.AssertNotNull(target, nameof(target)); + + AttackStrategies = new ChangeTrackingList(); + RiskCategories = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + Properties = new ChangeTrackingDictionary(); + Target = target; + } + + /// Initializes a new instance of . + /// Identifier of the red team run. + /// Name of the red-team run. + /// Number of simulation rounds. + /// List of attack strategies or nested lists of attack strategies. + /// Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result. + /// List of risk categories to generate attack objectives for. + /// Application scenario for the red team operation, to generate scenario specific attacks. + /// Red team's tags. Unlike properties, tags are fully mutable. + /// Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. + /// Status of the red-team. It is set by service and is read-only. + /// + /// Target configuration for the red-team run. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Keeps track of any properties unknown to the library. + internal RedTeam(string name, string displayName, int? numTurns, IList attackStrategies, bool? simulationOnly, IList riskCategories, string applicationScenario, IDictionary tags, IDictionary properties, string status, TargetConfig target, IDictionary serializedAdditionalRawData) + { + Name = name; + DisplayName = displayName; + NumTurns = numTurns; + AttackStrategies = attackStrategies; + SimulationOnly = simulationOnly; + RiskCategories = riskCategories; + ApplicationScenario = applicationScenario; + Tags = tags; + Properties = properties; + Status = status; + Target = target; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RedTeam() + { + } + + /// Identifier of the red team run. + public string Name { get; } + /// Name of the red-team run. + public string DisplayName { get; set; } + /// Number of simulation rounds. + public int? NumTurns { get; set; } + /// List of attack strategies or nested lists of attack strategies. + public IList AttackStrategies { get; } + /// Simulation-only or Simulation + Evaluation. Default false, if true the scan outputs conversation not evaluation result. + public bool? SimulationOnly { get; set; } + /// List of risk categories to generate attack objectives for. + public IList RiskCategories { get; } + /// Application scenario for the red team operation, to generate scenario specific attacks. + public string ApplicationScenario { get; set; } + /// Red team's tags. Unlike properties, tags are fully mutable. + public IDictionary Tags { get; } + /// Red team's properties. Unlike tags, properties are add-only. Once added, a property cannot be removed. + public IDictionary Properties { get; } + /// Status of the red-team. It is set by service and is read-only. + public string Status { get; } + /// + /// Target configuration for the red-team run. + /// 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 TargetConfig Target { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RedTeams.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeams.cs new file mode 100644 index 000000000000..a91cc1e1d65f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/RedTeams.cs @@ -0,0 +1,424 @@ +// 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; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The RedTeams sub-client. + public partial class RedTeams + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + 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 RedTeams for mocking. + protected RedTeams() + { + } + + /// Initializes a new instance of RedTeams. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + /// The API version to use for this operation. + internal RedTeams(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string apiVersion) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + _apiVersion = apiVersion; + } + + /// Get a redteam by name. + /// Identifier of the red team run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetRedTeamAsync(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetRedTeamAsync(name, context).ConfigureAwait(false); + return Response.FromValue(RedTeam.FromResponse(response), response); + } + + /// Get a redteam by name. + /// Identifier of the red team run. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetRedTeam(string name, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetRedTeam(name, context); + return Response.FromValue(RedTeam.FromResponse(response), response); + } + + /// + /// [Protocol Method] Get a redteam by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the red team run. + /// 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 GetRedTeamAsync(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("RedTeams.GetRedTeam"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRedTeamRequest(name, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Get a redteam by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier of the red team run. + /// 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 GetRedTeam(string name, RequestContext context) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + + using var scope = ClientDiagnostics.CreateScope("RedTeams.GetRedTeam"); + scope.Start(); + try + { + using HttpMessage message = CreateGetRedTeamRequest(name, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Creates a redteam run. + /// Redteam to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> CreateAsync(RedTeam redTeam, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(redTeam, nameof(redTeam)); + + using RequestContent content = redTeam.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateAsync(content, context).ConfigureAwait(false); + return Response.FromValue(RedTeam.FromResponse(response), response); + } + + /// Creates a redteam run. + /// Redteam to be run. + /// The cancellation token to use. + /// is null. + /// + public virtual Response Create(RedTeam redTeam, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(redTeam, nameof(redTeam)); + + using RequestContent content = redTeam.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = Create(content, context); + return Response.FromValue(RedTeam.FromResponse(response), response); + } + + /// + /// [Protocol Method] Creates a redteam run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task CreateAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("RedTeams.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates a redteam run. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response Create(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("RedTeams.Create"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// List a redteam by name. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetRedTeamsAsync(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRedTeamsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRedTeamsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => RedTeam.DeserializeRedTeam(e), ClientDiagnostics, _pipeline, "RedTeams.GetRedTeams", "value", "nextLink", context); + } + + /// List a redteam by name. + /// The cancellation token to use. + /// + public virtual Pageable GetRedTeams(CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRedTeamsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRedTeamsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => RedTeam.DeserializeRedTeam(e), ClientDiagnostics, _pipeline, "RedTeams.GetRedTeams", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List a redteam by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetRedTeamsAsync(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRedTeamsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRedTeamsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "RedTeams.GetRedTeams", "value", "nextLink", context); + } + + /// + /// [Protocol Method] List a redteam by name. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetRedTeams(RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetRedTeamsRequest(context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetRedTeamsNextPageRequest(nextLink, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "RedTeams.GetRedTeams", "value", "nextLink", context); + } + + internal HttpMessage CreateGetRedTeamRequest(string name, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/redTeams/runs/", false); + uri.AppendPath(name, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetRedTeamsRequest(RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/redTeams/runs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateCreateRequest(RequestContent content, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier201); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/redTeams/runs:run", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateGetRedTeamsNextPageRequest(string nextLink, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier201; + private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 }); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs deleted file mode 100644 index a1e5ca4eccef..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.Serialization.cs +++ /dev/null @@ -1,133 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRequiredAction))] - public partial class RequiredAction : 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(RequiredAction)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - RequiredAction 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(RequiredAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequiredAction(document.RootElement, options); - } - - internal static RequiredAction DeserializeRequiredAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "submit_tool_outputs": return SubmitToolOutputsAction.DeserializeSubmitToolOutputsAction(element, options); - } - } - return UnknownRequiredAction.DeserializeUnknownRequiredAction(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RequiredAction)} does not support writing '{options.Format}' format."); - } - } - - RequiredAction 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 DeserializeRequiredAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequiredAction)} 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 RequiredAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRequiredAction(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/ai/Azure.AI.Projects/src/Generated/RequiredAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.cs deleted file mode 100644 index 8233fd69673e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredAction.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.AI.Projects -{ - /// - /// An abstract representation of a required action for an agent thread run to continue. - /// 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 RequiredAction - { - /// - /// 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 RequiredAction() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal RequiredAction(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.Serialization.cs deleted file mode 100644 index 47301674363b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.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.AI.Projects -{ - public partial class RequiredFunctionToolCall : 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(RequiredFunctionToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - RequiredFunctionToolCall 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(RequiredFunctionToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequiredFunctionToolCall(document.RootElement, options); - } - - internal static RequiredFunctionToolCall DeserializeRequiredFunctionToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRequiredFunctionToolCallDetails function = default; - string id = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - function = InternalRequiredFunctionToolCallDetails.DeserializeInternalRequiredFunctionToolCallDetails(property.Value, options); - continue; - } - if (property.NameEquals("id"u8)) - { - id = 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 RequiredFunctionToolCall(type, serializedAdditionalRawData, id, function); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RequiredFunctionToolCall)} does not support writing '{options.Format}' format."); - } - } - - RequiredFunctionToolCall 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 DeserializeRequiredFunctionToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequiredFunctionToolCall)} 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 new RequiredFunctionToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRequiredFunctionToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs deleted file mode 100644 index 259b963338fe..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredFunctionToolCall.cs +++ /dev/null @@ -1,43 +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.Projects -{ - /// A representation of a requested call to a function tool, needed by the model to continue evaluation of a run. - public partial class RequiredFunctionToolCall : RequiredToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// Detailed information about the function to be executed by the tool that includes name and arguments. - /// or is null. - internal RequiredFunctionToolCall(string id, InternalRequiredFunctionToolCallDetails internalDetails) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - InternalDetails = internalDetails; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// Detailed information about the function to be executed by the tool that includes name and arguments. - internal RequiredFunctionToolCall(string type, IDictionary serializedAdditionalRawData, string id, InternalRequiredFunctionToolCallDetails internalDetails) : base(type, serializedAdditionalRawData, id) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal RequiredFunctionToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs deleted file mode 100644 index 9f029022944a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.Serialization.cs +++ /dev/null @@ -1,119 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRequiredToolCall))] - public partial class RequiredToolCall : 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(RequiredToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - - RequiredToolCall 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(RequiredToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequiredToolCall(document.RootElement, options); - } - - internal static RequiredToolCall DeserializeRequiredToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "function": return RequiredFunctionToolCall.DeserializeRequiredFunctionToolCall(element, options); - } - } - return UnknownRequiredToolCall.DeserializeUnknownRequiredToolCall(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RequiredToolCall)} does not support writing '{options.Format}' format."); - } - } - - RequiredToolCall 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 DeserializeRequiredToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequiredToolCall)} 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 new RequiredToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRequiredToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs deleted file mode 100644 index abeb4d7c18ec..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RequiredToolCall.cs +++ /dev/null @@ -1,47 +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.Projects -{ - /// - /// An abstract representation of a tool invocation needed by the model to continue a run. - /// 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 RequiredToolCall : RequiredAction - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - /// is null. - protected RequiredToolCall(string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - internal RequiredToolCall(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData) - { - Id = id; - } - - /// Initializes a new instance of for deserialization. - internal RequiredToolCall() - { - } - - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - public string Id { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.cs deleted file mode 100644 index f14f7bea0d8c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormat.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.AI.Projects -{ - /// Possible API response formats. - public readonly partial struct ResponseFormat : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ResponseFormat(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string TextValue = "text"; - private const string JsonObjectValue = "json_object"; - - /// `text` format should be used for requests involving any sort of ToolCall. - public static ResponseFormat Text { get; } = new ResponseFormat(TextValue); - /// Using `json_object` format will limit the usage of ToolCall to only functions. - public static ResponseFormat JsonObject { get; } = new ResponseFormat(JsonObjectValue); - /// Determines if two values are the same. - public static bool operator ==(ResponseFormat left, ResponseFormat right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ResponseFormat left, ResponseFormat right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ResponseFormat(string value) => new ResponseFormat(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ResponseFormat other && Equals(other); - /// - public bool Equals(ResponseFormat 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.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs deleted file mode 100644 index d10bc5b6b717..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.Serialization.cs +++ /dev/null @@ -1,168 +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.Projects -{ - public partial class ResponseFormatJsonSchema : 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(ResponseFormatJsonSchema)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Description)) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("schema"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Schema); -#else - using (JsonDocument document = JsonDocument.Parse(Schema, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - 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 - } - } - } - - ResponseFormatJsonSchema 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(ResponseFormatJsonSchema)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResponseFormatJsonSchema(document.RootElement, options); - } - - internal static ResponseFormatJsonSchema DeserializeResponseFormatJsonSchema(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string description = default; - string name = default; - BinaryData schema = 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("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("schema"u8)) - { - schema = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ResponseFormatJsonSchema(description, name, schema, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ResponseFormatJsonSchema)} does not support writing '{options.Format}' format."); - } - } - - ResponseFormatJsonSchema 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 DeserializeResponseFormatJsonSchema(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ResponseFormatJsonSchema)} 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 ResponseFormatJsonSchema FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeResponseFormatJsonSchema(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/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs deleted file mode 100644 index 27c3e21c9b57..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchema.cs +++ /dev/null @@ -1,115 +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.Projects -{ - /// A description of what the response format is for, used by the model to determine how to respond in the format. - public partial class ResponseFormatJsonSchema - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// The name of a schema. - /// The JSON schema object, describing the response format. - /// or is null. - public ResponseFormatJsonSchema(string name, BinaryData schema) - { - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(schema, nameof(schema)); - - Name = name; - Schema = schema; - } - - /// Initializes a new instance of . - /// A description of what the response format is for, used by the model to determine how to respond in the format. - /// The name of a schema. - /// The JSON schema object, describing the response format. - /// Keeps track of any properties unknown to the library. - internal ResponseFormatJsonSchema(string description, string name, BinaryData schema, IDictionary serializedAdditionalRawData) - { - Description = description; - Name = name; - Schema = schema; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ResponseFormatJsonSchema() - { - } - - /// A description of what the response format is for, used by the model to determine how to respond in the format. - public string Description { get; set; } - /// The name of a schema. - public string Name { get; set; } - /// - /// The JSON schema object, describing the response format. - /// - /// To assign an object to 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 BinaryData Schema { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs deleted file mode 100644 index 154289ef92df..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class ResponseFormatJsonSchemaType : 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(ResponseFormatJsonSchemaType)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("json_schema"u8); - writer.WriteObjectValue(JsonSchema, 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 - } - } - } - - ResponseFormatJsonSchemaType 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(ResponseFormatJsonSchemaType)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeResponseFormatJsonSchemaType(document.RootElement, options); - } - - internal static ResponseFormatJsonSchemaType DeserializeResponseFormatJsonSchemaType(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ResponseFormatJsonSchemaTypeType type = default; - ResponseFormatJsonSchema jsonSchema = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new ResponseFormatJsonSchemaTypeType(property.Value.GetString()); - continue; - } - if (property.NameEquals("json_schema"u8)) - { - jsonSchema = ResponseFormatJsonSchema.DeserializeResponseFormatJsonSchema(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ResponseFormatJsonSchemaType(type, jsonSchema, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ResponseFormatJsonSchemaType)} does not support writing '{options.Format}' format."); - } - } - - ResponseFormatJsonSchemaType 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 DeserializeResponseFormatJsonSchemaType(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ResponseFormatJsonSchemaType)} 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 ResponseFormatJsonSchemaType FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeResponseFormatJsonSchemaType(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/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs deleted file mode 100644 index 8d0f76332659..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaType.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The type of response format being defined: `json_schema`. - public partial class ResponseFormatJsonSchemaType - { - /// - /// 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 JSON schema, describing response format. - /// is null. - public ResponseFormatJsonSchemaType(ResponseFormatJsonSchema jsonSchema) - { - Argument.AssertNotNull(jsonSchema, nameof(jsonSchema)); - - JsonSchema = jsonSchema; - } - - /// Initializes a new instance of . - /// Type. - /// The JSON schema, describing response format. - /// Keeps track of any properties unknown to the library. - internal ResponseFormatJsonSchemaType(ResponseFormatJsonSchemaTypeType type, ResponseFormatJsonSchema jsonSchema, IDictionary serializedAdditionalRawData) - { - Type = type; - JsonSchema = jsonSchema; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ResponseFormatJsonSchemaType() - { - } - - /// Type. - public ResponseFormatJsonSchemaTypeType Type { get; } = ResponseFormatJsonSchemaTypeType.JsonSchema; - - /// The JSON schema, describing response format. - public ResponseFormatJsonSchema JsonSchema { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs deleted file mode 100644 index c9c0b85cb3ec..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ResponseFormatJsonSchemaTypeType.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The ResponseFormatJsonSchemaType_type. - public readonly partial struct ResponseFormatJsonSchemaTypeType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ResponseFormatJsonSchemaTypeType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string JsonSchemaValue = "json_schema"; - - /// json_schema. - public static ResponseFormatJsonSchemaTypeType JsonSchema { get; } = new ResponseFormatJsonSchemaTypeType(JsonSchemaValue); - /// Determines if two values are the same. - public static bool operator ==(ResponseFormatJsonSchemaTypeType left, ResponseFormatJsonSchemaTypeType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ResponseFormatJsonSchemaTypeType left, ResponseFormatJsonSchemaTypeType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ResponseFormatJsonSchemaTypeType(string value) => new ResponseFormatJsonSchemaTypeType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ResponseFormatJsonSchemaTypeType other && Equals(other); - /// - public bool Equals(ResponseFormatJsonSchemaTypeType 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.Projects/src/Generated/RiskCategory.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RiskCategory.cs new file mode 100644 index 000000000000..7fd9c7d9527a --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/RiskCategory.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.AI.Projects +{ + /// Risk category for the attack objective. + public readonly partial struct RiskCategory : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RiskCategory(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HateUnfairnessValue = "HateUnfairness"; + private const string ViolenceValue = "Violence"; + private const string SexualValue = "Sexual"; + private const string SelfHarmValue = "SelfHarm"; + + /// Represents content related to hate or unfairness. + public static RiskCategory HateUnfairness { get; } = new RiskCategory(HateUnfairnessValue); + /// Represents content related to violence. + public static RiskCategory Violence { get; } = new RiskCategory(ViolenceValue); + /// Represents content of a sexual nature. + public static RiskCategory Sexual { get; } = new RiskCategory(SexualValue); + /// Represents content related to self-harm. + public static RiskCategory SelfHarm { get; } = new RiskCategory(SelfHarmValue); + /// Determines if two values are the same. + public static bool operator ==(RiskCategory left, RiskCategory right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RiskCategory left, RiskCategory right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RiskCategory(string value) => new RiskCategory(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RiskCategory other && Equals(other); + /// + public bool Equals(RiskCategory 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.Projects/src/Generated/RunAdditionalFieldList.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunAdditionalFieldList.cs deleted file mode 100644 index 897785c4c0b9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunAdditionalFieldList.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// A list of additional fields to include in the response. - public readonly partial struct RunAdditionalFieldList : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunAdditionalFieldList(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string FileSearchContentsValue = "step_details.tool_calls[*].file_search.results[*].content"; - - /// File search result content. - public static RunAdditionalFieldList FileSearchContents { get; } = new RunAdditionalFieldList(FileSearchContentsValue); - /// Determines if two values are the same. - public static bool operator ==(RunAdditionalFieldList left, RunAdditionalFieldList right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunAdditionalFieldList left, RunAdditionalFieldList right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunAdditionalFieldList(string value) => new RunAdditionalFieldList(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunAdditionalFieldList other && Equals(other); - /// - public bool Equals(RunAdditionalFieldList 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.Projects/src/Generated/RunCompletionUsage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.Serialization.cs deleted file mode 100644 index 7f0d8e2a99ce..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.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.Projects -{ - public partial class RunCompletionUsage : 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(RunCompletionUsage)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - 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 - } - } - } - - RunCompletionUsage 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(RunCompletionUsage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunCompletionUsage(document.RootElement, options); - } - - internal static RunCompletionUsage DeserializeRunCompletionUsage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - long completionTokens = default; - long promptTokens = default; - long totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("completion_tokens"u8)) - { - completionTokens = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("prompt_tokens"u8)) - { - promptTokens = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("total_tokens"u8)) - { - totalTokens = property.Value.GetInt64(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunCompletionUsage(completionTokens, promptTokens, totalTokens, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunCompletionUsage)} does not support writing '{options.Format}' format."); - } - } - - RunCompletionUsage 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 DeserializeRunCompletionUsage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunCompletionUsage)} 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 RunCompletionUsage FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunCompletionUsage(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/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs deleted file mode 100644 index 06340645c52d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunCompletionUsage.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). - public partial class RunCompletionUsage - { - /// - /// 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 completion tokens used over the course of the run. - /// Number of prompt tokens used over the course of the run. - /// Total number of tokens used (prompt + completion). - internal RunCompletionUsage(long completionTokens, long promptTokens, long totalTokens) - { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run. - /// Number of prompt tokens used over the course of the run. - /// Total number of tokens used (prompt + completion). - /// Keeps track of any properties unknown to the library. - internal RunCompletionUsage(long completionTokens, long promptTokens, long totalTokens, IDictionary serializedAdditionalRawData) - { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunCompletionUsage() - { - } - - /// Number of completion tokens used over the course of the run. - public long CompletionTokens { get; } - /// Number of prompt tokens used over the course of the run. - public long PromptTokens { get; } - /// Total number of tokens used (prompt + completion). - public long TotalTokens { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs deleted file mode 100644 index b4793137daef..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class RunError : 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(RunError)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code); - 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 - } - } - } - - RunError 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(RunError)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunError(document.RootElement, options); - } - - internal static RunError DeserializeRunError(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string code = default; - string message = 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("message"u8)) - { - message = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunError(code, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunError)} does not support writing '{options.Format}' format."); - } - } - - RunError 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 DeserializeRunError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunError)} 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 RunError FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunError(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/ai/Azure.AI.Projects/src/Generated/RunError.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunError.cs deleted file mode 100644 index 1593311d899a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunError.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// The details of an error as encountered by an agent thread run. - public partial class RunError - { - /// - /// 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 status for the error. - /// The human-readable text associated with the error. - /// or is null. - internal RunError(string code, string message) - { - Argument.AssertNotNull(code, nameof(code)); - Argument.AssertNotNull(message, nameof(message)); - - Code = code; - Message = message; - } - - /// Initializes a new instance of . - /// The status for the error. - /// The human-readable text associated with the error. - /// Keeps track of any properties unknown to the library. - internal RunError(string code, string message, IDictionary serializedAdditionalRawData) - { - Code = code; - Message = message; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunError() - { - } - - /// The status for the error. - public string Code { get; } - /// The human-readable text associated with the error. - public string Message { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.cs deleted file mode 100644 index 4abba05c525d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStatus.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Possible values for the status of an agent thread run. - public readonly partial struct RunStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string QueuedValue = "queued"; - private const string InProgressValue = "in_progress"; - private const string RequiresActionValue = "requires_action"; - private const string CancellingValue = "cancelling"; - private const string CancelledValue = "cancelled"; - private const string FailedValue = "failed"; - private const string CompletedValue = "completed"; - private const string ExpiredValue = "expired"; - - /// Represents a run that is queued to start. - public static RunStatus Queued { get; } = new RunStatus(QueuedValue); - /// Represents a run that is in progress. - public static RunStatus InProgress { get; } = new RunStatus(InProgressValue); - /// Represents a run that needs another operation, such as tool output submission, to continue. - public static RunStatus RequiresAction { get; } = new RunStatus(RequiresActionValue); - /// Represents a run that is in the process of cancellation. - public static RunStatus Cancelling { get; } = new RunStatus(CancellingValue); - /// Represents a run that has been cancelled. - public static RunStatus Cancelled { get; } = new RunStatus(CancelledValue); - /// Represents a run that failed. - public static RunStatus Failed { get; } = new RunStatus(FailedValue); - /// Represents a run that successfully completed. - public static RunStatus Completed { get; } = new RunStatus(CompletedValue); - /// Represents a run that expired before it could otherwise finish. - public static RunStatus Expired { get; } = new RunStatus(ExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(RunStatus left, RunStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStatus left, RunStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStatus(string value) => new RunStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStatus other && Equals(other); - /// - public bool Equals(RunStatus 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.Projects/src/Generated/RunStep.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.Serialization.cs deleted file mode 100644 index c2ea2f1434f0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.Serialization.cs +++ /dev/null @@ -1,357 +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.Projects -{ - public partial class RunStep : 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(RunStep)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("step_details"u8); - writer.WriteObjectValue(StepDetails, options); - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (ExpiredAt != null) - { - writer.WritePropertyName("expired_at"u8); - writer.WriteNumberValue(ExpiredAt.Value, "U"); - } - else - { - writer.WriteNull("expired_at"); - } - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } - if (CancelledAt != null) - { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); - } - else - { - writer.WriteNull("cancelled_at"); - } - if (FailedAt != null) - { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); - } - else - { - writer.WriteNull("failed_at"); - } - if (Optional.IsDefined(Usage)) - { - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - else - { - writer.WriteNull("usage"); - } - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - 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 - } - } - } - - RunStep 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(RunStep)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStep(document.RootElement, options); - } - - internal static RunStep DeserializeRunStep(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string @object = default; - RunStepType type = default; - string assistantId = default; - string threadId = default; - string runId = default; - RunStepStatus status = default; - RunStepDetails stepDetails = default; - RunStepError lastError = default; - DateTimeOffset createdAt = default; - DateTimeOffset? expiredAt = default; - DateTimeOffset? completedAt = default; - DateTimeOffset? cancelledAt = default; - DateTimeOffset? failedAt = default; - RunStepCompletionUsage usage = default; - IReadOnlyDictionary metadata = 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("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new RunStepType(property.Value.GetString()); - continue; - } - if (property.NameEquals("assistant_id"u8)) - { - assistantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("thread_id"u8)) - { - threadId = property.Value.GetString(); - continue; - } - if (property.NameEquals("run_id"u8)) - { - runId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new RunStepStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("step_details"u8)) - { - stepDetails = RunStepDetails.DeserializeRunStepDetails(property.Value, options); - continue; - } - if (property.NameEquals("last_error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastError = null; - continue; - } - lastError = RunStepError.DeserializeRunStepError(property.Value, options); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("expired_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref expiredAt); - continue; - } - if (property.NameEquals("completed_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref completedAt); - continue; - } - if (property.NameEquals("cancelled_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref cancelledAt); - continue; - } - if (property.NameEquals("failed_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref failedAt); - continue; - } - if (property.NameEquals("usage"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - usage = null; - continue; - } - usage = RunStepCompletionUsage.DeserializeRunStepCompletionUsage(property.Value, options); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStep( - id, - @object, - type, - assistantId, - threadId, - runId, - status, - stepDetails, - lastError, - createdAt, - expiredAt, - completedAt, - cancelledAt, - failedAt, - usage, - metadata, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStep)} does not support writing '{options.Format}' format."); - } - } - - RunStep 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 DeserializeRunStep(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStep)} 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 RunStep FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStep(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/ai/Azure.AI.Projects/src/Generated/RunStep.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.cs deleted file mode 100644 index 6d403877ed00..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStep.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Detailed information about a single step of an agent thread run. - public partial class RunStep - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The type of run step, which can be either message_creation or tool_calls. - /// The ID of the agent associated with the run step. - /// The ID of the thread that was run. - /// The ID of the run that this run step is a part of. - /// The status of this run step. - /// - /// The details for this run 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 and . - /// - /// If applicable, information about the last error encountered by this run step. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expired. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// , , , or is null. - internal RunStep(string id, RunStepType type, string assistantId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(runId, nameof(runId)); - Argument.AssertNotNull(stepDetails, nameof(stepDetails)); - - Id = id; - Type = type; - AssistantId = assistantId; - ThreadId = threadId; - RunId = runId; - Status = status; - StepDetails = stepDetails; - LastError = lastError; - CreatedAt = createdAt; - ExpiredAt = expiredAt; - CompletedAt = completedAt; - CancelledAt = cancelledAt; - FailedAt = failedAt; - Metadata = metadata; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always 'thread.run.step'. - /// The type of run step, which can be either message_creation or tool_calls. - /// The ID of the agent associated with the run step. - /// The ID of the thread that was run. - /// The ID of the run that this run step is a part of. - /// The status of this run step. - /// - /// The details for this run 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 and . - /// - /// If applicable, information about the last error encountered by this run step. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expired. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal RunStep(string id, string @object, RunStepType type, string assistantId, string threadId, string runId, RunStepStatus status, RunStepDetails stepDetails, RunStepError lastError, DateTimeOffset createdAt, DateTimeOffset? expiredAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, RunStepCompletionUsage usage, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - Type = type; - AssistantId = assistantId; - ThreadId = threadId; - RunId = runId; - Status = status; - StepDetails = stepDetails; - LastError = lastError; - CreatedAt = createdAt; - ExpiredAt = expiredAt; - CompletedAt = completedAt; - CancelledAt = cancelledAt; - FailedAt = failedAt; - Usage = usage; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStep() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - - /// The type of run step, which can be either message_creation or tool_calls. - public RunStepType Type { get; } - /// The ID of the agent associated with the run step. - public string AssistantId { get; } - /// The ID of the thread that was run. - public string ThreadId { get; } - /// The ID of the run that this run step is a part of. - public string RunId { get; } - /// The status of this run step. - public RunStepStatus Status { get; } - /// - /// The details for this run 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 and . - /// - public RunStepDetails StepDetails { get; } - /// If applicable, information about the last error encountered by this run step. - public RunStepError LastError { get; } - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// The Unix timestamp, in seconds, representing when this item expired. - public DateTimeOffset? ExpiredAt { get; } - /// The Unix timestamp, in seconds, representing when this completed. - public DateTimeOffset? CompletedAt { get; } - /// The Unix timestamp, in seconds, representing when this was cancelled. - public DateTimeOffset? CancelledAt { get; } - /// The Unix timestamp, in seconds, representing when this failed. - public DateTimeOffset? FailedAt { get; } - /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. - public RunStepCompletionUsage Usage { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.Serialization.cs deleted file mode 100644 index 9bd09b527137..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.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.AI.Projects -{ - public partial class RunStepAzureAISearchToolCall : 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(RunStepAzureAISearchToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("azure_ai_search"u8); - writer.WriteStartObject(); - foreach (var item in AzureAISearch) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepAzureAISearchToolCall 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(RunStepAzureAISearchToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepAzureAISearchToolCall(document.RootElement, options); - } - - internal static RunStepAzureAISearchToolCall DeserializeRunStepAzureAISearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary azureAiSearch = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("azure_ai_search"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - azureAiSearch = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepAzureAISearchToolCall(type, id, serializedAdditionalRawData, azureAiSearch); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepAzureAISearchToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepAzureAISearchToolCall 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 DeserializeRunStepAzureAISearchToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepAzureAISearchToolCall)} 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 new RunStepAzureAISearchToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepAzureAISearchToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.cs deleted file mode 100644 index 6b31eced4af0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepAzureAISearchToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A record of a call to an Azure AI Search tool, issued by the model in evaluation of a defined tool, that represents - /// executed Azure AI search. - /// - public partial class RunStepAzureAISearchToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepAzureAISearchToolCall(string id, IReadOnlyDictionary azureAISearch) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(azureAISearch, nameof(azureAISearch)); - - Type = "azure_ai_search"; - AzureAISearch = azureAISearch; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepAzureAISearchToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary azureAISearch) : base(type, id, serializedAdditionalRawData) - { - AzureAISearch = azureAISearch; - } - - /// Initializes a new instance of for deserialization. - internal RunStepAzureAISearchToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary AzureAISearch { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.Serialization.cs deleted file mode 100644 index c135ac0c5d00..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.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.AI.Projects -{ - public partial class RunStepBingGroundingToolCall : 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(RunStepBingGroundingToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("bing_grounding"u8); - writer.WriteStartObject(); - foreach (var item in BingGrounding) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepBingGroundingToolCall 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(RunStepBingGroundingToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepBingGroundingToolCall(document.RootElement, options); - } - - internal static RunStepBingGroundingToolCall DeserializeRunStepBingGroundingToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary bingGrounding = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bing_grounding"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - bingGrounding = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepBingGroundingToolCall(type, id, serializedAdditionalRawData, bingGrounding); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepBingGroundingToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepBingGroundingToolCall 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 DeserializeRunStepBingGroundingToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepBingGroundingToolCall)} 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 new RunStepBingGroundingToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepBingGroundingToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.cs deleted file mode 100644 index 4b3e0c055278..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepBingGroundingToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A record of a call to a bing grounding tool, issued by the model in evaluation of a defined tool, that represents - /// executed search with bing grounding. - /// - public partial class RunStepBingGroundingToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepBingGroundingToolCall(string id, IReadOnlyDictionary bingGrounding) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(bingGrounding, nameof(bingGrounding)); - - Type = "bing_grounding"; - BingGrounding = bingGrounding; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepBingGroundingToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary bingGrounding) : base(type, id, serializedAdditionalRawData) - { - BingGrounding = bingGrounding; - } - - /// Initializes a new instance of for deserialization. - internal RunStepBingGroundingToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary BingGrounding { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs deleted file mode 100644 index 05c270dd8077..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class RunStepCodeInterpreterImageOutput : 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(RunStepCodeInterpreterImageOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("image"u8); - writer.WriteObjectValue(Image, options); - } - - RunStepCodeInterpreterImageOutput 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(RunStepCodeInterpreterImageOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterImageOutput(document.RootElement, options); - } - - internal static RunStepCodeInterpreterImageOutput DeserializeRunStepCodeInterpreterImageOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepCodeInterpreterImageReference image = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image"u8)) - { - image = RunStepCodeInterpreterImageReference.DeserializeRunStepCodeInterpreterImageReference(property.Value, options); - 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 RunStepCodeInterpreterImageOutput(type, serializedAdditionalRawData, image); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterImageOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterImageOutput 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 DeserializeRunStepCodeInterpreterImageOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterImageOutput)} 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 new RunStepCodeInterpreterImageOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCodeInterpreterImageOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs deleted file mode 100644 index 1b78e4af0233..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageOutput.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// A representation of an image output emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterImageOutput : RunStepCodeInterpreterToolCallOutput - { - /// Initializes a new instance of . - /// Referential information for the image associated with this output. - /// is null. - internal RunStepCodeInterpreterImageOutput(RunStepCodeInterpreterImageReference image) - { - Argument.AssertNotNull(image, nameof(image)); - - Type = "image"; - Image = image; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// Referential information for the image associated with this output. - internal RunStepCodeInterpreterImageOutput(string type, IDictionary serializedAdditionalRawData, RunStepCodeInterpreterImageReference image) : base(type, serializedAdditionalRawData) - { - Image = image; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCodeInterpreterImageOutput() - { - } - - /// Referential information for the image associated with this output. - public RunStepCodeInterpreterImageReference Image { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs deleted file mode 100644 index 10ca8b928f60..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class RunStepCodeInterpreterImageReference : 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(RunStepCodeInterpreterImageReference)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - 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 - } - } - } - - RunStepCodeInterpreterImageReference 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(RunStepCodeInterpreterImageReference)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterImageReference(document.RootElement, options); - } - - internal static RunStepCodeInterpreterImageReference DeserializeRunStepCodeInterpreterImageReference(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepCodeInterpreterImageReference(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterImageReference)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterImageReference 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 DeserializeRunStepCodeInterpreterImageReference(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterImageReference)} 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 RunStepCodeInterpreterImageReference FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCodeInterpreterImageReference(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/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.cs deleted file mode 100644 index aaed08a5c03a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterImageReference.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; - -namespace Azure.AI.Projects -{ - /// An image reference emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterImageReference - { - /// - /// 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 file associated with this image. - /// is null. - internal RunStepCodeInterpreterImageReference(string fileId) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - - FileId = fileId; - } - - /// Initializes a new instance of . - /// The ID of the file associated with this image. - /// Keeps track of any properties unknown to the library. - internal RunStepCodeInterpreterImageReference(string fileId, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCodeInterpreterImageReference() - { - } - - /// The ID of the file associated with this image. - public string FileId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs deleted file mode 100644 index 052765554b10..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class RunStepCodeInterpreterLogOutput : 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(RunStepCodeInterpreterLogOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("logs"u8); - writer.WriteStringValue(Logs); - } - - RunStepCodeInterpreterLogOutput 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(RunStepCodeInterpreterLogOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterLogOutput(document.RootElement, options); - } - - internal static RunStepCodeInterpreterLogOutput DeserializeRunStepCodeInterpreterLogOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string logs = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("logs"u8)) - { - logs = 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 RunStepCodeInterpreterLogOutput(type, serializedAdditionalRawData, logs); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterLogOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterLogOutput 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 DeserializeRunStepCodeInterpreterLogOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterLogOutput)} 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 new RunStepCodeInterpreterLogOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCodeInterpreterLogOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs deleted file mode 100644 index 84a3a237427f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterLogOutput.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// A representation of a log output emitted by a code interpreter tool in response to a tool call by the model. - public partial class RunStepCodeInterpreterLogOutput : RunStepCodeInterpreterToolCallOutput - { - /// Initializes a new instance of . - /// The serialized log output emitted by the code interpreter. - /// is null. - internal RunStepCodeInterpreterLogOutput(string logs) - { - Argument.AssertNotNull(logs, nameof(logs)); - - Type = "logs"; - Logs = logs; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The serialized log output emitted by the code interpreter. - internal RunStepCodeInterpreterLogOutput(string type, IDictionary serializedAdditionalRawData, string logs) : base(type, serializedAdditionalRawData) - { - Logs = logs; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCodeInterpreterLogOutput() - { - } - - /// The serialized log output emitted by the code interpreter. - public string Logs { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.Serialization.cs deleted file mode 100644 index 158ba2de9704..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.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.AI.Projects -{ - public partial class RunStepCodeInterpreterToolCall : 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(RunStepCodeInterpreterToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - RunStepCodeInterpreterToolCall 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(RunStepCodeInterpreterToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterToolCall(document.RootElement, options); - } - - internal static RunStepCodeInterpreterToolCall DeserializeRunStepCodeInterpreterToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalCodeInterpreterToolCallDetails codeInterpreter = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code_interpreter"u8)) - { - codeInterpreter = InternalCodeInterpreterToolCallDetails.DeserializeInternalCodeInterpreterToolCallDetails(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepCodeInterpreterToolCall(type, id, serializedAdditionalRawData, codeInterpreter); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterToolCall 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 DeserializeRunStepCodeInterpreterToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCall)} 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 new RunStepCodeInterpreterToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCodeInterpreterToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs deleted file mode 100644 index 9c834e3d74d1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCall.cs +++ /dev/null @@ -1,47 +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.Projects -{ - /// - /// A record of a call to a code interpreter tool, issued by the model in evaluation of a defined tool, that - /// represents inputs and outputs consumed and emitted by the code interpreter. - /// - public partial class RunStepCodeInterpreterToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// The details of the tool call to the code interpreter tool. - /// or is null. - internal RunStepCodeInterpreterToolCall(string id, InternalCodeInterpreterToolCallDetails internalDetails) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "code_interpreter"; - InternalDetails = internalDetails; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// The details of the tool call to the code interpreter tool. - internal RunStepCodeInterpreterToolCall(string type, string id, IDictionary serializedAdditionalRawData, InternalCodeInterpreterToolCallDetails internalDetails) : base(type, id, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCodeInterpreterToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs deleted file mode 100644 index 0aa97e0a916d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepCodeInterpreterToolCallOutput))] - public partial class RunStepCodeInterpreterToolCallOutput : 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(RunStepCodeInterpreterToolCallOutput)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - RunStepCodeInterpreterToolCallOutput 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(RunStepCodeInterpreterToolCallOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterToolCallOutput(document.RootElement, options); - } - - internal static RunStepCodeInterpreterToolCallOutput DeserializeRunStepCodeInterpreterToolCallOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image": return RunStepCodeInterpreterImageOutput.DeserializeRunStepCodeInterpreterImageOutput(element, options); - case "logs": return RunStepCodeInterpreterLogOutput.DeserializeRunStepCodeInterpreterLogOutput(element, options); - } - } - return UnknownRunStepCodeInterpreterToolCallOutput.DeserializeUnknownRunStepCodeInterpreterToolCallOutput(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCallOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterToolCallOutput 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 DeserializeRunStepCodeInterpreterToolCallOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCallOutput)} 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 RunStepCodeInterpreterToolCallOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCodeInterpreterToolCallOutput(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/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.cs deleted file mode 100644 index 95cd5d808144..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCodeInterpreterToolCallOutput.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.AI.Projects -{ - /// - /// An abstract representation of an emitted output from a code interpreter tool. - /// 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 abstract partial class RunStepCodeInterpreterToolCallOutput - { - /// - /// 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 RunStepCodeInterpreterToolCallOutput() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal RunStepCodeInterpreterToolCallOutput(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.Serialization.cs deleted file mode 100644 index 10aa385f8846..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.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.Projects -{ - public partial class RunStepCompletionUsage : 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(RunStepCompletionUsage)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("completion_tokens"u8); - writer.WriteNumberValue(CompletionTokens); - writer.WritePropertyName("prompt_tokens"u8); - writer.WriteNumberValue(PromptTokens); - writer.WritePropertyName("total_tokens"u8); - writer.WriteNumberValue(TotalTokens); - 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 - } - } - } - - RunStepCompletionUsage 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(RunStepCompletionUsage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCompletionUsage(document.RootElement, options); - } - - internal static RunStepCompletionUsage DeserializeRunStepCompletionUsage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - long completionTokens = default; - long promptTokens = default; - long totalTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("completion_tokens"u8)) - { - completionTokens = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("prompt_tokens"u8)) - { - promptTokens = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("total_tokens"u8)) - { - totalTokens = property.Value.GetInt64(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepCompletionUsage(completionTokens, promptTokens, totalTokens, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCompletionUsage)} does not support writing '{options.Format}' format."); - } - } - - RunStepCompletionUsage 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 DeserializeRunStepCompletionUsage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCompletionUsage)} 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 RunStepCompletionUsage FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCompletionUsage(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/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs deleted file mode 100644 index 6750fa1223c1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCompletionUsage.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Usage statistics related to the run step. - public partial class RunStepCompletionUsage - { - /// - /// 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 completion tokens used over the course of the run step. - /// Number of prompt tokens used over the course of the run step. - /// Total number of tokens used (prompt + completion). - internal RunStepCompletionUsage(long completionTokens, long promptTokens, long totalTokens) - { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; - } - - /// Initializes a new instance of . - /// Number of completion tokens used over the course of the run step. - /// Number of prompt tokens used over the course of the run step. - /// Total number of tokens used (prompt + completion). - /// Keeps track of any properties unknown to the library. - internal RunStepCompletionUsage(long completionTokens, long promptTokens, long totalTokens, IDictionary serializedAdditionalRawData) - { - CompletionTokens = completionTokens; - PromptTokens = promptTokens; - TotalTokens = totalTokens; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCompletionUsage() - { - } - - /// Number of completion tokens used over the course of the run step. - public long CompletionTokens { get; } - /// Number of prompt tokens used over the course of the run step. - public long PromptTokens { get; } - /// Total number of tokens used (prompt + completion). - public long TotalTokens { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.Serialization.cs deleted file mode 100644 index e4e0edaa8412..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.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.AI.Projects -{ - public partial class RunStepCustomSearchToolCall : 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(RunStepCustomSearchToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("bing_custom_search"u8); - writer.WriteStartObject(); - foreach (var item in BingCustomSearch) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepCustomSearchToolCall 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(RunStepCustomSearchToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCustomSearchToolCall(document.RootElement, options); - } - - internal static RunStepCustomSearchToolCall DeserializeRunStepCustomSearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary bingCustomSearch = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bing_custom_search"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - bingCustomSearch = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepCustomSearchToolCall(type, id, serializedAdditionalRawData, bingCustomSearch); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCustomSearchToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepCustomSearchToolCall 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 DeserializeRunStepCustomSearchToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCustomSearchToolCall)} 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 new RunStepCustomSearchToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepCustomSearchToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.cs deleted file mode 100644 index dd6618679e2c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepCustomSearchToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A record of a call to a bing custom search tool, issued by the model in evaluation of a defined tool, that represents - /// executed search with bing custom search. - /// - public partial class RunStepCustomSearchToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepCustomSearchToolCall(string id, IReadOnlyDictionary bingCustomSearch) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); - - Type = "bing_custom_search"; - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepCustomSearchToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary bingCustomSearch) : base(type, id, serializedAdditionalRawData) - { - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of for deserialization. - internal RunStepCustomSearchToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary BingCustomSearch { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs deleted file mode 100644 index 47fc3c68466c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.Serialization.cs +++ /dev/null @@ -1,149 +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.Projects -{ - public partial class RunStepDelta : 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(RunStepDelta)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(StepDetails)) - { - writer.WritePropertyName("step_details"u8); - writer.WriteObjectValue(StepDetails, 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 - } - } - } - - RunStepDelta 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(RunStepDelta)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDelta(document.RootElement, options); - } - - internal static RunStepDelta DeserializeRunStepDelta(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepDeltaDetail stepDetails = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("step_details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - stepDetails = RunStepDeltaDetail.DeserializeRunStepDeltaDetail(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDelta(stepDetails, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDelta)} does not support writing '{options.Format}' format."); - } - } - - RunStepDelta 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 DeserializeRunStepDelta(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDelta)} 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 RunStepDelta FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDelta(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/ai/Azure.AI.Projects/src/Generated/RunStepDelta.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.cs deleted file mode 100644 index 0f601698841d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDelta.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.AI.Projects -{ - /// Represents the delta payload in a streaming run step delta chunk. - public partial class RunStepDelta - { - /// - /// 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 RunStepDelta() - { - } - - /// Initializes a new instance of . - /// - /// The details of the run 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 and . - /// - /// Keeps track of any properties unknown to the library. - internal RunStepDelta(RunStepDeltaDetail stepDetails, IDictionary serializedAdditionalRawData) - { - StepDetails = stepDetails; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The details of the run 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 and . - /// - public RunStepDeltaDetail StepDetails { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.Serialization.cs deleted file mode 100644 index a00deff36c7b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.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.Projects -{ - public partial class RunStepDeltaChunk : 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(RunStepDeltaChunk)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("delta"u8); - writer.WriteObjectValue(Delta, 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 - } - } - } - - RunStepDeltaChunk 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(RunStepDeltaChunk)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaChunk(document.RootElement, options); - } - - internal static RunStepDeltaChunk DeserializeRunStepDeltaChunk(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - RunStepDeltaChunkObject @object = default; - RunStepDelta delta = 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("object"u8)) - { - @object = new RunStepDeltaChunkObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("delta"u8)) - { - delta = RunStepDelta.DeserializeRunStepDelta(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDeltaChunk(id, @object, delta, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaChunk)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaChunk 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 DeserializeRunStepDeltaChunk(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaChunk)} 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 RunStepDeltaChunk FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaChunk(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.cs deleted file mode 100644 index bd48db51e72c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunk.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents a run step delta i.e. any changed fields on a run step during streaming. - public partial class RunStepDeltaChunk - { - /// - /// 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 identifier of the run step, which can be referenced in API endpoints. - /// The delta containing the fields that have changed on the run step. - /// or is null. - internal RunStepDeltaChunk(string id, RunStepDelta delta) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(delta, nameof(delta)); - - Id = id; - Delta = delta; - } - - /// Initializes a new instance of . - /// The identifier of the run step, which can be referenced in API endpoints. - /// The object type, which is always `thread.run.step.delta`. - /// The delta containing the fields that have changed on the run step. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaChunk(string id, RunStepDeltaChunkObject @object, RunStepDelta delta, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - Delta = delta; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaChunk() - { - } - - /// The identifier of the run step, which can be referenced in API endpoints. - public string Id { get; } - /// The object type, which is always `thread.run.step.delta`. - public RunStepDeltaChunkObject Object { get; } = RunStepDeltaChunkObject.ThreadRunStepDelta; - - /// The delta containing the fields that have changed on the run step. - public RunStepDelta Delta { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs deleted file mode 100644 index 3f217f543661..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaChunkObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The RunStepDeltaChunk_object. - public readonly partial struct RunStepDeltaChunkObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStepDeltaChunkObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadRunStepDeltaValue = "thread.run.step.delta"; - - /// thread.run.step.delta. - public static RunStepDeltaChunkObject ThreadRunStepDelta { get; } = new RunStepDeltaChunkObject(ThreadRunStepDeltaValue); - /// Determines if two values are the same. - public static bool operator ==(RunStepDeltaChunkObject left, RunStepDeltaChunkObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStepDeltaChunkObject left, RunStepDeltaChunkObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStepDeltaChunkObject(string value) => new RunStepDeltaChunkObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStepDeltaChunkObject other && Equals(other); - /// - public bool Equals(RunStepDeltaChunkObject 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.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs deleted file mode 100644 index 20ade7d8b53e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.Serialization.cs +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaCodeInterpreterDetailItemObject : 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(RunStepDeltaCodeInterpreterDetailItemObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Input)) - { - writer.WritePropertyName("input"u8); - writer.WriteStringValue(Input); - } - if (Optional.IsCollectionDefined(Outputs)) - { - writer.WritePropertyName("outputs"u8); - writer.WriteStartArray(); - foreach (var item in Outputs) - { - 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 - } - } - } - - RunStepDeltaCodeInterpreterDetailItemObject 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(RunStepDeltaCodeInterpreterDetailItemObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterDetailItemObject(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterDetailItemObject DeserializeRunStepDeltaCodeInterpreterDetailItemObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string input = default; - IReadOnlyList outputs = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("input"u8)) - { - input = property.Value.GetString(); - continue; - } - if (property.NameEquals("outputs"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStepDeltaCodeInterpreterOutput.DeserializeRunStepDeltaCodeInterpreterOutput(item, options)); - } - outputs = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDeltaCodeInterpreterDetailItemObject(input, outputs ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterDetailItemObject)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterDetailItemObject 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 DeserializeRunStepDeltaCodeInterpreterDetailItemObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterDetailItemObject)} 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 RunStepDeltaCodeInterpreterDetailItemObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterDetailItemObject(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs deleted file mode 100644 index a76ab9ec7a09..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterDetailItemObject.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// Represents the Code Interpreter tool call data in a streaming run step's tool calls. - public partial class RunStepDeltaCodeInterpreterDetailItemObject - { - /// - /// 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 RunStepDeltaCodeInterpreterDetailItemObject() - { - Outputs = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The input into the Code Interpreter tool call. - /// - /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more - /// items, including text (`logs`) or images (`image`). Each of these are represented by a - /// different object type. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaCodeInterpreterDetailItemObject(string input, IReadOnlyList outputs, IDictionary serializedAdditionalRawData) - { - Input = input; - Outputs = outputs; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The input into the Code Interpreter tool call. - public string Input { get; } - /// - /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more - /// items, including text (`logs`) or images (`image`). Each of these are represented by a - /// different object type. - /// 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 IReadOnlyList Outputs { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs deleted file mode 100644 index 62eadbd3dc01..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.Serialization.cs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaCodeInterpreterImageOutput : 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(RunStepDeltaCodeInterpreterImageOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Image)) - { - writer.WritePropertyName("image"u8); - writer.WriteObjectValue(Image, options); - } - } - - RunStepDeltaCodeInterpreterImageOutput 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(RunStepDeltaCodeInterpreterImageOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterImageOutput(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterImageOutput DeserializeRunStepDeltaCodeInterpreterImageOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepDeltaCodeInterpreterImageOutputObject image = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("image"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - image = RunStepDeltaCodeInterpreterImageOutputObject.DeserializeRunStepDeltaCodeInterpreterImageOutputObject(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 RunStepDeltaCodeInterpreterImageOutput(index, type, serializedAdditionalRawData, image); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterImageOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterImageOutput 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 DeserializeRunStepDeltaCodeInterpreterImageOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterImageOutput)} 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 new RunStepDeltaCodeInterpreterImageOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterImageOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs deleted file mode 100644 index de128c6b8688..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutput.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Represents an image output as produced the Code interpreter tool and as represented in a streaming run step's delta tool calls collection. - public partial class RunStepDeltaCodeInterpreterImageOutput : RunStepDeltaCodeInterpreterOutput - { - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - internal RunStepDeltaCodeInterpreterImageOutput(int index) : base(index) - { - Type = "image"; - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// Keeps track of any properties unknown to the library. - /// The image data for the Code Interpreter tool call output. - internal RunStepDeltaCodeInterpreterImageOutput(int index, string type, IDictionary serializedAdditionalRawData, RunStepDeltaCodeInterpreterImageOutputObject image) : base(index, type, serializedAdditionalRawData) - { - Image = image; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaCodeInterpreterImageOutput() - { - } - - /// The image data for the Code Interpreter tool call output. - public RunStepDeltaCodeInterpreterImageOutputObject Image { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs deleted file mode 100644 index 17d559cc07d3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.Serialization.cs +++ /dev/null @@ -1,145 +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.Projects -{ - public partial class RunStepDeltaCodeInterpreterImageOutputObject : 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(RunStepDeltaCodeInterpreterImageOutputObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(FileId)) - { - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - } - 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 - } - } - } - - RunStepDeltaCodeInterpreterImageOutputObject 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(RunStepDeltaCodeInterpreterImageOutputObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterImageOutputObject(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterImageOutputObject DeserializeRunStepDeltaCodeInterpreterImageOutputObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDeltaCodeInterpreterImageOutputObject(fileId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterImageOutputObject)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterImageOutputObject 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 DeserializeRunStepDeltaCodeInterpreterImageOutputObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterImageOutputObject)} 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 RunStepDeltaCodeInterpreterImageOutputObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterImageOutputObject(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.cs deleted file mode 100644 index 8089067be9d7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterImageOutputObject.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents the data for a streaming run step's Code Interpreter tool call image output. - public partial class RunStepDeltaCodeInterpreterImageOutputObject - { - /// - /// 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 RunStepDeltaCodeInterpreterImageOutputObject() - { - } - - /// Initializes a new instance of . - /// The file ID for the image. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaCodeInterpreterImageOutputObject(string fileId, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The file ID for the image. - public string FileId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs deleted file mode 100644 index 2e1509b6fc6b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.Serialization.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaCodeInterpreterLogOutput : 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(RunStepDeltaCodeInterpreterLogOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Logs)) - { - writer.WritePropertyName("logs"u8); - writer.WriteStringValue(Logs); - } - } - - RunStepDeltaCodeInterpreterLogOutput 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(RunStepDeltaCodeInterpreterLogOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterLogOutput(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterLogOutput DeserializeRunStepDeltaCodeInterpreterLogOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string logs = default; - int index = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("logs"u8)) - { - logs = property.Value.GetString(); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 RunStepDeltaCodeInterpreterLogOutput(index, type, serializedAdditionalRawData, logs); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterLogOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterLogOutput 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 DeserializeRunStepDeltaCodeInterpreterLogOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterLogOutput)} 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 new RunStepDeltaCodeInterpreterLogOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterLogOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs deleted file mode 100644 index 31f3284b073f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterLogOutput.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// Represents a log output as produced by the Code Interpreter tool and as represented in a streaming run step's delta tool calls collection. - public partial class RunStepDeltaCodeInterpreterLogOutput : RunStepDeltaCodeInterpreterOutput - { - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - internal RunStepDeltaCodeInterpreterLogOutput(int index) : base(index) - { - Type = "logs"; - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// Keeps track of any properties unknown to the library. - /// The text output from the Code Interpreter tool call. - internal RunStepDeltaCodeInterpreterLogOutput(int index, string type, IDictionary serializedAdditionalRawData, string logs) : base(index, type, serializedAdditionalRawData) - { - Logs = logs; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaCodeInterpreterLogOutput() - { - } - - /// The text output from the Code Interpreter tool call. - public string Logs { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs deleted file mode 100644 index 15e0a623c24f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.Serialization.cs +++ /dev/null @@ -1,136 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepDeltaCodeInterpreterOutput))] - public partial class RunStepDeltaCodeInterpreterOutput : 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(RunStepDeltaCodeInterpreterOutput)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - 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 - } - } - } - - RunStepDeltaCodeInterpreterOutput 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(RunStepDeltaCodeInterpreterOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterOutput(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterOutput DeserializeRunStepDeltaCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "image": return RunStepDeltaCodeInterpreterImageOutput.DeserializeRunStepDeltaCodeInterpreterImageOutput(element, options); - case "logs": return RunStepDeltaCodeInterpreterLogOutput.DeserializeRunStepDeltaCodeInterpreterLogOutput(element, options); - } - } - return UnknownRunStepDeltaCodeInterpreterOutput.DeserializeUnknownRunStepDeltaCodeInterpreterOutput(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterOutput 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 DeserializeRunStepDeltaCodeInterpreterOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterOutput)} 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 RunStepDeltaCodeInterpreterOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterOutput(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs deleted file mode 100644 index 656ea7ded2c3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterOutput.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// The abstract base representation of a streaming run step tool call's Code Interpreter tool output. - /// 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 abstract partial class RunStepDeltaCodeInterpreterOutput - { - /// - /// 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 . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - protected RunStepDeltaCodeInterpreterOutput(int index) - { - Index = index; - } - - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaCodeInterpreterOutput(int index, string type, IDictionary serializedAdditionalRawData) - { - Index = index; - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaCodeInterpreterOutput() - { - } - - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - public int Index { get; } - /// The type of the streaming run step tool call's Code Interpreter output. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.cs deleted file mode 100644 index 74be7a30473c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaCodeInterpreterToolCall : 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(RunStepDeltaCodeInterpreterToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(CodeInterpreter)) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); - } - } - - RunStepDeltaCodeInterpreterToolCall 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(RunStepDeltaCodeInterpreterToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterToolCall(document.RootElement, options); - } - - internal static RunStepDeltaCodeInterpreterToolCall DeserializeRunStepDeltaCodeInterpreterToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = default; - int index = default; - string id = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code_interpreter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - codeInterpreter = RunStepDeltaCodeInterpreterDetailItemObject.DeserializeRunStepDeltaCodeInterpreterDetailItemObject(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = 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 RunStepDeltaCodeInterpreterToolCall(index, id, type, serializedAdditionalRawData, codeInterpreter); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterToolCall 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 DeserializeRunStepDeltaCodeInterpreterToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterToolCall)} 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 new RunStepDeltaCodeInterpreterToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaCodeInterpreterToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs deleted file mode 100644 index 8483fa22d47f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaCodeInterpreterToolCall.cs +++ /dev/null @@ -1,46 +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.Projects -{ - /// Represents a Code Interpreter tool call within a streaming run step's tool call details. - public partial class RunStepDeltaCodeInterpreterToolCall : RunStepDeltaToolCall - { - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// is null. - internal RunStepDeltaCodeInterpreterToolCall(int index, string id) : base(index, id) - { - Argument.AssertNotNull(id, nameof(id)); - - Type = "code_interpreter"; - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// Keeps track of any properties unknown to the library. - /// The Code Interpreter data for the tool call. - internal RunStepDeltaCodeInterpreterToolCall(int index, string id, string type, IDictionary serializedAdditionalRawData, RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter) : base(index, id, type, serializedAdditionalRawData) - { - CodeInterpreter = codeInterpreter; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaCodeInterpreterToolCall() - { - } - - /// The Code Interpreter data for the tool call. - public RunStepDeltaCodeInterpreterDetailItemObject CodeInterpreter { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs deleted file mode 100644 index aab82f3f0266..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepDeltaDetail))] - public partial class RunStepDeltaDetail : 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(RunStepDeltaDetail)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - RunStepDeltaDetail 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(RunStepDeltaDetail)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaDetail(document.RootElement, options); - } - - internal static RunStepDeltaDetail DeserializeRunStepDeltaDetail(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "message_creation": return RunStepDeltaMessageCreation.DeserializeRunStepDeltaMessageCreation(element, options); - case "tool_calls": return RunStepDeltaToolCallObject.DeserializeRunStepDeltaToolCallObject(element, options); - } - } - return UnknownRunStepDeltaDetail.DeserializeUnknownRunStepDeltaDetail(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaDetail)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaDetail 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 DeserializeRunStepDeltaDetail(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaDetail)} 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 RunStepDeltaDetail FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaDetail(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.cs deleted file mode 100644 index 68de601fb537..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaDetail.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.AI.Projects -{ - /// - /// Represents a single run step detail item in a streaming run step's delta payload. - /// 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 abstract partial class RunStepDeltaDetail - { - /// - /// 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 RunStepDeltaDetail() - { - } - - /// Initializes a new instance of . - /// The object type for the run step detail object. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaDetail(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type for the run step detail object. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.cs deleted file mode 100644 index 3da3795a7181..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaFileSearchToolCall : 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(RunStepDeltaFileSearchToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - } - - RunStepDeltaFileSearchToolCall 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(RunStepDeltaFileSearchToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaFileSearchToolCall(document.RootElement, options); - } - - internal static RunStepDeltaFileSearchToolCall DeserializeRunStepDeltaFileSearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepFileSearchToolCallResults fileSearch = default; - int index = default; - string id = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSearch = RunStepFileSearchToolCallResults.DeserializeRunStepFileSearchToolCallResults(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = 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 RunStepDeltaFileSearchToolCall(index, id, type, serializedAdditionalRawData, fileSearch); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaFileSearchToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaFileSearchToolCall 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 DeserializeRunStepDeltaFileSearchToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaFileSearchToolCall)} 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 new RunStepDeltaFileSearchToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaFileSearchToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs deleted file mode 100644 index 4c39bc5e2ad2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFileSearchToolCall.cs +++ /dev/null @@ -1,46 +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.Projects -{ - /// Represents a file search tool call within a streaming run step's tool call details. - public partial class RunStepDeltaFileSearchToolCall : RunStepDeltaToolCall - { - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// is null. - internal RunStepDeltaFileSearchToolCall(int index, string id) : base(index, id) - { - Argument.AssertNotNull(id, nameof(id)); - - Type = "file_search"; - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepDeltaFileSearchToolCall(int index, string id, string type, IDictionary serializedAdditionalRawData, RunStepFileSearchToolCallResults fileSearch) : base(index, id, type, serializedAdditionalRawData) - { - FileSearch = fileSearch; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaFileSearchToolCall() - { - } - - /// Reserved for future use. - public RunStepFileSearchToolCallResults FileSearch { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.Serialization.cs deleted file mode 100644 index 4d1b54f128af..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.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.AI.Projects -{ - public partial class RunStepDeltaFunction : 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(RunStepDeltaFunction)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Arguments)) - { - writer.WritePropertyName("arguments"u8); - writer.WriteStringValue(Arguments); - } - if (Optional.IsDefined(Output)) - { - if (Output != null) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - else - { - writer.WriteNull("output"); - } - } - 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 - } - } - } - - RunStepDeltaFunction 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(RunStepDeltaFunction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaFunction(document.RootElement, options); - } - - internal static RunStepDeltaFunction DeserializeRunStepDeltaFunction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - string arguments = default; - string output = 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("arguments"u8)) - { - arguments = property.Value.GetString(); - continue; - } - if (property.NameEquals("output"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - output = null; - continue; - } - output = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDeltaFunction(name, arguments, output, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaFunction)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaFunction 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 DeserializeRunStepDeltaFunction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaFunction)} 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 RunStepDeltaFunction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaFunction(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.cs deleted file mode 100644 index 70f21095badd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunction.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.AI.Projects -{ - /// Represents the function data in a streaming run step delta's function tool call. - public partial class RunStepDeltaFunction - { - /// - /// 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 RunStepDeltaFunction() - { - } - - /// Initializes a new instance of . - /// The name of the function. - /// The arguments passed to the function as input. - /// The output of the function, null if outputs have not yet been submitted. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaFunction(string name, string arguments, string output, IDictionary serializedAdditionalRawData) - { - Name = name; - Arguments = arguments; - Output = output; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The name of the function. - public string Name { get; } - /// The arguments passed to the function as input. - public string Arguments { get; } - /// The output of the function, null if outputs have not yet been submitted. - public string Output { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.cs deleted file mode 100644 index a908624e31b7..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaFunctionToolCall : 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(RunStepDeltaFunctionToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Function)) - { - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(Function, options); - } - } - - RunStepDeltaFunctionToolCall 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(RunStepDeltaFunctionToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaFunctionToolCall(document.RootElement, options); - } - - internal static RunStepDeltaFunctionToolCall DeserializeRunStepDeltaFunctionToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepDeltaFunction function = default; - int index = default; - string id = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - function = RunStepDeltaFunction.DeserializeRunStepDeltaFunction(property.Value, options); - continue; - } - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = 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 RunStepDeltaFunctionToolCall(index, id, type, serializedAdditionalRawData, function); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaFunctionToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaFunctionToolCall 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 DeserializeRunStepDeltaFunctionToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaFunctionToolCall)} 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 new RunStepDeltaFunctionToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaFunctionToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs deleted file mode 100644 index 1347a2ce39bf..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaFunctionToolCall.cs +++ /dev/null @@ -1,46 +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.Projects -{ - /// Represents a function tool call within a streaming run step's tool call details. - public partial class RunStepDeltaFunctionToolCall : RunStepDeltaToolCall - { - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// is null. - internal RunStepDeltaFunctionToolCall(int index, string id) : base(index, id) - { - Argument.AssertNotNull(id, nameof(id)); - - Type = "function"; - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// Keeps track of any properties unknown to the library. - /// The function data for the tool call. - internal RunStepDeltaFunctionToolCall(int index, string id, string type, IDictionary serializedAdditionalRawData, RunStepDeltaFunction function) : base(index, id, type, serializedAdditionalRawData) - { - Function = function; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaFunctionToolCall() - { - } - - /// The function data for the tool call. - public RunStepDeltaFunction Function { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs deleted file mode 100644 index e848a25bc84a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.Serialization.cs +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepDeltaMessageCreation : 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(RunStepDeltaMessageCreation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageCreation)) - { - writer.WritePropertyName("message_creation"u8); - writer.WriteObjectValue(MessageCreation, options); - } - } - - RunStepDeltaMessageCreation 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(RunStepDeltaMessageCreation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaMessageCreation(document.RootElement, options); - } - - internal static RunStepDeltaMessageCreation DeserializeRunStepDeltaMessageCreation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepDeltaMessageCreationObject messageCreation = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("message_creation"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - messageCreation = RunStepDeltaMessageCreationObject.DeserializeRunStepDeltaMessageCreationObject(property.Value, options); - 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 RunStepDeltaMessageCreation(type, serializedAdditionalRawData, messageCreation); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaMessageCreation)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaMessageCreation 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 DeserializeRunStepDeltaMessageCreation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaMessageCreation)} 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 new RunStepDeltaMessageCreation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaMessageCreation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs deleted file mode 100644 index c455f5326917..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreation.cs +++ /dev/null @@ -1,34 +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.Projects -{ - /// Represents a message creation within a streaming run step delta. - public partial class RunStepDeltaMessageCreation : RunStepDeltaDetail - { - /// Initializes a new instance of . - internal RunStepDeltaMessageCreation() - { - Type = "message_creation"; - } - - /// Initializes a new instance of . - /// The object type for the run step detail object. - /// Keeps track of any properties unknown to the library. - /// The message creation data. - internal RunStepDeltaMessageCreation(string type, IDictionary serializedAdditionalRawData, RunStepDeltaMessageCreationObject messageCreation) : base(type, serializedAdditionalRawData) - { - MessageCreation = messageCreation; - } - - /// The message creation data. - public RunStepDeltaMessageCreationObject MessageCreation { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs deleted file mode 100644 index e2b154e72e27..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.Serialization.cs +++ /dev/null @@ -1,145 +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.Projects -{ - public partial class RunStepDeltaMessageCreationObject : 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(RunStepDeltaMessageCreationObject)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("message_id"u8); - writer.WriteStringValue(MessageId); - } - 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 - } - } - } - - RunStepDeltaMessageCreationObject 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(RunStepDeltaMessageCreationObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaMessageCreationObject(document.RootElement, options); - } - - internal static RunStepDeltaMessageCreationObject DeserializeRunStepDeltaMessageCreationObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string messageId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("message_id"u8)) - { - messageId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepDeltaMessageCreationObject(messageId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaMessageCreationObject)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaMessageCreationObject 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 DeserializeRunStepDeltaMessageCreationObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaMessageCreationObject)} 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 RunStepDeltaMessageCreationObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaMessageCreationObject(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.cs deleted file mode 100644 index 076a5a1114fc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaMessageCreationObject.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Represents the data within a streaming run step message creation response object. - public partial class RunStepDeltaMessageCreationObject - { - /// - /// 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 RunStepDeltaMessageCreationObject() - { - } - - /// Initializes a new instance of . - /// The ID of the newly-created message. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaMessageCreationObject(string messageId, IDictionary serializedAdditionalRawData) - { - MessageId = messageId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The ID of the newly-created message. - public string MessageId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs deleted file mode 100644 index 0b20189a7043..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.Serialization.cs +++ /dev/null @@ -1,139 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepDeltaToolCall))] - public partial class RunStepDeltaToolCall : 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(RunStepDeltaToolCall)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("index"u8); - writer.WriteNumberValue(Index); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - 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 - } - } - } - - RunStepDeltaToolCall 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(RunStepDeltaToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaToolCall(document.RootElement, options); - } - - internal static RunStepDeltaToolCall DeserializeRunStepDeltaToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "code_interpreter": return RunStepDeltaCodeInterpreterToolCall.DeserializeRunStepDeltaCodeInterpreterToolCall(element, options); - case "file_search": return RunStepDeltaFileSearchToolCall.DeserializeRunStepDeltaFileSearchToolCall(element, options); - case "function": return RunStepDeltaFunctionToolCall.DeserializeRunStepDeltaFunctionToolCall(element, options); - } - } - return UnknownRunStepDeltaToolCall.DeserializeUnknownRunStepDeltaToolCall(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaToolCall 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 DeserializeRunStepDeltaToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCall)} 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 RunStepDeltaToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaToolCall(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/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.cs deleted file mode 100644 index 198aae90f407..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCall.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.Projects -{ - /// - /// The abstract base representation of a single tool call within a streaming run step's delta tool call details. - /// 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 abstract partial class RunStepDeltaToolCall - { - /// - /// 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 . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// is null. - protected RunStepDeltaToolCall(int index, string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Index = index; - Id = id; - } - - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// Keeps track of any properties unknown to the library. - internal RunStepDeltaToolCall(int index, string id, string type, IDictionary serializedAdditionalRawData) - { - Index = index; - Id = id; - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepDeltaToolCall() - { - } - - /// The index of the tool call detail in the run step's tool_calls array. - public int Index { get; } - /// The ID of the tool call, used when submitting outputs to the run. - public string Id { get; } - /// The type of the tool call detail item in a streaming run step's details. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.Serialization.cs deleted file mode 100644 index e167d377b574..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.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.AI.Projects -{ - public partial class RunStepDeltaToolCallObject : 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(RunStepDeltaToolCallObject)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - if (Optional.IsCollectionDefined(ToolCalls)) - { - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - } - - RunStepDeltaToolCallObject 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(RunStepDeltaToolCallObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaToolCallObject(document.RootElement, options); - } - - internal static RunStepDeltaToolCallObject DeserializeRunStepDeltaToolCallObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList toolCalls = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_calls"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStepDeltaToolCall.DeserializeRunStepDeltaToolCall(item, options)); - } - toolCalls = array; - 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 RunStepDeltaToolCallObject(type, serializedAdditionalRawData, toolCalls ?? new ChangeTrackingList()); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCallObject)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaToolCallObject 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 DeserializeRunStepDeltaToolCallObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCallObject)} 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 new RunStepDeltaToolCallObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDeltaToolCallObject(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs deleted file mode 100644 index 5778fcda8a0b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDeltaToolCallObject.cs +++ /dev/null @@ -1,43 +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.Projects -{ - /// Represents an invocation of tool calls as part of a streaming run step. - public partial class RunStepDeltaToolCallObject : RunStepDeltaDetail - { - /// Initializes a new instance of . - internal RunStepDeltaToolCallObject() - { - Type = "tool_calls"; - ToolCalls = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The object type for the run step detail object. - /// Keeps track of any properties unknown to the library. - /// - /// The collection of tool calls for the tool call detail item. - /// 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 RunStepDeltaToolCallObject(string type, IDictionary serializedAdditionalRawData, IReadOnlyList toolCalls) : base(type, serializedAdditionalRawData) - { - ToolCalls = toolCalls; - } - - /// - /// The collection of tool calls for the tool call detail item. - /// 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 IReadOnlyList ToolCalls { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs deleted file mode 100644 index 2cb1df56a281..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepDetails))] - public partial class RunStepDetails : 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(RunStepDetails)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - RunStepDetails 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(RunStepDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDetails(document.RootElement, options); - } - - internal static RunStepDetails DeserializeRunStepDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "message_creation": return RunStepMessageCreationDetails.DeserializeRunStepMessageCreationDetails(element, options); - case "tool_calls": return RunStepToolCallDetails.DeserializeRunStepToolCallDetails(element, options); - } - } - return UnknownRunStepDetails.DeserializeUnknownRunStepDetails(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDetails)} does not support writing '{options.Format}' format."); - } - } - - RunStepDetails 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 DeserializeRunStepDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDetails)} 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 RunStepDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepDetails(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/ai/Azure.AI.Projects/src/Generated/RunStepDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.cs deleted file mode 100644 index 872475195344..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepDetails.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.AI.Projects -{ - /// - /// An abstract representation of the details for a run 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 and . - /// - public abstract partial class RunStepDetails - { - /// - /// 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 RunStepDetails() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal RunStepDetails(RunStepType type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal RunStepType Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs deleted file mode 100644 index 447126838892..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class RunStepError : 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(RunStepError)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - 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 - } - } - } - - RunStepError 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(RunStepError)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepError(document.RootElement, options); - } - - internal static RunStepError DeserializeRunStepError(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepErrorCode code = default; - string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = new RunStepErrorCode(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 RunStepError(code, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepError)} does not support writing '{options.Format}' format."); - } - } - - RunStepError 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 DeserializeRunStepError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepError)} 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 RunStepError FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepError(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/ai/Azure.AI.Projects/src/Generated/RunStepError.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.cs deleted file mode 100644 index 0980299543a5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepError.cs +++ /dev/null @@ -1,81 +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.Projects -{ - /// The error information associated with a failed run step. - public partial class RunStepError - { - /// - /// 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 this error. - /// The human-readable text associated with this error. - /// is null. - internal RunStepError(RunStepErrorCode code, string message) - { - Argument.AssertNotNull(message, nameof(message)); - - Code = code; - Message = message; - } - - /// Initializes a new instance of . - /// The error code for this error. - /// The human-readable text associated with this error. - /// Keeps track of any properties unknown to the library. - internal RunStepError(RunStepErrorCode code, string message, IDictionary serializedAdditionalRawData) - { - Code = code; - Message = message; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepError() - { - } - - /// The error code for this error. - public RunStepErrorCode Code { get; } - /// The human-readable text associated with this error. - public string Message { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.cs deleted file mode 100644 index fc048aa38575..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepErrorCode.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.AI.Projects -{ - /// Possible error code values attributable to a failed run step. - public readonly partial struct RunStepErrorCode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStepErrorCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServerErrorValue = "server_error"; - private const string RateLimitExceededValue = "rate_limit_exceeded"; - - /// Represents a server error. - public static RunStepErrorCode ServerError { get; } = new RunStepErrorCode(ServerErrorValue); - /// Represents an error indicating configured rate limits were exceeded. - public static RunStepErrorCode RateLimitExceeded { get; } = new RunStepErrorCode(RateLimitExceededValue); - /// Determines if two values are the same. - public static bool operator ==(RunStepErrorCode left, RunStepErrorCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStepErrorCode left, RunStepErrorCode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStepErrorCode(string value) => new RunStepErrorCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStepErrorCode other && Equals(other); - /// - public bool Equals(RunStepErrorCode 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.Projects/src/Generated/RunStepFileSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.Serialization.cs deleted file mode 100644 index 102022779eac..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.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.AI.Projects -{ - public partial class RunStepFileSearchToolCall : 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(RunStepFileSearchToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - - RunStepFileSearchToolCall 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(RunStepFileSearchToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepFileSearchToolCall(document.RootElement, options); - } - - internal static RunStepFileSearchToolCall DeserializeRunStepFileSearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepFileSearchToolCallResults fileSearch = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_search"u8)) - { - fileSearch = RunStepFileSearchToolCallResults.DeserializeRunStepFileSearchToolCallResults(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepFileSearchToolCall(type, id, serializedAdditionalRawData, fileSearch); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepFileSearchToolCall 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 DeserializeRunStepFileSearchToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCall)} 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 new RunStepFileSearchToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepFileSearchToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.cs deleted file mode 100644 index aec381fb6c39..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A record of a call to a file search tool, issued by the model in evaluation of a defined tool, that represents - /// executed file search. - /// - public partial class RunStepFileSearchToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// For now, this is always going to be an empty object. - /// or is null. - internal RunStepFileSearchToolCall(string id, RunStepFileSearchToolCallResults fileSearch) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(fileSearch, nameof(fileSearch)); - - Type = "file_search"; - FileSearch = fileSearch; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// For now, this is always going to be an empty object. - internal RunStepFileSearchToolCall(string type, string id, IDictionary serializedAdditionalRawData, RunStepFileSearchToolCallResults fileSearch) : base(type, id, serializedAdditionalRawData) - { - FileSearch = fileSearch; - } - - /// Initializes a new instance of for deserialization. - internal RunStepFileSearchToolCall() - { - } - - /// For now, this is always going to be an empty object. - public RunStepFileSearchToolCallResults FileSearch { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.Serialization.cs deleted file mode 100644 index 0e46863ab92b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.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; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepFileSearchToolCallResult : 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(RunStepFileSearchToolCallResult)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file_id"u8); - writer.WriteStringValue(FileId); - writer.WritePropertyName("file_name"u8); - writer.WriteStringValue(FileName); - writer.WritePropertyName("score"u8); - writer.WriteNumberValue(Score); - if (Optional.IsCollectionDefined(Content)) - { - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in Content) - { - 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 - } - } - } - - RunStepFileSearchToolCallResult 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(RunStepFileSearchToolCallResult)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepFileSearchToolCallResult(document.RootElement, options); - } - - internal static RunStepFileSearchToolCallResult DeserializeRunStepFileSearchToolCallResult(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string fileId = default; - string fileName = default; - float score = default; - IReadOnlyList content = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_id"u8)) - { - fileId = property.Value.GetString(); - continue; - } - if (property.NameEquals("file_name"u8)) - { - fileName = property.Value.GetString(); - continue; - } - if (property.NameEquals("score"u8)) - { - score = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("content"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(FileSearchToolCallContent.DeserializeFileSearchToolCallContent(item, options)); - } - content = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepFileSearchToolCallResult(fileId, fileName, score, content ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCallResult)} does not support writing '{options.Format}' format."); - } - } - - RunStepFileSearchToolCallResult 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 DeserializeRunStepFileSearchToolCallResult(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCallResult)} 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 RunStepFileSearchToolCallResult FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepFileSearchToolCallResult(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/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs deleted file mode 100644 index fd13ac0486e5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResult.cs +++ /dev/null @@ -1,93 +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.Projects -{ - /// File search tool call result. - public partial class RunStepFileSearchToolCallResult - { - /// - /// 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 file that result was found in. - /// The name of the file that result was found in. - /// The score of the result. All values must be a floating point number between 0 and 1. - /// or is null. - internal RunStepFileSearchToolCallResult(string fileId, string fileName, float score) - { - Argument.AssertNotNull(fileId, nameof(fileId)); - Argument.AssertNotNull(fileName, nameof(fileName)); - - FileId = fileId; - FileName = fileName; - Score = score; - Content = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// The ID of the file that result was found in. - /// The name of the file that result was found in. - /// The score of the result. All values must be a floating point number between 0 and 1. - /// The content of the result that was found. The content is only included if requested via the include query parameter. - /// Keeps track of any properties unknown to the library. - internal RunStepFileSearchToolCallResult(string fileId, string fileName, float score, IReadOnlyList content, IDictionary serializedAdditionalRawData) - { - FileId = fileId; - FileName = fileName; - Score = score; - Content = content; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepFileSearchToolCallResult() - { - } - - /// The ID of the file that result was found in. - public string FileId { get; } - /// The name of the file that result was found in. - public string FileName { get; } - /// The score of the result. All values must be a floating point number between 0 and 1. - public float Score { get; } - /// The content of the result that was found. The content is only included if requested via the include query parameter. - public IReadOnlyList Content { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.cs deleted file mode 100644 index 88b1146b1aae..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class RunStepFileSearchToolCallResults : 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(RunStepFileSearchToolCallResults)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(RankingOptions)) - { - writer.WritePropertyName("ranking_options"u8); - writer.WriteObjectValue(RankingOptions, options); - } - 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 - } - } - } - - RunStepFileSearchToolCallResults 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(RunStepFileSearchToolCallResults)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepFileSearchToolCallResults(document.RootElement, options); - } - - internal static RunStepFileSearchToolCallResults DeserializeRunStepFileSearchToolCallResults(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - FileSearchRankingOptions rankingOptions = default; - IReadOnlyList results = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("ranking_options"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - rankingOptions = FileSearchRankingOptions.DeserializeFileSearchRankingOptions(property.Value, options); - continue; - } - if (property.NameEquals("results"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStepFileSearchToolCallResult.DeserializeRunStepFileSearchToolCallResult(item, options)); - } - results = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepFileSearchToolCallResults(rankingOptions, results, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCallResults)} does not support writing '{options.Format}' format."); - } - } - - RunStepFileSearchToolCallResults 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 DeserializeRunStepFileSearchToolCallResults(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepFileSearchToolCallResults)} 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 RunStepFileSearchToolCallResults FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepFileSearchToolCallResults(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/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.cs deleted file mode 100644 index 087a283ebaea..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFileSearchToolCallResults.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.AI.Projects -{ - /// The results of the file search. - public partial class RunStepFileSearchToolCallResults - { - /// - /// 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 array of a file search results. - /// is null. - internal RunStepFileSearchToolCallResults(IEnumerable results) - { - Argument.AssertNotNull(results, nameof(results)); - - Results = results.ToList(); - } - - /// Initializes a new instance of . - /// Ranking options for file search. - /// The array of a file search results. - /// Keeps track of any properties unknown to the library. - internal RunStepFileSearchToolCallResults(FileSearchRankingOptions rankingOptions, IReadOnlyList results, IDictionary serializedAdditionalRawData) - { - RankingOptions = rankingOptions; - Results = results; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepFileSearchToolCallResults() - { - } - - /// Ranking options for file search. - public FileSearchRankingOptions RankingOptions { get; } - /// The array of a file search results. - public IReadOnlyList Results { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.Serialization.cs deleted file mode 100644 index 4b06c589959e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.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.AI.Projects -{ - public partial class RunStepFunctionToolCall : 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(RunStepFunctionToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("function"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - RunStepFunctionToolCall 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(RunStepFunctionToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepFunctionToolCall(document.RootElement, options); - } - - internal static RunStepFunctionToolCall DeserializeRunStepFunctionToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalRunStepFunctionToolCallDetails function = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("function"u8)) - { - function = InternalRunStepFunctionToolCallDetails.DeserializeInternalRunStepFunctionToolCallDetails(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepFunctionToolCall(type, id, serializedAdditionalRawData, function); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepFunctionToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepFunctionToolCall 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 DeserializeRunStepFunctionToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepFunctionToolCall)} 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 new RunStepFunctionToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepFunctionToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs deleted file mode 100644 index 7791557ae4a2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepFunctionToolCall.cs +++ /dev/null @@ -1,47 +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.Projects -{ - /// - /// A record of a call to a function tool, issued by the model in evaluation of a defined tool, that represents the inputs - /// and output consumed and emitted by the specified function. - /// - public partial class RunStepFunctionToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// The detailed information about the function called by the model. - /// or is null. - internal RunStepFunctionToolCall(string id, InternalRunStepFunctionToolCallDetails internalDetails) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "function"; - InternalDetails = internalDetails; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// The detailed information about the function called by the model. - internal RunStepFunctionToolCall(string type, string id, IDictionary serializedAdditionalRawData, InternalRunStepFunctionToolCallDetails internalDetails) : base(type, id, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal RunStepFunctionToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs deleted file mode 100644 index 6d7507fc139d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class RunStepMessageCreationDetails : 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(RunStepMessageCreationDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("message_creation"u8); - writer.WriteObjectValue(MessageCreation, options); - } - - RunStepMessageCreationDetails 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(RunStepMessageCreationDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepMessageCreationDetails(document.RootElement, options); - } - - internal static RunStepMessageCreationDetails DeserializeRunStepMessageCreationDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepMessageCreationReference messageCreation = default; - RunStepType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("message_creation"u8)) - { - messageCreation = RunStepMessageCreationReference.DeserializeRunStepMessageCreationReference(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new RunStepType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepMessageCreationDetails(type, serializedAdditionalRawData, messageCreation); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepMessageCreationDetails)} does not support writing '{options.Format}' format."); - } - } - - RunStepMessageCreationDetails 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 DeserializeRunStepMessageCreationDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepMessageCreationDetails)} 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 new RunStepMessageCreationDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepMessageCreationDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs deleted file mode 100644 index ded89f984e4e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationDetails.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The detailed information associated with a message creation run step. - public partial class RunStepMessageCreationDetails : RunStepDetails - { - /// Initializes a new instance of . - /// Information about the message creation associated with this run step. - /// is null. - internal RunStepMessageCreationDetails(RunStepMessageCreationReference messageCreation) - { - Argument.AssertNotNull(messageCreation, nameof(messageCreation)); - - Type = RunStepType.MessageCreation; - MessageCreation = messageCreation; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// Information about the message creation associated with this run step. - internal RunStepMessageCreationDetails(RunStepType type, IDictionary serializedAdditionalRawData, RunStepMessageCreationReference messageCreation) : base(type, serializedAdditionalRawData) - { - MessageCreation = messageCreation; - } - - /// Initializes a new instance of for deserialization. - internal RunStepMessageCreationDetails() - { - } - - /// Information about the message creation associated with this run step. - public RunStepMessageCreationReference MessageCreation { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs deleted file mode 100644 index 2db25392ca03..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class RunStepMessageCreationReference : 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(RunStepMessageCreationReference)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("message_id"u8); - writer.WriteStringValue(MessageId); - 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 - } - } - } - - RunStepMessageCreationReference 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(RunStepMessageCreationReference)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepMessageCreationReference(document.RootElement, options); - } - - internal static RunStepMessageCreationReference DeserializeRunStepMessageCreationReference(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string messageId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("message_id"u8)) - { - messageId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepMessageCreationReference(messageId, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepMessageCreationReference)} does not support writing '{options.Format}' format."); - } - } - - RunStepMessageCreationReference 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 DeserializeRunStepMessageCreationReference(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepMessageCreationReference)} 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 RunStepMessageCreationReference FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepMessageCreationReference(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/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.cs deleted file mode 100644 index dbedc9a28ab6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepMessageCreationReference.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; - -namespace Azure.AI.Projects -{ - /// The details of a message created as a part of a run step. - public partial class RunStepMessageCreationReference - { - /// - /// 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 message created by this run step. - /// is null. - internal RunStepMessageCreationReference(string messageId) - { - Argument.AssertNotNull(messageId, nameof(messageId)); - - MessageId = messageId; - } - - /// Initializes a new instance of . - /// The ID of the message created by this run step. - /// Keeps track of any properties unknown to the library. - internal RunStepMessageCreationReference(string messageId, IDictionary serializedAdditionalRawData) - { - MessageId = messageId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepMessageCreationReference() - { - } - - /// The ID of the message created by this run step. - public string MessageId { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.Serialization.cs deleted file mode 100644 index d90fb7b78d29..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.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.AI.Projects -{ - public partial class RunStepOpenAPIToolCall : 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(RunStepOpenAPIToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("openapi"u8); - writer.WriteStartObject(); - foreach (var item in OpenAPI) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepOpenAPIToolCall 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(RunStepOpenAPIToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepOpenAPIToolCall(document.RootElement, options); - } - - internal static RunStepOpenAPIToolCall DeserializeRunStepOpenAPIToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary openapi = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("openapi"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - openapi = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepOpenAPIToolCall(type, id, serializedAdditionalRawData, openapi); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepOpenAPIToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepOpenAPIToolCall 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 DeserializeRunStepOpenAPIToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepOpenAPIToolCall)} 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 new RunStepOpenAPIToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepOpenAPIToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.cs deleted file mode 100644 index 309a45d57ea0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepOpenAPIToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// A record of a call to an OpenAPI tool, issued by the model in evaluation of a defined tool, that represents - /// executed OpenAPI operations. - /// - public partial class RunStepOpenAPIToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepOpenAPIToolCall(string id, IReadOnlyDictionary openAPI) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(openAPI, nameof(openAPI)); - - Type = "openapi"; - OpenAPI = openAPI; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepOpenAPIToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary openAPI) : base(type, id, serializedAdditionalRawData) - { - OpenAPI = openAPI; - } - - /// Initializes a new instance of for deserialization. - internal RunStepOpenAPIToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary OpenAPI { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.cs deleted file mode 100644 index f71c99e16db9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStatus.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Possible values for the status of a run step. - public readonly partial struct RunStepStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStepStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CancelledValue = "cancelled"; - private const string FailedValue = "failed"; - private const string CompletedValue = "completed"; - private const string ExpiredValue = "expired"; - - /// Represents a run step still in progress. - public static RunStepStatus InProgress { get; } = new RunStepStatus(InProgressValue); - /// Represents a run step that was cancelled. - public static RunStepStatus Cancelled { get; } = new RunStepStatus(CancelledValue); - /// Represents a run step that failed. - public static RunStepStatus Failed { get; } = new RunStepStatus(FailedValue); - /// Represents a run step that successfully completed. - public static RunStepStatus Completed { get; } = new RunStepStatus(CompletedValue); - /// Represents a run step that expired before otherwise finishing. - public static RunStepStatus Expired { get; } = new RunStepStatus(ExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(RunStepStatus left, RunStepStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStepStatus left, RunStepStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStepStatus(string value) => new RunStepStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStepStatus other && Equals(other); - /// - public bool Equals(RunStepStatus 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.Projects/src/Generated/RunStepStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStreamEvent.cs deleted file mode 100644 index 423b575c14a9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepStreamEvent.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Run step operation related streaming events. - public readonly partial struct RunStepStreamEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStepStreamEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadRunStepCreatedValue = "thread.run.step.created"; - private const string ThreadRunStepInProgressValue = "thread.run.step.in_progress"; - private const string ThreadRunStepDeltaValue = "thread.run.step.delta"; - private const string ThreadRunStepCompletedValue = "thread.run.step.completed"; - private const string ThreadRunStepFailedValue = "thread.run.step.failed"; - private const string ThreadRunStepCancelledValue = "thread.run.step.cancelled"; - private const string ThreadRunStepExpiredValue = "thread.run.step.expired"; - - /// Event sent when a new thread run step is created. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepCreated { get; } = new RunStepStreamEvent(ThreadRunStepCreatedValue); - /// Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepInProgress { get; } = new RunStepStreamEvent(ThreadRunStepInProgressValue); - /// Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk. - public static RunStepStreamEvent ThreadRunStepDelta { get; } = new RunStepStreamEvent(ThreadRunStepDeltaValue); - /// Event sent when a run step is completed. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepCompleted { get; } = new RunStepStreamEvent(ThreadRunStepCompletedValue); - /// Event sent when a run step fails. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepFailed { get; } = new RunStepStreamEvent(ThreadRunStepFailedValue); - /// Event sent when a run step is cancelled. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepCancelled { get; } = new RunStepStreamEvent(ThreadRunStepCancelledValue); - /// Event sent when a run step is expired. The data of this event is of type RunStep. - public static RunStepStreamEvent ThreadRunStepExpired { get; } = new RunStepStreamEvent(ThreadRunStepExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(RunStepStreamEvent left, RunStepStreamEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStepStreamEvent left, RunStepStreamEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStepStreamEvent(string value) => new RunStepStreamEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStepStreamEvent other && Equals(other); - /// - public bool Equals(RunStepStreamEvent 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.Projects/src/Generated/RunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.Serialization.cs deleted file mode 100644 index c427a0f4981d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.Serialization.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownRunStepToolCall))] - public partial class RunStepToolCall : 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(RunStepToolCall)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - 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 - } - } - } - - RunStepToolCall 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(RunStepToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepToolCall(document.RootElement, options); - } - - internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "azure_ai_search": return RunStepAzureAISearchToolCall.DeserializeRunStepAzureAISearchToolCall(element, options); - case "bing_custom_search": return RunStepCustomSearchToolCall.DeserializeRunStepCustomSearchToolCall(element, options); - case "bing_grounding": return RunStepBingGroundingToolCall.DeserializeRunStepBingGroundingToolCall(element, options); - case "code_interpreter": return RunStepCodeInterpreterToolCall.DeserializeRunStepCodeInterpreterToolCall(element, options); - case "fabric_dataagent": return RunStepMicrosoftFabricToolCall.DeserializeRunStepMicrosoftFabricToolCall(element, options); - case "file_search": return RunStepFileSearchToolCall.DeserializeRunStepFileSearchToolCall(element, options); - case "function": return RunStepFunctionToolCall.DeserializeRunStepFunctionToolCall(element, options); - case "openapi": return RunStepOpenAPIToolCall.DeserializeRunStepOpenAPIToolCall(element, options); - case "sharepoint_grounding": return RunStepSharepointToolCall.DeserializeRunStepSharepointToolCall(element, options); - } - } - return UnknownRunStepToolCall.DeserializeUnknownRunStepToolCall(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepToolCall 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 DeserializeRunStepToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepToolCall)} 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 RunStepToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepToolCall(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/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.cs deleted file mode 100644 index a800f6a76157..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCall.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; - -namespace Azure.AI.Projects -{ - /// - /// An abstract representation of a detailed tool call as recorded within a run step for an existing run. - /// 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 abstract partial class RunStepToolCall - { - /// - /// 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 . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// is null. - protected RunStepToolCall(string id) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - internal RunStepToolCall(string type, string id, IDictionary serializedAdditionalRawData) - { - Type = type; - Id = id; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RunStepToolCall() - { - } - - /// The object type. - internal string Type { get; set; } - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - public string Id { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs deleted file mode 100644 index a2b03512f3ca..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.Serialization.cs +++ /dev/null @@ -1,144 +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.Projects -{ - public partial class RunStepToolCallDetails : 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(RunStepToolCallDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("tool_calls"u8); - writer.WriteStartArray(); - foreach (var item in ToolCalls) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - - RunStepToolCallDetails 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(RunStepToolCallDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepToolCallDetails(document.RootElement, options); - } - - internal static RunStepToolCallDetails DeserializeRunStepToolCallDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList toolCalls = default; - RunStepType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_calls"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(RunStepToolCall.DeserializeRunStepToolCall(item, options)); - } - toolCalls = array; - continue; - } - if (property.NameEquals("type"u8)) - { - type = new RunStepType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepToolCallDetails(type, serializedAdditionalRawData, toolCalls); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepToolCallDetails)} does not support writing '{options.Format}' format."); - } - } - - RunStepToolCallDetails 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 DeserializeRunStepToolCallDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepToolCallDetails)} 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 new RunStepToolCallDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepToolCallDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.cs deleted file mode 100644 index 00e943d0854b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepToolCallDetails.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.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Projects -{ - /// The detailed information associated with a run step calling tools. - public partial class RunStepToolCallDetails : RunStepDetails - { - /// Initializes a new instance of . - /// - /// A list of tool call details for this run 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 , , , , , , , and . - /// - /// is null. - internal RunStepToolCallDetails(IEnumerable toolCalls) - { - Argument.AssertNotNull(toolCalls, nameof(toolCalls)); - - Type = RunStepType.ToolCalls; - ToolCalls = toolCalls.ToList(); - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// - /// A list of tool call details for this run 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 , , , , , , , and . - /// - internal RunStepToolCallDetails(RunStepType type, IDictionary serializedAdditionalRawData, IReadOnlyList toolCalls) : base(type, serializedAdditionalRawData) - { - ToolCalls = toolCalls; - } - - /// Initializes a new instance of for deserialization. - internal RunStepToolCallDetails() - { - } - - /// - /// A list of tool call details for this run 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 , , , , , , , and . - /// - public IReadOnlyList ToolCalls { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.cs deleted file mode 100644 index b3e4153be1e9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStepType.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.AI.Projects -{ - /// The possible types of run steps. - public readonly partial struct RunStepType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStepType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string MessageCreationValue = "message_creation"; - private const string ToolCallsValue = "tool_calls"; - - /// Represents a run step to create a message. - public static RunStepType MessageCreation { get; } = new RunStepType(MessageCreationValue); - /// Represents a run step that calls tools. - public static RunStepType ToolCalls { get; } = new RunStepType(ToolCallsValue); - /// Determines if two values are the same. - public static bool operator ==(RunStepType left, RunStepType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStepType left, RunStepType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStepType(string value) => new RunStepType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStepType other && Equals(other); - /// - public bool Equals(RunStepType 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.Projects/src/Generated/RunStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.cs deleted file mode 100644 index b3fd0dcab2ef..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/RunStreamEvent.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.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Run operation related streaming events. - public readonly partial struct RunStreamEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public RunStreamEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadRunCreatedValue = "thread.run.created"; - private const string ThreadRunQueuedValue = "thread.run.queued"; - private const string ThreadRunInProgressValue = "thread.run.in_progress"; - private const string ThreadRunRequiresActionValue = "thread.run.requires_action"; - private const string ThreadRunCompletedValue = "thread.run.completed"; - private const string ThreadRunIncompleteValue = "thread.run.incomplete"; - private const string ThreadRunFailedValue = "thread.run.failed"; - private const string ThreadRunCancellingValue = "thread.run.cancelling"; - private const string ThreadRunCancelledValue = "thread.run.cancelled"; - private const string ThreadRunExpiredValue = "thread.run.expired"; - - /// Event sent when a new run is created. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunCreated { get; } = new RunStreamEvent(ThreadRunCreatedValue); - /// Event sent when a run moves to `queued` status. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunQueued { get; } = new RunStreamEvent(ThreadRunQueuedValue); - /// Event sent when a run moves to `in_progress` status. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunInProgress { get; } = new RunStreamEvent(ThreadRunInProgressValue); - /// Event sent when a run moves to `requires_action` status. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunRequiresAction { get; } = new RunStreamEvent(ThreadRunRequiresActionValue); - /// Event sent when a run is completed. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunCompleted { get; } = new RunStreamEvent(ThreadRunCompletedValue); - /// Event sent when a run ends incomplete. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunIncomplete { get; } = new RunStreamEvent(ThreadRunIncompleteValue); - /// Event sent when a run fails. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunFailed { get; } = new RunStreamEvent(ThreadRunFailedValue); - /// Event sent when a run moves to `cancelling` status. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunCancelling { get; } = new RunStreamEvent(ThreadRunCancellingValue); - /// Event sent when a run is cancelled. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunCancelled { get; } = new RunStreamEvent(ThreadRunCancelledValue); - /// Event sent when a run is expired. The data of this event is of type ThreadRun. - public static RunStreamEvent ThreadRunExpired { get; } = new RunStreamEvent(ThreadRunExpiredValue); - /// Determines if two values are the same. - public static bool operator ==(RunStreamEvent left, RunStreamEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(RunStreamEvent left, RunStreamEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator RunStreamEvent(string value) => new RunStreamEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is RunStreamEvent other && Equals(other); - /// - public bool Equals(RunStreamEvent 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.Projects/src/Generated/SASCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SASCredentials.Serialization.cs new file mode 100644 index 000000000000..879d94645b85 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/SASCredentials.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.AI.Projects +{ + public partial class SASCredentials : 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(SASCredentials)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(SasToken)) + { + writer.WritePropertyName("SAS"u8); + writer.WriteStringValue(SasToken); + } + } + + SASCredentials 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(SASCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSASCredentials(document.RootElement, options); + } + + internal static SASCredentials DeserializeSASCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sas = default; + CredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("SAS"u8)) + { + sas = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SASCredentials(type, serializedAdditionalRawData, sas); + } + + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(SASCredentials)} does not support writing '{options.Format}' format."); + } + } + + SASCredentials 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 DeserializeSASCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SASCredentials)} 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 new SASCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSASCredentials(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SASCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SASCredentials.cs new file mode 100644 index 000000000000..0ecd9e30ef63 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/SASCredentials.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Shared Access Signature (SAS) credential definition. + public partial class SASCredentials : BaseCredentials + { + /// Initializes a new instance of . + internal SASCredentials() + { + Type = CredentialType.SAS; + } + + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + /// SAS token. + internal SASCredentials(CredentialType type, IDictionary serializedAdditionalRawData, string sasToken) : base(type, serializedAdditionalRawData) + { + SasToken = sasToken; + } + + /// SAS token. + public string SasToken { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SasCredential.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredential.Serialization.cs new file mode 100644 index 000000000000..3a15498df124 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredential.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) 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.Projects +{ + public partial class SasCredential : 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(SasCredential)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("sasUri"u8); + writer.WriteStringValue(SasUri); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.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 + } + } + } + + SasCredential 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(SasCredential)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSasCredential(document.RootElement, options); + } + + internal static SasCredential DeserializeSasCredential(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sasUri = default; + SasCredentialType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sasUri"u8)) + { + sasUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new SasCredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SasCredential(sasUri, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(SasCredential)} does not support writing '{options.Format}' format."); + } + } + + SasCredential 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 DeserializeSasCredential(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SasCredential)} 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 SasCredential FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSasCredential(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/ai/Azure.AI.Projects/src/Generated/SasCredential.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredential.cs new file mode 100644 index 000000000000..d0fa68cb5724 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredential.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.AI.Projects +{ + /// SAS Credential definition. + public partial class SasCredential + { + /// + /// 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 SasCredential() + { + } + + /// Initializes a new instance of . + /// SAS uri. + /// Type of credential. + /// Keeps track of any properties unknown to the library. + internal SasCredential(string sasUri, SasCredentialType type, IDictionary serializedAdditionalRawData) + { + SasUri = sasUri; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SAS uri. + public string SasUri { get; } + /// Type of credential. + public SasCredentialType Type { get; } = SasCredentialType.SAS; + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SasCredentialType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredentialType.cs new file mode 100644 index 000000000000..1510af3e2894 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/SasCredentialType.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.AI.Projects +{ + /// The SasCredentialType. + public readonly partial struct SasCredentialType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SasCredentialType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SASValue = "SAS"; + + /// SAS. + public static SasCredentialType SAS { get; } = new SasCredentialType(SASValue); + /// Determines if two values are the same. + public static bool operator ==(SasCredentialType left, SasCredentialType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SasCredentialType left, SasCredentialType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SasCredentialType(string value) => new SasCredentialType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SasCredentialType other && Equals(other); + /// + public bool Equals(SasCredentialType 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.Projects/src/Generated/SearchConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfiguration.Serialization.cs deleted file mode 100644 index c52a53d1e4ed..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfiguration.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class SearchConfiguration : 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(SearchConfiguration)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("connection_id"u8); - writer.WriteStringValue(ConnectionId); - writer.WritePropertyName("instance_name"u8); - writer.WriteStringValue(InstanceName); - 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 - } - } - } - - SearchConfiguration 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(SearchConfiguration)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchConfiguration(document.RootElement, options); - } - - internal static SearchConfiguration DeserializeSearchConfiguration(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string connectionId = default; - string instanceName = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connection_id"u8)) - { - connectionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("instance_name"u8)) - { - instanceName = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchConfiguration(connectionId, instanceName, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(SearchConfiguration)} does not support writing '{options.Format}' format."); - } - } - - SearchConfiguration 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 DeserializeSearchConfiguration(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchConfiguration)} 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 SearchConfiguration FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchConfiguration(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/ai/Azure.AI.Projects/src/Generated/SearchConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfiguration.cs deleted file mode 100644 index 8885b81cd971..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfiguration.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// A custom search configuration. - public partial class SearchConfiguration - { - /// - /// 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 connection in a ToolConnectionList attached to this tool. - /// Name of the custom configuration instance given to config. - /// or is null. - public SearchConfiguration(string connectionId, string instanceName) - { - Argument.AssertNotNull(connectionId, nameof(connectionId)); - Argument.AssertNotNull(instanceName, nameof(instanceName)); - - ConnectionId = connectionId; - InstanceName = instanceName; - } - - /// Initializes a new instance of . - /// A connection in a ToolConnectionList attached to this tool. - /// Name of the custom configuration instance given to config. - /// Keeps track of any properties unknown to the library. - internal SearchConfiguration(string connectionId, string instanceName, IDictionary serializedAdditionalRawData) - { - ConnectionId = connectionId; - InstanceName = instanceName; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SearchConfiguration() - { - } - - /// A connection in a ToolConnectionList attached to this tool. - public string ConnectionId { get; set; } - /// Name of the custom configuration instance given to config. - public string InstanceName { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.Serialization.cs deleted file mode 100644 index 94dc90fc64a4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.Serialization.cs +++ /dev/null @@ -1,152 +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.Projects -{ - public partial class SearchConfigurationList : 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(SearchConfigurationList)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("search_configurations"u8); - writer.WriteStartArray(); - foreach (var item in SearchConfigurations) - { - 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 - } - } - } - - SearchConfigurationList 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(SearchConfigurationList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSearchConfigurationList(document.RootElement, options); - } - - internal static SearchConfigurationList DeserializeSearchConfigurationList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList searchConfigurations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("search_configurations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(SearchConfiguration.DeserializeSearchConfiguration(item, options)); - } - searchConfigurations = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SearchConfigurationList(searchConfigurations, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(SearchConfigurationList)} does not support writing '{options.Format}' format."); - } - } - - SearchConfigurationList 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 DeserializeSearchConfigurationList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SearchConfigurationList)} 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 SearchConfigurationList FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSearchConfigurationList(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/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.cs deleted file mode 100644 index 8847f00e6f20..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SearchConfigurationList.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; -using System.Linq; - -namespace Azure.AI.Projects -{ - /// A list of search configurations currently used by the `bing_custom_search` tool. - public partial class SearchConfigurationList - { - /// - /// 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 connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// is null. - public SearchConfigurationList(IEnumerable searchConfigurations) - { - Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations)); - - SearchConfigurations = searchConfigurations.ToList(); - } - - /// Initializes a new instance of . - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// Keeps track of any properties unknown to the library. - internal SearchConfigurationList(IList searchConfigurations, IDictionary serializedAdditionalRawData) - { - SearchConfigurations = searchConfigurations; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SearchConfigurationList() - { - } - - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - public IList SearchConfigurations { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ServicePatterns.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ServicePatterns.cs new file mode 100644 index 000000000000..3299ecf99b1f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ServicePatterns.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Projects +{ + // Data plane generated sub-client. + /// The ServicePatterns sub-client. + public partial class ServicePatterns + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// 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 ServicePatterns for mocking. + protected ServicePatterns() + { + } + + /// Initializes a new instance of ServicePatterns. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// + /// Project endpoint. In the form "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/_project" + /// if your Foundry Hub has only one Project, or to use the default Project in your Hub. Or in the form + /// "https://<your-ai-services-account-name>.services.ai.azure.com/api/projects/<your-project-name>" if you want to explicitly + /// specify the Foundry Project name. + /// + internal ServicePatterns(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs deleted file mode 100644 index 45c89ce5271f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SharepointToolDefinition.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// The input definition information for a sharepoint tool as used to configure an agent. - public partial class SharepointToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of connections used by the SharePoint tool. - /// is null. - public SharepointToolDefinition(ToolConnectionList sharepointGrounding) - { - Argument.AssertNotNull(sharepointGrounding, nameof(sharepointGrounding)); - - Type = "sharepoint_grounding"; - SharepointGrounding = sharepointGrounding; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of connections used by the SharePoint tool. - internal SharepointToolDefinition(string type, IDictionary serializedAdditionalRawData, ToolConnectionList sharepointGrounding) : base(type, serializedAdditionalRawData) - { - SharepointGrounding = sharepointGrounding; - } - - /// Initializes a new instance of for deserialization. - internal SharepointToolDefinition() - { - } - - /// The list of connections used by the SharePoint tool. - public ToolConnectionList SharepointGrounding { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Sku.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Sku.Serialization.cs new file mode 100644 index 000000000000..bfd0756053ec --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Sku.Serialization.cs @@ -0,0 +1,180 @@ +// Copyright (c) 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.Projects +{ + public partial class Sku : 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(Sku)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity); + writer.WritePropertyName("family"u8); + writer.WriteStringValue(Family); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("size"u8); + writer.WriteStringValue(Size); + writer.WritePropertyName("tier"u8); + writer.WriteStringValue(Tier); + 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 + } + } + } + + Sku 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(Sku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSku(document.RootElement, options); + } + + internal static Sku DeserializeSku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long capacity = default; + string family = default; + string name = default; + string size = default; + string tier = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("capacity"u8)) + { + capacity = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("family"u8)) + { + family = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("size"u8)) + { + size = property.Value.GetString(); + continue; + } + if (property.NameEquals("tier"u8)) + { + tier = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Sku( + capacity, + family, + name, + size, + tier, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Sku)} does not support writing '{options.Format}' format."); + } + } + + Sku 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 DeserializeSku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Sku)} 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 Sku FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSku(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/ai/Azure.AI.Projects/src/Generated/Sku.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Sku.cs new file mode 100644 index 000000000000..f89d0c5ea9ff --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Sku.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Sku information. + public partial class Sku + { + /// + /// 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 . + /// Sku capacity. + /// Sku family. + /// Sku name. + /// Sku size. + /// Sku tier. + /// , , or is null. + internal Sku(long capacity, string family, string name, string size, string tier) + { + Argument.AssertNotNull(family, nameof(family)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(size, nameof(size)); + Argument.AssertNotNull(tier, nameof(tier)); + + Capacity = capacity; + Family = family; + Name = name; + Size = size; + Tier = tier; + } + + /// Initializes a new instance of . + /// Sku capacity. + /// Sku family. + /// Sku name. + /// Sku size. + /// Sku tier. + /// Keeps track of any properties unknown to the library. + internal Sku(long capacity, string family, string name, string size, string tier, IDictionary serializedAdditionalRawData) + { + Capacity = capacity; + Family = family; + Name = name; + Size = size; + Tier = tier; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal Sku() + { + } + + /// Sku capacity. + public long Capacity { get; } + /// Sku family. + public string Family { get; } + /// Sku name. + public string Name { get; } + /// Sku size. + public string Size { get; } + /// Sku tier. + public string Tier { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs deleted file mode 100644 index 4cdb779f1bae..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class SubmitToolOutputsAction : 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(SubmitToolOutputsAction)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("submit_tool_outputs"u8); - writer.WriteObjectValue(InternalDetails, options); - } - - SubmitToolOutputsAction 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(SubmitToolOutputsAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSubmitToolOutputsAction(document.RootElement, options); - } - - internal static SubmitToolOutputsAction DeserializeSubmitToolOutputsAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - InternalSubmitToolOutputsDetails submitToolOutputs = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("submit_tool_outputs"u8)) - { - submitToolOutputs = InternalSubmitToolOutputsDetails.DeserializeInternalSubmitToolOutputsDetails(property.Value, options); - 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 SubmitToolOutputsAction(type, serializedAdditionalRawData, submitToolOutputs); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(SubmitToolOutputsAction)} does not support writing '{options.Format}' format."); - } - } - - SubmitToolOutputsAction 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 DeserializeSubmitToolOutputsAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SubmitToolOutputsAction)} 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 new SubmitToolOutputsAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSubmitToolOutputsAction(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs deleted file mode 100644 index 55b71a82960e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsAction.cs +++ /dev/null @@ -1,41 +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.Projects -{ - /// The details for required tool calls that must be submitted for an agent thread run to continue. - public partial class SubmitToolOutputsAction : RequiredAction - { - /// Initializes a new instance of . - /// The details describing tools that should be called to submit tool outputs. - /// is null. - internal SubmitToolOutputsAction(InternalSubmitToolOutputsDetails internalDetails) - { - Argument.AssertNotNull(internalDetails, nameof(internalDetails)); - - Type = "submit_tool_outputs"; - InternalDetails = internalDetails; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The details describing tools that should be called to submit tool outputs. - internal SubmitToolOutputsAction(string type, IDictionary serializedAdditionalRawData, InternalSubmitToolOutputsDetails internalDetails) : base(type, serializedAdditionalRawData) - { - InternalDetails = internalDetails; - } - - /// Initializes a new instance of for deserialization. - internal SubmitToolOutputsAction() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs deleted file mode 100644 index 659c5ddb6333..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.Serialization.cs +++ /dev/null @@ -1,175 +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.Projects -{ - internal partial class SubmitToolOutputsToRunRequest : 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(SubmitToolOutputsToRunRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("tool_outputs"u8); - writer.WriteStartArray(); - foreach (var item in ToolOutputs) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (Optional.IsDefined(Stream)) - { - if (Stream != null) - { - writer.WritePropertyName("stream"u8); - writer.WriteBooleanValue(Stream.Value); - } - else - { - writer.WriteNull("stream"); - } - } - 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 - } - } - } - - SubmitToolOutputsToRunRequest 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(SubmitToolOutputsToRunRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSubmitToolOutputsToRunRequest(document.RootElement, options); - } - - internal static SubmitToolOutputsToRunRequest DeserializeSubmitToolOutputsToRunRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyList toolOutputs = default; - bool? stream = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_outputs"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolOutput.DeserializeToolOutput(item, options)); - } - toolOutputs = array; - continue; - } - if (property.NameEquals("stream"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - stream = null; - continue; - } - stream = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SubmitToolOutputsToRunRequest(toolOutputs, stream, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(SubmitToolOutputsToRunRequest)} does not support writing '{options.Format}' format."); - } - } - - SubmitToolOutputsToRunRequest 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 DeserializeSubmitToolOutputsToRunRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SubmitToolOutputsToRunRequest)} 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 SubmitToolOutputsToRunRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSubmitToolOutputsToRunRequest(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/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.cs deleted file mode 100644 index ce70a43ea179..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SubmitToolOutputsToRunRequest.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.AI.Projects -{ - /// The SubmitToolOutputsToRunRequest. - internal partial class SubmitToolOutputsToRunRequest - { - /// - /// 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 tools for which the outputs are being submitted. - /// is null. - internal SubmitToolOutputsToRunRequest(IEnumerable toolOutputs) - { - Argument.AssertNotNull(toolOutputs, nameof(toolOutputs)); - - ToolOutputs = toolOutputs.ToList(); - } - - /// Initializes a new instance of . - /// A list of tools for which the outputs are being submitted. - /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. - /// Keeps track of any properties unknown to the library. - internal SubmitToolOutputsToRunRequest(IReadOnlyList toolOutputs, bool? stream, IDictionary serializedAdditionalRawData) - { - ToolOutputs = toolOutputs; - Stream = stream; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal SubmitToolOutputsToRunRequest() - { - } - - /// A list of tools for which the outputs are being submitted. - public IReadOnlyList ToolOutputs { get; } - /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state. - public bool? Stream { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/SystemData.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SystemData.Serialization.cs deleted file mode 100644 index 41118c3cb353..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SystemData.Serialization.cs +++ /dev/null @@ -1,186 +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.Projects -{ - public partial class SystemData : 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(SystemData)} does not support writing '{format}' format."); - } - - if (options.Format != "W" && Optional.IsDefined(CreatedAt)) - { - writer.WritePropertyName("createdAt"u8); - writer.WriteStringValue(CreatedAt.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(CreatedBy)) - { - writer.WritePropertyName("createdBy"u8); - writer.WriteStringValue(CreatedBy); - } - if (options.Format != "W" && Optional.IsDefined(CreatedByType)) - { - writer.WritePropertyName("createdByType"u8); - writer.WriteStringValue(CreatedByType); - } - if (options.Format != "W" && Optional.IsDefined(LastModifiedAt)) - { - writer.WritePropertyName("lastModifiedAt"u8); - writer.WriteStringValue(LastModifiedAt.Value, "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 - } - } - } - - SystemData 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(SystemData)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSystemData(document.RootElement, options); - } - - internal static SystemData DeserializeSystemData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - DateTimeOffset? createdAt = default; - string createdBy = default; - string createdByType = default; - DateTimeOffset? lastModifiedAt = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("createdAt"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - createdAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (property.NameEquals("createdBy"u8)) - { - createdBy = property.Value.GetString(); - continue; - } - if (property.NameEquals("createdByType"u8)) - { - createdByType = property.Value.GetString(); - continue; - } - if (property.NameEquals("lastModifiedAt"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - lastModifiedAt = property.Value.GetDateTimeOffset("O"); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SystemData(createdAt, createdBy, createdByType, lastModifiedAt, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(SystemData)} does not support writing '{options.Format}' format."); - } - } - - SystemData 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 DeserializeSystemData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SystemData)} 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 SystemData FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSystemData(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/ai/Azure.AI.Projects/src/Generated/SystemData.cs b/sdk/ai/Azure.AI.Projects/src/Generated/SystemData.cs deleted file mode 100644 index b7ffe4c91fe8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/SystemData.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.AI.Projects -{ - /// Metadata pertaining to creation and last modification of the resource. - public partial class SystemData - { - /// - /// 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 SystemData() - { - } - - /// Initializes a new instance of . - /// The timestamp the resource was created at. - /// The identity that created the resource. - /// The identity type that created the resource. - /// The timestamp of resource last modification (UTC). - /// Keeps track of any properties unknown to the library. - internal SystemData(DateTimeOffset? createdAt, string createdBy, string createdByType, DateTimeOffset? lastModifiedAt, IDictionary serializedAdditionalRawData) - { - CreatedAt = createdAt; - CreatedBy = createdBy; - CreatedByType = createdByType; - LastModifiedAt = lastModifiedAt; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The timestamp the resource was created at. - public DateTimeOffset? CreatedAt { get; } - /// The identity that created the resource. - public string CreatedBy { get; } - /// The identity type that created the resource. - public string CreatedByType { get; } - /// The timestamp of resource last modification (UTC). - public DateTimeOffset? LastModifiedAt { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TargetConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TargetConfig.Serialization.cs new file mode 100644 index 000000000000..6c4eec42dbc3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/TargetConfig.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.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + [PersistableModelProxy(typeof(UnknownTargetConfig))] + public partial class TargetConfig : 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(TargetConfig)} does not support writing '{format}' format."); + } + + 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 + } + } + } + + TargetConfig 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(TargetConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetConfig(document.RootElement, options); + } + + internal static TargetConfig DeserializeTargetConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureOpenAIModel": return AzureOpenAIModelConfiguration.DeserializeAzureOpenAIModelConfiguration(element, options); + } + } + return UnknownTargetConfig.DeserializeUnknownTargetConfig(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TargetConfig)} does not support writing '{options.Format}' format."); + } + } + + TargetConfig 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 DeserializeTargetConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetConfig)} 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 TargetConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTargetConfig(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/ai/Azure.AI.Projects/src/Generated/TargetConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TargetConfig.cs new file mode 100644 index 000000000000..cd3d02638de7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/TargetConfig.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.AI.Projects +{ + /// + /// Abstract class for target configuration. + /// 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 TargetConfig + { + /// + /// 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 TargetConfig() + { + } + + /// Initializes a new instance of . + /// Type of the model configuration. + /// Keeps track of any properties unknown to the library. + internal TargetConfig(string type, IDictionary serializedAdditionalRawData) + { + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of the model configuration. + internal string Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.Serialization.cs deleted file mode 100644 index 7f0e77a8f0bc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownTargetModelConfig))] - public partial class TargetModelConfig : 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(TargetModelConfig)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - TargetModelConfig 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(TargetModelConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTargetModelConfig(document.RootElement, options); - } - - internal static TargetModelConfig DeserializeTargetModelConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "AOAI": return AOAIModelConfig.DeserializeAOAIModelConfig(element, options); - case "MAAS": return MAASModelConfig.DeserializeMAASModelConfig(element, options); - } - } - return UnknownTargetModelConfig.DeserializeUnknownTargetModelConfig(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(TargetModelConfig)} does not support writing '{options.Format}' format."); - } - } - - TargetModelConfig 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 DeserializeTargetModelConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(TargetModelConfig)} 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 TargetModelConfig FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeTargetModelConfig(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/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.cs deleted file mode 100644 index a8f5c27ef5ea..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TargetModelConfig.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.AI.Projects -{ - /// - /// Abstract class for model configuration. - /// 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 abstract partial class TargetModelConfig - { - /// - /// 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 TargetModelConfig() - { - } - - /// Initializes a new instance of . - /// Type of the model configuration. - /// Keeps track of any properties unknown to the library. - internal TargetModelConfig(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Type of the model configuration. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TelemetryClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TelemetryClient.cs deleted file mode 100644 index 2732da6a60da..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TelemetryClient.cs +++ /dev/null @@ -1,202 +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.Core.Pipeline; - -namespace Azure.AI.Projects -{ - // Data plane generated sub-client. - /// The Telemetry sub-client. - public partial class TelemetryClient - { - private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" }; - private readonly TokenCredential _tokenCredential; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _subscriptionId; - private readonly string _resourceGroupName; - private readonly string _projectName; - 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 TelemetryClient for mocking. - protected TelemetryClient() - { - } - - /// Initializes a new instance of TelemetryClient. - /// The handler for diagnostic messaging in the client. - /// The HTTP pipeline for sending and receiving REST requests and responses. - /// The token credential to copy. - /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link. - /// The Azure subscription ID. - /// The name of the Azure Resource Group. - /// The Azure AI Foundry project name. - /// The API version to use for this operation. - internal TelemetryClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion) - { - ClientDiagnostics = clientDiagnostics; - _pipeline = pipeline; - _tokenCredential = tokenCredential; - _endpoint = endpoint; - _subscriptionId = subscriptionId; - _resourceGroupName = resourceGroupName; - _projectName = projectName; - _apiVersion = apiVersion; - } - - /// Gets the properties of the specified Application Insights resource. - /// The AppInsights Azure resource Url. It should have the format: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/microsoft.insights/components/{resourcename}'. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual async Task> GetAppInsightsAsync(string appInsightsResourceUrl, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(appInsightsResourceUrl, nameof(appInsightsResourceUrl)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = await GetAppInsightsAsync(appInsightsResourceUrl, context).ConfigureAwait(false); - return Response.FromValue(GetAppInsightsResponse.FromResponse(response), response); - } - - /// Gets the properties of the specified Application Insights resource. - /// The AppInsights Azure resource Url. It should have the format: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/microsoft.insights/components/{resourcename}'. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - internal virtual Response GetAppInsights(string appInsightsResourceUrl, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(appInsightsResourceUrl, nameof(appInsightsResourceUrl)); - - RequestContext context = FromCancellationToken(cancellationToken); - Response response = GetAppInsights(appInsightsResourceUrl, context); - return Response.FromValue(GetAppInsightsResponse.FromResponse(response), response); - } - - /// - /// [Protocol Method] Gets the properties of the specified Application Insights resource - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The AppInsights Azure resource Url. It should have the format: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/microsoft.insights/components/{resourcename}'. - /// 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. - internal virtual async Task GetAppInsightsAsync(string appInsightsResourceUrl, RequestContext context) - { - Argument.AssertNotNullOrEmpty(appInsightsResourceUrl, nameof(appInsightsResourceUrl)); - - using var scope = ClientDiagnostics.CreateScope("TelemetryClient.GetAppInsights"); - scope.Start(); - try - { - using HttpMessage message = CreateGetAppInsightsRequest(appInsightsResourceUrl, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets the properties of the specified Application Insights resource - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// Please try the simpler convenience overload with strongly typed models first. - /// - /// - /// - /// - /// The AppInsights Azure resource Url. It should have the format: '/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/microsoft.insights/components/{resourcename}'. - /// 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. - internal virtual Response GetAppInsights(string appInsightsResourceUrl, RequestContext context) - { - Argument.AssertNotNullOrEmpty(appInsightsResourceUrl, nameof(appInsightsResourceUrl)); - - using var scope = ClientDiagnostics.CreateScope("TelemetryClient.GetAppInsights"); - scope.Start(); - try - { - using HttpMessage message = CreateGetAppInsightsRequest(appInsightsResourceUrl, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - internal HttpMessage CreateGetAppInsightsRequest(string appInsightsResourceUrl, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRaw("/agents/v1.0/subscriptions/", false); - uri.AppendRaw(_subscriptionId, true); - uri.AppendRaw("/resourceGroups/", false); - uri.AppendRaw(_resourceGroupName, true); - uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false); - uri.AppendRaw(_projectName, true); - uri.AppendPath("/", false); - uri.AppendPath(appInsightsResourceUrl, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - private static RequestContext DefaultRequestContext = new RequestContext(); - internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) - { - if (!cancellationToken.CanBeCanceled) - { - return DefaultRequestContext; - } - - return new RequestContext() { CancellationToken = cancellationToken }; - } - - private static ResponseClassifier _responseClassifier200; - private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.Serialization.cs deleted file mode 100644 index d9ab94ac1fd1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.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.Projects -{ - internal partial class ThreadDeletionStatus : 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(ThreadDeletionStatus)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.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 - } - } - } - - ThreadDeletionStatus 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(ThreadDeletionStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeThreadDeletionStatus(document.RootElement, options); - } - - internal static ThreadDeletionStatus DeserializeThreadDeletionStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - bool deleted = default; - ThreadDeletionStatusObject @object = 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("deleted"u8)) - { - deleted = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new ThreadDeletionStatusObject(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadDeletionStatus(id, deleted, @object, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ThreadDeletionStatus)} does not support writing '{options.Format}' format."); - } - } - - ThreadDeletionStatus 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 DeserializeThreadDeletionStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ThreadDeletionStatus)} 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 ThreadDeletionStatus FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeThreadDeletionStatus(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/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.cs deleted file mode 100644 index 5b2792458b1c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatus.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.AI.Projects -{ - /// The status of a thread deletion operation. - internal partial class ThreadDeletionStatus - { - /// - /// 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 resource specified for deletion. - /// A value indicating whether deletion was successful. - /// is null. - internal ThreadDeletionStatus(string id, bool deleted) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - Deleted = deleted; - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'thread.deleted'. - /// Keeps track of any properties unknown to the library. - internal ThreadDeletionStatus(string id, bool deleted, ThreadDeletionStatusObject @object, IDictionary serializedAdditionalRawData) - { - Id = id; - Deleted = deleted; - Object = @object; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ThreadDeletionStatus() - { - } - - /// The ID of the resource specified for deletion. - public string Id { get; } - /// A value indicating whether deletion was successful. - public bool Deleted { get; } - /// The object type, which is always 'thread.deleted'. - public ThreadDeletionStatusObject Object { get; } = ThreadDeletionStatusObject.ThreadDeleted; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs deleted file mode 100644 index 451e04bbddd6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadDeletionStatusObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The ThreadDeletionStatus_object. - internal readonly partial struct ThreadDeletionStatusObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ThreadDeletionStatusObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadDeletedValue = "thread.deleted"; - - /// thread.deleted. - public static ThreadDeletionStatusObject ThreadDeleted { get; } = new ThreadDeletionStatusObject(ThreadDeletedValue); - /// Determines if two values are the same. - public static bool operator ==(ThreadDeletionStatusObject left, ThreadDeletionStatusObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ThreadDeletionStatusObject left, ThreadDeletionStatusObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ThreadDeletionStatusObject(string value) => new ThreadDeletionStatusObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThreadDeletionStatusObject other && Equals(other); - /// - public bool Equals(ThreadDeletionStatusObject 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.Projects/src/Generated/ThreadMessage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.Serialization.cs deleted file mode 100644 index df2eb6f07da3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.Serialization.cs +++ /dev/null @@ -1,376 +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.Projects -{ - public partial class ThreadMessage : 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(ThreadMessage)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (IncompleteDetails != null) - { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); - } - else - { - writer.WriteNull("incomplete_details"); - } - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } - if (IncompleteAt != null) - { - writer.WritePropertyName("incomplete_at"u8); - writer.WriteNumberValue(IncompleteAt.Value, "U"); - } - else - { - writer.WriteNull("incomplete_at"); - } - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - writer.WritePropertyName("content"u8); - writer.WriteStartArray(); - foreach (var item in ContentItems) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (AssistantId != null) - { - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - } - else - { - writer.WriteNull("assistant_id"); - } - if (RunId != null) - { - writer.WritePropertyName("run_id"u8); - writer.WriteStringValue(RunId); - } - else - { - writer.WriteNull("run_id"); - } - if (Attachments != null && Optional.IsCollectionDefined(Attachments)) - { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (var item in Attachments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"); - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - 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 - } - } - } - - ThreadMessage 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(ThreadMessage)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeThreadMessage(document.RootElement, options); - } - - internal static ThreadMessage DeserializeThreadMessage(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string @object = default; - DateTimeOffset createdAt = default; - string threadId = default; - MessageStatus status = default; - MessageIncompleteDetails incompleteDetails = default; - DateTimeOffset? completedAt = default; - DateTimeOffset? incompleteAt = default; - MessageRole role = default; - IReadOnlyList content = default; - string assistantId = default; - string runId = default; - IReadOnlyList attachments = default; - IReadOnlyDictionary metadata = 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("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("thread_id"u8)) - { - threadId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new MessageStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("incomplete_details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - incompleteDetails = null; - continue; - } - incompleteDetails = MessageIncompleteDetails.DeserializeMessageIncompleteDetails(property.Value, options); - continue; - } - if (property.NameEquals("completed_at"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - completedAt = null; - continue; - } - completedAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("incomplete_at"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - incompleteAt = null; - continue; - } - incompleteAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("role"u8)) - { - role = new MessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("content"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageContent.DeserializeMessageContent(item, options)); - } - content = array; - continue; - } - if (property.NameEquals("assistant_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - assistantId = null; - continue; - } - assistantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("run_id"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - runId = null; - continue; - } - runId = property.Value.GetString(); - continue; - } - if (property.NameEquals("attachments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - attachments = new ChangeTrackingList(); - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageAttachment.DeserializeMessageAttachment(item, options)); - } - attachments = array; - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadMessage( - id, - @object, - createdAt, - threadId, - status, - incompleteDetails, - completedAt, - incompleteAt, - role, - content, - assistantId, - runId, - attachments, - metadata, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ThreadMessage)} does not support writing '{options.Format}' format."); - } - } - - ThreadMessage 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 DeserializeThreadMessage(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ThreadMessage)} 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 ThreadMessage FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeThreadMessage(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/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs deleted file mode 100644 index e5adfbbe605a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessage.cs +++ /dev/null @@ -1,165 +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.Projects -{ - /// A single, existing message within an agent thread. - public partial class ThreadMessage - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The ID of the thread that this message belongs to. - /// The status of the message. - /// On an incomplete message, details about why the message is incomplete. - /// The Unix timestamp (in seconds) for when the message was completed. - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. - /// The role associated with the agent thread message. - /// - /// The list of content items associated with the agent thread message. - /// 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 . - /// - /// If applicable, the ID of the agent that authored this message. - /// If applicable, the ID of the run associated with the authoring of this message. - /// A list of files attached to the message, and the tools they were added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// , or is null. - internal ThreadMessage(string id, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IEnumerable contentItems, string assistantId, string runId, IEnumerable attachments, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(contentItems, nameof(contentItems)); - - Id = id; - CreatedAt = createdAt; - ThreadId = threadId; - Status = status; - IncompleteDetails = incompleteDetails; - CompletedAt = completedAt; - IncompleteAt = incompleteAt; - Role = role; - ContentItems = contentItems.ToList(); - AssistantId = assistantId; - RunId = runId; - Attachments = attachments?.ToList(); - Metadata = metadata; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always 'thread.message'. - /// The Unix timestamp, in seconds, representing when this object was created. - /// The ID of the thread that this message belongs to. - /// The status of the message. - /// On an incomplete message, details about why the message is incomplete. - /// The Unix timestamp (in seconds) for when the message was completed. - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. - /// The role associated with the agent thread message. - /// - /// The list of content items associated with the agent thread message. - /// 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 . - /// - /// If applicable, the ID of the agent that authored this message. - /// If applicable, the ID of the run associated with the authoring of this message. - /// A list of files attached to the message, and the tools they were added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal ThreadMessage(string id, string @object, DateTimeOffset createdAt, string threadId, MessageStatus status, MessageIncompleteDetails incompleteDetails, DateTimeOffset? completedAt, DateTimeOffset? incompleteAt, MessageRole role, IReadOnlyList contentItems, string assistantId, string runId, IReadOnlyList attachments, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - CreatedAt = createdAt; - ThreadId = threadId; - Status = status; - IncompleteDetails = incompleteDetails; - CompletedAt = completedAt; - IncompleteAt = incompleteAt; - Role = role; - ContentItems = contentItems; - AssistantId = assistantId; - RunId = runId; - Attachments = attachments; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ThreadMessage() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// The ID of the thread that this message belongs to. - public string ThreadId { get; } - /// The status of the message. - public MessageStatus Status { get; } - /// On an incomplete message, details about why the message is incomplete. - public MessageIncompleteDetails IncompleteDetails { get; } - /// The Unix timestamp (in seconds) for when the message was completed. - public DateTimeOffset? CompletedAt { get; } - /// The Unix timestamp (in seconds) for when the message was marked as incomplete. - public DateTimeOffset? IncompleteAt { get; } - /// The role associated with the agent thread message. - public MessageRole Role { get; } - /// - /// The list of content items associated with the agent thread message. - /// 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 IReadOnlyList ContentItems { get; } - /// If applicable, the ID of the agent that authored this message. - public string AssistantId { get; } - /// If applicable, the ID of the run associated with the authoring of this message. - public string RunId { get; } - /// A list of files attached to the message, and the tools they were added to. - public IReadOnlyList Attachments { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.Serialization.cs deleted file mode 100644 index 41f9b5ab06e4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.Serialization.cs +++ /dev/null @@ -1,222 +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.Projects -{ - public partial class ThreadMessageOptions : 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(ThreadMessageOptions)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("role"u8); - writer.WriteStringValue(Role.ToString()); - writer.WritePropertyName("content"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Content); -#else - using (JsonDocument document = JsonDocument.Parse(Content, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - if (Optional.IsCollectionDefined(Attachments)) - { - if (Attachments != null) - { - writer.WritePropertyName("attachments"u8); - writer.WriteStartArray(); - foreach (var item in Attachments) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - else - { - writer.WriteNull("attachments"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - ThreadMessageOptions 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(ThreadMessageOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeThreadMessageOptions(document.RootElement, options); - } - - internal static ThreadMessageOptions DeserializeThreadMessageOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageRole role = default; - BinaryData content = default; - IList attachments = default; - IDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("role"u8)) - { - role = new MessageRole(property.Value.GetString()); - continue; - } - if (property.NameEquals("content"u8)) - { - content = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("attachments"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MessageAttachment.DeserializeMessageAttachment(item, options)); - } - attachments = array; - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadMessageOptions(role, content, attachments ?? new ChangeTrackingList(), metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ThreadMessageOptions)} does not support writing '{options.Format}' format."); - } - } - - ThreadMessageOptions 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 DeserializeThreadMessageOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ThreadMessageOptions)} 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 ThreadMessageOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeThreadMessageOptions(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/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs deleted file mode 100644 index 4a6ca018b978..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadMessageOptions.cs +++ /dev/null @@ -1,162 +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.Projects -{ - /// - /// A single message within an agent thread, - /// as provided during that thread's creation for its initial state. - /// - public partial class ThreadMessageOptions - { - /// - /// 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 role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// is null. - public ThreadMessageOptions(MessageRole role, BinaryData content) - { - Argument.AssertNotNull(content, nameof(content)); - - Role = role; - Content = content; - Attachments = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// A list of files attached to the message, and the tools they should be added to. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal ThreadMessageOptions(MessageRole role, BinaryData content, IList attachments, IDictionary metadata, IDictionary serializedAdditionalRawData) - { - Role = role; - Content = content; - Attachments = attachments; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ThreadMessageOptions() - { - } - - /// - /// The role of the entity that is creating the message. Allowed values include: - /// `user`, which indicates the message is sent by an actual user (and should be - /// used in most cases to represent user-generated messages), and `assistant`, - /// which indicates the message is generated by the agent (use this value to insert - /// messages from the agent into the conversation). - /// - public MessageRole Role { get; } - /// - /// The content of the initial message. This may be a basic string (if you only - /// need text) or an array of typed content blocks (for example, text, image_file, - /// image_url, and so on). - /// - /// To assign an object to this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// - /// Supported types: - /// - /// - /// - /// - /// - /// where T is of type - /// - /// - /// - /// 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 Content { get; } - /// A list of files attached to the message, and the tools they should be added to. - public IList Attachments { get; set; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IDictionary Metadata { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs deleted file mode 100644 index 6c090fa42b46..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.Serialization.cs +++ /dev/null @@ -1,625 +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.Projects -{ - public partial class ThreadRun : 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(ThreadRun)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object); - writer.WritePropertyName("thread_id"u8); - writer.WriteStringValue(ThreadId); - writer.WritePropertyName("assistant_id"u8); - writer.WriteStringValue(AssistantId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(RequiredAction)) - { - if (RequiredAction != null) - { - writer.WritePropertyName("required_action"u8); - writer.WriteObjectValue(RequiredAction, options); - } - else - { - writer.WriteNull("required_action"); - } - } - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - if (ExpiresAt != null) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt.Value, "U"); - } - else - { - writer.WriteNull("expires_at"); - } - if (StartedAt != null) - { - writer.WritePropertyName("started_at"u8); - writer.WriteNumberValue(StartedAt.Value, "U"); - } - else - { - writer.WriteNull("started_at"); - } - if (CompletedAt != null) - { - writer.WritePropertyName("completed_at"u8); - writer.WriteNumberValue(CompletedAt.Value, "U"); - } - else - { - writer.WriteNull("completed_at"); - } - if (CancelledAt != null) - { - writer.WritePropertyName("cancelled_at"u8); - writer.WriteNumberValue(CancelledAt.Value, "U"); - } - else - { - writer.WriteNull("cancelled_at"); - } - if (FailedAt != null) - { - writer.WritePropertyName("failed_at"u8); - writer.WriteNumberValue(FailedAt.Value, "U"); - } - else - { - writer.WriteNull("failed_at"); - } - if (IncompleteDetails != null) - { - writer.WritePropertyName("incomplete_details"u8); - writer.WriteObjectValue(IncompleteDetails, options); - } - else - { - writer.WriteNull("incomplete_details"); - } - if (Usage != null) - { - writer.WritePropertyName("usage"u8); - writer.WriteObjectValue(Usage, options); - } - else - { - writer.WriteNull("usage"); - } - if (Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - } - if (MaxPromptTokens != null) - { - writer.WritePropertyName("max_prompt_tokens"u8); - writer.WriteNumberValue(MaxPromptTokens.Value); - } - else - { - writer.WriteNull("max_prompt_tokens"); - } - if (MaxCompletionTokens != null) - { - writer.WritePropertyName("max_completion_tokens"u8); - writer.WriteNumberValue(MaxCompletionTokens.Value); - } - else - { - writer.WriteNull("max_completion_tokens"); - } - if (TruncationStrategy != null) - { - writer.WritePropertyName("truncation_strategy"u8); - writer.WriteObjectValue(TruncationStrategy, options); - } - else - { - writer.WriteNull("truncation_strategy"); - } - if (ToolChoice != null) - { - writer.WritePropertyName("tool_choice"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ToolChoice); -#else - using (JsonDocument document = JsonDocument.Parse(ToolChoice, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("tool_choice"); - } - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - writer.WritePropertyName("parallel_tool_calls"u8); - writer.WriteBooleanValue(ParallelToolCalls); - 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 - } - } - } - - ThreadRun 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(ThreadRun)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeThreadRun(document.RootElement, options); - } - - internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string @object = default; - string threadId = default; - string assistantId = default; - RunStatus status = default; - RequiredAction requiredAction = default; - RunError lastError = default; - string model = default; - string instructions = default; - IReadOnlyList tools = default; - DateTimeOffset createdAt = default; - DateTimeOffset? expiresAt = default; - DateTimeOffset? startedAt = default; - DateTimeOffset? completedAt = default; - DateTimeOffset? cancelledAt = default; - DateTimeOffset? failedAt = default; - IncompleteRunDetails incompleteDetails = default; - RunCompletionUsage usage = default; - float? temperature = default; - float? topP = default; - int? maxPromptTokens = default; - int? maxCompletionTokens = default; - TruncationObject truncationStrategy = default; - BinaryData toolChoice = default; - BinaryData responseFormat = default; - IReadOnlyDictionary metadata = default; - UpdateToolResourcesOptions toolResources = default; - bool parallelToolCalls = 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("object"u8)) - { - @object = property.Value.GetString(); - continue; - } - if (property.NameEquals("thread_id"u8)) - { - threadId = property.Value.GetString(); - continue; - } - if (property.NameEquals("assistant_id"u8)) - { - assistantId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new RunStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("required_action"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - requiredAction = null; - continue; - } - requiredAction = RequiredAction.DeserializeRequiredAction(property.Value, options); - continue; - } - if (property.NameEquals("last_error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastError = null; - continue; - } - lastError = RunError.DeserializeRunError(property.Value, options); - continue; - } - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("tools"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("expires_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref expiresAt); - continue; - } - if (property.NameEquals("started_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref startedAt); - continue; - } - if (property.NameEquals("completed_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref completedAt); - continue; - } - if (property.NameEquals("cancelled_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref cancelledAt); - continue; - } - if (property.NameEquals("failed_at"u8)) - { - DeserializeNullableDateTimeOffset(property, ref failedAt); - continue; - } - if (property.NameEquals("incomplete_details"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - incompleteDetails = null; - continue; - } - incompleteDetails = IncompleteRunDetails.DeserializeIncompleteRunDetails(property.Value, options); - continue; - } - if (property.NameEquals("usage"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - usage = null; - continue; - } - usage = RunCompletionUsage.DeserializeRunCompletionUsage(property.Value, options); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("max_prompt_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxPromptTokens = null; - continue; - } - maxPromptTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("max_completion_tokens"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - maxCompletionTokens = null; - continue; - } - maxCompletionTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("truncation_strategy"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - truncationStrategy = null; - continue; - } - truncationStrategy = TruncationObject.DeserializeTruncationObject(property.Value, options); - continue; - } - if (property.NameEquals("tool_choice"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolChoice = null; - continue; - } - toolChoice = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = UpdateToolResourcesOptions.DeserializeUpdateToolResourcesOptions(property.Value, options); - continue; - } - if (property.NameEquals("parallel_tool_calls"u8)) - { - parallelToolCalls = property.Value.GetBoolean(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ThreadRun( - id, - @object, - threadId, - assistantId, - status, - requiredAction, - lastError, - model, - instructions, - tools, - createdAt, - expiresAt, - startedAt, - completedAt, - cancelledAt, - failedAt, - incompleteDetails, - usage, - temperature, - topP, - maxPromptTokens, - maxCompletionTokens, - truncationStrategy, - toolChoice, - responseFormat, - metadata, - toolResources, - parallelToolCalls, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ThreadRun)} does not support writing '{options.Format}' format."); - } - } - - ThreadRun 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 DeserializeThreadRun(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ThreadRun)} 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 ThreadRun FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeThreadRun(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/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs deleted file mode 100644 index 3fd2e5179862..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadRun.cs +++ /dev/null @@ -1,341 +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.Projects -{ - /// Data representing a single evaluation run of an agent thread. - public partial class ThreadRun - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The ID of the thread associated with this run. - /// The ID of the agent associated with the thread this run was performed against. - /// The status of the agent thread run. - /// The last error, if any, encountered by this agent thread run. - /// The ID of the model to use. - /// The overridden system instructions used for this agent thread run. - /// - /// The overridden enabled tools used for this agent thread run. - /// 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 Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expires. - /// The Unix timestamp, in seconds, representing when this item was started. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). - /// The maximum number of prompt tokens specified to have been used over the course of the run. - /// The maximum number of completion tokens specified to have been used over the course of the run. - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// The response format of the tool calls used in this run. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Determines if tools can be executed in parallel within the run. - /// , , , , or is null. - internal ThreadRun(string id, string threadId, string assistantId, RunStatus status, RunError lastError, string model, string instructions, IEnumerable tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, bool parallelToolCalls) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(threadId, nameof(threadId)); - Argument.AssertNotNull(assistantId, nameof(assistantId)); - Argument.AssertNotNull(model, nameof(model)); - Argument.AssertNotNull(instructions, nameof(instructions)); - Argument.AssertNotNull(tools, nameof(tools)); - - Id = id; - ThreadId = threadId; - AssistantId = assistantId; - Status = status; - LastError = lastError; - Model = model; - Instructions = instructions; - Tools = tools.ToList(); - CreatedAt = createdAt; - ExpiresAt = expiresAt; - StartedAt = startedAt; - CompletedAt = completedAt; - CancelledAt = cancelledAt; - FailedAt = failedAt; - IncompleteDetails = incompleteDetails; - Usage = usage; - MaxPromptTokens = maxPromptTokens; - MaxCompletionTokens = maxCompletionTokens; - TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ResponseFormat = responseFormat; - Metadata = metadata; - ParallelToolCalls = parallelToolCalls; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always 'thread.run'. - /// The ID of the thread associated with this run. - /// The ID of the agent associated with the thread this run was performed against. - /// The status of the agent thread run. - /// - /// The details of the action required for the agent thread run to continue. - /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include . - /// - /// The last error, if any, encountered by this agent thread run. - /// The ID of the model to use. - /// The overridden system instructions used for this agent thread run. - /// - /// The overridden enabled tools used for this agent thread run. - /// 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 Unix timestamp, in seconds, representing when this object was created. - /// The Unix timestamp, in seconds, representing when this item expires. - /// The Unix timestamp, in seconds, representing when this item was started. - /// The Unix timestamp, in seconds, representing when this completed. - /// The Unix timestamp, in seconds, representing when this was cancelled. - /// The Unix timestamp, in seconds, representing when this failed. - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). - /// The sampling temperature used for this run. If not set, defaults to 1. - /// The nucleus sampling value used for this run. If not set, defaults to 1. - /// The maximum number of prompt tokens specified to have been used over the course of the run. - /// The maximum number of completion tokens specified to have been used over the course of the run. - /// The strategy to use for dropping messages as the context windows moves forward. - /// Controls whether or not and which tool is called by the model. - /// The response format of the tool calls used in this run. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - /// Determines if tools can be executed in parallel within the run. - /// Keeps track of any properties unknown to the library. - internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - ThreadId = threadId; - AssistantId = assistantId; - Status = status; - RequiredAction = requiredAction; - LastError = lastError; - Model = model; - Instructions = instructions; - Tools = tools; - CreatedAt = createdAt; - ExpiresAt = expiresAt; - StartedAt = startedAt; - CompletedAt = completedAt; - CancelledAt = cancelledAt; - FailedAt = failedAt; - IncompleteDetails = incompleteDetails; - Usage = usage; - Temperature = temperature; - TopP = topP; - MaxPromptTokens = maxPromptTokens; - MaxCompletionTokens = maxCompletionTokens; - TruncationStrategy = truncationStrategy; - ToolChoice = toolChoice; - ResponseFormat = responseFormat; - Metadata = metadata; - ToolResources = toolResources; - ParallelToolCalls = parallelToolCalls; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ThreadRun() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - - /// The ID of the thread associated with this run. - public string ThreadId { get; } - /// The ID of the agent associated with the thread this run was performed against. - public string AssistantId { get; } - /// The status of the agent thread run. - public RunStatus Status { get; } - /// - /// The details of the action required for the agent thread run to continue. - /// 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 RequiredAction RequiredAction { get; } - /// The last error, if any, encountered by this agent thread run. - public RunError LastError { get; } - /// The ID of the model to use. - public string Model { get; } - /// The overridden system instructions used for this agent thread run. - public string Instructions { get; } - /// - /// The overridden enabled tools used for this agent thread run. - /// 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 IReadOnlyList Tools { get; } - /// The Unix timestamp, in seconds, representing when this object was created. - public DateTimeOffset CreatedAt { get; } - /// The Unix timestamp, in seconds, representing when this item expires. - public DateTimeOffset? ExpiresAt { get; } - /// The Unix timestamp, in seconds, representing when this item was started. - public DateTimeOffset? StartedAt { get; } - /// The Unix timestamp, in seconds, representing when this completed. - public DateTimeOffset? CompletedAt { get; } - /// The Unix timestamp, in seconds, representing when this was cancelled. - public DateTimeOffset? CancelledAt { get; } - /// The Unix timestamp, in seconds, representing when this failed. - public DateTimeOffset? FailedAt { get; } - /// Details on why the run is incomplete. Will be `null` if the run is not incomplete. - public IncompleteRunDetails IncompleteDetails { get; } - /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). - public RunCompletionUsage Usage { get; } - /// The sampling temperature used for this run. If not set, defaults to 1. - public float? Temperature { get; } - /// The nucleus sampling value used for this run. If not set, defaults to 1. - public float? TopP { get; } - /// The maximum number of prompt tokens specified to have been used over the course of the run. - public int? MaxPromptTokens { get; } - /// The maximum number of completion tokens specified to have been used over the course of the run. - public int? MaxCompletionTokens { get; } - /// The strategy to use for dropping messages as the context windows moves forward. - public TruncationObject TruncationStrategy { get; } - /// - /// Controls whether or not and which tool is called by the model. - /// - /// 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; } - /// - /// The response format of the tool calls used in this run. - /// - /// 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 ResponseFormat { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - public UpdateToolResourcesOptions ToolResources { get; } - /// Determines if tools can be executed in parallel within the run. - public bool ParallelToolCalls { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadStreamEvent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ThreadStreamEvent.cs deleted file mode 100644 index 446ffec4a4b9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ThreadStreamEvent.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Thread operation related streaming events. - public readonly partial struct ThreadStreamEvent : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ThreadStreamEvent(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ThreadCreatedValue = "thread.created"; - - /// Event sent when a new thread is created. The data of this event is of type AgentThread. - public static ThreadStreamEvent ThreadCreated { get; } = new ThreadStreamEvent(ThreadCreatedValue); - /// Determines if two values are the same. - public static bool operator ==(ThreadStreamEvent left, ThreadStreamEvent right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ThreadStreamEvent left, ThreadStreamEvent right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ThreadStreamEvent(string value) => new ThreadStreamEvent(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ThreadStreamEvent other && Equals(other); - /// - public bool Equals(ThreadStreamEvent 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.Projects/src/Generated/ToolConnectionList.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.Serialization.cs deleted file mode 100644 index 89f3336bd673..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.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.AI.Projects -{ - public partial class ToolConnectionList : 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(ToolConnectionList)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(ConnectionList)) - { - writer.WritePropertyName("connections"u8); - writer.WriteStartArray(); - foreach (var item in ConnectionList) - { - 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 - } - } - } - - ToolConnectionList 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(ToolConnectionList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolConnectionList(document.RootElement, options); - } - - internal static ToolConnectionList DeserializeToolConnectionList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList connections = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolConnection.DeserializeToolConnection(item, options)); - } - connections = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ToolConnectionList(connections ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ToolConnectionList)} does not support writing '{options.Format}' format."); - } - } - - ToolConnectionList 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 DeserializeToolConnectionList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolConnectionList)} 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 ToolConnectionList FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolConnectionList(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/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.cs deleted file mode 100644 index d243e2198c2d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolConnectionList.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.Projects -{ - /// A set of connection resources currently used by either the `bing_grounding`, `fabric_dataagent`, or `sharepoint_grounding` tools. - public partial class ToolConnectionList - { - /// - /// 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 ToolConnectionList() - { - ConnectionList = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// Keeps track of any properties unknown to the library. - internal ToolConnectionList(IList connectionList, IDictionary serializedAdditionalRawData) - { - ConnectionList = connectionList; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - public IList ConnectionList { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs deleted file mode 100644 index 4b888a0343b0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.Serialization.cs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownToolDefinition))] - public partial class ToolDefinition : 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(ToolDefinition)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - ToolDefinition 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(ToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolDefinition(document.RootElement, options); - } - - internal static ToolDefinition DeserializeToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "azure_ai_search": return AzureAISearchToolDefinition.DeserializeAzureAISearchToolDefinition(element, options); - case "azure_function": return AzureFunctionToolDefinition.DeserializeAzureFunctionToolDefinition(element, options); - case "bing_custom_search": return BingCustomSearchToolDefinition.DeserializeBingCustomSearchToolDefinition(element, options); - case "bing_grounding": return BingGroundingToolDefinition.DeserializeBingGroundingToolDefinition(element, options); - case "code_interpreter": return CodeInterpreterToolDefinition.DeserializeCodeInterpreterToolDefinition(element, options); - case "connected_agent": return ConnectedAgentToolDefinition.DeserializeConnectedAgentToolDefinition(element, options); - case "fabric_dataagent": return MicrosoftFabricToolDefinition.DeserializeMicrosoftFabricToolDefinition(element, options); - case "file_search": return FileSearchToolDefinition.DeserializeFileSearchToolDefinition(element, options); - case "function": return FunctionToolDefinition.DeserializeFunctionToolDefinition(element, options); - case "openapi": return OpenApiToolDefinition.DeserializeOpenApiToolDefinition(element, options); - case "sharepoint_grounding": return SharepointToolDefinition.DeserializeSharepointToolDefinition(element, options); - } - } - return UnknownToolDefinition.DeserializeUnknownToolDefinition(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - ToolDefinition 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 DeserializeToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolDefinition)} 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 ToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolDefinition(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/ai/Azure.AI.Projects/src/Generated/ToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.cs deleted file mode 100644 index 5478a0486917..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolDefinition.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.AI.Projects -{ - /// - /// An abstract representation of an input tool definition that an agent can use. - /// 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 abstract partial class ToolDefinition - { - /// - /// 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 ToolDefinition() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal ToolDefinition(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs deleted file mode 100644 index 261162ecfe0e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.Serialization.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - public partial class ToolOutput : 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(ToolOutput)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ToolCallId)) - { - writer.WritePropertyName("tool_call_id"u8); - writer.WriteStringValue(ToolCallId); - } - if (Optional.IsDefined(Output)) - { - writer.WritePropertyName("output"u8); - writer.WriteStringValue(Output); - } - 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 - } - } - } - - ToolOutput 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(ToolOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolOutput(document.RootElement, options); - } - - internal static ToolOutput DeserializeToolOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string toolCallId = default; - string output = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_call_id"u8)) - { - toolCallId = property.Value.GetString(); - continue; - } - if (property.NameEquals("output"u8)) - { - output = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ToolOutput(toolCallId, output, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ToolOutput)} does not support writing '{options.Format}' format."); - } - } - - ToolOutput 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 DeserializeToolOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolOutput)} 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 ToolOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolOutput(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/ai/Azure.AI.Projects/src/Generated/ToolOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.cs deleted file mode 100644 index 4be9c96993c8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolOutput.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.AI.Projects -{ - /// The data provided during a tool outputs submission to resolve pending tool calls and allow the model to continue. - public partial class ToolOutput - { - /// - /// 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 ToolOutput() - { - } - - /// Initializes a new instance of . - /// The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. - /// The output from the tool to be submitted. - /// Keeps track of any properties unknown to the library. - internal ToolOutput(string toolCallId, string output, IDictionary serializedAdditionalRawData) - { - ToolCallId = toolCallId; - Output = output; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The ID of the tool call being resolved, as provided in the tool calls of a required action from a run. - public string ToolCallId { get; set; } - /// The output from the tool to be submitted. - public string Output { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.Serialization.cs deleted file mode 100644 index c4619ba84da1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.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.AI.Projects -{ - public partial class ToolResources : 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(ToolResources)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(CodeInterpreter)) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); - } - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - if (Optional.IsDefined(AzureAISearch)) - { - writer.WritePropertyName("azure_ai_search"u8); - writer.WriteObjectValue(AzureAISearch, 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 - } - } - } - - ToolResources 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(ToolResources)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolResources(document.RootElement, options); - } - - internal static ToolResources DeserializeToolResources(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - CodeInterpreterToolResource codeInterpreter = default; - FileSearchToolResource fileSearch = default; - AzureAISearchResource azureAiSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code_interpreter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - codeInterpreter = CodeInterpreterToolResource.DeserializeCodeInterpreterToolResource(property.Value, options); - continue; - } - if (property.NameEquals("file_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSearch = FileSearchToolResource.DeserializeFileSearchToolResource(property.Value, options); - continue; - } - if (property.NameEquals("azure_ai_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureAiSearch = AzureAISearchResource.DeserializeAzureAISearchResource(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ToolResources(codeInterpreter, fileSearch, azureAiSearch, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ToolResources)} does not support writing '{options.Format}' format."); - } - } - - ToolResources 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 DeserializeToolResources(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolResources)} 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 ToolResources FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolResources(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/ai/Azure.AI.Projects/src/Generated/ToolResources.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.cs deleted file mode 100644 index f3bc125c78b5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ToolResources.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.AI.Projects -{ - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of - /// tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` - /// tool requires a list of vector store IDs. - /// - public partial class ToolResources - { - /// - /// 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 ToolResources() - { - } - - /// Initializes a new instance of . - /// Resources to be used by the `code_interpreter` tool consisting of file IDs. - /// Resources to be used by the `file_search` tool consisting of vector store IDs. - /// Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - /// Keeps track of any properties unknown to the library. - internal ToolResources(CodeInterpreterToolResource codeInterpreter, FileSearchToolResource fileSearch, AzureAISearchResource azureAISearch, IDictionary serializedAdditionalRawData) - { - CodeInterpreter = codeInterpreter; - FileSearch = fileSearch; - AzureAISearch = azureAISearch; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Resources to be used by the `code_interpreter` tool consisting of file IDs. - public CodeInterpreterToolResource CodeInterpreter { get; set; } - /// Resources to be used by the `file_search` tool consisting of vector store IDs. - public FileSearchToolResource FileSearch { get; set; } - /// Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - public AzureAISearchResource AzureAISearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Trigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Trigger.Serialization.cs deleted file mode 100644 index 36c2fdd6b616..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Trigger.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownTrigger))] - public partial class Trigger : 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(Trigger)} does not support writing '{format}' format."); - } - - 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 - } - } - } - - Trigger 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(Trigger)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTrigger(document.RootElement, options); - } - - internal static Trigger DeserializeTrigger(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "Cron": return CronTrigger.DeserializeCronTrigger(element, options); - case "Recurrence": return RecurrenceTrigger.DeserializeRecurrenceTrigger(element, options); - } - } - return UnknownTrigger.DeserializeUnknownTrigger(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(Trigger)} does not support writing '{options.Format}' format."); - } - } - - Trigger 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 DeserializeTrigger(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(Trigger)} 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 Trigger FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeTrigger(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/ai/Azure.AI.Projects/src/Generated/Trigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Trigger.cs deleted file mode 100644 index 7b792ec9f5a0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Trigger.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.AI.Projects -{ - /// - /// Abstract data class for input data configuration. - /// 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 abstract partial class Trigger - { - /// - /// 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 Trigger() - { - } - - /// Initializes a new instance of . - /// Type of the trigger. - /// Keeps track of any properties unknown to the library. - internal Trigger(string type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Type of the trigger. - internal string Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs deleted file mode 100644 index 2f319968776e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.Serialization.cs +++ /dev/null @@ -1,165 +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.Projects -{ - public partial class TruncationObject : 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(TruncationObject)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.ToString()); - if (Optional.IsDefined(LastMessages)) - { - if (LastMessages != null) - { - writer.WritePropertyName("last_messages"u8); - writer.WriteNumberValue(LastMessages.Value); - } - else - { - writer.WriteNull("last_messages"); - } - } - 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 - } - } - } - - TruncationObject 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(TruncationObject)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTruncationObject(document.RootElement, options); - } - - internal static TruncationObject DeserializeTruncationObject(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - TruncationStrategy type = default; - int? lastMessages = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new TruncationStrategy(property.Value.GetString()); - continue; - } - if (property.NameEquals("last_messages"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastMessages = null; - continue; - } - lastMessages = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new TruncationObject(type, lastMessages, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(TruncationObject)} does not support writing '{options.Format}' format."); - } - } - - TruncationObject 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 DeserializeTruncationObject(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(TruncationObject)} 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 TruncationObject FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeTruncationObject(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/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs deleted file mode 100644 index 679d27cf6b22..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationObject.cs +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// Controls for how a thread will be truncated prior to the run. Use this to control the initial - /// context window of the run. - /// - public partial class TruncationObject - { - /// - /// 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 truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will - /// be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread - /// will be dropped to fit the context length of the model, `max_prompt_tokens`. - /// - public TruncationObject(TruncationStrategy type) - { - Type = type; - } - - /// Initializes a new instance of . - /// - /// The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will - /// be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread - /// will be dropped to fit the context length of the model, `max_prompt_tokens`. - /// - /// The number of most recent messages from the thread when constructing the context for the run. - /// Keeps track of any properties unknown to the library. - internal TruncationObject(TruncationStrategy type, int? lastMessages, IDictionary serializedAdditionalRawData) - { - Type = type; - LastMessages = lastMessages; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal TruncationObject() - { - } - - /// - /// The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will - /// be truncated to the `lastMessages` count most recent messages in the thread. When set to `auto`, messages in the middle of the thread - /// will be dropped to fit the context length of the model, `max_prompt_tokens`. - /// - public TruncationStrategy Type { get; set; } - /// The number of most recent messages from the thread when constructing the context for the run. - public int? LastMessages { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.cs b/sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.cs deleted file mode 100644 index cb56b0f81c9d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/TruncationStrategy.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.AI.Projects -{ - /// Possible truncation strategies for the thread. - public readonly partial struct TruncationStrategy : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public TruncationStrategy(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutoValue = "auto"; - private const string LastMessagesValue = "last_messages"; - - /// Default value. Messages in the middle of the thread will be dropped to fit the context length of the model. - public static TruncationStrategy Auto { get; } = new TruncationStrategy(AutoValue); - /// The thread will truncate to the `lastMessages` count of recent messages. - public static TruncationStrategy LastMessages { get; } = new TruncationStrategy(LastMessagesValue); - /// Determines if two values are the same. - public static bool operator ==(TruncationStrategy left, TruncationStrategy right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(TruncationStrategy left, TruncationStrategy right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator TruncationStrategy(string value) => new TruncationStrategy(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is TruncationStrategy other && Equals(other); - /// - public bool Equals(TruncationStrategy 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.Projects/src/Generated/UnknownBaseCredentials.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownBaseCredentials.Serialization.cs new file mode 100644 index 000000000000..7a5509679b2f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownBaseCredentials.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.AI.Projects +{ + internal partial class UnknownBaseCredentials : 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(BaseCredentials)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BaseCredentials 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(BaseCredentials)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBaseCredentials(document.RootElement, options); + } + + internal static UnknownBaseCredentials DeserializeUnknownBaseCredentials(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CredentialType type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new CredentialType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBaseCredentials(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(BaseCredentials)} does not support writing '{options.Format}' format."); + } + } + + BaseCredentials 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 DeserializeBaseCredentials(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BaseCredentials)} 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 new UnknownBaseCredentials FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownBaseCredentials(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownBaseCredentials.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownBaseCredentials.cs new file mode 100644 index 000000000000..02b7669e09b3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownBaseCredentials.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Unknown version of BaseCredentials. + internal partial class UnknownBaseCredentials : BaseCredentials + { + /// Initializes a new instance of . + /// The type of credential used by the connection. + /// Keeps track of any properties unknown to the library. + internal UnknownBaseCredentials(CredentialType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownBaseCredentials() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.Serialization.cs new file mode 100644 index 000000000000..7b57c282c9b1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDatasetVersion : 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(DatasetVersion)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DatasetVersion 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(DatasetVersion)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetVersion(document.RootElement, options); + } + + internal static UnknownDatasetVersion DeserializeUnknownDatasetVersion(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dataUri = default; + DatasetType type = "Unknown"; + bool? isReference = default; + string connectionName = default; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dataUri"u8)) + { + dataUri = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DatasetType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReference"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReference = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("connectionName"u8)) + { + connectionName = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDatasetVersion( + dataUri, + type, + isReference, + connectionName, + id, + name, + version, + description, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetVersion)} does not support writing '{options.Format}' format."); + } + } + + DatasetVersion 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 DeserializeDatasetVersion(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetVersion)} 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 new UnknownDatasetVersion FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownDatasetVersion(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.cs new file mode 100644 index 000000000000..7a018a5bee51 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDatasetVersion.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.AI.Projects +{ + /// Unknown version of DatasetVersion. + internal partial class UnknownDatasetVersion : DatasetVersion + { + /// Initializes a new instance of . + /// URI of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330. + /// Dataset type. + /// Indicates if the dataset holds a reference to the storage, or the dataset manages storage itself. If true, the underlying data will not be deleted when the dataset version is deleted. + /// The Azure Storage Account connection name. Required if startPendingUploadVersion was not called before creating the Dataset. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal UnknownDatasetVersion(string dataUri, DatasetType type, bool? isReference, string connectionName, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) : base(dataUri, type, isReference, connectionName, id, name, version, description, tags, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownDatasetVersion() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.Serialization.cs new file mode 100644 index 000000000000..4370d0518438 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.Serialization.cs @@ -0,0 +1,132 @@ +// Copyright (c) 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.Projects +{ + internal partial class UnknownDeployment : 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(Deployment)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + Deployment 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(Deployment)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeployment(document.RootElement, options); + } + + internal static UnknownDeployment DeserializeUnknownDeployment(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeploymentType type = "Unknown"; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new DeploymentType(property.Value.GetString()); + 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 UnknownDeployment(type, name, 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Deployment)} does not support writing '{options.Format}' format."); + } + } + + Deployment 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 DeserializeDeployment(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Deployment)} 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 new UnknownDeployment FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownDeployment(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.cs new file mode 100644 index 000000000000..9d07b4059cf6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownDeployment.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.AI.Projects +{ + /// Unknown version of Deployment. + internal partial class UnknownDeployment : Deployment + { + /// Initializes a new instance of . + /// The type of the deployment. + /// Name of the deployment. + /// Keeps track of any properties unknown to the library. + internal UnknownDeployment(DeploymentType type, string name, IDictionary serializedAdditionalRawData) : base(type, name, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownDeployment() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.Serialization.cs new file mode 100644 index 000000000000..8fc4c5123304 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.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.AI.Projects +{ + internal partial class UnknownIndex : 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(Index)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + Index 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(Index)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIndex(document.RootElement, options); + } + + internal static UnknownIndex DeserializeUnknownIndex(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IndexType type = "Unknown"; + string id = default; + string name = default; + string version = default; + string description = default; + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new IndexType(property.Value.GetString()); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownIndex( + type, + id, + name, + version, + description, + 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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(Index)} does not support writing '{options.Format}' format."); + } + } + + Index 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 DeserializeIndex(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Index)} 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 new UnknownIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownIndex(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.cs new file mode 100644 index 000000000000..f7f7e4eb7a0d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownIndex.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Unknown version of Index. + internal partial class UnknownIndex : Index + { + /// Initializes a new instance of . + /// Type of index. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// Keeps track of any properties unknown to the library. + internal UnknownIndex(IndexType type, string id, string name, string version, string description, IDictionary tags, IDictionary serializedAdditionalRawData) : base(type, id, name, version, description, tags, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownIndex() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.Serialization.cs deleted file mode 100644 index 2883b54472fc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.Serialization.cs +++ /dev/null @@ -1,138 +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.Projects -{ - internal partial class UnknownInternalConnectionProperties : 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(ConnectionProperties)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - ConnectionProperties 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(ConnectionProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeConnectionProperties(document.RootElement, options); - } - - internal static UnknownInternalConnectionProperties DeserializeUnknownInternalConnectionProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - AuthenticationType authType = default; - ConnectionType category = default; - string target = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("authType"u8)) - { - authType = property.Value.GetString().ToAuthenticationType(); - continue; - } - if (property.NameEquals("category"u8)) - { - category = new ConnectionType(property.Value.GetString()); - continue; - } - if (property.NameEquals("target"u8)) - { - target = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownInternalConnectionProperties(authType, category, target, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ConnectionProperties)} does not support writing '{options.Format}' format."); - } - } - - ConnectionProperties 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 DeserializeConnectionProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ConnectionProperties)} 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 new UnknownInternalConnectionProperties FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownInternalConnectionProperties(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.cs deleted file mode 100644 index a17524ba6e77..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownInternalConnectionProperties.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// Unknown version of InternalConnectionProperties. - internal partial class UnknownInternalConnectionProperties : ConnectionProperties - { - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Category of the connection. - /// The connection URL to be used for this service. - /// Keeps track of any properties unknown to the library. - internal UnknownInternalConnectionProperties(AuthenticationType authType, ConnectionType category, string target, IDictionary serializedAdditionalRawData) : base(authType, category, target, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownInternalConnectionProperties() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs deleted file mode 100644 index fac62a0cb7ab..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownMessageContent : 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(MessageContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - MessageContent 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(MessageContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageContent(document.RootElement, options); - } - - internal static UnknownMessageContent DeserializeUnknownMessageContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownMessageContent(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageContent)} does not support writing '{options.Format}' format."); - } - } - - MessageContent 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 DeserializeMessageContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageContent)} 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 new UnknownMessageContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownMessageContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs deleted file mode 100644 index 030da863c61a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageContent.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of MessageContent. - internal partial class UnknownMessageContent : MessageContent - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownMessageContent(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownMessageContent() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs deleted file mode 100644 index 14547bde91cc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownMessageDeltaContent : 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(MessageDeltaContent)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - MessageDeltaContent 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(MessageDeltaContent)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaContent(document.RootElement, options); - } - - internal static UnknownMessageDeltaContent DeserializeUnknownMessageDeltaContent(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int index = default; - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 UnknownMessageDeltaContent(index, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaContent)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaContent 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 DeserializeMessageDeltaContent(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaContent)} 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 new UnknownMessageDeltaContent FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownMessageDeltaContent(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.cs deleted file mode 100644 index 9aa9dd56098f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaContent.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of MessageDeltaContent. - internal partial class UnknownMessageDeltaContent : MessageDeltaContent - { - /// Initializes a new instance of . - /// The index of the content part of the message. - /// The type of content for this content part. - /// Keeps track of any properties unknown to the library. - internal UnknownMessageDeltaContent(int index, string type, IDictionary serializedAdditionalRawData) : base(index, type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownMessageDeltaContent() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs deleted file mode 100644 index 7277d429898c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownMessageDeltaTextAnnotation : 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(MessageDeltaTextAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - MessageDeltaTextAnnotation 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(MessageDeltaTextAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageDeltaTextAnnotation(document.RootElement, options); - } - - internal static UnknownMessageDeltaTextAnnotation DeserializeUnknownMessageDeltaTextAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int index = default; - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 UnknownMessageDeltaTextAnnotation(index, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageDeltaTextAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageDeltaTextAnnotation 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 DeserializeMessageDeltaTextAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageDeltaTextAnnotation)} 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 new UnknownMessageDeltaTextAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownMessageDeltaTextAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.cs deleted file mode 100644 index c1a702e2bfb2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageDeltaTextAnnotation.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of MessageDeltaTextAnnotation. - internal partial class UnknownMessageDeltaTextAnnotation : MessageDeltaTextAnnotation - { - /// Initializes a new instance of . - /// The index of the annotation within a text content part. - /// The type of the text content annotation. - /// Keeps track of any properties unknown to the library. - internal UnknownMessageDeltaTextAnnotation(int index, string type, IDictionary serializedAdditionalRawData) : base(index, type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownMessageDeltaTextAnnotation() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.Serialization.cs deleted file mode 100644 index a0dbba5d02ce..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownMessageInputContentBlock : 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(MessageInputContentBlock)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - MessageInputContentBlock 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(MessageInputContentBlock)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageInputContentBlock(document.RootElement, options); - } - - internal static UnknownMessageInputContentBlock DeserializeUnknownMessageInputContentBlock(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - MessageBlockType type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new MessageBlockType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownMessageInputContentBlock(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageInputContentBlock)} does not support writing '{options.Format}' format."); - } - } - - MessageInputContentBlock 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 DeserializeMessageInputContentBlock(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageInputContentBlock)} 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 new UnknownMessageInputContentBlock FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownMessageInputContentBlock(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.cs deleted file mode 100644 index 3ad239e8a6e0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageInputContentBlock.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of MessageInputContentBlock. - internal partial class UnknownMessageInputContentBlock : MessageInputContentBlock - { - /// Initializes a new instance of . - /// Specifies which kind of content block this is (text, image_file, image_url, etc.). - /// Keeps track of any properties unknown to the library. - internal UnknownMessageInputContentBlock(MessageBlockType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownMessageInputContentBlock() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs deleted file mode 100644 index 925de1adb59d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownMessageTextAnnotation : 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(MessageTextAnnotation)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - MessageTextAnnotation 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(MessageTextAnnotation)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMessageTextAnnotation(document.RootElement, options); - } - - internal static UnknownMessageTextAnnotation DeserializeUnknownMessageTextAnnotation(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - string text = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = 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 UnknownMessageTextAnnotation(type, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(MessageTextAnnotation)} does not support writing '{options.Format}' format."); - } - } - - MessageTextAnnotation 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 DeserializeMessageTextAnnotation(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MessageTextAnnotation)} 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 new UnknownMessageTextAnnotation FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownMessageTextAnnotation(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.cs deleted file mode 100644 index add6b94cd4cd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownMessageTextAnnotation.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of MessageTextAnnotation. - internal partial class UnknownMessageTextAnnotation : MessageTextAnnotation - { - /// Initializes a new instance of . - /// The object type. - /// The textual content associated with this text annotation item. - /// Keeps track of any properties unknown to the library. - internal UnknownMessageTextAnnotation(string type, string text, IDictionary serializedAdditionalRawData) : base(type, text, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownMessageTextAnnotation() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs deleted file mode 100644 index 27a50ed4124a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownOpenApiAuthDetails : 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(OpenApiAuthDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - OpenApiAuthDetails 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(OpenApiAuthDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeOpenApiAuthDetails(document.RootElement, options); - } - - internal static UnknownOpenApiAuthDetails DeserializeUnknownOpenApiAuthDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - OpenApiAuthType type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new OpenApiAuthType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownOpenApiAuthDetails(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(OpenApiAuthDetails)} does not support writing '{options.Format}' format."); - } - } - - OpenApiAuthDetails 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 DeserializeOpenApiAuthDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(OpenApiAuthDetails)} 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 new UnknownOpenApiAuthDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownOpenApiAuthDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs deleted file mode 100644 index 4844d77a2185..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownOpenApiAuthDetails.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of OpenApiAuthDetails. - internal partial class UnknownOpenApiAuthDetails : OpenApiAuthDetails - { - /// Initializes a new instance of . - /// The type of authentication, must be anonymous/connection/managed_identity. - /// Keeps track of any properties unknown to the library. - internal UnknownOpenApiAuthDetails(OpenApiAuthType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownOpenApiAuthDetails() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs deleted file mode 100644 index b658d25291e0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownRequiredAction : 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(RequiredAction)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RequiredAction 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(RequiredAction)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequiredAction(document.RootElement, options); - } - - internal static UnknownRequiredAction DeserializeUnknownRequiredAction(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownRequiredAction(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RequiredAction)} does not support writing '{options.Format}' format."); - } - } - - RequiredAction 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 DeserializeRequiredAction(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequiredAction)} 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 new UnknownRequiredAction FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRequiredAction(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs deleted file mode 100644 index a9368a767de8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredAction.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RequiredAction. - internal partial class UnknownRequiredAction : RequiredAction - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownRequiredAction(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRequiredAction() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs deleted file mode 100644 index bc948c93155d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownRequiredToolCall : 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(RequiredToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RequiredToolCall 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(RequiredToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRequiredToolCall(document.RootElement, options); - } - - internal static UnknownRequiredToolCall DeserializeUnknownRequiredToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - string type = "Unknown"; - 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("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRequiredToolCall(type, serializedAdditionalRawData, id); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RequiredToolCall)} does not support writing '{options.Format}' format."); - } - } - - RequiredToolCall 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 DeserializeRequiredToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RequiredToolCall)} 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 new UnknownRequiredToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRequiredToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.cs deleted file mode 100644 index 9fa6789c3766..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRequiredToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RequiredToolCall. - internal partial class UnknownRequiredToolCall : RequiredToolCall - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The ID of the tool call. This ID must be referenced when submitting tool outputs. - internal UnknownRequiredToolCall(string type, IDictionary serializedAdditionalRawData, string id) : base(type, serializedAdditionalRawData, id) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRequiredToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs deleted file mode 100644 index 46ef55a2eb05..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownRunStepCodeInterpreterToolCallOutput : 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(RunStepCodeInterpreterToolCallOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepCodeInterpreterToolCallOutput 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(RunStepCodeInterpreterToolCallOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepCodeInterpreterToolCallOutput(document.RootElement, options); - } - - internal static UnknownRunStepCodeInterpreterToolCallOutput DeserializeUnknownRunStepCodeInterpreterToolCallOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownRunStepCodeInterpreterToolCallOutput(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCallOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepCodeInterpreterToolCallOutput 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 DeserializeRunStepCodeInterpreterToolCallOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepCodeInterpreterToolCallOutput)} 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 new UnknownRunStepCodeInterpreterToolCallOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepCodeInterpreterToolCallOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs deleted file mode 100644 index 2fd983536cab..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepCodeInterpreterToolCallOutput.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RunStepCodeInterpreterToolCallOutput. - internal partial class UnknownRunStepCodeInterpreterToolCallOutput : RunStepCodeInterpreterToolCallOutput - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepCodeInterpreterToolCallOutput(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepCodeInterpreterToolCallOutput() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs deleted file mode 100644 index 1a2f2310e7c0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownRunStepDeltaCodeInterpreterOutput : 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(RunStepDeltaCodeInterpreterOutput)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepDeltaCodeInterpreterOutput 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(RunStepDeltaCodeInterpreterOutput)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaCodeInterpreterOutput(document.RootElement, options); - } - - internal static UnknownRunStepDeltaCodeInterpreterOutput DeserializeUnknownRunStepDeltaCodeInterpreterOutput(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int index = default; - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - 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 UnknownRunStepDeltaCodeInterpreterOutput(index, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterOutput)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaCodeInterpreterOutput 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 DeserializeRunStepDeltaCodeInterpreterOutput(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaCodeInterpreterOutput)} 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 new UnknownRunStepDeltaCodeInterpreterOutput FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepDeltaCodeInterpreterOutput(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.cs deleted file mode 100644 index 2aaf69a1c20b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaCodeInterpreterOutput.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RunStepDeltaCodeInterpreterOutput. - internal partial class UnknownRunStepDeltaCodeInterpreterOutput : RunStepDeltaCodeInterpreterOutput - { - /// Initializes a new instance of . - /// The index of the output in the streaming run step tool call's Code Interpreter outputs array. - /// The type of the streaming run step tool call's Code Interpreter output. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepDeltaCodeInterpreterOutput(int index, string type, IDictionary serializedAdditionalRawData) : base(index, type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepDeltaCodeInterpreterOutput() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs deleted file mode 100644 index 10c12cd27d42..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownRunStepDeltaDetail : 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(RunStepDeltaDetail)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepDeltaDetail 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(RunStepDeltaDetail)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaDetail(document.RootElement, options); - } - - internal static UnknownRunStepDeltaDetail DeserializeUnknownRunStepDeltaDetail(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownRunStepDeltaDetail(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaDetail)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaDetail 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 DeserializeRunStepDeltaDetail(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaDetail)} 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 new UnknownRunStepDeltaDetail FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepDeltaDetail(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs deleted file mode 100644 index a5ac9c43bae4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaDetail.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RunStepDeltaDetail. - internal partial class UnknownRunStepDeltaDetail : RunStepDeltaDetail - { - /// Initializes a new instance of . - /// The object type for the run step detail object. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepDeltaDetail(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepDeltaDetail() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs deleted file mode 100644 index 0879c7902af4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.Serialization.cs +++ /dev/null @@ -1,138 +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.Projects -{ - internal partial class UnknownRunStepDeltaToolCall : 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(RunStepDeltaToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepDeltaToolCall 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(RunStepDeltaToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDeltaToolCall(document.RootElement, options); - } - - internal static UnknownRunStepDeltaToolCall DeserializeUnknownRunStepDeltaToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int index = default; - string id = default; - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("index"u8)) - { - index = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = 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 UnknownRunStepDeltaToolCall(index, id, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepDeltaToolCall 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 DeserializeRunStepDeltaToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDeltaToolCall)} 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 new UnknownRunStepDeltaToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepDeltaToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs deleted file mode 100644 index 2c31d5c2b174..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDeltaToolCall.cs +++ /dev/null @@ -1,30 +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.Projects -{ - /// Unknown version of RunStepDeltaToolCall. - internal partial class UnknownRunStepDeltaToolCall : RunStepDeltaToolCall - { - /// Initializes a new instance of . - /// The index of the tool call detail in the run step's tool_calls array. - /// The ID of the tool call, used when submitting outputs to the run. - /// The type of the tool call detail item in a streaming run step's details. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepDeltaToolCall(int index, string id, string type, IDictionary serializedAdditionalRawData) : base(index, id, type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepDeltaToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs deleted file mode 100644 index acfca39a2efb..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownRunStepDetails : 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(RunStepDetails)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepDetails 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(RunStepDetails)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepDetails(document.RootElement, options); - } - - internal static UnknownRunStepDetails DeserializeUnknownRunStepDetails(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - RunStepType type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new RunStepType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepDetails(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepDetails)} does not support writing '{options.Format}' format."); - } - } - - RunStepDetails 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 DeserializeRunStepDetails(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepDetails)} 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 new UnknownRunStepDetails FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepDetails(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs deleted file mode 100644 index a8b39aafcbf3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepDetails.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RunStepDetails. - internal partial class UnknownRunStepDetails : RunStepDetails - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepDetails(RunStepType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepDetails() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs deleted file mode 100644 index 706b5ab161a8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.Serialization.cs +++ /dev/null @@ -1,132 +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.Projects -{ - internal partial class UnknownRunStepToolCall : 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(RunStepToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - RunStepToolCall 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(RunStepToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepToolCall(document.RootElement, options); - } - - internal static UnknownRunStepToolCall DeserializeUnknownRunStepToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownRunStepToolCall(type, id, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepToolCall 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 DeserializeRunStepToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepToolCall)} 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 new UnknownRunStepToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownRunStepToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.cs deleted file mode 100644 index 26e2ee7649c9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownRunStepToolCall.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of RunStepToolCall. - internal partial class UnknownRunStepToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - internal UnknownRunStepToolCall(string type, string id, IDictionary serializedAdditionalRawData) : base(type, id, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownRunStepToolCall() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.Serialization.cs new file mode 100644 index 000000000000..c24f6413031c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.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.AI.Projects +{ + internal partial class UnknownTargetConfig : 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(TargetConfig)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + TargetConfig 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(TargetConfig)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTargetConfig(document.RootElement, options); + } + + internal static UnknownTargetConfig DeserializeUnknownTargetConfig(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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 UnknownTargetConfig(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, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TargetConfig)} does not support writing '{options.Format}' format."); + } + } + + TargetConfig 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 DeserializeTargetConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TargetConfig)} 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 new UnknownTargetConfig FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownTargetConfig(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.cs new file mode 100644 index 000000000000..c9e64735546c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetConfig.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Unknown version of TargetConfig. + internal partial class UnknownTargetConfig : TargetConfig + { + /// Initializes a new instance of . + /// Type of the model configuration. + /// Keeps track of any properties unknown to the library. + internal UnknownTargetConfig(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownTargetConfig() + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.Serialization.cs deleted file mode 100644 index 532b40d15829..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownTargetModelConfig : 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(TargetModelConfig)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - TargetModelConfig 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(TargetModelConfig)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTargetModelConfig(document.RootElement, options); - } - - internal static UnknownTargetModelConfig DeserializeUnknownTargetModelConfig(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownTargetModelConfig(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(TargetModelConfig)} does not support writing '{options.Format}' format."); - } - } - - TargetModelConfig 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 DeserializeTargetModelConfig(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(TargetModelConfig)} 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 new UnknownTargetModelConfig FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownTargetModelConfig(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.cs deleted file mode 100644 index b7130f7a857a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTargetModelConfig.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of TargetModelConfig. - internal partial class UnknownTargetModelConfig : TargetModelConfig - { - /// Initializes a new instance of . - /// Type of the model configuration. - /// Keeps track of any properties unknown to the library. - internal UnknownTargetModelConfig(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownTargetModelConfig() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs deleted file mode 100644 index e67762afd06d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownToolDefinition : 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(ToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - ToolDefinition 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(ToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolDefinition(document.RootElement, options); - } - - internal static UnknownToolDefinition DeserializeUnknownToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownToolDefinition(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(ToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - ToolDefinition 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 DeserializeToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolDefinition)} 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 new UnknownToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs deleted file mode 100644 index 99bbba5bf00a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownToolDefinition.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of ToolDefinition. - internal partial class UnknownToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownToolDefinition(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownToolDefinition() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.Serialization.cs deleted file mode 100644 index 64ddec40e0ff..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownTrigger : 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(Trigger)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - Trigger 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(Trigger)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeTrigger(document.RootElement, options); - } - - internal static UnknownTrigger DeserializeUnknownTrigger(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - 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 UnknownTrigger(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(Trigger)} does not support writing '{options.Format}' format."); - } - } - - Trigger 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 DeserializeTrigger(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(Trigger)} 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 new UnknownTrigger FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownTrigger(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.cs deleted file mode 100644 index 61ca52ea3445..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownTrigger.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of Trigger. - internal partial class UnknownTrigger : Trigger - { - /// Initializes a new instance of . - /// Type of the trigger. - /// Keeps track of any properties unknown to the library. - internal UnknownTrigger(string type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownTrigger() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs deleted file mode 100644 index 2b2145e38096..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownVectorStoreChunkingStrategyRequest : 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(VectorStoreChunkingStrategyRequest)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - VectorStoreChunkingStrategyRequest 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(VectorStoreChunkingStrategyRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreChunkingStrategyRequest(document.RootElement, options); - } - - internal static UnknownVectorStoreChunkingStrategyRequest DeserializeUnknownVectorStoreChunkingStrategyRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreChunkingStrategyRequestType type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyRequestType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownVectorStoreChunkingStrategyRequest(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyRequest)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreChunkingStrategyRequest 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 DeserializeVectorStoreChunkingStrategyRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyRequest)} 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 new UnknownVectorStoreChunkingStrategyRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownVectorStoreChunkingStrategyRequest(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs deleted file mode 100644 index 7ca4d51daf75..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyRequest.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of VectorStoreChunkingStrategyRequest. - internal partial class UnknownVectorStoreChunkingStrategyRequest : VectorStoreChunkingStrategyRequest - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownVectorStoreChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownVectorStoreChunkingStrategyRequest() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs deleted file mode 100644 index cc8784a02603..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - internal partial class UnknownVectorStoreChunkingStrategyResponse : 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(VectorStoreChunkingStrategyResponse)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - VectorStoreChunkingStrategyResponse 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(VectorStoreChunkingStrategyResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreChunkingStrategyResponse(document.RootElement, options); - } - - internal static UnknownVectorStoreChunkingStrategyResponse DeserializeUnknownVectorStoreChunkingStrategyResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreChunkingStrategyResponseType type = "Unknown"; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyResponseType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UnknownVectorStoreChunkingStrategyResponse(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyResponse)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreChunkingStrategyResponse 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 DeserializeVectorStoreChunkingStrategyResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyResponse)} 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 new UnknownVectorStoreChunkingStrategyResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUnknownVectorStoreChunkingStrategyResponse(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs deleted file mode 100644 index d9896a124b6f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UnknownVectorStoreChunkingStrategyResponse.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Unknown version of VectorStoreChunkingStrategyResponse. - internal partial class UnknownVectorStoreChunkingStrategyResponse : VectorStoreChunkingStrategyResponse - { - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal UnknownVectorStoreChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - - /// Initializes a new instance of for deserialization. - internal UnknownVectorStoreChunkingStrategyResponse() - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs deleted file mode 100644 index 5358d95fca9e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.Serialization.cs +++ /dev/null @@ -1,374 +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.Projects -{ - internal partial class UpdateAgentRequest : 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(UpdateAgentRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(Model)) - { - writer.WritePropertyName("model"u8); - writer.WriteStringValue(Model); - } - if (Optional.IsDefined(Name)) - { - if (Name != null) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - else - { - writer.WriteNull("name"); - } - } - if (Optional.IsDefined(Description)) - { - if (Description != null) - { - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - } - else - { - writer.WriteNull("description"); - } - } - if (Optional.IsDefined(Instructions)) - { - if (Instructions != null) - { - writer.WritePropertyName("instructions"u8); - writer.WriteStringValue(Instructions); - } - else - { - writer.WriteNull("instructions"); - } - } - if (Optional.IsCollectionDefined(Tools)) - { - writer.WritePropertyName("tools"u8); - writer.WriteStartArray(); - foreach (var item in Tools) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (Optional.IsDefined(ToolResources)) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - if (Optional.IsDefined(Temperature)) - { - if (Temperature != null) - { - writer.WritePropertyName("temperature"u8); - writer.WriteNumberValue(Temperature.Value); - } - else - { - writer.WriteNull("temperature"); - } - } - if (Optional.IsDefined(TopP)) - { - if (TopP != null) - { - writer.WritePropertyName("top_p"u8); - writer.WriteNumberValue(TopP.Value); - } - else - { - writer.WriteNull("top_p"); - } - } - if (Optional.IsDefined(ResponseFormat)) - { - if (ResponseFormat != null) - { - writer.WritePropertyName("response_format"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ResponseFormat); -#else - using (JsonDocument document = JsonDocument.Parse(ResponseFormat, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - else - { - writer.WriteNull("response_format"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - UpdateAgentRequest 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(UpdateAgentRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateAgentRequest(document.RootElement, options); - } - - internal static UpdateAgentRequest DeserializeUpdateAgentRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string model = default; - string name = default; - string description = default; - string instructions = default; - IReadOnlyList tools = default; - ToolResources toolResources = default; - float? temperature = default; - float? topP = default; - BinaryData responseFormat = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("model"u8)) - { - model = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - name = null; - continue; - } - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("description"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - description = null; - continue; - } - description = property.Value.GetString(); - continue; - } - if (property.NameEquals("instructions"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - instructions = null; - continue; - } - instructions = property.Value.GetString(); - continue; - } - if (property.NameEquals("tools"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolDefinition.DeserializeToolDefinition(item, options)); - } - tools = array; - continue; - } - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("temperature"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - temperature = null; - continue; - } - temperature = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("top_p"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - topP = null; - continue; - } - topP = property.Value.GetSingle(); - continue; - } - if (property.NameEquals("response_format"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - responseFormat = null; - continue; - } - responseFormat = BinaryData.FromString(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateAgentRequest( - model, - name, - description, - instructions, - tools ?? new ChangeTrackingList(), - toolResources, - temperature, - topP, - responseFormat, - metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateAgentRequest)} does not support writing '{options.Format}' format."); - } - } - - UpdateAgentRequest 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 DeserializeUpdateAgentRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateAgentRequest)} 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 UpdateAgentRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateAgentRequest(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/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.cs deleted file mode 100644 index b24cf0bd2268..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateAgentRequest.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The UpdateAgentRequest. - internal partial class UpdateAgentRequest - { - /// - /// 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 UpdateAgentRequest() - { - Tools = new ChangeTrackingList(); - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// The ID of the model to use. - /// The modified name for the agent to use. - /// The modified description for the agent to use. - /// The modified system instructions for the new agent to use. - /// - /// The modified collection of tools to enable for the agent. - /// 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 set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, - /// the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - /// The response format of the tool calls used by this agent. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal UpdateAgentRequest(string model, string name, string description, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Model = model; - Name = name; - Description = description; - Instructions = instructions; - Tools = tools; - ToolResources = toolResources; - Temperature = temperature; - TopP = topP; - ResponseFormat = responseFormat; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The ID of the model to use. - public string Model { get; } - /// The modified name for the agent to use. - public string Name { get; } - /// The modified description for the agent to use. - public string Description { get; } - /// The modified system instructions for the new agent to use. - public string Instructions { get; } - /// - /// The modified collection of tools to enable for the agent. - /// 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 IReadOnlyList Tools { get; } - /// - /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, - /// the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. - /// - public ToolResources ToolResources { get; } - /// - /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, - /// while lower values like 0.2 will make it more focused and deterministic. - /// - public float? Temperature { get; } - /// - /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. - /// So 0.1 means only the tokens comprising the top 10% probability mass are considered. - /// - /// We generally recommend altering this or temperature but not both. - /// - public float? TopP { get; } - /// - /// The response format of the tool calls used by this agent. - /// - /// 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 ResponseFormat { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs deleted file mode 100644 index 7efed47b989e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.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.AI.Projects -{ - public partial class UpdateCodeInterpreterToolResourceOptions : 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(UpdateCodeInterpreterToolResourceOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - 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 - } - } - } - - UpdateCodeInterpreterToolResourceOptions 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(UpdateCodeInterpreterToolResourceOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateCodeInterpreterToolResourceOptions(document.RootElement, options); - } - - internal static UpdateCodeInterpreterToolResourceOptions DeserializeUpdateCodeInterpreterToolResourceOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fileIds = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateCodeInterpreterToolResourceOptions(fileIds ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateCodeInterpreterToolResourceOptions 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 DeserializeUpdateCodeInterpreterToolResourceOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} 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 UpdateCodeInterpreterToolResourceOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateCodeInterpreterToolResourceOptions(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/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs deleted file mode 100644 index 402e29bdc278..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Request object to update `code_interpreted` tool resources. - public partial class UpdateCodeInterpreterToolResourceOptions - { - /// - /// 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 UpdateCodeInterpreterToolResourceOptions() - { - FileIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// A list of file IDs to override the current list of the agent. - /// Keeps track of any properties unknown to the library. - internal UpdateCodeInterpreterToolResourceOptions(IList fileIds, IDictionary serializedAdditionalRawData) - { - FileIds = fileIds; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A list of file IDs to override the current list of the agent. - public IList FileIds { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs deleted file mode 100644 index 686d9d8c8e6e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.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.AI.Projects -{ - public partial class UpdateFileSearchToolResourceOptions : 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(UpdateFileSearchToolResourceOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(VectorStoreIds)) - { - writer.WritePropertyName("vector_store_ids"u8); - writer.WriteStartArray(); - foreach (var item in VectorStoreIds) - { - 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 - } - } - } - - UpdateFileSearchToolResourceOptions 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(UpdateFileSearchToolResourceOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateFileSearchToolResourceOptions(document.RootElement, options); - } - - internal static UpdateFileSearchToolResourceOptions DeserializeUpdateFileSearchToolResourceOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList vectorStoreIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vector_store_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vectorStoreIds = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateFileSearchToolResourceOptions(vectorStoreIds ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateFileSearchToolResourceOptions 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 DeserializeUpdateFileSearchToolResourceOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} 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 UpdateFileSearchToolResourceOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateFileSearchToolResourceOptions(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/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs deleted file mode 100644 index 892e93500be8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateFileSearchToolResourceOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Request object to update `file_search` tool resources. - public partial class UpdateFileSearchToolResourceOptions - { - /// - /// 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 UpdateFileSearchToolResourceOptions() - { - VectorStoreIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// A list of vector store IDs to override the current list of the agent. - /// Keeps track of any properties unknown to the library. - internal UpdateFileSearchToolResourceOptions(IList vectorStoreIds, IDictionary serializedAdditionalRawData) - { - VectorStoreIds = vectorStoreIds; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A list of vector store IDs to override the current list of the agent. - public IList VectorStoreIds { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.cs deleted file mode 100644 index acb9356ba625..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class UpdateMessageRequest : 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(UpdateMessageRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - UpdateMessageRequest 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(UpdateMessageRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateMessageRequest(document.RootElement, options); - } - - internal static UpdateMessageRequest DeserializeUpdateMessageRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateMessageRequest(metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateMessageRequest)} does not support writing '{options.Format}' format."); - } - } - - UpdateMessageRequest 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 DeserializeUpdateMessageRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateMessageRequest)} 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 UpdateMessageRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateMessageRequest(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/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs deleted file mode 100644 index 45b3cf31de2b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateMessageRequest.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The UpdateMessageRequest. - internal partial class UpdateMessageRequest - { - /// - /// 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 UpdateMessageRequest() - { - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal UpdateMessageRequest(IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.cs deleted file mode 100644 index a489703d6c73..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.Serialization.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.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class UpdateRunRequest : 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(UpdateRunRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - UpdateRunRequest 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(UpdateRunRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateRunRequest(document.RootElement, options); - } - - internal static UpdateRunRequest DeserializeUpdateRunRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateRunRequest(metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateRunRequest)} does not support writing '{options.Format}' format."); - } - } - - UpdateRunRequest 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 DeserializeUpdateRunRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateRunRequest)} 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 UpdateRunRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateRunRequest(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/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs deleted file mode 100644 index 356bad9de457..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateRunRequest.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The UpdateRunRequest. - internal partial class UpdateRunRequest - { - /// - /// 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 UpdateRunRequest() - { - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal UpdateRunRequest(IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs deleted file mode 100644 index 4b4b14c9c658..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.Serialization.cs +++ /dev/null @@ -1,190 +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.Projects -{ - internal partial class UpdateThreadRequest : 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(UpdateThreadRequest)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ToolResources)) - { - if (ToolResources != null) - { - writer.WritePropertyName("tool_resources"u8); - writer.WriteObjectValue(ToolResources, options); - } - else - { - writer.WriteNull("tool_resources"); - } - } - if (Optional.IsCollectionDefined(Metadata)) - { - if (Metadata != null) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - } - 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 - } - } - } - - UpdateThreadRequest 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(UpdateThreadRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateThreadRequest(document.RootElement, options); - } - - internal static UpdateThreadRequest DeserializeUpdateThreadRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ToolResources toolResources = default; - IReadOnlyDictionary metadata = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("tool_resources"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - toolResources = null; - continue; - } - toolResources = ToolResources.DeserializeToolResources(property.Value, options); - continue; - } - if (property.NameEquals("metadata"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()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateThreadRequest(toolResources, metadata ?? 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateThreadRequest)} does not support writing '{options.Format}' format."); - } - } - - UpdateThreadRequest 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 DeserializeUpdateThreadRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateThreadRequest)} 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 UpdateThreadRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateThreadRequest(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/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.cs deleted file mode 100644 index 674b76d10fba..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateThreadRequest.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.AI.Projects -{ - /// The UpdateThreadRequest. - internal partial class UpdateThreadRequest - { - /// - /// 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 UpdateThreadRequest() - { - Metadata = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs - /// - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal UpdateThreadRequest(ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - ToolResources = toolResources; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// A set of resources that are made available to the agent's tools in this thread. The resources are specific to the - /// type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires - /// a list of vector store IDs - /// - public ToolResources ToolResources { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.Serialization.cs deleted file mode 100644 index aeaab45ce3b5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.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.AI.Projects -{ - public partial class UpdateToolResourcesOptions : 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(UpdateToolResourcesOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(CodeInterpreter)) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); - } - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - if (Optional.IsDefined(AzureAISearch)) - { - writer.WritePropertyName("azure_ai_search"u8); - writer.WriteObjectValue(AzureAISearch, 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 - } - } - } - - UpdateToolResourcesOptions 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(UpdateToolResourcesOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateToolResourcesOptions(document.RootElement, options); - } - - internal static UpdateToolResourcesOptions DeserializeUpdateToolResourcesOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - UpdateCodeInterpreterToolResourceOptions codeInterpreter = default; - UpdateFileSearchToolResourceOptions fileSearch = default; - AzureAISearchResource azureAiSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code_interpreter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - codeInterpreter = UpdateCodeInterpreterToolResourceOptions.DeserializeUpdateCodeInterpreterToolResourceOptions(property.Value, options); - continue; - } - if (property.NameEquals("file_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSearch = UpdateFileSearchToolResourceOptions.DeserializeUpdateFileSearchToolResourceOptions(property.Value, options); - continue; - } - if (property.NameEquals("azure_ai_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureAiSearch = AzureAISearchResource.DeserializeAzureAISearchResource(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateToolResourcesOptions(codeInterpreter, fileSearch, azureAiSearch, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateToolResourcesOptions 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 DeserializeUpdateToolResourcesOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} 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 UpdateToolResourcesOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateToolResourcesOptions(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/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.cs deleted file mode 100644 index 1ebcca9d85f1..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UpdateToolResourcesOptions.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; - -namespace Azure.AI.Projects -{ - /// - /// Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. - /// For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of - /// vector store IDs. - /// - public partial class UpdateToolResourcesOptions - { - /// - /// 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 UpdateToolResourcesOptions() - { - } - - /// Initializes a new instance of . - /// - /// Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - /// Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. - /// Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - /// Keeps track of any properties unknown to the library. - internal UpdateToolResourcesOptions(UpdateCodeInterpreterToolResourceOptions codeInterpreter, UpdateFileSearchToolResourceOptions fileSearch, AzureAISearchResource azureAISearch, IDictionary serializedAdditionalRawData) - { - CodeInterpreter = codeInterpreter; - FileSearch = fileSearch; - AzureAISearch = azureAISearch; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - public UpdateCodeInterpreterToolResourceOptions CodeInterpreter { get; set; } - /// Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. - public UpdateFileSearchToolResourceOptions FileSearch { get; set; } - /// Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - public AzureAISearchResource AzureAISearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.Serialization.cs deleted file mode 100644 index 3dd10c637a6a..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.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.IO; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Projects -{ - internal partial class UploadFileRequest : 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(UploadFileRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("file"u8); - writer.WriteObjectValue(Data, options); - writer.WritePropertyName("purpose"u8); - writer.WriteStringValue(Purpose.ToString()); - if (Optional.IsDefined(Filename)) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - 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 - } - } - } - - UploadFileRequest 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(UploadFileRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUploadFileRequest(document.RootElement, options); - } - - internal static UploadFileRequest DeserializeUploadFileRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - File file = default; - AgentFilePurpose purpose = default; - string filename = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file"u8)) - { - file = File.DeserializeFile(property.Value, options); - continue; - } - if (property.NameEquals("purpose"u8)) - { - purpose = new AgentFilePurpose(property.Value.GetString()); - continue; - } - if (property.NameEquals("filename"u8)) - { - filename = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UploadFileRequest(file, purpose, filename, serializedAdditionalRawData); - } - - private BinaryData SerializeMultipart(ModelReaderWriterOptions options) - { - using MultipartFormDataRequestContent content = ToMultipartRequestContent(); - using MemoryStream stream = new MemoryStream(); - content.WriteTo(stream); - if (stream.Position > int.MaxValue) - { - return BinaryData.FromStream(stream); - } - else - { - return new BinaryData(stream.GetBuffer().AsMemory(0, (int)stream.Position)); - } - } - - 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, AzureAIProjectsContext.Default); - case "MFD": - return SerializeMultipart(options); - default: - throw new FormatException($"The model {nameof(UploadFileRequest)} does not support writing '{options.Format}' format."); - } - } - - UploadFileRequest 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 DeserializeUploadFileRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UploadFileRequest)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "MFD"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static UploadFileRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUploadFileRequest(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/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.cs deleted file mode 100644 index aea9f77b507d..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/UploadFileRequest.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.AI.Projects -{ - /// The UploadFileRequest. - internal partial class UploadFileRequest - { - /// - /// 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 file data, in bytes. - /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - /// is null. - public UploadFileRequest(File data, AgentFilePurpose purpose) - { - Argument.AssertNotNull(data, nameof(data)); - - Data = data; - Purpose = purpose; - } - - /// Initializes a new instance of . - /// The file data, in bytes. - /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - /// The name of the file. - /// Keeps track of any properties unknown to the library. - internal UploadFileRequest(File data, AgentFilePurpose purpose, string filename, IDictionary serializedAdditionalRawData) - { - Data = data; - Purpose = purpose; - Filename = filename; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal UploadFileRequest() - { - } - - /// The file data, in bytes. - public File Data { get; } - /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. - public AgentFilePurpose Purpose { get; } - /// The name of the file. - public string Filename { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs deleted file mode 100644 index 7b40e3394d1e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.Serialization.cs +++ /dev/null @@ -1,291 +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.Projects -{ - public partial class VectorStore : 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(VectorStore)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - writer.WritePropertyName("usage_bytes"u8); - writer.WriteNumberValue(UsageBytes); - writer.WritePropertyName("file_counts"u8); - writer.WriteObjectValue(FileCounts, options); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsDefined(ExpiresAfter)) - { - writer.WritePropertyName("expires_after"u8); - writer.WriteObjectValue(ExpiresAfter, options); - } - if (Optional.IsDefined(ExpiresAt)) - { - if (ExpiresAt != null) - { - writer.WritePropertyName("expires_at"u8); - writer.WriteNumberValue(ExpiresAt.Value, "U"); - } - else - { - writer.WriteNull("expires_at"); - } - } - if (LastActiveAt != null) - { - writer.WritePropertyName("last_active_at"u8); - writer.WriteNumberValue(LastActiveAt.Value, "U"); - } - else - { - writer.WriteNull("last_active_at"); - } - if (Metadata != null && Optional.IsCollectionDefined(Metadata)) - { - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - else - { - writer.WriteNull("metadata"); - } - 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 - } - } - } - - VectorStore 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(VectorStore)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStore(document.RootElement, options); - } - - internal static VectorStore DeserializeVectorStore(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - VectorStoreObject @object = default; - DateTimeOffset createdAt = default; - string name = default; - int usageBytes = default; - VectorStoreFileCount fileCounts = default; - VectorStoreStatus status = default; - VectorStoreExpirationPolicy expiresAfter = default; - DateTimeOffset? expiresAt = default; - DateTimeOffset? lastActiveAt = default; - IReadOnlyDictionary metadata = 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("object"u8)) - { - @object = new VectorStoreObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("usage_bytes"u8)) - { - usageBytes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("file_counts"u8)) - { - fileCounts = VectorStoreFileCount.DeserializeVectorStoreFileCount(property.Value, options); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new VectorStoreStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("expires_after"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - expiresAfter = VectorStoreExpirationPolicy.DeserializeVectorStoreExpirationPolicy(property.Value, options); - continue; - } - if (property.NameEquals("expires_at"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - expiresAt = null; - continue; - } - expiresAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("last_active_at"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastActiveAt = null; - continue; - } - lastActiveAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("metadata"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - metadata = new ChangeTrackingDictionary(); - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - metadata = dictionary; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStore( - id, - @object, - createdAt, - name, - usageBytes, - fileCounts, - status, - expiresAfter, - expiresAt, - lastActiveAt, - metadata, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStore)} does not support writing '{options.Format}' format."); - } - } - - VectorStore 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 DeserializeVectorStore(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStore)} 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 VectorStore FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStore(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/ai/Azure.AI.Projects/src/Generated/VectorStore.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.cs deleted file mode 100644 index c60dd6fffb48..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStore.cs +++ /dev/null @@ -1,132 +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.Projects -{ - /// A vector store is a collection of processed files can be used by the `file_search` tool. - public partial class VectorStore - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The Unix timestamp (in seconds) for when the vector store was created. - /// The name of the vector store. - /// The total number of bytes used by the files in the vector store. - /// Files count grouped by status processed or being processed by this vector store. - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. - /// The Unix timestamp (in seconds) for when the vector store was last active. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// , or is null. - internal VectorStore(string id, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCount fileCounts, VectorStoreStatus status, DateTimeOffset? lastActiveAt, IReadOnlyDictionary metadata) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(name, nameof(name)); - Argument.AssertNotNull(fileCounts, nameof(fileCounts)); - - Id = id; - CreatedAt = createdAt; - Name = name; - UsageBytes = usageBytes; - FileCounts = fileCounts; - Status = status; - LastActiveAt = lastActiveAt; - Metadata = metadata; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store`. - /// The Unix timestamp (in seconds) for when the vector store was created. - /// The name of the vector store. - /// The total number of bytes used by the files in the vector store. - /// Files count grouped by status processed or being processed by this vector store. - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. - /// Details on when this vector store expires. - /// The Unix timestamp (in seconds) for when the vector store will expire. - /// The Unix timestamp (in seconds) for when the vector store was last active. - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - /// Keeps track of any properties unknown to the library. - internal VectorStore(string id, VectorStoreObject @object, DateTimeOffset createdAt, string name, int usageBytes, VectorStoreFileCount fileCounts, VectorStoreStatus status, VectorStoreExpirationPolicy expiresAfter, DateTimeOffset? expiresAt, DateTimeOffset? lastActiveAt, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - CreatedAt = createdAt; - Name = name; - UsageBytes = usageBytes; - FileCounts = fileCounts; - Status = status; - ExpiresAfter = expiresAfter; - ExpiresAt = expiresAt; - LastActiveAt = lastActiveAt; - Metadata = metadata; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStore() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - /// The object type, which is always `vector_store`. - public VectorStoreObject Object { get; } = VectorStoreObject.VectorStore; - - /// The Unix timestamp (in seconds) for when the vector store was created. - public DateTimeOffset CreatedAt { get; } - /// The name of the vector store. - public string Name { get; } - /// The total number of bytes used by the files in the vector store. - public int UsageBytes { get; } - /// Files count grouped by status processed or being processed by this vector store. - public VectorStoreFileCount FileCounts { get; } - /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. - public VectorStoreStatus Status { get; } - /// Details on when this vector store expires. - public VectorStoreExpirationPolicy ExpiresAfter { get; } - /// The Unix timestamp (in seconds) for when the vector store will expire. - public DateTimeOffset? ExpiresAt { get; } - /// The Unix timestamp (in seconds) for when the vector store was last active. - public DateTimeOffset? LastActiveAt { get; } - /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. - public IReadOnlyDictionary Metadata { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs deleted file mode 100644 index 5827a2ccda26..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - public partial class VectorStoreAutoChunkingStrategyRequest : 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(VectorStoreAutoChunkingStrategyRequest)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - VectorStoreAutoChunkingStrategyRequest 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(VectorStoreAutoChunkingStrategyRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreAutoChunkingStrategyRequest(document.RootElement, options); - } - - internal static VectorStoreAutoChunkingStrategyRequest DeserializeVectorStoreAutoChunkingStrategyRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreChunkingStrategyRequestType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyRequestType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreAutoChunkingStrategyRequest(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreAutoChunkingStrategyRequest)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreAutoChunkingStrategyRequest 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 DeserializeVectorStoreAutoChunkingStrategyRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreAutoChunkingStrategyRequest)} 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 new VectorStoreAutoChunkingStrategyRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreAutoChunkingStrategyRequest(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.cs deleted file mode 100644 index eb0eaa3efb3c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyRequest.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// The default strategy. This strategy currently uses a max_chunk_size_tokens of 800 and chunk_overlap_tokens of 400. - public partial class VectorStoreAutoChunkingStrategyRequest : VectorStoreChunkingStrategyRequest - { - /// Initializes a new instance of . - public VectorStoreAutoChunkingStrategyRequest() - { - Type = VectorStoreChunkingStrategyRequestType.Auto; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal VectorStoreAutoChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs deleted file mode 100644 index 28c8fc243b8c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.Serialization.cs +++ /dev/null @@ -1,126 +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.Projects -{ - public partial class VectorStoreAutoChunkingStrategyResponse : 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(VectorStoreAutoChunkingStrategyResponse)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - } - - VectorStoreAutoChunkingStrategyResponse 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(VectorStoreAutoChunkingStrategyResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreAutoChunkingStrategyResponse(document.RootElement, options); - } - - internal static VectorStoreAutoChunkingStrategyResponse DeserializeVectorStoreAutoChunkingStrategyResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreChunkingStrategyResponseType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyResponseType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreAutoChunkingStrategyResponse(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreAutoChunkingStrategyResponse)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreAutoChunkingStrategyResponse 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 DeserializeVectorStoreAutoChunkingStrategyResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreAutoChunkingStrategyResponse)} 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 new VectorStoreAutoChunkingStrategyResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreAutoChunkingStrategyResponse(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.cs deleted file mode 100644 index d4911fb0201f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreAutoChunkingStrategyResponse.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the chunking_strategy concept was introduced in the API. - public partial class VectorStoreAutoChunkingStrategyResponse : VectorStoreChunkingStrategyResponse - { - /// Initializes a new instance of . - internal VectorStoreAutoChunkingStrategyResponse() - { - Type = VectorStoreChunkingStrategyResponseType.Other; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal VectorStoreAutoChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) - { - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs deleted file mode 100644 index 53108bd09669..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownVectorStoreChunkingStrategyRequest))] - public partial class VectorStoreChunkingStrategyRequest : 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(VectorStoreChunkingStrategyRequest)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - VectorStoreChunkingStrategyRequest 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(VectorStoreChunkingStrategyRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreChunkingStrategyRequest(document.RootElement, options); - } - - internal static VectorStoreChunkingStrategyRequest DeserializeVectorStoreChunkingStrategyRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "auto": return VectorStoreAutoChunkingStrategyRequest.DeserializeVectorStoreAutoChunkingStrategyRequest(element, options); - case "static": return VectorStoreStaticChunkingStrategyRequest.DeserializeVectorStoreStaticChunkingStrategyRequest(element, options); - } - } - return UnknownVectorStoreChunkingStrategyRequest.DeserializeUnknownVectorStoreChunkingStrategyRequest(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyRequest)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreChunkingStrategyRequest 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 DeserializeVectorStoreChunkingStrategyRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyRequest)} 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 VectorStoreChunkingStrategyRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreChunkingStrategyRequest(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/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.cs deleted file mode 100644 index 3b63e8825cd6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequest.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.AI.Projects -{ - /// - /// An abstract representation of a vector store chunking strategy configuration. - /// 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 abstract partial class VectorStoreChunkingStrategyRequest - { - /// - /// 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 VectorStoreChunkingStrategyRequest() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal VectorStoreChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal VectorStoreChunkingStrategyRequestType Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.cs deleted file mode 100644 index 225312c10cf2..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyRequestType.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.AI.Projects -{ - /// Type of chunking strategy. - internal readonly partial struct VectorStoreChunkingStrategyRequestType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreChunkingStrategyRequestType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string AutoValue = "auto"; - private const string StaticValue = "static"; - - /// auto. - public static VectorStoreChunkingStrategyRequestType Auto { get; } = new VectorStoreChunkingStrategyRequestType(AutoValue); - /// static. - public static VectorStoreChunkingStrategyRequestType Static { get; } = new VectorStoreChunkingStrategyRequestType(StaticValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreChunkingStrategyRequestType left, VectorStoreChunkingStrategyRequestType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreChunkingStrategyRequestType left, VectorStoreChunkingStrategyRequestType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreChunkingStrategyRequestType(string value) => new VectorStoreChunkingStrategyRequestType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreChunkingStrategyRequestType other && Equals(other); - /// - public bool Equals(VectorStoreChunkingStrategyRequestType 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.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs deleted file mode 100644 index 586dacfd8568..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.Serialization.cs +++ /dev/null @@ -1,134 +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 Azure.Core; - -namespace Azure.AI.Projects -{ - [PersistableModelProxy(typeof(UnknownVectorStoreChunkingStrategyResponse))] - public partial class VectorStoreChunkingStrategyResponse : 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(VectorStoreChunkingStrategyResponse)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type.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 - } - } - } - - VectorStoreChunkingStrategyResponse 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(VectorStoreChunkingStrategyResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreChunkingStrategyResponse(document.RootElement, options); - } - - internal static VectorStoreChunkingStrategyResponse DeserializeVectorStoreChunkingStrategyResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - if (element.TryGetProperty("type", out JsonElement discriminator)) - { - switch (discriminator.GetString()) - { - case "other": return VectorStoreAutoChunkingStrategyResponse.DeserializeVectorStoreAutoChunkingStrategyResponse(element, options); - case "static": return VectorStoreStaticChunkingStrategyResponse.DeserializeVectorStoreStaticChunkingStrategyResponse(element, options); - } - } - return UnknownVectorStoreChunkingStrategyResponse.DeserializeUnknownVectorStoreChunkingStrategyResponse(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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyResponse)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreChunkingStrategyResponse 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 DeserializeVectorStoreChunkingStrategyResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreChunkingStrategyResponse)} 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 VectorStoreChunkingStrategyResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreChunkingStrategyResponse(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/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.cs deleted file mode 100644 index 66997d497a2b..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponse.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.AI.Projects -{ - /// - /// An abstract representation of a vector store chunking strategy configuration. - /// 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 abstract partial class VectorStoreChunkingStrategyResponse - { - /// - /// 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 VectorStoreChunkingStrategyResponse() - { - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - internal VectorStoreChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType type, IDictionary serializedAdditionalRawData) - { - Type = type; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// The object type. - internal VectorStoreChunkingStrategyResponseType Type { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.cs deleted file mode 100644 index af95ef419660..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreChunkingStrategyResponseType.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.AI.Projects -{ - /// Type of chunking strategy. - internal readonly partial struct VectorStoreChunkingStrategyResponseType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreChunkingStrategyResponseType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string OtherValue = "other"; - private const string StaticValue = "static"; - - /// other. - public static VectorStoreChunkingStrategyResponseType Other { get; } = new VectorStoreChunkingStrategyResponseType(OtherValue); - /// static. - public static VectorStoreChunkingStrategyResponseType Static { get; } = new VectorStoreChunkingStrategyResponseType(StaticValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreChunkingStrategyResponseType left, VectorStoreChunkingStrategyResponseType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreChunkingStrategyResponseType left, VectorStoreChunkingStrategyResponseType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreChunkingStrategyResponseType(string value) => new VectorStoreChunkingStrategyResponseType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreChunkingStrategyResponseType other && Equals(other); - /// - public bool Equals(VectorStoreChunkingStrategyResponseType 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.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs deleted file mode 100644 index c3efaf8d003f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.Serialization.cs +++ /dev/null @@ -1,152 +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.Projects -{ - public partial class VectorStoreConfiguration : 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(VectorStoreConfiguration)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("data_sources"u8); - writer.WriteStartArray(); - foreach (var item in DataSources) - { - 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 - } - } - } - - VectorStoreConfiguration 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(VectorStoreConfiguration)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreConfiguration(document.RootElement, options); - } - - internal static VectorStoreConfiguration DeserializeVectorStoreConfiguration(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList dataSources = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("data_sources"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(VectorStoreDataSource.DeserializeVectorStoreDataSource(item, options)); - } - dataSources = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreConfiguration(dataSources, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreConfiguration)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreConfiguration 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 DeserializeVectorStoreConfiguration(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreConfiguration)} 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 VectorStoreConfiguration FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreConfiguration(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/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs deleted file mode 100644 index 21d41af59f98..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfiguration.cs +++ /dev/null @@ -1,79 +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.Projects -{ - /// - /// Vector storage configuration is the list of data sources, used when multiple - /// files can be used for the enterprise file search. - /// - public partial class VectorStoreConfiguration - { - /// - /// 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 . - /// Data sources. - /// is null. - public VectorStoreConfiguration(IEnumerable dataSources) - { - Argument.AssertNotNull(dataSources, nameof(dataSources)); - - DataSources = dataSources.ToList(); - } - - /// Initializes a new instance of . - /// Data sources. - /// Keeps track of any properties unknown to the library. - internal VectorStoreConfiguration(IList dataSources, IDictionary serializedAdditionalRawData) - { - DataSources = dataSources; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreConfiguration() - { - } - - /// Data sources. - public IList DataSources { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs deleted file mode 100644 index d19e2ee2d10e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class VectorStoreConfigurations : 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(VectorStoreConfigurations)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("name"u8); - writer.WriteStringValue(StoreName); - writer.WritePropertyName("configuration"u8); - writer.WriteObjectValue(StoreConfiguration, 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 - } - } - } - - VectorStoreConfigurations 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(VectorStoreConfigurations)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreConfigurations(document.RootElement, options); - } - - internal static VectorStoreConfigurations DeserializeVectorStoreConfigurations(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string name = default; - VectorStoreConfiguration configuration = 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("configuration"u8)) - { - configuration = VectorStoreConfiguration.DeserializeVectorStoreConfiguration(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreConfigurations(name, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreConfigurations)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreConfigurations 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 DeserializeVectorStoreConfigurations(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreConfigurations)} 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 VectorStoreConfigurations FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreConfigurations(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/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs deleted file mode 100644 index f03ceff86442..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreConfigurations.cs +++ /dev/null @@ -1,82 +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.Projects -{ - /// The structure, containing the list of vector storage configurations i.e. the list of azure asset IDs. - public partial class VectorStoreConfigurations - { - /// - /// 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. - /// Configurations. - /// or is null. - public VectorStoreConfigurations(string storeName, VectorStoreConfiguration storeConfiguration) - { - Argument.AssertNotNull(storeName, nameof(storeName)); - Argument.AssertNotNull(storeConfiguration, nameof(storeConfiguration)); - - StoreName = storeName; - StoreConfiguration = storeConfiguration; - } - - /// Initializes a new instance of . - /// Name. - /// Configurations. - /// Keeps track of any properties unknown to the library. - internal VectorStoreConfigurations(string storeName, VectorStoreConfiguration storeConfiguration, IDictionary serializedAdditionalRawData) - { - StoreName = storeName; - StoreConfiguration = storeConfiguration; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreConfigurations() - { - } - - /// Name. - public string StoreName { get; set; } - /// Configurations. - public VectorStoreConfiguration StoreConfiguration { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs deleted file mode 100644 index d2e310b499de..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class VectorStoreDataSource : 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(VectorStoreDataSource)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("uri"u8); - writer.WriteStringValue(AssetIdentifier); - writer.WritePropertyName("type"u8); - writer.WriteStringValue(AssetType.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 - } - } - } - - VectorStoreDataSource 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(VectorStoreDataSource)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreDataSource(document.RootElement, options); - } - - internal static VectorStoreDataSource DeserializeVectorStoreDataSource(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string uri = default; - VectorStoreDataSourceAssetType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("uri"u8)) - { - uri = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new VectorStoreDataSourceAssetType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreDataSource(uri, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreDataSource)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreDataSource 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 DeserializeVectorStoreDataSource(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreDataSource)} 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 VectorStoreDataSource FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreDataSource(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/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs deleted file mode 100644 index 5752d96eef2f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSource.cs +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// - /// The structure, containing Azure asset URI path and the asset type of the file used as a data source - /// for the enterprise file search. - /// - public partial class VectorStoreDataSource - { - /// - /// 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 . - /// Asset URI. - /// The asset type. - /// is null. - public VectorStoreDataSource(string assetIdentifier, VectorStoreDataSourceAssetType assetType) - { - Argument.AssertNotNull(assetIdentifier, nameof(assetIdentifier)); - - AssetIdentifier = assetIdentifier; - AssetType = assetType; - } - - /// Initializes a new instance of . - /// Asset URI. - /// The asset type. - /// Keeps track of any properties unknown to the library. - internal VectorStoreDataSource(string assetIdentifier, VectorStoreDataSourceAssetType assetType, IDictionary serializedAdditionalRawData) - { - AssetIdentifier = assetIdentifier; - AssetType = assetType; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreDataSource() - { - } - - /// Asset URI. - public string AssetIdentifier { get; set; } - /// The asset type. - public VectorStoreDataSourceAssetType AssetType { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs deleted file mode 100644 index 8a121dac0aef..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDataSourceAssetType.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// - /// Type of vector storage asset. Asset type may be a uri_asset, in this case it should contain asset URI ID, - /// in the case of id_asset it should contain the data ID. - /// - public readonly partial struct VectorStoreDataSourceAssetType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreDataSourceAssetType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UriAssetValue = "uri_asset"; - private const string IdAssetValue = "id_asset"; - - /// Azure URI. - public static VectorStoreDataSourceAssetType UriAsset { get; } = new VectorStoreDataSourceAssetType(UriAssetValue); - /// The data ID. - public static VectorStoreDataSourceAssetType IdAsset { get; } = new VectorStoreDataSourceAssetType(IdAssetValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreDataSourceAssetType left, VectorStoreDataSourceAssetType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreDataSourceAssetType left, VectorStoreDataSourceAssetType right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreDataSourceAssetType(string value) => new VectorStoreDataSourceAssetType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreDataSourceAssetType other && Equals(other); - /// - public bool Equals(VectorStoreDataSourceAssetType 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.Projects/src/Generated/VectorStoreDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.Serialization.cs deleted file mode 100644 index ea7f7daf1464..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.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.Projects -{ - public partial class VectorStoreDeletionStatus : 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(VectorStoreDeletionStatus)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.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 - } - } - } - - VectorStoreDeletionStatus 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(VectorStoreDeletionStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreDeletionStatus(document.RootElement, options); - } - - internal static VectorStoreDeletionStatus DeserializeVectorStoreDeletionStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - bool deleted = default; - VectorStoreDeletionStatusObject @object = 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("deleted"u8)) - { - deleted = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new VectorStoreDeletionStatusObject(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreDeletionStatus(id, deleted, @object, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreDeletionStatus)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreDeletionStatus 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 DeserializeVectorStoreDeletionStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreDeletionStatus)} 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 VectorStoreDeletionStatus FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreDeletionStatus(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/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.cs deleted file mode 100644 index 321e74552779..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatus.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.AI.Projects -{ - /// Response object for deleting a vector store. - public partial class VectorStoreDeletionStatus - { - /// - /// 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 resource specified for deletion. - /// A value indicating whether deletion was successful. - /// is null. - internal VectorStoreDeletionStatus(string id, bool deleted) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - Deleted = deleted; - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// Keeps track of any properties unknown to the library. - internal VectorStoreDeletionStatus(string id, bool deleted, VectorStoreDeletionStatusObject @object, IDictionary serializedAdditionalRawData) - { - Id = id; - Deleted = deleted; - Object = @object; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreDeletionStatus() - { - } - - /// The ID of the resource specified for deletion. - public string Id { get; } - /// A value indicating whether deletion was successful. - public bool Deleted { get; } - /// The object type, which is always 'vector_store.deleted'. - public VectorStoreDeletionStatusObject Object { get; } = VectorStoreDeletionStatusObject.VectorStoreDeleted; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs deleted file mode 100644 index 3390947ca448..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreDeletionStatusObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The VectorStoreDeletionStatus_object. - public readonly partial struct VectorStoreDeletionStatusObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreDeletionStatusObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorStoreDeletedValue = "vector_store.deleted"; - - /// vector_store.deleted. - public static VectorStoreDeletionStatusObject VectorStoreDeleted { get; } = new VectorStoreDeletionStatusObject(VectorStoreDeletedValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreDeletionStatusObject left, VectorStoreDeletionStatusObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreDeletionStatusObject left, VectorStoreDeletionStatusObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreDeletionStatusObject(string value) => new VectorStoreDeletionStatusObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreDeletionStatusObject other && Equals(other); - /// - public bool Equals(VectorStoreDeletionStatusObject 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.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs deleted file mode 100644 index 0c56e4fcd77c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class VectorStoreExpirationPolicy : 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(VectorStoreExpirationPolicy)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("anchor"u8); - writer.WriteStringValue(Anchor.ToString()); - writer.WritePropertyName("days"u8); - writer.WriteNumberValue(Days); - 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 - } - } - } - - VectorStoreExpirationPolicy 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(VectorStoreExpirationPolicy)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreExpirationPolicy(document.RootElement, options); - } - - internal static VectorStoreExpirationPolicy DeserializeVectorStoreExpirationPolicy(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreExpirationPolicyAnchor anchor = default; - int days = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("anchor"u8)) - { - anchor = new VectorStoreExpirationPolicyAnchor(property.Value.GetString()); - continue; - } - if (property.NameEquals("days"u8)) - { - days = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreExpirationPolicy(anchor, days, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreExpirationPolicy 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 DeserializeVectorStoreExpirationPolicy(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreExpirationPolicy)} 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 VectorStoreExpirationPolicy FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreExpirationPolicy(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/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.cs deleted file mode 100644 index 3db18fe4a917..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicy.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.AI.Projects -{ - /// The expiration policy for a vector store. - public partial class VectorStoreExpirationPolicy - { - /// - /// 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 . - /// Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. - /// The anchor timestamp after which the expiration policy applies. - public VectorStoreExpirationPolicy(VectorStoreExpirationPolicyAnchor anchor, int days) - { - Anchor = anchor; - Days = days; - } - - /// Initializes a new instance of . - /// Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. - /// The anchor timestamp after which the expiration policy applies. - /// Keeps track of any properties unknown to the library. - internal VectorStoreExpirationPolicy(VectorStoreExpirationPolicyAnchor anchor, int days, IDictionary serializedAdditionalRawData) - { - Anchor = anchor; - Days = days; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreExpirationPolicy() - { - } - - /// Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`. - public VectorStoreExpirationPolicyAnchor Anchor { get; set; } - /// The anchor timestamp after which the expiration policy applies. - public int Days { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs deleted file mode 100644 index 1bf85570a885..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreExpirationPolicyAnchor.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Describes the relationship between the days and the expiration of this vector store. - public readonly partial struct VectorStoreExpirationPolicyAnchor : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreExpirationPolicyAnchor(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string LastActiveAtValue = "last_active_at"; - - /// The expiration policy is based on the last time the vector store was active. - public static VectorStoreExpirationPolicyAnchor LastActiveAt { get; } = new VectorStoreExpirationPolicyAnchor(LastActiveAtValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreExpirationPolicyAnchor left, VectorStoreExpirationPolicyAnchor right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreExpirationPolicyAnchor left, VectorStoreExpirationPolicyAnchor right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreExpirationPolicyAnchor(string value) => new VectorStoreExpirationPolicyAnchor(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreExpirationPolicyAnchor other && Equals(other); - /// - public bool Equals(VectorStoreExpirationPolicyAnchor 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.Projects/src/Generated/VectorStoreFile.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.Serialization.cs deleted file mode 100644 index 53215be55eaf..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.Serialization.cs +++ /dev/null @@ -1,219 +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.Projects -{ - public partial class VectorStoreFile : 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(VectorStoreFile)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("usage_bytes"u8); - writer.WriteNumberValue(UsageBytes); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("vector_store_id"u8); - writer.WriteStringValue(VectorStoreId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (LastError != null) - { - writer.WritePropertyName("last_error"u8); - writer.WriteObjectValue(LastError, options); - } - else - { - writer.WriteNull("last_error"); - } - writer.WritePropertyName("chunking_strategy"u8); - writer.WriteObjectValue(ChunkingStrategy, 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 - } - } - } - - VectorStoreFile 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(VectorStoreFile)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreFile(document.RootElement, options); - } - - internal static VectorStoreFile DeserializeVectorStoreFile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - VectorStoreFileObject @object = default; - int usageBytes = default; - DateTimeOffset createdAt = default; - string vectorStoreId = default; - VectorStoreFileStatus status = default; - VectorStoreFileError lastError = default; - VectorStoreChunkingStrategyResponse chunkingStrategy = 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("object"u8)) - { - @object = new VectorStoreFileObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("usage_bytes"u8)) - { - usageBytes = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("vector_store_id"u8)) - { - vectorStoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new VectorStoreFileStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("last_error"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - lastError = null; - continue; - } - lastError = VectorStoreFileError.DeserializeVectorStoreFileError(property.Value, options); - continue; - } - if (property.NameEquals("chunking_strategy"u8)) - { - chunkingStrategy = VectorStoreChunkingStrategyResponse.DeserializeVectorStoreChunkingStrategyResponse(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreFile( - id, - @object, - usageBytes, - createdAt, - vectorStoreId, - status, - lastError, - chunkingStrategy, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreFile)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreFile 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 DeserializeVectorStoreFile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreFile)} 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 VectorStoreFile FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreFile(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/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs deleted file mode 100644 index 951239eb4d06..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFile.cs +++ /dev/null @@ -1,139 +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.Projects -{ - /// Description of a file attached to a vector store. - public partial class VectorStoreFile - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// - /// The total vector store usage in bytes. Note that this may be different from the original file - /// size. - /// - /// The Unix timestamp (in seconds) for when the vector store file was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - /// The last error associated with this vector store file. Will be `null` if there are no errors. - /// - /// The strategy used to chunk the file. - /// 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. - internal VectorStoreFile(string id, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileStatus status, VectorStoreFileError lastError, VectorStoreChunkingStrategyResponse chunkingStrategy) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(chunkingStrategy, nameof(chunkingStrategy)); - - Id = id; - UsageBytes = usageBytes; - CreatedAt = createdAt; - VectorStoreId = vectorStoreId; - Status = status; - LastError = lastError; - ChunkingStrategy = chunkingStrategy; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file`. - /// - /// The total vector store usage in bytes. Note that this may be different from the original file - /// size. - /// - /// The Unix timestamp (in seconds) for when the vector store file was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - /// The last error associated with this vector store file. Will be `null` if there are no errors. - /// - /// The strategy used to chunk the file. - /// 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 . - /// - /// Keeps track of any properties unknown to the library. - internal VectorStoreFile(string id, VectorStoreFileObject @object, int usageBytes, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileStatus status, VectorStoreFileError lastError, VectorStoreChunkingStrategyResponse chunkingStrategy, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - UsageBytes = usageBytes; - CreatedAt = createdAt; - VectorStoreId = vectorStoreId; - Status = status; - LastError = lastError; - ChunkingStrategy = chunkingStrategy; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreFile() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - /// The object type, which is always `vector_store.file`. - public VectorStoreFileObject Object { get; } = VectorStoreFileObject.VectorStoreFile; - - /// - /// The total vector store usage in bytes. Note that this may be different from the original file - /// size. - /// - public int UsageBytes { get; } - /// The Unix timestamp (in seconds) for when the vector store file was created. - public DateTimeOffset CreatedAt { get; } - /// The ID of the vector store that the file is attached to. - public string VectorStoreId { get; } - /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use. - public VectorStoreFileStatus Status { get; } - /// The last error associated with this vector store file. Will be `null` if there are no errors. - public VectorStoreFileError LastError { get; } - /// - /// The strategy used to chunk the file. - /// 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 VectorStoreChunkingStrategyResponse ChunkingStrategy { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs deleted file mode 100644 index e0642ce6bcd6..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.Serialization.cs +++ /dev/null @@ -1,189 +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.Projects -{ - public partial class VectorStoreFileBatch : 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(VectorStoreFileBatch)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("created_at"u8); - writer.WriteNumberValue(CreatedAt, "U"); - writer.WritePropertyName("vector_store_id"u8); - writer.WriteStringValue(VectorStoreId); - writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - writer.WritePropertyName("file_counts"u8); - writer.WriteObjectValue(FileCounts, 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 - } - } - } - - VectorStoreFileBatch 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(VectorStoreFileBatch)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreFileBatch(document.RootElement, options); - } - - internal static VectorStoreFileBatch DeserializeVectorStoreFileBatch(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - VectorStoreFileBatchObject @object = default; - DateTimeOffset createdAt = default; - string vectorStoreId = default; - VectorStoreFileBatchStatus status = default; - VectorStoreFileCount fileCounts = 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("object"u8)) - { - @object = new VectorStoreFileBatchObject(property.Value.GetString()); - continue; - } - if (property.NameEquals("created_at"u8)) - { - createdAt = DateTimeOffset.FromUnixTimeSeconds(property.Value.GetInt64()); - continue; - } - if (property.NameEquals("vector_store_id"u8)) - { - vectorStoreId = property.Value.GetString(); - continue; - } - if (property.NameEquals("status"u8)) - { - status = new VectorStoreFileBatchStatus(property.Value.GetString()); - continue; - } - if (property.NameEquals("file_counts"u8)) - { - fileCounts = VectorStoreFileCount.DeserializeVectorStoreFileCount(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreFileBatch( - id, - @object, - createdAt, - vectorStoreId, - status, - fileCounts, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreFileBatch)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreFileBatch 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 DeserializeVectorStoreFileBatch(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreFileBatch)} 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 VectorStoreFileBatch FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreFileBatch(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/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs deleted file mode 100644 index 88ff32d39ded..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatch.cs +++ /dev/null @@ -1,106 +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.Projects -{ - /// A batch of files attached to a vector store. - public partial class VectorStoreFileBatch - { - /// - /// 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 identifier, which can be referenced in API endpoints. - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. - /// Files count grouped by status processed or being processed by this vector store. - /// , or is null. - internal VectorStoreFileBatch(string id, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileBatchStatus status, VectorStoreFileCount fileCounts) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(vectorStoreId, nameof(vectorStoreId)); - Argument.AssertNotNull(fileCounts, nameof(fileCounts)); - - Id = id; - CreatedAt = createdAt; - VectorStoreId = vectorStoreId; - Status = status; - FileCounts = fileCounts; - } - - /// Initializes a new instance of . - /// The identifier, which can be referenced in API endpoints. - /// The object type, which is always `vector_store.file_batch`. - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - /// The ID of the vector store that the file is attached to. - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. - /// Files count grouped by status processed or being processed by this vector store. - /// Keeps track of any properties unknown to the library. - internal VectorStoreFileBatch(string id, VectorStoreFileBatchObject @object, DateTimeOffset createdAt, string vectorStoreId, VectorStoreFileBatchStatus status, VectorStoreFileCount fileCounts, IDictionary serializedAdditionalRawData) - { - Id = id; - Object = @object; - CreatedAt = createdAt; - VectorStoreId = vectorStoreId; - Status = status; - FileCounts = fileCounts; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreFileBatch() - { - } - - /// The identifier, which can be referenced in API endpoints. - public string Id { get; } - /// The object type, which is always `vector_store.file_batch`. - public VectorStoreFileBatchObject Object { get; } = VectorStoreFileBatchObject.VectorStoreFilesBatch; - - /// The Unix timestamp (in seconds) for when the vector store files batch was created. - public DateTimeOffset CreatedAt { get; } - /// The ID of the vector store that the file is attached to. - public string VectorStoreId { get; } - /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`. - public VectorStoreFileBatchStatus Status { get; } - /// Files count grouped by status processed or being processed by this vector store. - public VectorStoreFileCount FileCounts { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs deleted file mode 100644 index 5e0f2c56022f..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The VectorStoreFileBatch_object. - public readonly partial struct VectorStoreFileBatchObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileBatchObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorStoreFilesBatchValue = "vector_store.files_batch"; - - /// vector_store.files_batch. - public static VectorStoreFileBatchObject VectorStoreFilesBatch { get; } = new VectorStoreFileBatchObject(VectorStoreFilesBatchValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileBatchObject left, VectorStoreFileBatchObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileBatchObject left, VectorStoreFileBatchObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileBatchObject(string value) => new VectorStoreFileBatchObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileBatchObject other && Equals(other); - /// - public bool Equals(VectorStoreFileBatchObject 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.Projects/src/Generated/VectorStoreFileBatchStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchStatus.cs deleted file mode 100644 index fc774681056e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileBatchStatus.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.AI.Projects -{ - /// The status of the vector store file batch. - public readonly partial struct VectorStoreFileBatchStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileBatchStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string CancelledValue = "cancelled"; - private const string FailedValue = "failed"; - - /// The vector store is still processing this file batch. - public static VectorStoreFileBatchStatus InProgress { get; } = new VectorStoreFileBatchStatus(InProgressValue); - /// the vector store file batch is ready for use. - public static VectorStoreFileBatchStatus Completed { get; } = new VectorStoreFileBatchStatus(CompletedValue); - /// The vector store file batch was cancelled. - public static VectorStoreFileBatchStatus Cancelled { get; } = new VectorStoreFileBatchStatus(CancelledValue); - /// The vector store file batch failed to process. - public static VectorStoreFileBatchStatus Failed { get; } = new VectorStoreFileBatchStatus(FailedValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileBatchStatus left, VectorStoreFileBatchStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileBatchStatus left, VectorStoreFileBatchStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileBatchStatus(string value) => new VectorStoreFileBatchStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileBatchStatus other && Equals(other); - /// - public bool Equals(VectorStoreFileBatchStatus 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.Projects/src/Generated/VectorStoreFileCount.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.Serialization.cs deleted file mode 100644 index 220476d03216..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.Serialization.cs +++ /dev/null @@ -1,180 +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.Projects -{ - public partial class VectorStoreFileCount : 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(VectorStoreFileCount)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("in_progress"u8); - writer.WriteNumberValue(InProgress); - writer.WritePropertyName("completed"u8); - writer.WriteNumberValue(Completed); - writer.WritePropertyName("failed"u8); - writer.WriteNumberValue(Failed); - writer.WritePropertyName("cancelled"u8); - writer.WriteNumberValue(Cancelled); - writer.WritePropertyName("total"u8); - writer.WriteNumberValue(Total); - 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 - } - } - } - - VectorStoreFileCount 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(VectorStoreFileCount)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreFileCount(document.RootElement, options); - } - - internal static VectorStoreFileCount DeserializeVectorStoreFileCount(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int inProgress = default; - int completed = default; - int failed = default; - int cancelled = default; - int total = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("in_progress"u8)) - { - inProgress = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("completed"u8)) - { - completed = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("failed"u8)) - { - failed = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("cancelled"u8)) - { - cancelled = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("total"u8)) - { - total = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreFileCount( - inProgress, - completed, - failed, - cancelled, - total, - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreFileCount)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreFileCount 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 DeserializeVectorStoreFileCount(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreFileCount)} 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 VectorStoreFileCount FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreFileCount(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/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.cs deleted file mode 100644 index c80206511a02..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileCount.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.AI.Projects -{ - /// Counts of files processed or being processed by this vector store grouped by status. - public partial class VectorStoreFileCount - { - /// - /// 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 number of files that are currently being processed. - /// The number of files that have been successfully processed. - /// The number of files that have failed to process. - /// The number of files that were cancelled. - /// The total number of files. - internal VectorStoreFileCount(int inProgress, int completed, int failed, int cancelled, int total) - { - InProgress = inProgress; - Completed = completed; - Failed = failed; - Cancelled = cancelled; - Total = total; - } - - /// Initializes a new instance of . - /// The number of files that are currently being processed. - /// The number of files that have been successfully processed. - /// The number of files that have failed to process. - /// The number of files that were cancelled. - /// The total number of files. - /// Keeps track of any properties unknown to the library. - internal VectorStoreFileCount(int inProgress, int completed, int failed, int cancelled, int total, IDictionary serializedAdditionalRawData) - { - InProgress = inProgress; - Completed = completed; - Failed = failed; - Cancelled = cancelled; - Total = total; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreFileCount() - { - } - - /// The number of files that are currently being processed. - public int InProgress { get; } - /// The number of files that have been successfully processed. - public int Completed { get; } - /// The number of files that have failed to process. - public int Failed { get; } - /// The number of files that were cancelled. - public int Cancelled { get; } - /// The total number of files. - public int Total { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.Serialization.cs deleted file mode 100644 index 84760f60ae97..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.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.Projects -{ - public partial class VectorStoreFileDeletionStatus : 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(VectorStoreFileDeletionStatus)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - writer.WritePropertyName("deleted"u8); - writer.WriteBooleanValue(Deleted); - writer.WritePropertyName("object"u8); - writer.WriteStringValue(Object.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 - } - } - } - - VectorStoreFileDeletionStatus 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(VectorStoreFileDeletionStatus)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreFileDeletionStatus(document.RootElement, options); - } - - internal static VectorStoreFileDeletionStatus DeserializeVectorStoreFileDeletionStatus(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string id = default; - bool deleted = default; - VectorStoreFileDeletionStatusObject @object = 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("deleted"u8)) - { - deleted = property.Value.GetBoolean(); - continue; - } - if (property.NameEquals("object"u8)) - { - @object = new VectorStoreFileDeletionStatusObject(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreFileDeletionStatus(id, deleted, @object, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreFileDeletionStatus)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreFileDeletionStatus 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 DeserializeVectorStoreFileDeletionStatus(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreFileDeletionStatus)} 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 VectorStoreFileDeletionStatus FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreFileDeletionStatus(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/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.cs deleted file mode 100644 index 482e595895bd..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatus.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.AI.Projects -{ - /// Response object for deleting a vector store file relationship. - public partial class VectorStoreFileDeletionStatus - { - /// - /// 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 resource specified for deletion. - /// A value indicating whether deletion was successful. - /// is null. - internal VectorStoreFileDeletionStatus(string id, bool deleted) - { - Argument.AssertNotNull(id, nameof(id)); - - Id = id; - Deleted = deleted; - } - - /// Initializes a new instance of . - /// The ID of the resource specified for deletion. - /// A value indicating whether deletion was successful. - /// The object type, which is always 'vector_store.deleted'. - /// Keeps track of any properties unknown to the library. - internal VectorStoreFileDeletionStatus(string id, bool deleted, VectorStoreFileDeletionStatusObject @object, IDictionary serializedAdditionalRawData) - { - Id = id; - Deleted = deleted; - Object = @object; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreFileDeletionStatus() - { - } - - /// The ID of the resource specified for deletion. - public string Id { get; } - /// A value indicating whether deletion was successful. - public bool Deleted { get; } - /// The object type, which is always 'vector_store.deleted'. - public VectorStoreFileDeletionStatusObject Object { get; } = VectorStoreFileDeletionStatusObject.VectorStoreFileDeleted; - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs deleted file mode 100644 index e504fb729bcc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileDeletionStatusObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The VectorStoreFileDeletionStatus_object. - public readonly partial struct VectorStoreFileDeletionStatusObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileDeletionStatusObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorStoreFileDeletedValue = "vector_store.file.deleted"; - - /// vector_store.file.deleted. - public static VectorStoreFileDeletionStatusObject VectorStoreFileDeleted { get; } = new VectorStoreFileDeletionStatusObject(VectorStoreFileDeletedValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileDeletionStatusObject left, VectorStoreFileDeletionStatusObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileDeletionStatusObject left, VectorStoreFileDeletionStatusObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileDeletionStatusObject(string value) => new VectorStoreFileDeletionStatusObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileDeletionStatusObject other && Equals(other); - /// - public bool Equals(VectorStoreFileDeletionStatusObject 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.Projects/src/Generated/VectorStoreFileError.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.Serialization.cs deleted file mode 100644 index 83acd520401c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class VectorStoreFileError : 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(VectorStoreFileError)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("code"u8); - writer.WriteStringValue(Code.ToString()); - 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 - } - } - } - - VectorStoreFileError 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(VectorStoreFileError)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreFileError(document.RootElement, options); - } - - internal static VectorStoreFileError DeserializeVectorStoreFileError(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreFileErrorCode code = default; - string message = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code"u8)) - { - code = new VectorStoreFileErrorCode(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 VectorStoreFileError(code, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreFileError)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreFileError 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 DeserializeVectorStoreFileError(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreFileError)} 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 VectorStoreFileError FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreFileError(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/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs deleted file mode 100644 index 05eefeb61296..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileError.cs +++ /dev/null @@ -1,81 +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.Projects -{ - /// Details on the error that may have occurred while processing a file for this vector store. - public partial class VectorStoreFileError - { - /// - /// 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 . - /// One of `server_error` or `rate_limit_exceeded`. - /// A human-readable description of the error. - /// is null. - internal VectorStoreFileError(VectorStoreFileErrorCode code, string message) - { - Argument.AssertNotNull(message, nameof(message)); - - Code = code; - Message = message; - } - - /// Initializes a new instance of . - /// One of `server_error` or `rate_limit_exceeded`. - /// A human-readable description of the error. - /// Keeps track of any properties unknown to the library. - internal VectorStoreFileError(VectorStoreFileErrorCode code, string message, IDictionary serializedAdditionalRawData) - { - Code = code; - Message = message; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreFileError() - { - } - - /// One of `server_error` or `rate_limit_exceeded`. - public VectorStoreFileErrorCode Code { get; } - /// A human-readable description of the error. - public string Message { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs deleted file mode 100644 index 1c57f06e4aa8..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileErrorCode.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Error code variants for vector store file processing. - public readonly partial struct VectorStoreFileErrorCode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileErrorCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ServerErrorValue = "server_error"; - private const string InvalidFileValue = "invalid_file"; - private const string UnsupportedFileValue = "unsupported_file"; - - /// An server error occurred. - public static VectorStoreFileErrorCode ServerError { get; } = new VectorStoreFileErrorCode(ServerErrorValue); - /// The file is not valid. - public static VectorStoreFileErrorCode InvalidFile { get; } = new VectorStoreFileErrorCode(InvalidFileValue); - /// The file is of unsupported type. - public static VectorStoreFileErrorCode UnsupportedFile { get; } = new VectorStoreFileErrorCode(UnsupportedFileValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileErrorCode left, VectorStoreFileErrorCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileErrorCode left, VectorStoreFileErrorCode right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileErrorCode(string value) => new VectorStoreFileErrorCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileErrorCode other && Equals(other); - /// - public bool Equals(VectorStoreFileErrorCode 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.Projects/src/Generated/VectorStoreFileObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileObject.cs deleted file mode 100644 index 193150fcabda..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The VectorStoreFile_object. - public readonly partial struct VectorStoreFileObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorStoreFileValue = "vector_store.file"; - - /// vector_store.file. - public static VectorStoreFileObject VectorStoreFile { get; } = new VectorStoreFileObject(VectorStoreFileValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileObject left, VectorStoreFileObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileObject left, VectorStoreFileObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileObject(string value) => new VectorStoreFileObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileObject other && Equals(other); - /// - public bool Equals(VectorStoreFileObject 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.Projects/src/Generated/VectorStoreFileStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatus.cs deleted file mode 100644 index e82d7daa48b4..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatus.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.AI.Projects -{ - /// Vector store file status. - public readonly partial struct VectorStoreFileStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string FailedValue = "failed"; - private const string CancelledValue = "cancelled"; - - /// The file is currently being processed. - public static VectorStoreFileStatus InProgress { get; } = new VectorStoreFileStatus(InProgressValue); - /// The file has been successfully processed. - public static VectorStoreFileStatus Completed { get; } = new VectorStoreFileStatus(CompletedValue); - /// The file has failed to process. - public static VectorStoreFileStatus Failed { get; } = new VectorStoreFileStatus(FailedValue); - /// The file was cancelled. - public static VectorStoreFileStatus Cancelled { get; } = new VectorStoreFileStatus(CancelledValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileStatus left, VectorStoreFileStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileStatus left, VectorStoreFileStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileStatus(string value) => new VectorStoreFileStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileStatus other && Equals(other); - /// - public bool Equals(VectorStoreFileStatus 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.Projects/src/Generated/VectorStoreFileStatusFilter.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatusFilter.cs deleted file mode 100644 index db1de56806d0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreFileStatusFilter.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.AI.Projects -{ - /// Query parameter filter for vector store file retrieval endpoint. - public readonly partial struct VectorStoreFileStatusFilter : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreFileStatusFilter(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - private const string FailedValue = "failed"; - private const string CancelledValue = "cancelled"; - - /// Retrieve only files that are currently being processed. - public static VectorStoreFileStatusFilter InProgress { get; } = new VectorStoreFileStatusFilter(InProgressValue); - /// Retrieve only files that have been successfully processed. - public static VectorStoreFileStatusFilter Completed { get; } = new VectorStoreFileStatusFilter(CompletedValue); - /// Retrieve only files that have failed to process. - public static VectorStoreFileStatusFilter Failed { get; } = new VectorStoreFileStatusFilter(FailedValue); - /// Retrieve only files that were cancelled. - public static VectorStoreFileStatusFilter Cancelled { get; } = new VectorStoreFileStatusFilter(CancelledValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreFileStatusFilter left, VectorStoreFileStatusFilter right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreFileStatusFilter(string value) => new VectorStoreFileStatusFilter(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreFileStatusFilter other && Equals(other); - /// - public bool Equals(VectorStoreFileStatusFilter 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.Projects/src/Generated/VectorStoreObject.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreObject.cs deleted file mode 100644 index ca48dc13afdc..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreObject.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// The VectorStore_object. - public readonly partial struct VectorStoreObject : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreObject(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string VectorStoreValue = "vector_store"; - - /// vector_store. - public static VectorStoreObject VectorStore { get; } = new VectorStoreObject(VectorStoreValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreObject left, VectorStoreObject right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreObject left, VectorStoreObject right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreObject(string value) => new VectorStoreObject(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreObject other && Equals(other); - /// - public bool Equals(VectorStoreObject 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.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs deleted file mode 100644 index f3502ef55df9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.Serialization.cs +++ /dev/null @@ -1,150 +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.Projects -{ - public partial class VectorStoreStaticChunkingStrategyOptions : 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(VectorStoreStaticChunkingStrategyOptions)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("max_chunk_size_tokens"u8); - writer.WriteNumberValue(MaxChunkSizeTokens); - writer.WritePropertyName("chunk_overlap_tokens"u8); - writer.WriteNumberValue(ChunkOverlapTokens); - 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 - } - } - } - - VectorStoreStaticChunkingStrategyOptions 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(VectorStoreStaticChunkingStrategyOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreStaticChunkingStrategyOptions(document.RootElement, options); - } - - internal static VectorStoreStaticChunkingStrategyOptions DeserializeVectorStoreStaticChunkingStrategyOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - int maxChunkSizeTokens = default; - int chunkOverlapTokens = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("max_chunk_size_tokens"u8)) - { - maxChunkSizeTokens = property.Value.GetInt32(); - continue; - } - if (property.NameEquals("chunk_overlap_tokens"u8)) - { - chunkOverlapTokens = property.Value.GetInt32(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreStaticChunkingStrategyOptions(maxChunkSizeTokens, chunkOverlapTokens, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyOptions)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreStaticChunkingStrategyOptions 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 DeserializeVectorStoreStaticChunkingStrategyOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyOptions)} 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 VectorStoreStaticChunkingStrategyOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreStaticChunkingStrategyOptions(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/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.cs deleted file mode 100644 index 422806be34d5..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyOptions.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.Collections.Generic; - -namespace Azure.AI.Projects -{ - /// Options to configure a vector store static chunking strategy. - public partial class VectorStoreStaticChunkingStrategyOptions - { - /// - /// 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 maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. - /// - /// The number of tokens that overlap between chunks. The default value is 400. - /// Note that the overlap must not exceed half of max_chunk_size_tokens. - /// - public VectorStoreStaticChunkingStrategyOptions(int maxChunkSizeTokens, int chunkOverlapTokens) - { - MaxChunkSizeTokens = maxChunkSizeTokens; - ChunkOverlapTokens = chunkOverlapTokens; - } - - /// Initializes a new instance of . - /// The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. - /// - /// The number of tokens that overlap between chunks. The default value is 400. - /// Note that the overlap must not exceed half of max_chunk_size_tokens. - /// - /// Keeps track of any properties unknown to the library. - internal VectorStoreStaticChunkingStrategyOptions(int maxChunkSizeTokens, int chunkOverlapTokens, IDictionary serializedAdditionalRawData) - { - MaxChunkSizeTokens = maxChunkSizeTokens; - ChunkOverlapTokens = chunkOverlapTokens; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreStaticChunkingStrategyOptions() - { - } - - /// The maximum number of tokens in each chunk. The default value is 800. The minimum value is 100 and the maximum value is 4096. - public int MaxChunkSizeTokens { get; set; } - /// - /// The number of tokens that overlap between chunks. The default value is 400. - /// Note that the overlap must not exceed half of max_chunk_size_tokens. - /// - public int ChunkOverlapTokens { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs deleted file mode 100644 index 05de1791cbe9..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class VectorStoreStaticChunkingStrategyRequest : 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(VectorStoreStaticChunkingStrategyRequest)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("static"u8); - writer.WriteObjectValue(Static, options); - } - - VectorStoreStaticChunkingStrategyRequest 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(VectorStoreStaticChunkingStrategyRequest)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreStaticChunkingStrategyRequest(document.RootElement, options); - } - - internal static VectorStoreStaticChunkingStrategyRequest DeserializeVectorStoreStaticChunkingStrategyRequest(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreStaticChunkingStrategyOptions @static = default; - VectorStoreChunkingStrategyRequestType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("static"u8)) - { - @static = VectorStoreStaticChunkingStrategyOptions.DeserializeVectorStoreStaticChunkingStrategyOptions(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyRequestType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreStaticChunkingStrategyRequest(type, serializedAdditionalRawData, @static); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyRequest)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreStaticChunkingStrategyRequest 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 DeserializeVectorStoreStaticChunkingStrategyRequest(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyRequest)} 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 new VectorStoreStaticChunkingStrategyRequest FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreStaticChunkingStrategyRequest(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs deleted file mode 100644 index f310b50f5a22..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyRequest.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// A statically configured chunking strategy. - public partial class VectorStoreStaticChunkingStrategyRequest : VectorStoreChunkingStrategyRequest - { - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// is null. - public VectorStoreStaticChunkingStrategyRequest(VectorStoreStaticChunkingStrategyOptions @static) - { - Argument.AssertNotNull(@static, nameof(@static)); - - Type = VectorStoreChunkingStrategyRequestType.Static; - Static = @static; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The options for the static chunking strategy. - internal VectorStoreStaticChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType type, IDictionary serializedAdditionalRawData, VectorStoreStaticChunkingStrategyOptions @static) : base(type, serializedAdditionalRawData) - { - Static = @static; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreStaticChunkingStrategyRequest() - { - } - - /// The options for the static chunking strategy. - public VectorStoreStaticChunkingStrategyOptions Static { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs deleted file mode 100644 index aa186d05c9f3..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.Serialization.cs +++ /dev/null @@ -1,134 +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.Projects -{ - public partial class VectorStoreStaticChunkingStrategyResponse : 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(VectorStoreStaticChunkingStrategyResponse)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("static"u8); - writer.WriteObjectValue(Static, options); - } - - VectorStoreStaticChunkingStrategyResponse 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(VectorStoreStaticChunkingStrategyResponse)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeVectorStoreStaticChunkingStrategyResponse(document.RootElement, options); - } - - internal static VectorStoreStaticChunkingStrategyResponse DeserializeVectorStoreStaticChunkingStrategyResponse(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - VectorStoreStaticChunkingStrategyOptions @static = default; - VectorStoreChunkingStrategyResponseType type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("static"u8)) - { - @static = VectorStoreStaticChunkingStrategyOptions.DeserializeVectorStoreStaticChunkingStrategyOptions(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = new VectorStoreChunkingStrategyResponseType(property.Value.GetString()); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new VectorStoreStaticChunkingStrategyResponse(type, serializedAdditionalRawData, @static); - } - - 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyResponse)} does not support writing '{options.Format}' format."); - } - } - - VectorStoreStaticChunkingStrategyResponse 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 DeserializeVectorStoreStaticChunkingStrategyResponse(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(VectorStoreStaticChunkingStrategyResponse)} 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 new VectorStoreStaticChunkingStrategyResponse FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeVectorStoreStaticChunkingStrategyResponse(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs deleted file mode 100644 index fcbde230275c..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStaticChunkingStrategyResponse.cs +++ /dev/null @@ -1,44 +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.Projects -{ - /// A statically configured chunking strategy. - public partial class VectorStoreStaticChunkingStrategyResponse : VectorStoreChunkingStrategyResponse - { - /// Initializes a new instance of . - /// The options for the static chunking strategy. - /// is null. - internal VectorStoreStaticChunkingStrategyResponse(VectorStoreStaticChunkingStrategyOptions @static) - { - Argument.AssertNotNull(@static, nameof(@static)); - - Type = VectorStoreChunkingStrategyResponseType.Static; - Static = @static; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The options for the static chunking strategy. - internal VectorStoreStaticChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType type, IDictionary serializedAdditionalRawData, VectorStoreStaticChunkingStrategyOptions @static) : base(type, serializedAdditionalRawData) - { - Static = @static; - } - - /// Initializes a new instance of for deserialization. - internal VectorStoreStaticChunkingStrategyResponse() - { - } - - /// The options for the static chunking strategy. - public VectorStoreStaticChunkingStrategyOptions Static { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs deleted file mode 100644 index 30cc174ef910..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/VectorStoreStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// Vector store possible status. - public readonly partial struct VectorStoreStatus : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public VectorStoreStatus(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ExpiredValue = "expired"; - private const string InProgressValue = "in_progress"; - private const string CompletedValue = "completed"; - - /// expired status indicates that this vector store has expired and is no longer available for use. - public static VectorStoreStatus Expired { get; } = new VectorStoreStatus(ExpiredValue); - /// in_progress status indicates that this vector store is still processing files. - public static VectorStoreStatus InProgress { get; } = new VectorStoreStatus(InProgressValue); - /// completed status indicates that this vector store is ready for use. - public static VectorStoreStatus Completed { get; } = new VectorStoreStatus(CompletedValue); - /// Determines if two values are the same. - public static bool operator ==(VectorStoreStatus left, VectorStoreStatus right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(VectorStoreStatus left, VectorStoreStatus right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator VectorStoreStatus(string value) => new VectorStoreStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is VectorStoreStatus other && Equals(other); - /// - public bool Equals(VectorStoreStatus 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.Projects/src/Generated/WeekDays.cs b/sdk/ai/Azure.AI.Projects/src/Generated/WeekDays.cs deleted file mode 100644 index 000ae68ad211..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/WeekDays.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Projects -{ - /// WeekDay of the schedule - Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. - public readonly partial struct WeekDays : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public WeekDays(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"; - - /// Monday. - public static WeekDays Monday { get; } = new WeekDays(MondayValue); - /// Tuesday. - public static WeekDays Tuesday { get; } = new WeekDays(TuesdayValue); - /// Wednesday. - public static WeekDays Wednesday { get; } = new WeekDays(WednesdayValue); - /// Thursday. - public static WeekDays Thursday { get; } = new WeekDays(ThursdayValue); - /// Friday. - public static WeekDays Friday { get; } = new WeekDays(FridayValue); - /// Saturday. - public static WeekDays Saturday { get; } = new WeekDays(SaturdayValue); - /// Sunday. - public static WeekDays Sunday { get; } = new WeekDays(SundayValue); - /// Determines if two values are the same. - public static bool operator ==(WeekDays left, WeekDays right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(WeekDays left, WeekDays right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator WeekDays(string value) => new WeekDays(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is WeekDays other && Equals(other); - /// - public bool Equals(WeekDays 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.Projects/src/Generated/WorkspaceProperties.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/WorkspaceProperties.Serialization.cs deleted file mode 100644 index 1107e43997d0..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/WorkspaceProperties.Serialization.cs +++ /dev/null @@ -1,142 +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.Projects -{ - public partial class WorkspaceProperties : 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(WorkspaceProperties)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("applicationInsights"u8); - writer.WriteStringValue(ApplicationInsights); - 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 - } - } - } - - WorkspaceProperties 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(WorkspaceProperties)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeWorkspaceProperties(document.RootElement, options); - } - - internal static WorkspaceProperties DeserializeWorkspaceProperties(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string applicationInsights = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("applicationInsights"u8)) - { - applicationInsights = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new WorkspaceProperties(applicationInsights, 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, AzureAIProjectsContext.Default); - default: - throw new FormatException($"The model {nameof(WorkspaceProperties)} does not support writing '{options.Format}' format."); - } - } - - WorkspaceProperties 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 DeserializeWorkspaceProperties(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(WorkspaceProperties)} 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 WorkspaceProperties FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeWorkspaceProperties(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/ai/Azure.AI.Projects/src/Generated/WorkspaceProperties.cs b/sdk/ai/Azure.AI.Projects/src/Generated/WorkspaceProperties.cs deleted file mode 100644 index b7f2db20ac2e..000000000000 --- a/sdk/ai/Azure.AI.Projects/src/Generated/WorkspaceProperties.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; - -namespace Azure.AI.Projects -{ - /// workspace properties. - public partial class WorkspaceProperties - { - /// - /// 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 . - /// Authentication type of the connection target. - /// is null. - internal WorkspaceProperties(string applicationInsights) - { - Argument.AssertNotNull(applicationInsights, nameof(applicationInsights)); - - ApplicationInsights = applicationInsights; - } - - /// Initializes a new instance of . - /// Authentication type of the connection target. - /// Keeps track of any properties unknown to the library. - internal WorkspaceProperties(string applicationInsights, IDictionary serializedAdditionalRawData) - { - ApplicationInsights = applicationInsights; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal WorkspaceProperties() - { - } - - /// Authentication type of the connection target. - public string ApplicationInsights { get; } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/AIProjectsTestEnvironment.cs b/sdk/ai/Azure.AI.Projects/tests/AIProjectsTestEnvironment.cs index eb668996368e..9072c8622321 100644 --- a/sdk/ai/Azure.AI.Projects/tests/AIProjectsTestEnvironment.cs +++ b/sdk/ai/Azure.AI.Projects/tests/AIProjectsTestEnvironment.cs @@ -8,12 +8,22 @@ namespace Azure.AI.Projects.Tests public class AIProjectsTestEnvironment : TestEnvironment { public string AzureAICONNECTIONSTRING => GetRecordedVariable("PROJECT_CONNECTION_STRING"); + public string PROJECTENDPOINT => GetRecordedVariable("PROJECT_ENDPOINT"); + public string DATASETNAME => GetRecordedVariable("DATASET_NAME"); public string BINGCONNECTIONNAME => GetRecordedVariable("BING_CONNECTION_NAME"); public string MODELDEPLOYMENTNAME => GetRecordedVariable("MODEL_DEPLOYMENT_NAME"); + public string EMBEDDINGSMODELDEPLOYMENTNAME => GetRecordedVariable("EMBEDDINGS_MODEL_DEPLOYMENT_NAME"); + public string MODELPUBLISHER => GetRecordedVariable("MODEL_PUBLISHER"); public string EMBEDDINGMODELDEPLOYMENTNAME => GetRecordedVariable("EMBEDDING_MODEL_DEPLOYMENT_NAME"); public string STORAGE_QUEUE_URI => GetRecordedVariable("STORAGE_QUEUE_URI"); public string AZURE_BLOB_URI => GetRecordedVariable("AZURE_BLOB_URI"); public string FABRICCONNECTIONNAME => GetRecordedVariable("FABRIC_CONNECTION_NAME"); public string SHAREPOINTCONNECTIONNAME => GetRecordedVariable("SHAREPOINT_CONNECTION_NAME"); + public string INDEXNAME => GetRecordedVariable("INDEX_NAME"); + public string INDEXVERSION => GetRecordedVariable("INDEX_VERSION"); + public string AISEARCHCONNECTIONNAME => GetRecordedVariable("AI_SEARCH_CONNECTION_NAME"); + public string AISEARCHINDEXNAME => GetRecordedVariable("AI_SEARCH_INDEX_NAME"); + public string CONNECTIONNAME => GetRecordedVariable("CONNECTION_NAME"); + public string TESTIMAGEPNGINPUTPATH => GetRecordedVariable("TEST_IMAGE_PNG_INPUT_PATH"); } } diff --git a/sdk/ai/Azure.AI.Projects/tests/AgentClientTests.cs b/sdk/ai/Azure.AI.Projects/tests/AgentClientTests.cs deleted file mode 100644 index d2d5db716ee2..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/AgentClientTests.cs +++ /dev/null @@ -1,1670 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net.Security; -using System.Runtime.CompilerServices; -using System.Text; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core; -using Azure.Core.TestFramework; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests -{ - public class AgentClientTests : RecordedTestBase - { - private const string AGENT_NAME = "cs_e2e_tests_client"; - private const string AGENT_NAME2 = "cs_e2e_tests_client2"; - private const string VCT_STORE_NAME = "cs_e2e_tests_vct_store"; - private const string FILE_NAME = "product_info_1.md"; - private const string FILE_NAME2 = "test_file.txt"; - private const string TEMP_DIR = "cs_e2e_temp_dir"; - - private const string FILE_UPLOAD_CONSTRAINT = "The file is being uploaded as a multipart multipart/form-data, which cannot be recorded."; - private const string STREAMING_CONSTRAINT = "The test framework does not support iteration of stream in Sync mode."; - - public AgentClientTests(bool isAsync) : base(isAsync) { - TestDiagnostics = false; - } - - #region enumerations - public enum ArgumentType - { - Metadata, - Bytes, - Stream - } - - public enum VecrorStoreTestType - { - JustVectorStore, - Batch, - File - } - - // We have to create this enum because AzureAISearchQueryType.Simple actually return a new object, - // which cannot be used in TestCase - public enum AzureAISearchQueryTypeEnum - { - Simple, - Semantic, - Vector, - VectorSimpleHybrid, - VectorSemanticHybrid - } - - public Dictionary SearchQueryTypes = new() - { - { AzureAISearchQueryTypeEnum.Simple, AzureAISearchQueryType.Simple }, - { AzureAISearchQueryTypeEnum.Semantic, AzureAISearchQueryType.Semantic }, - { AzureAISearchQueryTypeEnum.Vector, AzureAISearchQueryType.Vector }, - { AzureAISearchQueryTypeEnum.VectorSimpleHybrid, AzureAISearchQueryType.VectorSimpleHybrid }, - { AzureAISearchQueryTypeEnum.VectorSemanticHybrid, AzureAISearchQueryType.VectorSemanticHybrid } - }; - #endregion - - [RecordedTest] - //Failing in CI due to no playback found - //https://dev.azure.com/azure-sdk/public/_build/results?buildId=4622315&view=logs&j=91fc166b-5adf-5829-8c48-947d370143f5&t=b0549744-0856-5f62-f0ed-ab5057788140&l=1029 - //[TestCase(ArgumentType.Metadata)] - //[TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestCreateAgent(ArgumentType argType) - { - AgentsClient client = GetClient(); - string id; - string name; - if (argType == ArgumentType.Metadata) - { - Response agentResponse = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are helpful assistant." - ); - id = agentResponse.Value.Id; - name = agentResponse.Value.Name; - } - else - { - object objParams = new { - model = "gpt-4", - name = AGENT_NAME, - instructions = "You are helpful assistant" - }; - RequestContent content = argType == ArgumentType.Bytes?RequestContent.Create(GetBytes(objParams)): RequestContent.Create(GetStream(objParams)); - Response agentResponse = await client.CreateAgentAsync(content); - id = GetFieldFromJson(agentResponse.Content, "id"); - name = GetFieldFromJson(agentResponse.Content, "name"); - } - Assert.AreNotEqual(default, id); - Assert.AreEqual(name, AGENT_NAME); - Response delResponse = await client.DeleteAgentAsync(id); - Assert.IsTrue(delResponse.Value); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestUpdateAgent(ArgumentType argType) - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - string name = default; - if (argType == ArgumentType.Metadata) - { - Response agentResponse = await client.UpdateAgentAsync( - assistantId: agent.Id, - model: "gpt-4", - name: AGENT_NAME2, - instructions: "You are helpful assistant." - ); - name = agentResponse.Value.Name; - } - else - { - object objParams = new - { - model = "gpt-4", - name = AGENT_NAME2, - instructions = "You are helpful assistant" - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(objParams)) : RequestContent.Create(GetStream(objParams)); - Response agentResponse = await client.UpdateAgentAsync(agent.Id, content); - name = GetFieldFromJson(agentResponse.Content, "name"); - } - Assert.AreEqual(AGENT_NAME2, name); - } - - [RecordedTest] - public async Task TestListAgent() - { - AgentsClient client = GetClient(); - // Note: if the numer of arent will be bigger then 100 this test will fail. - HashSet ids = new(); - int initialAgentCount = await CountElementsAndRemoveIds(client, ids); - Agent agent1 = await GetAgent(client, AGENT_NAME); - ids = [agent1.Id]; - int count = await CountElementsAndRemoveIds(client, ids); - Assert.AreEqual(0, ids.Count); - Assert.AreEqual(initialAgentCount + 1, count); - - Agent agent2 = await GetAgent(client, AGENT_NAME2); - ids.Add(agent1.Id); - ids.Add(agent2.Id); - count = await CountElementsAndRemoveIds(client, ids); - Assert.AreEqual(0, ids.Count); - Assert.AreEqual(initialAgentCount + 2, count); - - await DeleteAndAssert(client, agent1); - ids.Add(agent1.Id); - ids.Add(agent2.Id); - count = await CountElementsAndRemoveIds(client, ids); - Assert.AreEqual(1, ids.Count); - Assert.False(ids.Contains(agent2.Id)); - Assert.AreEqual(initialAgentCount + 1, count); - await DeleteAndAssert(client, agent2); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestCreateThread(ArgumentType argType) - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - - string thread_id; - IReadOnlyDictionary metadata; - if (argType == ArgumentType.Metadata) - { - Response threadResponse = await client.CreateThreadAsync( - metadata: new Dictionary { - {"key1", "value1"}, - {"key2", "value2"} - }); - thread_id = threadResponse.Value.Id; - metadata = threadResponse.Value.Metadata; - } - else - { - object data = new - { - metadata = new - { - key1="value1", - key2="value2" - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawThreadResponse = await client.CreateThreadAsync(content); - thread_id = GetFieldFromJson(rawThreadResponse.Content, "id"); - Response threadResponse = await client.GetThreadAsync(thread_id); - metadata = threadResponse.Value.Metadata; - } - Assert.AreNotEqual(default, thread_id); - Assert.AreEqual(2, metadata.Count); - - // Test delete thread - Response delResponse = await client.DeleteThreadAsync(thread_id); - Assert.True(delResponse); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestUpdateThread(ArgumentType argType) - { - AgentsClient client = GetClient(); - AgentThread thread = await GetThread(client); - Assert.AreEqual(0, thread.Metadata.Count); - - if (argType == ArgumentType.Metadata) - { - //"metadata": {"key1": "value1", "key2": "value2"}, - await client.UpdateThreadAsync( - thread.Id, - metadata: new Dictionary { - {"key1", "value1"}, - {"key2", "value2"} - }); - } - else - { - object data = new - { - metadata = new - { - key1 = "value1", - key2 = "value2" - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - await client.UpdateThreadAsync(thread.Id, content); - } - - // Test get thread - Response getThreadResponse = await client.GetThreadAsync(thread.Id); - thread = getThreadResponse.Value; - Assert.AreNotEqual(default, thread.Id); - Assert.AreEqual(2, thread.Metadata.Count); - - // Test delete thread - Response delResponse = await client.DeleteThreadAsync(thread.Id); - Assert.True(delResponse); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestCreateMessage(ArgumentType argType) - { - AgentsClient client = GetClient(); - AgentThread thread = await GetThread(client); - ThreadMessage tmTest; - string message = "Hello, tell me a joke"; - if (argType == ArgumentType.Metadata) - { - Response msg = await client.CreateMessageAsync(thread.Id, MessageRole.User, message); - tmTest = msg.Value; - } - else - { - object data = new - { - role = "user", - content = message - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawMsg = await client.CreateMessageAsync(thread.Id, content); - Response msg = await client.GetMessageAsync(thread.Id, GetFieldFromJson(rawMsg.Content, "id")); - tmTest = msg.Value; - } - Assert.AreEqual(1, tmTest.ContentItems.Count); - Assert.IsTrue(tmTest.ContentItems[0] is MessageTextContent text); - Assert.AreEqual(message, ((MessageTextContent)tmTest.ContentItems[0]).Text); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestUpdateMessage(ArgumentType argType) - { - AgentsClient client = GetClient(); - AgentThread thread = await GetThread(client); - ThreadMessage tmTest; - Response oldMsgResp = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Hello, tell me a joke"); - Assert.AreEqual(0, oldMsgResp.Value.Metadata.Count); - if (argType == ArgumentType.Metadata) - { - Response msg = await client.UpdateMessageAsync(thread.Id, oldMsgResp.Value.Id, metadata: new Dictionary { - {"key1", "value1"}, - {"key2", "value2"} - }); - tmTest = msg.Value; - } - else - { - object data = new - { - metadata = new - { - key1 = "value1", - key2 = "value2" - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawMsg = await client.UpdateMessageAsync(thread.Id, oldMsgResp.Value.Id, content); - Response msg = await client.GetMessageAsync(thread.Id, GetFieldFromJson(rawMsg.Content, "id")); - tmTest = msg.Value; - } - Assert.AreEqual(2, tmTest.Metadata.Count); - } - - [RecordedTest] - public async Task TestListMessage() - { - AgentsClient client = GetClient(); - AgentThread thread = await GetThread(client); - Response> msgResp = await client.GetMessagesAsync(thread.Id); - Assert.AreEqual(0, msgResp.Value.Data.Count); - - HashSet ids = new(); - ThreadMessage msg1 = await client.CreateMessageAsync(thread.Id, MessageRole.User, "foo"); - ids.Add(msg1.Id); - msgResp = await client.GetMessagesAsync(thread.Id); - foreach (ThreadMessage msg in msgResp.Value) - { - ids.Remove(msg.Id); - } - Assert.AreEqual(0, ids.Count); - Assert.AreEqual(1, msgResp.Value.Data.Count); - - ThreadMessage msg2 = await client.CreateMessageAsync(thread.Id, MessageRole.User, "bar"); - ids.Add(msg1.Id); - ids.Add(msg2.Id); - msgResp = await client.GetMessagesAsync(thread.Id); - foreach (ThreadMessage msg in msgResp.Value) - { - ids.Remove(msg.Id); - } - Assert.AreEqual(0, ids.Count); - Assert.AreEqual(2, msgResp.Value.Data.Count); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestCreateRun(ArgumentType argType) - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - AgentThread thread = await GetThread(client); - await client.CreateMessageAsync(thread.Id, MessageRole.User, "Hello, tell me a joke"); - ThreadRun result; - if (argType == ArgumentType.Metadata) - { - Response runResp = await client.CreateRunAsync(thread.Id, agent.Id); - result = runResp.Value; - } - else - { - object data = new - { - assistant_id = agent.Id - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawRun = await client.CreateRunAsync(thread.Id, content); - Response resResp = await client.GetRunAsync(thread.Id, GetFieldFromJson(rawRun.Content, "id")); - result = resResp.Value; - } - Assert.AreEqual(agent.Id, result.AssistantId); - Assert.AreEqual(thread.Id, result.ThreadId); - // Check run status - result = await WaitForRun(client, result); - Response> msgResp = await client.GetMessagesAsync(thread.Id); - Assert.AreEqual(2, msgResp.Value.Data.Count); - Assert.AreEqual(MessageRole.Agent, msgResp.Value.Data[0].Role); - Assert.AreEqual(MessageRole.User, msgResp.Value.Data[1].Role); - // Get Run steps - PageableList steps = await client.GetRunStepsAsync(result); - Assert.GreaterOrEqual(steps.Data.Count, 1); - RunStep step = await client.GetRunStepAsync(result.ThreadId, result.Id, steps.Data[0].Id); - Assert.AreEqual(steps.Data[0].Id, step.Id); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestCreateThreadAndRun(ArgumentType argType) - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - ThreadRun result; - var threadOp = new AgentThreadCreationOptions(); - threadOp.Messages.Add(new ThreadMessageOptions( - role: MessageRole.User, - content: "Hello, tell me a joke" - )); - if (argType == ArgumentType.Metadata) - { - result = await client.CreateThreadAndRunAsync( - assistantId: agent.Id, - thread: threadOp, - metadata: new Dictionary { - { "key1", "value1"}, - { "key2", "value2"} - } - ); - } - else - { - object data = new - { - assistant_id = agent.Id, - thread = new { - messages = new object[] - { - new { - role = MessageRole.User.ToString(), - content = "Hello, tell me a joke", - } - } - }, - metadata = new - { - key1 = "value1", - key2 = "value2" - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawRun = await client.CreateThreadAndRunAsync(content); - result = await client.GetRunAsync( - GetFieldFromJson(rawRun.Content, "thread_id"), - GetFieldFromJson(rawRun.Content, "id")); - } - Assert.AreEqual(agent.Id, result.AssistantId); - // Check run status - result = await WaitForRun(client, result); - Response> msgResp = await client.GetMessagesAsync(result.ThreadId); - Assert.AreEqual(2, msgResp.Value.Data.Count); - Assert.AreEqual(MessageRole.Agent, msgResp.Value.Data[0].Role); - Assert.AreEqual(MessageRole.User, msgResp.Value.Data[1].Role); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata)] - [TestCase(ArgumentType.Bytes)] - [TestCase(ArgumentType.Stream)] - public async Task TestUpdateRun(ArgumentType argType) - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - AgentThread thread = await GetThread(client); - await client.CreateMessageAsync(thread.Id, MessageRole.User, "Hello, tell me a joke"); - ThreadRun runResp = await client.CreateRunAsync(thread.Id, agent.Id); - runResp = await WaitForRun(client, runResp); - Assert.AreEqual(0, runResp.Metadata.Count); - if (argType == ArgumentType.Metadata) - { - runResp = await client.UpdateRunAsync( - threadId: thread.Id, - runId: runResp.Id, - metadata: new Dictionary { - { "key1", "value1"}, - { "key2", "value2"} - } - ); - } - else - { - object data = new - { - metadata = new - { - key1 = "value1", - key2 = "value2" - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(data)) : RequestContent.Create(GetStream(data)); - Response rawRun = await client.UpdateRunAsync(thread.Id, runResp.Id, content); - runResp = await client.GetRunAsync(thread.Id, GetFieldFromJson(rawRun.Content, "id")); - } - Assert.AreEqual(2, runResp.Metadata.Count); - } - - [RecordedTest] - public async Task ListDeleteRuns() - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent(client); - AgentThread thread = await GetThread(client); - await client.CreateMessageAsync(thread.Id, MessageRole.User, "Hello, tell me a joke"); - ThreadRun runResp1 = await client.CreateRunAsync(thread.Id, agent.Id); - runResp1 = await WaitForRun(client, runResp1); - ThreadRun runResp2 = await client.CreateRunAsync(thread.Id, agent.Id); - runResp2 = await WaitForRun(client, runResp2); - PageableList runsResp = await client.GetRunsAsync(thread.Id, limit: 1); - Assert.AreEqual(1, runsResp.Count()); - runsResp = await client.GetRunsAsync(thread.Id); - Assert.AreEqual(2, runsResp.Count()); - HashSet ids = [runResp1.Id, runResp2.Id]; - foreach (ThreadRun rn in runsResp) - { - ids.Remove(rn.Id); - } - Assert.AreEqual(0, ids.Count); - } - - [RecordedTest] - [TestCase(ArgumentType.Metadata, true, false)] - [TestCase(ArgumentType.Bytes, true, false)] - [TestCase(ArgumentType.Stream, false, false)] - [TestCase(ArgumentType.Metadata, true, true)] - [TestCase(ArgumentType.Metadata, false, true)] - public async Task TestSubmitToolOutputs(ArgumentType argType, bool parallelToolCalls, bool CreateThreadAndRun) - { - AgentsClient client = GetClient(); - FunctionToolDefinition getFavouriteNameTool = new( - name: "getFavouriteWord", - description: "Gets the favourite word of the person.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Name = new - { - Type = "string", - Description = "The name of the person.", - }, - }, - Required = new[] { "name" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "Use the provided functions to help answer questions.", - tools: new List { getFavouriteNameTool } - ); - ThreadRun toolRun; - if (CreateThreadAndRun) - { - var threadOp = new AgentThreadCreationOptions(); - threadOp.Messages.Add(new ThreadMessageOptions( - role: MessageRole.User, - content: "Tell me the favourite word of Mike?" - )); - toolRun = await client.CreateThreadAndRunAsync( - assistantId: agent.Id, - thread: threadOp, - parallelToolCalls: parallelToolCalls - ); - } - else - { - AgentThread thread = await GetThread(client); - await client.CreateMessageAsync(thread.Id, MessageRole.User, "Tell me the favourite word of Mike?"); - toolRun = await client.CreateRunAsync( - threadId: thread.Id, - assistantId: agent.Id, - parallelToolCalls: parallelToolCalls - ); - } - bool functionCalled = false; - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - toolRun = await client.GetRunAsync(toolRun.ThreadId, toolRun.Id); - if (toolRun.Status == RunStatus.RequiresAction && toolRun.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = new(); - Assert.AreEqual(1, submitToolOutputsAction.ToolCalls.Count); - functionCalled = true; - if (submitToolOutputsAction.ToolCalls[0] is RequiredFunctionToolCall functionToolCall) - { - using JsonDocument argumentsJson = JsonDocument.Parse(functionToolCall.Arguments); - string nameArgument = argumentsJson.RootElement.GetProperty("name").GetString(); - Assert.AreEqual(0, string.Compare(nameArgument, "mike", true)); - toolOutputs.Add(new ToolOutput(submitToolOutputsAction.ToolCalls[0], "bar")); - } - else - { - Assert.Fail("The toolCall is of a wrong type."); - } - if (argType == ArgumentType.Metadata) - { - toolRun = await client.SubmitToolOutputsToRunAsync(toolRun, toolOutputs); - } - else - { - object objToolOutput = new - { - tool_outputs = new object[] { - new { - tool_call_id = toolOutputs[0].ToolCallId, - output = toolOutputs[0].Output - } - } - }; - RequestContent content = argType == ArgumentType.Bytes ? RequestContent.Create(GetBytes(objToolOutput)) : RequestContent.Create(GetStream(objToolOutput)); - await client.SubmitToolOutputsToRunAsync(toolRun.ThreadId, toolRun.Id, content); - toolRun = await client.GetRunAsync(toolRun.ThreadId, toolRun.Id); - } - } - } - while (toolRun.Status == RunStatus.Queued - || toolRun.Status == RunStatus.InProgress - || toolRun.Status == RunStatus.RequiresAction); - Assert.True(functionCalled); - Assert.AreEqual(RunStatus.Completed, toolRun.Status, message: toolRun.LastError?.Message); - PageableList messages = await client.GetMessagesAsync(toolRun.ThreadId, toolRun.Id); - Assert.GreaterOrEqual(messages.Data.Count, 1); - Assert.AreEqual(parallelToolCalls, toolRun.ParallelToolCalls); - } - - [RecordedTest] - [TestCase(true)] - [TestCase(false)] - public async Task TestAutomaticSubmitToolOutputs(bool correctDefinition) - { - if (!IsAsync) - Assert.Inconclusive(STREAMING_CONSTRAINT); - - string GetHumidityByAddress(string address) - { - return address.Contains("Seattle")? "80" : "60"; - } - - FunctionToolDefinition correctGeHhumidityByAddressTool = new( - name: "GetHumidityByAddress", - description: "Get humidity by address", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Address = new - { - Type = "string", - Description = "Address" - } - }, - Required = new[] { "address" } - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - - FunctionToolDefinition incorrectGeHhumidityByAddressTool = new( - name: "GetHumidityByAddress", - description: "Get humidity by address", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Addresses = new - { - Type = "array", - Description = "A list of addresses", - Items = new - { - Type = "object", - Properties = new - { - Street = new - { - Type = "string", - Description = "Street" - }, - City = new - { - Type = "string", - description = "city" - }, - }, - Required = new[] { "street", "city" } - } - }, - }, - Required = new[] { "address" } - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - - Dictionary toolDelegates = new(); - toolDelegates.Add(nameof(GetHumidityByAddress), GetHumidityByAddress); - - AgentsClient client = GetClient(); - string output = ""; - bool completed = false; - bool cancelled = false; - List tools = new(); - AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 0); - if (correctDefinition) - tools.Add(correctGeHhumidityByAddressTool); - else - tools.Add(incorrectGeHhumidityByAddressTool); - - Agent agent = await client.CreateAgentAsync( - model: "gpt-4o-mini", - name: AGENT_NAME, - instructions: "Use the provided functions to help answer questions.", - tools: tools - ); - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Get humidity for address, 456 2nd Ave in city, Seattle"); - - await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) - { - if (streamingUpdate is MessageContentUpdate contentUpdate) - { - output += contentUpdate.Text; - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - completed = true; - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCancelled) - { - cancelled = true; - } - } - - if (correctDefinition) - { - Assert.True(output.Contains("80")); - Assert.True(completed); - } - else - { - Assert.True(cancelled); - } - } - - [RecordedTest] - [TestCase(VecrorStoreTestType.JustVectorStore, true, false)] - [TestCase(VecrorStoreTestType.Batch, true, false)] - [TestCase(VecrorStoreTestType.File, true, false)] - [TestCase(VecrorStoreTestType.JustVectorStore, false, false)] - [TestCase(VecrorStoreTestType.Batch, false, false)] - [TestCase(VecrorStoreTestType.File, false, false)] - [TestCase(VecrorStoreTestType.JustVectorStore, true, true)] - [TestCase(VecrorStoreTestType.Batch, true, true)] - [TestCase(VecrorStoreTestType.File, true, true)] - [TestCase(VecrorStoreTestType.JustVectorStore, false, true)] - [TestCase(VecrorStoreTestType.Batch, false, true)] - [TestCase(VecrorStoreTestType.File, false, true)] - public async Task TestCreateVectorStore(VecrorStoreTestType testType, bool useFileSource, bool useStreaming) - { - if (useFileSource && Mode != RecordedTestMode.Live) - Assert.Inconclusive(FILE_UPLOAD_CONSTRAINT); - if (useStreaming && !IsAsync) - Assert.Inconclusive(STREAMING_CONSTRAINT); - AgentsClient client = GetClient(); - VectorStore vectorStore; - - AgentFile fileDataSource = null; - VectorStoreDataSource vectorStoreDataSource = null; - VectorStoreConfiguration vectorStoreConf = null; - List fileIds = null; - if (useFileSource) - { - fileDataSource = await client.UploadFileAsync(GetFile(), AgentFilePurpose.Agents); - fileIds = [ fileDataSource.Id ]; - } - else - { - vectorStoreDataSource = new VectorStoreDataSource( - assetIdentifier: TestEnvironment.AZURE_BLOB_URI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - vectorStoreConf = new VectorStoreConfiguration( - dataSources: [ vectorStoreDataSource ] - ); - } - if (testType == VecrorStoreTestType.JustVectorStore) - { - vectorStore = await client.CreateVectorStoreAsync( - name: VCT_STORE_NAME, - storeConfiguration: vectorStoreConf, - fileIds: fileIds - ); - } - else - { - vectorStore = await client.CreateVectorStoreAsync( - name: VCT_STORE_NAME - ); - if (testType == VecrorStoreTestType.Batch) - { - await client.CreateVectorStoreFileBatchAsync( - vectorStoreId: vectorStore.Id, - dataSources: vectorStoreConf?.DataSources, - fileIds: fileIds - ); - } - else - { - await client.CreateVectorStoreFileAsync( - vectorStoreId: vectorStore.Id, - dataSource: vectorStoreConf?.DataSources[0], - fileId: fileDataSource?.Id - ); - } - } - // Test file search - FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); - fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); - var threadOp = new AgentThreadCreationOptions(); - threadOp.Messages.Add(new ThreadMessageOptions( - role: MessageRole.User, - content: "What does the attachment say?" - )); - ThreadRun fileSearchRun = default; - if (useStreaming) - { - AgentThread thread = await client.CreateThreadAsync(messages: [new ThreadMessageOptions( - role: MessageRole.User, - content: "What does the attachment say?" - )]); - await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id)) - { - if (streamingUpdate is RunUpdate runUpdate) - fileSearchRun = runUpdate.Value; - } - Assert.AreEqual(RunStatus.Completed, fileSearchRun.Status, fileSearchRun.LastError?.ToString()); - } - else - { - fileSearchRun = await client.CreateThreadAndRunAsync( - assistantId: agent.Id, - thread: threadOp - ); - fileSearchRun = await WaitForRun(client, fileSearchRun); - } - Assert.IsNotNull(fileSearchRun); - PageableList messages = await client.GetMessagesAsync(fileSearchRun.ThreadId, fileSearchRun.Id); - Assert.GreaterOrEqual(messages.Data.Count, 1); - // Check list, get and delete operations. - VectorStore getVct = await client.GetVectorStoreAsync(vectorStore.Id); - Assert.AreEqual(vectorStore.Id, getVct.Id); - AgentPageableListOfVectorStore stores = await client.GetVectorStoresAsync(limit: 100); - getVct = null; - foreach (VectorStore store in stores.Data) - { - if (store.Id == vectorStore.Id) - { - getVct = store; - break; - } - } - Assert.NotNull(getVct); - VectorStoreDeletionStatus removed = await client.DeleteVectorStoreAsync(vectorStore.Id); - Assert.True(removed.Deleted); - stores = await client.GetVectorStoresAsync(limit: 100); - getVct = null; - foreach (VectorStore store in stores.Data) - { - if (store.Id == vectorStore.Id) - { - getVct = store; - break; - } - } - Assert.IsNull(getVct); - } - - [RecordedTest] - [TestCase(true, true)] - [TestCase(true, false)] - [TestCase(false, true)] - [TestCase(false, false)] - public async Task TestCreateWithMessageAttachment(bool useFileSource, bool attachmentOnThread) - { - if (useFileSource && Mode != RecordedTestMode.Live) - Assert.Inconclusive(FILE_UPLOAD_CONSTRAINT); - AgentsClient client = GetClient(); - - MessageAttachment attachment; - List tools = [ - new FileSearchToolDefinition(), - new CodeInterpreterToolDefinition() - ]; - string fileId = default; - if (useFileSource) - { - AgentFile fileDataSource = await client.UploadFileAsync(GetFile(), AgentFilePurpose.Agents); - fileId = fileDataSource.Id; - attachment = new MessageAttachment(fileDataSource.Id, tools); - } - else - { - VectorStoreDataSource vectorStoreDataSource = new( - assetIdentifier: TestEnvironment.AZURE_BLOB_URI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - attachment = new MessageAttachment(vectorStoreDataSource, tools); - } - // Test file search - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about." - ); - AgentThread thread; - List opts = null; - if (attachmentOnThread) - { - ThreadMessageOptions messageOp = new( - role: MessageRole.User, - content: "What does the attachment say?" - ); - opts = [messageOp]; - thread = await client.CreateThreadAsync(messages: opts); - } - else - { - thread = await client.CreateThreadAsync(); - await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?", - attachments: [attachment] - ); - } - ThreadRun fileSearchRun = await client.CreateRunAsync(thread, agent); - fileSearchRun = await WaitForRun(client, fileSearchRun); - PageableList messages = await client.GetMessagesAsync(fileSearchRun.ThreadId, fileSearchRun.Id); - Assert.GreaterOrEqual(messages.Data.Count, 1); - } - - // TODO: Check the service and enable this test. - [Ignore("There is a regression on the service side and test will fail. 2025-04-03")] - [RecordedTest] - [TestCase(true, true)] - [TestCase(true, false)] - [TestCase(false, true)] - [TestCase(false, false)] - public async Task TestFileSearchWithCodeInterpreter(bool useFileSource, bool useThreads) - { - if (useFileSource && Mode != RecordedTestMode.Live) - Assert.Inconclusive(FILE_UPLOAD_CONSTRAINT); - AgentsClient client = GetClient(); - CodeInterpreterToolResource toolRes = new(); - if (useFileSource) - { - AgentFile fileDataSource = await client.UploadFileAsync(GetFile(), AgentFilePurpose.Agents); - toolRes.FileIds.Add(fileDataSource.Id); - } - else - { - VectorStoreDataSource vectorStoreDataSource = new( - assetIdentifier: TestEnvironment.AZURE_BLOB_URI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - toolRes.DataSources.Add(vectorStoreDataSource); - } - ToolResources resources = new() - { - CodeInterpreter = toolRes - }; - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: [ new CodeInterpreterToolDefinition() ], - toolResources: useThreads ? null : resources - ); - AgentThread thread = await client.CreateThreadAsync( - toolResources: useThreads ? resources : null - ); - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What Contoso Galaxy Innovations produces?" - ); - ThreadRun fileSearchRun = await client.CreateRunAsync(thread, agent); - - long milliseconds = DateTimeOffset.Now.ToUnixTimeMilliseconds(); - fileSearchRun = await WaitForRun(client, fileSearchRun); - Console.WriteLine((milliseconds - DateTimeOffset.Now.ToUnixTimeMilliseconds()) / 1000); - PageableList messages = await client.GetMessagesAsync(fileSearchRun.ThreadId, fileSearchRun.Id); - Assert.Greater(messages.Data.Count, 1); - } - - [RecordedTest] - public async Task TestCreateVectorStoreOnline() - { - AgentsClient client = GetClient(); - VectorStoreDataSource vectorStoreDataSource = new( - assetIdentifier: TestEnvironment.AZURE_BLOB_URI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - FileSearchToolResource fileSearch = new(); - fileSearch.VectorStores.Add(new VectorStoreConfigurations( - storeName: VCT_STORE_NAME, - new VectorStoreConfiguration([vectorStoreDataSource]) - ) - ); - ToolResources tools = new() - { - FileSearch=fileSearch - }; - - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: [new FileSearchToolDefinition()], - toolResources: tools - ); - AgentThread thread = await client.CreateThreadAsync(); - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?" - ); - ThreadRun fileSearchRun = await client.CreateRunAsync(thread, agent); - - fileSearchRun = await WaitForRun(client, fileSearchRun); - PageableList messages = await client.GetMessagesAsync(fileSearchRun.ThreadId, fileSearchRun.Id); - Assert.GreaterOrEqual(messages.Data.Count, 1); - } - - [RecordedTest] - // TODO: Implement include in streaming scenario, see task 3801146. - // [TestCase(true, true)] - [TestCase(true, false)] - [TestCase(false, true)] - [TestCase(false, false)] - public async Task TestIncludeFileSearchContent(bool useStream, bool includeContent) - { - if (useStream && !IsAsync) - Assert.Inconclusive(STREAMING_CONSTRAINT); - AgentsClient client = GetClient(); - VectorStoreDataSource vectorStoreDataSource = new( - assetIdentifier: TestEnvironment.AZURE_BLOB_URI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - VectorStoreConfiguration vectorStoreConf = new( - dataSources: [vectorStoreDataSource] - ); - VectorStore vctStore = await client.CreateVectorStoreAsync( - name: VCT_STORE_NAME, - storeConfiguration: vectorStoreConf - ); - FileSearchToolResource fileSearch = new(); - fileSearch.VectorStoreIds.Add(vctStore.Id); - - ToolResources tools = new() - { - FileSearch = fileSearch - }; - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "Hello, you are helpful assistant and can search information from uploaded files", - tools: [new FileSearchToolDefinition()], - toolResources: tools - ); - AgentThread thread = await client.CreateThreadAsync(); - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What Contoso Galaxy Innovations produces?" - ); - List include = includeContent ? [RunAdditionalFieldList.FileSearchContents] : null; - ThreadRun fileSearchRun = null; - if (useStream) - { - // TODO: Implement include in streaming scenario, see task 3801146. - await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id)) - { - if (streamingUpdate is RunUpdate runUpdate) - fileSearchRun = runUpdate.Value; - } - Assert.IsNotNull(fileSearchRun); - } - else - { - fileSearchRun = await client.CreateRunAsync(thread.Id, agent.Id, include: include); - - fileSearchRun = await WaitForRun(client, fileSearchRun); - PageableList messages = await client.GetMessagesAsync(fileSearchRun.ThreadId, fileSearchRun.Id); - Assert.AreEqual(RunStatus.Completed, fileSearchRun.Status); - Assert.GreaterOrEqual(messages.Data.Count, 1); - } - // TODO: Implement include in streaming scenario, see task 3801146. - PageableList steps = await client.GetRunStepsAsync( - threadId: fileSearchRun.ThreadId, - runId: fileSearchRun.Id - // include: include - ); - Assert.GreaterOrEqual(steps.Data.Count, 1); - RunStep step = await client.GetRunStepAsync(fileSearchRun.ThreadId, fileSearchRun.Id, steps.Data[1].Id, include: include); - - Assert.That(step.StepDetails is RunStepToolCallDetails); - RunStepToolCallDetails toolCallDetails = step.StepDetails as RunStepToolCallDetails; - Assert.That(toolCallDetails.ToolCalls[0] is RunStepFileSearchToolCall); - RunStepFileSearchToolCall fileSearchCall = toolCallDetails.ToolCalls[0] as RunStepFileSearchToolCall; - Assert.Greater(fileSearchCall.FileSearch.Results.Count, 0); - if (includeContent) - { - Assert.Greater(fileSearchCall.FileSearch.Results[0].Content.Count, 0); - Assert.AreEqual(FileSearchToolCallContentType.Text, fileSearchCall.FileSearch.Results[0].Content[0].Type); - Assert.False(string.IsNullOrEmpty(fileSearchCall.FileSearch.Results[0].Content[0].Text)); - } - else - { - Assert.AreEqual(0, fileSearchCall.FileSearch.Results[0].Content.Count); - } - } - - [RecordedTest] - public async Task TestAzureFunctionCall() - { - // Note: This test was recorded in westus region as for now - // 2025-02-05 it is not supported in test region (East US 2) - AzureFunctionToolDefinition azureFnTool = new( - name: "foo", - description: "Get answers from the foo bot.", - inputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-foo-input", - storageServiceEndpoint: TestEnvironment.STORAGE_QUEUE_URI - ) - ), - outputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-tool-output", - storageServiceEndpoint: TestEnvironment.STORAGE_QUEUE_URI - ) - ), - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - query = new - { - Type = "string", - Description = "The question to ask.", - }, - outputqueueuri = new - { - Type = "string", - Description = "The full output queue uri." - } - }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ) - ); - AgentsClient client = GetClient(); - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are a helpful support agent. Use the provided function any " - + "time the prompt contains the string 'What would foo say?'. When you invoke " - + "the function, ALWAYS specify the output queue uri parameter as " - + $"'{TestEnvironment.STORAGE_QUEUE_URI}/azure-function-tool-output'. Always responds with " - + "\"Foo says\" and then the response from the tool.", - tools: new List { azureFnTool } - ); - AgentThread thread = await client.CreateThreadAsync(); - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the most prevalent element in the universe? What would foo say?"); - ThreadRun run = await client.CreateRunAsync(thread, agent); - await WaitForRun(client, run); - PageableList afterRunMessages = await client.GetMessagesAsync(thread.Id); - - Assert.Greater(afterRunMessages.Count(), 1); - bool foundResponse = false; - foreach (ThreadMessage msg in afterRunMessages) - { - foreach (MessageContent contentItem in msg.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (textItem.Text.ToLower().Contains("bar")) - { - foundResponse = true; - break; - } - } - } - } - Assert.True(foundResponse); - } - - [RecordedTest] - public async Task TestClientWithThreadMessages() - { - AgentsClient client = GetClient(); - Agent agent = await GetAgent( - client, - instruction: "You are a personal electronics tutor. Write and run code to answer questions."); - - List messages = [ - new(role: MessageRole.Agent, content: "E=mc^2"), - new(role: MessageRole.Agent, content: "What is the impedance formula?") - ]; - AgentThread thread = await client.CreateThreadAsync(messages: messages); - ThreadRun run = await client.CreateRunAsync(thread, agent); - run = await WaitForRun(client, run); - Assert.AreEqual(RunStatus.Completed, run.Status); - PageableList afterRunMessages = await client.GetMessagesAsync(thread.Id); - Assert.Greater(afterRunMessages.Count(), 1); - } - - [Ignore(FILE_UPLOAD_CONSTRAINT)] - [RecordedTest] - public async Task TestGenerateImageFile() - { - string tempDir = CreateTempDirMayBe(); - FileInfo file = new(Path.Combine(tempDir, FILE_NAME2)); - using (FileStream stream = file.OpenWrite()) - { - string content = "This is a test file"; - stream.Write(Encoding.UTF8.GetBytes(content), 0, content.Length); - }; - - AgentsClient client = GetClient(); - AgentFile fileDataSource = await client.UploadFileAsync(file.FullName, AgentFilePurpose.Agents); - - CodeInterpreterToolResource cdResource = new(); - cdResource.FileIds.Add(fileDataSource.Id); - ToolResources toolRes = new(); - toolRes.CodeInterpreter = cdResource; - - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are helpful assistant", - tools: [new CodeInterpreterToolDefinition()], - toolResources: toolRes - ); - - AgentThread thread = await client.CreateThreadAsync(); - await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "Create an image file same as the text file and give me file id?" - ); - ThreadRun run = await client.CreateRunAsync(thread, agent); - run = await WaitForRun(client, run); - PageableList messages = await client.GetMessagesAsync(run.ThreadId, run.Id); - bool foundId = false; - foreach (ThreadMessage msg in messages) - { - foreach (MessageContent cont in msg.ContentItems) - { - if (cont is MessageTextContent textCont) - { - foreach (MessageTextAnnotation annotation in textCont.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - Assert.NotNull(pathAnnotation.FileId); - foundId = true; - } - } - } - } - } - Assert.True(foundId); - } - - [RecordedTest] - [TestCase(AzureAISearchQueryTypeEnum.Simple)] - [TestCase(AzureAISearchQueryTypeEnum.Semantic)] - [TestCase(AzureAISearchQueryTypeEnum.Vector)] - [TestCase(AzureAISearchQueryTypeEnum.VectorSimpleHybrid)] - [TestCase(AzureAISearchQueryTypeEnum.VectorSemanticHybrid)] - public async Task TestAzureAiSearch(AzureAISearchQueryTypeEnum queryType) - { - AgentsClient client = GetClient(); - ListConnectionsResponse connections = await GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); - - ConnectionResponse connection = connections.Value[0]; - - AISearchIndexResource indexList = new(connection.Id, "sample_index"); - indexList.QueryType = SearchQueryTypes[queryType]; - ToolResources searchResource = new() - { - AzureAISearch = new AzureAISearchResource - { - IndexList = { indexList } - } - }; - - Agent agent = await client.CreateAgentAsync( - model: "gpt-4", - name: AGENT_NAME, - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: searchResource); - - // Create thread for communication - AgentThread thread = await client.CreateThreadAsync(); - - // Create message to thread - await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - Response runResponse = await client.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - runResponse = await client.GetRunAsync(thread.Id, runResponse.Value.Id); - } - while (runResponse.Value.Status == RunStatus.Queued - || runResponse.Value.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - runResponse.Value.Status, - runResponse.Value.LastError?.Message); - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - // Note: messages iterate from newest to oldest, with the messages[0] being the most recent - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" resp = await client.DeleteAgentAsync(agent.Id); - Assert.IsTrue(resp.Value); - } - - private static async Task GetAgent(AgentsClient client, string agentName=AGENT_NAME, string instruction= "You are helpful assistant.") - { - return await client.CreateAgentAsync( - model: "gpt-4", - name: agentName, - instructions: instruction - ); - } - - private static async Task GetThread(AgentsClient client, Dictionary metadata=null) - { - Agent agent = await GetAgent(client); - return await client.CreateThreadAsync(metadata: metadata); - } - - private static byte[] GetBytes(object value) - { - return Encoding.ASCII.GetBytes(JsonSerializer.Serialize(value)); - } - - private static MemoryStream GetStream(object value) - { - MemoryStream stream = new(); - stream.Write(GetBytes(value), 0, GetBytes(value).Length); - stream.Position = 0; - return stream; - } - - private static string GetFieldFromJson(BinaryData json, string field) - { - JsonDocument document = JsonDocument.Parse(json); - foreach (JsonProperty property in document.RootElement.EnumerateObject()) - { - if (property.NameEquals(field)) - { - return property.Value.GetString(); - } - } - return default; - } - - private async Task WaitForRun(AgentsClient client, ThreadRun run) - { - double delay = 500; - if (Mode == RecordedTestMode.Playback) - { - // No need to wait during playback. - delay = 1; - } - do - { - await Task.Delay(TimeSpan.FromMilliseconds(delay)); - run = await client.GetRunAsync(run.ThreadId, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); - Assert.AreEqual(RunStatus.Completed, run.Status, message: run.LastError?.Message?.ToString()); - return run; - } - - private static string GetFile([CallerFilePath] string pth = "") - { - var dirName = Path.GetDirectoryName(pth) ?? ""; - return Path.Combine(new string[] { dirName, "TestData", FILE_NAME }); - } - - private static async Task CountElementsAndRemoveIds(AgentsClient client, HashSet ids) - { - PageableList agentsResp; - int count = 0; - string lastId = null; - do - { - agentsResp = await client.GetAgentsAsync(limit: 100, after: lastId); - foreach (Agent agent in agentsResp) - ids.Remove(agent.Id); - count += agentsResp.Count(); - lastId = agentsResp.LastId; - } - while (agentsResp.HasMore); - return count; - } - - private ConnectionsClient GetConnectionsClient() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - // If we are in the Playback, do not ask for authentication. - if (Mode == RecordedTestMode.Playback) - { - return InstrumentClient(new ConnectionsClient(connectionString, new MockCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - // For local testing if you are using non default account - // add USE_CLI_CREDENTIAL into the .runsettings and set it to true, - // also provide the PATH variable. - // This path should allow launching az command. - var cli = System.Environment.GetEnvironmentVariable("USE_CLI_CREDENTIAL"); - if (!string.IsNullOrEmpty(cli) && string.Compare(cli, "true", StringComparison.OrdinalIgnoreCase) == 0) - { - return InstrumentClient(new ConnectionsClient(connectionString, new AzureCliCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - else - { - return InstrumentClient(new ConnectionsClient(connectionString, new DefaultAzureCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - } - #endregion - #region Cleanup - [TearDown] - public void Cleanup() - { - // Remve temporary directory - DirectoryInfo tempDir = new(Path.Combine(Path.GetTempPath(), TEMP_DIR)); - if (tempDir.Exists) - { - tempDir.Delete(true); - } - if (Mode == RecordedTestMode.Playback) - return; - AgentsClient client; - var cli = System.Environment.GetEnvironmentVariable("USE_CLI_CREDENTIAL"); - if (!string.IsNullOrEmpty(cli) && string.Compare(cli, "true", StringComparison.OrdinalIgnoreCase) == 0) - { - client = new AgentsClient(TestEnvironment.AzureAICONNECTIONSTRING, new AzureCliCredential()); - } - else - { - client = new AgentsClient(TestEnvironment.AzureAICONNECTIONSTRING, new DefaultAzureCredential()); - } - - // Remove all files - IReadOnlyList files = client.GetFiles().Value; - foreach (AgentFile af in files) - { - if (af.Filename.Equals(FILE_NAME) || af.Filename.Equals(FILE_NAME2)) - client.DeleteFile(af.Id); - } - - // Remove all vector stores - AgentPageableListOfVectorStore stores = client.GetVectorStores(); - foreach (VectorStore store in stores.Data) - { - if (store.Name == null || store.Name.Equals(VCT_STORE_NAME)) - client.DeleteVectorStore(store.Id); - } - - // Remove all agents - PageableList agents = client.GetAgents(); - foreach (Agent agent in agents) - { - if (agent.Name.StartsWith(AGENT_NAME)) - client.DeleteAgent(agent.Id); - } - } - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj b/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj index 81d370673fc3..55af3f348443 100644 --- a/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj +++ b/sdk/ai/Azure.AI.Projects/tests/Azure.AI.Projects.Tests.csproj @@ -5,38 +5,28 @@ $(NoWarn);CS1591 - - - - - - - - - - Always - - - - - - - + + + + - + + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/tests/ConnectionsClientTests.cs b/sdk/ai/Azure.AI.Projects/tests/ConnectionsClientTests.cs deleted file mode 100644 index c901c70cb79a..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/ConnectionsClientTests.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests -{ - public class ConnectionsClientTests : RecordedTestBase - { - public ConnectionsClientTests(bool isAsync) : base(isAsync) - { - TestDiagnostics = false; - } - - [RecordedTest] - [TestCase(true)] - [TestCase(false)] - public async Task TestGetDefaultBlobStore(bool withCredentials) - { - ConnectionsClient connectionsClient = GetClient(); - // TODO: When the service will be able to handle - // GetConnection requests, remove this condition. - if (!withCredentials) - { - Response conn = await connectionsClient.GetDefaultConnectionAsync( - category: ConnectionType.AzureBlobStorage, - withCredential: withCredentials, - includeAll: true); - Assert.AreEqual("ai-projects-sdk-testing-project-1/delete2me", conn.Value.Name); - // TODO: When the service will be able to handle - // GetConnection requests, check that it is not none. - Assert.IsNull(conn.GetRawResponse()); - } - else - { - Assert.ThrowsAsync( - () => connectionsClient.GetDefaultConnectionAsync( - category: ConnectionType.AzureBlobStorage, - withCredential: true, - includeAll: true)); - } - } - - [RecordedTest] - public async Task TranslatorTest() - { - ConnectionsClient connectionsClient = GetClient(); - ConnectionResponse conn = await connectionsClient.GetConnectionAsync( - connectionName: "sampleconnection" - ); - Assert.IsNotNull(conn); - } - - #region helpers - private ConnectionsClient GetClient() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - // If we are in the Playback, do not ask for authentication. - if (Mode == RecordedTestMode.Playback) - { - return InstrumentClient(new ConnectionsClient(connectionString, new MockCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - // For local testing if you are using non default account - // add USE_CLI_CREDENTIAL into the .runsettings and set it to true, - // also provide the PATH variable. - // This path should allow launching az command. - var cli = System.Environment.GetEnvironmentVariable("USE_CLI_CREDENTIAL"); - if (!string.IsNullOrEmpty(cli) && string.Compare(cli, "true", StringComparison.OrdinalIgnoreCase) == 0) - { - return InstrumentClient(new ConnectionsClient(connectionString, new AzureCliCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - else - { - return InstrumentClient(new ConnectionsClient(connectionString, new DefaultAzureCredential(), InstrumentClientOptions(new AIProjectClientOptions()))); - } - } - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Connections.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Connections.cs new file mode 100644 index 000000000000..7731b2cf95d6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Connections.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_Connections + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Connection_GetConnections_ConnectionsListMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetConnections("AzureOpenAI", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("isDefault").ToString()); + Console.WriteLine(result.GetProperty("credentials").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Connection_GetConnections_ConnectionsListMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetConnectionsAsync("AzureOpenAI", true, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("target").ToString()); + Console.WriteLine(result.GetProperty("isDefault").ToString()); + Console.WriteLine(result.GetProperty("credentials").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Connection_GetConnections_ConnectionsListMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + + foreach (Connection item in client.GetConnections()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Connection_GetConnections_ConnectionsListMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Connections client = new AIProjectClient(endpoint, credential).GetConnectionsClient(apiVersion: "2025-05-15-preview"); + + await foreach (Connection item in client.GetConnectionsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Datasets.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Datasets.cs new file mode 100644 index 000000000000..bdd1c1c3d0e8 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Datasets.cs @@ -0,0 +1,835 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_Datasets + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetDataset_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDataset("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetDataset_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDatasetAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetDataset_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDataset("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetDataset_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDatasetAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetDataset_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDataset("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetDataset_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDatasetAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetDataset_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDataset("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetDataset_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDatasetAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_Delete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.Delete("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_Delete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.DeleteAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_Delete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.Delete("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_Delete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.DeleteAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_CreateOrUpdate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "uri_file", + dataUri = "", + }); + Response response = client.CreateOrUpdate("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_CreateOrUpdate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "uri_file", + dataUri = "", + }); + Response response = await client.CreateOrUpdateAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_CreateOrUpdate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "uri_file", + dataUri = "", + connectionName = "", + description = "", + tags = new + { + key = "", + }, + }); + Response response = client.CreateOrUpdate("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_CreateOrUpdate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "uri_file", + dataUri = "", + connectionName = "", + description = "", + tags = new + { + key = "", + }, + }); + Response response = await client.CreateOrUpdateAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + pendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + connectionName = "bknvpmlisrqxaphkf", + pendingUploadType = "BlobReference", + }); + Response response = client.PendingUpload("sgrzyrpltz", "ozdqisviavgqgfbtnzk", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + pendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + connectionName = "bknvpmlisrqxaphkf", + pendingUploadType = "BlobReference", + }); + Response response = await client.PendingUploadAsync("sgrzyrpltz", "ozdqisviavgqgfbtnzk", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + PendingUploadRequest body = new PendingUploadRequest + { + PendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + ConnectionName = "bknvpmlisrqxaphkf", + }; + Response response = client.PendingUpload("sgrzyrpltz", "ozdqisviavgqgfbtnzk", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + PendingUploadRequest body = new PendingUploadRequest + { + PendingUploadId = "mxjahcghabuplfwtlopiqgxtcyw", + ConnectionName = "bknvpmlisrqxaphkf", + }; + Response response = await client.PendingUploadAsync("sgrzyrpltz", "ozdqisviavgqgfbtnzk", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + pendingUploadType = "BlobReference", + }); + Response response = client.PendingUpload("duxoiaywfik", "yzzzt", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + pendingUploadType = "BlobReference", + }); + Response response = await client.PendingUploadAsync("duxoiaywfik", "yzzzt", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadId").ToString()); + Console.WriteLine(result.GetProperty("pendingUploadType").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + PendingUploadRequest body = new PendingUploadRequest(); + Response response = client.PendingUpload("duxoiaywfik", "yzzzt", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_PendingUpload_DatasetsStartPendingUploadVersionMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + PendingUploadRequest body = new PendingUploadRequest(); + Response response = await client.PendingUploadAsync("duxoiaywfik", "yzzzt", body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetCredentials_DatasetsGetCredentialsMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetCredentials("vzqmzhfdzfqegdk", "cuiflnznlzybcrc", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetCredentials_DatasetsGetCredentialsMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetCredentialsAsync("vzqmzhfdzfqegdk", "cuiflnznlzybcrc", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetCredentials_DatasetsGetCredentialsMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetCredentials("vzqmzhfdzfqegdk", "cuiflnznlzybcrc"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetCredentials_DatasetsGetCredentialsMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetCredentialsAsync("vzqmzhfdzfqegdk", "cuiflnznlzybcrc"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetCredentials_DatasetsGetCredentialsMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetCredentials("sbblxkyqnfvdiqacezyygvts", "ikak", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetCredentials_DatasetsGetCredentialsMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetCredentialsAsync("sbblxkyqnfvdiqacezyygvts", "ikak", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("blobReference").GetProperty("blobUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("storageAccountArmId").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("sasUri").ToString()); + Console.WriteLine(result.GetProperty("blobReference").GetProperty("credential").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetCredentials_DatasetsGetCredentialsMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetCredentials("sbblxkyqnfvdiqacezyygvts", "ikak"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetCredentials_DatasetsGetCredentialsMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetCredentialsAsync("sbblxkyqnfvdiqacezyygvts", "ikak"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetVersions("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetVersionsAsync("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (DatasetVersion item in client.GetVersions("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (DatasetVersion item in client.GetVersionsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetVersions_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetVersions("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetVersionsAsync("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Datasets_GetVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (DatasetVersion item in client.GetVersions("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Datasets_GetVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (DatasetVersion item in client.GetVersionsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DatasetVersion_GetDatasetVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetDatasetVersions(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DatasetVersion_GetDatasetVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetDatasetVersionsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DatasetVersion_GetDatasetVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (DatasetVersion item in client.GetDatasetVersions()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DatasetVersion_GetDatasetVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (DatasetVersion item in client.GetDatasetVersionsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DatasetVersion_GetDatasetVersions_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetDatasetVersions(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DatasetVersion_GetDatasetVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetDatasetVersionsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("dataUri").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("isReference").ToString()); + Console.WriteLine(result.GetProperty("connectionName").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_DatasetVersion_GetDatasetVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + foreach (DatasetVersion item in client.GetDatasetVersions()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_DatasetVersion_GetDatasetVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Datasets client = new AIProjectClient(endpoint, credential).GetDatasetsClient(apiVersion: "2025-05-15-preview"); + + await foreach (DatasetVersion item in client.GetDatasetVersionsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Deployments.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Deployments.cs new file mode 100644 index 000000000000..76a58963e36b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Deployments.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_Deployments + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Deployment_GetDeployment_DeploymentsGetMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDeployment("qqvacpzjfk", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Deployment_GetDeployment_DeploymentsGetMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDeploymentAsync("qqvacpzjfk", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Deployment_GetDeployment_DeploymentsGetMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetDeployment("qqvacpzjfk"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Deployment_GetDeployment_DeploymentsGetMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetDeploymentAsync("qqvacpzjfk"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Deployment_GetDeployments_DeploymentsListMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetDeployments("kznreojrvlwdq", "gplerszsuyisseeksnyvkaqperxox", null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Deployment_GetDeployments_DeploymentsListMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetDeploymentsAsync("kznreojrvlwdq", "gplerszsuyisseeksnyvkaqperxox", null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Deployment_GetDeployments_DeploymentsListMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + foreach (Deployment item in client.GetDeployments()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Deployment_GetDeployments_DeploymentsListMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Deployments client = new AIProjectClient(endpoint, credential).GetDeploymentsClient(apiVersion: "2025-05-15-preview"); + + await foreach (Deployment item in client.GetDeploymentsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Evaluations.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Evaluations.cs new file mode 100644 index 000000000000..a928bca4c661 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Evaluations.cs @@ -0,0 +1,560 @@ +// 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.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_Evaluations + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluation_GetEvaluation_EvaluationsGetMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetEvaluation("so", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluation_GetEvaluation_EvaluationsGetMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetEvaluationAsync("so", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluation_GetEvaluation_EvaluationsGetMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetEvaluation("so"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluation_GetEvaluation_EvaluationsGetMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetEvaluationAsync("so"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_Create_EvaluationsCreateMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + displayName = "ymjxkodggqrhjnmusta", + description = "cuviaxytqckkybxwc", + tags = new + { + key30 = "nqrdpedyhkjzgrbtqhxbmkdmlpdf", + }, + properties = new + { + key9192 = "e", + }, + evaluators = new + { + key2735 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + }); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_Create_EvaluationsCreateMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + displayName = "ymjxkodggqrhjnmusta", + description = "cuviaxytqckkybxwc", + tags = new + { + key30 = "nqrdpedyhkjzgrbtqhxbmkdmlpdf", + }, + properties = new + { + key9192 = "e", + }, + evaluators = new + { + key2735 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + }); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_Create_EvaluationsCreateMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Evaluation evaluation = new Evaluation(null, new Dictionary + { + ["key2735"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = +{ +["key7400"] = "ijkjfvoswni" +}, + } + }) + { + DisplayName = "ymjxkodggqrhjnmusta", + Description = "cuviaxytqckkybxwc", + Tags = +{ +["key30"] = "nqrdpedyhkjzgrbtqhxbmkdmlpdf" +}, + Properties = +{ +["key9192"] = "e" +}, + }; + Response response = client.Create(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_Create_EvaluationsCreateMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Evaluation evaluation = new Evaluation(null, new Dictionary + { + ["key2735"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = +{ +["key7400"] = "ijkjfvoswni" +}, + } + }) + { + DisplayName = "ymjxkodggqrhjnmusta", + Description = "cuviaxytqckkybxwc", + Tags = +{ +["key30"] = "nqrdpedyhkjzgrbtqhxbmkdmlpdf" +}, + Properties = +{ +["key9192"] = "e" +}, + }; + Response response = await client.CreateAsync(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_Create_EvaluationsCreateMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + evaluators = new object(), + }); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_Create_EvaluationsCreateMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + evaluators = new object(), + }); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_Create_EvaluationsCreateMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Evaluation evaluation = new Evaluation(null, new Dictionary()); + Response response = client.Create(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_Create_EvaluationsCreateMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + Evaluation evaluation = new Evaluation(null, new Dictionary()); + Response response = await client.CreateAsync(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + runId = "ecfcffqsrdhpecocrufffiqz", + threadId = "cxjjsyhkeezgnaqqyerrdrbbth", + evaluators = new + { + key2653 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + samplingConfiguration = new + { + name = "tj", + samplingPercent = 7F, + maxRequestRate = 8F, + }, + redactionConfiguration = new + { + redactScoreProperties = true, + }, + appInsightsConnectionString = "dvcnrcwar", + }); + Response response = client.CreateAgentEvaluation(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + runId = "ecfcffqsrdhpecocrufffiqz", + threadId = "cxjjsyhkeezgnaqqyerrdrbbth", + evaluators = new + { + key2653 = new + { + id = "gujwtvhptykq", + initParams = new object(), + dataMapping = new + { + key7400 = "ijkjfvoswni", + }, + }, + }, + samplingConfiguration = new + { + name = "tj", + samplingPercent = 7F, + maxRequestRate = 8F, + }, + redactionConfiguration = new + { + redactScoreProperties = true, + }, + appInsightsConnectionString = "dvcnrcwar", + }); + Response response = await client.CreateAgentEvaluationAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary + { + ["key2653"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = +{ +["key7400"] = "ijkjfvoswni" +}, + } + }, "dvcnrcwar") + { + ThreadId = "cxjjsyhkeezgnaqqyerrdrbbth", + SamplingConfiguration = new AgentEvaluationSamplingConfiguration("tj", 7F, 8F), + RedactionConfiguration = new AgentEvaluationRedactionConfiguration + { + RedactScoreProperties = true, + }, + }; + Response response = client.CreateAgentEvaluation(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary + { + ["key2653"] = new EvaluatorConfiguration("gujwtvhptykq") + { + InitParams = { }, + DataMapping = +{ +["key7400"] = "ijkjfvoswni" +}, + } + }, "dvcnrcwar") + { + ThreadId = "cxjjsyhkeezgnaqqyerrdrbbth", + SamplingConfiguration = new AgentEvaluationSamplingConfiguration("tj", 7F, 8F), + RedactionConfiguration = new AgentEvaluationRedactionConfiguration + { + RedactScoreProperties = true, + }, + }; + Response response = await client.CreateAgentEvaluationAsync(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + runId = "ecfcffqsrdhpecocrufffiqz", + evaluators = new object(), + appInsightsConnectionString = "dvcnrcwar", + }); + Response response = client.CreateAgentEvaluation(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + runId = "ecfcffqsrdhpecocrufffiqz", + evaluators = new object(), + appInsightsConnectionString = "dvcnrcwar", + }); + Response response = await client.CreateAgentEvaluationAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary(), "dvcnrcwar"); + Response response = client.CreateAgentEvaluation(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluations_CreateAgentEvaluation_EvaluationsCreateAgentEvaluationMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary(), "dvcnrcwar"); + Response response = await client.CreateAgentEvaluationAsync(evaluation); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluation_GetEvaluations_EvaluationsListMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetEvaluations(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluation_GetEvaluations_EvaluationsListMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetEvaluationsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("data").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("evaluators").GetProperty("").GetProperty("id").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Evaluation_GetEvaluations_EvaluationsListMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + foreach (Evaluation item in client.GetEvaluations()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Evaluation_GetEvaluations_EvaluationsListMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview"); + + await foreach (Evaluation item in client.GetEvaluationsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Indexes.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Indexes.cs new file mode 100644 index 000000000000..52d4e8245952 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_Indexes.cs @@ -0,0 +1,577 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_Indexes + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetIndex_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetIndex("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetIndex_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetIndexAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetIndex_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetIndex("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetIndex_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetIndexAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetIndex_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetIndex("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetIndex_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetIndexAsync("", "", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetIndex_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetIndex("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetIndex_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetIndexAsync("", ""); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_Delete_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.Delete("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_Delete_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.DeleteAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_Delete_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = client.Delete("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_Delete_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.DeleteAsync("", ""); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_CreateOrUpdate_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "AzureSearch", + connectionName = "", + indexName = "", + }); + Response response = client.CreateOrUpdate("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_CreateOrUpdate_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "AzureSearch", + connectionName = "", + indexName = "", + }); + Response response = await client.CreateOrUpdateAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_CreateOrUpdate_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "AzureSearch", + connectionName = "", + indexName = "", + fieldMapping = new + { + contentFields = new object[] + { +"" + }, + filepathField = "", + titleField = "", + urlField = "", + vectorFields = new object[] + { +"" + }, + metadataFields = new object[] + { +"" + }, + }, + description = "", + tags = new + { + key = "", + }, + }); + Response response = client.CreateOrUpdate("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_CreateOrUpdate_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + type = "AzureSearch", + connectionName = "", + indexName = "", + fieldMapping = new + { + contentFields = new object[] + { +"" + }, + filepathField = "", + titleField = "", + urlField = "", + vectorFields = new object[] + { +"" + }, + metadataFields = new object[] + { +"" + }, + }, + description = "", + tags = new + { + key = "", + }, + }); + Response response = await client.CreateOrUpdateAsync("", "", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetVersions_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetVersions("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetVersions_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetVersionsAsync("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetVersions_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (Index item in client.GetVersions("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetVersions_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (Index item in client.GetVersionsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetVersions_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetVersions("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetVersions_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetVersionsAsync("", null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Indexes_GetVersions_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (Index item in client.GetVersions("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Indexes_GetVersions_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (Index item in client.GetVersionsAsync("")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Index_GetIndices_ShortVersion() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetIndices(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Index_GetIndices_ShortVersion_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetIndicesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Index_GetIndices_ShortVersion_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (Index item in client.GetIndices()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Index_GetIndices_ShortVersion_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (Index item in client.GetIndicesAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Index_GetIndices_AllParameters() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetIndices(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Index_GetIndices_AllParameters_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetIndicesAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("version").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("tags").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Index_GetIndices_AllParameters_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + foreach (Index item in client.GetIndices()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Index_GetIndices_AllParameters_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Indexes client = new AIProjectClient(endpoint, credential).GetIndexesClient(apiVersion: "2025-05-15-preview"); + + await foreach (Index item in client.GetIndicesAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_RedTeams.cs b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_RedTeams.cs new file mode 100644 index 000000000000..1652693539c8 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Generated/Samples/Samples_RedTeams.cs @@ -0,0 +1,349 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Projects.Samples +{ + public partial class Samples_RedTeams + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeam_GetRedTeam_RedTeamsGetMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetRedTeam("apwpcf", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeam_GetRedTeam_RedTeamsGetMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetRedTeamAsync("apwpcf", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeam_GetRedTeam_RedTeamsGetMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + Response response = client.GetRedTeam("apwpcf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeam_GetRedTeam_RedTeamsGetMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + Response response = await client.GetRedTeamAsync("apwpcf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeams_Create_RedTeamsCreateMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + numTurns = 10, + attackStrategies = new object[] + { +"easy" + }, + simulationOnly = true, + riskCategories = new object[] + { +"HateUnfairness" + }, + applicationScenario = "qaxxxhjp", + tags = new + { + key1287 = "gbklekkgmxkfbhehgh", + }, + properties = new + { + key9280 = "fwzjtipl", + }, + }); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeams_Create_RedTeamsCreateMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + numTurns = 10, + attackStrategies = new object[] + { +"easy" + }, + simulationOnly = true, + riskCategories = new object[] + { +"HateUnfairness" + }, + applicationScenario = "qaxxxhjp", + tags = new + { + key1287 = "gbklekkgmxkfbhehgh", + }, + properties = new + { + key9280 = "fwzjtipl", + }, + }); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeams_Create_RedTeamsCreateMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + RedTeam redTeam = new RedTeam(null) + { + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + ApplicationScenario = "qaxxxhjp", + Tags = +{ +["key1287"] = "gbklekkgmxkfbhehgh" +}, + Properties = +{ +["key9280"] = "fwzjtipl" +}, + }; + Response response = client.Create(redTeam); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeams_Create_RedTeamsCreateMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + RedTeam redTeam = new RedTeam(null) + { + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + ApplicationScenario = "qaxxxhjp", + Tags = +{ +["key1287"] = "gbklekkgmxkfbhehgh" +}, + Properties = +{ +["key9280"] = "fwzjtipl" +}, + }; + Response response = await client.CreateAsync(redTeam); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeams_Create_RedTeamsCreateMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + numTurns = 10, + attackStrategies = new object[] + { +"easy" + }, + simulationOnly = true, + riskCategories = new object[] + { +"HateUnfairness" + }, + }); + Response response = client.Create(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeams_Create_RedTeamsCreateMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + using RequestContent content = RequestContent.Create(new + { + numTurns = 10, + attackStrategies = new object[] + { +"easy" + }, + simulationOnly = true, + riskCategories = new object[] + { +"HateUnfairness" + }, + }); + Response response = await client.CreateAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeams_Create_RedTeamsCreateMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + RedTeam redTeam = new RedTeam(null) + { + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + }; + Response response = client.Create(redTeam); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeams_Create_RedTeamsCreateMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + RedTeam redTeam = new RedTeam(null) + { + NumTurns = 10, + AttackStrategies = { AttackStrategy.Easy }, + SimulationOnly = true, + RiskCategories = { RiskCategory.HateUnfairness }, + }; + Response response = await client.CreateAsync(redTeam); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeam_GetRedTeams_RedTeamsListMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + foreach (BinaryData item in client.GetRedTeams(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeam_GetRedTeams_RedTeamsListMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + await foreach (BinaryData item in client.GetRedTeamsAsync(null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("target").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RedTeam_GetRedTeams_RedTeamsListMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + foreach (RedTeam item in client.GetRedTeams()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RedTeam_GetRedTeams_RedTeamsListMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + RedTeams client = new AIProjectClient(endpoint, credential).GetRedTeamsClient(apiVersion: "2025-05-15-preview"); + + await foreach (RedTeam item in client.GetRedTeamsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/CustomHeaderPolicy.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/CustomHeaderPolicy.cs deleted file mode 100644 index 01d779b3d642..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/CustomHeaderPolicy.cs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using Azure.Core.Pipeline; -using Azure.Core; - -namespace Azure.AI.Projects.Tests; - -internal class CustomHeadersPolicy : HttpPipelineSynchronousPolicy -{ - public override void OnSendingRequest(HttpMessage message) - { - message.Request.Headers.Add("x-ms-enable-preview", "true"); - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Additional_messages.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Additional_messages.cs deleted file mode 100644 index bb5f0955263e..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Additional_messages.cs +++ /dev/null @@ -1,164 +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.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; -public partial class Sample_Agent_Multiple_Messages : SamplesBase -{ - [Test] - [AsyncOnly] - public async Task CreateAdditionalMessageExampleAsync() - { - #region Snippet:Sample_Agent_Multiple_Messages_CreateAsync -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var projectClient = new AIProjectClient( - connectionString, - new DefaultAzureCredential()); - var agentClient = projectClient.GetAgentsClient(); - - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "Math Tutor", - instructions: "You are a personal electronics tutor. Write and run code to answer questions.", - tools: [new CodeInterpreterToolDefinition()]); - #endregion - #region Snippet:Sample_Agent_Multiple_Messages_RunAsync - AgentThread thread = await agentClient.CreateThreadAsync(); - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the impedance formula?"); - - ThreadRun agentRun = await agentClient.CreateRunAsync( - threadId: thread.Id, - agent.Id, - additionalMessages: [ - new ThreadMessageOptions( - role: MessageRole.Agent, - content: "E=mc^2" - ), - new ThreadMessageOptions( - role: MessageRole.User, - content: "What is the impedance formula?" - ), - ] - ); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - agentRun = await agentClient.GetRunAsync(thread.Id, agentRun.Id); - } - while (agentRun.Status == RunStatus.Queued - || agentRun.Status == RunStatus.InProgress); - #endregion - #region Snippet:Sample_Agent_Multiple_Messages_PrintAsync - PageableList messages = await agentClient.GetMessagesAsync(thread.Id, order:ListSortOrder.Ascending); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages(thread.Id, order: ListSortOrder.Ascending); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task AzureFunctionCallingExampleAsync() - { - #region Snippet:AzureFunctionsDefineFunctionTools -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var storageQueueUri = System.Environment.GetEnvironmentVariable("STORAGE_QUEUE_URI"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - var storageQueueUri = TestEnvironment.STORAGE_QUEUE_URI; -#endif - - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - AzureFunctionToolDefinition azureFnTool = new( - name: "foo", - description: "Get answers from the foo bot.", - inputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-foo-input", - storageServiceEndpoint: storageQueueUri - ) - ), - outputBinding: new AzureFunctionBinding( - new AzureFunctionStorageQueue( - queueName: "azure-function-tool-output", - storageServiceEndpoint: storageQueueUri - ) - ), - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - query = new - { - Type = "string", - Description = "The question to ask.", - }, - outputqueueuri = new - { - Type = "string", - Description = "The full output queue uri." - } - }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase } - ) - ); - #endregion - - #region Snippet:AzureFunctionsCreateAgentWithFunctionTools - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful support agent. Use the provided function any " - + "time the prompt contains the string 'What would foo say?'. When you invoke " - + "the function, ALWAYS specify the output queue uri parameter as " - + $"'{storageQueueUri}/azure-function-tool-output'. Always responds with " - + "\"Foo says\" and then the response from the tool.", - tools: [ azureFnTool ] - ); - #endregion - #region Snippet:AzureFunctionsHandlePollingWithRequiredAction - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the most prevalent element in the universe? What would foo say?"); - - ThreadRun run = await client.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:AzureFunctionsPrint - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task BasicExample() - { - #region Snippet:OverviewCreateAgentClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - - // Step 1: Create an agent - #region Snippet:OverviewCreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "Math Tutor", - instructions: "You are a personal math tutor. Write and run code to answer math questions." - ); - #endregion - - //// Step 2: Create a thread - #region Snippet:OverviewCreateThread - AgentThread thread = await client.CreateThreadAsync(); - #endregion - - Response> threadsListResponse = await client.GetThreadsAsync(); - - // Step 3: Add a message to a thread - #region Snippet:OverviewCreateMessage - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "I need to solve the equation `3x + 11 = 14`. Can you help me?"); - #endregion - - // Intermission: message is now correlated with thread - // Intermission: listing messages will retrieve the message just added - - Response> messagesListResponse = await client.GetMessagesAsync(thread.Id); - - // Step 4: Run the agent - #region Snippet:OverviewCreateRun - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id, - additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); - #endregion - - #region Snippet:OverviewWaitForRun - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:OverviewListUpdatedMessages - PageableList messages - = await client.GetMessagesAsync( - threadId: thread.Id, order: ListSortOrder.Ascending); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($"> threadsListResponse = client.GetThreads(); - Assert.That(threadsListResponse.Value.Data[0].Id == thread.Id); - - // Step 3: Add a message to a thread - #region Snippet:OverviewCreateMessageSync - ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "I need to solve the equation `3x + 11 = 14`. Can you help me?"); - #endregion - - // Intermission: message is now correlated with thread - // Intermission: listing messages will retrieve the message just added - - Response> messagesListResponse = client.GetMessages(thread.Id); - Assert.That(messagesListResponse.Value.Data[0].Id == message.Id); - - // Step 4: Run the agent - #region Snippet:OverviewCreateRunSync - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id, - additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); - #endregion - - #region Snippet:OverviewWaitForRunSync - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:OverviewListUpdatedMessagesSync - PageableList messages - = client.GetMessages( - threadId: thread.Id, order: ListSortOrder.Ascending); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task BingGroundingExampleAsync() - { - #region Snippet:BingGrounding_CreateProject -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var bingConnectionName = System.Environment.GetEnvironmentVariable("BING_CONNECTION_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - var bingConnectionName = TestEnvironment.BINGCONNECTIONNAME; -#endif - - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - - AgentsClient agentClient = projectClient.GetAgentsClient(); - #endregion - #region Snippet:BingGroundingAsync_GetConnection - ConnectionResponse bingConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(bingConnectionName); - var connectionId = bingConnection.Id; - - ToolConnectionList connectionList = new() - { - ConnectionList = { new ToolConnection(connectionId) } - }; - BingGroundingToolDefinition bingGroundingTool = new(connectionList); - #endregion - #region Snippet:BingGroundingAsync_CreateAgent - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ bingGroundingTool ]); - #endregion - // Create thread for communication - # region Snippet:BingGroundingAsync_CreateThreadMessage - AgentThread thread = await agentClient.CreateThreadAsync(); - - // Create message to thread - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "How does wikipedia explain Euler's Identity?"); - - // Run the agent - ThreadRun run = await agentClient.CreateRunAsync(thread, agent); - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:BingGroundingAsync_Print - PageableList messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task ConnectedAgentExampleAsync() - { - #region Snippet:ConnectedAgent_CreateProject -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - - AgentsClient agentClient = projectClient.GetAgentsClient(); - #endregion - #region Snippet:ConnectedAgentAsync_CreateConnectedAgent - Agent connectedAgent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "stock_price_bot", - instructions: "Your job is to get the stock price of a company. If you don't know the realtime stock price, return the last known stock price."); - - ConnectedAgentToolDefinition connectedAgentDefinition = new(new ConnectedAgentDetails(connectedAgent.Id, connectedAgent.Name, "Gets the stock price of a company")); - #endregion - #region Snippet:ConnectedAgentAsync_CreateAgent - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant, and use the connected agent to get stock prices.", - tools: [ connectedAgentDefinition ]); - #endregion - // Create thread for communication - # region Snippet:ConnectedAgentAsync_CreateThreadMessage - AgentThread thread = await agentClient.CreateThreadAsync(); - - // Create message to thread - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the stock price of Microsoft?"); - - // Run the agent - ThreadRun run = await agentClient.CreateRunAsync(thread, agent); - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:ConnectedAgentAsync_Print - PageableList messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task EnterpriseFileSearchAsync() - { - #region Snippet:EnterpriseFileSearch_CreateProject -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var blobURI = Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:CreateVectorStoreBlob - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store", - storeConfiguration: new VectorStoreConfiguration( - dataSources: [ ds ] - ) - ); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - - List tools = [new FileSearchToolDefinition()]; - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - #endregion - #region Snippet:EnterpriseFileSearchAsync_CreateThreadMessage - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id - ); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:EnterpriseFileSearchAsync_ListUpdatedMessages - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - // Build the map of file IDs to file names. - string after = null; - AgentPageableListOfVectorStoreFile storeFiles; - Dictionary dtFiles = []; - do - { - storeFiles = await client.GetVectorStoreFilesAsync( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = await client.GetFileAsync(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } - } - while (storeFiles.HasMore); - WriteMessages(messages, dtFiles); - #endregion - #region Snippet:EnterpriseFileSearchAsync_Cleanup - VectorStoreDeletionStatus delTask = await client.DeleteVectorStoreAsync(vectorStore.Id); - if (delTask.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void EnterpriseFileSearch() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var blobURI = Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #region Snippet:CreateVectorStoreBlobSync - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - VectorStore vectorStore = client.CreateVectorStore( - name: "sample_vector_store", - storeConfiguration: new VectorStoreConfiguration( - dataSources: [ds] - ) - ); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - - List tools = [new FileSearchToolDefinition()]; - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - #endregion - #region Snippet:EnterpriseFileSearch_CreateThreadMessage - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id - ); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:EnterpriseFileSearch_ListUpdatedMessages - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - // Build the map of file IDs to file names. - string after = null; - AgentPageableListOfVectorStoreFile storeFiles; - Dictionary dtFiles = []; - do - { - storeFiles = client.GetVectorStoreFiles( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = client.GetFile(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } - } - while (storeFiles.HasMore); - WriteMessages(messages, dtFiles); - #endregion - #region Snippet:EnterpriseFileSearch_Cleanup - VectorStoreDeletionStatus delTask = client.DeleteVectorStore(vectorStore.Id); - if (delTask.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:EnterpriseFileSearch_WriteMessages - private static void WriteMessages(IEnumerable messages, Dictionary fileIds) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) - { - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); - } - #endregion -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Fabric.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Fabric.cs deleted file mode 100644 index 03955f6401ff..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Fabric.cs +++ /dev/null @@ -1,217 +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.TestFramework; -using Azure.Identity; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agent_Fabric : SamplesBase -{ - [Test] - [AsyncOnly] - public async Task FabricExampleAsync() - { - #region Snippet:Fabric_CreateProject -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var fabricConnectionName = System.Environment.GetEnvironmentVariable("FABRIC_CONNECTION_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - var fabricConnectionName = TestEnvironment.FABRICCONNECTIONNAME; -#endif - - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - - AgentsClient agentClient = projectClient.GetAgentsClient(); - #endregion - #region Snippet:FabricAsync_GetConnection - ConnectionResponse fabricConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(fabricConnectionName); - var connectionId = fabricConnection.Id; - - ToolConnectionList connectionList = new() - { - ConnectionList = { new ToolConnection(connectionId) } - }; - MicrosoftFabricToolDefinition fabricTool = new(connectionList); - #endregion - #region Snippet:FabricAsync_CreateAgent - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ fabricTool ]); - #endregion - // Create thread for communication - # region Snippet:FabricAsync_CreateThreadMessage - AgentThread thread = await agentClient.CreateThreadAsync(); - - // Create message to thread - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What are the top 3 weather events with highest property damage?"); - - // Run the agent - ThreadRun run = await agentClient.CreateRunAsync(thread, agent); - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:FabricAsync_Print - PageableList messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - string response = textItem.Text; - if (textItem.Annotations != null) - { - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - response = response.Replace(urlAnnotation.Text, $" [{urlAnnotation.UrlCitation.Title}]({urlAnnotation.UrlCitation.Url})"); - } - } - } - Console.Write($"Agent response: {response}"); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - public async Task FabricGroundingExample() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; - - var clientOptions = new AIProjectClientOptions(); - - // Adding the custom headers policy - clientOptions.AddPolicy(new CustomHeadersPolicy(), HttpPipelinePosition.PerCall); - var projectClient = new AIProjectClient(connectionString, new AzureCliCredential(), clientOptions); - - ConnectionResponse fabricConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(TestEnvironment.FABRICCONNECTIONNAME); - var connectionId = fabricConnection.Id; - - AgentsClient agentClient = projectClient.GetAgentsClient(); - - ToolConnectionList connectionList = new ToolConnectionList - { - ConnectionList = { new ToolConnection(connectionId) } - }; - MicrosoftFabricToolDefinition fabricGroundingTool = new MicrosoftFabricToolDefinition(connectionList); - - Response agentResponse = await agentClient.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: new List { fabricGroundingTool }); - Agent agent = agentResponse.Value; - - // Create thread for communication - Response threadResponse = await agentClient.CreateThreadAsync(); - AgentThread thread = threadResponse.Value; - - // Create message to thread - Response messageResponse = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - ""); - ThreadMessage message = messageResponse.Value; - - // Run the agent - Response runResponse = await agentClient.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - runResponse = await agentClient.GetRunAsync(thread.Id, runResponse.Value.Id); - } - while (runResponse.Value.Status == RunStatus.Queued - || runResponse.Value.Status == RunStatus.InProgress); - - Response> afterRunMessagesResponse - = await agentClient.GetMessagesAsync(thread.Id); - IReadOnlyList messages = afterRunMessagesResponse.Value.Data; - - // Note: messages iterate from newest to oldest, with the messages[0] being the most recent - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task FunctionCallingExample() - { - #region Snippet:Functions_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - - #region Snippet:FunctionsDefineFunctionTools - // Example of a function that defines no parameters - string GetUserFavoriteCity() => "Seattle, WA"; - FunctionToolDefinition getUserFavoriteCityTool = new("getUserFavoriteCity", "Gets the user's favorite city."); - // Example of a function with a single required parameter - string GetCityNickname(string location) => location switch - { - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), - }; - FunctionToolDefinition getCityNicknameTool = new( - name: "getCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - // Example of a function with one required and one optional, enum parameter - string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch - { - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() - }; - FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "getCurrentWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - #endregion - - #region Snippet:FunctionsHandleFunctionCalls - ToolOutput GetResolvedToolOutput(RequiredToolCall toolCall) - { - if (toolCall is RequiredFunctionToolCall functionToolCall) - { - if (functionToolCall.Name == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCall, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionToolCall.Arguments); - if (functionToolCall.Name == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCall, GetCityNickname(locationArgument)); - } - if (functionToolCall.Name == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument)); - } - } - return null; - } - #endregion - - #region Snippet:FunctionsCreateAgentWithFunctionTools - // note: parallel function calling is only supported with newer models like gpt-4-1106-preview - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [ getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool ] - ); - #endregion - #region Snippet:Functions_CreateRun - AgentThread thread = await client.CreateThreadAsync(); - - await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - - ThreadRun run = await client.CreateRunAsync(thread, agent); - #endregion - #region Snippet:FunctionsHandlePollingWithRequiredAction - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - - if (run.Status == RunStatus.RequiresAction - && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = []; - foreach (RequiredToolCall toolCall in submitToolOutputsAction.ToolCalls) - { - toolOutputs.Add(GetResolvedToolOutput(toolCall)); - } - run = await client.SubmitToolOutputsToRunAsync(run, toolOutputs); - } - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:Functions_ListMessages - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" "Seattle, WA"; - FunctionToolDefinition getUserFavoriteCityTool = new("getUserFavoriteCity", "Gets the user's favorite city."); - // Example of a function with a single required parameter - string GetCityNickname(string location) => location switch - { - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), - }; - FunctionToolDefinition getCityNicknameTool = new( - name: "getCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - // Example of a function with one required and one optional, enum parameter - string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch - { - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() - }; - FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "getCurrentWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - - ToolOutput GetResolvedToolOutput(RequiredToolCall toolCall) - { - if (toolCall is RequiredFunctionToolCall functionToolCall) - { - if (functionToolCall.Name == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCall, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionToolCall.Arguments); - if (functionToolCall.Name == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCall, GetCityNickname(locationArgument)); - } - if (functionToolCall.Name == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCall, GetWeatherAtLocation(locationArgument)); - } - } - return null; - } - - #region Snippet:FunctionsSyncCreateAgentWithFunctionTools - // note: parallel function calling is only supported with newer models like gpt-4-1106-preview - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool] - ); - #endregion - #region Snippet:FunctionsSync_CreateRun - AgentThread thread = client.CreateThread(); - - client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - - ThreadRun run = client.CreateRun(thread, agent); - #endregion - #region Snippet:FunctionsSyncHandlePollingWithRequiredAction - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - - if (run.Status == RunStatus.RequiresAction - && run.RequiredAction is SubmitToolOutputsAction submitToolOutputsAction) - { - List toolOutputs = []; - foreach (RequiredToolCall toolCall in submitToolOutputsAction.ToolCalls) - { - toolOutputs.Add(GetResolvedToolOutput(toolCall)); - } - run = client.SubmitToolOutputsToRun(run, toolOutputs); - } - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:FunctionsSync_ListMessages - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - #region Snippet:FunctionsWithStreaming_DefineFunctionTools - // Example of a function that defines no parameters - private string GetUserFavoriteCity() => "Seattle, WA"; - private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); - // Example of a function with a single required parameter - private string GetCityNickname(string location) => location switch - { - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), - }; - private FunctionToolDefinition getCityNicknameTool = new( - name: "GetCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - // Example of a function with one required and one optional, enum parameter - private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch - { - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() - }; - private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "GetWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - #endregion - - [Test] - [AsyncOnly] - public async Task FunctionCallingWithStreamingExampleAsync() - { - #region Snippet:FunctionsWithStreaming_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - - #region Snippet:FunctionsWithStreamingUpdateHandling - ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) - { - if (functionName == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCallId, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); - if (functionName == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCallId, GetCityNickname(locationArgument)); - } - if (functionName == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument)); - } - return null; - } - #endregion - #region Snippet:FunctionsWithStreaming_CreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [ getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool ] - ); - #endregion - #region Snippet:FunctionsWithStreaming_CreateThread - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - #endregion - #region Snippet:FunctionsWithStreamingUpdateCycle - List toolOutputs = []; - ThreadRun streamRun = null; - AsyncCollectionResult stream = client.CreateRunStreamingAsync(thread.Id, agent.Id); - do - { - toolOutputs.Clear(); - await foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is RequiredActionUpdate submitToolOutputsUpdate) - { - RequiredActionUpdate newActionUpdate = submitToolOutputsUpdate; - toolOutputs.Add( - GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - )); - streamRun = submitToolOutputsUpdate.Value; - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - if (toolOutputs.Count > 0) - { - stream = client.SubmitToolOutputsToStreamAsync(streamRun, toolOutputs); - } - } - while (toolOutputs.Count > 0); - #endregion - #region Snippet:FunctionsWithStreaming_Cleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void FunctionCallingWithStreamingExample() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - ToolOutput GetResolvedToolOutput(string functionName, string toolCallId, string functionArguments) - { - if (functionName == getUserFavoriteCityTool.Name) - { - return new ToolOutput(toolCallId, GetUserFavoriteCity()); - } - using JsonDocument argumentsJson = JsonDocument.Parse(functionArguments); - if (functionName == getCityNicknameTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - return new ToolOutput(toolCallId, GetCityNickname(locationArgument)); - } - if (functionName == getCurrentWeatherAtLocationTool.Name) - { - string locationArgument = argumentsJson.RootElement.GetProperty("location").GetString(); - if (argumentsJson.RootElement.TryGetProperty("unit", out JsonElement unitElement)) - { - string unitArgument = unitElement.GetString(); - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument, unitArgument)); - } - return new ToolOutput(toolCallId, GetWeatherAtLocation(locationArgument)); - } - return null; - } - - #region Snippet:FunctionsWithStreamingSync_CreateAgent - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getUserFavoriteCityTool, getCityNicknameTool, getCurrentWeatherAtLocationTool] - ); - #endregion - #region Snippet:FunctionsWithStreamingSync_CreateThread - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - #endregion - #region Snippet:FunctionsWithStreamingSyncUpdateCycle - List toolOutputs = []; - ThreadRun streamRun = null; - CollectionResult stream = client.CreateRunStreaming(thread.Id, agent.Id); - do - { - toolOutputs.Clear(); - foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is RequiredActionUpdate submitToolOutputsUpdate) - { - RequiredActionUpdate newActionUpdate = submitToolOutputsUpdate; - toolOutputs.Add( - GetResolvedToolOutput( - newActionUpdate.FunctionName, - newActionUpdate.ToolCallId, - newActionUpdate.FunctionArguments - )); - streamRun = submitToolOutputsUpdate.Value; - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - if (toolOutputs.Count > 0) - { - stream = client.SubmitToolOutputsToStream(streamRun, toolOutputs); - } - } - while (toolOutputs.Count > 0); - #endregion - #region Snippet:FunctionsWithStreamingSync_Cleanup - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_File_Inputs.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_File_Inputs.cs deleted file mode 100644 index f7a8247dd5b5..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_File_Inputs.cs +++ /dev/null @@ -1,253 +0,0 @@ -// 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.Threading; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests -{ - /// - /// Demonstrates examples of sending an image file (along with optional text) - /// as a structured content block in a single message. - /// - /// - /// The examples shows how to create an agent, open a thread, - /// post content blocks combining text and image inputs, - /// and then run the agent to see how it interprets the multimedia input. - /// - public partial class Sample_Agent_ImageFileInputs : SamplesBase - { - [Test] - [AsyncOnly] - public async Task ImageFileInMessageExampleAsync() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - // 1) Create an AgentsClient for agent-management and messaging. - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - - // 2) (Optional) Upload a file for referencing in your message: - #region Snippet:ImageFileInMessageUpload - string pathToImage = Path.Combine( - TestContext.CurrentContext.TestDirectory, - "Samples/Agent/image_file.png" - ); - - // The file might be an image or any relevant binary. - // Make sure the server or container is set up for "Agents" usage if required. - AgentFile uploadedFile = await client.UploadFileAsync( - filePath: pathToImage, - purpose: AgentFilePurpose.Agents - ); - Console.WriteLine($"Uploaded file with ID: {uploadedFile.Id}"); - #endregion - - // 3) Create an agent - #region Snippet:ImageFileInMessageCreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "File Image Understanding Agent", - instructions: "Analyze images from internally uploaded files." - ); - #endregion - - // 4) Create a thread - #region Snippet:ImageFileInMessageCreateThread - AgentThread thread = await client.CreateThreadAsync(); - #endregion - - // 5) Create a message referencing the uploaded file - #region Snippet:ImageFileInMessageCreateMessage - var contentBlocks = new List - { - new MessageInputTextBlock("Here is an uploaded file. Please describe it:"), - new MessageInputImageFileBlock(new MessageImageFileParam(uploadedFile.Id)) - }; - - ThreadMessage imageMessage = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - contentBlocks: contentBlocks - ); - #endregion - - // 6) Run the agent - #region Snippet:ImageFileInMessageCreateRun - ThreadRun run = await client.CreateRunAsync( - threadId: thread.Id, - assistantId: agent.Id - ); - #endregion - - // 7) Wait for the run to complete - #region Snippet:ImageFileInMessageWaitForRun - do - { - await Task.Delay(500); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - - if (run.Status != RunStatus.Completed) - { - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); - } - #endregion - - // 8) Retrieve messages (including any agent responses) and print them - #region Snippet:ImageFileInMessageReview - PageableList messages = await client.GetMessagesAsync(thread.Id); - - foreach (ThreadMessage msg in messages) - { - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } - } - #endregion - - // 9) Cleanup - #region Snippet:ImageFileInMessageCleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void ImageFileInMessageExample() - { -#if SNIPPET - var connectionString = Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - // 1) Create an AgentsClient for agent management and messaging. - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - - // 2) (Optional) Upload a file for referencing in your message: - #region Snippet:ImageFileInMessageUpload_Sync - string pathToImage = Path.Combine( - TestContext.CurrentContext.TestDirectory, - "Samples/Agent/image_file.png" - ); - - // The file might be an image or any relevant binary. - // Make sure the server or container is set up for "Agents" usage if required. - AgentFile uploadedFile = client.UploadFile( - filePath: pathToImage, - purpose: AgentFilePurpose.Agents - ); - Console.WriteLine($"Uploaded file with ID: {uploadedFile.Id}"); - #endregion - - // 3) Create an agent - #region Snippet:ImageFileInMessageCreateAgent_Sync - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "File Image Understanding Agent", - instructions: "Analyze images from internally uploaded files." - ); - #endregion - - // 4) Create a thread - #region Snippet:ImageFileInMessageCreateThread_Sync - AgentThread thread = client.CreateThread(); - #endregion - - // 5) Create a message referencing the uploaded file - #region Snippet:ImageFileInMessageCreateMessage_Sync - var contentBlocks = new List - { - new MessageInputTextBlock("Here is an uploaded file. Please describe it:"), - new MessageInputImageFileBlock(new MessageImageFileParam(uploadedFile.Id)) - }; - - ThreadMessage imageMessage = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks - ); - #endregion - - // 6) Run the agent - #region Snippet:ImageFileInMessageCreateRun_Sync - ThreadRun run = client.CreateRun( - threadId: thread.Id, - assistantId: agent.Id - ); - #endregion - - // 7) Wait for the run to complete - #region Snippet:ImageFileInMessageWaitForRun_Sync - do - { - Thread.Sleep(500); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - - if (run.Status != RunStatus.Completed) - { - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); - } - #endregion - - // 8) Retrieve messages (including any agent responses) and print them - #region Snippet:ImageFileInMessageReview_Sync - PageableList messages = client.GetMessages(thread.Id); - - foreach (ThreadMessage msg in messages) - { - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } - } - #endregion - - // 9) Cleanup - #region Snippet:ImageFileInMessageCleanup_Sync - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_Url_Inputs.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_Url_Inputs.cs deleted file mode 100644 index 6773d0aebe2b..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Image_Url_Inputs.cs +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests -{ - /// - /// Demonstrates examples of sending an image URL (along with optional text) - /// as a structured content block in a single message. - /// - /// - /// The examples shows how to create an agent, open a thread, - /// post content blocks combining text and image inputs, - /// and then run the agent to see how it interprets the multimedia input. - /// - public partial class Sample_Agent_ImageUrlInputs : SamplesBase - { - [Test] - [AsyncOnly] - public async Task ImageUrlInMessageExampleAsync() - { - #region ImageUrlInMessageCreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - // Create an AgentsClient, enabling agent-management and messaging. - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - #endregion - - // Step 1: Create an agent - #region Snippet:ImageUrlInMessageCreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "Image Understanding Agent", - instructions: "You are an image-understanding assistant. Analyze images and provide textual descriptions." - ); - #endregion - - // Step 2: Create a thread - #region Snippet:ImageUrlInMessageCreateThread - AgentThread thread = await client.CreateThreadAsync(); - #endregion - - // Step 3: Create a message using multiple content blocks. - // Here we combine a short text and an image URL in a single user message. - #region Snippet:ImageUrlInMessageCreateMessage - MessageImageUrlParam imageUrlParam = new MessageImageUrlParam( - url: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" - ); - imageUrlParam.Detail = ImageDetailLevel.High; - var contentBlocks = new List - { - new MessageInputTextBlock("Could you describe this image?"), - new MessageInputImageUrlBlock(imageUrlParam) - }; - - ThreadMessage imageMessage = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks - ); - #endregion - - // Step 4: Run the agent against the thread that now has an image to analyze. - #region Snippet:ImageUrlInMessageCreateRun - ThreadRun run = await client.CreateRunAsync( - threadId: thread.Id, - assistantId: agent.Id - ); - #endregion - - // Step 5: Wait for the run to complete. - #region Snippet:ImageUrlInMessageWaitForRun - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - - if (run.Status != RunStatus.Completed) - { - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); - } - #endregion - - // Step 6: Retrieve messages (including how the agent responds) and print their contents. - #region Snippet:ImageUrlInMessageReview - PageableList messages = await client.GetMessagesAsync(thread.Id); - - foreach (ThreadMessage msg in messages) - { - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } - } - #endregion - - // Step 7: Cleanup - #region Snippet:ImageUrlInMessageCleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void ImageUrlInMessageExample() - { - #region ImageUrlInMessageCreateClient_Sync -#if SNIPPET - var connectionString = Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - // Create an AgentsClient, enabling agent-management and messaging. - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - #endregion - - // Step 1: Create an agent - #region Snippet:ImageUrlInMessageCreateAgent_Sync - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "Image Understanding Agent", - instructions: "You are an image-understanding assistant. Analyze images and provide textual descriptions." - ); - #endregion - - // Step 2: Create a thread - #region Snippet:ImageUrlInMessageCreateThread_Sync - AgentThread thread = client.CreateThread(); - #endregion - - // Step 3: Create a message using multiple content blocks. - // Here we combine a short text and an image URL in a single user message. - #region Snippet:ImageUrlInMessageCreateMessage_Sync - MessageImageUrlParam imageUrlParam = new MessageImageUrlParam( - url: "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg" - ); - imageUrlParam.Detail = ImageDetailLevel.High; - - var contentBlocks = new List - { - new MessageInputTextBlock("Could you describe this image?"), - new MessageInputImageUrlBlock(imageUrlParam) - }; - - ThreadMessage imageMessage = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - contentBlocks: contentBlocks - ); - #endregion - - // Step 4: Run the agent against the thread that has an image to analyze. - #region Snippet:ImageUrlInMessageCreateRun_Sync - ThreadRun run = client.CreateRun( - threadId: thread.Id, - assistantId: agent.Id - ); - #endregion - - // Step 5: Wait for the run to complete. - #region Snippet:ImageUrlInMessageWaitForRun_Sync - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued || run.Status == RunStatus.InProgress); - - if (run.Status != RunStatus.Completed) - { - throw new InvalidOperationException($"Run failed or was canceled: {run.LastError?.Message}"); - } - #endregion - - // Step 6: Retrieve messages (including how the agent responds) and print their contents. - #region Snippet:ImageUrlInMessageReview_Sync - PageableList messages = client.GetMessages(thread.Id); - - foreach (ThreadMessage msg in messages) - { - Console.WriteLine($"{msg.CreatedAt:yyyy-MM-dd HH:mm:ss} - {msg.Role,10}:"); - - foreach (MessageContent content in msg.ContentItems) - { - switch (content) - { - case MessageTextContent textItem: - Console.WriteLine($" Text: {textItem.Text}"); - break; - - case MessageImageFileContent fileItem: - Console.WriteLine($" Image File (internal ID): {fileItem.FileId}"); - break; - } - } - } - #endregion - - // Step 7: Cleanup - #region Snippet:ImageUrlInMessageCleanup_Sync - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_OpenAPI.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_OpenAPI.cs deleted file mode 100644 index 44b9918ec905..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_OpenAPI.cs +++ /dev/null @@ -1,196 +0,0 @@ -// 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.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agent_OpenAPI : SamplesBase -{ - #region Snippet:OpenAPICallingExample_GetFile - private static string GetFile([CallerFilePath] string pth = "") - { - var dirName = Path.GetDirectoryName(pth) ?? ""; - return Path.Combine(dirName, "weather_openapi.json"); - } - #endregion - - [Test] - [AsyncOnly] - public async Task OpenAPICallingExampleAsync() - { - #region Snippet:OpenAPICallingExample_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - var file_path = GetFile(); - #endregion - - #region Snippet:OpenAPIDefineFunctionTools - OpenApiAnonymousAuthDetails oaiAuth = new(); - OpenApiToolDefinition openapiTool = new( - name: "get_weather", - description: "Retrieve weather information for a location", - spec: BinaryData.FromBytes(File.ReadAllBytes(file_path)), - auth: oaiAuth, - defaultParams: ["format"] - ); - - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "azure-function-agent-foo", - instructions: "You are a helpful assistant.", - tools: [ openapiTool ] - ); - #endregion - - #region Snippet:OpenAPIHandlePollingWithRequiredAction - AgentThread thread = await client.CreateThreadAsync(); - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather in Seattle?"); - - ThreadRun run = await client.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress - || run.Status == RunStatus.RequiresAction); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - - #region Snippet:OpenAPI_Print - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - public async Task SharepointGroundingExample() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; - - var clientOptions = new AIProjectClientOptions(); - - // Adding the custom headers policy - clientOptions.AddPolicy(new CustomHeadersPolicy(), HttpPipelinePosition.PerCall); - var projectClient = new AIProjectClient(connectionString, new AzureCliCredential(), clientOptions); - - ConnectionResponse sharepointConnection = await projectClient.GetConnectionsClient().GetConnectionAsync(TestEnvironment.SHAREPOINTCONNECTIONNAME); - var connectionId = sharepointConnection.Id; - - AgentsClient agentClient = projectClient.GetAgentsClient(); - - ToolConnectionList connectionList = new ToolConnectionList - { - ConnectionList = { new ToolConnection(connectionId) } - }; - SharepointToolDefinition sharepointGroundingTool = new SharepointToolDefinition(connectionList); - - Response agentResponse = await agentClient.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: new List { sharepointGroundingTool }); - Agent agent = agentResponse.Value; - - // Create thread for communication - Response threadResponse = await agentClient.CreateThreadAsync(); - AgentThread thread = threadResponse.Value; - - // Create message to thread - Response messageResponse = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - ""); - ThreadMessage message = messageResponse.Value; - - // Run the agent - Response runResponse = await agentClient.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - runResponse = await agentClient.GetRunAsync(thread.Id, runResponse.Value.Id); - } - while (runResponse.Value.Status == RunStatus.Queued - || runResponse.Value.Status == RunStatus.InProgress); - - Response> afterRunMessagesResponse - = await agentClient.GetMessagesAsync(thread.Id); - IReadOnlyList messages = afterRunMessagesResponse.Value.Data; - - // Note: messages iterate from newest to oldest, with the messages[0] being the most recent - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" - { - [Test] - [AsyncOnly] - public async Task StreamingAsync() - { - #region Snippet:StreamingAsync_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:StreamingAsync_CreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "My Friendly Test Assistant", - instructions: "You politely help with math questions. Use the code interpreter tool when asked to visualize numbers.", - tools: [ new CodeInterpreterToolDefinition() ] - ); - #endregion - # region Snippet:StreamingAsync_CreateThread - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Hi, Assistant! Draw a graph for a line with a slope of 4 and y-intercept of 9."); - #endregion - #region Snippet:StreamingAsync_StreamLoop - await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id)) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine($"--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - if (contentUpdate.ImageFileId is not null) - { - Console.WriteLine($"[Image content file ID: {contentUpdate.ImageFileId}"); - } - } - } - #endregion - #region Snippet::StreamingAsync_Cleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void Streaming() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #region Snippet:Streaming_CreateAgent - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "My Friendly Test Assistant", - instructions: "You politely help with math questions. Use the code interpreter tool when asked to visualize numbers.", - tools: [new CodeInterpreterToolDefinition()] - ); - #endregion - #region Snippet:Streaming_CreateThread - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "Hi, Assistant! Draw a graph for a line with a slope of 4 and y-intercept of 9."); - #endregion - #region Snippet:Streaming_StreamLoop - foreach (StreamingUpdate streamingUpdate in client.CreateRunStreaming(thread.Id, agent.Id)) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine($"--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - if (contentUpdate.ImageFileId is not null) - { - Console.WriteLine($"[Image content file ID: {contentUpdate.ImageFileId}"); - } - } - } - #endregion - #region Snippet::Streaming_Cleanup - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Streaming_with_Auto_Function_Call.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Streaming_with_Auto_Function_Call.cs deleted file mode 100644 index d3195c39a5f1..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Streaming_with_Auto_Function_Call.cs +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.ClientModel; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using Microsoft.Extensions.Options; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agent_Streaming_with_Auto_Function_Call : SamplesBase -{ - #region Snippet:StreamingWithAutoFunctionCall_DefineFunctionTools - // Example of a function that defines no parameters - private string GetUserFavoriteCity() => "Seattle, WA"; - private FunctionToolDefinition getUserFavoriteCityTool = new("GetUserFavoriteCity", "Gets the user's favorite city."); - // Example of a function with a single required parameter - private string GetCityNickname(string location) => location switch - { - "Seattle, WA" => "The Emerald City", - _ => throw new NotImplementedException(), - }; - private FunctionToolDefinition getCityNicknameTool = new( - name: "GetCityNickname", - description: "Gets the nickname of a city, e.g. 'LA' for 'Los Angeles, CA'.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - // Example of a function with one required and one optional, enum parameter - private string GetWeatherAtLocation(string location, string temperatureUnit = "f") => location switch - { - "Seattle, WA" => temperatureUnit == "f" ? "70f" : "21c", - _ => throw new NotImplementedException() - }; - private FunctionToolDefinition getCurrentWeatherAtLocationTool = new( - name: "GetWeatherAtLocation", - description: "Gets the current weather at a provided location.", - parameters: BinaryData.FromObjectAsJson( - new - { - Type = "object", - Properties = new - { - Location = new - { - Type = "string", - Description = "The city and state, e.g. San Francisco, CA", - }, - Unit = new - { - Type = "string", - Enum = new[] { "c", "f" }, - }, - }, - Required = new[] { "location" }, - }, - new JsonSerializerOptions() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase })); - #endregion - - [Test] - [AsyncOnly] - public async Task AutoFunctionCallingWithStreamingExampleAsync() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - #region Snippet:StreamingWithAutoFunctionCallAsync_CreateAgent - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] - ); - #endregion - - #region Snippet:StreamingWithAutoFunctionCallAsync_CreateThreadMessage - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - #endregion - - #region Snippet:StreamingWithAutoFunctionCall_EnableAutoFunctionCalls - List toolOutputs = new(); - Dictionary toolDelegates = new(); - toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); - toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); - toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); - AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); - #endregion - - #region Snippet:StreamingWithAutoFunctionCallAsync - await foreach (StreamingUpdate streamingUpdate in client.CreateRunStreamingAsync(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions)) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - #endregion - - #region Snippet:StreamingWithAutoFunctionCallAsync_Cleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void AutoFunctionCallingWithStreamingExample() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - #region Snippet:StreamingWithAutoFunctionCall_CreateAgent - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Functions", - instructions: "You are a weather bot. Use the provided functions to help answer questions. " - + "Customize your responses to the user's preferences as much as possible and use friendly " - + "nicknames for cities whenever possible.", - tools: [getCityNicknameTool, getCurrentWeatherAtLocationTool, getUserFavoriteCityTool] - ); - #endregion - - #region Snippet:StreamingWithAutoFunctionCall_CreateThreadMessage - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - thread.Id, - MessageRole.User, - "What's the weather like in my favorite city?"); - #endregion - - List toolOutputs = new(); - Dictionary toolDelegates = new(); - toolDelegates.Add(nameof(GetWeatherAtLocation), GetWeatherAtLocation); - toolDelegates.Add(nameof(GetCityNickname), GetCityNickname); - toolDelegates.Add(nameof(GetUserFavoriteCity), GetUserFavoriteCity); - AutoFunctionCallOptions autoFunctionCallOptions = new(toolDelegates, 10); - - #region Snippet:StreamingWithAutoFunctionCall - CollectionResult stream = client.CreateRunStreaming(thread.Id, agent.Id, autoFunctionCallOptions: autoFunctionCallOptions); - foreach (StreamingUpdate streamingUpdate in stream) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - Console.Write(contentUpdate.Text); - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - #endregion - - #region Snippet:StreamingWithAutoFunctionCall_Cleanup - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_Enterprise_File_Search.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_Enterprise_File_Search.cs deleted file mode 100644 index f4366423a3aa..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_Enterprise_File_Search.cs +++ /dev/null @@ -1,281 +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.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agent_Vector_Store_Batch_Enterprise_File_Search : SamplesBase -{ - [Test] - [AsyncOnly] - public async Task VectorStoreBatchEnterpriseFileSearch() - { - #region Snippet:VectorStoreBatchEnterpriseFileSearch_CreateClient_Async -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var blobURI = System.Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:BatchFileAttachment - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store" - ); - - VectorStoreFileBatch vctFile = await client.CreateVectorStoreFileBatchAsync( - vectorStoreId: vectorStore.Id, - dataSources: [ ds ] - ); - Console.WriteLine($"Created vector store file batch, vector store file batch ID: {vctFile.Id}"); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_CreateAgentAndThread_Async - List tools = [new FileSearchToolDefinition()]; - Agent agent = await client.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_ThreadRun_Async - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id - ); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - // Build the map of file IDs to file names. - string after = null; - AgentPageableListOfVectorStoreFile storeFiles; - Dictionary dtFiles = []; - do - { - storeFiles = await client.GetVectorStoreFilesAsync( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = await client.GetFileAsync(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } - } - while (storeFiles.HasMore); - WriteMessages(messages, dtFiles); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_Cleanup_Async - VectorStoreDeletionStatus delStatus = await client.DeleteVectorStoreAsync(vectorStore.Id); - if (delStatus.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void VectorStoreBatchEnterpriseFileSearchSync() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var blobURI = System.Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #region Snippet:BatchFileAttachment_Sync - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - VectorStore vectorStore = client.CreateVectorStore( - name: "sample_vector_store" - ); - - VectorStoreFileBatch vctFile = client.CreateVectorStoreFileBatch( - vectorStoreId: vectorStore.Id, - dataSources: [ds] - ); - Console.WriteLine($"Created vector store file batch, vector store file batch ID: {vctFile.Id}"); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_CreateAgentAndThread - List tools = [new FileSearchToolDefinition()]; - Agent agent = client.CreateAgent( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_ThreadRun - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id - ); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - // Build the map of file IDs to file names. - string after = null; - AgentPageableListOfVectorStoreFile storeFiles; - Dictionary dtFiles = []; - do - { - storeFiles = client.GetVectorStoreFiles( - vectorStoreId: vectorStore.Id, - after: after - ); - after = storeFiles.LastId; - foreach (VectorStoreFile fle in storeFiles.Data) - { - AgentFile agentFile = client.GetFile(fle.Id); - Uri uriFile = new(agentFile.Filename); - dtFiles.Add(fle.Id, uriFile.Segments[uriFile.Segments.Length - 1]); - } - } - while (storeFiles.HasMore); - WriteMessages(messages, dtFiles); - #endregion - #region Snippet:VectorStoreBatchEnterpriseFileSearch_Cleanup - VectorStoreDeletionStatus delStatus = client.DeleteVectorStore(vectorStore.Id); - if (delStatus.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:VectorStoreBatchEnterpriseFileSearch_Print - private static void WriteMessages(IEnumerable messages, Dictionary fileIds) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) - { - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); - } - #endregion -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_File_Search.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_File_Search.cs deleted file mode 100644 index 4f52da245b92..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agent_Vector_Store_Batch_File_Search.cs +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.CompilerServices; -using System.Threading; -using System.Threading.Tasks; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agent_Vector_Store_Batch_File_Search : SamplesBase -{ - private static string GetFile([CallerFilePath] string pth = "") - { - var dirName = Path.GetDirectoryName(pth) ?? ""; - return Path.Combine(dirName, "product_info_1.md"); - } - - [Test] - [AsyncOnly] - public async Task VectorStoreBatchFileSearchAsync() - { - #region Snippet:VectorStoreBatchFileAsyncSearchCreateVectorStore -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var filePath = GetFile(); - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - VectorStore vectorStore = await client.CreateVectorStoreAsync( - name: "sample_vector_store" - ); - - AgentFile fileResponse = await client.UploadFileAsync(filePath, AgentFilePurpose.Agents); - Dictionary dtReferences = new() - { - {fileResponse.Id, Path.GetFileName(fileResponse.Filename)} - }; - - VectorStoreFileBatch uploadTask = await client.CreateVectorStoreFileBatchAsync( - vectorStoreId: vectorStore.Id, - fileIds: [fileResponse.Id] - ); - Console.WriteLine($"Created vector store file batch, vector store file batch ID: {uploadTask.Id}"); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - - List tools = [new FileSearchToolDefinition()]; - Agent agent = await client.CreateAgentAsync( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - #endregion - #region Snippet:VectorStoreBatchFileSearchAsyncThreadAndResponse - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id - ); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages, dtReferences); - #endregion - - #region Snippet:VectorStoreBatchFileSearchAsyncCleanup - VectorStoreDeletionStatus delTask = await client.DeleteVectorStoreAsync(vectorStore.Id); - if (delTask.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void VectorStoreBatchFileSearch() - { - #region Snippet:VectorStoreBatchFileSearchCreateVectorStore -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var filePath = GetFile(); - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - - VectorStore vectorStore = client.CreateVectorStore( - name: "sample_vector_store" - ); - - AgentFile fileResponse = client.UploadFile(filePath, AgentFilePurpose.Agents); - Dictionary dtReferences = new() - { - {fileResponse.Id, Path.GetFileName(fileResponse.Filename)} - }; - - var uploadTask = client.CreateVectorStoreFileBatch( - vectorStoreId: vectorStore.Id, - fileIds: [fileResponse.Id] - ); - Console.WriteLine($"Created vector store file batch, vector store file batch ID: {uploadTask.Value.Id}"); - - FileSearchToolResource fileSearchResource = new([vectorStore.Id], null); - - List tools = [new FileSearchToolDefinition()]; - Agent agent = client.CreateAgent( - model: modelName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools, - toolResources: new ToolResources() { FileSearch = fileSearchResource } - ); - #endregion - #region Snippet:VectorStoreBatchFileSearchThreadAndResponse - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What feature does Smart Eyewear offer?" - ); - - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id - ); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages, dtReferences); - #endregion - - #region Snippet:VectorStoreBatchFileSearchCleanup - VectorStoreDeletionStatus delTask = client.DeleteVectorStore(vectorStore.Id); - if (delTask.Deleted) - { - Console.WriteLine($"Deleted vector store {vectorStore.Id}"); - } - else - { - Console.WriteLine($"Unable to delete vector store {vectorStore.Id}"); - } - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:VectorStoreBatchFileSearchParseResults - private static void WriteMessages(IEnumerable messages, Dictionary fileIds) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) - { - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); - } - #endregion -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Azure_AI_Search.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Azure_AI_Search.cs deleted file mode 100644 index 6266ab825cb9..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Azure_AI_Search.cs +++ /dev/null @@ -1,252 +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.TestFramework; -using NUnit.Framework; -using NUnit.Framework.Internal; -using System.Threading; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agents_Azure_AI_Search : SamplesBase -{ - [Test] - [AsyncOnly] - public async Task AzureAISearchExampleAsync() - { - #region Snippet:AzureAISearchExample_CreateProjectClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:CreateAgentWithAzureAISearchTool - ListConnectionsResponse connections = await projectClient.GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); - - if (connections?.Value == null || connections.Value.Count == 0) - { - throw new InvalidOperationException("No connections found for the Azure AI Search."); - } - - ConnectionResponse connection = connections.Value[0]; - - AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple - ); - ToolResources toolResource = new() - { - AzureAISearch = searchResource - }; - - AgentsClient agentClient = projectClient.GetAgentsClient(); - - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [ new AzureAISearchToolDefinition() ], - toolResources: toolResource); - #endregion - #region Snippet:AzureAISearchExample_CreateRun - // Create thread for communication - Response threadResponse = await agentClient.CreateThreadAsync(); - AgentThread thread = threadResponse.Value; - - // Create message to thread - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - - // Run the agent - ThreadRun run = await agentClient.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await agentClient.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:PopulateReferencesAgentWithAzureAISearchTool - PageableList messages = await agentClient.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" threadResponse = agentClient.CreateThread(); - AgentThread thread = threadResponse.Value; - - // Create message to thread - ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - - // Run the agent - Response runResponse = agentClient.CreateRun(thread, agent); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - runResponse = agentClient.GetRun(thread.Id, runResponse.Value.Id); - } - while (runResponse.Value.Status == RunStatus.Queued - || runResponse.Value.Status == RunStatus.InProgress); - - Assert.AreEqual( - RunStatus.Completed, - runResponse.Value.Status, - runResponse.Value.LastError?.Message); - #endregion - #region Snippet:PopulateReferencesAgentWithAzureAISearchTool_Sync - PageableList messages = agentClient.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - // We need to annotate only Agent messages. - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string annotatedText = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextUrlCitationAnnotation urlAnnotation) - { - annotatedText = annotatedText.Replace( - urlAnnotation.Text, - $" [see {urlAnnotation.UrlCitation.Title}] ({urlAnnotation.UrlCitation.Url})"); - } - } - Console.Write(annotatedText); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task AzureAISearchStreamingExampleAsync() - { - #region Snippet:AzureAISearchStreamingExample_CreateProjectClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:AzureAISearchStreamingExample_CreateTool_Async - ListConnectionsResponse connections = await projectClient.GetConnectionsClient().GetConnectionsAsync(ConnectionType.AzureAISearch).ConfigureAwait(false); - - if (connections?.Value == null || connections.Value.Count == 0) - { - throw new InvalidOperationException("No connections found for the Azure AI Search."); - } - - ConnectionResponse connection = connections.Value[0]; - - AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple - ); - ToolResources toolResource = new() - { - AzureAISearch = searchResource - }; - - AgentsClient agentClient = projectClient.GetAgentsClient(); - - Agent agent = await agentClient.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: toolResource); - #endregion - #region Snippet:AzureAISearchStreamingExample_CreateThread_Async - // Create thread for communication - AgentThread thread = await agentClient.CreateThreadAsync(); - - // Create message to thread - ThreadMessage message = await agentClient.CreateMessageAsync( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - #endregion - #region Snippet:AzureAISearchStreamingExample_PrintMessages_Async - await foreach (StreamingUpdate streamingUpdate in agentClient.CreateRunStreamingAsync(thread.Id, agent.Id)) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - if (contentUpdate.TextAnnotation != null) - { - Console.Write($" [see {contentUpdate.TextAnnotation.Title}] ({contentUpdate.TextAnnotation.Url})"); - } - else - { - //Detect the reference placeholder and skip it. Instead we will print the actual reference. - if (contentUpdate.Text[0] != (char)12304 || contentUpdate.Text[contentUpdate.Text.Length - 1] != (char)12305) - Console.Write(contentUpdate.Text); - } - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - #endregion - #region Snippet:AzureAISearchStreamingExample_Cleanup_Async - await agentClient.DeleteThreadAsync(thread.Id); - await agentClient.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void AzureAISearchStreamingExample() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - var projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - #region Snippet:AzureAISearchStreamingExample_CreateTool - ListConnectionsResponse connections = projectClient.GetConnectionsClient().GetConnections(ConnectionType.AzureAISearch); - - if (connections?.Value == null || connections.Value.Count == 0) - { - throw new InvalidOperationException("No connections found for the Azure AI Search."); - } - - ConnectionResponse connection = connections.Value[0]; - - AzureAISearchResource searchResource = new( - connection.Id, - "sample_index", - 5, - "category eq 'sleeping bag'", - AzureAISearchQueryType.Simple - ); - ToolResources toolResource = new() - { - AzureAISearch = searchResource - }; - - AgentsClient agentClient = projectClient.GetAgentsClient(); - - Agent agent = agentClient.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful assistant.", - tools: [new AzureAISearchToolDefinition()], - toolResources: toolResource); - #endregion - #region Snippet:AzureAISearchStreamingExample_CreateThread - // Create thread for communication - AgentThread thread = agentClient.CreateThread(); - - // Create message to thread - ThreadMessage message = agentClient.CreateMessage( - thread.Id, - MessageRole.User, - "What is the temperature rating of the cozynights sleeping bag?"); - #endregion - #region Snippet:AzureAISearchStreamingExample_PrintMessages - foreach (StreamingUpdate streamingUpdate in agentClient.CreateRunStreaming(thread.Id, agent.Id)) - { - if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCreated) - { - Console.WriteLine("--- Run started! ---"); - } - else if (streamingUpdate is MessageContentUpdate contentUpdate) - { - if (contentUpdate.TextAnnotation != null) - { - Console.Write($" [see {contentUpdate.TextAnnotation.Title}] ({contentUpdate.TextAnnotation.Url})"); - } - else - { - //Detect the reference placeholder and skip it. Instead we will print the actual reference. - if (contentUpdate.Text[0] != (char)12304 || contentUpdate.Text[contentUpdate.Text.Length - 1] != (char)12305) - Console.Write(contentUpdate.Text); - } - } - else if (streamingUpdate.UpdateKind == StreamingUpdateReason.RunCompleted) - { - Console.WriteLine(); - Console.WriteLine("--- Run completed! ---"); - } - } - #endregion - #region Snippet:AzureAISearchStreamingExample_Cleanup - agentClient.DeleteThread(thread.Id); - agentClient.DeleteAgent(agent.Id); - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Code_Interpreter_Enterprise_File_Search.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Code_Interpreter_Enterprise_File_Search.cs deleted file mode 100644 index 4c5f921dd815..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/Sample_Agents_Code_Interpreter_Enterprise_File_Search.cs +++ /dev/null @@ -1,188 +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.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Sample_Agents_Code_Interpreter_Enterprise_File_Search: SamplesBase -{ - [Test] - [AsyncOnly] - public async Task CodeInterpreterEnterpriseSearch() - { - #region Snippet:CodeInterpreterEnterpriseSearch_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var blobURI = Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearchAsync_CreateAgent - List tools = [ new CodeInterpreterToolDefinition() ]; - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools - ); - #endregion - - #region Snippet:CreateMessageAttachmentWithBlobStore - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - - var attachment = new MessageAttachment( - ds: ds, - tools: tools - ); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearchAsync_CreateThreadRun - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?", - attachments: [ attachment ] - ); - - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id - ); - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearchAsync_PrintMessages - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearchAsync_Cleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void CodeInterpreterEnterpriseSearchSync() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); - var blobURI = Environment.GetEnvironmentVariable("AZURE_BLOB_URI"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - // For now we will take the File URI from the environment variables. - // In future we may want to upload file to Azure here. - var blobURI = TestEnvironment.AZURE_BLOB_URI; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #region Snippet:CodeInterpreterEnterpriseSearch_CreateAgent - List tools = [new CodeInterpreterToolDefinition()]; - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are helpful assistant.", - tools: tools - ); - #endregion - - var ds = new VectorStoreDataSource( - assetIdentifier: blobURI, - assetType: VectorStoreDataSourceAssetType.UriAsset - ); - - var attachment = new MessageAttachment( - ds: ds, - tools: tools - ); - #region Snippet:CodeInterpreterEnterpriseSearch_CreateThreadRun - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "What does the attachment say?", - attachments: [attachment] - ); - - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id - ); - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearch_PrintMessages - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages); - #endregion - #region Snippet:CodeInterpreterEnterpriseSearch_Cleanup - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:CodeInterpreterEnterpriseSearch_Print - private static void WriteMessages(IEnumerable messages) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task CodeInterpreterFileAttachmentAsync() - { - #region Snippet:CodeInterpreterFileAttachment_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:CreateAgentWithInterpreterTool - List tools = [ new CodeInterpreterToolDefinition() ]; - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: tools - ); - - File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); - AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); - var fileId = uploadedAgentFile.Id; - - var attachment = new MessageAttachment( - fileId: fileId, - tools: tools - ); - - AgentThread thread = await client.CreateThreadAsync(); - - ThreadMessage message = await client.CreateMessageAsync( - threadId: thread.Id, - role: MessageRole.User, - content: "Can you give me the documented codes for 'banana' and 'orange'?", - attachments: [ attachment ] - ); - #endregion - #region Snippet:CodeInterpreterFileAttachment_CreateRun - ThreadRun run = await client.CreateRunAsync( - thread.Id, - agent.Id - ); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:CodeInterpreterFileAttachment_PrintMessages - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages); - #endregion - #region Snippet:CodeInterpreterFileAttachment_Cleanup - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void CodeInterpreterFileAttachment() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - -#endif - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - #region Snippet:CreateAgentWithInterpreterToolSync - List tools = [new CodeInterpreterToolDefinition()]; - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "my-assistant", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: tools - ); - - File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); - AgentFile uploadedAgentFile = client.UploadFile( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); - var fileId = uploadedAgentFile.Id; - - var attachment = new MessageAttachment( - fileId: fileId, - tools: tools - ); - - AgentThread thread = client.CreateThread(); - - ThreadMessage message = client.CreateMessage( - threadId: thread.Id, - role: MessageRole.User, - content: "Can you give me the documented codes for 'banana' and 'orange'?", - attachments: [attachment] - ); - #endregion - #region Snippet:CodeInterpreterFileAttachmentSync_CreateRun - ThreadRun run = client.CreateRun( - thread.Id, - agent.Id - ); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - #endregion - #region Snippet:CodeInterpreterFileAttachmentSync_PrintMessages - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages); - #endregion - #region Snippet:CodeInterpreterFileAttachmentSync_Cleanup - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:CodeInterpreterFileAttachment_Print - private static void WriteMessages(IEnumerable messages) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - Console.Write(textItem.Text); - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" -{ - [Test] - [AsyncOnly] - public async Task FilesSearchExampleAsync() - { - #region Snippet:FilesSearchExample_CreateClient -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #endregion - #region Snippet:UploadAgentFilesToUse - // Upload a file and wait for it to be processed - File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); - AgentFile uploadedAgentFile = await client.UploadFileAsync( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); - Dictionary fileIds = new() - { - { uploadedAgentFile.Id, uploadedAgentFile.Filename } - }; - #endregion - - #region Snippet:CreateVectorStore - // Create a vector store with the file and wait for it to be processed. - // If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active - VectorStore vectorStore = await client.CreateVectorStoreAsync( - fileIds: new List { uploadedAgentFile.Id }, - name: "my_vector_store"); - #endregion - - #region Snippet:CreateAgentWithFiles - FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); - fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - - // Create an agent with toolResources and process assistant run - Agent agent = await client.CreateAgentAsync( - model: modelDeploymentName, - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); - #endregion - - #region Snippet:FilesSearchExample_CreateThreadAndRun - // Create thread for communication - AgentThread thread = await client.CreateThreadAsync(); - - // Create message to thread - ThreadMessage messageResponse = await client.CreateMessageAsync( - thread.Id, - MessageRole.User, - "Can you give me the documented codes for 'banana' and 'orange'?"); - - // Run the agent - ThreadRun run = await client.CreateRunAsync(thread, agent); - - do - { - await Task.Delay(TimeSpan.FromMilliseconds(500)); - run = await client.GetRunAsync(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = await client.GetMessagesAsync( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages, fileIds); - #endregion - #region Snippet:FilesSearchExample_Cleanup - await client.DeleteVectorStoreAsync(vectorStore.Id); - await client.DeleteFileAsync(uploadedAgentFile.Id); - await client.DeleteThreadAsync(thread.Id); - await client.DeleteAgentAsync(agent.Id); - #endregion - } - - [Test] - [SyncOnly] - public void FilesSearchExample() - { -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AgentsClient client = new(connectionString, new DefaultAzureCredential()); - #region Snippet:UploadAgentFilesToUse_Sync - // Upload a file and wait for it to be processed - File.WriteAllText( - path: "sample_file_for_upload.txt", - contents: "The word 'apple' uses the code 442345, while the word 'banana' uses the code 673457."); - AgentFile uploadedAgentFile = client.UploadFile( - filePath: "sample_file_for_upload.txt", - purpose: AgentFilePurpose.Agents); - Dictionary fileIds = new() - { - { uploadedAgentFile.Id, uploadedAgentFile.Filename } - }; - #endregion - - #region Snippet:CreateVectorStore_Sync - // Create a vector store with the file and wait for it to be processed. - // If you do not specify a vector store, create_message will create a vector store with a default expiration policy of seven days after they were last active - VectorStore vectorStore = client.CreateVectorStore( - fileIds: new List { uploadedAgentFile.Id }, - name: "my_vector_store"); - #endregion - - #region Snippet:CreateAgentWithFiles_Sync - FileSearchToolResource fileSearchToolResource = new FileSearchToolResource(); - fileSearchToolResource.VectorStoreIds.Add(vectorStore.Id); - - // Create an agent with toolResources and process assistant run - Agent agent = client.CreateAgent( - model: modelDeploymentName, - name: "SDK Test Agent - Retrieval", - instructions: "You are a helpful agent that can help fetch data from files you know about.", - tools: new List { new FileSearchToolDefinition() }, - toolResources: new ToolResources() { FileSearch = fileSearchToolResource }); - #endregion - - #region Snippet:FilesSearchExample_CreateThreadAndRun_Sync - // Create thread for communication - AgentThread thread = client.CreateThread(); - - // Create message to thread - ThreadMessage messageResponse = client.CreateMessage( - thread.Id, - MessageRole.User, - "Can you give me the documented codes for 'banana' and 'orange'?"); - - // Run the agent - ThreadRun run = client.CreateRun(thread, agent); - - do - { - Thread.Sleep(TimeSpan.FromMilliseconds(500)); - run = client.GetRun(thread.Id, run.Id); - } - while (run.Status == RunStatus.Queued - || run.Status == RunStatus.InProgress); - Assert.AreEqual( - RunStatus.Completed, - run.Status, - run.LastError?.Message); - PageableList messages = client.GetMessages( - threadId: thread.Id, - order: ListSortOrder.Ascending - ); - WriteMessages(messages, fileIds); - #endregion - #region Snippet:FilesSearchExample_Cleanup_Sync - client.DeleteVectorStore(vectorStore.Id); - client.DeleteFile(uploadedAgentFile.Id); - client.DeleteThread(thread.Id); - client.DeleteAgent(agent.Id); - #endregion - } - - #region Snippet:FilesSearchExample_Print - private static void WriteMessages(IEnumerable messages, Dictionary fileIds) - { - foreach (ThreadMessage threadMessage in messages) - { - Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); - foreach (MessageContent contentItem in threadMessage.ContentItems) - { - if (contentItem is MessageTextContent textItem) - { - if (threadMessage.Role == MessageRole.Agent && textItem.Annotations.Count > 0) - { - string strMessage = textItem.Text; - foreach (MessageTextAnnotation annotation in textItem.Annotations) - { - if (annotation is MessageTextFilePathAnnotation pathAnnotation) - { - strMessage = replaceReferences(fileIds, pathAnnotation.FileId, pathAnnotation.Text, strMessage); - } - else if (annotation is MessageTextFileCitationAnnotation citationAnnotation) - { - strMessage = replaceReferences(fileIds, citationAnnotation.FileId, citationAnnotation.Text, strMessage); - } - } - Console.Write(strMessage); - } - else - { - Console.Write(textItem.Text); - } - } - else if (contentItem is MessageImageFileContent imageFileItem) - { - Console.Write($" fileIds, string fileID, string placeholder, string text) - { - if (fileIds.TryGetValue(fileID, out string replacement)) - return text.Replace(placeholder, $" [{replacement}]"); - else - return text.Replace(placeholder, $" [{fileID}]"); - } - #endregion -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/image_file.png b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/image_file.png deleted file mode 100644 index 50ae6c65367a..000000000000 Binary files a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/image_file.png and /dev/null differ diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/product_info_1.md b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/product_info_1.md deleted file mode 100644 index 041155831d53..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/product_info_1.md +++ /dev/null @@ -1,51 +0,0 @@ -# Information about product item_number: 1 - -## Brand -Contoso Galaxy Innovations - -## Category -Smart Eyewear - -## Features -- Augmented Reality interface -- Voice-controlled AI assistant -- HD video recording with 3D audio -- UV protection and blue light filtering -- Wireless charging with extended battery life - -## User Guide - -### 1. Introduction -Introduction to your new SmartView Glasses - -### 2. Product Overview -Overview of features and controls - -### 3. Sizing and Fit -Finding your perfect fit and style adjustments - -### 4. Proper Care and Maintenance -Cleaning and caring for your SmartView Glasses - -### 5. Break-in Period -Adjusting to the augmented reality experience - -### 6. Safety Tips -Safety guidelines for public and private spaces - -### 7. Troubleshooting -Quick fixes for common issues - -## Warranty Information -Two-year limited warranty on all electronic components - -## Contact Information -Customer Support at support@contoso-galaxy-innovations.com - -## Return Policy -30-day return policy with no questions asked - -## FAQ -- How to sync your SmartView Glasses with your devices -- Troubleshooting connection issues -- Customizing your augmented reality environment diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json b/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json deleted file mode 100644 index df0192590adb..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Agent/weather_openapi.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "get weather data", - "description": "Retrieves current weather data for a location based on wttr.in.", - "version": "v1.0.0" - }, - "servers": [ - { - "url": "https://wttr.in" - } - ], - "auth": [], - "paths": { - "/{location}": { - "get": { - "description": "Get weather information for a specific location", - "operationId": "GetCurrentWeather", - "parameters": [ - { - "name": "location", - "in": "path", - "description": "City or location to retrieve the weather for", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "format", - "in": "query", - "description": "Always use j1 value for this parameter", - "required": true, - "schema": { - "type": "string", - "default": "j1" - } - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "Location not found" - } - }, - "deprecated": false - } - } - }, - "components": { - "schemes": {} - } -} \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Connection/Sample_Connection.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Connection/Sample_Connection.cs deleted file mode 100644 index ee7b5c2879d6..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Connection/Sample_Connection.cs +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure.AI.Inference; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public class Sample_Connection : SamplesBase -{ - [Test] - [SyncOnly] - public void ConnectionExample() - { - #region Snippet:ConnectionExampleSync -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AIProjectClient client = new(connectionString, new DefaultAzureCredential()); - ConnectionsClient connectionsClient = client.GetConnectionsClient(); - - ConnectionResponse connection = connectionsClient.GetDefaultConnection(ConnectionType.Serverless, true); - - if (connection.Properties.AuthType == AuthenticationType.ApiKey) - { - var apiKeyAuthProperties = connection.Properties as ConnectionPropertiesApiKeyAuth; - if (string.IsNullOrWhiteSpace(apiKeyAuthProperties.Target)) - { - throw new ArgumentException("The API key authentication target URI is missing or invalid."); - } - - if (!Uri.TryCreate(apiKeyAuthProperties.Target, UriKind.Absolute, out var endpoint)) - { - throw new UriFormatException("Invalid URI format in API key authentication target."); - } - - var credential = new AzureKeyCredential(apiKeyAuthProperties.Credentials.Key); - ChatCompletionsClient chatClient = new(endpoint, credential); - - var requestOptions = new ChatCompletionsOptions() - { - Messages = - { - new ChatRequestSystemMessage("You are a helpful assistant."), - new ChatRequestUserMessage("How many feet are in a mile?"), - }, - Model = modelDeploymentName - }; - - ChatCompletions response = chatClient.Complete(requestOptions); - Console.WriteLine(response.Content); - } - #endregion - } - - [Test] - [AsyncOnly] - public async Task ConnectionExampleAsync() - { - #region Snippet:ConnectionExampleAsync -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; -#endif - AIProjectClient client = new(connectionString, new DefaultAzureCredential()); - ConnectionsClient connectionsClient = client.GetConnectionsClient(); - - ConnectionResponse connection = await connectionsClient.GetDefaultConnectionAsync(ConnectionType.Serverless, true); - - if (connection.Properties.AuthType == AuthenticationType.ApiKey) - { - var apiKeyAuthProperties = connection.Properties as ConnectionPropertiesApiKeyAuth; - if (string.IsNullOrWhiteSpace(apiKeyAuthProperties.Target)) - { - throw new ArgumentException("The API key authentication target URI is missing or invalid."); - } - - if (!Uri.TryCreate(apiKeyAuthProperties.Target, UriKind.Absolute, out var endpoint)) - { - throw new UriFormatException("Invalid URI format in API key authentication target."); - } - - var credential = new AzureKeyCredential(apiKeyAuthProperties.Credentials.Key); - ChatCompletionsClient chatClient = new(endpoint, credential); - - var requestOptions = new ChatCompletionsOptions() - { - Messages = - { - new ChatRequestSystemMessage("You are a helpful assistant."), - new ChatRequestUserMessage("How many feet are in a mile?"), - }, - Model = modelDeploymentName - }; - - ChatCompletions response = await chatClient.CompleteAsync(requestOptions); - Console.WriteLine(response.Content); - } - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Connections/Sample_Connections.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Connections/Sample_Connections.cs new file mode 100644 index 000000000000..cd2ab9a779a4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Connections/Sample_Connections.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests +{ + public class Sample_Connections : SamplesBase + { + [Test] + [SyncOnly] + public void ConnectionsExample() + { + #region Snippet:AI_Projects_ConnectionsExampleSync +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var connectionName = Environment.GetEnvironmentVariable("CONNECTION_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var connectionName = TestEnvironment.CONNECTIONNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Connections connectionsClient = projectClient.GetConnectionsClient(); + + Console.WriteLine("List the properties of all connections:"); + foreach (var connection in connectionsClient.GetConnections()) + { + Console.WriteLine(connection); + Console.Write(connection.Name); + } + + Console.WriteLine("List the properties of all connections of a particular type (e.g., Azure OpenAI connections):"); + foreach (var connection in connectionsClient.GetConnections(connectionType: ConnectionType.AzureOpenAI)) + { + Console.WriteLine(connection); + } + + Console.WriteLine($"Get the properties of a connection named `{connectionName}`:"); + var specificConnection = connectionsClient.Get(connectionName, includeCredentials: false); + Console.WriteLine(specificConnection); + + Console.WriteLine("Get the properties of a connection with credentials:"); + var specificConnectionCredentials = connectionsClient.Get(connectionName, includeCredentials: true); + Console.WriteLine(specificConnectionCredentials); + + Console.WriteLine($"Get the properties of the default connection:"); + var defaultConnection = connectionsClient.GetDefault(includeCredentials: false); + Console.WriteLine(defaultConnection); + + Console.WriteLine($"Get the properties of the default connection with credentials:"); + var defaultConnectionCredentials = connectionsClient.GetDefault(includeCredentials: true); + Console.WriteLine(defaultConnectionCredentials); + #endregion + } + + [Test] + [AsyncOnly] + public async Task ConnectionsExampleAsync() + { + #region Snippet:AI_Projects_ConnectionsExampleAsync +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var connectionName = Environment.GetEnvironmentVariable("CONNECTION_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var connectionName = TestEnvironment.CONNECTIONNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Connections connectionsClient = projectClient.GetConnectionsClient(); + + Console.WriteLine("List the properties of all connections:"); + await foreach (var connection in connectionsClient.GetConnectionsAsync()) + { + Console.WriteLine(connection); + Console.Write(connection.Name); + } + + Console.WriteLine("List the properties of all connections of a particular type (e.g., Azure OpenAI connections):"); + await foreach (var connection in connectionsClient.GetConnectionsAsync(connectionType: ConnectionType.AzureOpenAI)) + { + Console.WriteLine(connection); + } + + Console.WriteLine($"Get the properties of a connection named `{connectionName}`:"); + var specificConnection = await connectionsClient.GetAsync(connectionName, includeCredentials: false); + Console.WriteLine(specificConnection); + + Console.WriteLine("Get the properties of a connection with credentials:"); + var specificConnectionCredentials = await connectionsClient.GetAsync(connectionName, includeCredentials: true); + Console.WriteLine(specificConnectionCredentials); + + Console.WriteLine($"Get the properties of the default connection:"); + var defaultConnection = await connectionsClient.GetDefaultAsync(includeCredentials: false); + Console.WriteLine(defaultConnection); + + Console.WriteLine($"Get the properties of the default connection with credentials:"); + var defaultConnectionCredentials = await connectionsClient.GetDefaultAsync(includeCredentials: true); + Console.WriteLine(defaultConnectionCredentials); + #endregion + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/Sample_Datasets.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/Sample_Datasets.cs new file mode 100644 index 000000000000..d6a3d99a6853 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/Sample_Datasets.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using Azure.Identity; +using NUnit.Framework; +using System.Threading.Tasks; +using Azure.AI.Inference; +using Azure.Core.TestFramework; +using System.IO; +using System.Reflection; + +namespace Azure.AI.Projects.Tests +{ + public class Sample_Datasets : SamplesBase + { + [Test] + [SyncOnly] + public void DatasetsExample() + { + #region Snippet:AI_Projects_DatasetsExampleSync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var datasetName = TestEnvironment.DATASETNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Datasets datasets = projectClient.GetDatasetsClient(); + + Console.WriteLine("Uploading a single file to create Dataset version '1'..."); + var datasetResponse = datasets.UploadFile( + name: datasetName, + version: "1", + filePath: "sample_folder/sample_file1.txt" + ); + Console.WriteLine(datasetResponse); + + Console.WriteLine("Uploading folder to create Dataset version '2'..."); + datasetResponse = datasets.UploadFolder( + name: datasetName, + version: "2", + folderPath: "sample_folder" + ); + Console.WriteLine(datasetResponse); + + Console.WriteLine("Retrieving Dataset version '1'..."); + DatasetVersion dataset = datasets.GetDataset(datasetName, "1"); + Console.WriteLine(dataset); + + Console.WriteLine($"Listing all versions for Dataset '{datasetName}':"); + foreach (var ds in datasets.GetVersions(datasetName)) + { + Console.WriteLine(ds); + } + + Console.WriteLine($"Listing latest versions for all datasets:"); + foreach (var ds in datasets.GetDatasetVersions()) + { + Console.WriteLine(ds); + } + + Console.WriteLine("Deleting Dataset versions '1' and '2'..."); + datasets.Delete(datasetName, "1"); + datasets.Delete(datasetName, "2"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task DatasetsExampleAsync() + { + #region Snippet:AI_Projects_DatasetsExampleAsync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var datasetName = TestEnvironment.DATASETNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Datasets datasets = projectClient.GetDatasetsClient(); + + Console.WriteLine("Uploading a single file to create Dataset version '1'..."); + var datasetResponse = datasets.UploadFile( + name: datasetName, + version: "1", + filePath: "sample_folder/sample_file1.txt" + ); + Console.WriteLine(datasetResponse); + + Console.WriteLine("Uploading folder to create Dataset version '2'..."); + datasetResponse = datasets.UploadFolder( + name: datasetName, + version: "2", + folderPath: "sample_folder" + ); + Console.WriteLine(datasetResponse); + + Console.WriteLine("Retrieving Dataset version '1'..."); + DatasetVersion dataset = await datasets.GetDatasetAsync(datasetName, "1"); + Console.WriteLine(dataset); + + Console.WriteLine($"Listing all versions for Dataset '{datasetName}':"); + await foreach (var ds in datasets.GetVersionsAsync(datasetName)) + { + Console.WriteLine(ds); + } + + Console.WriteLine($"Listing latest versions for all datasets:"); + await foreach (var ds in datasets.GetDatasetVersionsAsync()) + { + Console.WriteLine(ds); + } + + Console.WriteLine("Deleting Dataset versions '1' and '2'..."); + await datasets.DeleteAsync(datasetName, "1"); + await datasets.DeleteAsync(datasetName, "2"); + #endregion + } + } +}; diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file1.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file1.txt new file mode 100644 index 000000000000..e129759a15ff --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file1.txt @@ -0,0 +1 @@ +This is sample file 1 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file2.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file2.txt new file mode 100644 index 000000000000..3dd74cdfc9eb --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_file2.txt @@ -0,0 +1 @@ +This is sample file 2 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file3.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file3.txt new file mode 100644 index 000000000000..dde35c02f5a4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file3.txt @@ -0,0 +1 @@ +This is sample file 3 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file4.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file4.txt new file mode 100644 index 000000000000..0d17a14a0c1f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder1/sample_file4.txt @@ -0,0 +1 @@ +This is sample file 4 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file5.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file5.txt new file mode 100644 index 000000000000..2f4e87e14c77 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file5.txt @@ -0,0 +1 @@ +This is sample file 5 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file6.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file6.txt new file mode 100644 index 000000000000..e55c3637cdf5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file6.txt @@ -0,0 +1 @@ +This is sample file 6 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file7.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file7.txt new file mode 100644 index 000000000000..843cf01054c4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_file7.txt @@ -0,0 +1 @@ +This is sample file 7 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_folder3/sample_file8.txt b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_folder3/sample_file8.txt new file mode 100644 index 000000000000..73a747b6b520 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Datasets/sample_folder/sample_subfolder2/sample_folder3/sample_file8.txt @@ -0,0 +1 @@ +This is sample file 8 diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Deployment/Sample_Deployment.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Deployment/Sample_Deployment.cs new file mode 100644 index 000000000000..dff7170e5297 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Deployment/Sample_Deployment.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests; + +public class Sample_Deployment : SamplesBase +{ + [Test] + [SyncOnly] + public void DeploymentExample() + { + #region Snippet:AI_Projects_DeploymentExampleSync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); + var modelPublisher = System.Environment.GetEnvironmentVariable("MODEL_PUBLISHER"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; + var modelPublisher = TestEnvironment.MODELPUBLISHER; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Deployments deployments = projectClient.GetDeploymentsClient(); + + Console.WriteLine("List all deployments:"); + foreach (var deployment in deployments.GetDeployments()) + { + Console.WriteLine(deployment); + } + + Console.WriteLine($"List all deployments by the model publisher `{modelPublisher}`:"); + foreach (var deployment in deployments.GetDeployments(modelPublisher: modelPublisher)) + { + Console.WriteLine(deployment); + } + + Console.WriteLine($"Get a single deployment named `{modelDeploymentName}`:"); + var deploymentDetails = deployments.GetDeployment(modelDeploymentName); + Console.WriteLine(deploymentDetails); + #endregion + } + + [Test] + [AsyncOnly] + public async Task DeploymentExampleAsync() + { + #region Snippet:AI_Projects_DeploymentExampleAsync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("DEPLOYMENT_NAME"); + var modelPublisher = System.Environment.GetEnvironmentVariable("MODEL_PUBLISHER"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; + var modelPublisher = TestEnvironment.MODELPUBLISHER; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Deployments deployments = projectClient.GetDeploymentsClient(); + + Console.WriteLine("List all deployments:"); + await foreach (var deployment in deployments.GetDeploymentsAsync()) + { + Console.WriteLine(deployment); + } + + Console.WriteLine($"List all deployments by the model publisher `{modelPublisher}`:"); + await foreach (var deployment in deployments.GetDeploymentsAsync(modelPublisher: modelPublisher)) + { + Console.WriteLine(deployment); + } + + Console.WriteLine($"Get a single deployment named `{modelDeploymentName}`:"); + var deploymentDetails = deployments.GetDeploymentAsync(modelDeploymentName); + Console.WriteLine(deploymentDetails); + #endregion + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Evaluation/Sample_Evaluation.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Evaluation/Sample_Evaluation.cs new file mode 100644 index 000000000000..7cf0c32e1898 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Evaluation/Sample_Evaluation.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 System.ComponentModel; +using System.Data; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests; + +public class Sample_Evaluations : SamplesBase +{ + [Test] + [SyncOnly] + public void EvaluationsExampleSync() + { + #region Snippet:AI_Projects_EvaluationsExampleSync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var datasetName = TestEnvironment.DATASETNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + + // TODO: Uncomment once datasets are supported, will need to replace UploadFileAndCreate with new function name + //Console.WriteLine("Upload a single file and create a new Dataset to reference the file. Here we explicitly specify the dataset version."); + //DatasetVersion dataset = projectClient.GetDatasetsClient().UploadFileAndCreate( + // name: datasetName, + // version: "1", + // filePath: "./sample_folder/sample_data_evaluation.jsonl" + // ); + //Console.WriteLine(dataset); + + Console.WriteLine("Create an evaluation"); + Evaluations evaluations = projectClient.GetEvaluationsClient(); + + var evaluatorConfig = new EvaluatorConfiguration( + id: EvaluatorIDs.Relevance // TODO: Update this to use the correct evaluator ID + ); + evaluatorConfig.InitParams.Add("deployment_name", BinaryData.FromObjectAsJson("gpt-4o")); + + Evaluation evaluation = new Evaluation( + data: new InputDataset(""), // TODO: Update this to use the correct dataset ID + evaluators: new Dictionary { { "relevance", evaluatorConfig } } + ); + evaluation.DisplayName = "Sample Evaluation"; + evaluation.Description = "Sample evaluation for testing"; // TODO: Make optional once bug 4115256 is fixed + + Console.WriteLine("Create the evaluation run"); + Evaluation evaluationResponse = evaluations.Create(evaluation: evaluation); + Console.WriteLine(evaluationResponse); + + Console.WriteLine("Get evaluation"); + Evaluation getEvaluationResponse = evaluations.GetEvaluation(evaluationResponse.Name); + Console.WriteLine(getEvaluationResponse); + + Console.WriteLine("List evaluations"); + foreach (var eval in evaluations.GetEvaluations()) + { + Console.WriteLine(eval); + } + #endregion + } + + [Test] + [AsyncOnly] + public async Task EvaluationsExampleAsync() + { + #region Snippet:AI_Projects_EvaluationsExampleAsync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var datasetName = System.Environment.GetEnvironmentVariable("DATASET_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var datasetName = TestEnvironment.DATASETNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + + // TODO: Uncomment once datasets are supported, will need to replace UploadFileAndCreate with new function name + //Console.WriteLine("Upload a single file and create a new Dataset to reference the file. Here we explicitly specify the dataset version."); + //DatasetVersion dataset = projectClient.GetDatasetsClient().UploadFileAndCreate( + // name: datasetName, + // version: "1", + // filePath: "./sample_folder/sample_data_evaluation.jsonl" + // ); + //Console.WriteLine(dataset); + + Console.WriteLine("Create an evaluation"); + Evaluations evaluations = projectClient.GetEvaluationsClient(); + + var evaluatorConfig = new EvaluatorConfiguration( + id: EvaluatorIDs.Relevance // TODO: Update this to use the correct evaluator ID + ); + evaluatorConfig.InitParams.Add("deploymentName", BinaryData.FromObjectAsJson("gpt-4o")); + + Evaluation evaluation = new Evaluation( + data: new InputDataset(""), // TODO: Update this to use the correct dataset ID + evaluators: new Dictionary { { "relevance", evaluatorConfig } } + ); + evaluation.DisplayName = "Sample Evaluation"; + evaluation.Description = "Sample evaluation for testing"; // TODO: Make optional once bug 4115256 is fixed + + Console.WriteLine("Create the evaluation run"); + Evaluation evaluationResponse = await evaluations.CreateAsync(evaluation: evaluation); + Console.WriteLine(evaluationResponse); + + Console.WriteLine("Get evaluation"); + Evaluation getEvaluationResponse = await evaluations.GetEvaluationAsync(evaluationResponse.Name); + Console.WriteLine(getEvaluationResponse); + + Console.WriteLine("List evaluations"); + await foreach (var eval in evaluations.GetEvaluationsAsync()) + { + Console.WriteLine(eval); + } + #endregion + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AIAgents.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AIAgents.cs new file mode 100644 index 000000000000..fb65429e0608 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AIAgents.cs @@ -0,0 +1,195 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.Agents.Persistent; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests; + +public class Sample_AIAgents : SamplesBase +{ + [Test] + [SyncOnly] + public void AgentsBasics() + { + #region Snippet:AI_Projects_ExtensionsAgentsBasicsSync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + PersistentAgentsClient agentsClient = projectClient.GetPersistentAgentsClient(); + + // Step 1: Create an agent + PersistentAgent agent = agentsClient.Administration.CreateAgent( + model: modelDeploymentName, + name: "Math Tutor", + instructions: "You are a personal math tutor. Write and run code to answer math questions." + ); + + //// Step 2: Create a thread + PersistentAgentThread thread = agentsClient.Threads.CreateThread(); + + // Step 3: Add a message to a thread + PersistentThreadMessage message = agentsClient.Messages.CreateMessage( + thread.Id, + MessageRole.User, + "I need to solve the equation `3x + 11 = 14`. Can you help me?"); + + // Intermission: message is now correlated with thread + // Intermission: listing messages will retrieve the message just added + + List messagesList = [.. agentsClient.Messages.GetMessages(thread.Id)]; + Assert.AreEqual(message.Id, messagesList[0].Id); + + // Step 4: Run the agent + ThreadRun run = agentsClient.Runs.CreateRun( + thread.Id, + agent.Id, + additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); + do + { + Thread.Sleep(TimeSpan.FromMilliseconds(500)); + run = agentsClient.Runs.GetRun(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + + Pageable messages + = agentsClient.Messages.GetMessages( + threadId: thread.Id, order: ListSortOrder.Ascending); + + foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" messagesList = agentsClient.Messages.GetMessagesAsync(thread.Id); + List messagesOne = await messagesList.ToListAsync(); + Assert.AreEqual(message.Id, messagesOne[0].Id); + + // Step 4: Run the agent + #region Snippet:AI_Projects_ExtensionsAgentsOverviewCreateRun + ThreadRun run = await agentsClient.Runs.CreateRunAsync( + thread.Id, + agent.Id, + additionalInstructions: "Please address the user as Jane Doe. The user has a premium account."); + #endregion + + #region Snippet:AI_Projects_ExtensionsAgentsOverviewWaitForRun + do + { + await Task.Delay(TimeSpan.FromMilliseconds(500)); + run = await agentsClient.Runs.GetRunAsync(thread.Id, run.Id); + } + while (run.Status == RunStatus.Queued + || run.Status == RunStatus.InProgress); + Assert.AreEqual( + RunStatus.Completed, + run.Status, + run.LastError?.Message); + #endregion + + #region Snippet:AI_Projects_ExtensionsAgentsOverviewListUpdatedMessages + AsyncPageable messages + = agentsClient.Messages.GetMessagesAsync( + threadId: thread.Id, order: ListSortOrder.Ascending); + + await foreach (PersistentThreadMessage threadMessage in messages) + { + Console.Write($"{threadMessage.CreatedAt:yyyy-MM-dd HH:mm:ss} - {threadMessage.Role,10}: "); + foreach (MessageContent contentItem in threadMessage.ContentItems) + { + if (contentItem is MessageTextContent textItem) + { + Console.Write(textItem.Text); + } + else if (contentItem is MessageImageFileContent imageFileItem) + { + Console.Write($" [SyncOnly] public void InferenceChatCompletion() { - #region Snippet:ExtensionsChatClientSync + #region Snippet:AI_Projects_ChatClientSync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; + var endpoint = TestEnvironment.PROJECTENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - AIProjectClient client = new AIProjectClient(connectionString); + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); var requestOptions = new ChatCompletionsOptions() @@ -47,15 +49,15 @@ public void InferenceChatCompletion() [AsyncOnly] public async Task InferenceChatCompletionAsync() { - #region Snippet:ExtensionsChatClientAsync + #region Snippet:AI_Projects_ChatClientAsync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; + var endpoint = TestEnvironment.PROJECTENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - AIProjectClient client = new(connectionString); + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); var requestOptions = new ChatCompletionsOptions() @@ -76,15 +78,15 @@ public async Task InferenceChatCompletionAsync() [SyncOnly] public void InferenceEmbedding() { - #region Snippet:ExtensionsEmbeddingSync + #region Snippet:AI_Projects_EmbeddingSync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("EMBEDDING_MODEL_DEPLOYMENT_NAME"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.EMBEDDINGMODELDEPLOYMENTNAME; + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.EMBEDDINGSMODELDEPLOYMENTNAME; #endif - AIProjectClient client = new AIProjectClient(connectionString); + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); var input = new List { "first phrase", "second phrase", "third phrase" }; @@ -106,15 +108,15 @@ public void InferenceEmbedding() [AsyncOnly] public async Task InferenceEmbeddingAsync() { - #region Snippet:ExtensionsEmbeddingAsync + #region Snippet:AI_Projects_EmbeddingAsync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); - var modelDeploymentName = System.Environment.GetEnvironmentVariable("EMBEDDING_MODEL_DEPLOYMENT_NAME"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.EMBEDDINGMODELDEPLOYMENTNAME; + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.EMBEDDINGSMODELDEPLOYMENTNAME; #endif - AIProjectClient client = new AIProjectClient(connectionString); + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); EmbeddingsClient embeddingsClient = client.GetEmbeddingsClient(); var input = new List { "first phrase", "second phrase", "third phrase" }; @@ -133,20 +135,120 @@ public async Task InferenceEmbeddingAsync() } [Test] - public void ThrowsWhenNoConnection() + [SyncOnly] + public void InferenceImageEmbedding() { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - AIProjectClient client = new AIProjectClient(connectionString); + #region Snippet:AI_Projects_ImageEmbeddingSync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.EMBEDDINGSMODELDEPLOYMENTNAME; +#endif + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + ImageEmbeddingsClient imageEmbeddingsClient = client.GetImageEmbeddingsClient(); + + List input = new List + { +#if SNIPPET + ImageEmbeddingInput.Load(imageFilePath:"sampleImage.png", imageFormat:"png") +#else + ImageEmbeddingInput.Load(TestEnvironment.TESTIMAGEPNGINPUTPATH, "png"), +#endif + }; + + var requestOptions = new ImageEmbeddingsOptions(input) + { + Model = modelDeploymentName + }; + + Response response = imageEmbeddingsClient.Embed(requestOptions); + foreach (EmbeddingItem item in response.Value.Data) + { + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); + } +#endregion + + Assert.That(response, Is.Not.Null); + Assert.That(response.Value, Is.InstanceOf()); + Assert.That(response.Value.Id, Is.Not.Null.Or.Empty); + Assert.AreEqual(response.Value.Data.Count, input.Count); + for (int i = 0; i < input.Count; i++) + { + Assert.AreEqual(response.Value.Data[i].Index, i); + Assert.That(response.Value.Data[i].Embedding, Is.Not.Null.Or.Empty); + var embedding = response.Value.Data[i].Embedding.ToObjectFromJson>(); + Assert.That(embedding.Count, Is.GreaterThan(0)); + } + } + + [Test] + [AsyncOnly] + public async Task InferenceImageEmbeddingAsync() + { + #region Snippet:AI_Projects_ImageEmbeddingAsync +#if SNIPPET + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var modelDeploymentName = TestEnvironment.EMBEDDINGSMODELDEPLOYMENTNAME; +#endif + AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + ImageEmbeddingsClient imageEmbeddingsClient = client.GetImageEmbeddingsClient(); - var ex = Assert.Throws(() => + List input = new List { - ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); - }); +#if SNIPPET + ImageEmbeddingInput.Load(imageFilePath:"sampleImage.png", imageFormat:"png") +#else + ImageEmbeddingInput.Load(TestEnvironment.TESTIMAGEPNGINPUTPATH, "png"), +#endif + }; - Assert.AreEqual( - $"No connections found for '{ConnectionType.Serverless}'. At least one connection is required. Please add a new connection in the Azure AI Foundry portal by following the instructions here: https://aka.ms/azsdk/azure-ai-projects/how-to/connections-add", - ex.Message); - Console.WriteLine(ex.Message); + var requestOptions = new ImageEmbeddingsOptions(input) + { + Model = modelDeploymentName + }; + + Response response = await imageEmbeddingsClient.EmbedAsync(requestOptions); + foreach (EmbeddingItem item in response.Value.Data) + { + List embedding = item.Embedding.ToObjectFromJson>(); + Console.WriteLine($"Index: {item.Index}, Embedding: <{string.Join(", ", embedding)}>"); + } + #endregion + + Assert.That(response, Is.Not.Null); + Assert.That(response.Value, Is.InstanceOf()); + Assert.That(response.Value.Id, Is.Not.Null.Or.Empty); + Assert.AreEqual(response.Value.Data.Count, input.Count); + for (int i = 0; i < input.Count; i++) + { + Assert.AreEqual(response.Value.Data[i].Index, i); + Assert.That(response.Value.Data[i].Embedding, Is.Not.Null.Or.Empty); + var embedding = response.Value.Data[i].Embedding.ToObjectFromJson>(); + Assert.That(embedding.Count, Is.GreaterThan(0)); + } } + + // [Test] + // public void ThrowsWhenNoConnection() + // { + // var endpoint = TestEnvironment.PROJECTENDPOINT; + // var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; + // AIProjectClient client = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + + // var ex = Assert.Throws(() => + // { + // ChatCompletionsClient chatClient = client.GetChatCompletionsClient(); + // }); + + // Assert.AreEqual( + // $"No connections found for '{ConnectionType.Serverless}'. At least one connection is required. Please add a new connection in the Azure AI Foundry portal by following the instructions here: https://aka.ms/azsdk/azure-ai-projects/how-to/connections-add", + // ex.Message); + // Console.WriteLine(ex.Message); + // } } diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AzureOpenAI.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AzureOpenAI.cs index 17b826262cf4..0e48448a3c66 100644 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AzureOpenAI.cs +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_AzureOpenAI.cs @@ -4,11 +4,13 @@ #nullable disable using System; +using System.ClientModel; using System.Threading.Tasks; -using Azure.AI.OpenAI; using Azure.Core.TestFramework; using NUnit.Framework; using OpenAI.Chat; +using Azure.AI.OpenAI; +using Azure.Core.Diagnostics; namespace Azure.AI.Projects.Tests; @@ -18,16 +20,16 @@ public class Sample_AzureOpenAI : SamplesBase [SyncOnly] public void AzureOpenAIChatCompletion() { - #region Snippet:AzureOpenAISync + #region Snippet:AI_Projects_AzureOpenAISync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; + var endpoint = TestEnvironment.PROJECTENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - AIProjectClient client = new AIProjectClient(connectionString); - ChatClient chatClient = client.GetAzureOpenAIChatClient(modelDeploymentName); + AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + ChatClient chatClient = projectClient.GetAzureOpenAIChatClient(deploymentName: modelDeploymentName, connectionName: null, apiVersion: null); ChatCompletion result = chatClient.CompleteChat("List all the rainbow colors"); Console.WriteLine(result.Content[0].Text); @@ -38,37 +40,19 @@ public void AzureOpenAIChatCompletion() [AsyncOnly] public async Task AzureOpenAIChatCompletionAsync() { - #region Snippet:AzureOpenAIAsync + #region Snippet:AI_Projects_AzureOpenAIAsync #if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); + var endpoint = System.Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); var modelDeploymentName = System.Environment.GetEnvironmentVariable("MODEL_DEPLOYMENT_NAME"); #else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; + var endpoint = TestEnvironment.PROJECTENDPOINT; var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; #endif - AIProjectClient client = new AIProjectClient(connectionString); - ChatClient chatClient = client.GetAzureOpenAIChatClient(modelDeploymentName); + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + ChatClient chatClient = projectClient.GetAzureOpenAIChatClient(deploymentName: modelDeploymentName, connectionName: null, apiVersion: null); ChatCompletion result = await chatClient.CompleteChatAsync("List all the rainbow colors"); Console.WriteLine(result.Content[0].Text); #endregion } - - [Test] - public void ThrowsWhenNoConnection() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - AIProjectClient client = new AIProjectClient(connectionString); - - var ex = Assert.Throws(() => - { - ChatClient chatClient = client.GetAzureOpenAIChatClient("gpt-4o-mini"); - }); - - Assert.AreEqual( - $"No connections found for '{ConnectionType.AzureOpenAI}'. At least one connection is required. Please add a new connection in the Azure AI Foundry portal by following the instructions here: https://aka.ms/azsdk/azure-ai-projects/how-to/connections-add", - ex.Message); - Console.WriteLine(ex.Message); - } } diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_Search.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_Search.cs deleted file mode 100644 index 8313a7cc63ca..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/Sample_Search.cs +++ /dev/null @@ -1,82 +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.TestFramework; -using Azure.Search.Documents; -using Azure.Search.Documents.Models; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public class Sample_Search : SamplesBase -{ - [Test] - [SyncOnly] - public void Search() - { - #region Snippet:ExtensionsSearch -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; -#endif - AIProjectClient client = new(connectionString); - SearchClient searchClient = client.GetSearchClient("index"); - - SearchResults response = searchClient.Search("luxury hotel"); - foreach (SearchResult result in response.GetResults()) - { - SearchDocument doc = result.Document; - string id = (string)doc["HotelId"]; - string name = (string)doc["HotelName"]; - Console.WriteLine($"{id}: {name}"); - } - #endregion - } - - [Test] - [AsyncOnly] - public async Task SearchAsync() - { - #region Snippet:ExtensionsSearchAsync -#if SNIPPET - var connectionString = System.Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; -#endif - AIProjectClient client = new(connectionString); - SearchClient searchClient = client.GetSearchClient("index"); - - SearchResults response = await searchClient.SearchAsync("luxury hotel"); - await foreach (SearchResult result in response.GetResultsAsync()) - { - SearchDocument doc = result.Document; - string id = (string)doc["HotelId"]; - string name = (string)doc["HotelName"]; - Console.WriteLine($"{id}: {name}"); - } - #endregion - } - - [Test] - public void ThrowsWhenNoConnection() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - var modelDeploymentName = TestEnvironment.MODELDEPLOYMENTNAME; - AIProjectClient client = new AIProjectClient(connectionString); - - var ex = Assert.Throws(() => - { - SearchClient searchClient = client.GetSearchClient("index"); - }); - - Assert.AreEqual( - $"No connections found for '{ConnectionType.AzureAISearch}'. At least one connection is required. Please add a new connection in the Azure AI Foundry portal by following the instructions here: https://aka.ms/azsdk/azure-ai-projects/how-to/connections-add", - ex.Message); - Console.WriteLine(ex.Message); - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/juggling_balls.png b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/juggling_balls.png new file mode 100644 index 000000000000..55dafd287ef7 Binary files /dev/null and b/sdk/ai/Azure.AI.Projects/tests/Samples/Extensions/juggling_balls.png differ diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Indexes/Sample_Indexes.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Indexes/Sample_Indexes.cs new file mode 100644 index 000000000000..8927d56e71bf --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Indexes/Sample_Indexes.cs @@ -0,0 +1,76 @@ +// 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.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests +{ + public class Sample_Indexes : SamplesBase + { + [Test] + [SyncOnly] + public void IndexesExample() + { + #region Snippet:AI_Projects_IndexesExampleSync +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); + var indexName = Environment.GetEnvironmentVariable("INDEX_NAME") ?? "my-index"; + var indexVersion = Environment.GetEnvironmentVariable("INDEX_VERSION") ?? "1.0"; + var aiSearchConnectionName = Environment.GetEnvironmentVariable("AI_SEARCH_CONNECTION_NAME") ?? "my-ai-search-connection-name"; + var aiSearchIndexName = Environment.GetEnvironmentVariable("AI_SEARCH_INDEX_NAME") ?? "my-ai-search-index-name"; +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; + var indexName = TestEnvironment.INDEXNAME ?? "my-index"; + var indexVersion = TestEnvironment.INDEXVERSION ?? "1.0"; + var aiSearchConnectionName = TestEnvironment.AISEARCHCONNECTIONNAME ?? "my-ai-search-connection-name"; + var aiSearchIndexName = TestEnvironment.AISEARCHINDEXNAME ?? "my-ai-search-index-name"; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + Indexes indexesClient = projectClient.GetIndexesClient(); + + RequestContent content = RequestContent.Create(new + { + connectionName = aiSearchConnectionName, + indexName = aiSearchIndexName, + indexVersion = indexVersion, + type = "AzureSearch", + description = "Sample Index for testing", + displayName = "Sample Index" + }); + + Console.WriteLine($"Create an Index named `{indexName}` referencing an existing AI Search resource:"); + var index = indexesClient.CreateOrUpdate( + name: indexName, + version: indexVersion, + content: content + ); + Console.WriteLine(index); + + Console.WriteLine($"Get an existing Index named `{indexName}`, version `{indexVersion}`:"); + var retrievedIndex = indexesClient.GetIndex(name: indexName, version: indexVersion); + Console.WriteLine(retrievedIndex); + + Console.WriteLine($"Listing all versions of the Index named `{indexName}`:"); + foreach (var version in indexesClient.GetVersions(name: indexName)) + { + Console.WriteLine(version); + } + + Console.WriteLine($"Listing all Indices:"); + foreach (var version in indexesClient.GetIndices()) + { + Console.WriteLine(version); + } + + Console.WriteLine("Delete the Index version created above:"); + indexesClient.Delete(name: indexName, version: indexVersion); + #endregion + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/README.md b/sdk/ai/Azure.AI.Projects/tests/Samples/README.md deleted file mode 100644 index 770381232296..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/README.md +++ /dev/null @@ -1 +0,0 @@ -The source files in this directory are written as tests to ensure that our samples compile and function correctly. \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/ReadMe.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/ReadMe.cs new file mode 100644 index 000000000000..f0f28e57787e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/ReadMe.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests; + +public partial class Readme : SamplesBase +{ + [Test] + public void Authenticate() + { + #region Snippet:AI_Projects_OverviewCreateClient +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; +#endif + AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + #endregion + } + + [Test] + public void Troubleshooting() + { + var endpoint = TestEnvironment.PROJECTENDPOINT; + AIProjectClient projectClient = new AIProjectClient(new Uri(endpoint), new DefaultAzureCredential()); + + #region Snippet:AI_Projects_Readme_Troubleshooting + try + { + projectClient.GetDatasetsClient().GetDataset("non-existent-dataset-name", "non-existent-dataset-version"); + } + catch (RequestFailedException ex) when (ex.Status == 404) + { + Console.WriteLine($"Exception status code: {ex.Status}"); + Console.WriteLine($"Exception message: {ex.Message}"); + } + #endregion + } +} \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Readme.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Readme.cs deleted file mode 100644 index 139bfaf9ee7b..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Samples/Readme.cs +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -#nullable disable - -using System; -using Azure.Core.TestFramework; -using NUnit.Framework; - -namespace Azure.AI.Projects.Tests; - -public partial class Readme : SamplesBase -{ - [Test] - public void Authenticate() - { - #region Snippet:OverviewCreateClient -#if SNIPPET - var connectionString = Environment.GetEnvironmentVariable("PROJECT_CONNECTION_STRING"); -#else - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; -#endif - AIProjectClient projectClient = new AIProjectClient(connectionString, new DefaultAzureCredential()); - #endregion - } - - [Test] - public void Troubleshooting() - { - var connectionString = TestEnvironment.AzureAICONNECTIONSTRING; - AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredential()); - - #region Snippet:Readme_Troubleshooting - try - { - client.CreateMessage( - "thread1234", - MessageRole.User, - "I need to solve the equation `3x + 11 = 14`. Can you help me?"); - } - catch (RequestFailedException ex) when (ex.Status == 404) - { - Console.WriteLine($"Exception status code: {ex.Status}"); - Console.WriteLine($"Exception message: {ex.Message}"); - } - #endregion - } -} diff --git a/sdk/ai/Azure.AI.Projects/tests/Samples/Telemetry/Sample_Telemetry.cs b/sdk/ai/Azure.AI.Projects/tests/Samples/Telemetry/Sample_Telemetry.cs new file mode 100644 index 000000000000..b85c08017404 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/tests/Samples/Telemetry/Sample_Telemetry.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.TestFramework; +using NUnit.Framework; + +namespace Azure.AI.Projects.Tests +{ + public class Sample_Telemetry : SamplesBase + { + [Test] + [SyncOnly] + public void TelemetryExample() + { + #region Snippet:AI_Projects_TelemetryExampleSync +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + + Console.WriteLine("Get the Application Insights connection string."); + var connectionString = projectClient.Telemetry.GetConnectionString(); + Console.WriteLine($"Connection string: {connectionString}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task TelemetryExampleAsync() + { + #region Snippet:AI_Projects_TelemetryExampleAsync +#if SNIPPET + var endpoint = Environment.GetEnvironmentVariable("PROJECT_ENDPOINT"); +#else + var endpoint = TestEnvironment.PROJECTENDPOINT; +#endif + AIProjectClient projectClient = new(new Uri(endpoint), new DefaultAzureCredential()); + + Console.WriteLine("Get the Application Insights connection string."); + var connectionString = await projectClient.Telemetry.GetConnectionStringAsync(); + Console.WriteLine($"Connection string: {connectionString}"); + #endregion + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/tests/TestData/product_info_1.md b/sdk/ai/Azure.AI.Projects/tests/TestData/product_info_1.md deleted file mode 100644 index 041155831d53..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/TestData/product_info_1.md +++ /dev/null @@ -1,51 +0,0 @@ -# Information about product item_number: 1 - -## Brand -Contoso Galaxy Innovations - -## Category -Smart Eyewear - -## Features -- Augmented Reality interface -- Voice-controlled AI assistant -- HD video recording with 3D audio -- UV protection and blue light filtering -- Wireless charging with extended battery life - -## User Guide - -### 1. Introduction -Introduction to your new SmartView Glasses - -### 2. Product Overview -Overview of features and controls - -### 3. Sizing and Fit -Finding your perfect fit and style adjustments - -### 4. Proper Care and Maintenance -Cleaning and caring for your SmartView Glasses - -### 5. Break-in Period -Adjusting to the augmented reality experience - -### 6. Safety Tips -Safety guidelines for public and private spaces - -### 7. Troubleshooting -Quick fixes for common issues - -## Warranty Information -Two-year limited warranty on all electronic components - -## Contact Information -Customer Support at support@contoso-galaxy-innovations.com - -## Return Policy -30-day return policy with no questions asked - -## FAQ -- How to sync your SmartView Glasses with your devices -- Troubleshooting connection issues -- Customizing your augmented reality environment diff --git a/sdk/ai/Azure.AI.Projects/tests/Utilities/MockTokenCredential.cs b/sdk/ai/Azure.AI.Projects/tests/Utilities/MockTokenCredential.cs deleted file mode 100644 index d195a3adf591..000000000000 --- a/sdk/ai/Azure.AI.Projects/tests/Utilities/MockTokenCredential.cs +++ /dev/null @@ -1,23 +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; - -namespace Azure.AI.Projects.Tests -{ - internal class MockTokenCredential : TokenCredential - { - public override async ValueTask GetTokenAsync(TokenRequestContext requestContext, CancellationToken cancellationToken) - { - return await Task.Run(() => new AccessToken(accessToken: "Mock Token", expiresOn: DateTimeOffset.MaxValue)); - } - - public override AccessToken GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken) - { - return new AccessToken(accessToken: "Mock Token", expiresOn: DateTimeOffset.MaxValue); - } - } -} diff --git a/sdk/ai/Azure.AI.Projects/tsp-location.yaml b/sdk/ai/Azure.AI.Projects/tsp-location.yaml index 7aa8fb854ef9..f000a4ca80ef 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: 0c16eaab2ab3fb6379871f77353251bd6f5c643a +commit: c6f9c72658fa9039b159ef1aa6e6d0c2385ba0ee repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/AlertProcessingRuleResource.Serialization.cs b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/AlertProcessingRuleResource.Serialization.cs index f45a0794da4a..f27a90251752 100644 --- a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/AlertProcessingRuleResource.Serialization.cs +++ b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/AlertProcessingRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AlertsManagement { public partial class AlertProcessingRuleResource : IJsonModel { + private static AlertProcessingRuleData s_dataDeserializationInstance; + private static AlertProcessingRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AlertProcessingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AlertProcessingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAlertsManagementContext.Default); AlertProcessingRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAlertsManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/ServiceAlertResource.Serialization.cs b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/ServiceAlertResource.Serialization.cs index ce81b23d7e6d..0ffc2e5250c8 100644 --- a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/ServiceAlertResource.Serialization.cs +++ b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/ServiceAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AlertsManagement { public partial class ServiceAlertResource : IJsonModel { + private static ServiceAlertData s_dataDeserializationInstance; + private static ServiceAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAlertsManagementContext.Default); ServiceAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAlertsManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/SmartGroupResource.Serialization.cs b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/SmartGroupResource.Serialization.cs index 5a3de4a6fe8c..08a116a0fb74 100644 --- a/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/SmartGroupResource.Serialization.cs +++ b/sdk/alertsmanagement/Azure.ResourceManager.AlertsManagement/src/Generated/SmartGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AlertsManagement { public partial class SmartGroupResource : IJsonModel { + private static SmartGroupData s_dataDeserializationInstance; + private static SmartGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SmartGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SmartGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAlertsManagementContext.Default); SmartGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAlertsManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/analysisservices/Azure.ResourceManager.Analysis/src/Generated/AnalysisServerResource.Serialization.cs b/sdk/analysisservices/Azure.ResourceManager.Analysis/src/Generated/AnalysisServerResource.Serialization.cs index e75ab4a7c80a..76adbf5eafc2 100644 --- a/sdk/analysisservices/Azure.ResourceManager.Analysis/src/Generated/AnalysisServerResource.Serialization.cs +++ b/sdk/analysisservices/Azure.ResourceManager.Analysis/src/Generated/AnalysisServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Analysis { public partial class AnalysisServerResource : IJsonModel { + private static AnalysisServerData s_dataDeserializationInstance; + private static AnalysisServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AnalysisServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AnalysisServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAnalysisContext.Default); AnalysisServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAnalysisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apicenter/Azure.ResourceManager.ApiCenter/src/Generated/ApiCenterServiceResource.Serialization.cs b/sdk/apicenter/Azure.ResourceManager.ApiCenter/src/Generated/ApiCenterServiceResource.Serialization.cs index 2192fb935d81..c9e16b3ff03f 100644 --- a/sdk/apicenter/Azure.ResourceManager.ApiCenter/src/Generated/ApiCenterServiceResource.Serialization.cs +++ b/sdk/apicenter/Azure.ResourceManager.ApiCenter/src/Generated/ApiCenterServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiCenter { public partial class ApiCenterServiceResource : IJsonModel { + private static ApiCenterServiceData s_dataDeserializationInstance; + private static ApiCenterServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiCenterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiCenterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiCenterContext.Default); ApiCenterServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/Azure.ResourceManager.ApiManagement.sln b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/Azure.ResourceManager.ApiManagement.sln index eaf9ec3876fd..c9ea894a22ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/Azure.ResourceManager.ApiManagement.sln +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/Azure.ResourceManager.ApiManagement.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ApiMa EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ApiManagement.Tests", "tests\Azure.ResourceManager.ApiManagement.Tests.csproj", "{A5FFA29E-B174-4976-A2F5-A908647318E9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.ApiManagement.Samples", "samples\Azure.ResourceManager.ApiManagement.Samples.csproj", "{B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,18 +41,6 @@ Global {A5FFA29E-B174-4976-A2F5-A908647318E9}.Release|x64.Build.0 = Release|Any CPU {A5FFA29E-B174-4976-A2F5-A908647318E9}.Release|x86.ActiveCfg = Release|Any CPU {A5FFA29E-B174-4976-A2F5-A908647318E9}.Release|x86.Build.0 = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|x64.ActiveCfg = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|x64.Build.0 = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|x86.ActiveCfg = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Debug|x86.Build.0 = Debug|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|Any CPU.Build.0 = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|x64.ActiveCfg = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|x64.Build.0 = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|x86.ActiveCfg = Release|Any CPU - {B20CA0CA-F4A7-4B38-AF96-4C4F3D57D51E}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md index 5f6f7b720105..b48f41eaa953 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.3.0-beta.3 (Unreleased) +## 1.4.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,19 @@ ### Other Changes +## 1.3.0 (2025-05-21) + +### Features Added + +- Upgraded api-version tag to 'package-2024-05' from 'package-preview-2023-03'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md. + - Added Gateway resource operation. + - Added Workspace Backend operations. + - Added Workspace Certificate Operations. + - Added Workspace Logger Operations + - Added WorkspaceLinks Operations + - Added Workspace Api diagnostics Operations + - Added OperationStatus Operations which follow the Azure-AsyncOperation flow + ## 1.3.0-beta.2 (2025-03-11) ### Features Added diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.net8.0.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.net8.0.cs index 5c57a61090ba..6d5904a64f02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.net8.0.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.net8.0.cs @@ -37,6 +37,7 @@ public ApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -90,6 +91,123 @@ protected ApiDiagnosticResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ApiGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiGatewayCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.ApiManagement.ApiGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.ApiManagement.ApiGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string gatewayName, 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 gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string gatewayName, 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 ApiGatewayConfigConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiGatewayConfigConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configConnectionName, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configConnectionName, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configConnectionName, 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 configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configConnectionName, 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 ApiGatewayConfigConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayConfigConnectionData() { } + public string DefaultHostname { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public System.Collections.Generic.IList Hostnames { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiGatewayConfigConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiGatewayConfigConnectionResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApiGatewayData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayData(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties sku) { } + public string ConfigurationApiHostname { get { throw null; } } + public System.DateTimeOffset? CreatedAtUtc { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public string FrontendDefaultHostname { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties Sku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public string TargetProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiGatewayResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiGatewayResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayData 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 gatewayName) { 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.Response GetApiGatewayConfigConnection(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiGatewayConfigConnectionAsync(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionCollection GetApiGatewayConfigConnections() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAvailableSkusApiManagementGatewaySkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAvailableSkusApiManagementGatewaySkusAsync(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.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.Models.ApiGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ApiIssueAttachmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ApiIssueAttachmentCollection() { } @@ -328,11 +446,13 @@ public ApiManagementBackendData() { } public System.Collections.Generic.IList CircuitBreakerRules { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract Credentials { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList PoolServices { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendProxyContract Proxy { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties Tls { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.BackendType? TypePropertiesType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +728,13 @@ public static partial class ApiManagementExtensions public static Azure.Response CheckApiManagementServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckApiManagementServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiDiagnosticResource GetApiDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetApiGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetApiGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayResource GetApiGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayCollection GetApiGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetApiGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetApiGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentResource GetApiIssueAttachmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentResource GetApiIssueCommentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueResource GetApiIssueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -659,6 +786,7 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingResource GetApiManagementTenantSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementUserResource GetApiManagementUserResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementUserSubscriptionResource GetApiManagementUserSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationPolicyResource GetApiOperationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationResource GetApiOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationTagResource GetApiOperationTagResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -673,7 +801,10 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetOperationsResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task GetOperationsResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyRestrictionContractResource GetPolicyRestrictionContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -684,6 +815,7 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ServiceTagApiLinkResource GetServiceTagApiLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceTagOperationLinkResource GetServiceTagOperationLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceTagProductLinkResource GetServiceTagProductLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationPolicyResource GetServiceWorkspaceApiOperationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationResource GetServiceWorkspaceApiOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiPolicyResource GetServiceWorkspaceApiPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -691,7 +823,11 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiResource GetServiceWorkspaceApiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiSchemaResource GetServiceWorkspaceApiSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetResource GetServiceWorkspaceApiVersionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupResource GetServiceWorkspaceGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueResource GetServiceWorkspaceNamedValueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceNotificationResource GetServiceWorkspaceNotificationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyFragmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -910,6 +1046,7 @@ public partial class ApiManagementGlobalSchemaData : Azure.ResourceManager.Model public ApiManagementGlobalSchemaData() { } public string Description { get { throw null; } set { } } public System.BinaryData Document { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? SchemaType { get { throw null; } set { } } public System.BinaryData Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1168,6 +1305,7 @@ public ApiManagementNamedValueData() { } public string DisplayName { get { throw null; } set { } } public bool? IsSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties KeyVaultDetails { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Tags { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1420,6 +1558,7 @@ public ApiManagementPortalRevisionData() { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } public bool? IsCurrent { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } @@ -1844,6 +1983,8 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> ApplyNetworkConfigurationUpdatesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceApplyNetworkConfigurationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Backup(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BackupAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ByServicePolicyRestrictionValidation(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ByServicePolicyRestrictionValidationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateContentType(string contentTypeId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1858,6 +1999,9 @@ protected ApiManagementServiceResource() { } public virtual Azure.ResourceManager.ArmOperation DeployTenantConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, Azure.ResourceManager.ApiManagement.Models.ConfigurationDeployContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeployTenantConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, Azure.ResourceManager.ApiManagement.Models.ConfigurationDeployContent 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 Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksCollection GetAllApiManagementWorkspaceLinks() { throw null; } + public virtual Azure.Pageable GetAllPoliciesByService(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllPoliciesByServiceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApi(string apiId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiAsync(string apiId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApiManagementAuthorizationServer(string authsid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1935,6 +2079,8 @@ protected ApiManagementServiceResource() { } public virtual Azure.Response GetApiManagementUser(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserCollection GetApiManagementUsers() { throw null; } + public virtual Azure.Response GetApiManagementWorkspaceLinks(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiManagementWorkspaceLinksAsync(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiCollection GetApis() { throw null; } public virtual Azure.Pageable GetApisByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedApis = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApisByTagsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedApis = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1971,6 +2117,9 @@ protected ApiManagementServiceResource() { } public virtual Azure.Response GetPolicyFragmentContract(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPolicyFragmentContractAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractCollection GetPolicyFragmentContracts() { throw null; } + public virtual Azure.Response GetPolicyRestrictionContract(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyRestrictionContractAsync(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractCollection GetPolicyRestrictionContracts() { throw null; } public virtual Azure.Response GetPortalConfigContract(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPortalConfigContractAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractCollection GetPortalConfigContracts() { throw null; } @@ -2255,6 +2404,49 @@ protected ApiManagementUserSubscriptionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementWorkspaceLinksCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiManagementWorkspaceLinksCollection() { } + public virtual Azure.Response Exists(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workspaceId, 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 workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workspaceId, 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 ApiManagementWorkspaceLinksData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementWorkspaceLinksData() { } + public Azure.ETag? ETag { get { throw null; } } + public System.Collections.Generic.IList Gateways { get { throw null; } } + public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementWorkspaceLinksResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiManagementWorkspaceLinksResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId) { 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.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ApiOperationCollection() { } @@ -2561,6 +2753,7 @@ public ApiSchemaData() { } public System.BinaryData Components { get { throw null; } set { } } public string ContentType { get { throw null; } set { } } public System.BinaryData Definitions { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiSchemaData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2754,6 +2947,7 @@ protected AuthorizationAccessPolicyContractCollection() { } public partial class AuthorizationAccessPolicyContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AuthorizationAccessPolicyContractData() { } + public System.Collections.Generic.IList AppIds { get { throw null; } } public string ObjectId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3018,6 +3212,7 @@ public partial class PolicyFragmentContractData : Azure.ResourceManager.Models.R public PolicyFragmentContractData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? Format { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3049,6 +3244,56 @@ protected PolicyFragmentContractResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class PolicyRestrictionContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyRestrictionContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyRestrictionId, Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyRestrictionId, Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string policyRestrictionId, 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 policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string policyRestrictionId, 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 PolicyRestrictionContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyRestrictionContractData() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? RequireBase { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PolicyRestrictionContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyRestrictionContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag? ifMatch = default(Azure.ETag?), 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class PortalConfigContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PortalConfigContractCollection() { } @@ -3458,6 +3703,44 @@ protected ServiceWorkspaceApiCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } + public partial class ServiceWorkspaceApiDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceApiDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticId, 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 diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticId, 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 ServiceWorkspaceApiDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceApiDiagnosticResource() { } + public virtual Azure.ResourceManager.ApiManagement.DiagnosticContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceApiOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceApiOperationCollection() { } @@ -3626,6 +3909,9 @@ protected ServiceWorkspaceApiResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetServiceWorkspaceApiDiagnostic(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiDiagnosticAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticCollection GetServiceWorkspaceApiDiagnostics() { throw null; } public virtual Azure.Response GetServiceWorkspaceApiOperation(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiOperationAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationCollection GetServiceWorkspaceApiOperations() { throw null; } @@ -3724,6 +4010,122 @@ protected ServiceWorkspaceApiVersionSetResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ServiceWorkspaceBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backendId, Azure.ResourceManager.ApiManagement.ApiManagementBackendData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backendId, Azure.ResourceManager.ApiManagement.ApiManagementBackendData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backendId, 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 backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backendId, 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 ServiceWorkspaceBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceBackendResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementBackendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementBackendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceWorkspaceCertificateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceCertificateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string certificateId, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string certificateId, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string certificateId, 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?), bool? isKeyVaultRefreshFailed = default(bool?), 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?), bool? isKeyVaultRefreshFailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string certificateId, 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 ServiceWorkspaceCertificateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceCertificateResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementCertificateData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RefreshSecret(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshSecretAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementCertificateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceWorkspaceDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticId, 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 diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticId, 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 ServiceWorkspaceDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceDiagnosticResource() { } + public virtual Azure.ResourceManager.ApiManagement.DiagnosticContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceGroupCollection() { } @@ -3770,6 +4172,44 @@ protected ServiceWorkspaceGroupResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ServiceWorkspaceLoggerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceLoggerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string loggerId, Azure.ResourceManager.ApiManagement.ApiManagementLoggerData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string loggerId, Azure.ResourceManager.ApiManagement.ApiManagementLoggerData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string loggerId, 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 loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string loggerId, 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 ServiceWorkspaceLoggerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceLoggerResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementLoggerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementLoggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementLoggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementLoggerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementLoggerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceNamedValueCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceNamedValueCollection() { } @@ -4537,9 +4977,21 @@ protected WorkspaceContractResource() { } public virtual Azure.Response GetServiceWorkspaceApiVersionSet(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiVersionSetAsync(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetCollection GetServiceWorkspaceApiVersionSets() { throw null; } + public virtual Azure.Response GetServiceWorkspaceBackend(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceBackendAsync(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendCollection GetServiceWorkspaceBackends() { throw null; } + public virtual Azure.Response GetServiceWorkspaceCertificate(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceCertificateAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateCollection GetServiceWorkspaceCertificates() { throw null; } + public virtual Azure.Response GetServiceWorkspaceDiagnostic(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceDiagnosticAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticCollection GetServiceWorkspaceDiagnostics() { throw null; } public virtual Azure.Response GetServiceWorkspaceGroup(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupCollection GetServiceWorkspaceGroups() { throw null; } + public virtual Azure.Response GetServiceWorkspaceLogger(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceLoggerAsync(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerCollection GetServiceWorkspaceLoggers() { throw null; } public virtual Azure.Response GetServiceWorkspaceNamedValue(string namedValueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceNamedValueAsync(string namedValueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueCollection GetServiceWorkspaceNamedValues() { throw null; } @@ -4579,6 +5031,8 @@ public partial class MockableApiManagementArmClient : Azure.ResourceManager.ArmR { protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiDiagnosticResource GetApiDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayResource GetApiGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueAttachmentResource GetApiIssueAttachmentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueCommentResource GetApiIssueCommentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueResource GetApiIssueResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4616,6 +5070,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingResource GetApiManagementTenantSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserResource GetApiManagementUserResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserSubscriptionResource GetApiManagementUserSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationPolicyResource GetApiOperationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationResource GetApiOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationTagResource GetApiOperationTagResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4631,6 +5086,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractResource GetPolicyRestrictionContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4641,6 +5097,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ServiceTagApiLinkResource GetServiceTagApiLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceTagOperationLinkResource GetServiceTagOperationLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceTagProductLinkResource GetServiceTagProductLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationPolicyResource GetServiceWorkspaceApiOperationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationResource GetServiceWorkspaceApiOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiPolicyResource GetServiceWorkspaceApiPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4648,7 +5105,11 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiResource GetServiceWorkspaceApiResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiSchemaResource GetServiceWorkspaceApiSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetResource GetServiceWorkspaceApiVersionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupResource GetServiceWorkspaceGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueResource GetServiceWorkspaceNamedValueResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNotificationResource GetServiceWorkspaceNotificationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyFragmentResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4669,6 +5130,9 @@ protected MockableApiManagementArmClient() { } public partial class MockableApiManagementResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableApiManagementResourceGroupResource() { } + public virtual Azure.Response GetApiGateway(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiGatewayAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayCollection GetApiGateways() { throw null; } public virtual Azure.Response GetApiManagementService(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementServiceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementServiceCollection GetApiManagementServices() { throw null; } @@ -4678,6 +5142,8 @@ public partial class MockableApiManagementSubscriptionResource : Azure.ResourceM protected MockableApiManagementSubscriptionResource() { } public virtual Azure.Response CheckApiManagementServiceNameAvailability(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckApiManagementServiceNameAvailabilityAsync(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetApiGateways(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetApiGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApiManagementDeletedService(Azure.Core.AzureLocation location, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementDeletedServiceAsync(Azure.Core.AzureLocation location, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementDeletedServiceCollection GetApiManagementDeletedServices() { throw null; } @@ -4689,6 +5155,8 @@ protected MockableApiManagementSubscriptionResource() { } public virtual Azure.AsyncPageable GetApiManagementServicesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetApiManagementSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApiManagementSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOperationsResult(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetOperationsResultAsync(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.ApiManagement.Models @@ -4733,6 +5201,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 AllPoliciesContract : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllPoliciesContract() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState? ComplianceState { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ReferencePolicyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AlwaysLog : System.IEquatable { @@ -4784,6 +5264,7 @@ public ApiCreateOrUpdateContent() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -4842,6 +5323,45 @@ 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 ApiGatewayPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayPatch() { } + public string ConfigurationApiHostname { get { throw null; } } + public System.DateTimeOffset? CreatedAtUtc { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public string FrontendDefaultHostname { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch Sku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string TargetProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ApiGatewaySkuType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiGatewaySkuType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType Standard { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType WorkspaceGatewayPremium { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType WorkspaceGatewayStandard { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType 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.ApiManagement.Models.ApiGatewaySkuType left, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType left, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiIssuePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiIssuePatch() { } @@ -4931,9 +5451,11 @@ public partial class ApiManagementBackendPatch : System.ClientModel.Primitives.I { public ApiManagementBackendPatch() { } public Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties BackendServiceFabricCluster { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.BackendType? BackendType { get { throw null; } set { } } public System.Collections.Generic.IList CircuitBreakerRules { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract Credentials { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList PoolServices { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendProxyContract Proxy { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -5019,6 +5541,30 @@ 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 ApiManagementGatewaySkuProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementGatewaySkuProperties(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType name) { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewaySkuPropertiesForPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementGatewaySkuPropertiesForPatch() { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGroupCreateOrUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementGroupCreateOrUpdateContent() { } @@ -5457,11 +6003,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ApiManagementServiceSkuType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Basic { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType BasicV2 { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Consumption { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Developer { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Isolated { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Premium { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Standard { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType StandardV2 { get { throw null; } } public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -5834,6 +6382,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ApiType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiType GraphQL { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiType Grpc { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Http { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Odata { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Soap { get { throw null; } } @@ -5902,15 +6451,23 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, System.Collections.Generic.IEnumerable zones, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Uri gatewayRegionalUri, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract AllPoliciesContract(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 referencePolicyId = null, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState? complianceState = default(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet, string value, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format, Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiData ApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiData ApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiData ApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiData ApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData ApiGatewayConfigConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.ResourceIdentifier sourceId = null, string defaultHostname = null, System.Collections.Generic.IEnumerable hostnames = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayData ApiGatewayData(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.ApiManagement.Models.ApiManagementGatewaySkuProperties sku = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), string frontendDefaultHostname = null, Azure.Core.ResourceIdentifier subnetId = null, string configurationApiHostname = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch ApiGatewayPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch sku = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), string frontendDefaultHostname = null, Azure.Core.ResourceIdentifier subnetId = null, string configurationApiHostname = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentData ApiIssueAttachmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string contentFormat = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentData ApiIssueCommentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string text = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier userId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } @@ -5919,7 +6476,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Collections.Generic.IEnumerable circuitBreakerRules = null, System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Collections.Generic.IEnumerable circuitBreakerRules = null, System.Collections.Generic.IEnumerable poolServices = null, Azure.ResourceManager.ApiManagement.Models.BackendType? typePropertiesType = default(Azure.ResourceManager.ApiManagement.Models.BackendType?), System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string title, string description, System.Uri resourceUri, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls, System.Uri uri, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCacheData ApiManagementCacheData(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 connectionString = null, string useFromLocation = null, System.Uri resourceUri = null) { throw null; } @@ -5929,7 +6486,9 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayCertificateAuthorityData ApiManagementGatewayCertificateAuthorityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isTrusted = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayData ApiManagementGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ResourceLocationDataContract locationData = null, string description = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayHostnameConfigurationData ApiManagementGatewayHostnameConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostname = null, string certificateId = null, bool? isClientCertificateRequired = default(bool?), bool? isTls10Enabled = default(bool?), bool? isTls11Enabled = default(bool?), bool? isHttp20Enabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType, string description, System.BinaryData value, System.BinaryData document) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGroupData ApiManagementGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, bool? isBuiltIn = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType? groupType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType?), string externalId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupUserData ApiManagementGroupUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -5940,13 +6499,17 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementLoggerData ApiManagementLoggerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.LoggerType? loggerType = default(Azure.ResourceManager.ApiManagement.Models.LoggerType?), string description = null, System.Collections.Generic.IDictionary credentials = null, bool? isBuffered = default(bool?), Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNamedValueCreateOrUpdateContent ApiManagementNamedValueCreateOrUpdateContent(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractCreateProperties keyVault = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable tags, bool? isSecret, string displayName, string value, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNotificationData ApiManagementNotificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RecipientsContractProperties recipients = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalDelegationSettingData ApiManagementPortalDelegationSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(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 statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, string statusDetails, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status, bool? isCurrent, System.DateTimeOffset? createdOn, System.DateTimeOffset? updatedOn) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(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 statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignInSettingData ApiManagementPortalSignInSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isRedirectEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignUpSettingData ApiManagementPortalSignUpSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isSignUpDeveloperPortalEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPrivateEndpointConnectionData ApiManagementPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateEndpointConnectionProvisioningState?)) { throw null; } @@ -5976,13 +6539,16 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictions ApiManagementSkuRestrictions(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsType? restrictionsType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsType?), System.Collections.Generic.IEnumerable values = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionInfo restrictionInfo = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsReasonCode? reasonCode = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsReasonCode?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuZoneDetails ApiManagementSkuZoneDetails(System.Collections.Generic.IEnumerable name = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingData ApiManagementTenantSettingData(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 settings = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData ApiManagementWorkspaceLinksData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier workspaceId = null, System.Collections.Generic.IEnumerable gateways = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationData ApiOperationData(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 templateParameters = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RequestContract request = null, System.Collections.Generic.IEnumerable responses = null, string policies = null, string displayName = null, string method = null, string uriTemplate = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiPatch ApiPatch(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiPatch ApiPatch(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiReleaseData ApiReleaseData(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 apiId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string notes = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiRevisionContract ApiRevisionContract(string apiId = null, string apiRevision = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string description = null, string privateUriString = null, bool? isOnline = default(bool?), bool? isCurrent = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string contentType = null, string value = null, System.BinaryData definitions = null, System.BinaryData components = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string contentType, string value, System.BinaryData definitions, System.BinaryData components) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string contentType = null, string provisioningState = null, string value = null, System.BinaryData definitions = null, System.BinaryData components = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiTagDescriptionData ApiTagDescriptionData(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, System.Uri externalDocsUri = null, string externalDocsDescription = null, string tagId = null, string displayName = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiVersionSetData ApiVersionSetData(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 versionQueryName = null, string versionHeaderName = null, string displayName = null, Azure.ResourceManager.ApiManagement.Models.VersioningScheme? versioningScheme = default(Azure.ResourceManager.ApiManagement.Models.VersioningScheme?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedApiProperties AssociatedApiProperties(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, string id = null, string name = null, System.Uri serviceUri = null, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } @@ -5992,7 +6558,9 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AssociatedProductProperties AssociatedProductProperties(string description = null, string terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedTagProperties AssociatedTagProperties(string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociationContract AssociationContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(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 appIds = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Guid? tenantId, string objectId) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationContractData AuthorizationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? authorizationType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType?), Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? oAuth2GrantType = default(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType?), System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError error = null, string status = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData AuthorizationProviderContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string identityProvider = null, Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings oauth2 = null) { throw null; } @@ -6007,15 +6575,20 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ConnectivityIssue ConnectivityIssue(Azure.ResourceManager.ApiManagement.Models.IssueOrigin? origin = default(Azure.ResourceManager.ApiManagement.Models.IssueOrigin?), Azure.ResourceManager.ApiManagement.Models.IssueSeverity? severity = default(Azure.ResourceManager.ApiManagement.Models.IssueSeverity?), Azure.ResourceManager.ApiManagement.Models.IssueType? issueType = default(Azure.ResourceManager.ApiManagement.Models.IssueType?), System.Collections.Generic.IEnumerable> context = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusContract ConnectivityStatusContract(string name = null, Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType status = default(Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType), string error = null, System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), System.DateTimeOffset lastStatusChangedOn = default(System.DateTimeOffset), string resourceType = null, bool isOptional = false) { throw null; } public static Azure.ResourceManager.ApiManagement.DiagnosticContractData DiagnosticContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract DiagnosticUpdateContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.DocumentationContractData DocumentationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDependency EndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDetail EndpointDetail(int? port = default(int?), string region = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayDebugCredentialsContract GatewayDebugCredentialsContract(string token = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayKeysContract GatewayKeysContract(string primary = null, string secondary = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayListDebugCredentialsContract GatewayListDebugCredentialsContract(System.TimeSpan? credentialsExpireAfter = default(System.TimeSpan?), System.Collections.Generic.IEnumerable purposes = null, Azure.Core.ResourceIdentifier apiId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult GatewayResourceSkuResult(string resourceType = null, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? skuName = default(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType?), Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity GatewaySkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayTokenContract GatewayTokenContract(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GenerateSsoUriResult GenerateSsoUriResult(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GitOperationResultContractData GitOperationResultContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string operationResultIdentifier = null, Azure.ResourceManager.ApiManagement.Models.AsyncOperationStatus? status = default(Azure.ResourceManager.ApiManagement.Models.AsyncOperationStatus?), System.DateTimeOffset? startedOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string resultInfo = null, Azure.ResourceManager.ApiManagement.Models.ErrorResponseBody error = null, System.Collections.Generic.IEnumerable actionLog = null) { throw null; } @@ -6028,11 +6601,16 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyContractData PolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PolicyDescriptionContractData PolicyDescriptionContractData(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, long? scope = default(long?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string value, string description, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData PolicyRestrictionContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string scope = null, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? requireBase = default(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase?)) { throw null; } public static Azure.ResourceManager.ApiManagement.PortalConfigContractData PortalConfigContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? enableBasicAuth = default(bool?), bool? require = default(bool?), Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties signupTermsOfService = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties delegation = null, System.Collections.Generic.IEnumerable corsAllowedOrigins = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties csp = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsContractData PortalSettingsContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?), bool? isRedirectEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingValidationKeyContract PortalSettingValidationKeyContract(string validationKey = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ProductApiLinkContractData ProductApiLinkContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string apiId = null) { throw null; } @@ -6292,6 +6870,19 @@ 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 BackendPoolItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BackendPoolItem(Azure.Core.ResourceIdentifier id) { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + public int? Weight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.BackendPoolItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.BackendPoolItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BackendProtocol : System.IEquatable { @@ -6363,6 +6954,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 BackendType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BackendType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.BackendType Pool { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.BackendType Single { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.BackendType 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.ApiManagement.Models.BackendType left, Azure.ResourceManager.ApiManagement.Models.BackendType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.BackendType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.BackendType left, Azure.ResourceManager.ApiManagement.Models.BackendType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BearerTokenSendingMethod : System.IEquatable { private readonly object _dummy; @@ -6482,6 +7091,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class CircuitBreakerRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CircuitBreakerRule() { } + public bool? AcceptRetryAfter { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.CircuitBreakerFailureCondition FailureCondition { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.TimeSpan? TripDuration { get { throw null; } set { } } @@ -6761,6 +7371,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ContentFormat(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat GraphQLLink { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ContentFormat Grpc { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ContentFormat GrpcLink { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat Odata { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat OdataLink { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat OpenApi { get { throw null; } } @@ -6843,6 +7455,26 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.DeveloperPortalStatus left, Azure.ResourceManager.ApiManagement.Models.DeveloperPortalStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class DiagnosticUpdateContract : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiagnosticUpdateContract() { } + public Azure.ResourceManager.ApiManagement.Models.AlwaysLog? AlwaysLog { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings Backend { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings Frontend { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? HttpCorrelationProtocol { get { throw null; } set { } } + public bool? IsLogClientIPEnabled { get { throw null; } set { } } + public string LoggerId { get { throw null; } set { } } + public bool? Metrics { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? OperationNameFormat { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.SamplingSettings Sampling { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? Verbosity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DocumentationContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DocumentationContractPatch() { } @@ -6950,6 +7582,7 @@ public GatewayApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -7045,6 +7678,52 @@ public enum GatewayRegenerateKeyType Primary = 0, Secondary = 1, } + public partial class GatewayResourceSkuResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GatewayResourceSkuResult() { } + public Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity Capacity { get { throw null; } } + public string ResourceType { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GatewaySkuCapacity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GatewaySkuCapacity() { } + public int? Default { get { throw null; } } + public int? Maximum { get { throw null; } } + public int? Minimum { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 GatewaySkuCapacityScaleType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GatewaySkuCapacityScaleType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType Automatic { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType Manual { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType 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.ApiManagement.Models.GatewaySkuCapacityScaleType left, Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType left, Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType right) { throw null; } + public override string ToString() { throw null; } + } public partial class GatewayTokenContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal GatewayTokenContract() { } @@ -7689,6 +8368,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyComplianceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyComplianceState(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState Compliant { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState NonCompliant { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState Pending { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState 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.ApiManagement.Models.PolicyComplianceState left, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState left, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PolicyContentFormat : System.IEquatable { private readonly object _dummy; @@ -7773,6 +8471,36 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyName left, Azure.ResourceManager.ApiManagement.Models.PolicyName right) { throw null; } public override string ToString() { throw null; } } + public partial class PolicyRestrictionContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyRestrictionContractPatch() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? RequireBase { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PolicyRestrictionRequireBase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyRestrictionRequireBase(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase False { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase 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.ApiManagement.Models.PolicyRestrictionRequireBase left, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase left, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase right) { throw null; } + public override string ToString() { throw null; } + } public enum PolicyScopeContract { Tenant = 0, @@ -7923,6 +8651,7 @@ public ProductApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -8287,6 +9016,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public SoapApiType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType GraphQL { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.SoapApiType Grpc { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType OData { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType SoapPassThrough { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType SoapToRest { get { throw null; } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs index 5c57a61090ba..6d5904a64f02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/api/Azure.ResourceManager.ApiManagement.netstandard2.0.cs @@ -37,6 +37,7 @@ public ApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -90,6 +91,123 @@ protected ApiDiagnosticResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ApiGatewayCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiGatewayCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.ApiManagement.ApiGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string gatewayName, Azure.ResourceManager.ApiManagement.ApiGatewayData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string gatewayName, 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 gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string gatewayName, 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 ApiGatewayConfigConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiGatewayConfigConnectionCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string configConnectionName, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string configConnectionName, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string configConnectionName, 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 configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string configConnectionName, 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 ApiGatewayConfigConnectionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayConfigConnectionData() { } + public string DefaultHostname { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public System.Collections.Generic.IList Hostnames { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier SourceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiGatewayConfigConnectionResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiGatewayConfigConnectionResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ApiGatewayData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayData(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties sku) { } + public string ConfigurationApiHostname { get { throw null; } } + public System.DateTimeOffset? CreatedAtUtc { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public string FrontendDefaultHostname { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties Sku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public string TargetProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiGatewayResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiGatewayResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayData 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 gatewayName) { 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.Response GetApiGatewayConfigConnection(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiGatewayConfigConnectionAsync(string configConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionCollection GetApiGatewayConfigConnections() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAvailableSkusApiManagementGatewaySkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAvailableSkusApiManagementGatewaySkusAsync(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.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiGatewayData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.Models.ApiGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ApiIssueAttachmentCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ApiIssueAttachmentCollection() { } @@ -328,11 +446,13 @@ public ApiManagementBackendData() { } public System.Collections.Generic.IList CircuitBreakerRules { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract Credentials { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList PoolServices { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendProxyContract Proxy { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } public string Title { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties Tls { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.BackendType? TypePropertiesType { get { throw null; } set { } } public System.Uri Uri { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -608,6 +728,13 @@ public static partial class ApiManagementExtensions public static Azure.Response CheckApiManagementServiceNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckApiManagementServiceNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiDiagnosticResource GetApiDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetApiGateway(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetApiGatewayAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayResource GetApiGatewayResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayCollection GetApiGateways(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetApiGateways(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetApiGatewaysAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentResource GetApiIssueAttachmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentResource GetApiIssueCommentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueResource GetApiIssueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -659,6 +786,7 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingResource GetApiManagementTenantSettingResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementUserResource GetApiManagementUserResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementUserSubscriptionResource GetApiManagementUserSubscriptionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationPolicyResource GetApiOperationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationResource GetApiOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationTagResource GetApiOperationTagResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -673,7 +801,10 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.AuthorizationContractResource GetAuthorizationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetOperationsResult(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task GetOperationsResultAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyRestrictionContractResource GetPolicyRestrictionContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -684,6 +815,7 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ServiceTagApiLinkResource GetServiceTagApiLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceTagOperationLinkResource GetServiceTagOperationLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceTagProductLinkResource GetServiceTagProductLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationPolicyResource GetServiceWorkspaceApiOperationPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationResource GetServiceWorkspaceApiOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiPolicyResource GetServiceWorkspaceApiPolicyResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -691,7 +823,11 @@ public static partial class ApiManagementExtensions public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiResource GetServiceWorkspaceApiResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiSchemaResource GetServiceWorkspaceApiSchemaResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetResource GetServiceWorkspaceApiVersionSetResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupResource GetServiceWorkspaceGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueResource GetServiceWorkspaceNamedValueResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspaceNotificationResource GetServiceWorkspaceNotificationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.ApiManagement.ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyFragmentResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -910,6 +1046,7 @@ public partial class ApiManagementGlobalSchemaData : Azure.ResourceManager.Model public ApiManagementGlobalSchemaData() { } public string Description { get { throw null; } set { } } public System.BinaryData Document { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? SchemaType { get { throw null; } set { } } public System.BinaryData Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1168,6 +1305,7 @@ public ApiManagementNamedValueData() { } public string DisplayName { get { throw null; } set { } } public bool? IsSecret { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties KeyVaultDetails { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public System.Collections.Generic.IList Tags { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1420,6 +1558,7 @@ public ApiManagementPortalRevisionData() { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } public bool? IsCurrent { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? Status { get { throw null; } } public string StatusDetails { get { throw null; } } public System.DateTimeOffset? UpdatedOn { get { throw null; } } @@ -1844,6 +1983,8 @@ protected ApiManagementServiceResource() { } public virtual System.Threading.Tasks.Task> ApplyNetworkConfigurationUpdatesAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceApplyNetworkConfigurationContent content = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation Backup(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> BackupAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceBackupRestoreContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation ByServicePolicyRestrictionValidation(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ByServicePolicyRestrictionValidationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateContentItem(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateContentItemAsync(string contentTypeId, string contentItemId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateContentType(string contentTypeId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1858,6 +1999,9 @@ protected ApiManagementServiceResource() { } public virtual Azure.ResourceManager.ArmOperation DeployTenantConfiguration(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, Azure.ResourceManager.ApiManagement.Models.ConfigurationDeployContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> DeployTenantConfigurationAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ConfigurationName configurationName, Azure.ResourceManager.ApiManagement.Models.ConfigurationDeployContent 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 Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksCollection GetAllApiManagementWorkspaceLinks() { throw null; } + public virtual Azure.Pageable GetAllPoliciesByService(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllPoliciesByServiceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApi(string apiId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiAsync(string apiId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApiManagementAuthorizationServer(string authsid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1935,6 +2079,8 @@ protected ApiManagementServiceResource() { } public virtual Azure.Response GetApiManagementUser(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementUserAsync(string userId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserCollection GetApiManagementUsers() { throw null; } + public virtual Azure.Response GetApiManagementWorkspaceLinks(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiManagementWorkspaceLinksAsync(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiCollection GetApis() { throw null; } public virtual Azure.Pageable GetApisByTags(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedApis = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApisByTagsAsync(string filter = null, int? top = default(int?), int? skip = default(int?), bool? includeNotTaggedApis = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -1971,6 +2117,9 @@ protected ApiManagementServiceResource() { } public virtual Azure.Response GetPolicyFragmentContract(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPolicyFragmentContractAsync(string id, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractCollection GetPolicyFragmentContracts() { throw null; } + public virtual Azure.Response GetPolicyRestrictionContract(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPolicyRestrictionContractAsync(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractCollection GetPolicyRestrictionContracts() { throw null; } public virtual Azure.Response GetPortalConfigContract(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetPortalConfigContractAsync(string portalConfigId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractCollection GetPortalConfigContracts() { throw null; } @@ -2255,6 +2404,49 @@ protected ApiManagementUserSubscriptionResource() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ApiManagementWorkspaceLinksCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ApiManagementWorkspaceLinksCollection() { } + public virtual Azure.Response Exists(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string workspaceId, 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 workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string workspaceId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string workspaceId, 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 ApiManagementWorkspaceLinksData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementWorkspaceLinksData() { } + public Azure.ETag? ETag { get { throw null; } } + public System.Collections.Generic.IList Gateways { get { throw null; } } + public Azure.Core.ResourceIdentifier WorkspaceId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementWorkspaceLinksResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ApiManagementWorkspaceLinksResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId) { 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.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ApiOperationCollection() { } @@ -2561,6 +2753,7 @@ public ApiSchemaData() { } public System.BinaryData Components { get { throw null; } set { } } public string ContentType { get { throw null; } set { } } public System.BinaryData Definitions { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.ApiSchemaData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2754,6 +2947,7 @@ protected AuthorizationAccessPolicyContractCollection() { } public partial class AuthorizationAccessPolicyContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AuthorizationAccessPolicyContractData() { } + public System.Collections.Generic.IList AppIds { get { throw null; } } public string ObjectId { get { throw null; } set { } } public System.Guid? TenantId { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3018,6 +3212,7 @@ public partial class PolicyFragmentContractData : Azure.ResourceManager.Models.R public PolicyFragmentContractData() { } public string Description { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? Format { get { throw null; } set { } } + public string ProvisioningState { get { throw null; } } public string Value { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ApiManagement.PolicyFragmentContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3049,6 +3244,56 @@ protected PolicyFragmentContractResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.PolicyFragmentContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class PolicyRestrictionContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PolicyRestrictionContractCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string policyRestrictionId, Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string policyRestrictionId, Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string policyRestrictionId, 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 policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string policyRestrictionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string policyRestrictionId, 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 PolicyRestrictionContractData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyRestrictionContractData() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? RequireBase { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PolicyRestrictionContractResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PolicyRestrictionContractResource() { } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag? ifMatch = default(Azure.ETag?), 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class PortalConfigContractCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected PortalConfigContractCollection() { } @@ -3458,6 +3703,44 @@ protected ServiceWorkspaceApiCollection() { } System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } + public partial class ServiceWorkspaceApiDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceApiDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticId, 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 diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticId, 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 ServiceWorkspaceApiDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceApiDiagnosticResource() { } + public virtual Azure.ResourceManager.ApiManagement.DiagnosticContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceApiOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceApiOperationCollection() { } @@ -3626,6 +3909,9 @@ protected ServiceWorkspaceApiResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetServiceWorkspaceApiDiagnostic(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiDiagnosticAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticCollection GetServiceWorkspaceApiDiagnostics() { throw null; } public virtual Azure.Response GetServiceWorkspaceApiOperation(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiOperationAsync(string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationCollection GetServiceWorkspaceApiOperations() { throw null; } @@ -3724,6 +4010,122 @@ protected ServiceWorkspaceApiVersionSetResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ServiceWorkspaceBackendCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceBackendCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string backendId, Azure.ResourceManager.ApiManagement.ApiManagementBackendData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string backendId, Azure.ResourceManager.ApiManagement.ApiManagementBackendData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string backendId, 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 backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string backendId, 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 ServiceWorkspaceBackendResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceBackendResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementBackendData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementBackendData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementBackendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementBackendPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceWorkspaceCertificateCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceCertificateCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string certificateId, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string certificateId, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string certificateId, 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?), bool? isKeyVaultRefreshFailed = default(bool?), 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?), bool? isKeyVaultRefreshFailed = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string certificateId, 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 ServiceWorkspaceCertificateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceCertificateResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementCertificateData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RefreshSecret(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RefreshSecretAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementCertificateData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementCertificateData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.ApiManagement.Models.ApiManagementCertificateCreateOrUpdateContent content, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class ServiceWorkspaceDiagnosticCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceDiagnosticCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string diagnosticId, Azure.ResourceManager.ApiManagement.DiagnosticContractData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string diagnosticId, 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 diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string diagnosticId, 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 ServiceWorkspaceDiagnosticResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceDiagnosticResource() { } + public virtual Azure.ResourceManager.ApiManagement.DiagnosticContractData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.DiagnosticContractData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract diagnosticUpdateContract, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceGroupCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceGroupCollection() { } @@ -3770,6 +4172,44 @@ protected ServiceWorkspaceGroupResource() { } public virtual Azure.Response Update(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class ServiceWorkspaceLoggerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected ServiceWorkspaceLoggerCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string loggerId, Azure.ResourceManager.ApiManagement.ApiManagementLoggerData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string loggerId, Azure.ResourceManager.ApiManagement.ApiManagementLoggerData data, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string loggerId, 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 loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string loggerId, 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 ServiceWorkspaceLoggerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected ServiceWorkspaceLoggerResource() { } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementLoggerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, Azure.ETag ifMatch, 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 GetEntityTag(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetEntityTagAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.ApiManagement.ApiManagementLoggerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.ApiManagementLoggerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementLoggerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ETag ifMatch, Azure.ResourceManager.ApiManagement.Models.ApiManagementLoggerPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } public partial class ServiceWorkspaceNamedValueCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected ServiceWorkspaceNamedValueCollection() { } @@ -4537,9 +4977,21 @@ protected WorkspaceContractResource() { } public virtual Azure.Response GetServiceWorkspaceApiVersionSet(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceApiVersionSetAsync(string versionSetId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetCollection GetServiceWorkspaceApiVersionSets() { throw null; } + public virtual Azure.Response GetServiceWorkspaceBackend(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceBackendAsync(string backendId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendCollection GetServiceWorkspaceBackends() { throw null; } + public virtual Azure.Response GetServiceWorkspaceCertificate(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceCertificateAsync(string certificateId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateCollection GetServiceWorkspaceCertificates() { throw null; } + public virtual Azure.Response GetServiceWorkspaceDiagnostic(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceDiagnosticAsync(string diagnosticId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticCollection GetServiceWorkspaceDiagnostics() { throw null; } public virtual Azure.Response GetServiceWorkspaceGroup(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceGroupAsync(string groupId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupCollection GetServiceWorkspaceGroups() { throw null; } + public virtual Azure.Response GetServiceWorkspaceLogger(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetServiceWorkspaceLoggerAsync(string loggerId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerCollection GetServiceWorkspaceLoggers() { throw null; } public virtual Azure.Response GetServiceWorkspaceNamedValue(string namedValueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceWorkspaceNamedValueAsync(string namedValueId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueCollection GetServiceWorkspaceNamedValues() { throw null; } @@ -4579,6 +5031,8 @@ public partial class MockableApiManagementArmClient : Azure.ResourceManager.ArmR { protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiDiagnosticResource GetApiDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayResource GetApiGatewayResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueAttachmentResource GetApiIssueAttachmentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueCommentResource GetApiIssueCommentResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiIssueResource GetApiIssueResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4616,6 +5070,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingResource GetApiManagementTenantSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserResource GetApiManagementUserResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementUserSubscriptionResource GetApiManagementUserSubscriptionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationPolicyResource GetApiOperationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationResource GetApiOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiOperationTagResource GetApiOperationTagResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4631,6 +5086,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.AuthorizationProviderContractResource GetAuthorizationProviderContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.DocumentationContractResource GetDocumentationContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PolicyFragmentContractResource GetPolicyFragmentContractResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.PolicyRestrictionContractResource GetPolicyRestrictionContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.PortalConfigContractResource GetPortalConfigContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ResolverContractResource GetResolverContractResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceApiResolverPolicyResource GetServiceApiResolverPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4641,6 +5097,7 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ServiceTagApiLinkResource GetServiceTagApiLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceTagOperationLinkResource GetServiceTagOperationLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceTagProductLinkResource GetServiceTagProductLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationPolicyResource GetServiceWorkspaceApiOperationPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiOperationResource GetServiceWorkspaceApiOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiPolicyResource GetServiceWorkspaceApiPolicyResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4648,7 +5105,11 @@ protected MockableApiManagementArmClient() { } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiResource GetServiceWorkspaceApiResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiSchemaResource GetServiceWorkspaceApiSchemaResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceApiVersionSetResource GetServiceWorkspaceApiVersionSetResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceGroupResource GetServiceWorkspaceGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNamedValueResource GetServiceWorkspaceNamedValueResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspaceNotificationResource GetServiceWorkspaceNotificationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyFragmentResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -4669,6 +5130,9 @@ protected MockableApiManagementArmClient() { } public partial class MockableApiManagementResourceGroupResource : Azure.ResourceManager.ArmResource { protected MockableApiManagementResourceGroupResource() { } + public virtual Azure.Response GetApiGateway(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetApiGatewayAsync(string gatewayName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ApiManagement.ApiGatewayCollection GetApiGateways() { throw null; } public virtual Azure.Response GetApiManagementService(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementServiceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementServiceCollection GetApiManagementServices() { throw null; } @@ -4678,6 +5142,8 @@ public partial class MockableApiManagementSubscriptionResource : Azure.ResourceM protected MockableApiManagementSubscriptionResource() { } public virtual Azure.Response CheckApiManagementServiceNameAvailability(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckApiManagementServiceNameAvailabilityAsync(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetApiGateways(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetApiGatewaysAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetApiManagementDeletedService(Azure.Core.AzureLocation location, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApiManagementDeletedServiceAsync(Azure.Core.AzureLocation location, string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApiManagement.ApiManagementDeletedServiceCollection GetApiManagementDeletedServices() { throw null; } @@ -4689,6 +5155,8 @@ protected MockableApiManagementSubscriptionResource() { } public virtual Azure.AsyncPageable GetApiManagementServicesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetApiManagementSkus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApiManagementSkusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetOperationsResult(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetOperationsResultAsync(Azure.Core.AzureLocation location, string operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.ApiManagement.Models @@ -4733,6 +5201,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 AllPoliciesContract : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AllPoliciesContract() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState? ComplianceState { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ReferencePolicyId { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AlwaysLog : System.IEquatable { @@ -4784,6 +5264,7 @@ public ApiCreateOrUpdateContent() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -4842,6 +5323,45 @@ 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 ApiGatewayPatch : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiGatewayPatch() { } + public string ConfigurationApiHostname { get { throw null; } } + public System.DateTimeOffset? CreatedAtUtc { get { throw null; } } + public Azure.ETag? ETag { get { throw null; } } + public string FrontendDefaultHostname { get { throw null; } } + public string ProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch Sku { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + public string TargetProvisioningState { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? VirtualNetworkType { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 ApiGatewaySkuType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ApiGatewaySkuType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType Standard { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType WorkspaceGatewayPremium { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType WorkspaceGatewayStandard { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType 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.ApiManagement.Models.ApiGatewaySkuType left, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType left, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType right) { throw null; } + public override string ToString() { throw null; } + } public partial class ApiIssuePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiIssuePatch() { } @@ -4931,9 +5451,11 @@ public partial class ApiManagementBackendPatch : System.ClientModel.Primitives.I { public ApiManagementBackendPatch() { } public Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties BackendServiceFabricCluster { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.BackendType? BackendType { get { throw null; } set { } } public System.Collections.Generic.IList CircuitBreakerRules { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract Credentials { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IList PoolServices { get { throw null; } } public Azure.ResourceManager.ApiManagement.Models.BackendProtocol? Protocol { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.BackendProxyContract Proxy { get { throw null; } set { } } public System.Uri ResourceUri { get { throw null; } set { } } @@ -5019,6 +5541,30 @@ 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 ApiManagementGatewaySkuProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementGatewaySkuProperties(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType name) { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewaySkuPropertiesForPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ApiManagementGatewaySkuPropertiesForPatch() { } + public int? Capacity { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGroupCreateOrUpdateContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ApiManagementGroupCreateOrUpdateContent() { } @@ -5457,11 +6003,13 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ApiManagementServiceSkuType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Basic { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType BasicV2 { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Consumption { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Developer { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Isolated { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Premium { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType Standard { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType StandardV2 { get { throw null; } } public bool Equals(Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -5834,6 +6382,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ApiType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiType GraphQL { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ApiType Grpc { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Http { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Odata { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ApiType Soap { get { throw null; } } @@ -5902,15 +6451,23 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku = null, System.Collections.Generic.IEnumerable zones = null, System.Collections.Generic.IEnumerable publicIPAddresses = null, System.Collections.Generic.IEnumerable privateIPAddresses = null, Azure.Core.ResourceIdentifier publicIPAddressId = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration = null, System.Uri gatewayRegionalUri = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState? natGatewayState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementNatGatewayState?), System.Collections.Generic.IEnumerable outboundPublicIPAddresses = null, bool? disableGateway = default(bool?), Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion = default(Azure.ResourceManager.ApiManagement.Models.PlatformVersion?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.AdditionalLocation AdditionalLocation(Azure.Core.AzureLocation location, Azure.ResourceManager.ApiManagement.Models.ApiManagementServiceSkuProperties sku, System.Collections.Generic.IEnumerable zones, System.Collections.Generic.IEnumerable publicIPAddresses, System.Collections.Generic.IEnumerable privateIPAddresses, Azure.Core.ResourceIdentifier publicIPAddressId, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkConfiguration virtualNetworkConfiguration, System.Uri gatewayRegionalUri, bool? disableGateway, Azure.ResourceManager.ApiManagement.Models.PlatformVersion? platformVersion) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.AllPoliciesContract AllPoliciesContract(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 referencePolicyId = null, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState? complianceState = default(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet, string value, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format, Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType, Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?), Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = default(Azure.ResourceManager.ApiManagement.Models.TranslateRequiredQueryParametersConduct?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string value = null, Azure.ResourceManager.ApiManagement.Models.ContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.ContentFormat?), Azure.ResourceManager.ApiManagement.Models.ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, Azure.ResourceManager.ApiManagement.Models.SoapApiType? soapApiType = default(Azure.ResourceManager.ApiManagement.Models.SoapApiType?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiData ApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiData ApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiData ApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiData ApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiEntityBaseContract ApiEntityBaseContract(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayConfigConnectionData ApiGatewayConfigConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.ResourceIdentifier sourceId = null, string defaultHostname = null, System.Collections.Generic.IEnumerable hostnames = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiGatewayData ApiGatewayData(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.ApiManagement.Models.ApiManagementGatewaySkuProperties sku = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), string frontendDefaultHostname = null, Azure.Core.ResourceIdentifier subnetId = null, string configurationApiHostname = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ApiGatewayPatch ApiGatewayPatch(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementGatewaySkuPropertiesForPatch sku = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, string targetProvisioningState = null, System.DateTimeOffset? createdAtUtc = default(System.DateTimeOffset?), string frontendDefaultHostname = null, Azure.Core.ResourceIdentifier subnetId = null, string configurationApiHostname = null, Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType? virtualNetworkType = default(Azure.ResourceManager.ApiManagement.Models.VirtualNetworkType?), System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueAttachmentData ApiIssueAttachmentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string contentFormat = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiIssueCommentData ApiIssueCommentData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string text = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.Core.ResourceIdentifier userId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementAuthorizationServerData ApiManagementAuthorizationServerData(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } @@ -5919,7 +6476,7 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(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, System.Collections.Generic.IEnumerable authorizationMethods = null, System.Collections.Generic.IEnumerable clientAuthenticationMethods = null, System.Collections.Generic.IEnumerable tokenBodyParameters = null, string tokenEndpoint = null, bool? doesSupportState = default(bool?), string defaultScope = null, System.Collections.Generic.IEnumerable bearerTokenSendingMethods = null, string resourceOwnerUsername = null, string resourceOwnerPassword = null, string displayName = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?), string clientRegistrationEndpoint = null, string authorizationEndpoint = null, System.Collections.Generic.IEnumerable grantTypes = null, string clientId = null, string clientSecret = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationServerPatch ApiManagementAuthorizationServerPatch(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, System.Collections.Generic.IEnumerable authorizationMethods, System.Collections.Generic.IEnumerable clientAuthenticationMethods, System.Collections.Generic.IEnumerable tokenBodyParameters, string tokenEndpoint, bool? doesSupportState, string defaultScope, System.Collections.Generic.IEnumerable bearerTokenSendingMethods, string resourceOwnerUsername, string resourceOwnerPassword, string displayName, string clientRegistrationEndpoint, string authorizationEndpoint, System.Collections.Generic.IEnumerable grantTypes, string clientId, string clientSecret) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Collections.Generic.IEnumerable circuitBreakerRules = null, System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, System.Uri resourceUri = null, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster = null, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials = null, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy = null, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls = null, System.Collections.Generic.IEnumerable circuitBreakerRules = null, System.Collections.Generic.IEnumerable poolServices = null, Azure.ResourceManager.ApiManagement.Models.BackendType? typePropertiesType = default(Azure.ResourceManager.ApiManagement.Models.BackendType?), System.Uri uri = null, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol = default(Azure.ResourceManager.ApiManagement.Models.BackendProtocol?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiManagementBackendData ApiManagementBackendData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string title, string description, System.Uri resourceUri, Azure.ResourceManager.ApiManagement.Models.BackendServiceFabricClusterProperties backendServiceFabricCluster, Azure.ResourceManager.ApiManagement.Models.BackendCredentialsContract credentials, Azure.ResourceManager.ApiManagement.Models.BackendProxyContract proxy, Azure.ResourceManager.ApiManagement.Models.BackendTlsProperties tls, System.Uri uri, Azure.ResourceManager.ApiManagement.Models.BackendProtocol? protocol) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementCacheData ApiManagementCacheData(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 connectionString = null, string useFromLocation = null, System.Uri resourceUri = null) { throw null; } @@ -5929,7 +6486,9 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayCertificateAuthorityData ApiManagementGatewayCertificateAuthorityData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isTrusted = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayData ApiManagementGatewayData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ResourceLocationDataContract locationData = null, string description = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGatewayHostnameConfigurationData ApiManagementGatewayHostnameConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostname = null, string certificateId = null, bool? isClientCertificateRequired = default(bool?), bool? isTls10Enabled = default(bool?), bool? isTls11Enabled = default(bool?), bool? isHttp20Enabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType, string description, System.BinaryData value, System.BinaryData document) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiSchemaType? schemaType = default(Azure.ResourceManager.ApiManagement.Models.ApiSchemaType?), string description = null, System.BinaryData value = null, System.BinaryData document = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementGroupData ApiManagementGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, bool? isBuiltIn = default(bool?), Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType? groupType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupType?), string externalId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementGroupUserData ApiManagementGroupUserData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementUserState?), string note = null, System.Collections.Generic.IEnumerable identities = null, string firstName = null, string lastName = null, string email = null, System.DateTimeOffset? registriesOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable groups = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -5940,13 +6499,17 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.ApiManagementIdentityProviderData ApiManagementIdentityProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.IdentityProviderType? identityProviderType = default(Azure.ResourceManager.ApiManagement.Models.IdentityProviderType?), string signInTenant = null, System.Collections.Generic.IEnumerable allowedTenants = null, string authority = null, string signUpPolicyName = null, string signInPolicyName = null, string profileEditingPolicyName = null, string passwordResetPolicyName = null, string clientLibrary = null, string clientId = null, string clientSecret = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementLoggerData ApiManagementLoggerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.LoggerType? loggerType = default(Azure.ResourceManager.ApiManagement.Models.LoggerType?), string description = null, System.Collections.Generic.IDictionary credentials = null, bool? isBuffered = default(bool?), Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementNamedValueCreateOrUpdateContent ApiManagementNamedValueCreateOrUpdateContent(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractCreateProperties keyVault = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IEnumerable tags, bool? isSecret, string displayName, string value, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementNamedValueData ApiManagementNamedValueData(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 tags = null, bool? isSecret = default(bool?), string displayName = null, string value = null, Azure.ResourceManager.ApiManagement.Models.KeyVaultContractProperties keyVaultDetails = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementNotificationData ApiManagementNotificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RecipientsContractProperties recipients = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, string description, string metadataEndpoint, string clientId, string clientSecret) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementOpenIdConnectProviderData ApiManagementOpenIdConnectProviderData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string description = null, string metadataEndpoint = null, string clientId = null, string clientSecret = null, bool? useInTestConsole = default(bool?), bool? useInApiDocumentation = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalDelegationSettingData ApiManagementPortalDelegationSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(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 statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, string statusDetails, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status, bool? isCurrent, System.DateTimeOffset? createdOn, System.DateTimeOffset? updatedOn) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementPortalRevisionData ApiManagementPortalRevisionData(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 statusDetails = null, Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus? status = default(Azure.ResourceManager.ApiManagement.Models.PortalRevisionStatus?), bool? isCurrent = default(bool?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string provisioningState = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignInSettingData ApiManagementPortalSignInSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isRedirectEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPortalSignUpSettingData ApiManagementPortalSignUpSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isSignUpDeveloperPortalEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementPrivateEndpointConnectionData ApiManagementPrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementPrivateEndpointConnectionProvisioningState?)) { throw null; } @@ -5976,13 +6539,16 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictions ApiManagementSkuRestrictions(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsType? restrictionsType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsType?), System.Collections.Generic.IEnumerable values = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionInfo restrictionInfo = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsReasonCode? reasonCode = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuRestrictionsReasonCode?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiManagementSkuZoneDetails ApiManagementSkuZoneDetails(System.Collections.Generic.IEnumerable name = null, System.Collections.Generic.IEnumerable capabilities = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiManagementTenantSettingData ApiManagementTenantSettingData(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 settings = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiManagementWorkspaceLinksData ApiManagementWorkspaceLinksData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ETag? etag = default(Azure.ETag?), Azure.Core.ResourceIdentifier workspaceId = null, System.Collections.Generic.IEnumerable gateways = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiOperationData ApiOperationData(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 templateParameters = null, string description = null, Azure.ResourceManager.ApiManagement.Models.RequestContract request = null, System.Collections.Generic.IEnumerable responses = null, string policies = null, string displayName = null, string method = null, string uriTemplate = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiPatch ApiPatch(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ApiPatch ApiPatch(string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiReleaseData ApiReleaseData(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 apiId = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string notes = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ApiRevisionContract ApiRevisionContract(string apiId = null, string apiRevision = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string description = null, string privateUriString = null, bool? isOnline = default(bool?), bool? isCurrent = default(bool?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string contentType = null, string value = null, System.BinaryData definitions = null, System.BinaryData components = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string contentType, string value, System.BinaryData definitions, System.BinaryData components) { throw null; } + public static Azure.ResourceManager.ApiManagement.ApiSchemaData ApiSchemaData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string contentType = null, string provisioningState = null, string value = null, System.BinaryData definitions = null, System.BinaryData components = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiTagDescriptionData ApiTagDescriptionData(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, System.Uri externalDocsUri = null, string externalDocsDescription = null, string tagId = null, string displayName = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ApiVersionSetData ApiVersionSetData(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 versionQueryName = null, string versionHeaderName = null, string displayName = null, Azure.ResourceManager.ApiManagement.Models.VersioningScheme? versioningScheme = default(Azure.ResourceManager.ApiManagement.Models.VersioningScheme?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedApiProperties AssociatedApiProperties(string description = null, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, string id = null, string name = null, System.Uri serviceUri = null, string path = null, System.Collections.Generic.IEnumerable protocols = null) { throw null; } @@ -5992,7 +6558,9 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.AssociatedProductProperties AssociatedProductProperties(string description = null, string terms = null, bool? isSubscriptionRequired = default(bool?), bool? isApprovalRequired = default(bool?), int? subscriptionsLimit = default(int?), Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState? state = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementProductState?), string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociatedTagProperties AssociatedTagProperties(string id = null, string name = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AssociationContract AssociationContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState? provisioningState = default(Azure.ResourceManager.ApiManagement.Models.AssociationEntityProvisioningState?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(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 appIds = null, System.Guid? tenantId = default(System.Guid?), string objectId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Guid? tenantId, string objectId) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationContractData AuthorizationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType? authorizationType = default(Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationType?), Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType? oAuth2GrantType = default(Azure.ResourceManager.ApiManagement.Models.OAuth2GrantType?), System.Collections.Generic.IDictionary parameters = null, Azure.ResourceManager.ApiManagement.Models.ApiManagementAuthorizationError error = null, string status = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.AuthorizationLoginResult AuthorizationLoginResult(string loginLink = null) { throw null; } public static Azure.ResourceManager.ApiManagement.AuthorizationProviderContractData AuthorizationProviderContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string identityProvider = null, Azure.ResourceManager.ApiManagement.Models.AuthorizationProviderOAuth2Settings oauth2 = null) { throw null; } @@ -6007,15 +6575,20 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.ConnectivityIssue ConnectivityIssue(Azure.ResourceManager.ApiManagement.Models.IssueOrigin? origin = default(Azure.ResourceManager.ApiManagement.Models.IssueOrigin?), Azure.ResourceManager.ApiManagement.Models.IssueSeverity? severity = default(Azure.ResourceManager.ApiManagement.Models.IssueSeverity?), Azure.ResourceManager.ApiManagement.Models.IssueType? issueType = default(Azure.ResourceManager.ApiManagement.Models.IssueType?), System.Collections.Generic.IEnumerable> context = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusContract ConnectivityStatusContract(string name = null, Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType status = default(Azure.ResourceManager.ApiManagement.Models.ConnectivityStatusType), string error = null, System.DateTimeOffset lastUpdatedOn = default(System.DateTimeOffset), System.DateTimeOffset lastStatusChangedOn = default(System.DateTimeOffset), string resourceType = null, bool isOptional = false) { throw null; } public static Azure.ResourceManager.ApiManagement.DiagnosticContractData DiagnosticContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract DiagnosticUpdateContract(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ApiManagement.Models.AlwaysLog? alwaysLog = default(Azure.ResourceManager.ApiManagement.Models.AlwaysLog?), string loggerId = null, Azure.ResourceManager.ApiManagement.Models.SamplingSettings sampling = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings frontend = null, Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? httpCorrelationProtocol = default(Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol?), Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? verbosity = default(Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel?), Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? operationNameFormat = default(Azure.ResourceManager.ApiManagement.Models.OperationNameFormat?), bool? metrics = default(bool?)) { throw null; } public static Azure.ResourceManager.ApiManagement.DocumentationContractData DocumentationContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string title = null, string content = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDependency EndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.EndpointDetail EndpointDetail(int? port = default(int?), string region = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.GatewayApiData GatewayApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayDebugCredentialsContract GatewayDebugCredentialsContract(string token = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayKeysContract GatewayKeysContract(string primary = null, string secondary = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayListDebugCredentialsContract GatewayListDebugCredentialsContract(System.TimeSpan? credentialsExpireAfter = default(System.TimeSpan?), System.Collections.Generic.IEnumerable purposes = null, Azure.Core.ResourceIdentifier apiId = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult GatewayResourceSkuResult(string resourceType = null, Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? skuName = default(Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType?), Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity capacity = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity GatewaySkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? @default = default(int?), Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType? scaleType = default(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GatewayTokenContract GatewayTokenContract(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GenerateSsoUriResult GenerateSsoUriResult(string value = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.GitOperationResultContractData GitOperationResultContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string operationResultIdentifier = null, Azure.ResourceManager.ApiManagement.Models.AsyncOperationStatus? status = default(Azure.ResourceManager.ApiManagement.Models.AsyncOperationStatus?), System.DateTimeOffset? startedOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), string resultInfo = null, Azure.ResourceManager.ApiManagement.Models.ErrorResponseBody error = null, System.Collections.Generic.IEnumerable actionLog = null) { throw null; } @@ -6028,11 +6601,16 @@ public static partial class ArmApiManagementModelFactory public static Azure.ResourceManager.ApiManagement.Models.OutboundEnvironmentEndpoint OutboundEnvironmentEndpoint(string category = null, System.Collections.Generic.IEnumerable endpoints = null) { throw null; } public static Azure.ResourceManager.ApiManagement.PolicyContractData PolicyContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyContentFormat?)) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PolicyDescriptionContractData PolicyDescriptionContractData(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, long? scope = default(long?)) { throw null; } - public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string value, string description, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyFragmentContractData PolicyFragmentContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string value = null, string description = null, Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat? format = default(Azure.ResourceManager.ApiManagement.Models.PolicyFragmentContentFormat?), string provisioningState = null) { throw null; } + public static Azure.ResourceManager.ApiManagement.PolicyRestrictionContractData PolicyRestrictionContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string scope = null, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? requireBase = default(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase?)) { throw null; } public static Azure.ResourceManager.ApiManagement.PortalConfigContractData PortalConfigContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? enableBasicAuth = default(bool?), bool? require = default(bool?), Azure.ResourceManager.ApiManagement.Models.PortalConfigTermsOfServiceProperties signupTermsOfService = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigDelegationProperties delegation = null, System.Collections.Generic.IEnumerable corsAllowedOrigins = null, Azure.ResourceManager.ApiManagement.Models.PortalConfigCspProperties csp = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingsContractData PortalSettingsContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Uri uri = null, string validationKey = null, bool? isSubscriptionDelegationEnabled = default(bool?), bool? isUserRegistrationDelegationEnabled = default(bool?), bool? isRedirectEnabled = default(bool?), Azure.ResourceManager.ApiManagement.Models.TermsOfServiceProperties termsOfService = null) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.PortalSettingValidationKeyContract PortalSettingValidationKeyContract(string validationKey = null) { throw null; } - public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, System.Collections.Generic.IEnumerable protocols, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(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.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings = null, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType = default(Azure.ResourceManager.ApiManagement.Models.ApiType?), string apiRevision = null, string apiVersion = null, bool? isCurrent = default(bool?), bool? isOnline = default(bool?), string apiRevisionDescription = null, string apiVersionDescription = null, Azure.Core.ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = default(bool?), string termsOfServiceLink = null, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact = null, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license = null, Azure.Core.ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.ApiManagement.Models.ProductApiData ProductApiData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string description, Azure.ResourceManager.ApiManagement.Models.AuthenticationSettingsContract authenticationSettings, Azure.ResourceManager.ApiManagement.Models.SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, Azure.ResourceManager.ApiManagement.Models.ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, Azure.Core.ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, System.Uri termsOfServiceUri, Azure.ResourceManager.ApiManagement.Models.ApiContactInformation contact, Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation license, Azure.Core.ResourceIdentifier sourceApiId, string displayName, System.Uri serviceUri, string path = null, System.Collections.Generic.IEnumerable protocols = null, Azure.ResourceManager.ApiManagement.Models.ApiVersionSetContractDetails apiVersionSet = null) { throw null; } public static Azure.ResourceManager.ApiManagement.ProductApiLinkContractData ProductApiLinkContractData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string apiId = null) { throw null; } @@ -6292,6 +6870,19 @@ 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 BackendPoolItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BackendPoolItem(Azure.Core.ResourceIdentifier id) { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } set { } } + public int? Priority { get { throw null; } set { } } + public int? Weight { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.BackendPoolItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.BackendPoolItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 BackendProtocol : System.IEquatable { @@ -6363,6 +6954,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer 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 BackendType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BackendType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.BackendType Pool { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.BackendType Single { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.BackendType 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.ApiManagement.Models.BackendType left, Azure.ResourceManager.ApiManagement.Models.BackendType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.BackendType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.BackendType left, Azure.ResourceManager.ApiManagement.Models.BackendType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BearerTokenSendingMethod : System.IEquatable { private readonly object _dummy; @@ -6482,6 +7091,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class CircuitBreakerRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CircuitBreakerRule() { } + public bool? AcceptRetryAfter { get { throw null; } set { } } public Azure.ResourceManager.ApiManagement.Models.CircuitBreakerFailureCondition FailureCondition { get { throw null; } set { } } public string Name { get { throw null; } set { } } public System.TimeSpan? TripDuration { get { throw null; } set { } } @@ -6761,6 +7371,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public ContentFormat(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat GraphQLLink { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ContentFormat Grpc { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.ContentFormat GrpcLink { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat Odata { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat OdataLink { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.ContentFormat OpenApi { get { throw null; } } @@ -6843,6 +7455,26 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.DeveloperPortalStatus left, Azure.ResourceManager.ApiManagement.Models.DeveloperPortalStatus right) { throw null; } public override string ToString() { throw null; } } + public partial class DiagnosticUpdateContract : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DiagnosticUpdateContract() { } + public Azure.ResourceManager.ApiManagement.Models.AlwaysLog? AlwaysLog { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings Backend { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.PipelineDiagnosticSettings Frontend { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.HttpCorrelationProtocol? HttpCorrelationProtocol { get { throw null; } set { } } + public bool? IsLogClientIPEnabled { get { throw null; } set { } } + public string LoggerId { get { throw null; } set { } } + public bool? Metrics { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.OperationNameFormat? OperationNameFormat { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.SamplingSettings Sampling { get { throw null; } set { } } + public Azure.ResourceManager.ApiManagement.Models.TraceVerbosityLevel? Verbosity { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.DiagnosticUpdateContract System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DocumentationContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DocumentationContractPatch() { } @@ -6950,6 +7582,7 @@ public GatewayApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -7045,6 +7678,52 @@ public enum GatewayRegenerateKeyType Primary = 0, Secondary = 1, } + public partial class GatewayResourceSkuResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GatewayResourceSkuResult() { } + public Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity Capacity { get { throw null; } } + public string ResourceType { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.ApiGatewaySkuType? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewayResourceSkuResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class GatewaySkuCapacity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal GatewaySkuCapacity() { } + public int? Default { get { throw null; } } + public int? Maximum { get { throw null; } } + public int? Minimum { get { throw null; } } + public Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType? ScaleType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacity System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 GatewaySkuCapacityScaleType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public GatewaySkuCapacityScaleType(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType Automatic { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType Manual { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType None { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType 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.ApiManagement.Models.GatewaySkuCapacityScaleType left, Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType left, Azure.ResourceManager.ApiManagement.Models.GatewaySkuCapacityScaleType right) { throw null; } + public override string ToString() { throw null; } + } public partial class GatewayTokenContract : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal GatewayTokenContract() { } @@ -7689,6 +8368,25 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PolicyComplianceState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyComplianceState(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState Compliant { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState NonCompliant { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState Pending { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState 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.ApiManagement.Models.PolicyComplianceState left, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState left, Azure.ResourceManager.ApiManagement.Models.PolicyComplianceState right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PolicyContentFormat : System.IEquatable { private readonly object _dummy; @@ -7773,6 +8471,36 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyName left, Azure.ResourceManager.ApiManagement.Models.PolicyName right) { throw null; } public override string ToString() { throw null; } } + public partial class PolicyRestrictionContractPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PolicyRestrictionContractPatch() { } + public Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase? RequireBase { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionContractPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PolicyRestrictionRequireBase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PolicyRestrictionRequireBase(string value) { throw null; } + public static Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase False { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase True { get { throw null; } } + public bool Equals(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase 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.ApiManagement.Models.PolicyRestrictionRequireBase left, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase right) { throw null; } + public static implicit operator Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase left, Azure.ResourceManager.ApiManagement.Models.PolicyRestrictionRequireBase right) { throw null; } + public override string ToString() { throw null; } + } public enum PolicyScopeContract { Tenant = 0, @@ -7923,6 +8651,7 @@ public ProductApiData() { } public Azure.ResourceManager.ApiManagement.Models.ApiLicenseInformation License { get { throw null; } set { } } public string Path { get { throw null; } set { } } public System.Collections.Generic.IList Protocols { get { throw null; } } + public string ProvisioningState { get { throw null; } } public string ServiceLink { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Uri ServiceUri { get { throw null; } set { } } @@ -8287,6 +9016,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public SoapApiType(string value) { throw null; } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType GraphQL { get { throw null; } } + public static Azure.ResourceManager.ApiManagement.Models.SoapApiType Grpc { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType OData { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType SoapPassThrough { get { throw null; } } public static Azure.ResourceManager.ApiManagement.Models.SoapApiType SoapToRest { get { throw null; } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/assets.json b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/assets.json index 2dc2d177e96a..7bca61b05f28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/assets.json +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/apimanagement/Azure.ResourceManager.ApiManagement", - "Tag": "net/apimanagement/Azure.ResourceManager.ApiManagement_888f981359" + "Tag": "net/apimanagement/Azure.ResourceManager.ApiManagement_24352a6a4c" } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Azure.ResourceManager.ApiManagement.Samples.csproj b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Azure.ResourceManager.ApiManagement.Samples.csproj deleted file mode 100644 index 08edca6bdaa3..000000000000 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Azure.ResourceManager.ApiManagement.Samples.csproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs deleted file mode 100644 index d0c8003959de..000000000000 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.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.ApiManagement.Models; -using Azure.ResourceManager.Resources; -using NUnit.Framework; - -namespace Azure.ResourceManager.ApiManagement.Samples -{ - public partial class Sample_SubscriptionResourceExtensions - { - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetApiManagementDeletedServices_ApiManagementDeletedServicesListBySubscription() - { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeletedServicesListBySubscription.json - // this example is just showing the usage of "DeletedServices_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); - - // invoke the operation and iterate over the result - await foreach (ApiManagementDeletedServiceResource item in subscriptionResource.GetApiManagementDeletedServicesAsync()) - { - // 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 - ApiManagementDeletedServiceData 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 GetApiManagementServices_ApiManagementListServiceBySubscription() - { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListServiceBySubscription.json - // this example is just showing the usage of "ApiManagementService_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 = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (ApiManagementServiceResource item in subscriptionResource.GetApiManagementServicesAsync()) - { - // 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 - ApiManagementServiceData 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 CheckApiManagementServiceNameAvailability_ApiManagementServiceCheckNameAvailability() - { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceCheckNameAvailability.json - // this example is just showing the usage of "ApiManagementService_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 - 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 - ApiManagementServiceNameAvailabilityContent content = new ApiManagementServiceNameAvailabilityContent("apimService1"); - ApiManagementServiceNameAvailabilityResult result = await subscriptionResource.CheckApiManagementServiceNameAvailabilityAsync(content); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagementServiceGetDomainOwnershipIdentifier() - { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json - // this example is just showing the usage of "ApiManagementService_GetDomainOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. - - // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 - ApiManagementServiceGetDomainOwnershipIdentifierResult result = await subscriptionResource.GetApiManagementServiceDomainOwnershipIdentifierAsync(); - - Console.WriteLine($"Succeeded: {result}"); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetApiManagementSkus_ListsAllAvailableResourceSKUs() - { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSku.json - // this example is just showing the usage of "ApiManagementSkus_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 = "00000000-0000-0000-0000-000000000000"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - await foreach (ApiManagementSku item in subscriptionResource.GetApiManagementSkusAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } - - Console.WriteLine("Succeeded"); - } - } -} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj index 3484a13025d3..758077b476ea 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Azure.ResourceManager.ApiManagement.csproj @@ -1,8 +1,8 @@ - 1.3.0-beta.3 + 1.4.0-beta.1 - 1.2.0 + 1.3.0 Azure.ResourceManager.ApiManagement Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.ApiManagement. azure;management;arm;resource manager;apimanagement diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs index a9f66bddaf5d..dd8039787a00 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, int? top = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string apiId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string apiId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExistsAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs index 113c31c83d51..cdb0fd759f38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.Serialization.cs @@ -151,6 +151,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("apiVersionSet"u8); writer.WriteObjectValue(ApiVersionSet, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -199,6 +204,7 @@ internal static ApiData DeserializeApiData(JsonElement element, ModelReaderWrite string path = default; IList protocols = default; ApiVersionSetContractDetails apiVersionSet = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -394,6 +400,11 @@ internal static ApiData DeserializeApiData(JsonElement element, ModelReaderWrite apiVersionSet = ApiVersionSetContractDetails.DeserializeApiVersionSetContractDetails(property0.Value, options); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -429,6 +440,7 @@ internal static ApiData DeserializeApiData(JsonElement element, ModelReaderWrite path, protocols ?? new ChangeTrackingList(), apiVersionSet, + provisioningState, serializedAdditionalRawData); } @@ -896,6 +908,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs index 0b6aa43672b7..0e71ad0f372e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiData.cs @@ -83,8 +83,9 @@ public ApiData() /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -107,6 +108,7 @@ internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, Path = path; Protocols = protocols; ApiVersionSet = apiVersionSet; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -173,5 +175,8 @@ internal ApiData(ResourceIdentifier id, string name, ResourceType resourceType, /// Version set details. [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs index a3304eb32585..68aacb33848e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string diagn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.Serialization.cs index f064c5007c52..751e57c906b5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiDiagnosticResource : IJsonModel { + private static DiagnosticContractData s_dataDeserializationInstance; + private static DiagnosticContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); DiagnosticContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs index a3a6472d1342..2a0dc7b49489 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiDiagnosticResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, DiagnosticCo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayCollection.cs new file mode 100644 index 000000000000..d18790a1d86a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayCollection.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.ApiManagement +{ + /// + /// 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 GetApiGateways method from an instance of . + /// + public partial class ApiGatewayCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _apiGatewayClientDiagnostics; + private readonly ApiGatewayRestOperations _apiGatewayRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApiGatewayCollection() + { + } + + /// 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 ApiGatewayCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiGatewayClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiGatewayResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiGatewayResource.ResourceType, out string apiGatewayApiVersion); + _apiGatewayRestClient = new ApiGatewayRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiGatewayApiVersion); +#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 or updates an API Management gateway. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiGatewayOperationSource(Client), _apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiGatewayOperationSource(Client), _apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, data).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.Get"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.Get"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all API Management gateways within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiGatewayRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiGatewayRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayResource(Client, ApiGatewayData.DeserializeApiGatewayData(e)), _apiGatewayClientDiagnostics, Pipeline, "ApiGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all API Management gateways within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiGatewayRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiGatewayRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayResource(Client, ApiGatewayData.DeserializeApiGatewayData(e)), _apiGatewayClientDiagnostics, Pipeline, "ApiGatewayCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.Exists"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.Exists"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayCollection.GetIfExists"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, gatewayName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionCollection.cs new file mode 100644 index 000000000000..8d906a227165 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionCollection.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.ApiManagement +{ + /// + /// 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 GetApiGatewayConfigConnections method from an instance of . + /// + public partial class ApiGatewayConfigConnectionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _apiGatewayConfigConnectionClientDiagnostics; + private readonly ApiGatewayConfigConnectionRestOperations _apiGatewayConfigConnectionRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApiGatewayConfigConnectionCollection() + { + } + + /// 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 ApiGatewayConfigConnectionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiGatewayConfigConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiGatewayConfigConnectionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiGatewayConfigConnectionResource.ResourceType, out string apiGatewayConfigConnectionApiVersion); + _apiGatewayConfigConnectionRestClient = new ApiGatewayConfigConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiGatewayConfigConnectionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiGatewayResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiGatewayResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the API Management gateway config connection. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// 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 configConnectionName, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, data, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiGatewayConfigConnectionOperationSource(Client), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, 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 or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of the API Management gateway config connection. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// 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 configConnectionName, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, data, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiGatewayConfigConnectionOperationSource(Client), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.Get"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayConfigConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.Get"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayConfigConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all API Management gateway config connections within a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_ListByGateway + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiGatewayConfigConnectionRestClient.CreateListByGatewayRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiGatewayConfigConnectionRestClient.CreateListByGatewayNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayConfigConnectionResource(Client, ApiGatewayConfigConnectionData.DeserializeApiGatewayConfigConnectionData(e)), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, "ApiGatewayConfigConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all API Management gateway config connections within a gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_ListByGateway + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiGatewayConfigConnectionRestClient.CreateListByGatewayRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiGatewayConfigConnectionRestClient.CreateListByGatewayNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayConfigConnectionResource(Client, ApiGatewayConfigConnectionData.DeserializeApiGatewayConfigConnectionData(e)), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, "ApiGatewayConfigConnectionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.Exists"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, 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.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.Exists"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, 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.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayConfigConnectionResource(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.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, configConnectionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayConfigConnectionResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.Serialization.cs new file mode 100644 index 000000000000..fd466d89c0b1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.Serialization.cs @@ -0,0 +1,422 @@ +// Copyright (c) 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.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ApiGatewayConfigConnectionData : 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(ApiGatewayConfigConnectionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (Optional.IsDefined(SourceId)) + { + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + } + if (options.Format != "W" && Optional.IsDefined(DefaultHostname)) + { + writer.WritePropertyName("defaultHostname"u8); + writer.WriteStringValue(DefaultHostname); + } + if (Optional.IsCollectionDefined(Hostnames)) + { + writer.WritePropertyName("hostnames"u8); + writer.WriteStartArray(); + foreach (var item in Hostnames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + ApiGatewayConfigConnectionData 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(ApiGatewayConfigConnectionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiGatewayConfigConnectionData(document.RootElement, options); + } + + internal static ApiGatewayConfigConnectionData DeserializeApiGatewayConfigConnectionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string provisioningState = default; + ResourceIdentifier sourceId = default; + string defaultHostname = default; + IList hostnames = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("sourceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sourceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("defaultHostname"u8)) + { + defaultHostname = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("hostnames"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + hostnames = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiGatewayConfigConnectionData( + id, + name, + type, + systemData, + etag, + provisioningState, + sourceId, + defaultHostname, + hostnames ?? 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(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SourceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sourceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SourceId)) + { + builder.Append(" sourceId: "); + builder.AppendLine($"'{SourceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(DefaultHostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultHostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultHostname)) + { + builder.Append(" defaultHostname: "); + if (DefaultHostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultHostname}'''"); + } + else + { + builder.AppendLine($"'{DefaultHostname}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Hostnames), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostnames: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Hostnames)) + { + if (Hostnames.Any()) + { + builder.Append(" hostnames: "); + builder.AppendLine("["); + foreach (var item in Hostnames) + { + 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(" }"); + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiGatewayConfigConnectionData)} does not support writing '{options.Format}' format."); + } + } + + ApiGatewayConfigConnectionData 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 DeserializeApiGatewayConfigConnectionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiGatewayConfigConnectionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.cs new file mode 100644 index 000000000000..d10151fe5027 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionData.cs @@ -0,0 +1,96 @@ +// 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.ApiManagement +{ + /// + /// A class representing the ApiGatewayConfigConnection data model. + /// A single API Management gateway resource in List or Get response. + /// + public partial class ApiGatewayConfigConnectionData : 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 ApiGatewayConfigConnectionData() + { + Hostnames = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway config connection. + /// The link to the API Management service workspace. + /// The default hostname of the data-plane gateway. + /// The hostnames of the data-plane gateway to which requests can be sent. + /// Keeps track of any properties unknown to the library. + internal ApiGatewayConfigConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, string provisioningState, ResourceIdentifier sourceId, string defaultHostname, IList hostnames, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ETag = etag; + ProvisioningState = provisioningState; + SourceId = sourceId; + DefaultHostname = defaultHostname; + Hostnames = hostnames; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ETag of the resource. + [WirePath("etag")] + public ETag? ETag { get; } + /// The current provisioning state of the API Management gateway config connection. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } + /// The link to the API Management service workspace. + [WirePath("properties.sourceId")] + public ResourceIdentifier SourceId { get; set; } + /// The default hostname of the data-plane gateway. + [WirePath("properties.defaultHostname")] + public string DefaultHostname { get; } + /// The hostnames of the data-plane gateway to which requests can be sent. + [WirePath("properties.hostnames")] + public IList Hostnames { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.Serialization.cs new file mode 100644 index 000000000000..7d5edc074fdf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.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.ApiManagement +{ + public partial class ApiGatewayConfigConnectionResource : IJsonModel + { + private static ApiGatewayConfigConnectionData s_dataDeserializationInstance; + private static ApiGatewayConfigConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiGatewayConfigConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiGatewayConfigConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.cs new file mode 100644 index 000000000000..46bdd707d36c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayConfigConnectionResource.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.ApiManagement +{ + /// + /// A Class representing an ApiGatewayConfigConnection 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 GetApiGatewayConfigConnectionResource method. + /// Otherwise you can get one from its parent resource using the GetApiGatewayConfigConnection method. + /// + public partial class ApiGatewayConfigConnectionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The gatewayName. + /// The configConnectionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _apiGatewayConfigConnectionClientDiagnostics; + private readonly ApiGatewayConfigConnectionRestOperations _apiGatewayConfigConnectionRestClient; + private readonly ApiGatewayConfigConnectionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/gateways/configConnections"; + + /// Initializes a new instance of the class for mocking. + protected ApiGatewayConfigConnectionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApiGatewayConfigConnectionResource(ArmClient client, ApiGatewayConfigConnectionData 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 ApiGatewayConfigConnectionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiGatewayConfigConnectionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string apiGatewayConfigConnectionApiVersion); + _apiGatewayConfigConnectionRestClient = new ApiGatewayConfigConnectionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiGatewayConfigConnectionApiVersion); +#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 ApiGatewayConfigConnectionData 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 an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Get"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.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 ApiGatewayConfigConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Get"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayConfigConnectionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an existing API Management gateway config connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Delete"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(_apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an existing API Management gateway config connection. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Delete"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var operation = new ApiManagementArmOperation(_apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Update"); + scope.Start(); + try + { + var response = await _apiGatewayConfigConnectionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiGatewayConfigConnectionOperationSource(Client), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _apiGatewayConfigConnectionClientDiagnostics.CreateScope("ApiGatewayConfigConnectionResource.Update"); + scope.Start(); + try + { + var response = _apiGatewayConfigConnectionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiGatewayConfigConnectionOperationSource(Client), _apiGatewayConfigConnectionClientDiagnostics, Pipeline, _apiGatewayConfigConnectionRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.Serialization.cs new file mode 100644 index 000000000000..5488011ea711 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.Serialization.cs @@ -0,0 +1,599 @@ +// Copyright (c) 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ApiGatewayData : 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(ApiGatewayData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (options.Format != "W" && Optional.IsDefined(TargetProvisioningState)) + { + writer.WritePropertyName("targetProvisioningState"u8); + writer.WriteStringValue(TargetProvisioningState); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAtUtc)) + { + writer.WritePropertyName("createdAtUtc"u8); + writer.WriteStringValue(CreatedAtUtc.Value, "O"); + } + if (Optional.IsDefined(Frontend)) + { + writer.WritePropertyName("frontend"u8); + writer.WriteObjectValue(Frontend, options); + } + if (Optional.IsDefined(Backend)) + { + writer.WritePropertyName("backend"u8); + writer.WriteObjectValue(Backend, options); + } + if (Optional.IsDefined(ConfigurationApi)) + { + writer.WritePropertyName("configurationApi"u8); + writer.WriteObjectValue(ConfigurationApi, options); + } + if (Optional.IsDefined(VirtualNetworkType)) + { + writer.WritePropertyName("virtualNetworkType"u8); + writer.WriteStringValue(VirtualNetworkType.Value.ToString()); + } + writer.WriteEndObject(); + } + + ApiGatewayData 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(ApiGatewayData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiGatewayData(document.RootElement, options); + } + + internal static ApiGatewayData DeserializeApiGatewayData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewaySkuProperties sku = default; + ETag? etag = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string provisioningState = default; + string targetProvisioningState = default; + DateTimeOffset? createdAtUtc = default; + FrontendConfiguration frontend = default; + BackendConfiguration backend = default; + GatewayConfigurationApi configurationApi = default; + VirtualNetworkType? virtualNetworkType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + sku = ApiManagementGatewaySkuProperties.DeserializeApiManagementGatewaySkuProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("targetProvisioningState"u8)) + { + targetProvisioningState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdAtUtc"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAtUtc = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("frontend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frontend = FrontendConfiguration.DeserializeFrontendConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("backend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backend = BackendConfiguration.DeserializeBackendConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("configurationApi"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationApi = GatewayConfigurationApi.DeserializeGatewayConfigurationApi(property0.Value, options); + continue; + } + if (property0.NameEquals("virtualNetworkType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkType = new VirtualNetworkType(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiGatewayData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + sku, + etag, + provisioningState, + targetProvisioningState, + createdAtUtc, + frontend, + backend, + configurationApi, + virtualNetworkType, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Location), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" location: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" location: "); + builder.AppendLine($"'{Location.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("FrontendDefaultHostname", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frontend: "); + builder.AppendLine("{"); + builder.AppendLine(" frontend: {"); + builder.Append(" defaultHostname: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Frontend)) + { + builder.Append(" frontend: "); + BicepSerializationHelpers.AppendChildObject(builder, Frontend, options, 4, false, " frontend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SubnetId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backend: "); + builder.AppendLine("{"); + builder.AppendLine(" backend: {"); + builder.AppendLine(" subnet: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Backend)) + { + builder.Append(" backend: "); + BicepSerializationHelpers.AppendChildObject(builder, Backend, options, 4, false, " backend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ConfigurationApiHostname", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationApi: "); + builder.AppendLine("{"); + builder.AppendLine(" configurationApi: {"); + builder.Append(" hostname: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ConfigurationApi)) + { + builder.Append(" configurationApi: "); + BicepSerializationHelpers.AppendChildObject(builder, ConfigurationApi, options, 4, false, " configurationApi: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiGatewayData)} does not support writing '{options.Format}' format."); + } + } + + ApiGatewayData 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 DeserializeApiGatewayData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiGatewayData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.cs new file mode 100644 index 000000000000..a29c42c96a90 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayData.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 Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the ApiGateway data model. + /// A single API Management gateway resource in List or Get response. + /// + public partial class ApiGatewayData : 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. + /// SKU properties of the API Management gateway. + /// is null. + public ApiGatewayData(AzureLocation location, ApiManagementGatewaySkuProperties sku) : base(location) + { + Argument.AssertNotNull(sku, nameof(sku)); + + Sku = sku; + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// SKU properties of the API Management gateway. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Information regarding how the gateway should be exposed. + /// Information regarding how the gateway should integrate with backend systems. + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + /// The type of VPN in which API Management gateway needs to be configured in. + /// Keeps track of any properties unknown to the library. + internal ApiGatewayData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ApiManagementGatewaySkuProperties sku, ETag? etag, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, FrontendConfiguration frontend, BackendConfiguration backend, GatewayConfigurationApi configurationApi, VirtualNetworkType? virtualNetworkType, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Sku = sku; + ETag = etag; + ProvisioningState = provisioningState; + TargetProvisioningState = targetProvisioningState; + CreatedAtUtc = createdAtUtc; + Frontend = frontend; + Backend = backend; + ConfigurationApi = configurationApi; + VirtualNetworkType = virtualNetworkType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiGatewayData() + { + } + + /// SKU properties of the API Management gateway. + [WirePath("sku")] + public ApiManagementGatewaySkuProperties Sku { get; set; } + /// ETag of the resource. + [WirePath("etag")] + public ETag? ETag { get; } + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + [WirePath("properties.targetProvisioningState")] + public string TargetProvisioningState { get; } + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] + public DateTimeOffset? CreatedAtUtc { get; } + /// Information regarding how the gateway should be exposed. + internal FrontendConfiguration Frontend { get; set; } + /// The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. + [WirePath("properties.frontend.defaultHostname")] + public string FrontendDefaultHostname + { + get => Frontend is null ? default : Frontend.DefaultHostname; + } + + /// Information regarding how the gateway should integrate with backend systems. + internal BackendConfiguration Backend { get; set; } + /// Gets or sets Id. + [WirePath("properties.backend.subnet.id")] + public ResourceIdentifier SubnetId + { + get => Backend is null ? default : Backend.SubnetId; + set + { + if (Backend is null) + Backend = new BackendConfiguration(); + Backend.SubnetId = value; + } + } + + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + internal GatewayConfigurationApi ConfigurationApi { get; set; } + /// Hostname to which the agent connects to propagate configuration to the cloud. + [WirePath("properties.configurationApi.hostname")] + public string ConfigurationApiHostname + { + get => ConfigurationApi is null ? default : ConfigurationApi.Hostname; + } + + /// The type of VPN in which API Management gateway needs to be configured in. + [WirePath("properties.virtualNetworkType")] + public VirtualNetworkType? VirtualNetworkType { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.Serialization.cs new file mode 100644 index 000000000000..47c4bc0bc224 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.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.ApiManagement +{ + public partial class ApiGatewayResource : IJsonModel + { + private static ApiGatewayData s_dataDeserializationInstance; + private static ApiGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.cs new file mode 100644 index 000000000000..fb035cbe4d78 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiGatewayResource.cs @@ -0,0 +1,833 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing an ApiGateway 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 GetApiGatewayResource method. + /// Otherwise you can get one from its parent resource using the GetApiGateway method. + /// + public partial class ApiGatewayResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The gatewayName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string gatewayName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _apiGatewayClientDiagnostics; + private readonly ApiGatewayRestOperations _apiGatewayRestClient; + private readonly ClientDiagnostics _apiManagementGatewaySkusClientDiagnostics; + private readonly ApiManagementGatewaySkusRestOperations _apiManagementGatewaySkusRestClient; + private readonly ApiGatewayData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/gateways"; + + /// Initializes a new instance of the class for mocking. + protected ApiGatewayResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApiGatewayResource(ArmClient client, ApiGatewayData 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 ApiGatewayResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiGatewayClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string apiGatewayApiVersion); + _apiGatewayRestClient = new ApiGatewayRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiGatewayApiVersion); + _apiManagementGatewaySkusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _apiManagementGatewaySkusRestClient = new ApiManagementGatewaySkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); +#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 ApiGatewayData 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 ApiGatewayConfigConnectionResources in the ApiGateway. + /// An object representing collection of ApiGatewayConfigConnectionResources and their operations over a ApiGatewayConfigConnectionResource. + public virtual ApiGatewayConfigConnectionCollection GetApiGatewayConfigConnections() + { + return GetCachedClient(client => new ApiGatewayConfigConnectionCollection(client, Id)); + } + + /// + /// Gets an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetApiGatewayConfigConnectionAsync(string configConnectionName, CancellationToken cancellationToken = default) + { + return await GetApiGatewayConfigConnections().GetAsync(configConnectionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an API Management gateway config connection resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName} + /// + /// + /// Operation Id + /// ApiGatewayConfigConnection_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway config connection. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetApiGatewayConfigConnection(string configConnectionName, CancellationToken cancellationToken = default) + { + return GetApiGatewayConfigConnections().Get(configConnectionName, cancellationToken); + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Get"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Get"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiGatewayResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an existing API Management gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Delete"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(_apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.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 an existing API Management gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Delete"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ApiManagementArmOperation(_apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.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 an existing API Management gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApiGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Update"); + scope.Start(); + try + { + var response = await _apiGatewayRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new ApiGatewayOperationSource(Client), _apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.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 an existing API Management gateway. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApiGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.Update"); + scope.Start(); + try + { + var response = _apiGatewayRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new ApiManagementArmOperation(new ApiGatewayOperationSource(Client), _apiGatewayClientDiagnostics, Pipeline, _apiGatewayRestClient.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; + } + } + + /// + /// Gets all available SKU for a given API Management gateway + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus + /// + /// + /// Operation Id + /// ApiManagementGatewaySkus_ListAvailableSkus + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAvailableSkusApiManagementGatewaySkusAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _apiManagementGatewaySkusRestClient.CreateListAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiManagementGatewaySkusRestClient.CreateListAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => GatewayResourceSkuResult.DeserializeGatewayResourceSkuResult(e), _apiManagementGatewaySkusClientDiagnostics, Pipeline, "ApiGatewayResource.GetAvailableSkusApiManagementGatewaySkus", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all available SKU for a given API Management gateway + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/skus + /// + /// + /// Operation Id + /// ApiManagementGatewaySkus_ListAvailableSkus + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAvailableSkusApiManagementGatewaySkus(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _apiManagementGatewaySkusRestClient.CreateListAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiManagementGatewaySkusRestClient.CreateListAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => GatewayResourceSkuResult.DeserializeGatewayResourceSkuResult(e), _apiManagementGatewaySkusClientDiagnostics, Pipeline, "ApiGatewayResource.GetAvailableSkusApiManagementGatewaySkus", "value", "nextLink", cancellationToken); + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ApiGatewayPatch(); + 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ApiGatewayPatch(); + 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ApiGatewayPatch(); + 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ApiGatewayPatch(); + 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 _apiGatewayRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ApiGatewayPatch(); + 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.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-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 = _apiGatewayClientDiagnostics.CreateScope("ApiGatewayResource.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 = _apiGatewayRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ApiGatewayResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ApiGatewayPatch(); + 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs index a29235f50d76..bdc8bd94eceb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string attachmentId, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string attachmentId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string attachmentId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.Serialization.cs index 4562299771f1..254d05fecc75 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiIssueAttachmentResource : IJsonModel { + private static ApiIssueAttachmentData s_dataDeserializationInstance; + private static ApiIssueAttachmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiIssueAttachmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiIssueAttachmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiIssueAttachmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs index eee2a56c401f..20acfe688f16 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueAttachmentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs index 25510f0a5de4..958500647a07 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string issueId, b /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Get(string issueId, bool? expandCommen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = null, bool? exp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string issueId, bool? expa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual Response Exists(string issueId, bool? expandCommentsAttachm /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs index c05930732e08..e7b514c7c7e3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string com /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string commentId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string commentId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string commentId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.Serialization.cs index b49eb589b96c..5cd58a51a92e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiIssueCommentResource : IJsonModel { + private static ApiIssueCommentData s_dataDeserializationInstance; + private static ApiIssueCommentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiIssueCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiIssueCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiIssueCommentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs index 80e939fe715d..794d215f852e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueCommentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.Serialization.cs index e4c872fb18b2..80eb0aece884 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiIssueResource : IJsonModel { + private static IssueContractData s_dataDeserializationInstance; + private static IssueContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IssueContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IssueContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); IssueContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs index 3b35f81e79de..5b539516fe01 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiIssueResource.cs @@ -110,7 +110,7 @@ public virtual ApiIssueCommentCollection GetApiIssueComments() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetApiIssueCommentA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ApiIssueAttachmentCollection GetApiIssueAttachments() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetApiIssueAttac /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetApiIssueAttachment(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(bool? expandComme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(bool? expandCommentsAttachments = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -499,7 +499,7 @@ public virtual Response Update(ETag ifMatch, ApiIssuePatch pat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -537,7 +537,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs index f1f12d55ecb0..f623d0b8e22c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authsid, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authsid, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.Serialization.cs index 72d5d71080f2..91a4c886511c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementAuthorizationServerResource : IJsonModel { + private static ApiManagementAuthorizationServerData s_dataDeserializationInstance; + private static ApiManagementAuthorizationServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementAuthorizationServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementAuthorizationServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementAuthorizationServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs index 15c790273e8b..4097f6e3f08a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementAuthorizationServerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs index b18ae1ced4ff..94a4467d4f42 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string backendId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string backendId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string backendId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs index 1a8bbdbdf01f..ea4205288758 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.Serialization.cs @@ -80,6 +80,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("circuitBreaker"u8); writer.WriteObjectValue(CircuitBreaker, options); } + if (Optional.IsDefined(Pool)) + { + writer.WritePropertyName("pool"u8); + writer.WriteObjectValue(Pool, options); + } + if (Optional.IsDefined(TypePropertiesType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(TypePropertiesType.Value.ToString()); + } if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -125,6 +135,8 @@ internal static ApiManagementBackendData DeserializeApiManagementBackendData(Jso BackendProxyContract proxy = default; BackendTlsProperties tls = default; BackendCircuitBreaker circuitBreaker = default; + BackendBaseParametersPool pool = default; + BackendType? type0 = default; Uri uri = default; BackendProtocol? protocol = default; IDictionary serializedAdditionalRawData = default; @@ -228,6 +240,24 @@ internal static ApiManagementBackendData DeserializeApiManagementBackendData(Jso circuitBreaker = BackendCircuitBreaker.DeserializeBackendCircuitBreaker(property0.Value, options); continue; } + if (property0.NameEquals("pool"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pool = BackendBaseParametersPool.DeserializeBackendBaseParametersPool(property0.Value, options); + continue; + } + if (property0.NameEquals("type"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type0 = new BackendType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("url"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -268,6 +298,8 @@ internal static ApiManagementBackendData DeserializeApiManagementBackendData(Jso proxy, tls, circuitBreaker, + pool, + type0, uri, protocol, serializedAdditionalRawData); @@ -485,6 +517,41 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("PoolServices", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" pool: "); + builder.AppendLine("{"); + builder.AppendLine(" pool: {"); + builder.Append(" services: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Pool)) + { + builder.Append(" pool: "); + BicepSerializationHelpers.AppendChildObject(builder, Pool, options, 4, false, " pool: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TypePropertiesType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" type: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TypePropertiesType)) + { + builder.Append(" type: "); + builder.AppendLine($"'{TypePropertiesType.Value.ToString()}'"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Uri), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs index bafdffd8fccb..de327f7caab7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendData.cs @@ -69,10 +69,12 @@ public ApiManagementBackendData() /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Backend Circuit Breaker Configuration. + /// + /// Type of the backend. A backend can be either Single or Pool. /// Runtime Url of the Backend. /// Backend communication protocol. /// Keeps track of any properties unknown to the library. - internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string description, Uri resourceUri, BackendProperties properties, BackendCredentialsContract credentials, BackendProxyContract proxy, BackendTlsProperties tls, BackendCircuitBreaker circuitBreaker, Uri uri, BackendProtocol? protocol, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string description, Uri resourceUri, BackendProperties properties, BackendCredentialsContract credentials, BackendProxyContract proxy, BackendTlsProperties tls, BackendCircuitBreaker circuitBreaker, BackendBaseParametersPool pool, BackendType? typePropertiesType, Uri uri, BackendProtocol? protocol, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Title = title; Description = description; @@ -82,6 +84,8 @@ internal ApiManagementBackendData(ResourceIdentifier id, string name, ResourceTy Proxy = proxy; Tls = tls; CircuitBreaker = circuitBreaker; + Pool = pool; + TypePropertiesType = typePropertiesType; Uri = uri; Protocol = protocol; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -134,6 +138,23 @@ public IList CircuitBreakerRules } } + /// Gets or sets the pool. + internal BackendBaseParametersPool Pool { get; set; } + /// The list of backend entities belonging to a pool. + [WirePath("properties.pool.services")] + public IList PoolServices + { + get + { + if (Pool is null) + Pool = new BackendBaseParametersPool(); + return Pool.Services; + } + } + + /// Type of the backend. A backend can be either Single or Pool. + [WirePath("properties.type")] + public BackendType? TypePropertiesType { get; set; } /// Runtime Url of the Backend. [WirePath("properties.url")] public Uri Uri { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.Serialization.cs index 003dc46db11b..ce69b7c4365b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementBackendResource : IJsonModel { + private static ApiManagementBackendData s_dataDeserializationInstance; + private static ApiManagementBackendData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs index 5e5d470a8f0d..64bd1b3f0b17 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementBackendResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task ReconnectAsync(BackendReconnectContract back /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual Response Reconnect(BackendReconnectContract backendReconnectContr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -474,7 +474,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs index 77241ff210f2..98f77e1a0521 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string cacheId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(int? top = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(int? top = null, int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string cacheId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string cacheId, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.Serialization.cs index 59de24ca4085..5af62cca6ca6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementCacheResource : IJsonModel { + private static ApiManagementCacheData s_dataDeserializationInstance; + private static ApiManagementCacheData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementCacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementCacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementCacheData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs index b317583c8d70..76a3f5b41880 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCacheResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs index 595c0bb3d1f8..bf8619ef9330 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string certificate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.Serialization.cs index 7ad6a6c694b3..09bb36520f25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementCertificateResource : IJsonModel { + private static ApiManagementCertificateData s_dataDeserializationInstance; + private static ApiManagementCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs index ac70662c3eac..409c04f0cd8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementCertificateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> RefreshSec /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RefreshSecret(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs index 3ad55325bffa..66632fc49256 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -108,7 +108,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(AzureLocation l /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> ExistsAsync(AzureLocation location, st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Exists(AzureLocation location, string serviceName, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.Serialization.cs index 3d9377d06c87..aeba2143e002 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementDeletedServiceResource : IJsonModel { + private static ApiManagementDeletedServiceData s_dataDeserializationInstance; + private static ApiManagementDeletedServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementDeletedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementDeletedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementDeletedServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs index 4b4ea86c18e0..d24c90c0f8af 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDeletedServiceResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs index a557c9e20f64..956ae4d7c6e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string diagnosticId /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string diagnosticId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string diagnosticId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.Serialization.cs index dd168958dc20..414a204e1248 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementDiagnosticResource : IJsonModel { + private static DiagnosticContractData s_dataDeserializationInstance; + private static DiagnosticContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); DiagnosticContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs index 284ab8baff35..7c9115ead868 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementDiagnosticResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual Response Update(ETag ifMatch, Di /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs index 1f739615c3e0..75f5a1ee0494 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(TemplateName tem /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> ExistsAsync(TemplateName templateName, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual Response Exists(TemplateName templateName, CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.Serialization.cs index 14abc39cba54..362cd6bd3edf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementEmailTemplateResource : IJsonModel { + private static ApiManagementEmailTemplateData s_dataDeserializationInstance; + private static ApiManagementEmailTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementEmailTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementEmailTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementEmailTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs index 3c3cfb9eeb54..ed3d217a97bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementEmailTemplateResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs index 0e9254e4a2a1..75e07f95909f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string certificateId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string certificateId, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.Serialization.cs index d04bc218cc35..324388ed38eb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementGatewayCertificateAuthorityResource : IJsonModel { + private static ApiManagementGatewayCertificateAuthorityData s_dataDeserializationInstance; + private static ApiManagementGatewayCertificateAuthorityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGatewayCertificateAuthorityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGatewayCertificateAuthorityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGatewayCertificateAuthorityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs index 48d077f303b5..0df4f2823e24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCertificateAuthorityResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Up /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs index 7be9466c9e09..852c74eb3eec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string gatewayId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string gatewayId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string gatewayId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs index 43e80d8b1ec1..d49517255cd3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string hcId, CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string hcId, CancellationToken cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.Serialization.cs index 1af68e8c417a..4a3363c147cf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementGatewayHostnameConfigurationResource : IJsonModel { + private static ApiManagementGatewayHostnameConfigurationData s_dataDeserializationInstance; + private static ApiManagementGatewayHostnameConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGatewayHostnameConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGatewayHostnameConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGatewayHostnameConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs index f1963cb164ab..cbccf49c26c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayHostnameConfigurationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation U /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.Serialization.cs index 7c9234a7c75a..d07323d5b613 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementGatewayResource : IJsonModel { + private static ApiManagementGatewayData s_dataDeserializationInstance; + private static ApiManagementGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs index 8c4f21f01e9e..db5a4e929004 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGatewayResource.cs @@ -115,7 +115,7 @@ public virtual ApiManagementGatewayHostnameConfigurationCollection GetApiManagem /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ApiManagementGatewayCertificateAuthorityCollection GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual Response GetApi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -286,7 +286,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -416,7 +416,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -502,7 +502,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task> GetKeysAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -578,7 +578,7 @@ public virtual Response GetKeys(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -620,7 +620,7 @@ public virtual async Task RegenerateKeyAsync(GatewayKeyRegenerateConte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -662,7 +662,7 @@ public virtual Response RegenerateKey(GatewayKeyRegenerateContent content, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -704,7 +704,7 @@ public virtual async Task> GenerateTokenAsync(Gat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -746,7 +746,7 @@ public virtual Response GenerateToken(GatewayTokenRequestC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -784,7 +784,7 @@ public virtual async Task InvalidateDebugCredentialsAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -822,7 +822,7 @@ public virtual Response InvalidateDebugCredentials(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -864,7 +864,7 @@ public virtual async Task> GetDebugCre /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -906,7 +906,7 @@ public virtual Response GetDebugCredentials(Gat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -948,7 +948,7 @@ public virtual async Task>> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -990,7 +990,7 @@ public virtual Response> GetTrace(Gatewa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1019,7 +1019,7 @@ public virtual AsyncPageable GetGatewayApisByServiceAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1048,7 +1048,7 @@ public virtual Pageable GetGatewayApisByService(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1087,7 +1087,7 @@ public virtual async Task> GetGatewayApiEntityTagAsync(string api /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1126,7 +1126,7 @@ public virtual Response GetGatewayApiEntityTag(string apiId, CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1166,7 +1166,7 @@ public virtual async Task> CreateOrUpdateGatewayApiAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1206,7 +1206,7 @@ public virtual Response CreateOrUpdateGatewayApi(string apiId, A /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1245,7 +1245,7 @@ public virtual async Task DeleteGatewayApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1284,7 +1284,7 @@ public virtual Response DeleteGatewayApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1322,7 +1322,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs index a84a20532ef7..b6bd2ea87589 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs index b1c3c1465e53..e24534fcce62 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.Serialization.cs @@ -74,6 +74,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } #endif } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -105,6 +110,7 @@ internal static ApiManagementGlobalSchemaData DeserializeApiManagementGlobalSche string description = default; BinaryData value = default; BinaryData document = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -174,6 +180,11 @@ internal static ApiManagementGlobalSchemaData DeserializeApiManagementGlobalSche document = BinaryData.FromString(property0.Value.GetRawText()); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -192,6 +203,7 @@ internal static ApiManagementGlobalSchemaData DeserializeApiManagementGlobalSche description, value, document, + provisioningState, serializedAdditionalRawData); } @@ -329,6 +341,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs index b298f31f51d3..bd9783c6f1e4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaData.cs @@ -65,13 +65,15 @@ public ApiManagementGlobalSchemaData() /// Free-form schema entity description. /// Json-encoded string for non json-based schema. /// Global Schema document object for json-based schema formats(e.g. json schema). + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiSchemaType? schemaType, string description, BinaryData value, BinaryData document, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiSchemaType? schemaType, string description, BinaryData value, BinaryData document, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { SchemaType = schemaType; Description = description; Value = value; Document = document; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -145,5 +147,8 @@ internal ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, Resou /// [WirePath("properties.document")] public BinaryData Document { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.Serialization.cs index 4703831654bb..536a13f65b4c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementGlobalSchemaResource : IJsonModel { + private static ApiManagementGlobalSchemaData s_dataDeserializationInstance; + private static ApiManagementGlobalSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGlobalSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGlobalSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGlobalSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs index 28abfcdaf6ef..f3db07191ca2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGlobalSchemaResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs index 45113b816f70..2535a690e42d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string groupId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string groupId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string groupId, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.Serialization.cs index ce0f53b8a761..0fceff7dc2d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementGroupResource : IJsonModel { + private static ApiManagementGroupData s_dataDeserializationInstance; + private static ApiManagementGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs index a3d303788461..4827faff1172 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementGroupResource.cs @@ -107,7 +107,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual Response Update(ETag ifMatch, ApiMana /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -392,7 +392,7 @@ public virtual AsyncPageable GetGroupUsersAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -421,7 +421,7 @@ public virtual Pageable GetGroupUsers(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -460,7 +460,7 @@ public virtual async Task> CheckGroupUserEntityExistsAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -499,7 +499,7 @@ public virtual Response CheckGroupUserEntityExists(string userId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -538,7 +538,7 @@ public virtual async Task> CreateGroupUserA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -577,7 +577,7 @@ public virtual Response CreateGroupUser(string userI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -616,7 +616,7 @@ public virtual async Task DeleteGroupUserAsync(string userId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -655,7 +655,7 @@ public virtual Response DeleteGroupUser(string userId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs index a32d70f1ab54..95a3356374e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(IdentityProvi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> ExistsAsync(IdentityProviderType ident /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -385,7 +385,7 @@ public virtual Response Exists(IdentityProviderType identityProviderName, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.Serialization.cs index 9333950a36a1..c5e916f02e15 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementIdentityProviderResource : IJsonModel { + private static ApiManagementIdentityProviderData s_dataDeserializationInstance; + private static ApiManagementIdentityProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementIdentityProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementIdentityProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementIdentityProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs index 97666374ee46..7ef8761de73e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIdentityProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs index 7e4473c9d518..bfad0eb0bc95 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string issueId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string issueId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string issueId, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.Serialization.cs index 1ce193ba0ad7..2a461079831d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementIssueResource : IJsonModel { + private static IssueContractData s_dataDeserializationInstance; + private static IssueContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IssueContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IssueContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); IssueContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs index 35e1f2864b72..76bd2cdc6571 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementIssueResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs index 600b2f8adf36..0ec3cccda83b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string loggerId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string loggerId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string loggerId, CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.Serialization.cs index af6aebd1bb8d..bae031054901 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementLoggerResource : IJsonModel { + private static ApiManagementLoggerData s_dataDeserializationInstance; + private static ApiManagementLoggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementLoggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementLoggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementLoggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs index eb7d83bb054d..2d8feaeb399d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementLoggerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiMan /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs index 758986a25bfe..854718069846 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string namedValueId /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string namedValueId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string namedValueId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs index 98b3ab590798..ecf3b65ba919 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.Serialization.cs @@ -71,6 +71,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("keyVault"u8); writer.WriteObjectValue(KeyVaultDetails, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -103,6 +108,7 @@ internal static ApiManagementNamedValueData DeserializeApiManagementNamedValueDa string displayName = default; string value = default; KeyVaultContractProperties keyVault = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -182,6 +188,11 @@ internal static ApiManagementNamedValueData DeserializeApiManagementNamedValueDa keyVault = KeyVaultContractProperties.DeserializeKeyVaultContractProperties(property0.Value, options); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -201,6 +212,7 @@ internal static ApiManagementNamedValueData DeserializeApiManagementNamedValueDa displayName, value, keyVault, + provisioningState, serializedAdditionalRawData); } @@ -383,6 +395,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs index a8bac899b00b..5e4e8ccb7e01 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueData.cs @@ -67,14 +67,16 @@ public ApiManagementNamedValueData() /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// KeyVault location details of the namedValue. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal ApiManagementNamedValueData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList tags, bool? isSecret, string displayName, string value, KeyVaultContractProperties keyVaultDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementNamedValueData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList tags, bool? isSecret, string displayName, string value, KeyVaultContractProperties keyVaultDetails, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Tags = tags; IsSecret = isSecret; DisplayName = displayName; Value = value; KeyVaultDetails = keyVaultDetails; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,5 +95,8 @@ internal ApiManagementNamedValueData(ResourceIdentifier id, string name, Resourc /// KeyVault location details of the namedValue. [WirePath("properties.keyVault")] public KeyVaultContractProperties KeyVaultDetails { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.Serialization.cs index 1ee9b9f8639c..8e24a47e0271 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementNamedValueResource : IJsonModel { + private static ApiManagementNamedValueData s_dataDeserializationInstance; + private static ApiManagementNamedValueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementNamedValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementNamedValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementNamedValueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs index d313727cb70c..0d356da1c418 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNamedValueResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetValueAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual Response GetValue(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> Refresh /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -526,7 +526,7 @@ public virtual ArmOperation RefreshSecret(WaitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs index 5ce65191e4b4..e4f7c937c159 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response Get(NotificationName /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual async Task> ExistsAsync(NotificationName notificat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual Response Exists(NotificationName notificationName, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.Serialization.cs index 22bd1b438ccd..69442b6bfd87 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementNotificationResource : IJsonModel { + private static ApiManagementNotificationData s_dataDeserializationInstance; + private static ApiManagementNotificationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementNotificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementNotificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementNotificationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs index 85b36243af90..205482dee965 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementNotificationResource.cs @@ -111,7 +111,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -151,7 +151,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -281,7 +281,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -306,7 +306,7 @@ public virtual AsyncPageable GetNotificationRecipientUser /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -331,7 +331,7 @@ public virtual Pageable GetNotificationRecipientUsers(Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -370,7 +370,7 @@ public virtual async Task> CheckNotificationRecipientUserEntityEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -409,7 +409,7 @@ public virtual Response CheckNotificationRecipientUserEntityExists(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -448,7 +448,7 @@ public virtual async Task> CreateOrUpdateNotific /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -487,7 +487,7 @@ public virtual Response CreateOrUpdateNotificationRecipie /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -526,7 +526,7 @@ public virtual async Task DeleteNotificationRecipientUserAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -565,7 +565,7 @@ public virtual Response DeleteNotificationRecipientUser(string userId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -590,7 +590,7 @@ public virtual AsyncPageable GetNotificationRecipientEma /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -615,7 +615,7 @@ public virtual Pageable GetNotificationRecipientEmails(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -654,7 +654,7 @@ public virtual async Task> CheckNotificationRecipientEmailEntityE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -693,7 +693,7 @@ public virtual Response CheckNotificationRecipientEmailEntityExists(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -732,7 +732,7 @@ public virtual async Task> CreateOrUpdateNotifi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -771,7 +771,7 @@ public virtual Response CreateOrUpdateNotificationRecipi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -810,7 +810,7 @@ public virtual async Task DeleteNotificationRecipientEmailAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs index d6c27dfca542..8e9cf88e44be 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string o /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string openId, Cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string openId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.Serialization.cs index c0240bc874fa..c696cfddc861 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementOpenIdConnectProviderResource : IJsonModel { + private static ApiManagementOpenIdConnectProviderData s_dataDeserializationInstance; + private static ApiManagementOpenIdConnectProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementOpenIdConnectProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementOpenIdConnectProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementOpenIdConnectProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs index 9d634fb48b21..1b0e477fc23b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementOpenIdConnectProviderResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetSecretsAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual Response GetSecrets(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -472,7 +472,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs index 7ff6d5c8f89a..a116da2f172a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Po /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.Serialization.cs index 3b524854cc05..403bae21059f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs index fee6bc419331..bbdd6a4f1297 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Policy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(PolicyExportFormat? for /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.Serialization.cs index d49abffba7c6..7711d6a28bd7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPortalDelegationSettingResource : IJsonModel { + private static ApiManagementPortalDelegationSettingData s_dataDeserializationInstance; + private static ApiManagementPortalDelegationSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPortalDelegationSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPortalDelegationSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPortalDelegationSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs index aecf64eccf3b..4214141864a6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalDelegationSettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalDelegationSettin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual ArmOperation Create /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetSecre /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -441,7 +441,7 @@ public virtual Response GetSecrets(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs index b6db2f057e16..2de4c3af98f8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string portalRe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual Pageable GetAll(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -377,7 +377,7 @@ public virtual async Task> ExistsAsync(string portalRevisionId, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Exists(string portalRevisionId, CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs index 78fbe1ed9cad..8c0c19589f1f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.Serialization.cs @@ -70,6 +70,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("updatedDateTime"u8); writer.WriteStringValue(UpdatedOn.Value, "O"); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -103,6 +108,7 @@ internal static ApiManagementPortalRevisionData DeserializeApiManagementPortalRe bool? isCurrent = default; DateTimeOffset? createdDateTime = default; DateTimeOffset? updatedDateTime = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -186,6 +192,11 @@ internal static ApiManagementPortalRevisionData DeserializeApiManagementPortalRe updatedDateTime = property0.Value.GetDateTimeOffset("O"); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -206,6 +217,7 @@ internal static ApiManagementPortalRevisionData DeserializeApiManagementPortalRe isCurrent, createdDateTime, updatedDateTime, + provisioningState, serializedAdditionalRawData); } @@ -384,6 +396,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs index ad0006c7934d..8beb600e0c33 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionData.cs @@ -67,8 +67,9 @@ public ApiManagementPortalRevisionData() /// Indicates if the portal's revision is public. /// Portal's revision creation date and time. /// Last updated date and time. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string statusDetails, PortalRevisionStatus? status, bool? isCurrent, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string statusDetails, PortalRevisionStatus? status, bool? isCurrent, DateTimeOffset? createdOn, DateTimeOffset? updatedOn, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; StatusDetails = statusDetails; @@ -76,6 +77,7 @@ internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, Res IsCurrent = isCurrent; CreatedOn = createdOn; UpdatedOn = updatedOn; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -97,5 +99,8 @@ internal ApiManagementPortalRevisionData(ResourceIdentifier id, string name, Res /// Last updated date and time. [WirePath("properties.updatedDateTime")] public DateTimeOffset? UpdatedOn { get; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.Serialization.cs index 9c035debb8d9..8ac630cff132 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPortalRevisionResource : IJsonModel { + private static ApiManagementPortalRevisionData s_dataDeserializationInstance; + private static ApiManagementPortalRevisionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPortalRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPortalRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPortalRevisionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs index 0b203d80f826..e3af15366d1c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalRevisionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.Serialization.cs index 4900d8c59d8d..e4c8798fc7fd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPortalSignInSettingResource : IJsonModel { + private static ApiManagementPortalSignInSettingData s_dataDeserializationInstance; + private static ApiManagementPortalSignInSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPortalSignInSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPortalSignInSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPortalSignInSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs index fa55e1dd4717..0c5106ad1475 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignInSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignInSettingDat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.Serialization.cs index 009eab6929a0..f863af3be422 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPortalSignUpSettingResource : IJsonModel { + private static ApiManagementPortalSignUpSettingData s_dataDeserializationInstance; + private static ApiManagementPortalSignUpSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPortalSignUpSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPortalSignUpSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPortalSignUpSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs index 9f0eee1ab89a..3690975d5a56 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPortalSignUpSettingResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task UpdateAsync(ETag ifMatch, ApiManagementPorta /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual Response Update(ETag ifMatch, ApiManagementPortalSignUpSettingDat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs index b27cb57de969..bc93384f95ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -354,7 +354,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -442,7 +442,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.Serialization.cs index cd430b274878..75f770289e1f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPrivateEndpointConnectionResource : IJsonModel { + private static ApiManagementPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ApiManagementPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs index 2e1f7f604aa8..305ab5cec668 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateEndpointConnectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.Serialization.cs index c08c161833ed..e0f35c24c3ef 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementPrivateLinkResource : IJsonModel { + private static ApiManagementPrivateLinkResourceData s_dataDeserializationInstance; + private static ApiManagementPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs index b415deedd8d1..c17de608e35d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs index 598aed13a6dc..73a113cc5179 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string privateLink /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string privateLinkSubResou /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string privateLinkSubResourceName, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs index 5b122d6be63c..62d2ae55f31e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string productId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string productId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response Exists(string productId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs index a33309509e2f..d03b10e13b61 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.Serialization.cs index e141c40f3d18..dfde82fb4a54 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementProductPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs index 51a4e50bad1c..fd844815e6e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportForm /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.Serialization.cs index a21bd92915a4..d554e29892b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementProductResource : IJsonModel { + private static ApiManagementProductData s_dataDeserializationInstance; + private static ApiManagementProductData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementProductData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs index 7f51a7c7004c..7ab9d7bed903 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementProductPolicyCollection GetApiManagementProductPolic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -189,7 +189,7 @@ public virtual ApiManagementProductTagCollection GetApiManagementProductTags() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ServiceProductApiLinkCollection GetServiceProductApiLinks() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task> GetServicePro /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -334,7 +334,7 @@ public virtual ServiceProductGroupLinkCollection GetServiceProductGroupLinks() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> GetServiceP /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response GetServiceProductGroupL /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -436,7 +436,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -476,7 +476,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -568,7 +568,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -611,7 +611,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -654,7 +654,7 @@ public virtual Response Update(ETag ifMatch, ApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -683,7 +683,7 @@ public virtual AsyncPageable GetProductApisAsync(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -712,7 +712,7 @@ public virtual Pageable GetProductApis(string filter = null, int /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -751,7 +751,7 @@ public virtual async Task> CheckProductApiEntityExistsAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -790,7 +790,7 @@ public virtual Response CheckProductApiEntityExists(string apiId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -829,7 +829,7 @@ public virtual async Task> CreateOrUpdateProductApiAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -868,7 +868,7 @@ public virtual Response CreateOrUpdateProductApi(string apiId, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -907,7 +907,7 @@ public virtual async Task DeleteProductApiAsync(string apiId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -946,7 +946,7 @@ public virtual Response DeleteProductApi(string apiId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -975,7 +975,7 @@ public virtual AsyncPageable GetProductGroupsAsync(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1004,7 +1004,7 @@ public virtual Pageable GetProductGroups(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1043,7 +1043,7 @@ public virtual async Task> CheckProductGroupEntityExistsAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1082,7 +1082,7 @@ public virtual Response CheckProductGroupEntityExists(string groupId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1121,7 +1121,7 @@ public virtual async Task> CreateOrUpdateProductGroup /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1160,7 +1160,7 @@ public virtual Response CreateOrUpdateProductGroup(string grou /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1199,7 +1199,7 @@ public virtual async Task DeleteProductGroupAsync(string groupId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1238,7 +1238,7 @@ public virtual Response DeleteProductGroup(string groupId, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1276,7 +1276,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs index 2804eef73197..ba7615d97688 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.Serialization.cs index 0c759c0b239c..f3da90a4f2b9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementProductTagResource : IJsonModel { + private static TagContractData s_dataDeserializationInstance; + private static TagContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs index c4fbc731c81f..eccb79be32bb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementProductTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByProductAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs index f31e5977f0a3..5bb692154705 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string serviceName, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.Serialization.cs index b6232bbaa5a3..90dc112a1ad1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementServiceResource : IJsonModel { + private static ApiManagementServiceData s_dataDeserializationInstance; + private static ApiManagementServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs index e38a60add2d2..8efeb0455707 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementServiceResource.cs @@ -38,6 +38,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ClientDiagnostics _apiManagementServiceClientDiagnostics; private readonly ApiManagementServiceRestOperations _apiManagementServiceRestClient; + private readonly ClientDiagnostics _allPoliciesClientDiagnostics; + private readonly AllPoliciesRestOperations _allPoliciesRestClient; private readonly ClientDiagnostics _apiClientDiagnostics; private readonly ApiRestOperations _apiRestClient; private readonly ClientDiagnostics _defaultClientDiagnostics; @@ -54,6 +56,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly OutboundNetworkDependenciesEndpointsRestOperations _outboundNetworkDependenciesEndpointsRestClient; private readonly ClientDiagnostics _policyDescriptionClientDiagnostics; private readonly PolicyDescriptionRestOperations _policyDescriptionRestClient; + private readonly ClientDiagnostics _policyRestrictionValidationsClientDiagnostics; + private readonly PolicyRestrictionValidationsRestOperations _policyRestrictionValidationsRestClient; private readonly ClientDiagnostics _apiManagementServicePortalSettingsClientDiagnostics; private readonly PortalSettingsRestOperations _apiManagementServicePortalSettingsRestClient; private readonly ClientDiagnostics _apiManagementProductProductClientDiagnostics; @@ -97,6 +101,8 @@ internal ApiManagementServiceResource(ArmClient client, ResourceIdentifier id) : _apiManagementServiceClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string apiManagementServiceApiVersion); _apiManagementServiceRestClient = new ApiManagementServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiManagementServiceApiVersion); + _allPoliciesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _allPoliciesRestClient = new AllPoliciesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _apiClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiResource.ResourceType.Namespace, Diagnostics); TryGetApiVersion(ApiResource.ResourceType, out string apiApiVersion); _apiRestClient = new ApiRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiApiVersion); @@ -114,6 +120,8 @@ internal ApiManagementServiceResource(ArmClient client, ResourceIdentifier id) : _outboundNetworkDependenciesEndpointsRestClient = new OutboundNetworkDependenciesEndpointsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _policyDescriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); _policyDescriptionRestClient = new PolicyDescriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _policyRestrictionValidationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _policyRestrictionValidationsRestClient = new PolicyRestrictionValidationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _apiManagementServicePortalSettingsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string apiManagementServicePortalSettingsApiVersion); _apiManagementServicePortalSettingsRestClient = new PortalSettingsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiManagementServicePortalSettingsApiVersion); @@ -178,7 +186,7 @@ public virtual ApiCollection GetApis() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +217,7 @@ public virtual async Task> GetApiAsync(string apiId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -247,7 +255,7 @@ public virtual ApiManagementPolicyCollection GetApiManagementPolicies() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -277,7 +285,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -314,7 +322,7 @@ public virtual ApiManagementTagCollection GetApiManagementTags() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -345,7 +353,7 @@ public virtual async Task> GetApiManagementTa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -383,7 +391,7 @@ public virtual ApiManagementDiagnosticCollection GetApiManagementDiagnostics() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -414,7 +422,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -452,7 +460,7 @@ public virtual ApiManagementIssueCollection GetApiManagementIssues() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -483,7 +491,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -521,7 +529,7 @@ public virtual ApiVersionSetCollection GetApiVersionSets() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -552,7 +560,7 @@ public virtual async Task> GetApiVersionSetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -590,7 +598,7 @@ public virtual AuthorizationProviderContractCollection GetAuthorizationProviderC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -621,7 +629,7 @@ public virtual async Task> GetAu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -659,7 +667,7 @@ public virtual ApiManagementAuthorizationServerCollection GetApiManagementAuthor /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -690,7 +698,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -728,7 +736,7 @@ public virtual ApiManagementBackendCollection GetApiManagementBackends() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -759,7 +767,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -797,7 +805,7 @@ public virtual ApiManagementCacheCollection GetApiManagementCaches() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -828,7 +836,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -866,7 +874,7 @@ public virtual ApiManagementCertificateCollection GetApiManagementCertificates() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -897,7 +905,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -935,7 +943,7 @@ public virtual DocumentationContractCollection GetDocumentationContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -966,7 +974,7 @@ public virtual async Task> GetDocumentat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1004,7 +1012,7 @@ public virtual ApiManagementEmailTemplateCollection GetApiManagementEmailTemplat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1033,7 +1041,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1069,7 +1077,7 @@ public virtual ApiManagementGatewayCollection GetApiManagementGateways() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1100,7 +1108,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1138,7 +1146,7 @@ public virtual ApiManagementGroupCollection GetApiManagementGroups() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1169,7 +1177,7 @@ public virtual async Task> GetApiManagement /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1207,7 +1215,7 @@ public virtual ApiManagementIdentityProviderCollection GetApiManagementIdentityP /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1236,7 +1244,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1272,7 +1280,7 @@ public virtual ApiManagementLoggerCollection GetApiManagementLoggers() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1303,7 +1311,7 @@ public virtual async Task> GetApiManagemen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1341,7 +1349,7 @@ public virtual ApiManagementNamedValueCollection GetApiManagementNamedValues() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1372,7 +1380,7 @@ public virtual async Task> GetApiManag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1410,7 +1418,7 @@ public virtual ApiManagementNotificationCollection GetApiManagementNotifications /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1439,7 +1447,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1475,7 +1483,7 @@ public virtual ApiManagementOpenIdConnectProviderCollection GetApiManagementOpen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1506,7 +1514,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1544,7 +1552,7 @@ public virtual PolicyFragmentContractCollection GetPolicyFragmentContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1576,7 +1584,7 @@ public virtual async Task> GetPolicyFra /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1595,6 +1603,75 @@ public virtual Response GetPolicyFragmentContrac return GetPolicyFragmentContracts().Get(id, format, cancellationToken); } + /// Gets a collection of PolicyRestrictionContractResources in the ApiManagementService. + /// An object representing collection of PolicyRestrictionContractResources and their operations over a PolicyRestrictionContractResource. + public virtual PolicyRestrictionContractCollection GetPolicyRestrictionContracts() + { + return GetCachedClient(client => new PolicyRestrictionContractCollection(client, Id)); + } + + /// + /// Get the policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPolicyRestrictionContractAsync(string policyRestrictionId, CancellationToken cancellationToken = default) + { + return await GetPolicyRestrictionContracts().GetAsync(policyRestrictionId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get the policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPolicyRestrictionContract(string policyRestrictionId, CancellationToken cancellationToken = default) + { + return GetPolicyRestrictionContracts().Get(policyRestrictionId, cancellationToken); + } + /// Gets a collection of PortalConfigContractResources in the ApiManagementService. /// An object representing collection of PortalConfigContractResources and their operations over a PortalConfigContractResource. public virtual PortalConfigContractCollection GetPortalConfigContracts() @@ -1615,7 +1692,7 @@ public virtual PortalConfigContractCollection GetPortalConfigContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1646,7 +1723,7 @@ public virtual async Task> GetPortalConfi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1684,7 +1761,7 @@ public virtual ApiManagementPortalRevisionCollection GetApiManagementPortalRevis /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1715,7 +1792,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1774,7 +1851,7 @@ public virtual ApiManagementPrivateEndpointConnectionCollection GetApiManagement /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1805,7 +1882,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1843,7 +1920,7 @@ public virtual ApiManagementPrivateLinkResourceCollection GetApiManagementPrivat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1874,7 +1951,7 @@ public virtual async Task> GetApiMana /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1912,7 +1989,7 @@ public virtual ApiManagementProductCollection GetApiManagementProducts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1943,7 +2020,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1981,7 +2058,7 @@ public virtual ApiManagementGlobalSchemaCollection GetApiManagementGlobalSchemas /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2012,7 +2089,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2050,7 +2127,7 @@ public virtual ApiManagementTenantSettingCollection GetApiManagementTenantSettin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2079,7 +2156,7 @@ public virtual async Task> GetApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2115,7 +2192,7 @@ public virtual ApiManagementSubscriptionCollection GetApiManagementSubscriptions /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2146,7 +2223,7 @@ public virtual async Task> GetApiMan /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2184,7 +2261,7 @@ public virtual TenantAccessInfoCollection GetTenantAccessInfos() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2213,7 +2290,7 @@ public virtual async Task> GetTenantAccessInf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2249,7 +2326,7 @@ public virtual ApiManagementUserCollection GetApiManagementUsers() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2280,7 +2357,7 @@ public virtual async Task> GetApiManagementU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2298,6 +2375,75 @@ public virtual Response GetApiManagementUser(string u return GetApiManagementUsers().Get(userId, cancellationToken); } + /// Gets a collection of ApiManagementWorkspaceLinksResources in the ApiManagementService. + /// An object representing collection of ApiManagementWorkspaceLinksResources and their operations over a ApiManagementWorkspaceLinksResource. + public virtual ApiManagementWorkspaceLinksCollection GetAllApiManagementWorkspaceLinks() + { + return GetCachedClient(client => new ApiManagementWorkspaceLinksCollection(client, Id)); + } + + /// + /// Gets an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetApiManagementWorkspaceLinksAsync(string workspaceId, CancellationToken cancellationToken = default) + { + return await GetAllApiManagementWorkspaceLinks().GetAsync(workspaceId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetApiManagementWorkspaceLinks(string workspaceId, CancellationToken cancellationToken = default) + { + return GetAllApiManagementWorkspaceLinks().Get(workspaceId, cancellationToken); + } + /// Gets a collection of WorkspaceContractResources in the ApiManagementService. /// An object representing collection of WorkspaceContractResources and their operations over a WorkspaceContractResource. public virtual WorkspaceContractCollection GetWorkspaceContracts() @@ -2318,7 +2464,7 @@ public virtual WorkspaceContractCollection GetWorkspaceContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2349,7 +2495,7 @@ public virtual async Task> GetWorkspaceContr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2380,7 +2526,7 @@ public virtual Response GetWorkspaceContract(string w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2420,7 +2566,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2460,7 +2606,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2502,7 +2648,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2544,7 +2690,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2590,7 +2736,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2623,6 +2769,58 @@ public virtual ArmOperation Update(WaitUntil waitU } } + /// + /// Status of all policies of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies + /// + /// + /// Operation Id + /// AllPolicies_ListByService + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllPoliciesByServiceAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _allPoliciesRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _allPoliciesRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => AllPoliciesContract.DeserializeAllPoliciesContract(e), _allPoliciesClientDiagnostics, Pipeline, "ApiManagementServiceResource.GetAllPoliciesByService", "value", "nextLink", cancellationToken); + } + + /// + /// Status of all policies of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/allPolicies + /// + /// + /// Operation Id + /// AllPolicies_ListByService + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAllPoliciesByService(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _allPoliciesRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _allPoliciesRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => AllPoliciesContract.DeserializeAllPoliciesContract(e), _allPoliciesClientDiagnostics, Pipeline, "ApiManagementServiceResource.GetAllPoliciesByService", "value", "nextLink", cancellationToken); + } + /// /// Lists a collection of apis associated with tags. /// @@ -2636,7 +2834,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2670,7 +2868,7 @@ public virtual AsyncPageable GetApisByTagsAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2704,7 +2902,7 @@ public virtual Pageable GetApisByTags(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2746,7 +2944,7 @@ public virtual async Task> PerformConnecti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2788,7 +2986,7 @@ public virtual ArmOperation PerformConnectivityCheckAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2814,7 +3012,7 @@ public virtual AsyncPageable GetContentTypesAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2840,7 +3038,7 @@ public virtual Pageable GetContentTypes(CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2879,7 +3077,7 @@ public virtual async Task> GetContentTypeAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2918,7 +3116,7 @@ public virtual Response GetContentType(string contentT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2958,7 +3156,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2998,7 +3196,7 @@ public virtual Response CreateOrUpdateContentType(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3038,7 +3236,7 @@ public virtual async Task DeleteContentTypeAsync(string contentTypeId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3078,7 +3276,7 @@ public virtual Response DeleteContentType(string contentTypeId, ETag ifMatch, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3109,7 +3307,7 @@ public virtual AsyncPageable GetContentItemsAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3140,7 +3338,7 @@ public virtual Pageable GetContentItems(string content /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3181,7 +3379,7 @@ public virtual async Task> GetContentItemEntityTagAsync(string co /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3222,7 +3420,7 @@ public virtual Response GetContentItemEntityTag(string contentTypeId, stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3263,7 +3461,7 @@ public virtual async Task> GetContentItemAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3304,7 +3502,7 @@ public virtual Response GetContentItem(string contentT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3346,7 +3544,7 @@ public virtual async Task> CreateOrUpdateCont /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3388,7 +3586,7 @@ public virtual Response CreateOrUpdateContentItem(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3430,7 +3628,7 @@ public virtual async Task DeleteContentItemAsync(string contentTypeId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3472,7 +3670,7 @@ public virtual Response DeleteContentItem(string contentTypeId, string contentIt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3498,7 +3696,7 @@ public virtual AsyncPageable GetAvailabl /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3524,7 +3722,7 @@ public virtual Pageable GetAvailableApiM /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3570,7 +3768,7 @@ public virtual async Task> RestoreAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3616,7 +3814,7 @@ public virtual ArmOperation Restore(WaitUntil wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3662,7 +3860,7 @@ public virtual async Task> BackupAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3708,7 +3906,7 @@ public virtual ArmOperation Backup(WaitUntil waitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3751,7 +3949,7 @@ public virtual async Task> MigrateToS /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3794,7 +3992,7 @@ public virtual ArmOperation MigrateToStv2(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3832,7 +4030,7 @@ public virtual async Task> GetSs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3870,7 +4068,7 @@ public virtual Response GetSsoToken(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3913,7 +4111,7 @@ public virtual async Task> ApplyNetwo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -3956,7 +4154,7 @@ public virtual ArmOperation ApplyNetworkConfigurat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -3981,7 +4179,7 @@ public virtual AsyncPageable GetNetworkStatus /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4006,7 +4204,7 @@ public virtual Pageable GetNetworkStatuses(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4041,7 +4239,7 @@ public virtual async Task> GetNetworkStatusByLoc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4076,7 +4274,7 @@ public virtual Response GetNetworkStatusByLocation(AzureL /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4101,7 +4299,7 @@ public virtual AsyncPageable GetOutboundNetworkDepe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4126,7 +4324,7 @@ public virtual Pageable GetOutboundNetworkDependenc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4152,7 +4350,7 @@ public virtual AsyncPageable GetPolicyDescription /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4165,6 +4363,82 @@ public virtual Pageable GetPolicyDescriptions(Pol return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => PolicyDescriptionContractData.DeserializePolicyDescriptionContractData(e), _policyDescriptionClientDiagnostics, Pipeline, "ApiManagementServiceResource.GetPolicyDescriptions", "value", null, cancellationToken); } + /// + /// Validate all policies of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies + /// + /// + /// Operation Id + /// PolicyRestrictionValidations_ByService + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ByServicePolicyRestrictionValidationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionValidationsClientDiagnostics.CreateScope("ApiManagementServiceResource.ByServicePolicyRestrictionValidation"); + scope.Start(); + try + { + var response = await _policyRestrictionValidationsRestClient.ByServiceAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ApiManagementArmOperation(new GitOperationResultContractDataOperationSource(), _policyRestrictionValidationsClientDiagnostics, Pipeline, _policyRestrictionValidationsRestClient.CreateByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Validate all policies of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/validatePolicies + /// + /// + /// Operation Id + /// PolicyRestrictionValidations_ByService + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation ByServicePolicyRestrictionValidation(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionValidationsClientDiagnostics.CreateScope("ApiManagementServiceResource.ByServicePolicyRestrictionValidation"); + scope.Start(); + try + { + var response = _policyRestrictionValidationsRestClient.ByService(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ApiManagementArmOperation(new GitOperationResultContractDataOperationSource(), _policyRestrictionValidationsClientDiagnostics, Pipeline, _policyRestrictionValidationsRestClient.CreateByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Lists a collection of portalsettings defined within a service instance.. /// @@ -4178,7 +4452,7 @@ public virtual Pageable GetPolicyDescriptions(Pol /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -4207,7 +4481,7 @@ public virtual AsyncPageable GetPortalSettingsAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -4236,7 +4510,7 @@ public virtual Pageable GetPortalSettings(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -4270,7 +4544,7 @@ public virtual AsyncPageable GetProductsByTagsAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -4304,7 +4578,7 @@ public virtual Pageable GetProductsByTags(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4334,7 +4608,7 @@ public virtual AsyncPageable GetQuotaByCounterKeysAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4364,7 +4638,7 @@ public virtual Pageable GetQuotaByCounterKeys(string quota /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4396,7 +4670,7 @@ public virtual AsyncPageable UpdateQuotaByCounterKeysAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4428,7 +4702,7 @@ public virtual Pageable UpdateQuotaByCounterKeys(string qu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4469,7 +4743,7 @@ public virtual async Task> GetQuotaByPeriodKeyAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4510,7 +4784,7 @@ public virtual Response GetQuotaByPeriodKey(string quotaCo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4553,7 +4827,7 @@ public virtual async Task> UpdateQuotaByPeriodKey /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4596,7 +4870,7 @@ public virtual Response UpdateQuotaByPeriodKey(string quot /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4622,7 +4896,7 @@ public virtual AsyncPageable GetRegionsAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4648,7 +4922,7 @@ public virtual Pageable GetRegions(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4681,7 +4955,7 @@ public virtual AsyncPageable GetReportsByApiAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4714,7 +4988,7 @@ public virtual Pageable GetReportsByApi(string filter, int /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4747,7 +5021,7 @@ public virtual AsyncPageable GetReportsByUserAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4780,7 +5054,7 @@ public virtual Pageable GetReportsByUser(string filter, in /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4813,7 +5087,7 @@ public virtual AsyncPageable GetReportsByOperationAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4846,7 +5120,7 @@ public virtual Pageable GetReportsByOperation(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4879,7 +5153,7 @@ public virtual AsyncPageable GetReportsByProductAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4912,7 +5186,7 @@ public virtual Pageable GetReportsByProduct(string filter, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4944,7 +5218,7 @@ public virtual AsyncPageable GetReportsByGeoAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -4976,7 +5250,7 @@ public virtual Pageable GetReportsByGeo(string filter, int /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5009,7 +5283,7 @@ public virtual AsyncPageable GetReportsBySubscriptionAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5042,7 +5316,7 @@ public virtual Pageable GetReportsBySubscription(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5076,7 +5350,7 @@ public virtual AsyncPageable GetReportsByTimeAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5110,7 +5384,7 @@ public virtual Pageable GetReportsByTime(string filter, Ti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5141,7 +5415,7 @@ public virtual AsyncPageable GetReportsByRequestAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5172,7 +5446,7 @@ public virtual Pageable GetReportsByRequest(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5201,7 +5475,7 @@ public virtual AsyncPageable GetTagResourcesAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5230,7 +5504,7 @@ public virtual Pageable GetTagResources(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5273,7 +5547,7 @@ public virtual async Task> DeployTe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5316,7 +5590,7 @@ public virtual ArmOperation DeployTenantConfigur /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5359,7 +5633,7 @@ public virtual async Task> SaveTena /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5402,7 +5676,7 @@ public virtual ArmOperation SaveTenantConfigurat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5445,7 +5719,7 @@ public virtual async Task> Validate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5488,7 +5762,7 @@ public virtual ArmOperation ValidateTenantConfig /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5523,7 +5797,7 @@ public virtual async Task> GetTen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -5558,7 +5832,7 @@ public virtual Response GetTenantConfigura /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -5620,7 +5894,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -5682,7 +5956,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -5739,7 +6013,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -5796,7 +6070,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -5856,7 +6130,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs index 5d5b1941296e..a9b46e942434 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Response Get(string sid, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -423,7 +423,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -468,7 +468,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.Serialization.cs index 5dd88d00c3bc..b3ebff5c0331 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementSubscriptionResource : IJsonModel { + private static SubscriptionContractData s_dataDeserializationInstance; + private static SubscriptionContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); SubscriptionContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs index c443efce9db6..7cdedc1a1dd7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -446,7 +446,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -560,7 +560,7 @@ public virtual async Task> GetSecretsAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -598,7 +598,7 @@ public virtual Response GetSecrets(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs index 486bbba1acb9..8f90d93421ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string ta /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = null, i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.Serialization.cs index 616a35589521..9994d48305fe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementTagResource : IJsonModel { + private static TagContractData s_dataDeserializationInstance; + private static TagContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs index 0bb8e0b21517..a2547e9f8217 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTagResource.cs @@ -109,7 +109,7 @@ public virtual ServiceTagApiLinkCollection GetServiceTagApiLinks() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetServiceTagApiL /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual ServiceTagOperationLinkCollection GetServiceTagOperationLinks() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetServiceT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual ServiceTagProductLinkCollection GetServiceTagProductLinks() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual async Task> GetServiceTag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Response GetServiceTagProductLink( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -479,7 +479,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -522,7 +522,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual Response Update(ETag ifMatch, ApiManage /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual async Task> GetEntityStateAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs index 22f6fe4d58ef..67d083af97b6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(SettingsType set /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual async Task> ExistsAsync(SettingsType settingsType, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual Response Exists(SettingsType settingsType, CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.Serialization.cs index 609700e9a7ac..7a02432a27f2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementTenantSettingResource : IJsonModel { + private static ApiManagementTenantSettingData s_dataDeserializationInstance; + private static ApiManagementTenantSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementTenantSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementTenantSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementTenantSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs index 22a22f4ad921..689e98c5844c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementTenantSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs index eebe3af94f71..4aa29c178d2a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(string u /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual Response Get(string userId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -329,7 +329,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -372,7 +372,7 @@ public virtual async Task> ExistsAsync(string userId, Cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -415,7 +415,7 @@ public virtual Response Exists(string userId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -460,7 +460,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.Serialization.cs index 691834c10e48..0a4cc069a163 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementUserResource : IJsonModel { + private static UserContractData s_dataDeserializationInstance; + private static UserContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - UserContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + UserContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); UserContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs index f29ac372322e..b53a22f22417 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserResource.cs @@ -122,7 +122,7 @@ public virtual ApiManagementUserSubscriptionCollection GetApiManagementUserSubsc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetAp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response GetApiManagementU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -285,9 +285,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if try { var response = await _apiManagementUserUserRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType, cancellationToken).ConfigureAwait(false); - var uri = _apiManagementUserUserRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ApiManagementArmOperation(response, rehydrationToken); + var operation = new ApiManagementArmOperation(_apiManagementUserUserClientDiagnostics, Pipeline, _apiManagementUserUserRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -312,7 +310,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -333,9 +331,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele try { var response = _apiManagementUserUserRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType, cancellationToken); - var uri = _apiManagementUserUserRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ApiManagementArmOperation(response, rehydrationToken); + var operation = new ApiManagementArmOperation(_apiManagementUserUserClientDiagnostics, Pipeline, _apiManagementUserUserRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteSubscriptions, notify, appType).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -360,7 +356,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -403,7 +399,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -446,7 +442,7 @@ public virtual Response Update(ETag ifMatch, ApiManag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -484,7 +480,7 @@ public virtual async Task> GenerateSsoUriAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -522,7 +518,7 @@ public virtual Response GenerateSsoUri(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -564,7 +560,7 @@ public virtual async Task> GetSharedAccessTokenAsync(U /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -606,7 +602,7 @@ public virtual Response GetSharedAccessToken(UserTokenContent c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -632,7 +628,7 @@ public virtual AsyncPageable GetUserIdentitiesAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -658,7 +654,7 @@ public virtual Pageable GetUserIdentities(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -693,7 +689,7 @@ public virtual async Task SendUserConfirmationPasswordAsync(AppType? a /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -728,7 +724,7 @@ public virtual Response SendUserConfirmationPassword(AppType? appType = null, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -766,7 +762,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs index c3e3be56742f..7194aacc1af5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string sid, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -220,7 +220,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.Serialization.cs index 94804999f357..a58cc6645b7b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiManagementUserSubscriptionResource : IJsonModel { + private static SubscriptionContractData s_dataDeserializationInstance; + private static SubscriptionContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); SubscriptionContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs index 8c3fd7d5ce54..6ff8af27f026 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementUserSubscriptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksCollection.cs new file mode 100644 index 000000000000..adfc1ab4d256 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksCollection.cs @@ -0,0 +1,400 @@ +// 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.ApiManagement +{ + /// + /// 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 GetApiManagementWorkspaceLinks method from an instance of . + /// + public partial class ApiManagementWorkspaceLinksCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics; + private readonly ApiManagementWorkspaceLinkRestOperations _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient; + private readonly ClientDiagnostics _apiManagementWorkspaceLinksApiManagementWorkspaceLinksClientDiagnostics; + private readonly ApiManagementWorkspaceLinksRestOperations _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient; + + /// Initializes a new instance of the class for mocking. + protected ApiManagementWorkspaceLinksCollection() + { + } + + /// 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 ApiManagementWorkspaceLinksCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiManagementWorkspaceLinksResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiManagementWorkspaceLinksResource.ResourceType, out string apiManagementWorkspaceLinksApiManagementWorkspaceLinkApiVersion); + _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient = new ApiManagementWorkspaceLinkRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiManagementWorkspaceLinksApiManagementWorkspaceLinkApiVersion); + _apiManagementWorkspaceLinksApiManagementWorkspaceLinksClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiManagementWorkspaceLinksResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ApiManagementWorkspaceLinksResource.ResourceType, out string apiManagementWorkspaceLinksApiManagementWorkspaceLinksApiVersion); + _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient = new ApiManagementWorkspaceLinksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiManagementWorkspaceLinksApiManagementWorkspaceLinksApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Gets an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service 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 workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.Get"); + scope.Start(); + try + { + var response = await _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiManagementWorkspaceLinksResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.Get"); + scope.Start(); + try + { + var response = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiManagementWorkspaceLinksResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List all API Management workspaceLinks for a service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLinks_ListByService + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApiManagementWorkspaceLinksResource(Client, ApiManagementWorkspaceLinksData.DeserializeApiManagementWorkspaceLinksData(e)), _apiManagementWorkspaceLinksApiManagementWorkspaceLinksClientDiagnostics, Pipeline, "ApiManagementWorkspaceLinksCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List all API Management workspaceLinks for a service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLinks_ListByService + /// + /// + /// Default Api Version + /// 2024-05-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) => _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _apiManagementWorkspaceLinksApiManagementWorkspaceLinksRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApiManagementWorkspaceLinksResource(Client, ApiManagementWorkspaceLinksData.DeserializeApiManagementWorkspaceLinksData(e)), _apiManagementWorkspaceLinksApiManagementWorkspaceLinksClientDiagnostics, Pipeline, "ApiManagementWorkspaceLinksCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service 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 workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.Exists"); + scope.Start(); + try + { + var response = await _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, 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.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.Exists"); + scope.Start(); + try + { + var response = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, 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.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service 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 workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiManagementWorkspaceLinksResource(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.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Workspace identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksCollection.GetIfExists"); + scope.Start(); + try + { + var response = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, workspaceId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ApiManagementWorkspaceLinksResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.Serialization.cs new file mode 100644 index 000000000000..fcb6df077757 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.Serialization.cs @@ -0,0 +1,340 @@ +// Copyright (c) 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.Models; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class ApiManagementWorkspaceLinksData : 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(ApiManagementWorkspaceLinksData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(WorkspaceId)) + { + writer.WritePropertyName("workspaceId"u8); + writer.WriteStringValue(WorkspaceId); + } + if (Optional.IsCollectionDefined(Gateways)) + { + writer.WritePropertyName("gateways"u8); + writer.WriteStartArray(); + foreach (var item in Gateways) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + ApiManagementWorkspaceLinksData 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(ApiManagementWorkspaceLinksData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementWorkspaceLinksData(document.RootElement, options); + } + + internal static ApiManagementWorkspaceLinksData DeserializeApiManagementWorkspaceLinksData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ETag? etag = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier workspaceId = default; + IList gateways = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("workspaceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + workspaceId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("gateways"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + gateways = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementWorkspaceLinksData( + id, + name, + type, + systemData, + etag, + workspaceId, + gateways ?? 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(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(WorkspaceId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" workspaceId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(WorkspaceId)) + { + builder.Append(" workspaceId: "); + builder.AppendLine($"'{WorkspaceId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Gateways), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" gateways: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Gateways)) + { + if (Gateways.Any()) + { + builder.Append(" gateways: "); + builder.AppendLine("["); + foreach (var item in Gateways) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " gateways: "); + } + builder.AppendLine(" ]"); + } + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementWorkspaceLinksData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementWorkspaceLinksData 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 DeserializeApiManagementWorkspaceLinksData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementWorkspaceLinksData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.cs new file mode 100644 index 000000000000..b4bf53706f1d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksData.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.Resources.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the ApiManagementWorkspaceLinks data model. + /// A single API Management WorkspaceLinks in List or Get response. + /// + public partial class ApiManagementWorkspaceLinksData : 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 ApiManagementWorkspaceLinksData() + { + Gateways = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the resource. + /// The link to the API Management service workspace. + /// The array of linked gateways. + /// Keeps track of any properties unknown to the library. + internal ApiManagementWorkspaceLinksData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? etag, ResourceIdentifier workspaceId, IList gateways, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ETag = etag; + WorkspaceId = workspaceId; + Gateways = gateways; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// ETag of the resource. + [WirePath("etag")] + public ETag? ETag { get; } + /// The link to the API Management service workspace. + [WirePath("properties.workspaceId")] + public ResourceIdentifier WorkspaceId { get; set; } + /// The array of linked gateways. + [WirePath("properties.gateways")] + public IList Gateways { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.Serialization.cs new file mode 100644 index 000000000000..19999e5b82da --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.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.ApiManagement +{ + public partial class ApiManagementWorkspaceLinksResource : IJsonModel + { + private static ApiManagementWorkspaceLinksData s_dataDeserializationInstance; + private static ApiManagementWorkspaceLinksData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiManagementWorkspaceLinksData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiManagementWorkspaceLinksData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.cs new file mode 100644 index 000000000000..a398e92cba64 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiManagementWorkspaceLinksResource.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.ApiManagement +{ + /// + /// A Class representing an ApiManagementWorkspaceLinks 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 GetApiManagementWorkspaceLinksResource method. + /// Otherwise you can get one from its parent resource using the GetApiManagementWorkspaceLinks method. + /// + public partial class ApiManagementWorkspaceLinksResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics; + private readonly ApiManagementWorkspaceLinkRestOperations _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient; + private readonly ApiManagementWorkspaceLinksData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaceLinks"; + + /// Initializes a new instance of the class for mocking. + protected ApiManagementWorkspaceLinksResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ApiManagementWorkspaceLinksResource(ArmClient client, ApiManagementWorkspaceLinksData 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 ApiManagementWorkspaceLinksResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string apiManagementWorkspaceLinksApiManagementWorkspaceLinkApiVersion); + _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient = new ApiManagementWorkspaceLinkRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, apiManagementWorkspaceLinksApiManagementWorkspaceLinkApiVersion); +#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 ApiManagementWorkspaceLinksData 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 an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksResource.Get"); + scope.Start(); + try + { + var response = await _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.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 ApiManagementWorkspaceLinksResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets an API Management WorkspaceLink resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaceLinks/{workspaceId} + /// + /// + /// Operation Id + /// ApiManagementWorkspaceLink_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkClientDiagnostics.CreateScope("ApiManagementWorkspaceLinksResource.Get"); + scope.Start(); + try + { + var response = _apiManagementWorkspaceLinksApiManagementWorkspaceLinkRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ApiManagementWorkspaceLinksResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs index e5fec8c6047b..775f436b83bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string operat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string operationId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filter = n /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string operationId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string operationId, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs index b7483b923711..847f447bf85b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyN /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, Pol /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.Serialization.cs index 74b6858be7fb..1414030f8c38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiOperationPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs index 53fb1704a6f8..6ff6f37a65ac 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(PolicyE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportFormat? form /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.Serialization.cs index 99c4dad3978d..e540938537c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiOperationResource : IJsonModel { + private static ApiOperationData s_dataDeserializationInstance; + private static ApiOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs index f8ed4e5f645a..0e7d2a4587bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationResource.cs @@ -110,7 +110,7 @@ public virtual ApiOperationPolicyCollection GetApiOperationPolicies() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetApiOperationP /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ApiOperationTagCollection GetApiOperationTags() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetApiOperationTagA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response GetApiOperationTag(string tagId /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> UpdateAsync(ETag ifMat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual Response Update(ETag ifMatch, ApiOperationP /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs index ef69f0f287af..d6d7b7b2ca6c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, in /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.Serialization.cs index 31cd640006a1..819d49438bfd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiOperationTagResource : IJsonModel { + private static TagContractData s_dataDeserializationInstance; + private static TagContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs index 2fd1af164fef..827be1ca11f0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiOperationTagResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetEntityStateByOperationAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs index 17c8c51c0a8f..cbdfec832e6f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(PolicyName polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, PolicyExport /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.Serialization.cs index 82a295a032a6..8b12dd67a136 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs index 86bc5e0c4fad..81ed9c25a1b6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(PolicyExportForm /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportFormat? format = null /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs index caa922511499..3d59959c9b32 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string releaseI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string releaseId, CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = nul /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? to /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string releaseId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string releaseId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.Serialization.cs index dc64f9688556..7201701c28e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiReleaseResource : IJsonModel { + private static ApiReleaseData s_dataDeserializationInstance; + private static ApiReleaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiReleaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiReleaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiReleaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs index 708e81bcffde..7eb312876c24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiReleaseResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiReleaseData /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.Serialization.cs index a1fbde09a577..185db1443a5b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiResource : IJsonModel { + private static ApiData s_dataDeserializationInstance; + private static ApiData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs index 5cedb80435d3..a3b03c0f115f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiResource.cs @@ -122,7 +122,7 @@ public virtual ApiReleaseCollection GetApiReleases() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetApiReleaseAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual ApiOperationCollection GetApiOperations() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetApiOperationAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -260,7 +260,7 @@ public virtual ApiPolicyCollection GetApiPolicies() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual async Task> GetApiPolicyAsync(PolicyN /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual ApiTagCollection GetApiTags() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual async Task> GetApiTagAsync(string tagId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual ResolverContractCollection GetResolverContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual async Task> GetResolverContrac /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual ApiSchemaCollection GetApiSchemas() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -496,7 +496,7 @@ public virtual async Task> GetApiSchemaAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -534,7 +534,7 @@ public virtual ApiDiagnosticCollection GetApiDiagnostics() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual async Task> GetApiDiagnosticAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -603,7 +603,7 @@ public virtual ApiIssueCollection GetApiIssues() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual async Task> GetApiIssueAsync(string is /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual ApiTagDescriptionCollection GetApiTagDescriptions() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -705,7 +705,7 @@ public virtual async Task> GetApiTagDescript /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -743,7 +743,7 @@ public virtual ServiceApiWikiResource GetServiceApiWiki() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -783,7 +783,7 @@ public virtual async Task> GetAsync(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -823,7 +823,7 @@ public virtual Response Get(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -842,9 +842,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if try { var response = await _apiRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions, cancellationToken).ConfigureAwait(false); - var uri = _apiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ApiManagementArmOperation(response, rehydrationToken); + var operation = new ApiManagementArmOperation(_apiClientDiagnostics, Pipeline, _apiRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -869,7 +867,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -888,9 +886,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele try { var response = _apiRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions, cancellationToken); - var uri = _apiRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions); - var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); - var operation = new ApiManagementArmOperation(response, rehydrationToken); + var operation = new ApiManagementArmOperation(_apiClientDiagnostics, Pipeline, _apiRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, deleteRevisions).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -915,7 +911,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -958,7 +954,7 @@ public virtual async Task> UpdateAsync(ETag ifMatch, ApiPa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1001,7 +997,7 @@ public virtual Response Update(ETag ifMatch, ApiPatch patch, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1030,7 +1026,7 @@ public virtual AsyncPageable GetApiRevisionsByServiceAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1059,7 +1055,7 @@ public virtual Pageable GetApiRevisionsByService(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1089,7 +1085,7 @@ public virtual AsyncPageable GetOperationsByTagsAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -1119,7 +1115,7 @@ public virtual Pageable GetOperationsByTags(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1157,7 +1153,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs index af91d72714c1..872a47739d28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string schemaId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter = null, int? top /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs index 4b778df4e71d..cc7f90aea68d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.Serialization.cs @@ -44,6 +44,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("contentType"u8); writer.WriteStringValue(ContentType); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WritePropertyName("document"u8); writer.WriteStartObject(); if (Optional.IsDefined(Value)) @@ -104,6 +109,7 @@ internal static ApiSchemaData DeserializeApiSchemaData(JsonElement element, Mode ResourceType type = default; SystemData systemData = default; string contentType = default; + string provisioningState = default; string value = default; BinaryData definitions = default; BinaryData components = default; @@ -149,6 +155,11 @@ internal static ApiSchemaData DeserializeApiSchemaData(JsonElement element, Mode contentType = property0.Value.GetString(); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } if (property0.NameEquals("document"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -199,6 +210,7 @@ internal static ApiSchemaData DeserializeApiSchemaData(JsonElement element, Mode type, systemData, contentType, + provisioningState, value, definitions, components, @@ -294,6 +306,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.Append(" document:"); builder.AppendLine(" {"); hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs index 371d9c722e8f..2ce2d59e8bbd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaData.cs @@ -60,23 +60,28 @@ public ApiSchemaData() /// The name. /// The resourceType. /// The systemData. - /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`. + /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema` </br> - `gRPC Schema` use `text/protobuf`. + /// The provisioning state. /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. /// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. /// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. /// Keeps track of any properties unknown to the library. - internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string contentType, string value, BinaryData definitions, BinaryData components, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ApiSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string contentType, string provisioningState, string value, BinaryData definitions, BinaryData components, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ContentType = contentType; + ProvisioningState = provisioningState; Value = value; Definitions = definitions; Components = components; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`. + /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema` </br> - `gRPC Schema` use `text/protobuf`. [WirePath("properties.contentType")] public string ContentType { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. [WirePath("properties.value")] public string Value { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.Serialization.cs index a4c04cb60595..ba38dfd01cfd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiSchemaResource : IJsonModel { + private static ApiSchemaData s_dataDeserializationInstance; + private static ApiSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs index 648c835da45b..5e28f1c9eef4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiSchemaResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? forc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, ApiSc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs index 1894c708ecf9..63986a9e436f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string tagId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string tagId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(string filter = null, i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string filter = null, int? top = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfExistsAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs index 62e21557592f..4f36cb2ea3a9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string t /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagDescriptionId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string tagDescriptionId, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string tagDescriptionId, CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.Serialization.cs index 078d7f368edf..368907e687f0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiTagDescriptionResource : IJsonModel { + private static ApiTagDescriptionData s_dataDeserializationInstance; + private static ApiTagDescriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiTagDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiTagDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiTagDescriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs index b7d4549066bc..1022d3f77998 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagDescriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.Serialization.cs index 8b3c2a9b58a0..17e2bdd50273 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiTagResource : IJsonModel { + private static TagContractData s_dataDeserializationInstance; + private static TagContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs index 4fd755c8184e..ee1a55a613e6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiTagResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(WaitUntil wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityStateByApiAsync(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs index cb7484b6c7e7..5fdf998a7459 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string versi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string versionSetId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, int? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string versionSetId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string versionSetId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.Serialization.cs index 1d5c7e3b25ff..f5bafdb3035d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ApiVersionSetResource : IJsonModel { + private static ApiVersionSetData s_dataDeserializationInstance; + private static ApiVersionSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiVersionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiVersionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiVersionSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs index a7811cba9c1b..a8864ac6671f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ApiVersionSetResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, ApiVersionSe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs index 39f642732f2d..9d7f9f0ba31b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ArmApiManagementModelFactory.cs @@ -12,12 +12,132 @@ using System.Net; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.ApiManagement.Models { /// Model factory for models. public static partial class ArmApiManagementModelFactory { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// SKU properties of the API Management gateway. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Information regarding how the gateway should be exposed. + /// Information regarding how the gateway should integrate with backend systems. + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + /// The type of VPN in which API Management gateway needs to be configured in. + /// A new instance for mocking. + public static ApiGatewayData ApiGatewayData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ApiManagementGatewaySkuProperties sku = null, ETag? etag = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, string frontendDefaultHostname = null, ResourceIdentifier subnetId = null, string configurationApiHostname = null, VirtualNetworkType? virtualNetworkType = null) + { + tags ??= new Dictionary(); + + return new ApiGatewayData( + id, + name, + resourceType, + systemData, + tags, + location, + sku, + etag, + provisioningState, + targetProvisioningState, + createdAtUtc, + frontendDefaultHostname != null ? new FrontendConfiguration(frontendDefaultHostname, serializedAdditionalRawData: null) : null, + subnetId != null ? new BackendConfiguration(ResourceManagerModelFactory.WritableSubResource(subnetId), serializedAdditionalRawData: null) : null, + configurationApiHostname != null ? new GatewayConfigurationApi(configurationApiHostname, serializedAdditionalRawData: null) : null, + virtualNetworkType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SKU properties of the API Management gateway. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Information regarding how the gateway should be exposed. + /// Information regarding how the gateway should integrate with backend systems. + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + /// The type of VPN in which API Management gateway needs to be configured in. + /// Resource tags. + /// A new instance for mocking. + public static ApiGatewayPatch ApiGatewayPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiManagementGatewaySkuPropertiesForPatch sku = null, ETag? etag = null, string provisioningState = null, string targetProvisioningState = null, DateTimeOffset? createdAtUtc = null, string frontendDefaultHostname = null, ResourceIdentifier subnetId = null, string configurationApiHostname = null, VirtualNetworkType? virtualNetworkType = null, IDictionary tags = null) + { + tags ??= new Dictionary(); + + return new ApiGatewayPatch( + id, + name, + resourceType, + systemData, + sku, + etag, + provisioningState, + targetProvisioningState, + createdAtUtc, + frontendDefaultHostname != null ? new FrontendConfiguration(frontendDefaultHostname, serializedAdditionalRawData: null) : null, + subnetId != null ? new BackendConfiguration(ResourceManagerModelFactory.WritableSubResource(subnetId), serializedAdditionalRawData: null) : null, + configurationApiHostname != null ? new GatewayConfigurationApi(configurationApiHostname, serializedAdditionalRawData: null) : null, + virtualNetworkType, + tags, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of resource the SKU applies to. + /// Specifies API Management gateway SKU. + /// Specifies the number of API Management gateway units. + /// A new instance for mocking. + public static GatewayResourceSkuResult GatewayResourceSkuResult(string resourceType = null, ApiGatewaySkuType? skuName = null, GatewaySkuCapacity capacity = null) + { + return new GatewayResourceSkuResult(resourceType, skuName != null ? new GatewaySku(skuName, serializedAdditionalRawData: null) : null, capacity, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The minimum capacity. + /// The maximum capacity that can be set. + /// The default capacity. + /// The scale type applicable to the sku. + /// A new instance for mocking. + public static GatewaySkuCapacity GatewaySkuCapacity(int? minimum = null, int? maximum = null, int? @default = null, GatewaySkuCapacityScaleType? scaleType = null) + { + return new GatewaySkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy Identifier. + /// Policy Restriction Compliance State. + /// A new instance for mocking. + public static AllPoliciesContract AllPoliciesContract(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ResourceIdentifier referencePolicyId = null, PolicyComplianceState? complianceState = null) + { + return new AllPoliciesContract( + id, + name, + resourceType, + systemData, + referencePolicyId, + complianceState, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -44,8 +164,9 @@ public static partial class ArmApiManagementModelFactory /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// A new instance for mocking. - public static ApiData ApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null) + public static ApiData ApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { protocols ??= new List(); @@ -75,6 +196,7 @@ public static ApiData ApiData(ResourceIdentifier id = null, string name = null, path, protocols?.ToList(), apiVersionSet, + provisioningState, serializedAdditionalRawData: null); } @@ -138,6 +260,7 @@ public static ApiEntityBaseContract ApiEntityBaseContract(string description = n /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// Content value when Importing an API. /// Format of the Content in which the API is getting imported. New formats can be added in the future. /// Criteria to limit import of WSDL to a subset of the document. @@ -151,7 +274,7 @@ public static ApiEntityBaseContract ApiEntityBaseContract(string description = n /// /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// A new instance for mocking. - public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = null) + public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null, string value = null, ContentFormat? format = null, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = null, SoapApiType? soapApiType = null, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct = null) { protocols ??= new List(); @@ -177,6 +300,7 @@ public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string descripti path, protocols?.ToList(), apiVersionSet, + provisioningState, value, format, wsdlSelector, @@ -431,12 +555,13 @@ public static ProductEntityBaseProperties ProductEntityBaseProperties(string des /// The name. /// The resourceType. /// The systemData. - /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema`. + /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml` </br> - `OData Schema` use `application/vnd.ms-azure-apim.odata.schema` </br> - `gRPC Schema` use `text/protobuf`. + /// The provisioning state. /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. /// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. /// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. /// A new instance for mocking. - public static ApiSchemaData ApiSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string contentType = null, string value = null, BinaryData definitions = null, BinaryData components = null) + public static ApiSchemaData ApiSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string contentType = null, string provisioningState = null, string value = null, BinaryData definitions = null, BinaryData components = null) { return new ApiSchemaData( id, @@ -444,6 +569,7 @@ public static ApiSchemaData ApiSchemaData(ResourceIdentifier id = null, string n resourceType, systemData, contentType, + provisioningState, value, definitions, components, @@ -811,16 +937,20 @@ public static AuthorizationLoginResult AuthorizationLoginResult(string loginLink /// The name. /// The resourceType. /// The systemData. + /// The allowed Azure Active Directory Application IDs. /// The Tenant Id. /// The Object Id. /// A new instance for mocking. - public static AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, Guid? tenantId = null, string objectId = null) + public static AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable appIds = null, Guid? tenantId = null, string objectId = null) { + appIds ??= new List(); + return new AuthorizationAccessPolicyContractData( id, name, resourceType, systemData, + appIds?.ToList(), tenantId, objectId, serializedAdditionalRawData: null); @@ -965,12 +1095,15 @@ public static AuthorizationServerSecretsContract AuthorizationServerSecretsContr /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Backend Circuit Breaker Configuration. + /// + /// Type of the backend. A backend can be either Single or Pool. /// Runtime Url of the Backend. /// Backend communication protocol. /// A new instance for mocking. - public static ApiManagementBackendData ApiManagementBackendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string title = null, string description = null, Uri resourceUri = null, BackendServiceFabricClusterProperties backendServiceFabricCluster = null, BackendCredentialsContract credentials = null, BackendProxyContract proxy = null, BackendTlsProperties tls = null, IEnumerable circuitBreakerRules = null, Uri uri = null, BackendProtocol? protocol = null) + public static ApiManagementBackendData ApiManagementBackendData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string title = null, string description = null, Uri resourceUri = null, BackendServiceFabricClusterProperties backendServiceFabricCluster = null, BackendCredentialsContract credentials = null, BackendProxyContract proxy = null, BackendTlsProperties tls = null, IEnumerable circuitBreakerRules = null, IEnumerable poolServices = null, BackendType? typePropertiesType = null, Uri uri = null, BackendProtocol? protocol = null) { circuitBreakerRules ??= new List(); + poolServices ??= new List(); return new ApiManagementBackendData( id, @@ -985,6 +1118,8 @@ public static ApiManagementBackendData ApiManagementBackendData(ResourceIdentifi proxy, tls, circuitBreakerRules != null ? new BackendCircuitBreaker(circuitBreakerRules?.ToList(), serializedAdditionalRawData: null) : null, + poolServices != null ? new BackendBaseParametersPool(poolServices?.ToList(), serializedAdditionalRawData: null) : null, + typePropertiesType, uri, protocol, serializedAdditionalRawData: null); @@ -1566,6 +1701,34 @@ public static ApiManagementEmailTemplateData ApiManagementEmailTemplateData(Reso serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway config connection. + /// The link to the API Management service workspace. + /// The default hostname of the data-plane gateway. + /// The hostnames of the data-plane gateway to which requests can be sent. + /// A new instance for mocking. + public static ApiGatewayConfigConnectionData ApiGatewayConfigConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, string provisioningState = null, ResourceIdentifier sourceId = null, string defaultHostname = null, IEnumerable hostnames = null) + { + hostnames ??= new List(); + + return new ApiGatewayConfigConnectionData( + id, + name, + resourceType, + systemData, + etag, + provisioningState, + sourceId, + defaultHostname, + hostnames?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1657,8 +1820,9 @@ public static ApiManagementGatewayHostnameConfigurationData ApiManagementGateway /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// A new instance for mocking. - public static GatewayApiData GatewayApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null) + public static GatewayApiData GatewayApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { protocols ??= new List(); @@ -1688,6 +1852,7 @@ public static GatewayApiData GatewayApiData(ResourceIdentifier id = null, string path, protocols?.ToList(), apiVersionSet, + provisioningState, serializedAdditionalRawData: null); } @@ -1996,8 +2161,9 @@ public static ApiManagementLoggerData ApiManagementLoggerData(ResourceIdentifier /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. /// KeyVault location details of the namedValue. + /// The provisioning state. /// A new instance for mocking. - public static ApiManagementNamedValueData ApiManagementNamedValueData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable tags = null, bool? isSecret = null, string displayName = null, string value = null, KeyVaultContractProperties keyVaultDetails = null) + public static ApiManagementNamedValueData ApiManagementNamedValueData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable tags = null, bool? isSecret = null, string displayName = null, string value = null, KeyVaultContractProperties keyVaultDetails = null, string provisioningState = null) { tags ??= new List(); @@ -2011,6 +2177,7 @@ public static ApiManagementNamedValueData ApiManagementNamedValueData(ResourceId displayName, value, keyVaultDetails, + provisioningState, serializedAdditionalRawData: null); } @@ -2246,8 +2413,9 @@ public static PolicyDescriptionContractData PolicyDescriptionContractData(Resour /// Contents of the policy fragment. /// Policy fragment description. /// Format of the policy fragment content. + /// The provisioning state. /// A new instance for mocking. - public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string description = null, PolicyFragmentContentFormat? format = null) + public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string value = null, string description = null, PolicyFragmentContentFormat? format = null, string provisioningState = null) { return new PolicyFragmentContractData( id, @@ -2257,6 +2425,7 @@ public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIden value, description, format, + provisioningState, serializedAdditionalRawData: null); } @@ -2271,6 +2440,74 @@ public static ResourceCollectionValueItem ResourceCollectionValueItem(ResourceId return new ResourceCollectionValueItem(id, name, resourceType, systemData, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Path to the policy document. + /// Indicates if base policy should be enforced for the policy document. + /// A new instance for mocking. + public static PolicyRestrictionContractData PolicyRestrictionContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string scope = null, PolicyRestrictionRequireBase? requireBase = null) + { + return new PolicyRestrictionContractData( + id, + name, + resourceType, + systemData, + scope, + requireBase, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Operation result identifier. + /// Status of an async operation. + /// + /// Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + /// + /// Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// + /// + /// Optional result info. + /// Error Body Contract. + /// This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. + /// A new instance for mocking. + public static GitOperationResultContractData GitOperationResultContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string operationResultIdentifier = null, AsyncOperationStatus? status = null, DateTimeOffset? startedOn = null, DateTimeOffset? updatedOn = null, string resultInfo = null, ErrorResponseBody error = null, IEnumerable actionLog = null) + { + actionLog ??= new List(); + + return new GitOperationResultContractData( + id, + name, + resourceType, + systemData, + operationResultIdentifier, + status, + startedOn, + updatedOn, + resultInfo, + error, + actionLog?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The type of entity contract. + /// Action like create/update/delete. + /// Identifier of the entity being created/updated/deleted. + /// A new instance for mocking. + public static OperationResultLogItemContract OperationResultLogItemContract(string objectType = null, string action = null, string objectKey = null) + { + return new OperationResultLogItemContract(objectType, action, objectKey, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2312,8 +2549,9 @@ public static PortalConfigContractData PortalConfigContractData(ResourceIdentifi /// Indicates if the portal's revision is public. /// Portal's revision creation date and time. /// Last updated date and time. + /// The provisioning state. /// A new instance for mocking. - public static ApiManagementPortalRevisionData ApiManagementPortalRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string statusDetails = null, PortalRevisionStatus? status = null, bool? isCurrent = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null) + public static ApiManagementPortalRevisionData ApiManagementPortalRevisionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, string statusDetails = null, PortalRevisionStatus? status = null, bool? isCurrent = null, DateTimeOffset? createdOn = null, DateTimeOffset? updatedOn = null, string provisioningState = null) { return new ApiManagementPortalRevisionData( id, @@ -2326,6 +2564,7 @@ public static ApiManagementPortalRevisionData ApiManagementPortalRevisionData(Re isCurrent, createdOn, updatedOn, + provisioningState, serializedAdditionalRawData: null); } @@ -2500,8 +2739,9 @@ public static ApiManagementPrivateLinkResourceData ApiManagementPrivateLinkResou /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// A new instance for mocking. - public static ProductApiData ProductApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null) + public static ProductApiData ProductApiData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string description = null, AuthenticationSettingsContract authenticationSettings = null, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames = null, ApiType? apiType = null, string apiRevision = null, string apiVersion = null, bool? isCurrent = null, bool? isOnline = null, string apiRevisionDescription = null, string apiVersionDescription = null, ResourceIdentifier apiVersionSetId = null, bool? isSubscriptionRequired = null, string termsOfServiceLink = null, ApiContactInformation contact = null, ApiLicenseInformation license = null, ResourceIdentifier sourceApiId = null, string displayName = null, string serviceLink = null, string path = null, IEnumerable protocols = null, ApiVersionSetContractDetails apiVersionSet = null, string provisioningState = null) { protocols ??= new List(); @@ -2531,6 +2771,7 @@ public static ProductApiData ProductApiData(ResourceIdentifier id = null, string path, protocols?.ToList(), apiVersionSet, + provisioningState, serializedAdditionalRawData: null); } @@ -2812,8 +3053,9 @@ public static RequestReportRecordContract RequestReportRecordContract(string api /// Free-form schema entity description. /// Json-encoded string for non json-based schema. /// Global Schema document object for json-based schema formats(e.g. json schema). + /// The provisioning state. /// A new instance for mocking. - public static ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiSchemaType? schemaType = null, string description = null, BinaryData value = null, BinaryData document = null) + public static ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ApiSchemaType? schemaType = null, string description = null, BinaryData value = null, BinaryData document = null, string provisioningState = null) { return new ApiManagementGlobalSchemaData( id, @@ -2824,6 +3066,7 @@ public static ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(Resour description, value, document, + provisioningState, serializedAdditionalRawData: null); } @@ -3071,54 +3314,6 @@ public static TenantAccessInfoSecretsDetails TenantAccessInfoSecretsDetails(stri serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// Operation result identifier. - /// Status of an async operation. - /// - /// Start time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - /// - /// - /// - /// Last update time of an async operation. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. - /// - /// - /// Optional result info. - /// Error Body Contract. - /// This property if only provided as part of the TenantConfiguration_Validate operation. It contains the log the entities which will be updated/created/deleted as part of the TenantConfiguration_Deploy operation. - /// A new instance for mocking. - public static GitOperationResultContractData GitOperationResultContractData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string operationResultIdentifier = null, AsyncOperationStatus? status = null, DateTimeOffset? startedOn = null, DateTimeOffset? updatedOn = null, string resultInfo = null, ErrorResponseBody error = null, IEnumerable actionLog = null) - { - actionLog ??= new List(); - - return new GitOperationResultContractData( - id, - name, - resourceType, - systemData, - operationResultIdentifier, - status, - startedOn, - updatedOn, - resultInfo, - error, - actionLog?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The type of entity contract. - /// Action like create/update/delete. - /// Identifier of the entity being created/updated/deleted. - /// A new instance for mocking. - public static OperationResultLogItemContract OperationResultLogItemContract(string objectType = null, string action = null, string objectKey = null) - { - return new OperationResultLogItemContract(objectType, action, objectKey, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -3173,6 +3368,66 @@ public static UserTokenResult UserTokenResult(string value = null) return new UserTokenResult(value, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies for what type of messages sampling settings should not apply. + /// Resource Id of a target logger. + /// Sampling settings for Diagnostic. + /// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + /// Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + /// Log the ClientIP. Default is false. + /// Sets correlation protocol to use for Application Insights diagnostics. + /// The verbosity level applied to traces emitted by trace policies. + /// The format of the Operation Name for Application Insights telemetries. Default is Name. + /// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + /// A new instance for mocking. + public static DiagnosticUpdateContract DiagnosticUpdateContract(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AlwaysLog? alwaysLog = null, string loggerId = null, SamplingSettings sampling = null, PipelineDiagnosticSettings frontend = null, PipelineDiagnosticSettings backend = null, bool? isLogClientIPEnabled = null, HttpCorrelationProtocol? httpCorrelationProtocol = null, TraceVerbosityLevel? verbosity = null, OperationNameFormat? operationNameFormat = null, bool? metrics = null) + { + return new DiagnosticUpdateContract( + id, + name, + resourceType, + systemData, + alwaysLog, + loggerId, + sampling, + frontend, + backend, + isLogClientIPEnabled, + httpCorrelationProtocol, + verbosity, + operationNameFormat, + metrics, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// ETag of the resource. + /// The link to the API Management service workspace. + /// The array of linked gateways. + /// A new instance for mocking. + public static ApiManagementWorkspaceLinksData ApiManagementWorkspaceLinksData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? etag = null, ResourceIdentifier workspaceId = null, IEnumerable gateways = null) + { + gateways ??= new List(); + + return new ApiManagementWorkspaceLinksData( + id, + name, + resourceType, + systemData, + etag, + workspaceId, + gateways?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3193,6 +3448,109 @@ public static WorkspaceContractData WorkspaceContractData(ResourceIdentifier id serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the API. May include HTML formatting tags. + /// Collection of authentication settings included into this API. + /// Protocols over which API is made available. + /// Type of API. + /// Describes the revision of the API. If no value is provided, default revision 1 is created. + /// Indicates the version identifier of the API if the API is versioned. + /// Indicates if API revision is current api revision. + /// Indicates if API revision is accessible via the gateway. + /// Description of the API Revision. + /// Description of the API Version. + /// A resource identifier for the related ApiVersionSet. + /// Specifies whether an API or Product subscription is required for accessing the API. + /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. + /// API identifier of the source API. + /// API name. Must be 1 to 300 characters long. + /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + /// Describes on which protocols the operations in this API can be invoked. + /// Version set details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiData ApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IEnumerable protocols, ApiVersionSetContractDetails apiVersionSet) + { + return ApiData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authenticationSettings: authenticationSettings, subscriptionKeyParameterNames: subscriptionKeyParameterNames, apiType: apiType, apiRevision: apiRevision, apiVersion: apiVersion, isCurrent: isCurrent, isOnline: isOnline, apiRevisionDescription: apiRevisionDescription, apiVersionDescription: apiVersionDescription, apiVersionSetId: apiVersionSetId, isSubscriptionRequired: isSubscriptionRequired, termsOfServiceLink: termsOfServiceLink, contact: contact, license: license, sourceApiId: sourceApiId, displayName: displayName, serviceLink: serviceLink, path: path, protocols: protocols, apiVersionSet: apiVersionSet, provisioningState: default); + } + + /// Initializes a new instance of . + /// Description of the API. May include HTML formatting tags. + /// Collection of authentication settings included into this API. + /// Protocols over which API is made available. + /// Type of API. + /// Describes the revision of the API. If no value is provided, default revision 1 is created. + /// Indicates the version identifier of the API if the API is versioned. + /// Indicates if API revision is current api revision. + /// Indicates if API revision is accessible via the gateway. + /// Description of the API Revision. + /// Description of the API Version. + /// A resource identifier for the related ApiVersionSet. + /// Specifies whether an API or Product subscription is required for accessing the API. + /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. + /// API identifier of the source API. + /// API name. Must be 1 to 300 characters long. + /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + /// Describes on which protocols the operations in this API can be invoked. + /// Version set details. + /// Content value when Importing an API. + /// Format of the Content in which the API is getting imported. + /// Criteria to limit import of WSDL to a subset of the document. + /// + /// Type of API to create. + /// * `http` creates a REST API + /// * `soap` creates a SOAP pass-through API + /// * `websocket` creates websocket API + /// * `graphql` creates GraphQL API. + /// + /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiCreateOrUpdateContent ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IEnumerable protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct) + { + return ApiCreateOrUpdateContent(description: description, authenticationSettings: authenticationSettings, subscriptionKeyParameterNames: subscriptionKeyParameterNames, apiType: apiType, apiRevision: apiRevision, apiVersion: apiVersion, isCurrent: isCurrent, isOnline: isOnline, apiRevisionDescription: apiRevisionDescription, apiVersionDescription: apiVersionDescription, apiVersionSetId: apiVersionSetId, isSubscriptionRequired: isSubscriptionRequired, termsOfServiceLink: termsOfServiceLink, contact: contact, license: license, sourceApiId: sourceApiId, displayName: displayName, serviceLink: serviceLink, path: path, protocols: protocols, apiVersionSet: apiVersionSet, provisioningState: default, value: value, format: format, wsdlSelector: wsdlSelector, soapApiType: soapApiType, translateRequiredQueryParametersConduct: translateRequiredQueryParametersConduct); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Must be a valid a media type used in a Content-Type header as defined in the RFC 2616. Media type of the schema document (e.g. application/json, application/xml). </br> - `Swagger` Schema use `application/vnd.ms-azure-apim.swagger.definitions+json` </br> - `WSDL` Schema use `application/vnd.ms-azure-apim.xsd+xml` </br> - `OpenApi` Schema use `application/vnd.oai.openapi.components+json` </br> - `WADL Schema` use `application/vnd.ms-azure-apim.wadl.grammars+xml`. + /// Json escaped string defining the document representing the Schema. Used for schemas other than Swagger/OpenAPI. + /// Types definitions. Used for Swagger/OpenAPI v1 schemas only, null otherwise. + /// Types definitions. Used for Swagger/OpenAPI v2/v3 schemas only, null otherwise. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiSchemaData ApiSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string contentType, string value, BinaryData definitions, BinaryData components) + { + return ApiSchemaData(id: id, name: name, resourceType: resourceType, systemData: systemData, contentType: contentType, provisioningState: default, value: value, definitions: definitions, components: components); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Tenant Id. + /// The Object Id. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AuthorizationAccessPolicyContractData AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, string objectId) + { + return AuthorizationAccessPolicyContractData(id: id, name: name, resourceType: resourceType, systemData: systemData, appIds: default, tenantId: tenantId, objectId: objectId); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -3211,7 +3569,7 @@ public static WorkspaceContractData WorkspaceContractData(ResourceIdentifier id [EditorBrowsable(EditorBrowsableState.Never)] public static ApiManagementBackendData ApiManagementBackendData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string title, string description, Uri resourceUri, BackendServiceFabricClusterProperties backendServiceFabricCluster, BackendCredentialsContract credentials, BackendProxyContract proxy, BackendTlsProperties tls, Uri uri, BackendProtocol? protocol) { - return ApiManagementBackendData(id: id, name: name, resourceType: resourceType, systemData: systemData, title: title, description: description, resourceUri: resourceUri, backendServiceFabricCluster: backendServiceFabricCluster, credentials: credentials, proxy: proxy, tls: tls, circuitBreakerRules: default, uri: uri, protocol: protocol); + return ApiManagementBackendData(id: id, name: name, resourceType: resourceType, systemData: systemData, title: title, description: description, resourceUri: resourceUri, backendServiceFabricCluster: backendServiceFabricCluster, credentials: credentials, proxy: proxy, tls: tls, circuitBreakerRules: default, poolServices: default, typePropertiesType: default, uri: uri, protocol: protocol); } /// Initializes a new instance of . @@ -3309,6 +3667,138 @@ public static ApiManagementServicePatch ApiManagementServicePatch(ResourceIdenti return ApiManagementServicePatch(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, identity: identity, etag: etag, zones: zones, notificationSenderEmail: notificationSenderEmail, provisioningState: provisioningState, targetProvisioningState: targetProvisioningState, createdAtUtc: createdAtUtc, gatewayUri: gatewayUri, gatewayRegionalUri: gatewayRegionalUri, portalUri: portalUri, managementApiUri: managementApiUri, scmUri: scmUri, developerPortalUri: developerPortalUri, hostnameConfigurations: hostnameConfigurations, publicIPAddresses: publicIPAddresses, privateIPAddresses: privateIPAddresses, publicIPAddressId: publicIPAddressId, publicNetworkAccess: publicNetworkAccess, legacyApi: default, virtualNetworkConfiguration: virtualNetworkConfiguration, additionalLocations: additionalLocations, customProperties: customProperties, certificates: certificates, enableClientCertificate: enableClientCertificate, natGatewayState: natGatewayState, outboundPublicIPAddresses: outboundPublicIPAddresses, disableGateway: disableGateway, virtualNetworkType: virtualNetworkType, minApiVersion: minApiVersion, restore: restore, privateEndpointConnections: privateEndpointConnections, platformVersion: platformVersion, legacyPortalStatus: default, developerPortalStatus: default, publisherEmail: publisherEmail, publisherName: publisherName, tags: tags); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the API. May include HTML formatting tags. + /// Collection of authentication settings included into this API. + /// Protocols over which API is made available. + /// Type of API. + /// Describes the revision of the API. If no value is provided, default revision 1 is created. + /// Indicates the version identifier of the API if the API is versioned. + /// Indicates if API revision is current api revision. + /// Indicates if API revision is accessible via the gateway. + /// Description of the API Revision. + /// Description of the API Version. + /// A resource identifier for the related ApiVersionSet. + /// Specifies whether an API or Product subscription is required for accessing the API. + /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. + /// API identifier of the source API. + /// API name. Must be 1 to 300 characters long. + /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + /// Describes on which protocols the operations in this API can be invoked. + /// Version set details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static GatewayApiData GatewayApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IEnumerable protocols, ApiVersionSetContractDetails apiVersionSet) + { + return GatewayApiData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authenticationSettings: authenticationSettings, subscriptionKeyParameterNames: subscriptionKeyParameterNames, apiType: apiType, apiRevision: apiRevision, apiVersion: apiVersion, isCurrent: isCurrent, isOnline: isOnline, apiRevisionDescription: apiRevisionDescription, apiVersionDescription: apiVersionDescription, apiVersionSetId: apiVersionSetId, isSubscriptionRequired: isSubscriptionRequired, termsOfServiceLink: termsOfServiceLink, contact: contact, license: license, sourceApiId: sourceApiId, displayName: displayName, serviceLink: serviceLink, path: path, protocols: protocols, apiVersionSet: apiVersionSet, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Optional tags that when provided can be used to filter the NamedValue list. + /// Determines whether the value is a secret and should be encrypted or not. Default value is false. + /// Unique name of NamedValue. It may contain only letters, digits, period, dash, and underscore characters. + /// Value of the NamedValue. Can contain policy expressions. It may not be empty or consist only of whitespace. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value. + /// KeyVault location details of the namedValue. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementNamedValueData ApiManagementNamedValueData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IEnumerable tags, bool? isSecret, string displayName, string value, KeyVaultContractProperties keyVaultDetails) + { + return ApiManagementNamedValueData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, isSecret: isSecret, displayName: displayName, value: value, keyVaultDetails: keyVaultDetails, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Contents of the policy fragment. + /// Policy fragment description. + /// Format of the policy fragment content. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static PolicyFragmentContractData PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format) + { + return PolicyFragmentContractData(id: id, name: name, resourceType: resourceType, systemData: systemData, value: value, description: description, format: format, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Portal revision description. + /// Portal revision publishing status details. + /// Status of the portal's revision. + /// Indicates if the portal's revision is public. + /// Portal's revision creation date and time. + /// Last updated date and time. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementPortalRevisionData ApiManagementPortalRevisionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, string statusDetails, PortalRevisionStatus? status, bool? isCurrent, DateTimeOffset? createdOn, DateTimeOffset? updatedOn) + { + return ApiManagementPortalRevisionData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, statusDetails: statusDetails, status: status, isCurrent: isCurrent, createdOn: createdOn, updatedOn: updatedOn, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Description of the API. May include HTML formatting tags. + /// Collection of authentication settings included into this API. + /// Protocols over which API is made available. + /// Type of API. + /// Describes the revision of the API. If no value is provided, default revision 1 is created. + /// Indicates the version identifier of the API if the API is versioned. + /// Indicates if API revision is current api revision. + /// Indicates if API revision is accessible via the gateway. + /// Description of the API Revision. + /// Description of the API Version. + /// A resource identifier for the related ApiVersionSet. + /// Specifies whether an API or Product subscription is required for accessing the API. + /// A URL to the Terms of Service for the API. MUST be in the format of a URL. + /// Contact information for the API. + /// License information for the API. + /// API identifier of the source API. + /// API name. Must be 1 to 300 characters long. + /// Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long. + /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. + /// Describes on which protocols the operations in this API can be invoked. + /// Version set details. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProductApiData ProductApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IEnumerable protocols, ApiVersionSetContractDetails apiVersionSet) + { + return ProductApiData(id: id, name: name, resourceType: resourceType, systemData: systemData, description: description, authenticationSettings: authenticationSettings, subscriptionKeyParameterNames: subscriptionKeyParameterNames, apiType: apiType, apiRevision: apiRevision, apiVersion: apiVersion, isCurrent: isCurrent, isOnline: isOnline, apiRevisionDescription: apiRevisionDescription, apiVersionDescription: apiVersionDescription, apiVersionSetId: apiVersionSetId, isSubscriptionRequired: isSubscriptionRequired, termsOfServiceLink: termsOfServiceLink, contact: contact, license: license, sourceApiId: sourceApiId, displayName: displayName, serviceLink: serviceLink, path: path, protocols: protocols, apiVersionSet: apiVersionSet, provisioningState: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Schema Type. Immutable. + /// Free-form schema entity description. + /// Json-encoded string for non json-based schema. + /// Global Schema document object for json-based schema formats(e.g. json schema). + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ApiManagementGlobalSchemaData ApiManagementGlobalSchemaData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiSchemaType? schemaType, string description, BinaryData value, BinaryData document) + { + return ApiManagementGlobalSchemaData(id: id, name: name, resourceType: resourceType, systemData: systemData, schemaType: schemaType, description: description, value: value, document: document, provisioningState: default); + } + /// Initializes a new instance of ApiManagementAuthorizationServerData. /// The id. /// The name. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs index 862d9b545030..7e5f3eaf2153 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string au /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authorizationAccess /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authorizationAccessPolicyId, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs index b1daf21fa12b..d956f64c7262 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.Serialization.cs @@ -8,6 +8,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Linq; using System.Text; using System.Text.Json; using Azure.Core; @@ -39,6 +40,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); + if (Optional.IsCollectionDefined(AppIds)) + { + writer.WritePropertyName("appIds"u8); + writer.WriteStartArray(); + foreach (var item in AppIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(TenantId)) { writer.WritePropertyName("tenantId"u8); @@ -76,6 +87,7 @@ internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAc string name = default; ResourceType type = default; SystemData systemData = default; + IList appIds = default; Guid? tenantId = default; string objectId = default; IDictionary serializedAdditionalRawData = default; @@ -115,6 +127,20 @@ internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAc } foreach (var property0 in property.Value.EnumerateObject()) { + if (property0.NameEquals("appIds"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + appIds = array; + continue; + } if (property0.NameEquals("tenantId"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -143,6 +169,7 @@ internal static AuthorizationAccessPolicyContractData DeserializeAuthorizationAc name, type, systemData, + appIds ?? new ChangeTrackingList(), tenantId, objectId, serializedAdditionalRawData); @@ -214,6 +241,42 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.Append(" properties:"); builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AppIds), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" appIds: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(AppIds)) + { + if (AppIds.Any()) + { + builder.Append(" appIds: "); + builder.AppendLine("["); + foreach (var item in AppIds) + { + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } + } + builder.AppendLine(" ]"); + } + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TenantId), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs index 527cc0068b67..0c669c7bc225 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractData.cs @@ -53,6 +53,7 @@ public partial class AuthorizationAccessPolicyContractData : ResourceData /// Initializes a new instance of . public AuthorizationAccessPolicyContractData() { + AppIds = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -60,16 +61,21 @@ public AuthorizationAccessPolicyContractData() /// The name. /// The resourceType. /// The systemData. + /// The allowed Azure Active Directory Application IDs. /// The Tenant Id. /// The Object Id. /// Keeps track of any properties unknown to the library. - internal AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, Guid? tenantId, string objectId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AuthorizationAccessPolicyContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList appIds, Guid? tenantId, string objectId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { + AppIds = appIds; TenantId = tenantId; ObjectId = objectId; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// The allowed Azure Active Directory Application IDs. + [WirePath("properties.appIds")] + public IList AppIds { get; } /// The Tenant Id. [WirePath("properties.tenantId")] public Guid? TenantId { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs index 29a7bec6535a..7baa10a7db8c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class AuthorizationAccessPolicyContractResource : IJsonModel { + private static AuthorizationAccessPolicyContractData s_dataDeserializationInstance; + private static AuthorizationAccessPolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationAccessPolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationAccessPolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); AuthorizationAccessPolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs index ab3a91cfbccf..3003fea5f70c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationAccessPolicyContractResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs index 47f9555be07a..836bce7cbb5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string authorizationI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authorizationId, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authorizationId, CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs index cac6cb83ae60..f7d6866e5212 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class AuthorizationContractResource : IJsonModel { + private static AuthorizationContractData s_dataDeserializationInstance; + private static AuthorizationContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); AuthorizationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs index 567567717ff3..3238080b18ed 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationContractResource.cs @@ -114,7 +114,7 @@ public virtual AuthorizationAccessPolicyContractCollection GetAuthorizationAcces /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual Response GetAuthorizat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -301,7 +301,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -346,7 +346,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task ConfirmConsentCodeAsync(AuthorizationConfirm /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -528,7 +528,7 @@ public virtual Response ConfirmConsentCode(AuthorizationConfirmConsentCodeConten /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -566,7 +566,7 @@ public virtual async Task> PostAuthorizationL /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs index cc8cb1b09c97..6b9782715ccd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string author /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string authorizationProvid /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string authorizationProviderId, Cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs index aec8efbfafb0..f7182643dfaa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class AuthorizationProviderContractResource : IJsonModel { + private static AuthorizationProviderContractData s_dataDeserializationInstance; + private static AuthorizationProviderContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationProviderContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationProviderContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); AuthorizationProviderContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs index 4344cc1ffb01..817416a0cd8f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/AuthorizationProviderContractResource.cs @@ -108,7 +108,7 @@ public virtual AuthorizationContractCollection GetAuthorizationContracts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAuthorizat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetAuthorizationContract( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs index 32a5267489d5..f79efb36c9d7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string documentationI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string documentationId, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string documentationId, CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs index 494e1f4d7387..77fe970c45b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class DocumentationContractResource : IJsonModel { + private static DocumentationContractData s_dataDeserializationInstance; + private static DocumentationContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DocumentationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DocumentationContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); DocumentationContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs index 4487ec8d7931..c83e91de653d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/DocumentationContractResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(E /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, Docu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs index 8ad1c3f52573..6fe1f6d0a6ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/ApiManagementExtensions.cs @@ -33,6 +33,25 @@ private static MockableApiManagementSubscriptionResource GetMockableApiManagemen return resource.GetCachedClient(client => new MockableApiManagementSubscriptionResource(client, resource.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 ApiGatewayResource GetApiGatewayResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetApiGatewayResource(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. @@ -508,6 +527,44 @@ public static ApiManagementDiagnosticResource GetApiManagementDiagnosticResource return GetMockableApiManagementArmClient(client).GetApiManagementDiagnosticResource(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 ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceWorkspaceDiagnosticResource(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 ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceWorkspaceApiDiagnosticResource(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. @@ -774,6 +831,25 @@ public static ApiManagementBackendResource GetApiManagementBackendResource(this return GetMockableApiManagementArmClient(client).GetApiManagementBackendResource(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 ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceWorkspaceBackendResource(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. @@ -812,6 +888,25 @@ public static ApiManagementCertificateResource GetApiManagementCertificateResour return GetMockableApiManagementArmClient(client).GetApiManagementCertificateResource(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 ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceWorkspaceCertificateResource(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. @@ -888,6 +983,25 @@ public static ApiManagementEmailTemplateResource GetApiManagementEmailTemplateRe return GetMockableApiManagementArmClient(client).GetApiManagementEmailTemplateResource(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 ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetApiGatewayConfigConnectionResource(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. @@ -1021,6 +1135,25 @@ public static ApiManagementLoggerResource GetApiManagementLoggerResource(this Ar return GetMockableApiManagementArmClient(client).GetApiManagementLoggerResource(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 ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetServiceWorkspaceLoggerResource(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. @@ -1154,6 +1287,25 @@ public static ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyFr return GetMockableApiManagementArmClient(client).GetServiceWorkspacePolicyFragmentResource(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 PolicyRestrictionContractResource GetPolicyRestrictionContractResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetPolicyRestrictionContractResource(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. @@ -1667,6 +1819,25 @@ public static ApiManagementUserResource GetApiManagementUserResource(this ArmCli return GetMockableApiManagementArmClient(client).GetApiManagementUserResource(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 ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableApiManagementArmClient(client).GetApiManagementWorkspaceLinksResource(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. @@ -1686,6 +1857,99 @@ public static WorkspaceContractResource GetWorkspaceContractResource(this ArmCli return GetMockableApiManagementArmClient(client).GetWorkspaceContractResource(id); } + /// + /// Gets a collection of ApiGatewayResources 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 ApiGatewayResources and their operations over a ApiGatewayResource. + public static ApiGatewayCollection GetApiGateways(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableApiManagementResourceGroupResource(resourceGroupResource).GetApiGateways(); + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetApiGatewayAsync(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableApiManagementResourceGroupResource(resourceGroupResource).GetApiGatewayAsync(gatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetApiGateway(this ResourceGroupResource resourceGroupResource, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableApiManagementResourceGroupResource(resourceGroupResource).GetApiGateway(gatewayName, cancellationToken); + } + /// /// Gets a collection of ApiManagementServiceResources in the ResourceGroupResource. /// @@ -1716,7 +1980,7 @@ public static ApiManagementServiceCollection GetApiManagementServices(this Resou /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1754,7 +2018,7 @@ public static async Task> GetApiManagemen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1809,7 +2073,7 @@ public static ApiManagementDeletedServiceCollection GetApiManagementDeletedServi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1848,7 +2112,7 @@ public static async Task> GetApiMa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1874,6 +2138,78 @@ public static Response GetApiManagementDele return GetMockableApiManagementSubscriptionResource(subscriptionResource).GetApiManagementDeletedService(location, serviceName, cancellationToken); } + /// + /// List all API Management gateways within a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_List + /// + /// + /// Default Api Version + /// 2024-05-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 GetApiGatewaysAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableApiManagementSubscriptionResource(subscriptionResource).GetApiGatewaysAsync(cancellationToken); + } + + /// + /// List all API Management gateways within a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_List + /// + /// + /// Default Api Version + /// 2024-05-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 GetApiGateways(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableApiManagementSubscriptionResource(subscriptionResource).GetApiGateways(cancellationToken); + } + /// /// Lists all soft-deleted services available for undelete for the given subscription. /// @@ -1887,7 +2223,7 @@ public static Response GetApiManagementDele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1923,7 +2259,7 @@ public static AsyncPageable GetApiManagemen /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1959,7 +2295,7 @@ public static Pageable GetApiManagementDele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1995,7 +2331,7 @@ public static AsyncPageable GetApiManagementServic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2031,7 +2367,7 @@ public static Pageable GetApiManagementServices(th /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2067,7 +2403,7 @@ public static async Task> C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2103,7 +2439,7 @@ public static Response CheckApiManag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2138,7 +2474,7 @@ public static async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -2173,7 +2509,7 @@ public static Response G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2205,7 +2541,7 @@ public static AsyncPageable GetApiManagementSkusAsync(this Sub /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -2223,5 +2559,73 @@ public static Pageable GetApiManagementSkus(this SubscriptionR return GetMockableApiManagementSubscriptionResource(subscriptionResource).GetApiManagementSkus(cancellationToken); } + + /// + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationsResults_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task GetOperationsResultAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableApiManagementSubscriptionResource(subscriptionResource).GetOperationsResultAsync(location, operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationsResults_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetOperationsResult(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableApiManagementSubscriptionResource(subscriptionResource).GetOperationsResult(location, operationId, cancellationToken); + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs index bfc5c253f153..30aa85164dc3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// 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 ApiGatewayResource GetApiGatewayResource(ResourceIdentifier id) + { + ApiGatewayResource.ValidateResourceId(id); + return new ApiGatewayResource(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. @@ -334,6 +346,30 @@ public virtual ApiManagementDiagnosticResource GetApiManagementDiagnosticResourc return new ApiManagementDiagnosticResource(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 ServiceWorkspaceDiagnosticResource GetServiceWorkspaceDiagnosticResource(ResourceIdentifier id) + { + ServiceWorkspaceDiagnosticResource.ValidateResourceId(id); + return new ServiceWorkspaceDiagnosticResource(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 ServiceWorkspaceApiDiagnosticResource GetServiceWorkspaceApiDiagnosticResource(ResourceIdentifier id) + { + ServiceWorkspaceApiDiagnosticResource.ValidateResourceId(id); + return new ServiceWorkspaceApiDiagnosticResource(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. @@ -502,6 +538,18 @@ public virtual ApiManagementBackendResource GetApiManagementBackendResource(Reso return new ApiManagementBackendResource(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 ServiceWorkspaceBackendResource GetServiceWorkspaceBackendResource(ResourceIdentifier id) + { + ServiceWorkspaceBackendResource.ValidateResourceId(id); + return new ServiceWorkspaceBackendResource(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. @@ -526,6 +574,18 @@ public virtual ApiManagementCertificateResource GetApiManagementCertificateResou return new ApiManagementCertificateResource(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 ServiceWorkspaceCertificateResource GetServiceWorkspaceCertificateResource(ResourceIdentifier id) + { + ServiceWorkspaceCertificateResource.ValidateResourceId(id); + return new ServiceWorkspaceCertificateResource(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. @@ -574,6 +634,18 @@ public virtual ApiManagementEmailTemplateResource GetApiManagementEmailTemplateR return new ApiManagementEmailTemplateResource(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 ApiGatewayConfigConnectionResource GetApiGatewayConfigConnectionResource(ResourceIdentifier id) + { + ApiGatewayConfigConnectionResource.ValidateResourceId(id); + return new ApiGatewayConfigConnectionResource(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. @@ -658,6 +730,18 @@ public virtual ApiManagementLoggerResource GetApiManagementLoggerResource(Resour return new ApiManagementLoggerResource(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 ServiceWorkspaceLoggerResource GetServiceWorkspaceLoggerResource(ResourceIdentifier id) + { + ServiceWorkspaceLoggerResource.ValidateResourceId(id); + return new ServiceWorkspaceLoggerResource(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. @@ -742,6 +826,18 @@ public virtual ServiceWorkspacePolicyFragmentResource GetServiceWorkspacePolicyF return new ServiceWorkspacePolicyFragmentResource(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 PolicyRestrictionContractResource GetPolicyRestrictionContractResource(ResourceIdentifier id) + { + PolicyRestrictionContractResource.ValidateResourceId(id); + return new PolicyRestrictionContractResource(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. @@ -1066,6 +1162,18 @@ public virtual ApiManagementUserResource GetApiManagementUserResource(ResourceId return new ApiManagementUserResource(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 ApiManagementWorkspaceLinksResource GetApiManagementWorkspaceLinksResource(ResourceIdentifier id) + { + ApiManagementWorkspaceLinksResource.ValidateResourceId(id); + return new ApiManagementWorkspaceLinksResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs index 543544260a14..57d5a71a7938 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementResourceGroupResource.cs @@ -33,6 +33,75 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// Gets a collection of ApiGatewayResources in the ResourceGroupResource. + /// An object representing collection of ApiGatewayResources and their operations over a ApiGatewayResource. + public virtual ApiGatewayCollection GetApiGateways() + { + return GetCachedClient(client => new ApiGatewayCollection(client, Id)); + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetApiGatewayAsync(string gatewayName, CancellationToken cancellationToken = default) + { + return await GetApiGateways().GetAsync(gatewayName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets an API Management gateway resource description. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName} + /// + /// + /// Operation Id + /// ApiGateway_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the API Management gateway. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetApiGateway(string gatewayName, CancellationToken cancellationToken = default) + { + return GetApiGateways().Get(gatewayName, cancellationToken); + } + /// Gets a collection of ApiManagementServiceResources in the ResourceGroupResource. /// An object representing collection of ApiManagementServiceResources and their operations over a ApiManagementServiceResource. public virtual ApiManagementServiceCollection GetApiManagementServices() @@ -53,7 +122,7 @@ public virtual ApiManagementServiceCollection GetApiManagementServices() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -84,7 +153,7 @@ public virtual async Task> GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs index 5ca202689b7d..dceac1d7070b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Extensions/MockableApiManagementSubscriptionResource.cs @@ -18,12 +18,16 @@ namespace Azure.ResourceManager.ApiManagement.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableApiManagementSubscriptionResource : ArmResource { + private ClientDiagnostics _apiGatewayClientDiagnostics; + private ApiGatewayRestOperations _apiGatewayRestClient; private ClientDiagnostics _apiManagementDeletedServiceDeletedServicesClientDiagnostics; private DeletedServicesRestOperations _apiManagementDeletedServiceDeletedServicesRestClient; private ClientDiagnostics _apiManagementServiceClientDiagnostics; private ApiManagementServiceRestOperations _apiManagementServiceRestClient; private ClientDiagnostics _apiManagementSkusClientDiagnostics; private ApiManagementSkusRestOperations _apiManagementSkusRestClient; + private ClientDiagnostics _operationsResultsClientDiagnostics; + private OperationsResultsRestOperations _operationsResultsRestClient; /// Initializes a new instance of the class for mocking. protected MockableApiManagementSubscriptionResource() @@ -37,12 +41,16 @@ internal MockableApiManagementSubscriptionResource(ArmClient client, ResourceIde { } + private ClientDiagnostics ApiGatewayClientDiagnostics => _apiGatewayClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiGatewayResource.ResourceType.Namespace, Diagnostics); + private ApiGatewayRestOperations ApiGatewayRestClient => _apiGatewayRestClient ??= new ApiGatewayRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ApiGatewayResource.ResourceType)); private ClientDiagnostics ApiManagementDeletedServiceDeletedServicesClientDiagnostics => _apiManagementDeletedServiceDeletedServicesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiManagementDeletedServiceResource.ResourceType.Namespace, Diagnostics); private DeletedServicesRestOperations ApiManagementDeletedServiceDeletedServicesRestClient => _apiManagementDeletedServiceDeletedServicesRestClient ??= new DeletedServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ApiManagementDeletedServiceResource.ResourceType)); private ClientDiagnostics ApiManagementServiceClientDiagnostics => _apiManagementServiceClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ApiManagementServiceResource.ResourceType.Namespace, Diagnostics); private ApiManagementServiceRestOperations ApiManagementServiceRestClient => _apiManagementServiceRestClient ??= new ApiManagementServiceRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ApiManagementServiceResource.ResourceType)); private ClientDiagnostics ApiManagementSkusClientDiagnostics => _apiManagementSkusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); private ApiManagementSkusRestOperations ApiManagementSkusRestClient => _apiManagementSkusRestClient ??= new ApiManagementSkusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OperationsResultsClientDiagnostics => _operationsResultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationsResultsRestOperations OperationsResultsRestClient => _operationsResultsRestClient ??= new OperationsResultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -70,7 +78,7 @@ public virtual ApiManagementDeletedServiceCollection GetApiManagementDeletedServ /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -102,7 +110,7 @@ public virtual async Task> GetApiM /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -121,6 +129,66 @@ public virtual Response GetApiManagementDel return GetApiManagementDeletedServices().Get(location, serviceName, cancellationToken); } + /// + /// List all API Management gateways within a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_List + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetApiGatewaysAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ApiGatewayRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ApiGatewayRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayResource(Client, ApiGatewayData.DeserializeApiGatewayData(e)), ApiGatewayClientDiagnostics, Pipeline, "MockableApiManagementSubscriptionResource.GetApiGateways", "value", "nextLink", cancellationToken); + } + + /// + /// List all API Management gateways within a subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/gateways + /// + /// + /// Operation Id + /// ApiGateway_List + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetApiGateways(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ApiGatewayRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ApiGatewayRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ApiGatewayResource(Client, ApiGatewayData.DeserializeApiGatewayData(e)), ApiGatewayClientDiagnostics, Pipeline, "MockableApiManagementSubscriptionResource.GetApiGateways", "value", "nextLink", cancellationToken); + } + /// /// Lists all soft-deleted services available for undelete for the given subscription. /// @@ -134,7 +202,7 @@ public virtual Response GetApiManagementDel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -164,7 +232,7 @@ public virtual AsyncPageable GetApiManageme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -194,7 +262,7 @@ public virtual Pageable GetApiManagementDel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -224,7 +292,7 @@ public virtual AsyncPageable GetApiManagementServi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -254,7 +322,7 @@ public virtual Pageable GetApiManagementServices(C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -296,7 +364,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -338,7 +406,7 @@ public virtual Response CheckApiMana /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -376,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -414,7 +482,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -440,7 +508,7 @@ public virtual AsyncPageable GetApiManagementSkusAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -452,5 +520,85 @@ public virtual Pageable GetApiManagementSkus(CancellationToken HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ApiManagementSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ApiManagementSku.DeserializeApiManagementSku(e), ApiManagementSkusClientDiagnostics, Pipeline, "MockableApiManagementSubscriptionResource.GetApiManagementSkus", "value", "nextLink", cancellationToken); } + + /// + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationsResults_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task GetOperationsResultAsync(AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationsResultsClientDiagnostics.CreateScope("MockableApiManagementSubscriptionResource.GetOperationsResult"); + scope.Start(); + try + { + var response = await OperationsResultsRestClient.GetAsync(Id.SubscriptionId, location, operationId, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ApiManagement/locations/{location}/operationResults/{operationId} + /// + /// + /// Operation Id + /// OperationsResults_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetOperationsResult(AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationsResultsClientDiagnostics.CreateScope("MockableApiManagementSubscriptionResource.GetOperationsResult"); + scope.Start(); + try + { + var response = OperationsResultsRestClient.Get(Id.SubscriptionId, location, operationId, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayConfigConnectionOperationSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayConfigConnectionOperationSource.cs new file mode 100644 index 000000000000..5cc67b89616b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayConfigConnectionOperationSource.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.ApiManagement +{ + internal class ApiGatewayConfigConnectionOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApiGatewayConfigConnectionOperationSource(ArmClient client) + { + _client = client; + } + + ApiGatewayConfigConnectionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerApiManagementContext.Default); + return new ApiGatewayConfigConnectionResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerApiManagementContext.Default); + return await Task.FromResult(new ApiGatewayConfigConnectionResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayOperationSource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayOperationSource.cs new file mode 100644 index 000000000000..e3b6661185ad --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/LongRunningOperation/ApiGatewayOperationSource.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.ApiManagement +{ + internal class ApiGatewayOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ApiGatewayOperationSource(ArmClient client) + { + _client = client; + } + + ApiGatewayResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerApiManagementContext.Default); + return new ApiGatewayResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerApiManagementContext.Default); + return await Task.FromResult(new ApiGatewayResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.Serialization.cs new file mode 100644 index 000000000000..166503df54db --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.Serialization.cs @@ -0,0 +1,289 @@ +// Copyright (c) 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.ApiManagement.Models +{ + public partial class AllPoliciesContract : 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(AllPoliciesContract)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(ReferencePolicyId)) + { + writer.WritePropertyName("referencePolicyId"u8); + writer.WriteStringValue(ReferencePolicyId); + } + if (Optional.IsDefined(ComplianceState)) + { + writer.WritePropertyName("complianceState"u8); + writer.WriteStringValue(ComplianceState.Value.ToString()); + } + writer.WriteEndObject(); + } + + AllPoliciesContract 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(AllPoliciesContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAllPoliciesContract(document.RootElement, options); + } + + internal static AllPoliciesContract DeserializeAllPoliciesContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + ResourceIdentifier referencePolicyId = default; + PolicyComplianceState? complianceState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("referencePolicyId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + referencePolicyId = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("complianceState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + complianceState = new PolicyComplianceState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AllPoliciesContract( + id, + name, + type, + systemData, + referencePolicyId, + complianceState, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ReferencePolicyId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" referencePolicyId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ReferencePolicyId)) + { + builder.Append(" referencePolicyId: "); + builder.AppendLine($"'{ReferencePolicyId.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ComplianceState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" complianceState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ComplianceState)) + { + builder.Append(" complianceState: "); + builder.AppendLine($"'{ComplianceState.Value.ToString()}'"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AllPoliciesContract)} does not support writing '{options.Format}' format."); + } + } + + AllPoliciesContract 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 DeserializeAllPoliciesContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AllPoliciesContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.cs new file mode 100644 index 000000000000..76e2b0eea34e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesContract.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// AllPolicies Contract details. + public partial class AllPoliciesContract : 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 AllPoliciesContract() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Policy Identifier. + /// Policy Restriction Compliance State. + /// Keeps track of any properties unknown to the library. + internal AllPoliciesContract(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ResourceIdentifier referencePolicyId, PolicyComplianceState? complianceState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + ReferencePolicyId = referencePolicyId; + ComplianceState = complianceState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Policy Identifier. + [WirePath("properties.referencePolicyId")] + public ResourceIdentifier ReferencePolicyId { get; set; } + /// Policy Restriction Compliance State. + [WirePath("properties.complianceState")] + public PolicyComplianceState? ComplianceState { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.Serialization.cs new file mode 100644 index 000000000000..dc9dc9a849b9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.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.ApiManagement.Models +{ + internal partial class AllPoliciesListResult : 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(AllPoliciesListResult)} 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 + } + } + } + + AllPoliciesListResult 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(AllPoliciesListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAllPoliciesListResult(document.RootElement, options); + } + + internal static AllPoliciesListResult DeserializeAllPoliciesListResult(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(AllPoliciesContract.DeserializeAllPoliciesContract(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 AllPoliciesListResult(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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(AllPoliciesListResult)} does not support writing '{options.Format}' format."); + } + } + + AllPoliciesListResult 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 DeserializeAllPoliciesListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AllPoliciesListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.cs new file mode 100644 index 000000000000..71526b3bc58e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/AllPoliciesListResult.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.ApiManagement.Models +{ + /// The response of All Policies. + internal partial class AllPoliciesListResult + { + /// + /// 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 AllPoliciesListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// AllPolicies Contract value. + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal AllPoliciesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// AllPolicies Contract value. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs index c06e750f2db1..4762b30a90b4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.Serialization.cs @@ -146,6 +146,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("apiVersionSet"u8); writer.WriteObjectValue(ApiVersionSet, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } if (Optional.IsDefined(Value)) { writer.WritePropertyName("value"u8); @@ -230,6 +235,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso string path = default; IList protocols = default; ApiVersionSetContractDetails apiVersionSet = default; + string provisioningState = default; string value = default; ContentFormat? format = default; ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector = default; @@ -406,6 +412,11 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso apiVersionSet = ApiVersionSetContractDetails.DeserializeApiVersionSetContractDetails(property0.Value, options); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } if (property0.NameEquals("value"u8)) { value = property0.Value.GetString(); @@ -478,6 +489,7 @@ internal static ApiCreateOrUpdateContent DeserializeApiCreateOrUpdateContent(Jso path, protocols ?? new ChangeTrackingList(), apiVersionSet, + provisioningState, value, format, wsdlSelector, diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs index 7a296530aca5..aaf726632169 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiCreateOrUpdateContent.cs @@ -74,6 +74,7 @@ public ApiCreateOrUpdateContent() /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// Content value when Importing an API. /// Format of the Content in which the API is getting imported. New formats can be added in the future. /// Criteria to limit import of WSDL to a subset of the document. @@ -87,7 +88,7 @@ public ApiCreateOrUpdateContent() /// /// Strategy of translating required query parameters to template ones. By default has value 'template'. Possible values: 'template', 'query'. /// Keeps track of any properties unknown to the library. - internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct, IDictionary serializedAdditionalRawData) + internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string provisioningState, string value, ContentFormat? format, ApiCreateOrUpdatePropertiesWsdlSelector wsdlSelector, SoapApiType? soapApiType, TranslateRequiredQueryParametersConduct? translateRequiredQueryParametersConduct, IDictionary serializedAdditionalRawData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -110,6 +111,7 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont Path = path; Protocols = protocols; ApiVersionSet = apiVersionSet; + ProvisioningState = provisioningState; Value = value; Format = format; WsdlSelector = wsdlSelector; @@ -181,6 +183,9 @@ internal ApiCreateOrUpdateContent(string description, AuthenticationSettingsCont /// Version set details. [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } /// Content value when Importing an API. [WirePath("properties.value")] public string Value { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.Serialization.cs new file mode 100644 index 000000000000..4d8199e409aa --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.Serialization.cs @@ -0,0 +1,597 @@ +// Copyright (c) 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.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ApiGatewayPatch : 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(ApiGatewayPatch)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } + 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(); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } + if (options.Format != "W" && Optional.IsDefined(TargetProvisioningState)) + { + writer.WritePropertyName("targetProvisioningState"u8); + writer.WriteStringValue(TargetProvisioningState); + } + if (options.Format != "W" && Optional.IsDefined(CreatedAtUtc)) + { + writer.WritePropertyName("createdAtUtc"u8); + writer.WriteStringValue(CreatedAtUtc.Value, "O"); + } + if (Optional.IsDefined(Frontend)) + { + writer.WritePropertyName("frontend"u8); + writer.WriteObjectValue(Frontend, options); + } + if (Optional.IsDefined(Backend)) + { + writer.WritePropertyName("backend"u8); + writer.WriteObjectValue(Backend, options); + } + if (Optional.IsDefined(ConfigurationApi)) + { + writer.WritePropertyName("configurationApi"u8); + writer.WriteObjectValue(ConfigurationApi, options); + } + if (Optional.IsDefined(VirtualNetworkType)) + { + writer.WritePropertyName("virtualNetworkType"u8); + writer.WriteStringValue(VirtualNetworkType.Value.ToString()); + } + writer.WriteEndObject(); + } + + ApiGatewayPatch 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(ApiGatewayPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiGatewayPatch(document.RootElement, options); + } + + internal static ApiGatewayPatch DeserializeApiGatewayPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewaySkuPropertiesForPatch sku = default; + ETag? etag = default; + IDictionary tags = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string provisioningState = default; + string targetProvisioningState = default; + DateTimeOffset? createdAtUtc = default; + FrontendConfiguration frontend = default; + BackendConfiguration backend = default; + GatewayConfigurationApi configurationApi = default; + VirtualNetworkType? virtualNetworkType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = ApiManagementGatewaySkuPropertiesForPatch.DeserializeApiManagementGatewaySkuPropertiesForPatch(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("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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("targetProvisioningState"u8)) + { + targetProvisioningState = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("createdAtUtc"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAtUtc = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("frontend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frontend = FrontendConfiguration.DeserializeFrontendConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("backend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backend = BackendConfiguration.DeserializeBackendConfiguration(property0.Value, options); + continue; + } + if (property0.NameEquals("configurationApi"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationApi = GatewayConfigurationApi.DeserializeGatewayConfigurationApi(property0.Value, options); + continue; + } + if (property0.NameEquals("virtualNetworkType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + virtualNetworkType = new VirtualNetworkType(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiGatewayPatch( + id, + name, + type, + systemData, + sku, + etag, + provisioningState, + targetProvisioningState, + createdAtUtc, + frontend, + backend, + configurationApi, + virtualNetworkType, + tags ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Tags), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" tags: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Tags)) + { + if (Tags.Any()) + { + builder.Append(" tags: "); + builder.AppendLine("{"); + foreach (var item in Tags) + { + builder.Append($" '{item.Key}': "); + if (item.Value == null) + { + builder.Append("null"); + continue; + } + if (item.Value.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{item.Value}'''"); + } + else + { + builder.AppendLine($"'{item.Value}'"); + } + } + builder.AppendLine(" }"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sku), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" etag: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ETag)) + { + builder.Append(" etag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TargetProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" targetProvisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TargetProvisioningState)) + { + builder.Append(" targetProvisioningState: "); + if (TargetProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{TargetProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{TargetProvisioningState}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(CreatedAtUtc), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" createdAtUtc: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(CreatedAtUtc)) + { + builder.Append(" createdAtUtc: "); + var formattedDateTimeString = TypeFormatters.ToString(CreatedAtUtc.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("FrontendDefaultHostname", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frontend: "); + builder.AppendLine("{"); + builder.AppendLine(" frontend: {"); + builder.Append(" defaultHostname: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Frontend)) + { + builder.Append(" frontend: "); + BicepSerializationHelpers.AppendChildObject(builder, Frontend, options, 4, false, " frontend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SubnetId", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backend: "); + builder.AppendLine("{"); + builder.AppendLine(" backend: {"); + builder.AppendLine(" subnet: {"); + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Backend)) + { + builder.Append(" backend: "); + BicepSerializationHelpers.AppendChildObject(builder, Backend, options, 4, false, " backend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("ConfigurationApiHostname", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" configurationApi: "); + builder.AppendLine("{"); + builder.AppendLine(" configurationApi: {"); + builder.Append(" hostname: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(ConfigurationApi)) + { + builder.Append(" configurationApi: "); + BicepSerializationHelpers.AppendChildObject(builder, ConfigurationApi, options, 4, false, " configurationApi: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(VirtualNetworkType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(VirtualNetworkType)) + { + builder.Append(" virtualNetworkType: "); + builder.AppendLine($"'{VirtualNetworkType.Value.ToString()}'"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiGatewayPatch)} does not support writing '{options.Format}' format."); + } + } + + ApiGatewayPatch 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 DeserializeApiGatewayPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiGatewayPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.cs new file mode 100644 index 000000000000..9599bc771aed --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewayPatch.cs @@ -0,0 +1,142 @@ +// 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.ApiManagement.Models +{ + /// Parameter supplied to Update API Management gateway. + public partial class ApiGatewayPatch : 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 ApiGatewayPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// SKU properties of the API Management gateway. + /// ETag of the resource. + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + /// Information regarding how the gateway should be exposed. + /// Information regarding how the gateway should integrate with backend systems. + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + /// The type of VPN in which API Management gateway needs to be configured in. + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal ApiGatewayPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ApiManagementGatewaySkuPropertiesForPatch sku, ETag? etag, string provisioningState, string targetProvisioningState, DateTimeOffset? createdAtUtc, FrontendConfiguration frontend, BackendConfiguration backend, GatewayConfigurationApi configurationApi, VirtualNetworkType? virtualNetworkType, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Sku = sku; + ETag = etag; + ProvisioningState = provisioningState; + TargetProvisioningState = targetProvisioningState; + CreatedAtUtc = createdAtUtc; + Frontend = frontend; + Backend = backend; + ConfigurationApi = configurationApi; + VirtualNetworkType = virtualNetworkType; + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SKU properties of the API Management gateway. + [WirePath("sku")] + public ApiManagementGatewaySkuPropertiesForPatch Sku { get; set; } + /// ETag of the resource. + [WirePath("etag")] + public ETag? ETag { get; } + /// The current provisioning state of the API Management gateway which can be one of the following: Created/Activating/Succeeded/Updating/Failed/Stopped/Terminating/TerminationFailed/Deleted. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } + /// The provisioning state of the API Management gateway, which is targeted by the long running operation started on the gateway. + [WirePath("properties.targetProvisioningState")] + public string TargetProvisioningState { get; } + /// Creation UTC date of the API Management gateway.The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. + [WirePath("properties.createdAtUtc")] + public DateTimeOffset? CreatedAtUtc { get; } + /// Information regarding how the gateway should be exposed. + internal FrontendConfiguration Frontend { get; set; } + /// The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. + [WirePath("properties.frontend.defaultHostname")] + public string FrontendDefaultHostname + { + get => Frontend is null ? default : Frontend.DefaultHostname; + } + + /// Information regarding how the gateway should integrate with backend systems. + internal BackendConfiguration Backend { get; set; } + /// Gets or sets Id. + [WirePath("properties.backend.subnet.id")] + public ResourceIdentifier SubnetId + { + get => Backend is null ? default : Backend.SubnetId; + set + { + if (Backend is null) + Backend = new BackendConfiguration(); + Backend.SubnetId = value; + } + } + + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + internal GatewayConfigurationApi ConfigurationApi { get; set; } + /// Hostname to which the agent connects to propagate configuration to the cloud. + [WirePath("properties.configurationApi.hostname")] + public string ConfigurationApiHostname + { + get => ConfigurationApi is null ? default : ConfigurationApi.Hostname; + } + + /// The type of VPN in which API Management gateway needs to be configured in. + [WirePath("properties.virtualNetworkType")] + public VirtualNetworkType? VirtualNetworkType { get; set; } + /// Resource tags. + [WirePath("tags")] + public IDictionary Tags { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewaySkuType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewaySkuType.cs new file mode 100644 index 000000000000..c1fbcddd23f2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiGatewaySkuType.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.ApiManagement.Models +{ + /// Name of the Sku. + public readonly partial struct ApiGatewaySkuType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ApiGatewaySkuType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StandardValue = "Standard"; + private const string WorkspaceGatewayStandardValue = "WorkspaceGatewayStandard"; + private const string WorkspaceGatewayPremiumValue = "WorkspaceGatewayPremium"; + + /// Standard SKU of the API gateway. + public static ApiGatewaySkuType Standard { get; } = new ApiGatewaySkuType(StandardValue); + /// Standard SKU of the API gateway to be used in Workspaces. + public static ApiGatewaySkuType WorkspaceGatewayStandard { get; } = new ApiGatewaySkuType(WorkspaceGatewayStandardValue); + /// Premium SKU of the API gateway to be used in Workspaces. + public static ApiGatewaySkuType WorkspaceGatewayPremium { get; } = new ApiGatewaySkuType(WorkspaceGatewayPremiumValue); + /// Determines if two values are the same. + public static bool operator ==(ApiGatewaySkuType left, ApiGatewaySkuType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ApiGatewaySkuType left, ApiGatewaySkuType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ApiGatewaySkuType(string value) => new ApiGatewaySkuType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ApiGatewaySkuType other && Equals(other); + /// + public bool Equals(ApiGatewaySkuType 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.Serialization.cs index 88cf43ea057f..6e10a016265d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.Serialization.cs @@ -76,6 +76,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("circuitBreaker"u8); writer.WriteObjectValue(CircuitBreaker, options); } + if (Optional.IsDefined(Pool)) + { + writer.WritePropertyName("pool"u8); + writer.WriteObjectValue(Pool, options); + } + if (Optional.IsDefined(BackendType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(BackendType.Value.ToString()); + } if (Optional.IsDefined(Uri)) { writer.WritePropertyName("url"u8); @@ -132,6 +142,8 @@ internal static ApiManagementBackendPatch DeserializeApiManagementBackendPatch(J BackendProxyContract proxy = default; BackendTlsProperties tls = default; BackendCircuitBreaker circuitBreaker = default; + BackendBaseParametersPool pool = default; + BackendType? type = default; Uri uri = default; BackendProtocol? protocol = default; IDictionary serializedAdditionalRawData = default; @@ -211,6 +223,24 @@ internal static ApiManagementBackendPatch DeserializeApiManagementBackendPatch(J circuitBreaker = BackendCircuitBreaker.DeserializeBackendCircuitBreaker(property0.Value, options); continue; } + if (property0.NameEquals("pool"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pool = BackendBaseParametersPool.DeserializeBackendBaseParametersPool(property0.Value, options); + continue; + } + if (property0.NameEquals("type"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new BackendType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("url"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -247,6 +277,8 @@ internal static ApiManagementBackendPatch DeserializeApiManagementBackendPatch(J proxy, tls, circuitBreaker, + pool, + type, uri, protocol, serializedAdditionalRawData); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs index 6b490ce9cbc3..027c3a27357b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementBackendPatch.cs @@ -59,10 +59,12 @@ public ApiManagementBackendPatch() /// Backend gateway Contract Properties. /// Backend TLS Properties. /// Backend Circuit Breaker Configuration. + /// + /// Type of the backend. A backend can be either Single or Pool. /// Runtime Url of the Backend. /// Backend communication protocol. /// Keeps track of any properties unknown to the library. - internal ApiManagementBackendPatch(string title, string description, Uri resourceUri, BackendProperties properties, BackendCredentialsContract credentials, BackendProxyContract proxy, BackendTlsProperties tls, BackendCircuitBreaker circuitBreaker, Uri uri, BackendProtocol? protocol, IDictionary serializedAdditionalRawData) + internal ApiManagementBackendPatch(string title, string description, Uri resourceUri, BackendProperties properties, BackendCredentialsContract credentials, BackendProxyContract proxy, BackendTlsProperties tls, BackendCircuitBreaker circuitBreaker, BackendBaseParametersPool pool, BackendType? backendType, Uri uri, BackendProtocol? protocol, IDictionary serializedAdditionalRawData) { Title = title; Description = description; @@ -72,6 +74,8 @@ internal ApiManagementBackendPatch(string title, string description, Uri resourc Proxy = proxy; Tls = tls; CircuitBreaker = circuitBreaker; + Pool = pool; + BackendType = backendType; Uri = uri; Protocol = protocol; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -124,6 +128,23 @@ public IList CircuitBreakerRules } } + /// Gets or sets the pool. + internal BackendBaseParametersPool Pool { get; set; } + /// The list of backend entities belonging to a pool. + [WirePath("properties.pool.services")] + public IList PoolServices + { + get + { + if (Pool is null) + Pool = new BackendBaseParametersPool(); + return Pool.Services; + } + } + + /// Type of the backend. A backend can be either Single or Pool. + [WirePath("properties.type")] + public BackendType? BackendType { get; set; } /// Runtime Url of the Backend. [WirePath("properties.url")] public Uri Uri { get; set; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.Serialization.cs new file mode 100644 index 000000000000..34e54e8f8ff9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ApiManagementGatewayConfigConnectionListResult : 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(ApiManagementGatewayConfigConnectionListResult)} 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); + } + 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 + } + } + } + + ApiManagementGatewayConfigConnectionListResult 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(ApiManagementGatewayConfigConnectionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement, options); + } + + internal static ApiManagementGatewayConfigConnectionListResult DeserializeApiManagementGatewayConfigConnectionListResult(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiGatewayConfigConnectionData.DeserializeApiGatewayConfigConnectionData(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 ApiManagementGatewayConfigConnectionListResult(value, 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayConfigConnectionListResult)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayConfigConnectionListResult 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 DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayConfigConnectionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.cs new file mode 100644 index 000000000000..59247ac73fbb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayConfigConnectionListResult.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.ApiManagement.Models +{ + /// The response of the List API Management gateway operation. + internal partial class ApiManagementGatewayConfigConnectionListResult + { + /// + /// 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 . + /// Result of the List API Management gateway config connection operation. + /// is null. + internal ApiManagementGatewayConfigConnectionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Result of the List API Management gateway config connection operation. + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayConfigConnectionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayConfigConnectionListResult() + { + } + + /// Result of the List API Management gateway config connection operation. + public IReadOnlyList Value { get; } + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.Serialization.cs new file mode 100644 index 000000000000..c2e1596968cf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ApiManagementGatewayListResult : 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(ApiManagementGatewayListResult)} 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); + } + 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 + } + } + } + + ApiManagementGatewayListResult 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(ApiManagementGatewayListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayListResult(document.RootElement, options); + } + + internal static ApiManagementGatewayListResult DeserializeApiManagementGatewayListResult(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiGatewayData.DeserializeApiGatewayData(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 ApiManagementGatewayListResult(value, 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayListResult)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayListResult 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 DeserializeApiManagementGatewayListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.cs new file mode 100644 index 000000000000..eee0e8a80ecd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewayListResult.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.ApiManagement.Models +{ + /// The response of the List API Management gateway operation. + internal partial class ApiManagementGatewayListResult + { + /// + /// 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 . + /// Result of the List API Management gateway operation. + /// is null. + internal ApiManagementGatewayListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Result of the List API Management gateway operation. + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayListResult() + { + } + + /// Result of the List API Management gateway operation. + public IReadOnlyList Value { get; } + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.Serialization.cs new file mode 100644 index 000000000000..8b5171cc3ae9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) 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.ApiManagement.Models +{ + public partial class ApiManagementGatewaySkuProperties : 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(ApiManagementGatewaySkuProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.ToString()); + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && _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 + } + } + } + + ApiManagementGatewaySkuProperties 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(ApiManagementGatewaySkuProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewaySkuProperties(document.RootElement, options); + } + + internal static ApiManagementGatewaySkuProperties DeserializeApiManagementGatewaySkuProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiGatewaySkuType name = default; + int? capacity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = new ApiGatewaySkuType(property.Value.GetString()); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewaySkuProperties(name, capacity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.ToString()}'"); + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + builder.AppendLine($"{Capacity.Value}"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewaySkuProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewaySkuProperties 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 DeserializeApiManagementGatewaySkuProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewaySkuProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.cs new file mode 100644 index 000000000000..66eae0a8b241 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuProperties.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.ApiManagement.Models +{ + /// API Management gateway resource SKU properties. + public partial class ApiManagementGatewaySkuProperties + { + /// + /// 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 Sku. + public ApiManagementGatewaySkuProperties(ApiGatewaySkuType name) + { + Name = name; + } + + /// Initializes a new instance of . + /// Name of the Sku. + /// Capacity of the SKU (number of deployed units of the SKU). + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewaySkuProperties(ApiGatewaySkuType name, int? capacity, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewaySkuProperties() + { + } + + /// Name of the Sku. + [WirePath("name")] + public ApiGatewaySkuType Name { get; set; } + /// Capacity of the SKU (number of deployed units of the SKU). + [WirePath("capacity")] + public int? Capacity { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.Serialization.cs new file mode 100644 index 000000000000..0ef364bcaa5b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class ApiManagementGatewaySkuPropertiesForPatch : 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(ApiManagementGatewaySkuPropertiesForPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.Value.ToString()); + } + if (Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteNumberValue(Capacity.Value); + } + if (options.Format != "W" && _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 + } + } + } + + ApiManagementGatewaySkuPropertiesForPatch 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(ApiManagementGatewaySkuPropertiesForPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewaySkuPropertiesForPatch(document.RootElement, options); + } + + internal static ApiManagementGatewaySkuPropertiesForPatch DeserializeApiManagementGatewaySkuPropertiesForPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiGatewaySkuType? name = default; + int? capacity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new ApiGatewaySkuType(property.Value.GetString()); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewaySkuPropertiesForPatch(name, capacity, serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + builder.AppendLine($"{Capacity.Value}"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewaySkuPropertiesForPatch)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewaySkuPropertiesForPatch 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 DeserializeApiManagementGatewaySkuPropertiesForPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewaySkuPropertiesForPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.cs new file mode 100644 index 000000000000..03e6662b3304 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementGatewaySkuPropertiesForPatch.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.ApiManagement.Models +{ + /// API Management gateway resource SKU properties for PATCH operations given nothing should be required. + public partial class ApiManagementGatewaySkuPropertiesForPatch + { + /// + /// 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 ApiManagementGatewaySkuPropertiesForPatch() + { + } + + /// Initializes a new instance of . + /// Name of the Sku. + /// Capacity of the SKU (number of deployed units of the SKU). + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewaySkuPropertiesForPatch(ApiGatewaySkuType? name, int? capacity, IDictionary serializedAdditionalRawData) + { + Name = name; + Capacity = capacity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the Sku. + [WirePath("name")] + public ApiGatewaySkuType? Name { get; set; } + /// Capacity of the SKU (number of deployed units of the SKU). + [WirePath("capacity")] + public int? Capacity { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuType.cs index 2ef1e4b78546..c8d7a92a7d45 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementServiceSkuType.cs @@ -28,6 +28,8 @@ public ApiManagementServiceSkuType(string value) private const string BasicValue = "Basic"; private const string ConsumptionValue = "Consumption"; private const string IsolatedValue = "Isolated"; + private const string BasicV2Value = "BasicV2"; + private const string StandardV2Value = "StandardV2"; /// Developer SKU of Api Management. public static ApiManagementServiceSkuType Developer { get; } = new ApiManagementServiceSkuType(DeveloperValue); @@ -41,6 +43,10 @@ public ApiManagementServiceSkuType(string value) public static ApiManagementServiceSkuType Consumption { get; } = new ApiManagementServiceSkuType(ConsumptionValue); /// Isolated SKU of Api Management. public static ApiManagementServiceSkuType Isolated { get; } = new ApiManagementServiceSkuType(IsolatedValue); + /// BasicV2 SKU of Api Management. + public static ApiManagementServiceSkuType BasicV2 { get; } = new ApiManagementServiceSkuType(BasicV2Value); + /// StandardV2 SKU of Api Management. + public static ApiManagementServiceSkuType StandardV2 { get; } = new ApiManagementServiceSkuType(StandardV2Value); /// Determines if two values are the same. public static bool operator ==(ApiManagementServiceSkuType left, ApiManagementServiceSkuType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.Serialization.cs new file mode 100644 index 000000000000..036a1353aeea --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class ApiManagementWorkspaceLinksListResult : 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(ApiManagementWorkspaceLinksListResult)} 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); + } + 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 + } + } + } + + ApiManagementWorkspaceLinksListResult 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(ApiManagementWorkspaceLinksListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementWorkspaceLinksListResult(document.RootElement, options); + } + + internal static ApiManagementWorkspaceLinksListResult DeserializeApiManagementWorkspaceLinksListResult(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ApiManagementWorkspaceLinksData.DeserializeApiManagementWorkspaceLinksData(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 ApiManagementWorkspaceLinksListResult(value, 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(ApiManagementWorkspaceLinksListResult)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementWorkspaceLinksListResult 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 DeserializeApiManagementWorkspaceLinksListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementWorkspaceLinksListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.cs new file mode 100644 index 000000000000..e769579a85fc --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiManagementWorkspaceLinksListResult.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.ApiManagement.Models +{ + /// The response of the List API Management WorkspaceLink operation. + internal partial class ApiManagementWorkspaceLinksListResult + { + /// + /// 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 . + /// Result of the List API Management WorkspaceLinks operation. + /// is null. + internal ApiManagementWorkspaceLinksListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// Result of the List API Management WorkspaceLinks operation. + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + /// Keeps track of any properties unknown to the library. + internal ApiManagementWorkspaceLinksListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementWorkspaceLinksListResult() + { + } + + /// Result of the List API Management WorkspaceLinks operation. + public IReadOnlyList Value { get; } + /// Link to the next set of results. Not empty if Value contains incomplete list of API Management services. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiType.cs index 01ea4cc95fad..936be80571bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ApiType.cs @@ -27,6 +27,7 @@ public ApiType(string value) private const string WebSocketValue = "websocket"; private const string GraphQLValue = "graphql"; private const string OdataValue = "odata"; + private const string GrpcValue = "grpc"; /// http. public static ApiType Http { get; } = new ApiType(HttpValue); @@ -38,6 +39,8 @@ public ApiType(string value) public static ApiType GraphQL { get; } = new ApiType(GraphQLValue); /// odata. public static ApiType Odata { get; } = new ApiType(OdataValue); + /// grpc. + public static ApiType Grpc { get; } = new ApiType(GrpcValue); /// Determines if two values are the same. public static bool operator ==(ApiType left, ApiType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.Serialization.cs new file mode 100644 index 000000000000..bcc6e100b73d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) 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.ApiManagement.Models +{ + internal partial class BackendBaseParametersPool : 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(BackendBaseParametersPool)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BackendBaseParametersPool 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(BackendBaseParametersPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBackendBaseParametersPool(document.RootElement, options); + } + + internal static BackendBaseParametersPool DeserializeBackendBaseParametersPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList services = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BackendPoolItem.DeserializeBackendPoolItem(item, options)); + } + services = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BackendBaseParametersPool(services ?? 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(Services), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" services: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Services)) + { + if (Services.Any()) + { + builder.Append(" services: "); + builder.AppendLine("["); + foreach (var item in Services) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " services: "); + } + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BackendBaseParametersPool)} does not support writing '{options.Format}' format."); + } + } + + BackendBaseParametersPool 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 DeserializeBackendBaseParametersPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BackendBaseParametersPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.cs new file mode 100644 index 000000000000..340a86495cbb --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendBaseParametersPool.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// The BackendBaseParametersPool. + internal partial class BackendBaseParametersPool : BackendPool + { + /// Initializes a new instance of . + public BackendBaseParametersPool() + { + } + + /// Initializes a new instance of . + /// The list of backend entities belonging to a pool. + /// Keeps track of any properties unknown to the library. + internal BackendBaseParametersPool(IList services, IDictionary serializedAdditionalRawData) : base(services, serializedAdditionalRawData) + { + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.Serialization.cs new file mode 100644 index 000000000000..a1efc59f9c67 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.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; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class BackendConfiguration : 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(BackendConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Subnet)) + { + writer.WritePropertyName("subnet"u8); + JsonSerializer.Serialize(writer, Subnet); + } + 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 + } + } + } + + BackendConfiguration 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(BackendConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBackendConfiguration(document.RootElement, options); + } + + internal static BackendConfiguration DeserializeBackendConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + WritableSubResource subnet = 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BackendConfiguration(subnet, 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: "); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BackendConfiguration)} does not support writing '{options.Format}' format."); + } + } + + BackendConfiguration 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 DeserializeBackendConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BackendConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.cs new file mode 100644 index 000000000000..d0f3b93bca42 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendConfiguration.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.Resources.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Information regarding how the gateway should integrate with backend systems. + internal partial class BackendConfiguration + { + /// + /// 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 BackendConfiguration() + { + } + + /// Initializes a new instance of . + /// The default hostname of the data-plane gateway to which requests can be sent. + /// Keeps track of any properties unknown to the library. + internal BackendConfiguration(WritableSubResource subnet, IDictionary serializedAdditionalRawData) + { + Subnet = subnet; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The default hostname of the data-plane gateway to which requests can be sent. + 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; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.Serialization.cs new file mode 100644 index 000000000000..92db53492f44 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.Serialization.cs @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class BackendPool : 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(BackendPool)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Services)) + { + writer.WritePropertyName("services"u8); + writer.WriteStartArray(); + foreach (var item in Services) + { + 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 + } + } + } + + BackendPool 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(BackendPool)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBackendPool(document.RootElement, options); + } + + internal static BackendPool DeserializeBackendPool(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList services = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("services"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BackendPoolItem.DeserializeBackendPoolItem(item, options)); + } + services = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BackendPool(services ?? 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(Services), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" services: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsCollectionDefined(Services)) + { + if (Services.Any()) + { + builder.Append(" services: "); + builder.AppendLine("["); + foreach (var item in Services) + { + BicepSerializationHelpers.AppendChildObject(builder, item, options, 4, true, " services: "); + } + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BackendPool)} does not support writing '{options.Format}' format."); + } + } + + BackendPool 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 DeserializeBackendPool(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BackendPool)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.cs new file mode 100644 index 000000000000..7f2d03b3a907 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPool.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.ApiManagement.Models +{ + /// Backend pool information. + internal partial class BackendPool + { + /// + /// 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 . + public BackendPool() + { + Services = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The list of backend entities belonging to a pool. + /// Keeps track of any properties unknown to the library. + internal BackendPool(IList services, IDictionary serializedAdditionalRawData) + { + Services = services; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The list of backend entities belonging to a pool. + [WirePath("services")] + public IList Services { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.Serialization.cs new file mode 100644 index 000000000000..6c02a5d846b9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class BackendPoolItem : 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(BackendPoolItem)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + if (Optional.IsDefined(Weight)) + { + writer.WritePropertyName("weight"u8); + writer.WriteNumberValue(Weight.Value); + } + if (Optional.IsDefined(Priority)) + { + writer.WritePropertyName("priority"u8); + writer.WriteNumberValue(Priority.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 + } + } + } + + BackendPoolItem 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(BackendPoolItem)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBackendPoolItem(document.RootElement, options); + } + + internal static BackendPoolItem DeserializeBackendPoolItem(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + int? weight = default; + int? priority = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("weight"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + weight = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("priority"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + priority = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BackendPoolItem(id, weight, priority, 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(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Weight), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" weight: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Weight)) + { + builder.Append(" weight: "); + builder.AppendLine($"{Weight.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Priority), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" priority: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Priority)) + { + builder.Append(" priority: "); + builder.AppendLine($"{Priority.Value}"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(BackendPoolItem)} does not support writing '{options.Format}' format."); + } + } + + BackendPoolItem 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 DeserializeBackendPoolItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BackendPoolItem)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.cs new file mode 100644 index 000000000000..a132e6933c1c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendPoolItem.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.ApiManagement.Models +{ + /// Backend pool service information. + public partial class BackendPoolItem + { + /// + /// 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 ARM id of the backend entity. The ARM id should refer to an already existing backend entity. + /// is null. + public BackendPoolItem(ResourceIdentifier id) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + } + + /// Initializes a new instance of . + /// The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity. + /// The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. + /// The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. + /// Keeps track of any properties unknown to the library. + internal BackendPoolItem(ResourceIdentifier id, int? weight, int? priority, IDictionary serializedAdditionalRawData) + { + Id = id; + Weight = weight; + Priority = priority; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BackendPoolItem() + { + } + + /// The unique ARM id of the backend entity. The ARM id should refer to an already existing backend entity. + [WirePath("id")] + public ResourceIdentifier Id { get; set; } + /// The weight of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. + [WirePath("weight")] + public int? Weight { get; set; } + /// The priority of the backend entity in the backend pool. Must be between 0 and 100. It can be also null if the value not specified. + [WirePath("priority")] + public int? Priority { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendType.cs new file mode 100644 index 000000000000..5e765556e67e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/BackendType.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.ApiManagement.Models +{ + /// Type of the backend. A backend can be either Single or Pool. + public readonly partial struct BackendType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BackendType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SingleValue = "Single"; + private const string PoolValue = "Pool"; + + /// supports single backend. + public static BackendType Single { get; } = new BackendType(SingleValue); + /// supports pool backend. + public static BackendType Pool { get; } = new BackendType(PoolValue); + /// Determines if two values are the same. + public static bool operator ==(BackendType left, BackendType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BackendType left, BackendType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BackendType(string value) => new BackendType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BackendType other && Equals(other); + /// + public bool Equals(BackendType 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.Serialization.cs index 88cdcb505eb6..8339486f335f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.Serialization.cs @@ -50,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("tripDuration"u8); writer.WriteStringValue(TripDuration.Value, "P"); } + if (Optional.IsDefined(AcceptRetryAfter)) + { + writer.WritePropertyName("acceptRetryAfter"u8); + writer.WriteBooleanValue(AcceptRetryAfter.Value); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -90,6 +95,7 @@ internal static CircuitBreakerRule DeserializeCircuitBreakerRule(JsonElement ele string name = default; CircuitBreakerFailureCondition failureCondition = default; TimeSpan? tripDuration = default; + bool? acceptRetryAfter = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,13 +123,22 @@ internal static CircuitBreakerRule DeserializeCircuitBreakerRule(JsonElement ele tripDuration = property.Value.GetTimeSpan("P"); continue; } + if (property.NameEquals("acceptRetryAfter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + acceptRetryAfter = property.Value.GetBoolean(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CircuitBreakerRule(name, failureCondition, tripDuration, serializedAdditionalRawData); + return new CircuitBreakerRule(name, failureCondition, tripDuration, acceptRetryAfter, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -191,6 +206,22 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AcceptRetryAfter), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" acceptRetryAfter: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AcceptRetryAfter)) + { + builder.Append(" acceptRetryAfter: "); + var boolValue = AcceptRetryAfter.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.cs index 0427a991c646..216a3143ba35 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/CircuitBreakerRule.cs @@ -54,12 +54,14 @@ public CircuitBreakerRule() /// The rule name. /// The conditions for tripping the circuit breaker. /// The duration for which the circuit will be tripped. + /// flag to accept Retry-After header from the backend. /// Keeps track of any properties unknown to the library. - internal CircuitBreakerRule(string name, CircuitBreakerFailureCondition failureCondition, TimeSpan? tripDuration, IDictionary serializedAdditionalRawData) + internal CircuitBreakerRule(string name, CircuitBreakerFailureCondition failureCondition, TimeSpan? tripDuration, bool? acceptRetryAfter, IDictionary serializedAdditionalRawData) { Name = name; FailureCondition = failureCondition; TripDuration = tripDuration; + AcceptRetryAfter = acceptRetryAfter; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,5 +74,8 @@ internal CircuitBreakerRule(string name, CircuitBreakerFailureCondition failureC /// The duration for which the circuit will be tripped. [WirePath("tripDuration")] public TimeSpan? TripDuration { get; set; } + /// flag to accept Retry-After header from the backend. + [WirePath("acceptRetryAfter")] + public bool? AcceptRetryAfter { get; set; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentFormat.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentFormat.cs index aa7627f4f4bc..f1bf39774e25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentFormat.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ContentFormat.cs @@ -35,6 +35,8 @@ public ContentFormat(string value) private const string GraphQLLinkValue = "graphql-link"; private const string OdataValue = "odata"; private const string OdataLinkValue = "odata-link"; + private const string GrpcValue = "grpc"; + private const string GrpcLinkValue = "grpc-link"; /// The contents are inline and Content type is a WADL document. public static ContentFormat WadlXml { get; } = new ContentFormat(WadlXmlValue); @@ -62,6 +64,10 @@ public ContentFormat(string value) public static ContentFormat Odata { get; } = new ContentFormat(OdataValue); /// The OData metadata document hosted on a publicly accessible internet address. public static ContentFormat OdataLink { get; } = new ContentFormat(OdataLinkValue); + /// The contents are inline and Content Type is a gRPC protobuf file. + public static ContentFormat Grpc { get; } = new ContentFormat(GrpcValue); + /// The gRPC protobuf file is hosted on a publicly accessible internet address. + public static ContentFormat GrpcLink { get; } = new ContentFormat(GrpcLinkValue); /// Determines if two values are the same. public static bool operator ==(ContentFormat left, ContentFormat right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.Serialization.cs new file mode 100644 index 000000000000..563123d7fcc5 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.Serialization.cs @@ -0,0 +1,543 @@ +// Copyright (c) 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.ApiManagement.Models +{ + public partial class DiagnosticUpdateContract : 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(DiagnosticUpdateContract)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(AlwaysLog)) + { + writer.WritePropertyName("alwaysLog"u8); + writer.WriteStringValue(AlwaysLog.Value.ToString()); + } + if (Optional.IsDefined(LoggerId)) + { + writer.WritePropertyName("loggerId"u8); + writer.WriteStringValue(LoggerId); + } + if (Optional.IsDefined(Sampling)) + { + writer.WritePropertyName("sampling"u8); + writer.WriteObjectValue(Sampling, options); + } + if (Optional.IsDefined(Frontend)) + { + writer.WritePropertyName("frontend"u8); + writer.WriteObjectValue(Frontend, options); + } + if (Optional.IsDefined(Backend)) + { + writer.WritePropertyName("backend"u8); + writer.WriteObjectValue(Backend, options); + } + if (Optional.IsDefined(IsLogClientIPEnabled)) + { + writer.WritePropertyName("logClientIp"u8); + writer.WriteBooleanValue(IsLogClientIPEnabled.Value); + } + if (Optional.IsDefined(HttpCorrelationProtocol)) + { + writer.WritePropertyName("httpCorrelationProtocol"u8); + writer.WriteStringValue(HttpCorrelationProtocol.Value.ToString()); + } + if (Optional.IsDefined(Verbosity)) + { + writer.WritePropertyName("verbosity"u8); + writer.WriteStringValue(Verbosity.Value.ToString()); + } + if (Optional.IsDefined(OperationNameFormat)) + { + writer.WritePropertyName("operationNameFormat"u8); + writer.WriteStringValue(OperationNameFormat.Value.ToString()); + } + if (Optional.IsDefined(Metrics)) + { + writer.WritePropertyName("metrics"u8); + writer.WriteBooleanValue(Metrics.Value); + } + writer.WriteEndObject(); + } + + DiagnosticUpdateContract 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(DiagnosticUpdateContract)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiagnosticUpdateContract(document.RootElement, options); + } + + internal static DiagnosticUpdateContract DeserializeDiagnosticUpdateContract(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + AlwaysLog? alwaysLog = default; + string loggerId = default; + SamplingSettings sampling = default; + PipelineDiagnosticSettings frontend = default; + PipelineDiagnosticSettings backend = default; + bool? logClientIP = default; + HttpCorrelationProtocol? httpCorrelationProtocol = default; + TraceVerbosityLevel? verbosity = default; + OperationNameFormat? operationNameFormat = default; + bool? metrics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("alwaysLog"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysLog = new AlwaysLog(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("loggerId"u8)) + { + loggerId = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("sampling"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sampling = SamplingSettings.DeserializeSamplingSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("frontend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + frontend = PipelineDiagnosticSettings.DeserializePipelineDiagnosticSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("backend"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backend = PipelineDiagnosticSettings.DeserializePipelineDiagnosticSettings(property0.Value, options); + continue; + } + if (property0.NameEquals("logClientIp"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + logClientIP = property0.Value.GetBoolean(); + continue; + } + if (property0.NameEquals("httpCorrelationProtocol"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + httpCorrelationProtocol = new HttpCorrelationProtocol(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("verbosity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + verbosity = new TraceVerbosityLevel(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("operationNameFormat"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationNameFormat = new OperationNameFormat(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("metrics"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + metrics = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiagnosticUpdateContract( + id, + name, + type, + systemData, + alwaysLog, + loggerId, + sampling, + frontend, + backend, + logClientIP, + httpCorrelationProtocol, + verbosity, + operationNameFormat, + metrics, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AlwaysLog), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" alwaysLog: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(AlwaysLog)) + { + builder.Append(" alwaysLog: "); + builder.AppendLine($"'{AlwaysLog.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(LoggerId), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" loggerId: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(LoggerId)) + { + builder.Append(" loggerId: "); + if (LoggerId.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{LoggerId}'''"); + } + else + { + builder.AppendLine($"'{LoggerId}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Sampling), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sampling: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Sampling)) + { + builder.Append(" sampling: "); + BicepSerializationHelpers.AppendChildObject(builder, Sampling, options, 4, false, " sampling: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Frontend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" frontend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Frontend)) + { + builder.Append(" frontend: "); + BicepSerializationHelpers.AppendChildObject(builder, Frontend, options, 4, false, " frontend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Backend), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" backend: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Backend)) + { + builder.Append(" backend: "); + BicepSerializationHelpers.AppendChildObject(builder, Backend, options, 4, false, " backend: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsLogClientIPEnabled), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" logClientIp: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsLogClientIPEnabled)) + { + builder.Append(" logClientIp: "); + var boolValue = IsLogClientIPEnabled.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(HttpCorrelationProtocol), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(HttpCorrelationProtocol)) + { + builder.Append(" httpCorrelationProtocol: "); + builder.AppendLine($"'{HttpCorrelationProtocol.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Verbosity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" verbosity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Verbosity)) + { + builder.Append(" verbosity: "); + builder.AppendLine($"'{Verbosity.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationNameFormat), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationNameFormat)) + { + builder.Append(" operationNameFormat: "); + builder.AppendLine($"'{OperationNameFormat.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Metrics), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" metrics: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Metrics)) + { + builder.Append(" metrics: "); + var boolValue = Metrics.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(DiagnosticUpdateContract)} does not support writing '{options.Format}' format."); + } + } + + DiagnosticUpdateContract 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 DeserializeDiagnosticUpdateContract(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiagnosticUpdateContract)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.cs new file mode 100644 index 000000000000..04f1d1aa5f47 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/DiagnosticUpdateContract.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 Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + /// Diagnostic details. + public partial class DiagnosticUpdateContract : 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 DiagnosticUpdateContract() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Specifies for what type of messages sampling settings should not apply. + /// Resource Id of a target logger. + /// Sampling settings for Diagnostic. + /// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + /// Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + /// Log the ClientIP. Default is false. + /// Sets correlation protocol to use for Application Insights diagnostics. + /// The verbosity level applied to traces emitted by trace policies. + /// The format of the Operation Name for Application Insights telemetries. Default is Name. + /// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + /// Keeps track of any properties unknown to the library. + internal DiagnosticUpdateContract(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AlwaysLog? alwaysLog, string loggerId, SamplingSettings sampling, PipelineDiagnosticSettings frontend, PipelineDiagnosticSettings backend, bool? isLogClientIPEnabled, HttpCorrelationProtocol? httpCorrelationProtocol, TraceVerbosityLevel? verbosity, OperationNameFormat? operationNameFormat, bool? metrics, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + AlwaysLog = alwaysLog; + LoggerId = loggerId; + Sampling = sampling; + Frontend = frontend; + Backend = backend; + IsLogClientIPEnabled = isLogClientIPEnabled; + HttpCorrelationProtocol = httpCorrelationProtocol; + Verbosity = verbosity; + OperationNameFormat = operationNameFormat; + Metrics = metrics; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Specifies for what type of messages sampling settings should not apply. + [WirePath("properties.alwaysLog")] + public AlwaysLog? AlwaysLog { get; set; } + /// Resource Id of a target logger. + [WirePath("properties.loggerId")] + public string LoggerId { get; set; } + /// Sampling settings for Diagnostic. + [WirePath("properties.sampling")] + public SamplingSettings Sampling { get; set; } + /// Diagnostic settings for incoming/outgoing HTTP messages to the Gateway. + [WirePath("properties.frontend")] + public PipelineDiagnosticSettings Frontend { get; set; } + /// Diagnostic settings for incoming/outgoing HTTP messages to the Backend. + [WirePath("properties.backend")] + public PipelineDiagnosticSettings Backend { get; set; } + /// Log the ClientIP. Default is false. + [WirePath("properties.logClientIp")] + public bool? IsLogClientIPEnabled { get; set; } + /// Sets correlation protocol to use for Application Insights diagnostics. + [WirePath("properties.httpCorrelationProtocol")] + public HttpCorrelationProtocol? HttpCorrelationProtocol { get; set; } + /// The verbosity level applied to traces emitted by trace policies. + [WirePath("properties.verbosity")] + public TraceVerbosityLevel? Verbosity { get; set; } + /// The format of the Operation Name for Application Insights telemetries. Default is Name. + [WirePath("properties.operationNameFormat")] + public OperationNameFormat? OperationNameFormat { get; set; } + /// Emit custom metrics via emit-metric policy. Applicable only to Application Insights diagnostic settings. + [WirePath("properties.metrics")] + public bool? Metrics { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.Serialization.cs new file mode 100644 index 000000000000..34e3fac63fa6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class FrontendConfiguration : 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(FrontendConfiguration)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(DefaultHostname)) + { + writer.WritePropertyName("defaultHostname"u8); + writer.WriteStringValue(DefaultHostname); + } + 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 + } + } + } + + FrontendConfiguration 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(FrontendConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFrontendConfiguration(document.RootElement, options); + } + + internal static FrontendConfiguration DeserializeFrontendConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string defaultHostname = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("defaultHostname"u8)) + { + defaultHostname = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FrontendConfiguration(defaultHostname, 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(DefaultHostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" defaultHostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(DefaultHostname)) + { + builder.Append(" defaultHostname: "); + if (DefaultHostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{DefaultHostname}'''"); + } + else + { + builder.AppendLine($"'{DefaultHostname}'"); + } + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(FrontendConfiguration)} does not support writing '{options.Format}' format."); + } + } + + FrontendConfiguration 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 DeserializeFrontendConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FrontendConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.cs new file mode 100644 index 000000000000..b5f2ed3eafb6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/FrontendConfiguration.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.ApiManagement.Models +{ + /// Information regarding how the gateway should be exposed. + internal partial class FrontendConfiguration + { + /// + /// 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 FrontendConfiguration() + { + } + + /// Initializes a new instance of . + /// The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. + /// Keeps track of any properties unknown to the library. + internal FrontendConfiguration(string defaultHostname, IDictionary serializedAdditionalRawData) + { + DefaultHostname = defaultHostname; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The default hostname of the data-plane gateway to which requests can be sent. This is only applicable for API gateway with Standard SKU. + [WirePath("defaultHostname")] + public string DefaultHostname { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs index e871cabc31e1..0a0e47aae4b2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.Serialization.cs @@ -150,6 +150,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("apiVersionSet"u8); writer.WriteObjectValue(ApiVersionSet, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -198,6 +203,7 @@ internal static GatewayApiData DeserializeGatewayApiData(JsonElement element, Mo string path = default; IList protocols = default; ApiVersionSetContractDetails apiVersionSet = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -393,6 +399,11 @@ internal static GatewayApiData DeserializeGatewayApiData(JsonElement element, Mo apiVersionSet = ApiVersionSetContractDetails.DeserializeApiVersionSetContractDetails(property0.Value, options); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -428,6 +439,7 @@ internal static GatewayApiData DeserializeGatewayApiData(JsonElement element, Mo path, protocols ?? new ChangeTrackingList(), apiVersionSet, + provisioningState, serializedAdditionalRawData); } @@ -895,6 +907,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs index 42bb9873b5b6..c435bcec88a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayApiData.cs @@ -79,8 +79,9 @@ public GatewayApiData() /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -103,6 +104,7 @@ internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourc Path = path; Protocols = protocols; ApiVersionSet = apiVersionSet; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -169,5 +171,8 @@ internal GatewayApiData(ResourceIdentifier id, string name, ResourceType resourc /// Version set details. [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.Serialization.cs new file mode 100644 index 000000000000..e5a9cd57280c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class GatewayConfigurationApi : 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(GatewayConfigurationApi)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + 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 + } + } + } + + GatewayConfigurationApi 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(GatewayConfigurationApi)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayConfigurationApi(document.RootElement, options); + } + + internal static GatewayConfigurationApi DeserializeGatewayConfigurationApi(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string hostname = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewayConfigurationApi(hostname, 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(Hostname), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" hostname: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Hostname)) + { + builder.Append(" hostname: "); + if (Hostname.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Hostname}'''"); + } + else + { + builder.AppendLine($"'{Hostname}'"); + } + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewayConfigurationApi)} does not support writing '{options.Format}' format."); + } + } + + GatewayConfigurationApi 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 DeserializeGatewayConfigurationApi(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayConfigurationApi)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.cs new file mode 100644 index 000000000000..ec84a72f538b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayConfigurationApi.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.ApiManagement.Models +{ + /// Information regarding the Configuration API of the API Management gateway. This is only applicable for API gateway with Standard SKU. + internal partial class GatewayConfigurationApi + { + /// + /// 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 GatewayConfigurationApi() + { + } + + /// Initializes a new instance of . + /// Hostname to which the agent connects to propagate configuration to the cloud. + /// Keeps track of any properties unknown to the library. + internal GatewayConfigurationApi(string hostname, IDictionary serializedAdditionalRawData) + { + Hostname = hostname; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Hostname to which the agent connects to propagate configuration to the cloud. + [WirePath("hostname")] + public string Hostname { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.Serialization.cs new file mode 100644 index 000000000000..9b274e95ea75 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.Serialization.cs @@ -0,0 +1,233 @@ +// Copyright (c) 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.ApiManagement.Models +{ + public partial class GatewayResourceSkuResult : 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(GatewayResourceSkuResult)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("resourceType"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } + if (options.Format != "W" && Optional.IsDefined(Capacity)) + { + writer.WritePropertyName("capacity"u8); + writer.WriteObjectValue(Capacity, 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 + } + } + } + + GatewayResourceSkuResult 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(GatewayResourceSkuResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayResourceSkuResult(document.RootElement, options); + } + + internal static GatewayResourceSkuResult DeserializeGatewayResourceSkuResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string resourceType = default; + GatewaySku sku = default; + GatewaySkuCapacity capacity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceType"u8)) + { + resourceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = GatewaySku.DeserializeGatewaySku(property.Value, options); + continue; + } + if (property.NameEquals("capacity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + capacity = GatewaySkuCapacity.DeserializeGatewaySkuCapacity(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewayResourceSkuResult(resourceType, sku, capacity, 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(ResourceType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" resourceType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ResourceType)) + { + builder.Append(" resourceType: "); + if (ResourceType.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ResourceType}'''"); + } + else + { + builder.AppendLine($"'{ResourceType}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue("SkuName", out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" sku: "); + builder.AppendLine("{"); + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + builder.AppendLine(" }"); + } + else + { + if (Optional.IsDefined(Sku)) + { + builder.Append(" sku: "); + BicepSerializationHelpers.AppendChildObject(builder, Sku, options, 2, false, " sku: "); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Capacity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" capacity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Capacity)) + { + builder.Append(" capacity: "); + BicepSerializationHelpers.AppendChildObject(builder, Capacity, options, 2, false, " capacity: "); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewayResourceSkuResult)} does not support writing '{options.Format}' format."); + } + } + + GatewayResourceSkuResult 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 DeserializeGatewayResourceSkuResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayResourceSkuResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.cs new file mode 100644 index 000000000000..effb2b4c71b0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResult.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.ApiManagement.Models +{ + /// Describes an available API Management gateway SKU. + public partial class GatewayResourceSkuResult + { + /// + /// 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 GatewayResourceSkuResult() + { + } + + /// Initializes a new instance of . + /// The type of resource the SKU applies to. + /// Specifies API Management gateway SKU. + /// Specifies the number of API Management gateway units. + /// Keeps track of any properties unknown to the library. + internal GatewayResourceSkuResult(string resourceType, GatewaySku sku, GatewaySkuCapacity capacity, IDictionary serializedAdditionalRawData) + { + ResourceType = resourceType; + Sku = sku; + Capacity = capacity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of resource the SKU applies to. + [WirePath("resourceType")] + public string ResourceType { get; } + /// Specifies API Management gateway SKU. + internal GatewaySku Sku { get; } + /// Name of the Sku. + [WirePath("sku.name")] + public ApiGatewaySkuType? SkuName + { + get => Sku?.Name; + } + + /// Specifies the number of API Management gateway units. + [WirePath("capacity")] + public GatewaySkuCapacity Capacity { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.Serialization.cs new file mode 100644 index 000000000000..62a35684642f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.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.Linq; +using System.Text; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + internal partial class GatewayResourceSkuResults : 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(GatewayResourceSkuResults)} 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); + } + 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 + } + } + } + + GatewayResourceSkuResults 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(GatewayResourceSkuResults)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewayResourceSkuResults(document.RootElement, options); + } + + internal static GatewayResourceSkuResults DeserializeGatewayResourceSkuResults(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)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(GatewayResourceSkuResult.DeserializeGatewayResourceSkuResult(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 GatewayResourceSkuResults(value, 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewayResourceSkuResults)} does not support writing '{options.Format}' format."); + } + } + + GatewayResourceSkuResults 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 DeserializeGatewayResourceSkuResults(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewayResourceSkuResults)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.cs new file mode 100644 index 000000000000..88aa1163e041 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewayResourceSkuResults.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.ApiManagement.Models +{ + /// The API Management gateway SKUs operation response. + internal partial class GatewayResourceSkuResults + { + /// + /// 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 skus available for the gateway. + /// is null. + internal GatewayResourceSkuResults(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The list of skus available for the gateway. + /// The uri to fetch the next page of API Management gateway Skus. + /// Keeps track of any properties unknown to the library. + internal GatewayResourceSkuResults(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GatewayResourceSkuResults() + { + } + + /// The list of skus available for the gateway. + public IReadOnlyList Value { get; } + /// The uri to fetch the next page of API Management gateway Skus. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.Serialization.cs new file mode 100644 index 000000000000..9422486c5230 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.Serialization.cs @@ -0,0 +1,166 @@ +// Copyright (c) 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.ApiManagement.Models +{ + internal partial class GatewaySku : 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(GatewaySku)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name.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 + } + } + } + + GatewaySku 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(GatewaySku)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewaySku(document.RootElement, options); + } + + internal static GatewaySku DeserializeGatewaySku(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiGatewaySkuType? name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = new ApiGatewaySkuType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewaySku(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(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + builder.AppendLine($"'{Name.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewaySku)} does not support writing '{options.Format}' format."); + } + } + + GatewaySku 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 DeserializeGatewaySku(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewaySku)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.cs new file mode 100644 index 000000000000..d81e8af90f0e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySku.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.ApiManagement.Models +{ + /// Describes an available API Management SKU for gateways. + internal partial class GatewaySku + { + /// + /// 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 GatewaySku() + { + } + + /// Initializes a new instance of . + /// Name of the Sku. + /// Keeps track of any properties unknown to the library. + internal GatewaySku(ApiGatewaySkuType? name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the Sku. + [WirePath("name")] + public ApiGatewaySkuType? Name { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.Serialization.cs new file mode 100644 index 000000000000..8475e72ff509 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.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; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.ApiManagement.Models +{ + public partial class GatewaySkuCapacity : 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(GatewaySkuCapacity)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Minimum)) + { + writer.WritePropertyName("minimum"u8); + writer.WriteNumberValue(Minimum.Value); + } + if (options.Format != "W" && Optional.IsDefined(Maximum)) + { + writer.WritePropertyName("maximum"u8); + writer.WriteNumberValue(Maximum.Value); + } + if (options.Format != "W" && Optional.IsDefined(Default)) + { + writer.WritePropertyName("default"u8); + writer.WriteNumberValue(Default.Value); + } + if (options.Format != "W" && Optional.IsDefined(ScaleType)) + { + writer.WritePropertyName("scaleType"u8); + writer.WriteStringValue(ScaleType.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 + } + } + } + + GatewaySkuCapacity 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(GatewaySkuCapacity)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGatewaySkuCapacity(document.RootElement, options); + } + + internal static GatewaySkuCapacity DeserializeGatewaySkuCapacity(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? minimum = default; + int? maximum = default; + int? @default = default; + GatewaySkuCapacityScaleType? scaleType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimum"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maximum"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maximum = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("default"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @default = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scaleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scaleType = new GatewaySkuCapacityScaleType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GatewaySkuCapacity(minimum, maximum, @default, scaleType, 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(Minimum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" minimum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Minimum)) + { + builder.Append(" minimum: "); + builder.AppendLine($"{Minimum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Maximum), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" maximum: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Maximum)) + { + builder.Append(" maximum: "); + builder.AppendLine($"{Maximum.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" default: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Default)) + { + builder.Append(" default: "); + builder.AppendLine($"{Default.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScaleType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scaleType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ScaleType)) + { + builder.Append(" scaleType: "); + builder.AppendLine($"'{ScaleType.Value.ToString()}'"); + } + } + + builder.AppendLine("}"); + return BinaryData.FromString(builder.ToString()); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(GatewaySkuCapacity)} does not support writing '{options.Format}' format."); + } + } + + GatewaySkuCapacity 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 DeserializeGatewaySkuCapacity(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GatewaySkuCapacity)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.cs new file mode 100644 index 000000000000..ab3e1d37531f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacity.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.ApiManagement.Models +{ + /// Describes scaling information of a SKU. + public partial class GatewaySkuCapacity + { + /// + /// 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 GatewaySkuCapacity() + { + } + + /// Initializes a new instance of . + /// The minimum capacity. + /// The maximum capacity that can be set. + /// The default capacity. + /// The scale type applicable to the sku. + /// Keeps track of any properties unknown to the library. + internal GatewaySkuCapacity(int? minimum, int? maximum, int? @default, GatewaySkuCapacityScaleType? scaleType, IDictionary serializedAdditionalRawData) + { + Minimum = minimum; + Maximum = maximum; + Default = @default; + ScaleType = scaleType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minimum capacity. + [WirePath("minimum")] + public int? Minimum { get; } + /// The maximum capacity that can be set. + [WirePath("maximum")] + public int? Maximum { get; } + /// The default capacity. + [WirePath("default")] + public int? Default { get; } + /// The scale type applicable to the sku. + [WirePath("scaleType")] + public GatewaySkuCapacityScaleType? ScaleType { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacityScaleType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacityScaleType.cs new file mode 100644 index 000000000000..0d4a5ee2909e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/GatewaySkuCapacityScaleType.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.ApiManagement.Models +{ + /// The scale type applicable to the sku. + public readonly partial struct GatewaySkuCapacityScaleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GatewaySkuCapacityScaleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AutomaticValue = "Automatic"; + private const string ManualValue = "Manual"; + private const string NoneValue = "None"; + + /// Supported scale type automatic. + public static GatewaySkuCapacityScaleType Automatic { get; } = new GatewaySkuCapacityScaleType(AutomaticValue); + /// Supported scale type manual. + public static GatewaySkuCapacityScaleType Manual { get; } = new GatewaySkuCapacityScaleType(ManualValue); + /// Scaling not supported. + public static GatewaySkuCapacityScaleType None { get; } = new GatewaySkuCapacityScaleType(NoneValue); + /// Determines if two values are the same. + public static bool operator ==(GatewaySkuCapacityScaleType left, GatewaySkuCapacityScaleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GatewaySkuCapacityScaleType left, GatewaySkuCapacityScaleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GatewaySkuCapacityScaleType(string value) => new GatewaySkuCapacityScaleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GatewaySkuCapacityScaleType other && Equals(other); + /// + public bool Equals(GatewaySkuCapacityScaleType 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyComplianceState.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyComplianceState.cs new file mode 100644 index 000000000000..cba53fe82e29 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyComplianceState.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.ApiManagement.Models +{ + /// Policy Restriction Compliance State. + public readonly partial struct PolicyComplianceState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyComplianceState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingValue = "Pending"; + private const string NonCompliantValue = "NonCompliant"; + private const string CompliantValue = "Compliant"; + + /// The policy restriction compliance state has not yet been determined. + public static PolicyComplianceState Pending { get; } = new PolicyComplianceState(PendingValue); + /// The scope in restriction is out of compliance. + public static PolicyComplianceState NonCompliant { get; } = new PolicyComplianceState(NonCompliantValue); + /// The scope in restriction is in compliance. + public static PolicyComplianceState Compliant { get; } = new PolicyComplianceState(CompliantValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyComplianceState left, PolicyComplianceState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyComplianceState left, PolicyComplianceState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyComplianceState(string value) => new PolicyComplianceState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyComplianceState other && Equals(other); + /// + public bool Equals(PolicyComplianceState 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.Serialization.cs new file mode 100644 index 000000000000..33aeca62d86d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.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.ApiManagement.Models +{ + public partial class PolicyRestrictionContractPatch : 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(PolicyRestrictionContractPatch)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Scope)) + { + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope); + } + if (Optional.IsDefined(RequireBase)) + { + writer.WritePropertyName("requireBase"u8); + writer.WriteStringValue(RequireBase.Value.ToString()); + } + 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 + } + } + } + + PolicyRestrictionContractPatch 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(PolicyRestrictionContractPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyRestrictionContractPatch(document.RootElement, options); + } + + internal static PolicyRestrictionContractPatch DeserializePolicyRestrictionContractPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string scope = default; + PolicyRestrictionRequireBase? requireBase = 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) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("scope"u8)) + { + scope = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requireBase"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requireBase = new PolicyRestrictionRequireBase(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyRestrictionContractPatch(scope, requireBase, 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, AzureResourceManagerApiManagementContext.Default); + default: + throw new FormatException($"The model {nameof(PolicyRestrictionContractPatch)} does not support writing '{options.Format}' format."); + } + } + + PolicyRestrictionContractPatch 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 DeserializePolicyRestrictionContractPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyRestrictionContractPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.cs new file mode 100644 index 000000000000..8823038e9e23 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionContractPatch.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.ApiManagement.Models +{ + /// Policy restriction contract details. + public partial class PolicyRestrictionContractPatch + { + /// + /// 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 PolicyRestrictionContractPatch() + { + } + + /// Initializes a new instance of . + /// Path to the policy document. + /// Indicates if base policy should be enforced for the policy document. + /// Keeps track of any properties unknown to the library. + internal PolicyRestrictionContractPatch(string scope, PolicyRestrictionRequireBase? requireBase, IDictionary serializedAdditionalRawData) + { + Scope = scope; + RequireBase = requireBase; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Path to the policy document. + [WirePath("properties.scope")] + public string Scope { get; set; } + /// Indicates if base policy should be enforced for the policy document. + [WirePath("properties.requireBase")] + public PolicyRestrictionRequireBase? RequireBase { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.Serialization.cs new file mode 100644 index 000000000000..b8ab6e7a2aba --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.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.ApiManagement.Models +{ + internal partial class PolicyRestrictionListResult : 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(PolicyRestrictionListResult)} 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 + } + } + } + + PolicyRestrictionListResult 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(PolicyRestrictionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyRestrictionListResult(document.RootElement, options); + } + + internal static PolicyRestrictionListResult DeserializePolicyRestrictionListResult(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(PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(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 PolicyRestrictionListResult(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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PolicyRestrictionListResult)} does not support writing '{options.Format}' format."); + } + } + + PolicyRestrictionListResult 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 DeserializePolicyRestrictionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyRestrictionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.cs new file mode 100644 index 000000000000..e1d0ee691c25 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionListResult.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.ApiManagement.Models +{ + /// The response of the get policy restrictions operation. + internal partial class PolicyRestrictionListResult + { + /// + /// 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 PolicyRestrictionListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Next page link if any. + /// Keeps track of any properties unknown to the library. + internal PolicyRestrictionListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the value. + public IReadOnlyList Value { get; } + /// Next page link if any. + public string NextLink { get; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionRequireBase.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionRequireBase.cs new file mode 100644 index 000000000000..c90956055fd9 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/PolicyRestrictionRequireBase.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.ApiManagement.Models +{ + /// Indicates if base policy should be enforced for the policy document. + public readonly partial struct PolicyRestrictionRequireBase : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PolicyRestrictionRequireBase(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "true"; + private const string FalseValue = "false"; + + /// The policy is required to have base policy. + public static PolicyRestrictionRequireBase True { get; } = new PolicyRestrictionRequireBase(TrueValue); + /// The policy does not require to have base policy. + public static PolicyRestrictionRequireBase False { get; } = new PolicyRestrictionRequireBase(FalseValue); + /// Determines if two values are the same. + public static bool operator ==(PolicyRestrictionRequireBase left, PolicyRestrictionRequireBase right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PolicyRestrictionRequireBase left, PolicyRestrictionRequireBase right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PolicyRestrictionRequireBase(string value) => new PolicyRestrictionRequireBase(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PolicyRestrictionRequireBase other && Equals(other); + /// + public bool Equals(PolicyRestrictionRequireBase 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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs index 7fb7bbee940a..50a2d5d2c576 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.Serialization.cs @@ -150,6 +150,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("apiVersionSet"u8); writer.WriteObjectValue(ApiVersionSet, options); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -198,6 +203,7 @@ internal static ProductApiData DeserializeProductApiData(JsonElement element, Mo string path = default; IList protocols = default; ApiVersionSetContractDetails apiVersionSet = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -393,6 +399,11 @@ internal static ProductApiData DeserializeProductApiData(JsonElement element, Mo apiVersionSet = ApiVersionSetContractDetails.DeserializeApiVersionSetContractDetails(property0.Value, options); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -428,6 +439,7 @@ internal static ProductApiData DeserializeProductApiData(JsonElement element, Mo path, protocols ?? new ChangeTrackingList(), apiVersionSet, + provisioningState, serializedAdditionalRawData); } @@ -895,6 +907,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs index 54b66e6ee0a8..4f1de9f6172a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/ProductApiData.cs @@ -79,8 +79,9 @@ public ProductApiData() /// Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API. /// Describes on which protocols the operations in this API can be invoked. /// Version set details. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string description, AuthenticationSettingsContract authenticationSettings, SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames, ApiType? apiType, string apiRevision, string apiVersion, bool? isCurrent, bool? isOnline, string apiRevisionDescription, string apiVersionDescription, ResourceIdentifier apiVersionSetId, bool? isSubscriptionRequired, string termsOfServiceLink, ApiContactInformation contact, ApiLicenseInformation license, ResourceIdentifier sourceApiId, string displayName, string serviceLink, string path, IList protocols, ApiVersionSetContractDetails apiVersionSet, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Description = description; AuthenticationSettings = authenticationSettings; @@ -103,6 +104,7 @@ internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourc Path = path; Protocols = protocols; ApiVersionSet = apiVersionSet; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -169,5 +171,8 @@ internal ProductApiData(ResourceIdentifier id, string name, ResourceType resourc /// Version set details. [WirePath("properties.apiVersionSet")] public ApiVersionSetContractDetails ApiVersionSet { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SoapApiType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SoapApiType.cs index ef0f8c5ff9f7..6abf24a662b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SoapApiType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/SoapApiType.cs @@ -34,6 +34,7 @@ public SoapApiType(string value) private const string WebSocketValue = "websocket"; private const string GraphQLValue = "graphql"; private const string ODataValue = "odata"; + private const string GrpcValue = "grpc"; /// Imports a SOAP API having a RESTful front end. public static SoapApiType SoapToRest { get; } = new SoapApiType(SoapToRestValue); @@ -45,6 +46,8 @@ public SoapApiType(string value) public static SoapApiType GraphQL { get; } = new SoapApiType(GraphQLValue); /// Imports the API having a OData front end. public static SoapApiType OData { get; } = new SoapApiType(ODataValue); + /// Imports the API having a gRPC front end. + public static SoapApiType Grpc { get; } = new SoapApiType(GrpcValue); /// Determines if two values are the same. public static bool operator ==(SoapApiType left, SoapApiType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkType.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkType.cs index 3c863415cbd5..c4f6a53d87e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkType.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/Models/VirtualNetworkType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ApiManagement.Models { - /// The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. + /// The type of VPN in which API Management gateway needs to be configured in. public readonly partial struct VirtualNetworkType : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public VirtualNetworkType(string value) private const string ExternalValue = "External"; private const string InternalValue = "Internal"; - /// The service is not part of any Virtual Network. + /// The API Management gateway is not part of any Virtual Network. public static VirtualNetworkType None { get; } = new VirtualNetworkType(NoneValue); - /// The service is part of Virtual Network and it is accessible from Internet. + /// The API Management gateway is part of Virtual Network and it is accessible from Internet. public static VirtualNetworkType External { get; } = new VirtualNetworkType(ExternalValue); - /// The service is part of Virtual Network and it is only accessible from within the virtual network. + /// The API Management gateway is part of Virtual Network and it is only accessible from within the virtual network. public static VirtualNetworkType Internal { get; } = new VirtualNetworkType(InternalValue); /// Determines if two values are the same. public static bool operator ==(VirtualNetworkType left, VirtualNetworkType right) => left.Equals(right); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs index 0741574240f4..8417765b9e94 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string id, PolicyFra /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = n /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string id, PolicyFragmentC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string id, PolicyFragmentContentFormat? for /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs index 7572bee4fbbd..f27312917626 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.Serialization.cs @@ -55,6 +55,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("format"u8); writer.WriteStringValue(Format.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState); + } writer.WriteEndObject(); } @@ -85,6 +90,7 @@ internal static PolicyFragmentContractData DeserializePolicyFragmentContractData string value = default; string description = default; PolicyFragmentContentFormat? format = default; + string provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -141,6 +147,11 @@ internal static PolicyFragmentContractData DeserializePolicyFragmentContractData format = new PolicyFragmentContentFormat(property0.Value.GetString()); continue; } + if (property0.NameEquals("provisioningState"u8)) + { + provisioningState = property0.Value.GetString(); + continue; + } } continue; } @@ -158,6 +169,7 @@ internal static PolicyFragmentContractData DeserializePolicyFragmentContractData value, description, format, + provisioningState, serializedAdditionalRawData); } @@ -288,6 +300,29 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ProvisioningState), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" provisioningState: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ProvisioningState)) + { + builder.Append(" provisioningState: "); + if (ProvisioningState.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ProvisioningState}'''"); + } + else + { + builder.AppendLine($"'{ProvisioningState}'"); + } + } + } + builder.AppendLine(" }"); builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs index e426417cddfc..b8d2d8caf58e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractData.cs @@ -64,12 +64,14 @@ public PolicyFragmentContractData() /// Contents of the policy fragment. /// Policy fragment description. /// Format of the policy fragment content. + /// The provisioning state. /// Keeps track of any properties unknown to the library. - internal PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal PolicyFragmentContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string value, string description, PolicyFragmentContentFormat? format, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Value = value; Description = description; Format = format; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -82,5 +84,8 @@ internal PolicyFragmentContractData(ResourceIdentifier id, string name, Resource /// Format of the policy fragment content. [WirePath("properties.format")] public PolicyFragmentContentFormat? Format { get; set; } + /// The provisioning state. + [WirePath("properties.provisioningState")] + public string ProvisioningState { get; } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs index a34bbe9228a4..debb271e2455 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class PolicyFragmentContractResource : IJsonModel { + private static PolicyFragmentContractData s_dataDeserializationInstance; + private static PolicyFragmentContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyFragmentContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs index 97a33334eee1..5a7cd4c89e56 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyFragmentContractResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Pol /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyFragmentConten /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual AsyncPageable GetReferencesAsync(int /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual Pageable GetReferences(int? top = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -469,7 +469,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractCollection.cs new file mode 100644 index 000000000000..2b217e9f288d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractCollection.cs @@ -0,0 +1,499 @@ +// 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.ApiManagement +{ + /// + /// 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 GetPolicyRestrictionContracts method from an instance of . + /// + public partial class PolicyRestrictionContractCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _policyRestrictionContractPolicyRestrictionClientDiagnostics; + private readonly PolicyRestrictionRestOperations _policyRestrictionContractPolicyRestrictionRestClient; + + /// Initializes a new instance of the class for mocking. + protected PolicyRestrictionContractCollection() + { + } + + /// 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 PolicyRestrictionContractCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyRestrictionContractPolicyRestrictionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", PolicyRestrictionContractResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PolicyRestrictionContractResource.ResourceType, out string policyRestrictionContractPolicyRestrictionApiVersion); + _policyRestrictionContractPolicyRestrictionRestClient = new PolicyRestrictionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyRestrictionContractPolicyRestrictionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ApiManagementServiceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ApiManagementServiceResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates the policy restriction configuration of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy restrictions after an entity level. + /// The policy restriction to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _policyRestrictionContractPolicyRestrictionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PolicyRestrictionContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the policy restriction configuration of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Policy restrictions after an entity level. + /// The policy restriction to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, data, ifMatch, cancellationToken); + var uri = _policyRestrictionContractPolicyRestrictionRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new PolicyRestrictionContractResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.Get"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.Get"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets all policy restrictions of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions + /// + /// + /// Operation Id + /// PolicyRestriction_ListByService + /// + /// + /// Default Api Version + /// 2024-05-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) => _policyRestrictionContractPolicyRestrictionRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyRestrictionContractPolicyRestrictionRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PolicyRestrictionContractResource(Client, PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(e)), _policyRestrictionContractPolicyRestrictionClientDiagnostics, Pipeline, "PolicyRestrictionContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets all policy restrictions of API Management services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions + /// + /// + /// Operation Id + /// PolicyRestriction_ListByService + /// + /// + /// Default Api Version + /// 2024-05-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) => _policyRestrictionContractPolicyRestrictionRestClient.CreateListByServiceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _policyRestrictionContractPolicyRestrictionRestClient.CreateListByServiceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PolicyRestrictionContractResource(Client, PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(e)), _policyRestrictionContractPolicyRestrictionClientDiagnostics, Pipeline, "PolicyRestrictionContractCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.Exists"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, 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.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.Exists"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, 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.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyRestrictionContractResource(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.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractCollection.GetIfExists"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, policyRestrictionId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PolicyRestrictionContractResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.Serialization.cs new file mode 100644 index 000000000000..573b2cdff1b1 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.Serialization.cs @@ -0,0 +1,294 @@ +// Copyright (c) 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.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + public partial class PolicyRestrictionContractData : 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(PolicyRestrictionContractData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Scope)) + { + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope); + } + if (Optional.IsDefined(RequireBase)) + { + writer.WritePropertyName("requireBase"u8); + writer.WriteStringValue(RequireBase.Value.ToString()); + } + writer.WriteEndObject(); + } + + PolicyRestrictionContractData 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(PolicyRestrictionContractData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePolicyRestrictionContractData(document.RootElement, options); + } + + internal static PolicyRestrictionContractData DeserializePolicyRestrictionContractData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string scope = default; + PolicyRestrictionRequireBase? requireBase = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("scope"u8)) + { + scope = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("requireBase"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requireBase = new PolicyRestrictionRequireBase(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PolicyRestrictionContractData( + id, + name, + type, + systemData, + scope, + requireBase, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Scope), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" scope: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Scope)) + { + builder.Append(" scope: "); + if (Scope.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Scope}'''"); + } + else + { + builder.AppendLine($"'{Scope}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(RequireBase), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" requireBase: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(RequireBase)) + { + builder.Append(" requireBase: "); + builder.AppendLine($"'{RequireBase.Value.ToString()}'"); + } + } + + 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, AzureResourceManagerApiManagementContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(PolicyRestrictionContractData)} does not support writing '{options.Format}' format."); + } + } + + PolicyRestrictionContractData 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 DeserializePolicyRestrictionContractData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PolicyRestrictionContractData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.cs new file mode 100644 index 000000000000..d3cd21ba37dd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractData.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A class representing the PolicyRestrictionContract data model. + /// Policy restriction contract details. + /// + public partial class PolicyRestrictionContractData : 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 PolicyRestrictionContractData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Path to the policy document. + /// Indicates if base policy should be enforced for the policy document. + /// Keeps track of any properties unknown to the library. + internal PolicyRestrictionContractData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string scope, PolicyRestrictionRequireBase? requireBase, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Scope = scope; + RequireBase = requireBase; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Path to the policy document. + [WirePath("properties.scope")] + public string Scope { get; set; } + /// Indicates if base policy should be enforced for the policy document. + [WirePath("properties.requireBase")] + public PolicyRestrictionRequireBase? RequireBase { get; set; } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.Serialization.cs new file mode 100644 index 000000000000..2331386f9ebf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.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.ApiManagement +{ + public partial class PolicyRestrictionContractResource : IJsonModel + { + private static PolicyRestrictionContractData s_dataDeserializationInstance; + private static PolicyRestrictionContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PolicyRestrictionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + PolicyRestrictionContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.cs new file mode 100644 index 000000000000..e920aa625bbf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PolicyRestrictionContractResource.cs @@ -0,0 +1,424 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a PolicyRestrictionContract 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 GetPolicyRestrictionContractResource method. + /// Otherwise you can get one from its parent resource using the GetPolicyRestrictionContract method. + /// + public partial class PolicyRestrictionContractResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The policyRestrictionId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _policyRestrictionContractPolicyRestrictionClientDiagnostics; + private readonly PolicyRestrictionRestOperations _policyRestrictionContractPolicyRestrictionRestClient; + private readonly PolicyRestrictionContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/policyRestrictions"; + + /// Initializes a new instance of the class for mocking. + protected PolicyRestrictionContractResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PolicyRestrictionContractResource(ArmClient client, PolicyRestrictionContractData 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 PolicyRestrictionContractResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _policyRestrictionContractPolicyRestrictionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string policyRestrictionContractPolicyRestrictionApiVersion); + _policyRestrictionContractPolicyRestrictionRestClient = new PolicyRestrictionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, policyRestrictionContractPolicyRestrictionApiVersion); +#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 PolicyRestrictionContractData 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 policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Get"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.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 PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get the policy restriction of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Get"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy restriction configuration of the Api Management Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Delete"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _policyRestrictionContractPolicyRestrictionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the policy restriction configuration of the Api Management Service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Delete"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _policyRestrictionContractPolicyRestrictionRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the policy restriction configuration of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The policy restriction to apply. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, PolicyRestrictionContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Update"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the policy restriction configuration of the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The policy restriction to apply. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, PolicyRestrictionContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.Update"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new PolicyRestrictionContractResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the policy restriction in the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _policyRestrictionContractPolicyRestrictionRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the policy restriction in the Api Management service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/policyRestrictions/{policyRestrictionId} + /// + /// + /// Operation Id + /// PolicyRestriction_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _policyRestrictionContractPolicyRestrictionClientDiagnostics.CreateScope("PolicyRestrictionContractResource.GetEntityTag"); + scope.Start(); + try + { + var response = _policyRestrictionContractPolicyRestrictionRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs index 301ab84e3662..0530bbda25ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string portalConfigId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string portalConfigId, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual Response Exists(string portalConfigId, CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs index 266899340443..9a59c220a13d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class PortalConfigContractResource : IJsonModel { + private static PortalConfigContractData s_dataDeserializationInstance; + private static PortalConfigContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PortalConfigContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PortalConfigContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PortalConfigContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs index db7915a3f731..9b318d9180d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/PortalConfigContractResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task> UpdateAsync(ET /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual Response Update(ETag ifMatch, Porta /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -305,7 +305,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs index d6c3c0124b8c..5793670a53ab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string re /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string resolverId, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string resolverId, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string resolverId, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs index d4bc8fd6604f..04b882883203 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ResolverContractResource : IJsonModel { + private static ResolverContractData s_dataDeserializationInstance; + private static ResolverContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResolverContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResolverContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ResolverContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs index 68ceb5bc192b..5fea5d20a54e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ResolverContractResource.cs @@ -110,7 +110,7 @@ public virtual ServiceApiResolverPolicyCollection GetServiceApiResolverPolicies( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetService /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -170,7 +170,7 @@ public virtual Response GetServiceApiResolverP /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -340,7 +340,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual Response Update(ETag ifMatch, ResolverC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -464,7 +464,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AllPoliciesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AllPoliciesRestOperations.cs new file mode 100644 index 000000000000..643780d82046 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AllPoliciesRestOperations.cs @@ -0,0 +1,217 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class AllPoliciesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AllPoliciesRestOperations. + /// 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 AllPoliciesRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/allPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/allPolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Status of all policies of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AllPoliciesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AllPoliciesListResult.DeserializeAllPoliciesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Status of all policies of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AllPoliciesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AllPoliciesListResult.DeserializeAllPoliciesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + 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; + } + + /// Status of all policies of API Management services. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AllPoliciesListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AllPoliciesListResult.DeserializeAllPoliciesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Status of all policies of API Management services. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AllPoliciesListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AllPoliciesListResult.DeserializeAllPoliciesListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs index df1dbeb10eeb..e39924f1775e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiDiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public ApiDiagnosticRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayConfigConnectionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayConfigConnectionRestOperations.cs new file mode 100644 index 000000000000..fa48df989484 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayConfigConnectionRestOperations.cs @@ -0,0 +1,516 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiGatewayConfigConnectionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiGatewayConfigConnectionRestOperations. + /// 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 ApiGatewayConfigConnectionRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByGatewayRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByGatewayRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all API Management gateway config connections within a gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByGatewayAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListByGatewayRequest(subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayConfigConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayConfigConnectionListResult.DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateway config connections within a gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByGateway(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListByGatewayRequest(subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayConfigConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayConfigConnectionListResult.DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an API Management gateway config connection resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// 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 gatewayName, string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiGatewayConfigConnectionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiGatewayConfigConnectionData.DeserializeApiGatewayConfigConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiGatewayConfigConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an API Management gateway config connection resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// 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 gatewayName, string configConnectionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiGatewayConfigConnectionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiGatewayConfigConnectionData.DeserializeApiGatewayConfigConnectionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiGatewayConfigConnectionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName, ApiGatewayConfigConnectionData 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName, ApiGatewayConfigConnectionData 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// 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 gatewayName, string configConnectionName, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName, 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 or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// Parameters supplied to the CreateOrUpdate API Management gateway config connection operation. + /// 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 gatewayName, string configConnectionName, ApiGatewayConfigConnectionData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string gatewayName, string configConnectionName, ETag ifMatch) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/configConnections/", false); + uri.AppendPath(configConnectionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an existing API Management gateway config connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 gatewayName, string configConnectionName, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName, ifMatch); + 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 an existing API Management gateway config connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The name of the API Management gateway config connection. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 gatewayName, string configConnectionName, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNullOrEmpty(configConnectionName, nameof(configConnectionName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName, configConnectionName, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByGatewayNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByGatewayNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName) + { + 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 API Management gateway config connections within a gateway. + /// 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 API Management gateway. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByGatewayNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListByGatewayNextPageRequest(nextLink, subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayConfigConnectionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayConfigConnectionListResult.DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateway config connections within a gateway. + /// 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 API Management gateway. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByGatewayNextPage(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListByGatewayNextPageRequest(nextLink, subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayConfigConnectionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayConfigConnectionListResult.DeserializeApiManagementGatewayConfigConnectionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayRestOperations.cs new file mode 100644 index 000000000000..92203f4763d3 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiGatewayRestOperations.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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiGatewayRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiGatewayRestOperations. + /// 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 ApiGatewayRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string gatewayName, ApiGatewayData 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, ApiGatewayData 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates an API Management gateway. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, 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 or updates an API Management gateway. This is long running operation and could take several minutes to complete. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, gatewayName, 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 gatewayName, ApiGatewayPatch 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string gatewayName, ApiGatewayPatch 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, 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 an existing API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, 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 an existing API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// Parameters supplied to the CreateOrUpdate API Management gateway operation. + /// 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 gatewayName, ApiGatewayPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, gatewayName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an API Management gateway resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// 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 gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiGatewayData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiGatewayData.DeserializeApiGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an API Management gateway resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// 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 gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiGatewayData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiGatewayData.DeserializeApiGatewayData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiGatewayData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an existing API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// 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 gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + 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 an existing API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// 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 gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, gatewayName); + _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.ApiManagement/gateways", 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.ApiManagement/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all API Management gateways within a 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: + { + ApiManagementGatewayListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateways within a 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: + { + ApiManagementGatewayListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all API Management gateways within a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateways within a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(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 all API Management gateways within a 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: + { + ApiManagementGatewayListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateways within a 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: + { + ApiManagementGatewayListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(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 all API Management gateways within a 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> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management gateways within a 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 ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementGatewayListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementGatewayListResult.DeserializeApiManagementGatewayListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs index 8111d953c477..350714261dd9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueAttachmentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueAttachmentRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs index fa5586c2f33a..3b768e9eb1a4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueCommentRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueCommentRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs index b7eaf342e7cf..067d93f5c70d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiIssueRestOperations.cs @@ -32,7 +32,7 @@ public ApiIssueRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementGatewaySkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementGatewaySkusRestOperations.cs new file mode 100644 index 000000000000..d9e6c53dc161 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementGatewaySkusRestOperations.cs @@ -0,0 +1,217 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiManagementGatewaySkusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiManagementGatewaySkusRestOperations. + /// 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 ApiManagementGatewaySkusRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListAvailableSkusRequestUri(string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/skus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListAvailableSkusRequest(string subscriptionId, string resourceGroupName, string gatewayName) + { + 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.ApiManagement/gateways/", false); + uri.AppendPath(gatewayName, true); + uri.AppendPath("/skus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all available SKU for a given API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAvailableSkusAsync(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListAvailableSkusRequest(subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceSkuResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GatewayResourceSkuResults.DeserializeGatewayResourceSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all available SKU for a given API Management gateway. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management gateway. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListAvailableSkus(string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListAvailableSkusRequest(subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceSkuResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GatewayResourceSkuResults.DeserializeGatewayResourceSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListAvailableSkusNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListAvailableSkusNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName) + { + 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 all available SKU for a given API Management gateway. + /// 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 API Management gateway. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAvailableSkusNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, gatewayName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceSkuResults value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GatewayResourceSkuResults.DeserializeGatewayResourceSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all available SKU for a given API Management gateway. + /// 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 API Management gateway. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListAvailableSkusNextPage(string nextLink, string subscriptionId, string resourceGroupName, string gatewayName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(gatewayName, nameof(gatewayName)); + + using var message = CreateListAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, gatewayName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GatewayResourceSkuResults value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GatewayResourceSkuResults.DeserializeGatewayResourceSkuResults(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs index b751ba319031..8d97896f2b9e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementRestOperations.cs @@ -31,7 +31,7 @@ public ApiManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs index e07222264d3d..c3df7c8d16ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs index 1ea017c19fbe..bb8266e9ff57 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementServiceSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementServiceSkusRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs index d6213d65e2ec..7b4618e0d0e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementSkusRestOperations.cs @@ -32,7 +32,7 @@ public ApiManagementSkusRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinkRestOperations.cs new file mode 100644 index 000000000000..a952e582f4ff --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinkRestOperations.cs @@ -0,0 +1,142 @@ +// 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; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiManagementWorkspaceLinkRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiManagementWorkspaceLinkRestOperations. + /// 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 ApiManagementWorkspaceLinkRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaceLinks/", false); + uri.AppendPath(workspaceId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaceLinks/", false); + uri.AppendPath(workspaceId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets an API Management WorkspaceLink resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementWorkspaceLinksData.DeserializeApiManagementWorkspaceLinksData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementWorkspaceLinksData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets an API Management WorkspaceLink resource description. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementWorkspaceLinksData.DeserializeApiManagementWorkspaceLinksData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementWorkspaceLinksData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinksRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinksRestOperations.cs new file mode 100644 index 000000000000..0dd2f41eee05 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiManagementWorkspaceLinksRestOperations.cs @@ -0,0 +1,217 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class ApiManagementWorkspaceLinksRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ApiManagementWorkspaceLinksRestOperations. + /// 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 ApiManagementWorkspaceLinksRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaceLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaceLinks", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List all API Management workspaceLinks for a service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementWorkspaceLinksListResult.DeserializeApiManagementWorkspaceLinksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management workspaceLinks for a service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementWorkspaceLinksListResult.DeserializeApiManagementWorkspaceLinksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + 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 API Management workspaceLinks for a service. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementWorkspaceLinksListResult.DeserializeApiManagementWorkspaceLinksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List all API Management workspaceLinks for a service. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementWorkspaceLinksListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementWorkspaceLinksListResult.DeserializeApiManagementWorkspaceLinksListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs index 063d7a7525f2..32a8d10855ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationPolicyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs index 081e40d7b73b..233c6aeb8501 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiOperationRestOperations.cs @@ -32,7 +32,7 @@ public ApiOperationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs index bbdecfb89ac9..8fa41fd89af3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ApiPolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs index a4d299012472..f2aab1cadbb3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiProductRestOperations.cs @@ -32,7 +32,7 @@ public ApiProductRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs index 0cd28b6bf8cc..efda7096ee07 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiReleaseRestOperations.cs @@ -32,7 +32,7 @@ public ApiReleaseRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs index 905818b981ce..06ae49a5a802 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRestOperations.cs @@ -32,7 +32,7 @@ public ApiRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -460,7 +460,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -491,7 +490,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -677,7 +675,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -706,7 +704,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs index aebe61caf053..fe311f335dbc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiRevisionRestOperations.cs @@ -32,7 +32,7 @@ public ApiRevisionRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs index 1b896a72023f..97057e13faa4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiSchemaRestOperations.cs @@ -32,7 +32,7 @@ public ApiSchemaRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -470,7 +470,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -503,7 +502,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs index cb73225f0cb2..8bb413e0e281 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiTagDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public ApiTagDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs index a2df8a4fcc51..1b8833df07d0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiVersionSetRestOperations.cs @@ -32,7 +32,7 @@ public ApiVersionSetRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs index 3a5af893c03b..bf140dd225b8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ApiWikiRestOperations.cs @@ -32,7 +32,7 @@ public ApiWikiRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs index e8f95ce0dbc6..d7f60f804dba 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationAccessPolicyRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationAccessPolicyRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs index 5cd0c485c94f..f65ede9c91bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationLoginLinksRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationLoginLinksRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs index 4ff7f1327525..c0b0354ead71 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationProviderRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationProviderRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs index c4150338f223..f92d21f55a6c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs index 4d01ce7673ac..5934b55d5179 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/AuthorizationServerRestOperations.cs @@ -32,7 +32,7 @@ public AuthorizationServerRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs index 1550e6a7146b..1dc321a3f877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/BackendRestOperations.cs @@ -32,7 +32,7 @@ public BackendRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs index 112d87e70a55..2ebf682c9430 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CacheRestOperations.cs @@ -32,7 +32,7 @@ public CacheRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs index 7a04b996284f..5cb5709bfdb9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/CertificateRestOperations.cs @@ -32,7 +32,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs index 46471f0d8155..8b4ea8b2827e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentItemRestOperations.cs @@ -32,7 +32,7 @@ public ContentItemRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs index c925cc4d9a16..826d88f22005 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ContentTypeRestOperations.cs @@ -32,7 +32,7 @@ public ContentTypeRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs index 361ed5213fc7..cf76cfe13b02 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DelegationSettingsRestOperations.cs @@ -32,7 +32,7 @@ public DelegationSettingsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs index e01841781bbf..593ebb65272c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DeletedServicesRestOperations.cs @@ -32,7 +32,7 @@ public DeletedServicesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs index 1a1888eb095e..8bd8ddba75e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DiagnosticRestOperations.cs @@ -32,7 +32,7 @@ public DiagnosticRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs index bdfe14ec28aa..ead5d142cf28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/DocumentationRestOperations.cs @@ -32,7 +32,7 @@ public DocumentationRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs index 7244213a76c8..71da88c08f6e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/EmailTemplateRestOperations.cs @@ -32,7 +32,7 @@ public EmailTemplateRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs index 59a9ccbdc185..2c1c1716032d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayApiRestOperations.cs @@ -32,7 +32,7 @@ public GatewayApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs index d54c14fafe4e..9f07eb8ce517 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayCertificateAuthorityRestOperations.cs @@ -32,7 +32,7 @@ public GatewayCertificateAuthorityRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs index d3cc9f8788db..96ad5afdcbb4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayHostnameConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public GatewayHostnameConfigurationRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs index 8d50ff7c9335..39659a419e24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GatewayRestOperations.cs @@ -33,7 +33,7 @@ public GatewayRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs index f230e09be763..5092458e66a2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GlobalSchemaRestOperations.cs @@ -32,7 +32,7 @@ public GlobalSchemaRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -440,7 +440,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -471,7 +470,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs index d580eede6157..44aeec61abd9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverPolicyRestOperations.cs @@ -32,7 +32,7 @@ public GraphQLApiResolverPolicyRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs index d3c95ab510a6..541dd3167817 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GraphQLApiResolverRestOperations.cs @@ -32,7 +32,7 @@ public GraphQLApiResolverRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs index c99b9aa3c210..395a67d4d9c2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupRestOperations.cs @@ -32,7 +32,7 @@ public GroupRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs index 88557bcc3d8d..aee0594c57f0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/GroupUserRestOperations.cs @@ -32,7 +32,7 @@ public GroupUserRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs index 27858ba16554..2ff39090c734 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IdentityProviderRestOperations.cs @@ -32,7 +32,7 @@ public IdentityProviderRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs index aa2cfdfc2c03..623256c6caf9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/IssueRestOperations.cs @@ -32,7 +32,7 @@ public IssueRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs index 1a3801cf879d..7bf252bdfc0c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/LoggerRestOperations.cs @@ -32,7 +32,7 @@ public LoggerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs index 8574f3ebd36e..d7fb5f80098e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NamedValueRestOperations.cs @@ -32,7 +32,7 @@ public NamedValueRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -450,7 +450,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -481,7 +480,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs index 138512c89a60..86da91b7a1b7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NetworkStatusRestOperations.cs @@ -33,7 +33,7 @@ public NetworkStatusRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs index ab13ce96e71b..151b3d7108f5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientEmailRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientEmailRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs index feecdb2257f5..55e406cac2d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRecipientUserRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRecipientUserRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs index c502948ee552..c569a3872d66 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/NotificationRestOperations.cs @@ -32,7 +32,7 @@ public NotificationRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs index c6f17efd4d90..c1aec883121d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OpenIdConnectProviderRestOperations.cs @@ -32,7 +32,7 @@ public OpenIdConnectProviderRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs index 57dbb3dc231c..680698a53658 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationRestOperations.cs @@ -32,7 +32,7 @@ public OperationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationsResultsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationsResultsRestOperations.cs new file mode 100644 index 000000000000..62baa53ba717 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OperationsResultsRestOperations.cs @@ -0,0 +1,119 @@ +// 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; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class OperationsResultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationsResultsRestOperations. + /// 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 OperationsResultsRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/operationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string operationId) + { + 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.ApiManagement/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/operationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task GetAsync(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns operation results for long running operations executing DELETE or PATCH on the resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The ID of an ongoing async operation. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs index f1e019fd5d58..17688283a9dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/OutboundNetworkDependenciesEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public OutboundNetworkDependenciesEndpointsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs index d11d9b554288..a663c44a0ebb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyDescriptionRestOperations.cs @@ -32,7 +32,7 @@ public PolicyDescriptionRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs index 6b2c3c59ec30..f03b4c0c7b98 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyFragmentRestOperations.cs @@ -32,7 +32,7 @@ public PolicyFragmentRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -460,7 +460,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -491,7 +490,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs index 91ee898bcf7a..4414db4fee39 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestOperations.cs @@ -32,7 +32,7 @@ public PolicyRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionRestOperations.cs new file mode 100644 index 000000000000..9db8ffbd9131 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionRestOperations.cs @@ -0,0 +1,752 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PolicyRestrictionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyRestrictionRestOperations. + /// 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 PolicyRestrictionRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all policy restrictions of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyRestrictionListResult.DeserializePolicyRestrictionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all policy restrictions of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyRestrictionListResult.DeserializePolicyRestrictionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the policy restriction in the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the policy restriction in the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the policy restriction of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// 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 serviceName, string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyRestrictionContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the policy restriction of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// 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 serviceName, string policyRestrictionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PolicyRestrictionContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or updates the policy restriction configuration of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// The policy restriction to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyRestrictionContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates the policy restriction configuration of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// The policy restriction to apply. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string policyRestrictionId, PolicyRestrictionContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + PolicyRestrictionContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, ETag ifMatch, PolicyRestrictionContractPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, ETag ifMatch, PolicyRestrictionContractPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + 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 the policy restriction configuration of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The policy restriction to apply. + /// 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 serviceName, string policyRestrictionId, ETag ifMatch, PolicyRestrictionContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the policy restriction configuration of the Api Management service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The policy restriction to apply. + /// 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 serviceName, string policyRestrictionId, ETag ifMatch, PolicyRestrictionContractPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyRestrictionContractData.DeserializePolicyRestrictionContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string policyRestrictionId, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/policyRestrictions/", false); + uri.AppendPath(policyRestrictionId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the policy restriction configuration of the Api Management Service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string policyRestrictionId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the policy restriction configuration of the Api Management Service. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Policy restrictions after an entity level. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string policyRestrictionId, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(policyRestrictionId, nameof(policyRestrictionId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, policyRestrictionId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByServiceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByServiceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName) + { + 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 all policy restrictions of API Management services. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByServiceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PolicyRestrictionListResult.DeserializePolicyRestrictionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all policy restrictions of API Management services. + /// 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 API Management service. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByServiceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateListByServiceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PolicyRestrictionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PolicyRestrictionListResult.DeserializePolicyRestrictionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionValidationsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionValidationsRestOperations.cs new file mode 100644 index 000000000000..3cc9fa075910 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PolicyRestrictionValidationsRestOperations.cs @@ -0,0 +1,123 @@ +// 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; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class PolicyRestrictionValidationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of PolicyRestrictionValidationsRestOperations. + /// 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 PolicyRestrictionValidationsRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateByServiceRequestUri(string subscriptionId, string resourceGroupName, string serviceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/validatePolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateByServiceRequest(string subscriptionId, string resourceGroupName, string serviceName) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/validatePolicies", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Validate all policies of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ByServiceAsync(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateByServiceRequest(subscriptionId, resourceGroupName, serviceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Validate all policies of API Management services. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ByService(string subscriptionId, string resourceGroupName, string serviceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + + using var message = CreateByServiceRequest(subscriptionId, resourceGroupName, serviceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs index faba778d1d09..9597529d7e68 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalConfigRestOperations.cs @@ -32,7 +32,7 @@ public PortalConfigRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs index 106defe8d6a9..5da9b8cc7d20 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalRevisionRestOperations.cs @@ -32,7 +32,7 @@ public PortalRevisionRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -450,7 +450,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re switch (message.Response.Status) { case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -479,7 +478,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, switch (message.Response.Status) { case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs index bf75bcb6c57d..15a52c9f928f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PortalSettingsRestOperations.cs @@ -32,7 +32,7 @@ public PortalSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs index 8a513d011ef1..3c8c025a4e1b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/PrivateEndpointConnectionRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiLinkRestOperations.cs index 78b8889e1746..18592ea2cd27 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiLinkRestOperations.cs @@ -32,7 +32,7 @@ public ProductApiLinkRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs index f5b31d34e426..e1a54ebf8ee5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductApiRestOperations.cs @@ -32,7 +32,7 @@ public ProductApiRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupLinkRestOperations.cs index a8f87ee7f3d2..b38e56b24b28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupLinkRestOperations.cs @@ -32,7 +32,7 @@ public ProductGroupLinkRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs index 2e4c29ac2534..e1d10ab9e877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductGroupRestOperations.cs @@ -32,7 +32,7 @@ public ProductGroupRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs index 9e6decee3381..f6c0a5a02b7b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductPolicyRestOperations.cs @@ -32,7 +32,7 @@ public ProductPolicyRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs index 2e7a71141cd6..5aaba029beaf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductRestOperations.cs @@ -32,7 +32,7 @@ public ProductRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs index 121c5adc7c54..3e455cd49fbf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public ProductSubscriptionsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs index e55848e25b9a..3487ebecdc85 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ProductWikiRestOperations.cs @@ -32,7 +32,7 @@ public ProductWikiRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs index e8ec1724d9e9..1a10ec5b6765 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByCounterKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByCounterKeysRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs index 1152a7a2e280..5410940a2155 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/QuotaByPeriodKeysRestOperations.cs @@ -32,7 +32,7 @@ public QuotaByPeriodKeysRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs index 98ffcd6ba28a..c035346286f6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/RegionRestOperations.cs @@ -32,7 +32,7 @@ public RegionRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs index 16c482603346..4b3c33bc3555 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/ReportsRestOperations.cs @@ -32,7 +32,7 @@ public ReportsRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs index 5ab4a2627506..3b1c6a632b11 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignInSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignInSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs index 0c80ee8686f8..2379386d8ffc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SignUpSettingsRestOperations.cs @@ -31,7 +31,7 @@ public SignUpSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs index d397f2bd3e74..00cac818e50e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/SubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagApiLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagApiLinkRestOperations.cs index fffab5cfafa1..4fc594168737 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagApiLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagApiLinkRestOperations.cs @@ -32,7 +32,7 @@ public TagApiLinkRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagOperationLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagOperationLinkRestOperations.cs index 886035c7cb0d..39c50e36d0bc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagOperationLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagOperationLinkRestOperations.cs @@ -32,7 +32,7 @@ public TagOperationLinkRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagProductLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagProductLinkRestOperations.cs index 331565321a45..b8ec8e1bfb5a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagProductLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagProductLinkRestOperations.cs @@ -32,7 +32,7 @@ public TagProductLinkRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs index 5e83e1b07d51..f0890b34643f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagResourceRestOperations.cs @@ -32,7 +32,7 @@ public TagResourceRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs index aba2ccd392ee..d1dedeca7906 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TagRestOperations.cs @@ -32,7 +32,7 @@ public TagRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs index 35d81393f0f0..8a46c0ff3890 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessGitRestOperations.cs @@ -31,7 +31,7 @@ public TenantAccessGitRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs index 975230434f76..639313f79e1c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantAccessRestOperations.cs @@ -32,7 +32,7 @@ public TenantAccessRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs index 101fffe72d6f..df7cec628730 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantConfigurationRestOperations.cs @@ -32,7 +32,7 @@ public TenantConfigurationRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs index eb25d4e9cd28..400a9c9f89d7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/TenantSettingsRestOperations.cs @@ -32,7 +32,7 @@ public TenantSettingsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs index aaa37a5084f4..0f43759d88bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserConfirmationPasswordRestOperations.cs @@ -31,7 +31,7 @@ public UserConfirmationPasswordRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs index 9298c1b4bfa7..2569c85d1998 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserGroupRestOperations.cs @@ -32,7 +32,7 @@ public UserGroupRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs index 297178e81b67..41e00d42b125 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserIdentitiesRestOperations.cs @@ -32,7 +32,7 @@ public UserIdentitiesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs index 5adb56ab8f98..fec2a92370a5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserRestOperations.cs @@ -32,7 +32,7 @@ public UserRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -703,7 +703,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: @@ -734,7 +734,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string s _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: + case 202: case 204: return message.Response; default: diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs index 63e3ed6b4329..3b46c8723288 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/UserSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public UserSubscriptionRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiDiagnosticRestOperations.cs new file mode 100644 index 000000000000..4953865d8372 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiDiagnosticRestOperations.cs @@ -0,0 +1,889 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class WorkspaceApiDiagnosticRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkspaceApiDiagnosticRestOperations. + /// 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 WorkspaceApiDiagnosticRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkspaceRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all diagnostics of an API. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, filter, top, skip); + 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 all diagnostics of an API. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspace(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, filter, top, skip); + _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 CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, string apiId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiagnosticContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, string apiId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiagnosticContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Diagnostic for an API or updates an existing one. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Diagnostic for an API or updates an existing one. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(diagnosticUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, ifMatch, diagnosticUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Diagnostic for an API specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, ifMatch, diagnosticUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/apis/", false); + uri.AppendPath(apiId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Diagnostic from an API. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Diagnostic from an API. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string apiId, string diagnosticId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, 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; + } + + /// Lists all diagnostics of an API. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, filter, top, skip); + 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 all diagnostics of an API. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// API identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(apiId, nameof(apiId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, filter, top, skip); + _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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationPolicyRestOperations.cs index 989d2eb22c20..f0fe3703c453 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationPolicyRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiOperationPolicyRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationRestOperations.cs index 4ea27d65ee0c..78def11a8aad 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiOperationRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiOperationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiPolicyRestOperations.cs index d2be06a2ccbe..e98991d10669 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiPolicyRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiPolicyRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiReleaseRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiReleaseRestOperations.cs index e6fff9837cd0..0101076a68ae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiReleaseRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiReleaseRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiReleaseRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRestOperations.cs index 40e7a732e971..50c0a58fe773 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -490,7 +490,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -523,7 +522,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRevisionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRevisionRestOperations.cs index bb9f43ed87f9..8a299a8f9686 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRevisionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiRevisionRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiRevisionRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiSchemaRestOperations.cs index 37a7e6bde34a..d67d7fc2994f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiSchemaRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiSchemaRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -500,7 +500,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -535,7 +534,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiVersionSetRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiVersionSetRestOperations.cs index 140bdb9f7559..9abc07bcf1ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiVersionSetRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceApiVersionSetRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceApiVersionSetRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceBackendRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceBackendRestOperations.cs new file mode 100644 index 000000000000..9da90bf77e26 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceBackendRestOperations.cs @@ -0,0 +1,837 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class WorkspaceBackendRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkspaceBackendRestOperations. + /// 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 WorkspaceBackendRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkspaceRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of backends in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BackendListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BackendListResult.DeserializeBackendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of backends in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspace(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BackendListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BackendListResult.DeserializeBackendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the backend specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the backend specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the backend specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service 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 serviceName, string workspaceId, string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the backend specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service 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 serviceName, string workspaceId, string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementBackendData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ApiManagementBackendData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ApiManagementBackendData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string backendId, ApiManagementBackendData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string backendId, ApiManagementBackendData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ETag ifMatch, ApiManagementBackendPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ETag ifMatch, ApiManagementBackendPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + 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 an existing backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// 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 serviceName, string workspaceId, string backendId, ETag ifMatch, ApiManagementBackendPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementBackendData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates an existing backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// 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 serviceName, string workspaceId, string backendId, ETag ifMatch, ApiManagementBackendPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementBackendData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementBackendData.DeserializeApiManagementBackendData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/backends/", false); + uri.AppendPath(backendId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string backendId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string backendId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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; + } + + /// Lists a collection of backends in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + BackendListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = BackendListResult.DeserializeBackendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of backends in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + BackendListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = BackendListResult.DeserializeBackendListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceCertificateRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceCertificateRestOperations.cs new file mode 100644 index 000000000000..94eceb95ee4f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceCertificateRestOperations.cs @@ -0,0 +1,840 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class WorkspaceCertificateRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkspaceCertificateRestOperations. + /// 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 WorkspaceCertificateRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip, bool? isKeyVaultRefreshFailed) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates", false); + 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); + } + if (isKeyVaultRefreshFailed != null) + { + uri.AppendQuery("isKeyVaultRefreshFailed", isKeyVaultRefreshFailed.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkspaceRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip, bool? isKeyVaultRefreshFailed) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates", false); + 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); + } + if (isKeyVaultRefreshFailed != null) + { + uri.AppendQuery("isKeyVaultRefreshFailed", isKeyVaultRefreshFailed.Value, true); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of all certificates in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkspaceAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip, isKeyVaultRefreshFailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CertificateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CertificateListResult.DeserializeCertificateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of all certificates in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspace(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip, isKeyVaultRefreshFailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CertificateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CertificateListResult.DeserializeCertificateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the certificate specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the certificate specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the certificate specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service 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 serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementCertificateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementCertificateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the certificate specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service 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 serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementCertificateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementCertificateData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + 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; + } + + /// Creates or updates the certificate being used for authentication with the backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId, content, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementCertificateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or updates the certificate being used for authentication with the backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId, content, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementCertificateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes specific certificate. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string certificateId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes specific certificate. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string certificateId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRefreshSecretRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendPath("/refreshSecret", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRefreshSecretRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/certificates/", false); + uri.AppendPath(certificateId, true); + uri.AppendPath("/refreshSecret", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// From KeyVault, Refresh the certificate being used for authentication with the backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> RefreshSecretAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateRefreshSecretRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementCertificateData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// From KeyVault, Refresh the certificate being used for authentication with the backend. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response RefreshSecret(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var message = CreateRefreshSecretRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementCertificateData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementCertificateData.DeserializeApiManagementCertificateData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip, bool? isKeyVaultRefreshFailed) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip, bool? isKeyVaultRefreshFailed) + { + 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 a collection of all certificates in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip, isKeyVaultRefreshFailed); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + CertificateListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = CertificateListResult.DeserializeCertificateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of all certificates in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip, isKeyVaultRefreshFailed); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + CertificateListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = CertificateListResult.DeserializeCertificateListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceDiagnosticRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceDiagnosticRestOperations.cs new file mode 100644 index 000000000000..511f29ee1f5e --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceDiagnosticRestOperations.cs @@ -0,0 +1,837 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class WorkspaceDiagnosticRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkspaceDiagnosticRestOperations. + /// 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 WorkspaceDiagnosticRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkspaceRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists all diagnostics in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + 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 all diagnostics in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspace(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _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 CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiagnosticContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service 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 serviceName, string workspaceId, string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DiagnosticContractData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates a new Diagnostic or updates an existing one. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new Diagnostic or updates an existing one. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(diagnosticUpdateContract, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates the details of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// 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 serviceName, string workspaceId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, ifMatch, diagnosticUpdateContract); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates the details of the Diagnostic specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// 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 serviceName, string workspaceId, string diagnosticId, ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, ifMatch, diagnosticUpdateContract); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DiagnosticContractData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DiagnosticContractData.DeserializeDiagnosticContractData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/diagnostics/", false); + uri.AppendPath(diagnosticId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified Diagnostic. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string diagnosticId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified Diagnostic. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string diagnosticId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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; + } + + /// Lists all diagnostics in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + 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 all diagnostics in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGlobalSchemaRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGlobalSchemaRestOperations.cs index d85bdf6426c1..93581844873d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGlobalSchemaRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGlobalSchemaRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceGlobalSchemaRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -470,7 +470,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -503,7 +502,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupRestOperations.cs index 70358136d204..16e1655edeb4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceGroupRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupUserRestOperations.cs index b4d906374a80..caf3d2b48e88 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceGroupUserRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceGroupUserRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceLoggerRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceLoggerRestOperations.cs new file mode 100644 index 000000000000..da9d14ff9458 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceLoggerRestOperations.cs @@ -0,0 +1,837 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + internal partial class WorkspaceLoggerRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of WorkspaceLoggerRestOperations. + /// 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 WorkspaceLoggerRestOperations(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-05-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByWorkspaceRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByWorkspaceRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers", false); + 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); + } + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists a collection of loggers in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LoggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LoggerListResult.DeserializeLoggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of loggers in the specified workspace. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspace(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter = null, int? top = null, int? skip = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LoggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LoggerListResult.DeserializeLoggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetEntityTagRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetEntityTagRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Head; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the entity state (Etag) version of the logger specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetEntityTagAsync(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the entity state (Etag) version of the logger specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response GetEntityTag(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateGetEntityTagRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case int s when s >= 200 && s < 300: + { + bool value = true; + return Response.FromValue(value, message.Response); + } + case int s when s >= 400 && s < 500: + { + bool value = false; + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the details of the logger specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service 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 serviceName, string workspaceId, string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementLoggerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementLoggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the details of the logger specified by its identifier. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service 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 serviceName, string workspaceId, string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementLoggerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ApiManagementLoggerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ApiManagementLoggerData data, ETag? ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ApiManagementLoggerData data, ETag? ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch.Value); + } + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates or Updates a logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string loggerId, ApiManagementLoggerData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, data, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementLoggerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates or Updates a logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 serviceName, string workspaceId, string loggerId, ApiManagementLoggerData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, data, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ApiManagementLoggerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ETag ifMatch, ApiManagementLoggerPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ETag ifMatch, ApiManagementLoggerPatch 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + 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 an existing logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// 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 serviceName, string workspaceId, string loggerId, ETag ifMatch, ApiManagementLoggerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, ifMatch, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ApiManagementLoggerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Updates an existing logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// 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 serviceName, string workspaceId, string loggerId, ETag ifMatch, ApiManagementLoggerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, ifMatch, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ApiManagementLoggerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApiManagementLoggerData.DeserializeApiManagementLoggerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ETag ifMatch) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId, ETag ifMatch) + { + 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.ApiManagement/service/", false); + uri.AppendPath(serviceName, true); + uri.AppendPath("/workspaces/", false); + uri.AppendPath(workspaceId, true); + uri.AppendPath("/loggers/", false); + uri.AppendPath(loggerId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes the specified logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string loggerId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, ifMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes the specified logger. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// Logger identifier. Must be unique in the API Management service instance. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// 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 serviceName, string workspaceId, string loggerId, ETag ifMatch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId, ifMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByWorkspaceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string filter, int? top, int? skip) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByWorkspaceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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; + } + + /// Lists a collection of loggers in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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> ListByWorkspaceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LoggerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LoggerListResult.DeserializeLoggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists a collection of loggers in the specified workspace. + /// 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 API Management service. + /// Workspace identifier. Must be unique in the current API Management service instance. + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records to skip. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByWorkspaceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, 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(serviceName, nameof(serviceName)); + Argument.AssertNotNullOrEmpty(workspaceId, nameof(workspaceId)); + + using var message = CreateListByWorkspaceNextPageRequest(nextLink, subscriptionId, resourceGroupName, serviceName, workspaceId, filter, top, skip); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LoggerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LoggerListResult.DeserializeLoggerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNamedValueRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNamedValueRestOperations.cs index b130d9038eb5..23668551a877 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNamedValueRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNamedValueRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceNamedValueRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -480,7 +480,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -513,7 +512,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientEmailRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientEmailRestOperations.cs index 17fa714b8601..d869f84ce4aa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientEmailRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientEmailRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceNotificationRecipientEmailRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientUserRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientUserRestOperations.cs index d6013f740779..aafe673b2378 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientUserRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRecipientUserRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceNotificationRecipientUserRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRestOperations.cs index ed33dc24f9fe..06d5b9821d60 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceNotificationRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceNotificationRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyFragmentRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyFragmentRestOperations.cs index 73d99820c9a2..ad37f598a71d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyFragmentRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyFragmentRestOperations.cs @@ -32,7 +32,7 @@ public WorkspacePolicyFragmentRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -490,7 +490,6 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); @@ -523,7 +522,6 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, { case 200: case 201: - case 202: return message.Response; default: throw new RequestFailedException(message.Response); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyRestOperations.cs index 564d37f25653..772d742898c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspacePolicyRestOperations.cs @@ -32,7 +32,7 @@ public WorkspacePolicyRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductApiLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductApiLinkRestOperations.cs index 564420edb61f..0ebb874277ac 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductApiLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductApiLinkRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceProductApiLinkRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductGroupLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductGroupLinkRestOperations.cs index cbb6447e3f77..effa310928c7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductGroupLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductGroupLinkRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceProductGroupLinkRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductPolicyRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductPolicyRestOperations.cs index 2e88e0259524..7ebedfe83c80 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductPolicyRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductPolicyRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceProductPolicyRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductRestOperations.cs index b5324a660c86..874a67e1e608 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceProductRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceProductRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceRestOperations.cs index bf5cea5ed3a3..89ce1ac2c12d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceSubscriptionRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceSubscriptionRestOperations.cs index aad877a7e3ed..d8f62987d644 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceSubscriptionRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceSubscriptionRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagApiLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagApiLinkRestOperations.cs index fda798c71944..63bc1eff2d84 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagApiLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagApiLinkRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceTagApiLinkRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagOperationLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagOperationLinkRestOperations.cs index 5e510aeef673..0c03ea73cff8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagOperationLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagOperationLinkRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceTagOperationLinkRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagProductLinkRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagProductLinkRestOperations.cs index 39e459a6061f..ba0876981db2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagProductLinkRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagProductLinkRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceTagProductLinkRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagRestOperations.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagRestOperations.cs index 1e010d6883da..fdefb25ea9c1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagRestOperations.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/RestOperations/WorkspaceTagRestOperations.cs @@ -32,7 +32,7 @@ public WorkspaceTagRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-03-01-preview"; + _apiVersion = apiVersion ?? "2024-05-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs index 4b0f9fada4d4..640803b5c30b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(P /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs index bef4f793ca8b..50c012f32b8c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceApiResolverPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs index 3a4eaceecb03..4d8f977754e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiResolverPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(P /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportFormat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUntil w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs index b7c9bf7b7c22..8add500856c4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceApiWikiResource : IJsonModel { + private static WikiContractData s_dataDeserializationInstance; + private static WikiContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs index ca228309464b..7dfb1d1e1b2e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceApiWikiResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag ifM /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, WikiUpdateC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -494,7 +494,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkCollection.cs index 063c97de98f5..42b0273415a7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string apiLinkId, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string apiLinkId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string apiLinkId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.Serialization.cs index a23df12676c0..ada417663c4c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceProductApiLinkResource : IJsonModel { + private static ProductApiLinkContractData s_dataDeserializationInstance; + private static ProductApiLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProductApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProductApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ProductApiLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.cs index 980056f5bc11..8c4276b8fd28 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductApiLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkCollection.cs index b6e05aeb925c..d5be7b93a94e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string groupLinkId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string groupLinkId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string groupLinkId, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.Serialization.cs index 3cc10cde8669..b9ef9a6ebe6e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceProductGroupLinkResource : IJsonModel { + private static ProductGroupLinkContractData s_dataDeserializationInstance; + private static ProductGroupLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProductGroupLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProductGroupLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ProductGroupLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.cs index 7ebb92f8359d..87aa3748a894 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductGroupLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs index aa5fc891bbfe..9e52005f610a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceProductWikiResource : IJsonModel { + private static WikiContractData s_dataDeserializationInstance; + private static WikiContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WikiContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); WikiContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs index 9858f75521ae..9233bfe1a1c4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceProductWikiResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual Response Update(ETag ifMatch, WikiUpd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -494,7 +494,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkCollection.cs index 14168a138524..cb56261db1a2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string a /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string apiLinkId, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string apiLinkId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string apiLinkId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.Serialization.cs index 037821833765..4388b931688f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceTagApiLinkResource : IJsonModel { + private static TagApiLinkContractData s_dataDeserializationInstance; + private static TagApiLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagApiLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.cs index 1683209e3173..304cea76f035 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagApiLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkCollection.cs index d216d23422ef..e4bc055098f3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string operationLin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string operationLinkId, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string operationLinkId, CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.Serialization.cs index 225cc19ee6d3..6509f502cc23 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceTagOperationLinkResource : IJsonModel { + private static TagOperationLinkContractData s_dataDeserializationInstance; + private static TagOperationLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagOperationLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagOperationLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagOperationLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.cs index f9e1ee921675..51114f0f8dbf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagOperationLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkCollection.cs index 2b6e9666d46a..f63347e5d4e8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string productLinkId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string productLinkId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string productLinkId, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.Serialization.cs index 4bea3434045f..6e11c018a7ab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceTagProductLinkResource : IJsonModel { + private static TagProductLinkContractData s_dataDeserializationInstance; + private static TagProductLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagProductLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagProductLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagProductLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.cs index eec5b973f045..8c326d75da3c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceTagProductLinkResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiCollection.cs index a79d371ac872..50ce79bebc63 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string apiId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -290,7 +290,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string apiId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string apiId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticCollection.cs new file mode 100644 index 000000000000..02476afca168 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetServiceWorkspaceApiDiagnostics method from an instance of . + /// + public partial class ServiceWorkspaceApiDiagnosticCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics; + private readonly WorkspaceApiDiagnosticRestOperations _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceApiDiagnosticCollection() + { + } + + /// 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 ServiceWorkspaceApiDiagnosticCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceWorkspaceApiDiagnosticResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceWorkspaceApiDiagnosticResource.ResourceType, out string serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticApiVersion); + _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient = new WorkspaceApiDiagnosticRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ServiceWorkspaceApiResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ServiceWorkspaceApiResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new Diagnostic for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Diagnostic for an API or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch, cancellationToken); + var uri = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all diagnostics of an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceApiDiagnosticResource(Client, DiagnosticContractData.DeserializeDiagnosticContractData(e)), _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics, Pipeline, "ServiceWorkspaceApiDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all diagnostics of an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceApiDiagnosticResource(Client, DiagnosticContractData.DeserializeDiagnosticContractData(e)), _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics, Pipeline, "ServiceWorkspaceApiDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.Serialization.cs new file mode 100644 index 000000000000..aec5334d4ccd --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.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.ApiManagement +{ + public partial class ServiceWorkspaceApiDiagnosticResource : IJsonModel + { + private static DiagnosticContractData s_dataDeserializationInstance; + private static DiagnosticContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + DiagnosticContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.cs new file mode 100644 index 000000000000..ab108c32a13d --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiDiagnosticResource.cs @@ -0,0 +1,426 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceWorkspaceApiDiagnostic 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 GetServiceWorkspaceApiDiagnosticResource method. + /// Otherwise you can get one from its parent resource using the GetServiceWorkspaceApiDiagnostic method. + /// + public partial class ServiceWorkspaceApiDiagnosticResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + /// The apiId. + /// The diagnosticId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string apiId, string diagnosticId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics; + private readonly WorkspaceApiDiagnosticRestOperations _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient; + private readonly DiagnosticContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaces/apis/diagnostics"; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceApiDiagnosticResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceWorkspaceApiDiagnosticResource(ArmClient client, DiagnosticContractData 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 ServiceWorkspaceApiDiagnosticResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticApiVersion); + _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient = new WorkspaceApiDiagnosticRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticApiVersion); +#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 DiagnosticContractData 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 the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.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 ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.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 ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Diagnostic from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Diagnostic from an API. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Update"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, diagnosticUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.Update"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, diagnosticUpdateContract, cancellationToken); + return Response.FromValue(new ServiceWorkspaceApiDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.GetEntityTagAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceApiDiagnosticResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceWorkspaceApiDiagnosticWorkspaceApiDiagnosticRestClient.GetEntityTag(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationCollection.cs index 40a40f1eb7bc..357d7b73f6e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string operati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual Pageable GetAll(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string operationId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual Response Exists(string operationId, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -457,7 +457,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyCollection.cs index af4f2d2d30c2..be5f3b0fd011 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyNa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.Serialization.cs index 25ff9ea982c6..f50ea7da9030 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiOperationPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.cs index f695e84fa1a9..23c1f618c1c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationPolicyResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -187,7 +187,7 @@ public virtual Response Get(PolicyEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -232,7 +232,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -375,7 +375,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.Serialization.cs index 4e516f6ad111..ea6100603ef3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiOperationResource : IJsonModel { + private static ApiOperationData s_dataDeserializationInstance; + private static ApiOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.cs index 37bd91227bf9..b1097832052f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiOperationResource.cs @@ -111,7 +111,7 @@ public virtual ServiceWorkspaceApiOperationPolicyCollection GetServiceWorkspaceA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetServiceWo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -296,7 +296,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -341,7 +341,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -384,7 +384,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -427,7 +427,7 @@ public virtual Response Update(ETag ifMatc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -465,7 +465,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyCollection.cs index 3128d717a846..9d8b227b7f9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.Serialization.cs index a7876dc59ad4..c30497bc5fa8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.cs index ba25bf8c486e..874986366ade 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportForma /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseCollection.cs index 8d42ce318179..192cffb21cdb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string releaseId /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string releaseId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string releaseId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.Serialization.cs index 52826cbe0f96..d32d14263c69 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiReleaseResource : IJsonModel { + private static ApiReleaseData s_dataDeserializationInstance; + private static ApiReleaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiReleaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiReleaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiReleaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.cs index a489ed707206..8bf88458afbe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiReleaseResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual Response Update(ETag ifMatch, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.Serialization.cs index 842fc7a346be..52028e90f031 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiResource : IJsonModel { + private static ApiData s_dataDeserializationInstance; + private static ApiData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.cs index d62012c6c9ad..1af01e9d7920 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiResource.cs @@ -115,7 +115,7 @@ public virtual ServiceWorkspaceApiReleaseCollection GetServiceWorkspaceApiReleas /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetServi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -184,7 +184,7 @@ public virtual ServiceWorkspaceApiOperationCollection GetServiceWorkspaceApiOper /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetSer /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual ServiceWorkspaceApiPolicyCollection GetServiceWorkspaceApiPolicie /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task> GetServic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual ServiceWorkspaceApiSchemaCollection GetServiceWorkspaceApiSchemas /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetServic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,6 +369,75 @@ public virtual Response GetServiceWorkspaceAp return GetServiceWorkspaceApiSchemas().Get(schemaId, cancellationToken); } + /// Gets a collection of ServiceWorkspaceApiDiagnosticResources in the ServiceWorkspaceApi. + /// An object representing collection of ServiceWorkspaceApiDiagnosticResources and their operations over a ServiceWorkspaceApiDiagnosticResource. + public virtual ServiceWorkspaceApiDiagnosticCollection GetServiceWorkspaceApiDiagnostics() + { + return GetCachedClient(client => new ServiceWorkspaceApiDiagnosticCollection(client, Id)); + } + + /// + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetServiceWorkspaceApiDiagnosticAsync(string diagnosticId, CancellationToken cancellationToken = default) + { + return await GetServiceWorkspaceApiDiagnostics().GetAsync(diagnosticId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the Diagnostic for an API specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/apis/{apiId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceApiDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetServiceWorkspaceApiDiagnostic(string diagnosticId, CancellationToken cancellationToken = default) + { + return GetServiceWorkspaceApiDiagnostics().Get(diagnosticId, cancellationToken); + } + /// /// Gets the details of the API specified by its identifier. /// @@ -382,7 +451,7 @@ public virtual Response GetServiceWorkspaceAp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -422,7 +491,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -462,7 +531,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -508,7 +577,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -554,7 +623,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -597,7 +666,7 @@ public virtual async Task> UpdateAsync(ETa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -640,7 +709,7 @@ public virtual Response Update(ETag ifMatch, ApiPat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -669,7 +738,7 @@ public virtual AsyncPageable GetWorkspaceApiRevisionsByServ /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -698,7 +767,7 @@ public virtual Pageable GetWorkspaceApiRevisionsByService(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -736,7 +805,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaCollection.cs index 2bf199b1676c..935d30046989 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.Serialization.cs index 321ccd2ebc5b..8db7758f193c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiSchemaResource : IJsonModel { + private static ApiSchemaData s_dataDeserializationInstance; + private static ApiSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.cs index 3e9103117b1a..a34570a0aa48 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiSchemaResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? forc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -407,7 +407,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetCollection.cs index 5c0ade8cf18f..8ee4846c9b8d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string versio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string versionSetId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string versionSetId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.Serialization.cs index fd7dce802006..cf03137fe9dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceApiVersionSetResource : IJsonModel { + private static ApiVersionSetData s_dataDeserializationInstance; + private static ApiVersionSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiVersionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiVersionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiVersionSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.cs index 17ea4da829a3..dcf18aee6a4c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceApiVersionSetResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual Response Update(ETag ifMat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendCollection.cs new file mode 100644 index 000000000000..a14d74017e04 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetServiceWorkspaceBackends method from an instance of . + /// + public partial class ServiceWorkspaceBackendCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics; + private readonly WorkspaceBackendRestOperations _serviceWorkspaceBackendWorkspaceBackendRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceBackendCollection() + { + } + + /// 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 ServiceWorkspaceBackendCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceWorkspaceBackendResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceWorkspaceBackendResource.ResourceType, out string serviceWorkspaceBackendWorkspaceBackendApiVersion); + _serviceWorkspaceBackendWorkspaceBackendRestClient = new WorkspaceBackendRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceBackendWorkspaceBackendApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkspaceContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkspaceContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 backendId, ApiManagementBackendData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceBackendResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 backendId, ApiManagementBackendData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, data, ifMatch, cancellationToken); + var uri = _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceBackendResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service 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 backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of backends in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends + /// + /// + /// Operation Id + /// WorkspaceBackend_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceBackendResource(Client, ApiManagementBackendData.DeserializeApiManagementBackendData(e)), _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics, Pipeline, "ServiceWorkspaceBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of backends in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends + /// + /// + /// Operation Id + /// WorkspaceBackend_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| title | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| url | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceBackendResource(Client, ApiManagementBackendData.DeserializeApiManagementBackendData(e)), _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics, Pipeline, "ServiceWorkspaceBackendCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service 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 backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.Exists"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service 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 backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceBackendResource(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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string backendId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(backendId, nameof(backendId)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, backendId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceBackendResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.Serialization.cs new file mode 100644 index 000000000000..dc7774d90ce6 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.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.ApiManagement +{ + public partial class ServiceWorkspaceBackendResource : IJsonModel + { + private static ApiManagementBackendData s_dataDeserializationInstance; + private static ApiManagementBackendData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiManagementBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiManagementBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.cs new file mode 100644 index 000000000000..caccf0ba7233 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceBackendResource.cs @@ -0,0 +1,425 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceWorkspaceBackend 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 GetServiceWorkspaceBackendResource method. + /// Otherwise you can get one from its parent resource using the GetServiceWorkspaceBackend method. + /// + public partial class ServiceWorkspaceBackendResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + /// The backendId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string backendId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics; + private readonly WorkspaceBackendRestOperations _serviceWorkspaceBackendWorkspaceBackendRestClient; + private readonly ApiManagementBackendData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaces/backends"; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceBackendResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceWorkspaceBackendResource(ArmClient client, ApiManagementBackendData 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 ServiceWorkspaceBackendResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceWorkspaceBackendWorkspaceBackendApiVersion); + _serviceWorkspaceBackendWorkspaceBackendRestClient = new WorkspaceBackendRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceBackendWorkspaceBackendApiVersion); +#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 ApiManagementBackendData 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 the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.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 ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.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 ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Delete"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Delete"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceWorkspaceBackendWorkspaceBackendRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates an existing backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, ApiManagementBackendPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Update"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates an existing backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, ApiManagementBackendPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.Update"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new ServiceWorkspaceBackendResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceWorkspaceBackendWorkspaceBackendRestClient.GetEntityTagAsync(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; + } + } + + /// + /// Gets the entity state (Etag) version of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceBackendWorkspaceBackendClientDiagnostics.CreateScope("ServiceWorkspaceBackendResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceWorkspaceBackendWorkspaceBackendRestClient.GetEntityTag(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateCollection.cs new file mode 100644 index 000000000000..284148efc00f --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateCollection.cs @@ -0,0 +1,508 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// 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 GetServiceWorkspaceCertificates method from an instance of . + /// + public partial class ServiceWorkspaceCertificateCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics; + private readonly WorkspaceCertificateRestOperations _serviceWorkspaceCertificateWorkspaceCertificateRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceCertificateCollection() + { + } + + /// 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 ServiceWorkspaceCertificateCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceWorkspaceCertificateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceWorkspaceCertificateResource.ResourceType, out string serviceWorkspaceCertificateWorkspaceCertificateApiVersion); + _serviceWorkspaceCertificateWorkspaceCertificateRestClient = new WorkspaceCertificateRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceCertificateWorkspaceCertificateApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkspaceContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkspaceContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or updates the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, content, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, content, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 certificateId, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, content, ifMatch, cancellationToken); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, content, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service 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 certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of all certificates in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates + /// + /// + /// Operation Id + /// WorkspaceCertificate_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// 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, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip, isKeyVaultRefreshFailed); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip, isKeyVaultRefreshFailed); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceCertificateResource(Client, ApiManagementCertificateData.DeserializeApiManagementCertificateData(e)), _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics, Pipeline, "ServiceWorkspaceCertificateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of all certificates in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates + /// + /// + /// Operation Id + /// WorkspaceCertificate_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| subject | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| thumbprint | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| expirationDate | filter | ge, le, eq, ne, gt, lt | |</br>. + /// Number of records to return. + /// Number of records to skip. + /// When set to true, the response contains only certificates entities which failed refresh. + /// 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, bool? isKeyVaultRefreshFailed = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip, isKeyVaultRefreshFailed); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip, isKeyVaultRefreshFailed); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceCertificateResource(Client, ApiManagementCertificateData.DeserializeApiManagementCertificateData(e)), _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics, Pipeline, "ServiceWorkspaceCertificateCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service 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 certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.Exists"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service 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 certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceCertificateResource(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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string certificateId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(certificateId, nameof(certificateId)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, certificateId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceCertificateResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.Serialization.cs new file mode 100644 index 000000000000..a48839605b9b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.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.ApiManagement +{ + public partial class ServiceWorkspaceCertificateResource : IJsonModel + { + private static ApiManagementCertificateData s_dataDeserializationInstance; + private static ApiManagementCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiManagementCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiManagementCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.cs new file mode 100644 index 000000000000..6c5372de629c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceCertificateResource.cs @@ -0,0 +1,513 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceWorkspaceCertificate 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 GetServiceWorkspaceCertificateResource method. + /// Otherwise you can get one from its parent resource using the GetServiceWorkspaceCertificate method. + /// + public partial class ServiceWorkspaceCertificateResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + /// The certificateId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string certificateId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics; + private readonly WorkspaceCertificateRestOperations _serviceWorkspaceCertificateWorkspaceCertificateRestClient; + private readonly ApiManagementCertificateData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaces/certificates"; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceCertificateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceWorkspaceCertificateResource(ArmClient client, ApiManagementCertificateData 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 ServiceWorkspaceCertificateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceWorkspaceCertificateWorkspaceCertificateApiVersion); + _serviceWorkspaceCertificateWorkspaceCertificateRestClient = new WorkspaceCertificateRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceCertificateWorkspaceCertificateApiVersion); +#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 ApiManagementCertificateData 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 the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.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 ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.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 ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Delete"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes specific certificate. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Delete"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Update"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or updates the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Create or Update parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ApiManagementCertificateCreateOrUpdateContent content, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.Update"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, ifMatch, cancellationToken); + var uri = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, content, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// From KeyVault, Refresh the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret + /// + /// + /// Operation Id + /// WorkspaceCertificate_RefreshSecret + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> RefreshSecretAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.RefreshSecret"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.RefreshSecretAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// From KeyVault, Refresh the certificate being used for authentication with the backend. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId}/refreshSecret + /// + /// + /// Operation Id + /// WorkspaceCertificate_RefreshSecret + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response RefreshSecret(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.RefreshSecret"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.RefreshSecret(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new ServiceWorkspaceCertificateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceWorkspaceCertificateWorkspaceCertificateRestClient.GetEntityTagAsync(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; + } + } + + /// + /// Gets the entity state (Etag) version of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceCertificateWorkspaceCertificateClientDiagnostics.CreateScope("ServiceWorkspaceCertificateResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceWorkspaceCertificateWorkspaceCertificateRestClient.GetEntityTag(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticCollection.cs new file mode 100644 index 000000000000..95605c5ae8ab --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetServiceWorkspaceDiagnostics method from an instance of . + /// + public partial class ServiceWorkspaceDiagnosticCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics; + private readonly WorkspaceDiagnosticRestOperations _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceDiagnosticCollection() + { + } + + /// 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 ServiceWorkspaceDiagnosticCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceWorkspaceDiagnosticResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceWorkspaceDiagnosticResource.ResourceType, out string serviceWorkspaceDiagnosticWorkspaceDiagnosticApiVersion); + _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient = new WorkspaceDiagnosticRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceDiagnosticWorkspaceDiagnosticApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkspaceContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkspaceContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates a new Diagnostic or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates a new Diagnostic or updates an existing one. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 diagnosticId, DiagnosticContractData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch, cancellationToken); + var uri = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists all diagnostics in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceDiagnosticResource(Client, DiagnosticContractData.DeserializeDiagnosticContractData(e)), _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics, Pipeline, "ServiceWorkspaceDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists all diagnostics in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceDiagnosticResource(Client, DiagnosticContractData.DeserializeDiagnosticContractData(e)), _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics, Pipeline, "ServiceWorkspaceDiagnosticCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.Exists"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service 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 diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string diagnosticId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(diagnosticId, nameof(diagnosticId)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, diagnosticId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.Serialization.cs new file mode 100644 index 000000000000..fac354d47783 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.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.ApiManagement +{ + public partial class ServiceWorkspaceDiagnosticResource : IJsonModel + { + private static DiagnosticContractData s_dataDeserializationInstance; + private static DiagnosticContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DiagnosticContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + DiagnosticContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.cs new file mode 100644 index 000000000000..8d7a24704560 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceDiagnosticResource.cs @@ -0,0 +1,425 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceWorkspaceDiagnostic 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 GetServiceWorkspaceDiagnosticResource method. + /// Otherwise you can get one from its parent resource using the GetServiceWorkspaceDiagnostic method. + /// + public partial class ServiceWorkspaceDiagnosticResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + /// The diagnosticId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string diagnosticId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics; + private readonly WorkspaceDiagnosticRestOperations _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient; + private readonly DiagnosticContractData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaces/diagnostics"; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceDiagnosticResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceWorkspaceDiagnosticResource(ArmClient client, DiagnosticContractData 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 ServiceWorkspaceDiagnosticResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceWorkspaceDiagnosticWorkspaceDiagnosticApiVersion); + _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient = new WorkspaceDiagnosticRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceDiagnosticWorkspaceDiagnosticApiVersion); +#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 DiagnosticContractData 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 the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.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 ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.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 ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Diagnostic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified Diagnostic. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Delete"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Update"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, diagnosticUpdateContract, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Diagnostic Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, DiagnosticUpdateContract diagnosticUpdateContract, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(diagnosticUpdateContract, nameof(diagnosticUpdateContract)); + + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.Update"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, diagnosticUpdateContract, cancellationToken); + return Response.FromValue(new ServiceWorkspaceDiagnosticResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.GetEntityTagAsync(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; + } + } + + /// + /// Gets the entity state (Etag) version of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceDiagnosticWorkspaceDiagnosticClientDiagnostics.CreateScope("ServiceWorkspaceDiagnosticResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceWorkspaceDiagnosticWorkspaceDiagnosticRestClient.GetEntityTag(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupCollection.cs index 214a590780c5..d6a54d58dca7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string groupId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -292,7 +292,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -368,7 +368,7 @@ public virtual async Task> ExistsAsync(string groupId, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Response Exists(string groupId, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -456,7 +456,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.Serialization.cs index c523ea685517..e5a6da53647b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceGroupResource : IJsonModel { + private static ApiManagementGroupData s_dataDeserializationInstance; + private static ApiManagementGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.cs index db97b8c51153..98a005d4f974 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceGroupResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -233,7 +233,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task> UpdateAsync(E /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual Response Update(ETag ifMatch, ApiM /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -393,7 +393,7 @@ public virtual AsyncPageable GetWorkspaceGroupUsersAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -422,7 +422,7 @@ public virtual Pageable GetWorkspaceGroupUsers(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -461,7 +461,7 @@ public virtual async Task> CheckEntityExistsWorkspaceGroupUserAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -500,7 +500,7 @@ public virtual Response CheckEntityExistsWorkspaceGroupUser(string userId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -539,7 +539,7 @@ public virtual async Task> CreateWorkspaceGr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -578,7 +578,7 @@ public virtual Response CreateWorkspaceGroupUser(stri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -617,7 +617,7 @@ public virtual async Task DeleteWorkspaceGroupUserAsync(string userId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -656,7 +656,7 @@ public virtual Response DeleteWorkspaceGroupUser(string userId, CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -694,7 +694,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerCollection.cs new file mode 100644 index 000000000000..4c7240d53f7a --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerCollection.cs @@ -0,0 +1,505 @@ +// 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.ApiManagement +{ + /// + /// 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 GetServiceWorkspaceLoggers method from an instance of . + /// + public partial class ServiceWorkspaceLoggerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics; + private readonly WorkspaceLoggerRestOperations _serviceWorkspaceLoggerWorkspaceLoggerRestClient; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceLoggerCollection() + { + } + + /// 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 ServiceWorkspaceLoggerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ServiceWorkspaceLoggerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ServiceWorkspaceLoggerResource.ResourceType, out string serviceWorkspaceLoggerWorkspaceLoggerApiVersion); + _serviceWorkspaceLoggerWorkspaceLoggerRestClient = new WorkspaceLoggerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceLoggerWorkspaceLoggerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != WorkspaceContractResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, WorkspaceContractResource.ResourceType), nameof(id)); + } + + /// + /// Creates or Updates a logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Logger identifier. Must be unique in the API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 loggerId, ApiManagementLoggerData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, data, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Creates or Updates a logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Logger identifier. Must be unique in the API Management service instance. + /// Create parameters. + /// ETag of the Entity. Not required when creating an entity, but required when updating an entity. + /// 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 loggerId, ApiManagementLoggerData data, ETag? ifMatch = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, data, ifMatch, cancellationToken); + var uri = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, data, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response), response.GetRawResponse()), rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service 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 loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists a collection of loggers in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers + /// + /// + /// Operation Id + /// WorkspaceLogger_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceLoggerResource(Client, ApiManagementLoggerData.DeserializeApiManagementLoggerData(e)), _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics, Pipeline, "ServiceWorkspaceLoggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists a collection of loggers in the specified workspace. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers + /// + /// + /// Operation Id + /// WorkspaceLogger_ListByWorkspace + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// | Field | Usage | Supported operators | Supported functions |</br>|-------------|-------------|-------------|-------------|</br>| name | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| description | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>| loggerType | filter | eq | |</br>| resourceId | filter | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |</br>. + /// Number of records to return. + /// Number of records 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) => _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateListByWorkspaceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateListByWorkspaceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, filter, top, skip); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceWorkspaceLoggerResource(Client, ApiManagementLoggerData.DeserializeApiManagementLoggerData(e)), _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics, Pipeline, "ServiceWorkspaceLoggerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service 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 loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.Exists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.Exists"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, 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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service 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 loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceLoggerResource(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.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string loggerId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(loggerId, nameof(loggerId)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, loggerId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ServiceWorkspaceLoggerResource(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.Serialization.cs new file mode 100644 index 000000000000..44ed9fbcbeee --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.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.ApiManagement +{ + public partial class ServiceWorkspaceLoggerResource : IJsonModel + { + private static ApiManagementLoggerData s_dataDeserializationInstance; + private static ApiManagementLoggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ApiManagementLoggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); + + ApiManagementLoggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.cs new file mode 100644 index 000000000000..f3ae41862dae --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceLoggerResource.cs @@ -0,0 +1,425 @@ +// 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.ApiManagement.Models; + +namespace Azure.ResourceManager.ApiManagement +{ + /// + /// A Class representing a ServiceWorkspaceLogger 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 GetServiceWorkspaceLoggerResource method. + /// Otherwise you can get one from its parent resource using the GetServiceWorkspaceLogger method. + /// + public partial class ServiceWorkspaceLoggerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The serviceName. + /// The workspaceId. + /// The loggerId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string serviceName, string workspaceId, string loggerId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics; + private readonly WorkspaceLoggerRestOperations _serviceWorkspaceLoggerWorkspaceLoggerRestClient; + private readonly ApiManagementLoggerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.ApiManagement/service/workspaces/loggers"; + + /// Initializes a new instance of the class for mocking. + protected ServiceWorkspaceLoggerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ServiceWorkspaceLoggerResource(ArmClient client, ApiManagementLoggerData 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 ServiceWorkspaceLoggerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApiManagement", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string serviceWorkspaceLoggerWorkspaceLoggerApiVersion); + _serviceWorkspaceLoggerWorkspaceLoggerRestClient = new WorkspaceLoggerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceWorkspaceLoggerWorkspaceLoggerApiVersion); +#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 ApiManagementLoggerData 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 the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Get"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.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 ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Get"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.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 ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Delete"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken).ConfigureAwait(false); + var uri = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes the specified logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Delete + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Delete"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, cancellationToken); + var uri = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch); + var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString()); + var operation = new ApiManagementArmOperation(response, rehydrationToken); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates an existing logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(ETag ifMatch, ApiManagementLoggerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Update"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Updates an existing logger. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Update + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update. + /// Update parameters. + /// The cancellation token to use. + /// is null. + public virtual Response Update(ETag ifMatch, ApiManagementLoggerPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.Update"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, ifMatch, patch, cancellationToken); + return Response.FromValue(new ServiceWorkspaceLoggerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the entity state (Etag) version of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetEntityTagAsync(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.GetEntityTag"); + scope.Start(); + try + { + var response = await _serviceWorkspaceLoggerWorkspaceLoggerRestClient.GetEntityTagAsync(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; + } + } + + /// + /// Gets the entity state (Etag) version of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_GetEntityTag + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetEntityTag(CancellationToken cancellationToken = default) + { + using var scope = _serviceWorkspaceLoggerWorkspaceLoggerClientDiagnostics.CreateScope("ServiceWorkspaceLoggerResource.GetEntityTag"); + scope.Start(); + try + { + var response = _serviceWorkspaceLoggerWorkspaceLoggerRestClient.GetEntityTag(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/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueCollection.cs index bd94e3cb09c6..9f8b6f098908 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string namedValu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> ExistsAsync(string namedValueId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual Response Exists(string namedValueId, CancellationToken canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.Serialization.cs index 0cfa4686e635..8b0484eabab4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceNamedValueResource : IJsonModel { + private static ApiManagementNamedValueData s_dataDeserializationInstance; + private static ApiManagementNamedValueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementNamedValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementNamedValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementNamedValueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.cs index cecfb0f47d03..6be68e49991a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNamedValueResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -405,7 +405,7 @@ public virtual async Task> GetValueAsync(Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual Response GetValue(CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task> Refr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -527,7 +527,7 @@ public virtual ArmOperation RefreshSecret(Wa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -565,7 +565,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationCollection.cs index 2fb6f4c907b4..5a3686c9613e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -157,7 +157,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -198,7 +198,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -239,7 +239,7 @@ public virtual Response Get(NotificationNa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -303,7 +303,7 @@ public virtual Pageable GetAll(int? top = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -342,7 +342,7 @@ public virtual async Task> ExistsAsync(NotificationName notificat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -381,7 +381,7 @@ public virtual Response Exists(NotificationName notificationName, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.Serialization.cs index 237787eaee9a..17e428d4eb2b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceNotificationResource : IJsonModel { + private static ApiManagementNotificationData s_dataDeserializationInstance; + private static ApiManagementNotificationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementNotificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementNotificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementNotificationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.cs index 732252c90a59..23b1262f4f1e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceNotificationResource.cs @@ -112,7 +112,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -192,7 +192,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -237,7 +237,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual ArmOperation Update(WaitUnt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -307,7 +307,7 @@ public virtual AsyncPageable GetWorkspaceNotificationReci /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -332,7 +332,7 @@ public virtual Pageable GetWorkspaceNotificationRecipient /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -371,7 +371,7 @@ public virtual async Task> CheckEntityExistsWorkspaceNotification /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -410,7 +410,7 @@ public virtual Response CheckEntityExistsWorkspaceNotificationRecipientUse /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -449,7 +449,7 @@ public virtual async Task> CreateOrUpdateWorkspa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -488,7 +488,7 @@ public virtual Response CreateOrUpdateWorkspaceNotificati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -527,7 +527,7 @@ public virtual async Task DeleteWorkspaceNotificationRecipientUserAsyn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -566,7 +566,7 @@ public virtual Response DeleteWorkspaceNotificationRecipientUser(string userId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -591,7 +591,7 @@ public virtual AsyncPageable GetWorkspaceNotificationRec /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -616,7 +616,7 @@ public virtual Pageable GetWorkspaceNotificationRecipien /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -655,7 +655,7 @@ public virtual async Task> CheckEntityExistsWorkspaceNotification /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -694,7 +694,7 @@ public virtual Response CheckEntityExistsWorkspaceNotificationRecipientEma /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -733,7 +733,7 @@ public virtual async Task> CreateOrUpdateWorksp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -772,7 +772,7 @@ public virtual Response CreateOrUpdateWorkspaceNotificat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -811,7 +811,7 @@ public virtual async Task DeleteWorkspaceNotificationRecipientEmailAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyCollection.cs index 1a9accbf4df9..98f88140b8ca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(Pol /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName policyId, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -389,7 +389,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -431,7 +431,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentCollection.cs index fc981498fe9a..83c4499a0d25 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string id, P /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Pageable GetAll(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task> ExistsAsync(string id, PolicyFragmentC /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string id, PolicyFragmentContentFormat? for /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.Serialization.cs index 20e5321a4732..51dfbd32b668 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspacePolicyFragmentResource : IJsonModel { + private static PolicyFragmentContractData s_dataDeserializationInstance; + private static PolicyFragmentContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyFragmentContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyFragmentContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.cs index 6ffc58e5b1d4..dbe6ad8af6a2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyFragmentResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyFragme /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -323,7 +323,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual ArmOperation Update(WaitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual AsyncPageable GetReferencesAsync(int /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -432,7 +432,7 @@ public virtual Pageable GetReferences(int? top = nu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -470,7 +470,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.Serialization.cs index 8945a5c7b97c..85d415aa841b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspacePolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.cs index 29c6da6ee423..6b08920d856f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspacePolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Pol /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(PolicyExportFormat? /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -373,7 +373,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkCollection.cs index 21880bb062d5..819a39719f21 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string apiLi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string apiLinkId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string apiLinkId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.Serialization.cs index 561d548d59b5..02e9f6a761aa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceProductApiLinkResource : IJsonModel { + private static ProductApiLinkContractData s_dataDeserializationInstance; + private static ProductApiLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProductApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProductApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ProductApiLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.cs index e0b3eddebae6..6ff070dcb7c5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductApiLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductCollection.cs index c47cc49f4615..9384a1f04ab4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string productId, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -328,7 +328,7 @@ public virtual Pageable GetAll(string filter = /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual async Task> ExistsAsync(string productId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -414,7 +414,7 @@ public virtual Response Exists(string productId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkCollection.cs index 03935765fc0b..552e84fbb870 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string gro /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string groupLinkId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string groupLinkId, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.Serialization.cs index 471f099ebace..f5625706a6ba 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceProductGroupLinkResource : IJsonModel { + private static ProductGroupLinkContractData s_dataDeserializationInstance; + private static ProductGroupLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProductGroupLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProductGroupLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ProductGroupLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.cs index fac9a36f4abd..3542e8632a82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductGroupLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyCollection.cs index e13e5602d50d..24bdb46fdbd1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(PolicyName po /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> ExistsAsync(PolicyName policyId, Polic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(PolicyName policyId, PolicyExportFormat? fo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.Serialization.cs index 7307822eb386..c52effb16914 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceProductPolicyResource : IJsonModel { + private static PolicyContractData s_dataDeserializationInstance; + private static PolicyContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); PolicyContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.cs index edf59a44dbfc..882deb039bc7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductPolicyResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(PolicyExportF /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -374,7 +374,7 @@ public virtual ArmOperation Update(WaitUn /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -412,7 +412,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.Serialization.cs index 834686a46a61..b24fc126ee8a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceProductResource : IJsonModel { + private static ApiManagementProductData s_dataDeserializationInstance; + private static ApiManagementProductData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementProductData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.cs index 5371fbde2056..8f326ae250cd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceProductResource.cs @@ -110,7 +110,7 @@ public virtual ServiceWorkspaceProductPolicyCollection GetServiceWorkspaceProduc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetSe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -177,7 +177,7 @@ public virtual ServiceWorkspaceProductApiLinkCollection GetServiceWorkspaceProdu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -246,7 +246,7 @@ public virtual ServiceWorkspaceProductGroupLinkCollection GetServiceWorkspacePro /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -277,7 +277,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response GetServiceWork /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -388,7 +388,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -434,7 +434,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, bool? dele /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -523,7 +523,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -566,7 +566,7 @@ public virtual Response Update(ETag ifMatch, Ap /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -604,7 +604,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaCollection.cs index d400742625ce..62acb4d6e171 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -164,7 +164,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -254,7 +254,7 @@ public virtual Response Get(string schemaId, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Pageable GetAll(string filter = n /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string schemaId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual Response Exists(string schemaId, CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.Serialization.cs index cc9a5dd2ca9b..6bee88f3e69a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceSchemaResource : IJsonModel { + private static ApiManagementGlobalSchemaData s_dataDeserializationInstance; + private static ApiManagementGlobalSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiManagementGlobalSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiManagementGlobalSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); ApiManagementGlobalSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.cs index 616399bbda3a..61e5131d50c1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSchemaResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -366,7 +366,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionCollection.cs index bf41a4cbccb6..cc5e6e3e7362 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -123,7 +123,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual Response Get(string sid, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual AsyncPageable GetAllAsync(s /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual Pageable GetAll(string filt /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> ExistsAsync(string sid, CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -423,7 +423,7 @@ public virtual Response Exists(string sid, CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -468,7 +468,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.Serialization.cs index dd4d27ba5424..1331bbf69d7d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceSubscriptionResource : IJsonModel { + private static SubscriptionContractData s_dataDeserializationInstance; + private static SubscriptionContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); SubscriptionContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.cs index 0487421f4014..7597d186bfe0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceSubscriptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -371,7 +371,7 @@ public virtual Response Update(ETag ifMatc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -409,7 +409,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -447,7 +447,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -523,7 +523,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -561,7 +561,7 @@ public virtual async Task> GetSecretsAsync(Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -599,7 +599,7 @@ public virtual Response GetSecrets(CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -637,7 +637,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkCollection.cs index 357851e28949..2115f3b2b6dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string apiLinkId /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync(str /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string apiLinkId, Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string apiLinkId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.Serialization.cs index 376b9d33d6fc..88a71dc7563b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceTagApiLinkResource : IJsonModel { + private static TagApiLinkContractData s_dataDeserializationInstance; + private static TagApiLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagApiLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagApiLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.cs index 7809cf299e80..700a039c3021 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagApiLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagCollection.cs index b6b1b6cb4b46..519ee311d84e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -169,7 +169,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -259,7 +259,7 @@ public virtual Response Get(string tagId, Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -293,7 +293,7 @@ public virtual AsyncPageable GetAllAsync(string fil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -327,7 +327,7 @@ public virtual Pageable GetAll(string filter = null /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -370,7 +370,7 @@ public virtual async Task> ExistsAsync(string tagId, Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -413,7 +413,7 @@ public virtual Response Exists(string tagId, CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkCollection.cs index 347d4b918c8f..9ea40a15a90d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string ope /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string operationLinkId, Ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string operationLinkId, CancellationToken c /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.Serialization.cs index 56eb9439b630..a57076cd9b24 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceTagOperationLinkResource : IJsonModel { + private static TagOperationLinkContractData s_dataDeserializationInstance; + private static TagOperationLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagOperationLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagOperationLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagOperationLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.cs index 9c69bf8b6985..3834c259e71a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagOperationLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkCollection.cs index 011a4aef593b..b3110063d025 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string produ /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -289,7 +289,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Pageable GetAll(string fi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> ExistsAsync(string productLinkId, Canc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string productLinkId, CancellationToken can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -453,7 +453,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.Serialization.cs index cacf9543f7c1..9b358d0b9549 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceTagProductLinkResource : IJsonModel { + private static TagProductLinkContractData s_dataDeserializationInstance; + private static TagProductLinkContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagProductLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagProductLinkContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagProductLinkContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.cs index 8a32b8077562..2ec76159c7e8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagProductLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.Serialization.cs index 6114a88cd9a2..5720a17de5ab 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class ServiceWorkspaceTagResource : IJsonModel { + private static TagContractData s_dataDeserializationInstance; + private static TagContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TagContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.cs index d25e2119f264..8ff9c5590c30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/ServiceWorkspaceTagResource.cs @@ -110,7 +110,7 @@ public virtual ServiceWorkspaceTagApiLinkCollection GetServiceWorkspaceTagApiLin /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetServi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -179,7 +179,7 @@ public virtual ServiceWorkspaceTagOperationLinkCollection GetServiceWorkspaceTag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -248,7 +248,7 @@ public virtual ServiceWorkspaceTagProductLinkCollection GetServiceWorkspaceTagPr /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Response GetServiceWorksp /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -350,7 +350,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -390,7 +390,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -435,7 +435,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -480,7 +480,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -523,7 +523,7 @@ public virtual async Task> UpdateAsync(ETa /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -566,7 +566,7 @@ public virtual Response Update(ETag ifMatch, ApiMan /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -604,7 +604,7 @@ public virtual async Task> GetEntityStateAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs index a384be630378..520e9be757a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -206,7 +206,7 @@ public virtual async Task> GetAsync(AccessNam /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -247,7 +247,7 @@ public virtual Response Get(AccessName accessName, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -309,7 +309,7 @@ public virtual Pageable GetAll(string filter = null, C /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> ExistsAsync(AccessName accessName, Can /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -387,7 +387,7 @@ public virtual Response Exists(AccessName accessName, CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.Serialization.cs index 63ad63daf667..f48bf746c1d2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class TenantAccessInfoResource : IJsonModel { + private static TenantAccessInfoData s_dataDeserializationInstance; + private static TenantAccessInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TenantAccessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TenantAccessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); TenantAccessInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs index 98b84fc79975..62f5af31e3ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/TenantAccessInfoResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(ETag i /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -272,7 +272,7 @@ public virtual Response Update(ETag ifMatch, TenantAcc /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task RegeneratePrimaryKeyAsync(CancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -348,7 +348,7 @@ public virtual Response RegeneratePrimaryKey(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -386,7 +386,7 @@ public virtual async Task RegenerateSecondaryKeyAsync(CancellationToke /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual Response RegenerateSecondaryKey(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task> GetSecretsAs /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -500,7 +500,7 @@ public virtual Response GetSecrets(CancellationT /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -534,7 +534,7 @@ public virtual async Task RegeneratePrimaryKeyForGitAsync(Cancellation /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -568,7 +568,7 @@ public virtual Response RegeneratePrimaryKeyForGit(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -602,7 +602,7 @@ public virtual async Task RegenerateSecondaryKeyForGitAsync(Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// @@ -636,7 +636,7 @@ public virtual Response RegenerateSecondaryKeyForGit(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -674,7 +674,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractCollection.cs index 844b2e6c1948..12c0cbd0a449 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(string w /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response Get(string workspaceId, Cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -291,7 +291,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task> ExistsAsync(string workspaceId, Cancel /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual Response Exists(string workspaceId, CancellationToken cance /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.Serialization.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.Serialization.cs index a566a7b13878..b4516ad18ff4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.Serialization.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApiManagement { public partial class WorkspaceContractResource : IJsonModel { + private static WorkspaceContractData s_dataDeserializationInstance; + private static WorkspaceContractData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceContractData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApiManagementContext.Default); WorkspaceContractData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApiManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.cs index 45e4a68f5314..37b975629d78 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/Generated/WorkspaceContractResource.cs @@ -109,7 +109,7 @@ public virtual ServiceWorkspaceApiCollection GetServiceWorkspaceApis() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetServiceWorks /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -178,7 +178,7 @@ public virtual ServiceWorkspacePolicyCollection GetServiceWorkspacePolicies() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetServiceWo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -245,7 +245,7 @@ public virtual ServiceWorkspaceTagCollection GetServiceWorkspaceTags() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -276,7 +276,7 @@ public virtual async Task> GetServiceWorks /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -294,6 +294,75 @@ public virtual Response GetServiceWorkspaceTag(stri return GetServiceWorkspaceTags().Get(tagId, cancellationToken); } + /// Gets a collection of ServiceWorkspaceDiagnosticResources in the WorkspaceContract. + /// An object representing collection of ServiceWorkspaceDiagnosticResources and their operations over a ServiceWorkspaceDiagnosticResource. + public virtual ServiceWorkspaceDiagnosticCollection GetServiceWorkspaceDiagnostics() + { + return GetCachedClient(client => new ServiceWorkspaceDiagnosticCollection(client, Id)); + } + + /// + /// Gets the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetServiceWorkspaceDiagnosticAsync(string diagnosticId, CancellationToken cancellationToken = default) + { + return await GetServiceWorkspaceDiagnostics().GetAsync(diagnosticId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the Diagnostic specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/diagnostics/{diagnosticId} + /// + /// + /// Operation Id + /// WorkspaceDiagnostic_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Diagnostic identifier. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetServiceWorkspaceDiagnostic(string diagnosticId, CancellationToken cancellationToken = default) + { + return GetServiceWorkspaceDiagnostics().Get(diagnosticId, cancellationToken); + } + /// Gets a collection of ServiceWorkspaceApiVersionSetResources in the WorkspaceContract. /// An object representing collection of ServiceWorkspaceApiVersionSetResources and their operations over a ServiceWorkspaceApiVersionSetResource. public virtual ServiceWorkspaceApiVersionSetCollection GetServiceWorkspaceApiVersionSets() @@ -314,7 +383,7 @@ public virtual ServiceWorkspaceApiVersionSetCollection GetServiceWorkspaceApiVer /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -345,7 +414,7 @@ public virtual async Task> GetSe /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -363,6 +432,144 @@ public virtual Response GetServiceWorkspa return GetServiceWorkspaceApiVersionSets().Get(versionSetId, cancellationToken); } + /// Gets a collection of ServiceWorkspaceBackendResources in the WorkspaceContract. + /// An object representing collection of ServiceWorkspaceBackendResources and their operations over a ServiceWorkspaceBackendResource. + public virtual ServiceWorkspaceBackendCollection GetServiceWorkspaceBackends() + { + return GetCachedClient(client => new ServiceWorkspaceBackendCollection(client, Id)); + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetServiceWorkspaceBackendAsync(string backendId, CancellationToken cancellationToken = default) + { + return await GetServiceWorkspaceBackends().GetAsync(backendId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the backend specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/backends/{backendId} + /// + /// + /// Operation Id + /// WorkspaceBackend_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the Backend entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetServiceWorkspaceBackend(string backendId, CancellationToken cancellationToken = default) + { + return GetServiceWorkspaceBackends().Get(backendId, cancellationToken); + } + + /// Gets a collection of ServiceWorkspaceCertificateResources in the WorkspaceContract. + /// An object representing collection of ServiceWorkspaceCertificateResources and their operations over a ServiceWorkspaceCertificateResource. + public virtual ServiceWorkspaceCertificateCollection GetServiceWorkspaceCertificates() + { + return GetCachedClient(client => new ServiceWorkspaceCertificateCollection(client, Id)); + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetServiceWorkspaceCertificateAsync(string certificateId, CancellationToken cancellationToken = default) + { + return await GetServiceWorkspaceCertificates().GetAsync(certificateId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the certificate specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/certificates/{certificateId} + /// + /// + /// Operation Id + /// WorkspaceCertificate_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Identifier of the certificate entity. Must be unique in the current API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetServiceWorkspaceCertificate(string certificateId, CancellationToken cancellationToken = default) + { + return GetServiceWorkspaceCertificates().Get(certificateId, cancellationToken); + } + /// Gets a collection of ServiceWorkspaceGroupResources in the WorkspaceContract. /// An object representing collection of ServiceWorkspaceGroupResources and their operations over a ServiceWorkspaceGroupResource. public virtual ServiceWorkspaceGroupCollection GetServiceWorkspaceGroups() @@ -383,7 +590,7 @@ public virtual ServiceWorkspaceGroupCollection GetServiceWorkspaceGroups() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -414,7 +621,7 @@ public virtual async Task> GetServiceWor /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -432,6 +639,75 @@ public virtual Response GetServiceWorkspaceGroup( return GetServiceWorkspaceGroups().Get(groupId, cancellationToken); } + /// Gets a collection of ServiceWorkspaceLoggerResources in the WorkspaceContract. + /// An object representing collection of ServiceWorkspaceLoggerResources and their operations over a ServiceWorkspaceLoggerResource. + public virtual ServiceWorkspaceLoggerCollection GetServiceWorkspaceLoggers() + { + return GetCachedClient(client => new ServiceWorkspaceLoggerCollection(client, Id)); + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetServiceWorkspaceLoggerAsync(string loggerId, CancellationToken cancellationToken = default) + { + return await GetServiceWorkspaceLoggers().GetAsync(loggerId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the details of the logger specified by its identifier. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/workspaces/{workspaceId}/loggers/{loggerId} + /// + /// + /// Operation Id + /// WorkspaceLogger_Get + /// + /// + /// Default Api Version + /// 2024-05-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Logger identifier. Must be unique in the API Management service instance. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetServiceWorkspaceLogger(string loggerId, CancellationToken cancellationToken = default) + { + return GetServiceWorkspaceLoggers().Get(loggerId, cancellationToken); + } + /// Gets a collection of ServiceWorkspaceNamedValueResources in the WorkspaceContract. /// An object representing collection of ServiceWorkspaceNamedValueResources and their operations over a ServiceWorkspaceNamedValueResource. public virtual ServiceWorkspaceNamedValueCollection GetServiceWorkspaceNamedValues() @@ -452,7 +728,7 @@ public virtual ServiceWorkspaceNamedValueCollection GetServiceWorkspaceNamedValu /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -483,7 +759,7 @@ public virtual async Task> GetServi /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -521,7 +797,7 @@ public virtual ServiceWorkspaceNotificationCollection GetServiceWorkspaceNotific /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -550,7 +826,7 @@ public virtual async Task> GetSer /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -586,7 +862,7 @@ public virtual ServiceWorkspacePolicyFragmentCollection GetServiceWorkspacePolic /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -618,7 +894,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -657,7 +933,7 @@ public virtual ServiceWorkspaceProductCollection GetServiceWorkspaceProducts() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -688,7 +964,7 @@ public virtual async Task> GetServiceW /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -726,7 +1002,7 @@ public virtual ServiceWorkspaceSchemaCollection GetServiceWorkspaceSchemas() /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -757,7 +1033,7 @@ public virtual async Task> GetServiceWo /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -795,7 +1071,7 @@ public virtual ServiceWorkspaceSubscriptionCollection GetServiceWorkspaceSubscri /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -826,7 +1102,7 @@ public virtual async Task> GetSer /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -857,7 +1133,7 @@ public virtual Response GetServiceWorkspac /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -897,7 +1173,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -937,7 +1213,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -982,7 +1258,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, ETag if /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1027,7 +1303,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, ETag ifMatch, Cancellati /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1070,7 +1346,7 @@ public virtual async Task> UpdateAsync(ETag /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1113,7 +1389,7 @@ public virtual Response Update(ETag ifMatch, Workspac /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource @@ -1151,7 +1427,7 @@ public virtual async Task> GetEntityTagAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-03-01-preview + /// 2024-05-01 /// /// /// Resource diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md index b236d0585451..faefbe3a73be 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/src/autorest.md @@ -8,12 +8,12 @@ azure-arm: true csharp: true library-name: ApiManagement namespace: Azure.ResourceManager.ApiManagement -require: https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/apimanagement/resource-manager/readme.md -tag: package-preview-2023-03 +require: https://github.com/Azure/azure-rest-api-specs/blob/86d7e7d7c7ea9428a3a8e983d746a270f0581bc7/specification/apimanagement/resource-manager/readme.md +tag: package-2024-05 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: - output-folder: $(this-folder)/../samples/Generated + output-folder: $(this-folder)/../tests/Generated clear-output-folder: true skipped-operations: - ApiProduct_ListByApis @@ -64,6 +64,11 @@ request-path-to-resource-name: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/namedValues/{namedValueId}: ApiManagementNamedValue /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/groups/{groupId}: ApiManagementGroup /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/schemas/{schemaId}: ApiManagementGlobalSchema + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/backends/{backendId}: ApiManagementBackend + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/certificates/{certificateId}: ApiManagementCertificate + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/loggers/{loggerId}: ApiManagementLogger + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}: ApiGateway + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}: ApiGatewayConfigConnection format-by-name-rules: 'tenantId': 'uuid' @@ -139,7 +144,6 @@ rename-mapping: GatewayHostnameConfigurationContract.properties.negotiateClientCertificate: IsClientCertificateRequired SubscriptionsDelegationSettingsProperties.enabled: IsSubscriptionDelegationEnabled RegistrationDelegationSettingsProperties.enabled: IsUserRegistrationDelegationEnabled - DiagnosticContract.properties.logClientIp: IsLogClientIPEnabled BackendTlsProperties.validateCertificateChain: ShouldValidateCertificateChain BackendTlsProperties.validateCertificateName: ShouldValidateCertificateName HostnameConfiguration.defaultSslBinding: IsDefaultSslBindingEnabled @@ -171,10 +175,12 @@ rename-mapping: AccessIdName.access: TenantAccess AccessIdName.gitAccess: TenantGitAccess ApiContract: Api - ApiCollection: ApiListResult NetworkStatusContractByLocation: NetworkStatusContractWithLocation ApiManagementServiceResource: ApiManagementService ApiReleaseContract: ApiRelease + BackendUpdateParameters: ApiManagementBackendPatch + CertificateCreateOrUpdateParameters: ApiManagementCertificateCreateOrUpdateContent + LoggerUpdateContract: ApiManagementLoggerPatch OperationContract: ApiOperation SchemaContract: ApiSchema TagDescriptionContract: ApiTagDescription @@ -316,9 +322,20 @@ rename-mapping: ApiVersionSetUpdateParameters: ApiVersionSetPatch OperationUpdateContract: ApiOperationPatch NamedValueCreateContract: ApiManagementNamedValueCreateOrUpdateContent + ApiManagementGatewayConfigConnectionResource: ApiGatewayConfigConnection + ApiManagementGatewayResource: ApiGateway + ApiManagementWorkspaceLinksResource: ApiManagementWorkspaceLinks + SoapApiType.grpc: Grpc + AllPoliciesContract.properties.referencePolicyId: -|arm-id + DiagnosticUpdateContract.properties.logClientIp: IsLogClientIPEnabled + DiagnosticContract.properties.logClientIp: IsLogClientIPEnabled + +keep-plural-resource-data: + - ApiManagementWorkspaceLinks directive: - remove-operation: 'ApiManagementOperations_List' + - remove-operation: 'OperationStatus_Get' - from: definitions.json where: $.definitions transform: > diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/ApiManagementManagementTestBase.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/ApiManagementManagementTestBase.cs index 8bf06851324c..b2e239d6f2e1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/ApiManagementManagementTestBase.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/ApiManagementManagementTestBase.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests { public class ApiManagementManagementTestBase : ManagementRecordedTestBase { - protected AzureLocation DefaultLocation => AzureLocation.EastUS; + protected AzureLocation DefaultLocation => AzureLocation.WestUS2; protected ArmClient Client { get; private set; } protected SubscriptionResource DefaultSubscription { get; private set; } @@ -33,6 +33,22 @@ public async Task CreateCommonClient() DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); } + protected async Task CreateResourceGroupAsync(AzureLocation location) + { + var resourceGroupName = Recording.GenerateAssetName("testRG-"); + var rgOp = await DefaultSubscription.GetResourceGroups().CreateOrUpdateAsync( + WaitUntil.Completed, + resourceGroupName, + new ResourceGroupData(location) + { + Tags = + { + { "test", "env" } + } + }); + return rgOp.Value; + } + protected async Task CreateResourceGroupAsync() { var resourceGroupName = Recording.GenerateAssetName("testRG-"); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiCollection.cs similarity index 91% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiCollection.cs index 05aa2d71ef3b..ee30f7ea1044 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiClone() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiClone.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiClone.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiClone() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiNewVersionUsingExistingApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiNewVersionUsingExistingAp [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiRevisionFromExistingApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRevisionFromExistingApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiRevisionFromExistingApi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServiceUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingImportOverrideServiceUrl.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +254,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingImportOverrideServic [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiUsingOai3Import.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3Import.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiUsingOai3Import() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingOai3ImportWithTranslateRequiredQueryParametersConduct.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -337,7 +337,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingOai3ImportWithTransl [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiUsingSwaggerImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingSwaggerImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiUsingSwaggerImport() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiUsingWadlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiUsingWadlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -419,7 +419,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiUsingWadlImport() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleAuthServers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiWithMultipleAuthServers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleAuthServers.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiWithMultipleAuthServers() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleOpenIdConnectProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -539,7 +539,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiWithMultipleOpenIdConnect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiWithOpenIdConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWithOpenIdConnect.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -595,7 +595,7 @@ public async Task CreateOrUpdate_ApiManagementCreateApiWithOpenIdConnect() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGraphQLApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -635,11 +635,57 @@ public async Task CreateOrUpdate_ApiManagementCreateGraphQLApi() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateGrpcApi() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGrpcApi.json + // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiResource + ApiCollection collection = apiManagementService.GetApis(); + + // invoke the operation + string apiId = "tempgroup"; + ApiCreateOrUpdateContent content = new ApiCreateOrUpdateContent + { + Description = "apidescription5200", + ApiType = ApiType.Grpc, + DisplayName = "apiname1463", + ServiceLink = "https://your-api-hostname/samples", + Path = "grpc-api", + Protocols = { ApiOperationInvokableProtocol.Https }, + Value = "https://raw.githubusercontent.com/kedacore/keda/main/pkg/scalers/externalscaler/externalscaler.proto", + Format = ContentFormat.GrpcLink, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiId, content); + ApiResource 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 + ApiData 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_ApiManagementCreateODataApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateODataApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateODataApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -685,7 +731,7 @@ public async Task CreateOrUpdate_ApiManagementCreateODataApi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapPassThroughApiUsingWsdlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +778,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapPassThroughApiUsingWsdlI [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSoapToRestApiUsingWsdlImport.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -778,7 +824,7 @@ public async Task CreateOrUpdate_ApiManagementCreateSoapToRestApiUsingWsdlImport [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWebSocketApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWebsocketApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWebsocketApi.json // this example is just showing the usage of "Api_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -822,7 +868,7 @@ public async Task CreateOrUpdate_ApiManagementCreateWebSocketApi() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -856,7 +902,7 @@ public async Task Get_ApiManagementGetApiContract() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -890,7 +936,7 @@ public async Task Get_ApiManagementGetApiRevisionContract() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApis.json // this example is just showing the usage of "Api_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -926,7 +972,7 @@ public async Task GetAll_ApiManagementListApis() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -956,7 +1002,7 @@ public async Task Exists_ApiManagementGetApiContract() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -986,7 +1032,7 @@ public async Task Exists_ApiManagementGetApiRevisionContract() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1028,7 +1074,7 @@ public async Task GetIfExists_ApiManagementGetApiContract() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticCollection.cs index 3f2bfcfe7459..ad4d89605be4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiDiagnostics.json // this example is just showing the usage of "ApiDiagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListApiDiagnostics() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticResource.cs index c964eb304f86..9ad00adba6f8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiDiagnosticResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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_ApiManagementDeleteApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_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 @@ -150,7 +150,7 @@ public async Task Update_ApiManagementUpdateApiDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiDiagnostic.json // this example is just showing the usage of "ApiDiagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayCollection.cs new file mode 100644 index 000000000000..b1d16c43e757 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayCollection.cs @@ -0,0 +1,251 @@ +// 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.ApiManagement.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ApiGatewayCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateStandardGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateStandardGateway.json + // this example is just showing the usage of "ApiGateway_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation + string gatewayName = "apimGateway1"; + ApiGatewayData data = new ApiGatewayData(new AzureLocation("South Central US"), new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.Standard) + { + Capacity = 1, + }) + { + SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"), + Tags = +{ +["Name"] = "Contoso", +["Test"] = "User" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, gatewayName, data); + ApiGatewayResource 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 + ApiGatewayData 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_ApiManagementCreateWorkspacePremiumGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePremiumGateway.json + // this example is just showing the usage of "ApiGateway_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation + string gatewayName = "apimGateway1"; + ApiGatewayData data = new ApiGatewayData(new AzureLocation("South Central US"), new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium) + { + Capacity = 1, + }) + { + SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/vn1/subnets/sn1"), + VirtualNetworkType = VirtualNetworkType.External, + Tags = +{ +["Name"] = "Contoso", +["Test"] = "User" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, gatewayName, data); + ApiGatewayResource 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 + ApiGatewayData 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_ApiManagementGatewayGetGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json + // this example is just showing the usage of "ApiGateway_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation + string gatewayName = "apimService1"; + ApiGatewayResource result = await collection.GetAsync(gatewayName); + + // 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 + ApiGatewayData 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_ApiManagementListGatewaysBySubscriptionAndResourceGroup() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscriptionAndResourceGroup.json + // this example is just showing the usage of "ApiGateway_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation and iterate over the result + await foreach (ApiGatewayResource 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 + ApiGatewayData 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_ApiManagementGatewayGetGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json + // this example is just showing the usage of "ApiGateway_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation + string gatewayName = "apimService1"; + bool result = await collection.ExistsAsync(gatewayName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGatewayGetGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json + // this example is just showing the usage of "ApiGateway_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiGatewayResource + ApiGatewayCollection collection = resourceGroupResource.GetApiGateways(); + + // invoke the operation + string gatewayName = "apimService1"; + NullableResponse response = await collection.GetIfExistsAsync(gatewayName); + ApiGatewayResource 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 + ApiGatewayData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionCollection.cs new file mode 100644 index 000000000000..4e48f75e83cf --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionCollection.cs @@ -0,0 +1,199 @@ +// 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.ApiManagement.Samples +{ + public partial class Sample_ApiGatewayConfigConnectionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // get the collection of this ApiGatewayConfigConnectionResource + ApiGatewayConfigConnectionCollection collection = apiGateway.GetApiGatewayConfigConnections(); + + // invoke the operation + string configConnectionName = "gcc-01"; + ApiGatewayConfigConnectionData data = new ApiGatewayConfigConnectionData + { + SourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001"), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, configConnectionName, data); + ApiGatewayConfigConnectionResource 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 + ApiGatewayConfigConnectionData 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_ApiManagementGetGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // get the collection of this ApiGatewayConfigConnectionResource + ApiGatewayConfigConnectionCollection collection = apiGateway.GetApiGatewayConfigConnections(); + + // invoke the operation + string configConnectionName = "gcc-01"; + ApiGatewayConfigConnectionResource result = await collection.GetAsync(configConnectionName); + + // 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 + ApiGatewayConfigConnectionData 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_ApiManagementListGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_ListByGateway" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-1"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // get the collection of this ApiGatewayConfigConnectionResource + ApiGatewayConfigConnectionCollection collection = apiGateway.GetApiGatewayConfigConnections(); + + // invoke the operation and iterate over the result + await foreach (ApiGatewayConfigConnectionResource 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 + ApiGatewayConfigConnectionData 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_ApiManagementGetGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // get the collection of this ApiGatewayConfigConnectionResource + ApiGatewayConfigConnectionCollection collection = apiGateway.GetApiGatewayConfigConnections(); + + // invoke the operation + string configConnectionName = "gcc-01"; + bool result = await collection.ExistsAsync(configConnectionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // get the collection of this ApiGatewayConfigConnectionResource + ApiGatewayConfigConnectionCollection collection = apiGateway.GetApiGatewayConfigConnections(); + + // invoke the operation + string configConnectionName = "gcc-01"; + NullableResponse response = await collection.GetIfExistsAsync(configConnectionName); + ApiGatewayConfigConnectionResource 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 + ApiGatewayConfigConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionResource.cs new file mode 100644 index 000000000000..ebda8c9b2d04 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayConfigConnectionResource.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 NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ApiGatewayConfigConnectionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayConfigConnectionResource created on azure + // for more information of creating ApiGatewayConfigConnectionResource, please refer to the document of ApiGatewayConfigConnectionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + string configConnectionName = "gcc-01"; + ResourceIdentifier apiGatewayConfigConnectionResourceId = ApiGatewayConfigConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName, configConnectionName); + ApiGatewayConfigConnectionResource apiGatewayConfigConnection = client.GetApiGatewayConfigConnectionResource(apiGatewayConfigConnectionResourceId); + + // invoke the operation + ApiGatewayConfigConnectionResource result = await apiGatewayConfigConnection.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 + ApiGatewayConfigConnectionData 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_ApiManagementGatewayDeleteGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_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 ApiGatewayConfigConnectionResource created on azure + // for more information of creating ApiGatewayConfigConnectionResource, please refer to the document of ApiGatewayConfigConnectionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + string configConnectionName = "gcc-01"; + ResourceIdentifier apiGatewayConfigConnectionResourceId = ApiGatewayConfigConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName, configConnectionName); + ApiGatewayConfigConnectionResource apiGatewayConfigConnection = client.GetApiGatewayConfigConnectionResource(apiGatewayConfigConnectionResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await apiGatewayConfigConnection.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementCreateGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayConfigConnection.json + // this example is just showing the usage of "ApiGatewayConfigConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayConfigConnectionResource created on azure + // for more information of creating ApiGatewayConfigConnectionResource, please refer to the document of ApiGatewayConfigConnectionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "standard-gw-01"; + string configConnectionName = "gcc-01"; + ResourceIdentifier apiGatewayConfigConnectionResourceId = ApiGatewayConfigConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName, configConnectionName); + ApiGatewayConfigConnectionResource apiGatewayConfigConnection = client.GetApiGatewayConfigConnectionResource(apiGatewayConfigConnectionResourceId); + + // invoke the operation + ApiGatewayConfigConnectionData data = new ApiGatewayConfigConnectionData + { + SourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/services/apim-service-1/workspaces/ws-001"), + }; + ArmOperation lro = await apiGatewayConfigConnection.UpdateAsync(WaitUntil.Completed, data); + ApiGatewayConfigConnectionResource 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 + ApiGatewayConfigConnectionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayResource.cs new file mode 100644 index 000000000000..ecfce3d07155 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiGatewayResource.cs @@ -0,0 +1,148 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ApiGatewayResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGatewayGetGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGetGateway.json + // this example is just showing the usage of "ApiGateway_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "apimService1"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // invoke the operation + ApiGatewayResource result = await apiGateway.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 + ApiGatewayData 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_ApiManagementGatewayDeleteGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayDeleteGateway.json + // this example is just showing the usage of "ApiGateway_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 ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "example-gateway"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // invoke the operation + await apiGateway.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdateStandardGateway() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateStandardGateway.json + // this example is just showing the usage of "ApiGateway_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 ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "apimGateway1"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // invoke the operation + ApiGatewayPatch patch = new ApiGatewayPatch + { + Sku = new ApiManagementGatewaySkuPropertiesForPatch + { + Name = ApiGatewaySkuType.Standard, + Capacity = 10, + }, + Tags = +{ +["Name"] = "Contoso", +["Test"] = "User" +}, + }; + ArmOperation lro = await apiGateway.UpdateAsync(WaitUntil.Completed, patch); + ApiGatewayResource 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 + ApiGatewayData 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 GetAvailableSkusApiManagementGatewaySkus_ApiManagementListSKUsGateways() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Gateways.json + // this example is just showing the usage of "ApiManagementGatewaySkus_ListAvailableSkus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiGatewayResource created on azure + // for more information of creating ApiGatewayResource, please refer to the document of ApiGatewayResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string gatewayName = "apimService1"; + ResourceIdentifier apiGatewayResourceId = ApiGatewayResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, gatewayName); + ApiGatewayResource apiGateway = client.GetApiGatewayResource(apiGatewayResourceId); + + // invoke the operation and iterate over the result + await foreach (GatewayResourceSkuResult item in apiGateway.GetAvailableSkusApiManagementGatewaySkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs index 1539141e2f3b..d21c05a701e5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiIssueAttachments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiIssueAttachments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueAttachments.json // this example is just showing the usage of "ApiIssueAttachment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssueAttachments() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_ApiManagementGetApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentResource.cs index 4d940fb25385..a2ae002f8030 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueAttachmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueAttachmentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueAttachmentResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiIssueAttachment() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiIssueAttachment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiIssueAttachment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueAttachment.json // this example is just showing the usage of "ApiIssueAttachment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCollection.cs index 195286fc5f3a..b6a661284e06 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssue.json // this example is just showing the usage of "ApiIssue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiIssue() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssue() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssues.json // this example is just showing the usage of "ApiIssue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssues() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssue() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentCollection.cs index c5858aae30e6..65a765e5fb7b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiIssueComments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiIssueComments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiIssueComments.json // this example is just showing the usage of "ApiIssueComment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiIssueComments() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_ApiManagementGetApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentResource.cs index ef7bedf1f044..2ffcb1753ae9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueCommentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueCommentResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiIssueCommentResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiIssueComment() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiIssueComment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiIssueComment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssueComment.json // this example is just showing the usage of "ApiIssueComment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueResource.cs index a74eecf97380..bebb0612a7fb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiIssueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiIssueResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiIssue.json // this example is just showing the usage of "ApiIssue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiIssue() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiIssue.json // this example is just showing the usage of "ApiIssue_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_ApiManagementDeleteApiIssue() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiIssue.json // this example is just showing the usage of "ApiIssue_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateApiIssue() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiIssue.json // this example is just showing the usage of "ApiIssue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs index 5bbd86c8e5f7..7286f4b3a7bd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListAuthorizationServers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListAuthorizationServers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationServers.json // this example is just showing the usage of "AuthorizationServer_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListAuthorizationServers() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs index 8c99366cf043..df4468e033fd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementAuthorizationServerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementAuthorizationServerResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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_ApiManagementDeleteAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateAuthorizationServer() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementAuthorizationServerListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementAuthorizationServerListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAuthorizationServerListSecrets.json // this example is just showing the usage of "AuthorizationServer_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementAuthorizationServerListSecrets() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadAuthorizationServer() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadAuthorizationServer.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadAuthorizationServer.json // this example is just showing the usage of "AuthorizationServer_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendCollection.cs index c880857fe11d..b7c126a0f61b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementBackendCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateBackendProxyBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateBackendProxyBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendProxyBackend.json // this example is just showing the usage of "Backend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateBackendProxyBackend() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateBackendServiceFabric() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateBackendServiceFabric.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateBackendServiceFabric.json // this example is just showing the usage of "Backend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateBackendServiceFabric() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetBackend() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListBackends() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListBackends.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListBackends.json // this example is just showing the usage of "Backend_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListBackends() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task Exists_ApiManagementGetBackend() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendResource.cs index fb06ec742457..c9241943ba36 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementBackendResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementBackendResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementBackendResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetBackend.json // this example is just showing the usage of "Backend_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetBackend() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteBackend.json // this example is just showing the usage of "Backend_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_ApiManagementDeleteBackend() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateBackend.json // this example is just showing the usage of "Backend_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 @@ -121,7 +121,7 @@ public async Task Update_ApiManagementUpdateBackend() [Ignore("Only validating compilation of examples")] public async Task Reconnect_ApiManagementBackendReconnect() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementBackendReconnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackendReconnect.json // this example is just showing the usage of "Backend_Reconnect" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Reconnect_ApiManagementBackendReconnect() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadBackend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadBackend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadBackend.json // this example is just showing the usage of "Backend_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheCollection.cs index 0cf0e321e4fb..d2d4a78ee317 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementCacheCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCache.json // this example is just showing the usage of "Cache_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateCache() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCache() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListCaches() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListCaches.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCaches.json // this example is just showing the usage of "Cache_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListCaches() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCache() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheResource.cs index 3c94d9b5debb..8c426c3c6d30 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCacheResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCacheResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCacheResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCache.json // this example is just showing the usage of "Cache_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCache() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCache.json // this example is just showing the usage of "Cache_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_ApiManagementDeleteCache() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateCache.json // this example is just showing the usage of "Cache_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 @@ -115,7 +115,7 @@ public async Task Update_ApiManagementUpdateCache() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadCache() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadCache.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCache.json // this example is just showing the usage of "Cache_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateCollection.cs index 5e2af7795ed4..bee0b77f6951 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateCertificate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateCertificateWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCertificate() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetCertificateWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListCertificates.json // this example is just showing the usage of "Certificate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListCertificates() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetCertificate() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetCertificateWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,7 +309,7 @@ public async Task GetIfExists_ApiManagementGetCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateResource.cs index f41fb422671f..9f88321d77c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementCertificateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementCertificateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificate.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCertificate() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetCertificateWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteCertificate.json // this example is just showing the usage of "Certificate_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 @@ -110,7 +110,7 @@ public async Task Delete_ApiManagementDeleteCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificate.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateCertificateWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateCertificateWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateCertificateWithKeyVault.json // this example is just showing the usage of "Certificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task Update_ApiManagementCreateCertificateWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task RefreshSecret_ApiManagementRefreshCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementRefreshCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshCertificate.json // this example is just showing the usage of "Certificate_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RefreshSecret_ApiManagementRefreshCertificate() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadCertificate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadCertificate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadCertificate.json // this example is just showing the usage of "Certificate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs index b291a5d6ce96..160b76057009 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDeletedServiceCollection [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDeletedServiceByName() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDeletedServiceByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs index 98dba7561125..7f333acd9bca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDeletedServiceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementDeletedServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDeletedServiceByName() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDeletedServiceByName.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDeletedServiceByName.json // this example is just showing the usage of "DeletedServices_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDeletedServiceByName() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeletedServicesPurge() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeletedServicesPurge.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesPurge.json // this example is just showing the usage of "DeletedServices_Purge" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs index f2a4dae71c04..e5e4863bc909 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDiagnostic.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 @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_ApiManagementCreateDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.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 @@ -125,7 +125,7 @@ public async Task Get_ApiManagementGetDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListDiagnostics() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListDiagnostics.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDiagnostics.json // this example is just showing the usage of "Diagnostic_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListDiagnostics() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.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 @@ -191,7 +191,7 @@ public async Task Exists_ApiManagementGetDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs index 0858866d1d47..0ba3f91e3b01 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementDiagnosticResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementDiagnosticResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDiagnostic.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 @@ -51,7 +51,7 @@ public async Task Get_ApiManagementGetDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDiagnostic.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 @@ -79,7 +79,7 @@ public async Task Delete_ApiManagementDeleteDiagnostic() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDiagnostic.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 @@ -147,7 +147,7 @@ public async Task Update_ApiManagementUpdateDiagnostic() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadDiagnostic() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadDiagnostic.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDiagnostic.json // this example is just showing the usage of "Diagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs index dc1ae49c279c..30950a0b2603 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTemplate.json // this example is just showing the usage of "EmailTemplate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateTemplate() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTemplate() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTemplates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTemplates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTemplates.json // this example is just showing the usage of "EmailTemplate_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTemplates() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTemplate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs index efe57f61eb8a..b8f306a1e64f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementEmailTemplateResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementEmailTemplateResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTemplate.json // this example is just showing the usage of "EmailTemplate_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTemplate() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTemplate.json // this example is just showing the usage of "EmailTemplate_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_ApiManagementDeleteTemplate() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTemplate.json // this example is just showing the usage of "EmailTemplate_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_ApiManagementUpdateTemplate() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadEmailTemplate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadEmailTemplate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadEmailTemplate.json // this example is just showing the usage of "EmailTemplate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs index bf2ae5c114f4..b649d623d8c1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGatewayCertificateAuthority( [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayCertificateAuthority() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGatewaycertificateAuthorities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGatewayCertificateAuthorities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayCertificateAuthorities.json // this example is just showing the usage of "GatewayCertificateAuthority_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGatewaycertificateAuthorities() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayCertificateAuthority() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs index 760028ae31fa..fec266dde1ef 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCertificateAuthorityResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayCertificateAuthorityResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayCertificateAuthority() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_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_ApiManagementDeleteGatewayCertificateAuthority() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGatewayCertificateAuthority() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGatewayCertificateAuthority() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGatewayCertificateAuthority.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayCertificateAuthority.json // this example is just showing the usage of "GatewayCertificateAuthority_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCollection.cs index 969a61fbf434..715ed1c00c9f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGatewayCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGateway.json // this example is just showing the usage of "Gateway_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGateway() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGateway() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGateways() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGateways.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGateways.json // this example is just showing the usage of "Gateway_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGateways() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGateway() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs index 0ceba842822d..3f6c2af4b584 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGatewayHostnameConfiguration [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayHostnameConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGatewayHostnameConfigurations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGatewayHostnameConfigurations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayHostnameConfigurations.json // this example is just showing the usage of "GatewayHostnameConfiguration_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGatewayHostnameConfigurations() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayHostnameConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs index f1bb9dcfc68d..3279305d63d0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayHostnameConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementGatewayHostnameConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGatewayHostnameConfiguration() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_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_ApiManagementDeleteGatewayHostnameConfiguration() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGatewayHostnameConfiguration() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGatewayHostnameConfiguration() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGatewayHostnameConfiguration.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayHostnameConfiguration.json // this example is just showing the usage of "GatewayHostnameConfiguration_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayResource.cs index 3f38e2ed29c6..2c91609bb00f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGatewayResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGatewayResource.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementGatewayResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGateway.json // this example is just showing the usage of "Gateway_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGateway() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGateway.json // this example is just showing the usage of "Gateway_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_ApiManagementDeleteGateway() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGateway.json // this example is just showing the usage of "Gateway_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateGateway() [Ignore("Only validating compilation of examples")] public async Task GetKeys_ApiManagementGatewayListKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayListKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListKeys.json // this example is just showing the usage of "Gateway_ListKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task GetKeys_ApiManagementGatewayListKeys() [Ignore("Only validating compilation of examples")] public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayRegenerateKey.json // this example is just showing the usage of "Gateway_RegenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task RegenerateKey_ApiManagementGatewayRegenerateKey() [Ignore("Only validating compilation of examples")] public async Task GenerateToken_ApiManagementGatewayGenerateToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayGenerateToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayGenerateToken.json // this example is just showing the usage of "Gateway_GenerateToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GenerateToken_ApiManagementGatewayGenerateToken() [Ignore("Only validating compilation of examples")] public async Task InvalidateDebugCredentials_ApiManagementGatewayInvalidateDebugCredentials() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayInvalidateDebugCredentials.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayInvalidateDebugCredentials.json // this example is just showing the usage of "Gateway_InvalidateDebugCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 InvalidateDebugCredentials_ApiManagementGatewayInvalidateDebug [Ignore("Only validating compilation of examples")] public async Task GetDebugCredentials_ApiManagementGatewayListDebugCredentials() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayListDebugCredentials.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListDebugCredentials.json // this example is just showing the usage of "Gateway_ListDebugCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetDebugCredentials_ApiManagementGatewayListDebugCredentials() [Ignore("Only validating compilation of examples")] public async Task GetTrace_ApiManagementGatewayListTrace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGatewayListTrace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGatewayListTrace.json // this example is just showing the usage of "Gateway_ListTrace" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetTrace_ApiManagementGatewayListTrace() [Ignore("Only validating compilation of examples")] public async Task GetGatewayApisByService_ApiManagementListGatewayApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGatewayApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewayApis.json // this example is just showing the usage of "GatewayApi_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetGatewayApisByService_ApiManagementListGatewayApis() [Ignore("Only validating compilation of examples")] public async Task GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGatewayApi.json // this example is just showing the usage of "GatewayApi_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetGatewayApiEntityTag_ApiManagementHeadGatewayApi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGatewayApi.json // this example is just showing the usage of "GatewayApi_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateGatewayApi_ApiManagementCreateGatewayApi() [Ignore("Only validating compilation of examples")] public async Task DeleteGatewayApi_ApiManagementDeleteGatewayApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGatewayApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGatewayApi.json // this example is just showing the usage of "GatewayApi_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 @@ -409,7 +409,7 @@ public async Task DeleteGatewayApi_ApiManagementDeleteGatewayApi() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGateway() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGateway.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGateway.json // this example is just showing the usage of "Gateway_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs index aaf7146e0aa9..4e5afe8902ec 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateSchema1() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateSchema2() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetSchema1() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetSchema2() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGlobalSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGlobalSchemas.json // this example is just showing the usage of "GlobalSchema_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetSchema1() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetSchema2() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -334,7 +334,7 @@ public async Task GetIfExists_ApiManagementGetSchema1() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs index daf7777331a5..79476a0a29fb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGlobalSchemaResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementGlobalSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetSchema1() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetSchema2() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGlobalSchema.json // this example is just showing the usage of "GlobalSchema_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 @@ -111,7 +111,7 @@ public async Task Delete_ApiManagementDeleteSchema() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateSchema1() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGlobalSchema1.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema1.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateSchema1() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateSchema2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGlobalSchema2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGlobalSchema2.json // this example is just showing the usage of "GlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateSchema2() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGlobalSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGlobalSchema.json // this example is just showing the usage of "GlobalSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupCollection.cs index 04af76cd092b..c209f6cf11b9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroup.json // this example is just showing the usage of "Group_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGroupExternal() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGroupExternal.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupExternal.json // this example is just showing the usage of "Group_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateGroupExternal() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroups.json // this example is just showing the usage of "Group_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupResource.cs index 37f46a10fea9..e6009eaf778e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGroup.json // this example is just showing the usage of "Group_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroup.json // this example is just showing the usage of "Group_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_ApiManagementDeleteGroup() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGroup.json // this example is just showing the usage of "Group_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 @@ -115,7 +115,7 @@ public async Task Update_ApiManagementUpdateGroup() [Ignore("Only validating compilation of examples")] public async Task GetGroupUsers_ApiManagementListGroupUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGroupUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGroupUsers.json // this example is just showing the usage of "GroupUser_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 GetGroupUsers_ApiManagementListGroupUsers() [Ignore("Only validating compilation of examples")] public async Task CheckGroupUserEntityExists_ApiManagementHeadGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroupUser.json // this example is just showing the usage of "GroupUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckGroupUserEntityExists_ApiManagementHeadGroupUser() [Ignore("Only validating compilation of examples")] public async Task CreateGroupUser_ApiManagementCreateGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGroupUser.json // this example is just showing the usage of "GroupUser_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 @@ -201,7 +201,7 @@ public async Task CreateGroupUser_ApiManagementCreateGroupUser() [Ignore("Only validating compilation of examples")] public async Task DeleteGroupUser_ApiManagementDeleteGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGroupUser.json // this example is just showing the usage of "GroupUser_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 @@ -229,7 +229,7 @@ public async Task DeleteGroupUser_ApiManagementDeleteGroupUser() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGroup.json // this example is just showing the usage of "Group_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs index 5ea03070dcec..b0ccd8c3460b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListIdentityProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListIdentityProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIdentityProviders.json // this example is just showing the usage of "IdentityProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListIdentityProviders() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs index ddad5f501dfe..d3e8c3348db6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIdentityProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementIdentityProviderResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIdentityProvider.json // this example is just showing the usage of "IdentityProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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_ApiManagementDeleteIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateIdentityProvider.json // this example is just showing the usage of "IdentityProvider_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_ApiManagementUpdateIdentityProvider() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementIdentityProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementIdentityProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementIdentityProviderListSecrets.json // this example is just showing the usage of "IdentityProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementIdentityProviderListSecrets() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadIdentityProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadIdentityProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadIdentityProvider.json // this example is just showing the usage of "IdentityProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueCollection.cs index 3a7e1e6450de..cdc3d1db629f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueCollection [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetIssue() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListIssues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListIssues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListIssues.json // this example is just showing the usage of "Issue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListIssues() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetIssue() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueResource.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueResource.cs index 08e085becbda..f2777830b5cc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementIssueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementIssueResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementIssueResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetIssue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetIssue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetIssue.json // this example is just showing the usage of "Issue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerCollection.cs index 6d2193762765..42e21119852f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAILogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAILogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAILogger.json // this example is just showing the usage of "Logger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateAILogger() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateEHLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateEHLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateEHLogger.json // this example is just showing the usage of "Logger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateEHLogger() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetLogger() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListLoggers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListLoggers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListLoggers.json // this example is just showing the usage of "Logger_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListLoggers() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetLogger() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerResource.cs index 21ac01936a84..91de47bf13be 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementLoggerResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementLoggerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementLoggerResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetLogger.json // this example is just showing the usage of "Logger_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetLogger() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteLogger.json // this example is just showing the usage of "Logger_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_ApiManagementDeleteLogger() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateLogger.json // this example is just showing the usage of "Logger_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_ApiManagementUpdateLogger() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadLogger() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadLogger.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadLogger.json // this example is just showing the usage of "Logger_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs index 11b2d5f150ff..3e027d98e16c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValue.json // this example is just showing the usage of "NamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateNamedValue() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNamedValue() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListNamedValues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListNamedValues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNamedValues.json // this example is just showing the usage of "NamedValue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListNamedValues() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +242,7 @@ public async Task Exists_ApiManagementGetNamedValue() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -272,7 +272,7 @@ public async Task Exists_ApiManagementGetNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -314,7 +314,7 @@ public async Task GetIfExists_ApiManagementGetNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueResource.cs index 68c851c16844..4b5783e7a9e9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNamedValueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNamedValueResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValue.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNamedValue() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNamedValueWithKeyVault.json // this example is just showing the usage of "NamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -110,7 +110,7 @@ public async Task Delete_ApiManagementDeleteNamedValue() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateNamedValue.json // this example is just showing the usage of "NamedValue_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 @@ -150,7 +150,7 @@ public async Task Update_ApiManagementUpdateNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetValue_ApiManagementNamedValueListValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementNamedValueListValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementNamedValueListValue.json // this example is just showing the usage of "NamedValue_ListValue" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetValue_ApiManagementNamedValueListValue() [Ignore("Only validating compilation of examples")] public async Task RefreshSecret_ApiManagementRefreshNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementRefreshNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshNamedValue.json // this example is just showing the usage of "NamedValue_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RefreshSecret_ApiManagementRefreshNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNamedValue.json // this example is just showing the usage of "NamedValue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationCollection.cs index 3846c4273f08..1634a12edcde 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateNotification() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNotification() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListNotifications() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListNotifications.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotifications.json // this example is just showing the usage of "Notification_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListNotifications() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNotification() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationResource.cs index c2380197d638..2b8e8b9673fa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementNotificationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementNotificationResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetNotification.json // this example is just showing the usage of "Notification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetNotification() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotification.json // this example is just showing the usage of "Notification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateNotification() [Ignore("Only validating compilation of examples")] public async Task GetNotificationRecipientUsers_ApiManagementListNotificationRecipientUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListNotificationRecipientUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientUsers.json // this example is just showing the usage of "NotificationRecipientUser_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetNotificationRecipientUsers_ApiManagementListNotificationRec [Ignore("Only validating compilation of examples")] public async Task CheckNotificationRecipientUserEntityExists_ApiManagementHeadNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckNotificationRecipientUserEntityExists_ApiManagementHeadNo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateNotificationRecipientUser_ApiManagementCreateNot [Ignore("Only validating compilation of examples")] public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientUser.json // this example is just showing the usage of "NotificationRecipientUser_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 @@ -197,7 +197,7 @@ public async Task DeleteNotificationRecipientUser_ApiManagementDeleteNotificatio [Ignore("Only validating compilation of examples")] public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRecipientEmails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListNotificationRecipientEmails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListNotificationRecipientEmails.json // this example is just showing the usage of "NotificationRecipientEmail_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task GetNotificationRecipientEmails_ApiManagementListNotificationRe [Ignore("Only validating compilation of examples")] public async Task CheckNotificationRecipientEmailEntityExists_ApiManagementHeadNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckNotificationRecipientEmailEntityExists_ApiManagementHeadN [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -283,7 +283,7 @@ public async Task CreateOrUpdateNotificationRecipientEmail_ApiManagementCreateNo [Ignore("Only validating compilation of examples")] public async Task DeleteNotificationRecipientEmail_ApiManagementDeleteNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteNotificationRecipientEmail.json // this example is just showing the usage of "NotificationRecipientEmail_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs index 35f94f7f4431..b05ac84dec17 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListOpenIdConnectProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListOpenIdConnectProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListOpenIdConnectProviders.json // this example is just showing the usage of "OpenIdConnectProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListOpenIdConnectProviders() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs index 452d66098759..6fae6f009e0e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementOpenIdConnectProviderResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementOpenIdConnectProviderResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_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_ApiManagementDeleteOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateOpenIdConnectProvider() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementOpenidConnectProviderListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementOpenidConnectProviderListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementOpenidConnectProviderListSecrets.json // this example is just showing the usage of "OpenIdConnectProvider_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementOpenidConnectProviderListSecrets() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadOpenIdConnectProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadOpenIdConnectProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadOpenIdConnectProvider.json // this example is just showing the usage of "OpenIdConnectProvider_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyCollection.cs index 205635cdd5dc..ad7b085b5333 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreatePolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetPolicyFormat() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicies.json // this example is just showing the usage of "Policy_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetPolicy() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetPolicyFormat() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task GetIfExists_ApiManagementGetPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyResource.cs index 6543a4a985e3..82c909cf18d7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicy.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFormat.json // this example is just showing the usage of "Policy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetPolicyFormat() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeletePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeletePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicy.json // this example is just showing the usage of "Policy_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 @@ -111,7 +111,7 @@ public async Task Delete_ApiManagementDeletePolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicy.json // this example is just showing the usage of "Policy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreatePolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicy.json // this example is just showing the usage of "Policy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs index a2aa3d76329d..f61fb4744708 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalDelegationSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalDelegationSettingResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementPortalSettingsGetDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsGetDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetDelegation.json // this example is just showing the usage of "DelegationSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsGetDelegation() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsUpdateDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateDelegation.json // this example is just showing the usage of "DelegationSettings_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 @@ -84,7 +84,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateDelegation() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateDelegation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsPutDelegation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutDelegation.json // this example is just showing the usage of "DelegationSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsUpdateDelegation() [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementListSecretsPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSecretsPortalSettingsValidationKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsPortalSettingsValidationKey.json // this example is just showing the usage of "DelegationSettings_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementListSecretsPortalSettings() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadDelegationSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadDelegationSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDelegationSettings.json // this example is just showing the usage of "DelegationSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs index 547b561a6504..558e467ac084 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalRevision.json // this example is just showing the usage of "PortalRevision_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreatePortalRevision() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPortalRevision() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPortalRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPortalRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalRevisions.json // this example is just showing the usage of "PortalRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPortalRevisions() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPortalRevision() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs index d4220fd5f4b5..d90d0af99bc3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalRevisionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalRevisionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPortalRevision.json // this example is just showing the usage of "PortalRevision_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPortalRevision() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdatePortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdatePortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalRevision.json // this example is just showing the usage of "PortalRevision_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 @@ -88,7 +88,7 @@ public async Task Update_ApiManagementUpdatePortalRevision() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadPortalRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadPortalRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalRevision.json // this example is just showing the usage of "PortalRevision_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs index 0e1214770967..07c3d5a18395 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignInSettingResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPortalSignInSettingResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementPortalSettingsGetSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsGetSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignIn.json // this example is just showing the usage of "SignInSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsGetSignIn() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignIn.json // this example is just showing the usage of "SignInSettings_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 @@ -80,7 +80,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignIn() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignIn() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsPutSignIn.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignIn.json // this example is just showing the usage of "SignInSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsUpdateSignIn() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadSignInSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadSignInSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignInSettings.json // this example is just showing the usage of "SignInSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs index bc00b0f14a24..68c6fabf7b9b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPortalSignUpSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPortalSignUpSettingResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementPortalSettingsGetSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsGetSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsGetSignUp.json // this example is just showing the usage of "SignUpSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsGetSignUp() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsUpdateSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsUpdateSignUp.json // this example is just showing the usage of "SignUpSettings_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_ApiManagementPortalSettingsUpdateSignUp() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementPortalSettingsUpdateSignUp() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalSettingsPutSignUp.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalSettingsPutSignUp.json // this example is just showing the usage of "SignUpSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalSettingsUpdateSignUp() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadSignUpSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadSignUpSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSignUpSettings.json // this example is just showing the usage of "SignUpSettings_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs index 980a0e9e9374..fecd33f15b38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_ApiManagementApproveOrRejectPrivateEndpointConn [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPrivateEndpointConnections() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPrivateEndpointConnections.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateEndpointConnections.json // this example is just showing the usage of "PrivateEndpointConnection_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListPrivateEndpointConnections() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs index d984d9287784..df888803a65c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_GetByName" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeletePrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeletePrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_ApiManagementDeletePrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementApproveOrRejectPrivateEndpointConnection() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnection_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs index e071ca0fa8c5..44f2878d4191 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs index 9e0e75147999..1559a4b8400a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_ApiManagementGetPrivateLinkGroupResource() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPrivateLinkGroupResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPrivateLinkGroupResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPrivateLinkGroupResources.json // this example is just showing the usage of "PrivateEndpointConnection_ListPrivateLinkResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_ApiManagementListPrivateLinkGroupResources() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_ApiManagementGetPrivateLinkGroupResource() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPrivateLinkGroupResource() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPrivateLinkGroupResource.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPrivateLinkGroupResource.json // this example is just showing the usage of "PrivateEndpointConnection_GetPrivateLinkResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductCollection.cs index e381a328c981..1d20a9ee0eca 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProduct.json // this example is just showing the usage of "Product_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateProduct() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProduct() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProducts.json // this example is just showing the usage of "Product_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProducts() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProduct() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs index 730092d55955..1fb47948f64e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListProductPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductPolicies.json // this example is just showing the usage of "ProductPolicy_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs index 87e75c7ab3b0..d42cae8f6aa0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductPolicy.json // this example is just showing the usage of "ProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductPolicy.json // this example is just showing the usage of "ProductPolicy_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_ApiManagementDeleteProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductPolicy.json // this example is just showing the usage of "ProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductPolicy.json // this example is just showing the usage of "ProductPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductResource.cs index 958e05292f4a..e280b204b901 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementProductResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProduct.json // this example is just showing the usage of "Product_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProduct() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProduct.json // this example is just showing the usage of "Product_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_ApiManagementDeleteProduct() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProduct.json // this example is just showing the usage of "Product_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_ApiManagementUpdateProduct() [Ignore("Only validating compilation of examples")] public async Task GetProductApis_ApiManagementListProductApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApis.json // this example is just showing the usage of "ProductApi_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetProductApis_ApiManagementListProductApis() [Ignore("Only validating compilation of examples")] public async Task CheckProductApiEntityExists_ApiManagementHeadProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductApi.json // this example is just showing the usage of "ProductApi_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckProductApiEntityExists_ApiManagementHeadProductApi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateProductApi_ApiManagementCreateProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApi.json // this example is just showing the usage of "ProductApi_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateProductApi_ApiManagementCreateProductApi() [Ignore("Only validating compilation of examples")] public async Task DeleteProductApi_ApiManagementDeleteProductApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApi.json // this example is just showing the usage of "ProductApi_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 @@ -230,7 +230,7 @@ public async Task DeleteProductApi_ApiManagementDeleteProductApi() [Ignore("Only validating compilation of examples")] public async Task GetProductGroups_ApiManagementListProductGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroups.json // this example is just showing the usage of "ProductGroup_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetProductGroups_ApiManagementListProductGroups() [Ignore("Only validating compilation of examples")] public async Task CheckProductGroupEntityExists_ApiManagementHeadProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductGroup.json // this example is just showing the usage of "ProductGroup_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckProductGroupEntityExists_ApiManagementHeadProductGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroup.json // this example is just showing the usage of "ProductGroup_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateProductGroup_ApiManagementCreateProductGroup() [Ignore("Only validating compilation of examples")] public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroup.json // this example is just showing the usage of "ProductGroup_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 @@ -344,7 +344,7 @@ public async Task DeleteProductGroup_ApiManagementDeleteProductGroup() [Ignore("Only validating compilation of examples")] public async Task GetAllProductSubscriptionData_ApiManagementListProductSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductSubscriptions.json // this example is just showing the usage of "ProductSubscriptions_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 @@ -375,7 +375,7 @@ public async Task GetAllProductSubscriptionData_ApiManagementListProductSubscrip [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProduct.json // this example is just showing the usage of "Product_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagCollection.cs index 69eb1333db64..db966c5e284c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateProductTag() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetProductTag() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListProductTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductTags.json // this example is just showing the usage of "Tag_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductTags() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductTag() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagResource.cs index 978d98425f7f..5008160e4f48 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementProductTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementProductTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementProductTagResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductTag.json // this example is just showing the usage of "Tag_GetByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductTag() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductTag.json // this example is just showing the usage of "Tag_DetachFromProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementDeleteProductTag() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductTag.json // this example is just showing the usage of "Tag_AssignToProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateProductTag() [Ignore("Only validating compilation of examples")] public async Task GetEntityStateByProduct_ApiManagementHeadProductTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProductTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductTag.json // this example is just showing the usage of "Tag_GetEntityStateByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceCollection.cs similarity index 90% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceCollection.cs index 44c680d62d86..94231ce4b52c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_ApiManagementServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustomHostname() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateMultiRegionServiceWithCustomHostname.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateMultiRegionServiceWithCustom [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateService.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateService() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateServiceHavingMsi() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceInVnetWithPublicIP.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInVnetWithPublicIP.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateServiceInVnetWithPublicIP() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceInZones.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceInZones.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,11 +265,55 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceInZones() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateServiceSkuv2Service() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceSkuv2Service.json + // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg1"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ApiManagementServiceResource + ApiManagementServiceCollection collection = resourceGroupResource.GetApiManagementServices(); + + // invoke the operation + string serviceName = "apimService1"; + ApiManagementServiceData data = new ApiManagementServiceData(new AzureLocation("West US"), new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "apim@autorestsdk.com", "autorestsdk") + { + Identity = new ManagedServiceIdentity("SystemAssigned"), + Tags = +{ +["tag1"] = "value1", +["tag2"] = "value2", +["tag3"] = "value3" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); + ApiManagementServiceResource 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 + ApiManagementServiceData 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_ApiManagementCreateServiceWithCustomHostnameKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithCustomHostnameKeyVault.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +383,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithCustomHostnameKey [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithDeveloperPortal() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithDeveloperPortal.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithDeveloperPortal.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -382,7 +426,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithDeveloperPortal() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithNatGatewayEnabled() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithNatGatewayEnabled.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +470,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithNatGatewayEnabled [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithSystemCertificates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithSystemCertificates.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -474,7 +518,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithSystemCertificate [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithUserAssignedIdentity.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -524,7 +568,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithUserAssignedIdent [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateServiceWithoutLegacyConfigurationApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateServiceWithoutLegacyConfigurationApi.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -568,7 +612,7 @@ public async Task CreateOrUpdate_ApiManagementCreateServiceWithoutLegacyConfigur [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementUndelete() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUndelete.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUndelete.json // this example is just showing the usage of "ApiManagementService_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -606,7 +650,7 @@ public async Task CreateOrUpdate_ApiManagementUndelete() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -639,7 +683,7 @@ public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -672,7 +716,7 @@ public async Task Get_ApiManagementServiceGetService() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -705,7 +749,7 @@ public async Task Get_ApiManagementServiceGetServiceHavingMsi() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListServiceBySubscriptionAndResourceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscriptionAndResourceGroup.json // this example is just showing the usage of "ApiManagementService_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 @@ -740,7 +784,7 @@ public async Task GetAll_ApiManagementListServiceBySubscriptionAndResourceGroup( [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -769,7 +813,7 @@ public async Task Exists_ApiManagementServiceGetMultiRegionInternalVnet() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -798,7 +842,7 @@ public async Task Exists_ApiManagementServiceGetService() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -827,7 +871,7 @@ public async Task Exists_ApiManagementServiceGetServiceHavingMsi() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -868,7 +912,7 @@ public async Task GetIfExists_ApiManagementServiceGetMultiRegionInternalVnet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -909,7 +953,7 @@ public async Task GetIfExists_ApiManagementServiceGetService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceResource.cs similarity index 90% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceResource.cs index def7ca59e0be..cb1959f87ccf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementServiceResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementServiceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ApiManagementServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetMultiRegionInternalVnet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetMultiRegionInternalVnet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetMultiRegionInternalVnet.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementServiceGetMultiRegionInternalVnet() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetService.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementServiceGetService() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementServiceGetServiceHavingMsi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetServiceHavingMsi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetServiceHavingMsi.json // this example is just showing the usage of "ApiManagementService_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementServiceGetServiceHavingMsi() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementServiceDeleteService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceDeleteService.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceDeleteService.json // this example is just showing the usage of "ApiManagementService_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_ApiManagementServiceDeleteService() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateServiceDisableTls10() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateServiceDisableTls10.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceDisableTls10.json // this example is just showing the usage of "ApiManagementService_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 @@ -175,7 +175,7 @@ public async Task Update_ApiManagementUpdateServiceDisableTls10() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateServicePublisherDetails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateServicePublisherDetails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServicePublisherDetails.json // this example is just showing the usage of "ApiManagementService_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 @@ -211,7 +211,7 @@ public async Task Update_ApiManagementUpdateServicePublisherDetails() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateServiceToNewVnetAndAZs.json // this example is just showing the usage of "ApiManagementService_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 @@ -258,11 +258,40 @@ public async Task Update_ApiManagementUpdateServiceToNewVnetAndAvailabilityZones Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAllPoliciesByService_ApiManagementListPolicyRestrictions() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementAllPolicies.json + // this example is just showing the usage of "AllPolicies_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // invoke the operation and iterate over the result + await foreach (AllPoliciesContract item in apiManagementService.GetAllPoliciesByServiceAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetApisByTags_ApiManagementListApisByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApisByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApisByTags.json // this example is just showing the usage of "Api_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +320,7 @@ public async Task GetApisByTags_ApiManagementListApisByTags() [Ignore("Only validating compilation of examples")] public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPerformConnectivityCheckHttpConnect.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheckHttpConnect.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +357,7 @@ public async Task PerformConnectivityCheckAsync_HTTPConnectivityCheck() [Ignore("Only validating compilation of examples")] public async Task PerformConnectivityCheckAsync_TCPConnectivityCheck() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPerformConnectivityCheck.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPerformConnectivityCheck.json // this example is just showing the usage of "PerformConnectivityCheckAsync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -359,7 +388,7 @@ public async Task PerformConnectivityCheckAsync_TCPConnectivityCheck() [Ignore("Only validating compilation of examples")] public async Task GetContentTypes_ApiManagementListContentTypes() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListContentTypes.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypes.json // this example is just showing the usage of "ContentType_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -388,7 +417,7 @@ public async Task GetContentTypes_ApiManagementListContentTypes() [Ignore("Only validating compilation of examples")] public async Task GetContentType_ApiManagementGetContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentType.json // this example is just showing the usage of "ContentType_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -415,7 +444,7 @@ public async Task GetContentType_ApiManagementGetContentType() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentType.json // this example is just showing the usage of "ContentType_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -442,7 +471,7 @@ public async Task CreateOrUpdateContentType_ApiManagementCreateContentType() [Ignore("Only validating compilation of examples")] public async Task DeleteContentType_ApiManagementDeleteContentType() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteContentType.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentType.json // this example is just showing the usage of "ContentType_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 @@ -470,7 +499,7 @@ public async Task DeleteContentType_ApiManagementDeleteContentType() [Ignore("Only validating compilation of examples")] public async Task GetContentItems_ApiManagementListContentTypeContentItems() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListContentTypeContentItems.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListContentTypeContentItems.json // this example is just showing the usage of "ContentItem_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +529,7 @@ public async Task GetContentItems_ApiManagementListContentTypeContentItems() [Ignore("Only validating compilation of examples")] public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadContentTypeContentItem.json // this example is just showing the usage of "ContentItem_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -528,7 +557,7 @@ public async Task GetContentItemEntityTag_ApiManagementHeadContentTypeContentIte [Ignore("Only validating compilation of examples")] public async Task GetContentItem_ApiManagementGetContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetContentTypeContentItem.json // this example is just showing the usage of "ContentItem_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -556,7 +585,7 @@ public async Task GetContentItem_ApiManagementGetContentTypeContentItem() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateContentTypeContentItem.json // this example is just showing the usage of "ContentItem_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -584,7 +613,7 @@ public async Task CreateOrUpdateContentItem_ApiManagementCreateContentTypeConten [Ignore("Only validating compilation of examples")] public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteContentTypeContentItem.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteContentTypeContentItem.json // this example is just showing the usage of "ContentItem_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 @@ -613,7 +642,7 @@ public async Task DeleteContentItem_ApiManagementDeleteContentTypeContentItem() [Ignore("Only validating compilation of examples")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsConsumption() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSKUs-Consumption.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Consumption.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -642,7 +671,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsCons [Ignore("Only validating compilation of examples")] public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedicated() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSKUs-Dedicated.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSKUs-Dedicated.json // this example is just showing the usage of "ApiManagementServiceSkus_ListAvailableServiceSkus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -671,7 +700,7 @@ public async Task GetAvailableApiManagementServiceSkus_ApiManagementListSKUsDedi [Ignore("Only validating compilation of examples")] public async Task Restore_ApiManagementRestoreService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementRestoreWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRestoreWithAccessKey.json // this example is just showing the usage of "ApiManagementService_Restore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -707,7 +736,7 @@ public async Task Restore_ApiManagementRestoreService() [Ignore("Only validating compilation of examples")] public async Task Backup_ApiManagementBackupWithAccessKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementBackupWithAccessKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithAccessKey.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -743,7 +772,7 @@ public async Task Backup_ApiManagementBackupWithAccessKey() [Ignore("Only validating compilation of examples")] public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementBackupWithSystemManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithSystemManagedIdentity.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -778,7 +807,7 @@ public async Task Backup_ApiManagementBackupWithSystemManagedIdentity() [Ignore("Only validating compilation of examples")] public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementBackupWithUserAssignedManagedIdentity.json // this example is just showing the usage of "ApiManagementService_Backup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -814,7 +843,7 @@ public async Task Backup_ApiManagementBackupWithUserAssignedManagedIdentity() [Ignore("Only validating compilation of examples")] public async Task MigrateToStv2_ApiManagementMigrateService() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceMigrateToStv2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceMigrateToStv2.json // this example is just showing the usage of "ApiManagementService_MigrateToStv2" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -849,7 +878,7 @@ public async Task MigrateToStv2_ApiManagementMigrateService() [Ignore("Only validating compilation of examples")] public async Task GetSsoToken_ApiManagementServiceGetSsoToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetSsoToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetSsoToken.json // this example is just showing the usage of "ApiManagementService_GetSsoToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -875,7 +904,7 @@ public async Task GetSsoToken_ApiManagementServiceGetSsoToken() [Ignore("Only validating compilation of examples")] public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConfigurationUpdates() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementApplyNetworkConfigurationUpdates.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementApplyNetworkConfigurationUpdates.json // this example is just showing the usage of "ApiManagementService_ApplyNetworkConfigurationUpdates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -910,7 +939,7 @@ public async Task ApplyNetworkConfigurationUpdates_ApiManagementApplyNetworkConf [Ignore("Only validating compilation of examples")] public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetNetworkStatus.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatus.json // this example is just showing the usage of "NetworkStatus_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -939,7 +968,7 @@ public async Task GetNetworkStatuses_ApiManagementServiceGetNetworkStatus() [Ignore("Only validating compilation of examples")] public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatusByLocation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetNetworkStatusByLocation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetNetworkStatusByLocation.json // this example is just showing the usage of "NetworkStatus_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -966,7 +995,7 @@ public async Task GetNetworkStatusByLocation_ApiManagementServiceGetNetworkStatu [Ignore("Only validating compilation of examples")] public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGetOutboundNetworkDependenciesEndpoints() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetOutboundNetworkDependenciesEndpoints.json // this example is just showing the usage of "OutboundNetworkDependenciesEndpoints_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +1024,7 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ApiManagementServiceGe [Ignore("Only validating compilation of examples")] public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPolicyDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyDescriptions.json // this example is just showing the usage of "PolicyDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1021,11 +1050,38 @@ public async Task GetPolicyDescriptions_ApiManagementListPolicyDescriptions() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ByServicePolicyRestrictionValidation_ApiManagementListPolicyRestrictions() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementValidatePolicies.json + // this example is just showing the usage of "PolicyRestrictionValidations_ByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // invoke the operation + ArmOperation lro = await apiManagementService.ByServicePolicyRestrictionValidationAsync(WaitUntil.Completed); + GitOperationResultContractData result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetPortalSettings_ApiManagementListPortalSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPortalSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalSettings.json // this example is just showing the usage of "PortalSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1054,7 +1110,7 @@ public async Task GetPortalSettings_ApiManagementListPortalSettings() [Ignore("Only validating compilation of examples")] public async Task GetProductsByTags_ApiManagementListProductsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductsByTags.json // this example is just showing the usage of "Product_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1083,7 +1139,7 @@ public async Task GetProductsByTags_ApiManagementListProductsByTags() [Ignore("Only validating compilation of examples")] public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetQuotaCounterKeys.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeys.json // this example is just showing the usage of "QuotaByCounterKeys_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1113,7 +1169,7 @@ public async Task GetQuotaByCounterKeys_ApiManagementGetQuotaCounterKeys() [Ignore("Only validating compilation of examples")] public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateQuotaCounterKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKey.json // this example is just showing the usage of "QuotaByCounterKeys_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 @@ -1148,7 +1204,7 @@ public async Task UpdateQuotaByCounterKeys_ApiManagementUpdateQuotaCounterKey() [Ignore("Only validating compilation of examples")] public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetQuotaCounterKeysByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1176,7 +1232,7 @@ public async Task GetQuotaByPeriodKey_ApiManagementGetQuotaCounterKeysByQuotaPer [Ignore("Only validating compilation of examples")] public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuotaPeriod() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateQuotaCounterKeyByQuotaPeriod.json // this example is just showing the usage of "QuotaByPeriodKeys_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 @@ -1209,7 +1265,7 @@ public async Task UpdateQuotaByPeriodKey_ApiManagementUpdateQuotaCounterKeyByQuo [Ignore("Only validating compilation of examples")] public async Task GetRegions_ApiManagementListRegions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListRegions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListRegions.json // this example is just showing the usage of "Region_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1238,7 +1294,7 @@ public async Task GetRegions_ApiManagementListRegions() [Ignore("Only validating compilation of examples")] public async Task GetReportsByApi_ApiManagementGetReportsByApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByApi.json // this example is just showing the usage of "Reports_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1268,7 +1324,7 @@ public async Task GetReportsByApi_ApiManagementGetReportsByApi() [Ignore("Only validating compilation of examples")] public async Task GetReportsByUser_ApiManagementGetReportsByUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByUser.json // this example is just showing the usage of "Reports_ListByUser" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1298,7 +1354,7 @@ public async Task GetReportsByUser_ApiManagementGetReportsByUser() [Ignore("Only validating compilation of examples")] public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByOperation.json // this example is just showing the usage of "Reports_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1328,7 +1384,7 @@ public async Task GetReportsByOperation_ApiManagementGetReportsByOperation() [Ignore("Only validating compilation of examples")] public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByProduct.json // this example is just showing the usage of "Reports_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1358,7 +1414,7 @@ public async Task GetReportsByProduct_ApiManagementGetReportsByProduct() [Ignore("Only validating compilation of examples")] public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByGeo.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByGeo.json // this example is just showing the usage of "Reports_ListByGeo" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +1444,7 @@ public async Task GetReportsByGeo_ApiManagementGetReportsByGeo() [Ignore("Only validating compilation of examples")] public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsBySubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsBySubscription.json // this example is just showing the usage of "Reports_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 @@ -1418,7 +1474,7 @@ public async Task GetReportsBySubscription_ApiManagementGetReportsBySubscription [Ignore("Only validating compilation of examples")] public async Task GetReportsByTime_ApiManagementGetReportsByTime() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByTime.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByTime.json // this example is just showing the usage of "Reports_ListByTime" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1449,7 +1505,7 @@ public async Task GetReportsByTime_ApiManagementGetReportsByTime() [Ignore("Only validating compilation of examples")] public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetReportsByRequest.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetReportsByRequest.json // this example is just showing the usage of "Reports_ListByRequest" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1479,7 +1535,7 @@ public async Task GetReportsByRequest_ApiManagementGetReportsByRequest() [Ignore("Only validating compilation of examples")] public async Task GetTagResources_ApiManagementListTagResources() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTagResources.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagResources.json // this example is just showing the usage of "TagResource_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1508,7 +1564,7 @@ public async Task GetTagResources_ApiManagementListTagResources() [Ignore("Only validating compilation of examples")] public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDeploy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantConfigurationDeploy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationDeploy.json // this example is just showing the usage of "TenantConfiguration_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 @@ -1540,7 +1596,7 @@ public async Task DeployTenantConfiguration_ApiManagementTenantConfigurationDepl [Ignore("Only validating compilation of examples")] public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantConfigurationSave.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationSave.json // this example is just showing the usage of "TenantConfiguration_Save" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1572,7 +1628,7 @@ public async Task SaveTenantConfiguration_ApiManagementTenantConfigurationSave() [Ignore("Only validating compilation of examples")] public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationValidate() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantConfigurationValidate.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantConfigurationValidate.json // this example is just showing the usage of "TenantConfiguration_Validate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1604,7 +1660,7 @@ public async Task ValidateTenantConfiguration_ApiManagementTenantConfigurationVa [Ignore("Only validating compilation of examples")] public async Task GetTenantConfigurationSyncState_ApiManagementTenantAccessSyncState() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantAccessSyncState.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessSyncState.json // this example is just showing the usage of "TenantConfiguration_GetSyncState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs index a71c7becc470..6ac81066867b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateSubscription.json // this example is just showing the usage of "Subscription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateSubscription() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetSubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSubscriptions.json // this example is just showing the usage of "Subscription_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_ApiManagementListSubscriptions() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetSubscription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs index 3ee35ffcccff..108140182e63 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetSubscription.json // this example is just showing the usage of "Subscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetSubscription() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteSubscription.json // this example is just showing the usage of "Subscription_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_ApiManagementDeleteSubscription() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateSubscription.json // this example is just showing the usage of "Subscription_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 @@ -115,7 +115,7 @@ public async Task Update_ApiManagementUpdateSubscription() [Ignore("Only validating compilation of examples")] public async Task RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegeneratePrimaryKey.json // this example is just showing the usage of "Subscription_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegeneratePrimaryKey_ApiManagementSubscriptionRegeneratePrimar [Ignore("Only validating compilation of examples")] public async Task RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSecondaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionRegenerateSecondaryKey.json // this example is just showing the usage of "Subscription_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegenerateSecondaryKey_ApiManagementSubscriptionRegenerateSeco [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementSubscriptionListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementSubscriptionListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementSubscriptionListSecrets.json // this example is just showing the usage of "Subscription_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementSubscriptionListSecrets() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadSubscription.json // this example is just showing the usage of "Subscription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagCollection.cs index bebb9b2cee08..f27e0ca7f31f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTag.json // this example is just showing the usage of "Tag_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateTag() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTag() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTags.json // this example is just showing the usage of "Tag_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTags() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTag() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagResource.cs index 0642ac7422f0..947732c0c1f8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTagResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTagResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTag.json // this example is just showing the usage of "Tag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTag() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTag.json // this example is just showing the usage of "Tag_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_ApiManagementDeleteTag() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTag.json // this example is just showing the usage of "Tag_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 @@ -115,7 +115,7 @@ public async Task Update_ApiManagementUpdateTag() [Ignore("Only validating compilation of examples")] public async Task GetEntityState_ApiManagementHeadTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTag.json // this example is just showing the usage of "Tag_GetEntityState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs index ac8865675d60..bec132128e82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingCollection [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTenantSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantSettings.json // this example is just showing the usage of "TenantSettings_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListTenantSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTenantSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs index 7bb822493680..d37a04c90cdb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementTenantSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementTenantSettingResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantSettings() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantSettings.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantSettings.json // this example is just showing the usage of "TenantSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserCollection.cs index 8ef2956f2092..17efc997df38 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateUser.json // this example is just showing the usage of "User_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateUser() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetUser() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUsers.json // this example is just showing the usage of "User_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListUsers() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetUser() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserResource.cs index 3aa9a9bf6624..f31a484ffcda 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiManagementUserResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUser.json // this example is just showing the usage of "User_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetUser() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteUser.json // this example is just showing the usage of "User_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_ApiManagementDeleteUser() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateUser.json // this example is just showing the usage of "User_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateUser() [Ignore("Only validating compilation of examples")] public async Task GenerateSsoUri_ApiManagementUserGenerateSsoUrl() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUserGenerateSsoUrl.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserGenerateSsoUrl.json // this example is just showing the usage of "User_GenerateSsoUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GenerateSsoUri_ApiManagementUserGenerateSsoUrl() [Ignore("Only validating compilation of examples")] public async Task GetSharedAccessToken_ApiManagementUserToken() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUserToken.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserToken.json // this example is just showing the usage of "User_GetSharedAccessToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSharedAccessToken_ApiManagementUserToken() [Ignore("Only validating compilation of examples")] public async Task GetUserIdentities_ApiManagementListUserIdentities() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListUserIdentities.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserIdentities.json // this example is just showing the usage of "UserIdentities_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 @@ -206,7 +206,7 @@ public async Task GetUserIdentities_ApiManagementListUserIdentities() [Ignore("Only validating compilation of examples")] public async Task SendUserConfirmationPassword_ApiManagementUserConfirmationPasswordSend() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUserConfirmationPasswordSend.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUserConfirmationPasswordSend.json // this example is just showing the usage of "UserConfirmationPassword_Send" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task SendUserConfirmationPassword_ApiManagementUserConfirmationPass [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadUser.json // this example is just showing the usage of "User_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs index 3ef0dffc125f..730030240b65 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetUserSubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListUserSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListUserSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListUserSubscriptions.json // this example is just showing the usage of "UserSubscription_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_ApiManagementListUserSubscriptions() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetUserSubscription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs index 7b8f3265f8b2..266d9fd81968 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementUserSubscriptionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiManagementUserSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetUserSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetUserSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetUserSubscription.json // this example is just showing the usage of "UserSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksCollection.cs new file mode 100644 index 000000000000..016950fcecf0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksCollection.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.ApiManagement.Samples +{ + public partial class Sample_ApiManagementWorkspaceLinksCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceLinks() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json + // this example is just showing the usage of "ApiManagementWorkspaceLink_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "service1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiManagementWorkspaceLinksResource + ApiManagementWorkspaceLinksCollection collection = apiManagementService.GetAllApiManagementWorkspaceLinks(); + + // invoke the operation + string workspaceId = "wk-1"; + ApiManagementWorkspaceLinksResource result = await collection.GetAsync(workspaceId); + + // 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 + ApiManagementWorkspaceLinksData 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_ApiManagementListGatewayConfigConnection() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLinks.json + // this example is just showing the usage of "ApiManagementWorkspaceLinks_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "service1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiManagementWorkspaceLinksResource + ApiManagementWorkspaceLinksCollection collection = apiManagementService.GetAllApiManagementWorkspaceLinks(); + + // invoke the operation and iterate over the result + await foreach (ApiManagementWorkspaceLinksResource 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 + ApiManagementWorkspaceLinksData 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_ApiManagementGetWorkspaceLinks() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json + // this example is just showing the usage of "ApiManagementWorkspaceLink_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "service1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiManagementWorkspaceLinksResource + ApiManagementWorkspaceLinksCollection collection = apiManagementService.GetAllApiManagementWorkspaceLinks(); + + // invoke the operation + string workspaceId = "wk-1"; + bool result = await collection.ExistsAsync(workspaceId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceLinks() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json + // this example is just showing the usage of "ApiManagementWorkspaceLink_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "service1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this ApiManagementWorkspaceLinksResource + ApiManagementWorkspaceLinksCollection collection = apiManagementService.GetAllApiManagementWorkspaceLinks(); + + // invoke the operation + string workspaceId = "wk-1"; + NullableResponse response = await collection.GetIfExistsAsync(workspaceId); + ApiManagementWorkspaceLinksResource 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 + ApiManagementWorkspaceLinksData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksResource.cs new file mode 100644 index 000000000000..c8adacac9251 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiManagementWorkspaceLinksResource.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.ApiManagement.Samples +{ + public partial class Sample_ApiManagementWorkspaceLinksResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceLinks() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLink.json + // this example is just showing the usage of "ApiManagementWorkspaceLink_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementWorkspaceLinksResource created on azure + // for more information of creating ApiManagementWorkspaceLinksResource, please refer to the document of ApiManagementWorkspaceLinksResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "service1"; + string workspaceId = "wk-1"; + ResourceIdentifier apiManagementWorkspaceLinksResourceId = ApiManagementWorkspaceLinksResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + ApiManagementWorkspaceLinksResource apiManagementWorkspaceLinks = client.GetApiManagementWorkspaceLinksResource(apiManagementWorkspaceLinksResourceId); + + // invoke the operation + ApiManagementWorkspaceLinksResource result = await apiManagementWorkspaceLinks.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 + ApiManagementWorkspaceLinksData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationCollection.cs index 346ff0cbed3a..0de48d2be65f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperation.json // this example is just showing the usage of "ApiOperation_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiOperation() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperation() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetApiOperationPetStore() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiOperations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiOperations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperations.json // this example is just showing the usage of "ApiOperation_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListApiOperations() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperation() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -250,7 +250,7 @@ public async Task Exists_ApiManagementGetApiOperationPetStore() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetIfExists_ApiManagementGetApiOperation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyCollection.cs index b66534e20fd2..f94618c89cbe 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiOperationPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiOperationPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationPolicies.json // this example is just showing the usage of "ApiOperationPolicy_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiOperationPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyResource.cs index 33cf0083a5f4..177085024fcc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_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_ApiManagementDeleteApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationPolicy.json // this example is just showing the usage of "ApiOperationPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationResource.cs index 9cb68a230aa4..b0b83723face 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiOperationResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperation.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperation() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationPetStore() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationPetStore.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationPetStore.json // this example is just showing the usage of "ApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetApiOperationPetStore() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -113,7 +113,7 @@ public async Task Delete_ApiManagementDeleteApiOperation() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiOperation.json // this example is just showing the usage of "ApiOperation_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 @@ -174,7 +174,7 @@ public async Task Update_ApiManagementUpdateApiOperation() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperation.json // this example is just showing the usage of "ApiOperation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagCollection.cs index 0294dde6a0bf..4ee20daa5818 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiOperationTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiOperationTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationTags.json // this example is just showing the usage of "Tag_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiOperationTags() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagResource.cs index e272b8651e96..f92b7f658dc6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiOperationTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiOperationTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiOperationTagResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiOperationTag.json // this example is just showing the usage of "Tag_GetByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiOperationTag.json // this example is just showing the usage of "Tag_DetachFromOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementDeleteApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiOperationTag.json // this example is just showing the usage of "Tag_AssignToOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiOperationTag() [Ignore("Only validating compilation of examples")] public async Task GetEntityStateByOperation_ApiManagementHeadApiOperationTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiOperationTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiOperationTag.json // this example is just showing the usage of "Tag_GetEntityStateByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyCollection.cs index 16fab527cc8a..2f3403576371 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiPolicy() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiPolicyNonXmlEncoded() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetApiPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiPolicies.json // this example is just showing the usage of "ApiPolicy_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GetAll_ApiManagementListApiPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyResource.cs index 3e28f818d597..46ad03cc673a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiPolicy.json // this example is just showing the usage of "ApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiPolicy.json // this example is just showing the usage of "ApiPolicy_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_ApiManagementDeleteApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicy.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiPolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiPolicyNonXmlEncoded.json // this example is just showing the usage of "ApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiPolicyNonXmlEncoded() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiPolicy.json // this example is just showing the usage of "ApiPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseCollection.cs index 730eba2064d6..b642365997d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiRelease.json // this example is just showing the usage of "ApiRelease_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiRelease() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiReleases() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiReleases.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiReleases.json // this example is just showing the usage of "ApiRelease_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiReleases() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseResource.cs index e5e839fb3648..5d9bc3d61b39 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiReleaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiReleaseResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRelease.json // this example is just showing the usage of "ApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiRelease() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiRelease.json // this example is just showing the usage of "ApiRelease_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_ApiManagementDeleteApiRelease() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiRelease.json // this example is just showing the usage of "ApiRelease_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiRelease.json // this example is just showing the usage of "ApiRelease_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiResource.cs index 02bb6345d90e..facdf63cff82 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiContract.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiContract() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiRevisionContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiRevision.json // this example is just showing the usage of "Api_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiRevisionContract() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApi.json // this example is just showing the usage of "Api_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 @@ -110,7 +110,7 @@ public async Task Delete_ApiManagementDeleteApi() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApi.json // this example is just showing the usage of "Api_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 @@ -148,7 +148,7 @@ public async Task Update_ApiManagementUpdateApi() [Ignore("Only validating compilation of examples")] public async Task GetApiRevisionsByService_ApiManagementListApiRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiRevisions.json // this example is just showing the usage of "ApiRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetApiRevisionsByService_ApiManagementListApiRevisions() [Ignore("Only validating compilation of examples")] public async Task GetOperationsByTags_ApiManagementListApiOperationsByTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiOperationsByTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiOperationsByTags.json // this example is just showing the usage of "Operation_ListByTags" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetOperationsByTags_ApiManagementListApiOperationsByTags() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApi.json // this example is just showing the usage of "Api_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaCollection.cs similarity index 96% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaCollection.cs index 43eb3d9c7afd..7204f3870cd3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiSchema() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiSchemas.json // this example is just showing the usage of "ApiSchema_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaResource.cs similarity index 96% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaResource.cs index f91a56691882..15bfafcb35c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiSchema.json // this example is just showing the usage of "ApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiSchema() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiSchema.json // this example is just showing the usage of "ApiSchema_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_ApiManagementDeleteApiSchema() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiSchema.json // this example is just showing the usage of "ApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiSchema.json // this example is just showing the usage of "ApiSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagCollection.cs index cb1b29c0423d..69c00e829253 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiTag() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetApiTag() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTags.json // this example is just showing the usage of "Tag_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiTags() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTag() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionCollection.cs index 1465f82acaed..70b1e4822896 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiTagDescriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiTagDescriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiTagDescriptions.json // this example is just showing the usage of "ApiTagDescription_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiTagDescriptions() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionResource.cs index 19c25572f6b5..184b933d5464 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagDescriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagDescriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiTagDescriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_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_ApiManagementDeleteApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiTagDescription() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiTagDescription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiTagDescription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTagDescription.json // this example is just showing the usage of "ApiTagDescription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagResource.cs index 073955bc3112..98d989cdda35 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiTagResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ApiTagResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiTag.json // this example is just showing the usage of "Tag_GetByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiTag() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiTag.json // this example is just showing the usage of "Tag_DetachFromApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementDeleteApiTag() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiTag.json // this example is just showing the usage of "Tag_AssignToApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateApiTag() [Ignore("Only validating compilation of examples")] public async Task GetEntityStateByApi_ApiManagementHeadApiTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiTag.json // this example is just showing the usage of "Tag_GetEntityStateByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetCollection.cs index 7ddcfe69745c..74ca9b6a423b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApiVersionSets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListApiVersionSets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListApiVersionSets.json // this example is just showing the usage of "ApiVersionSet_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApiVersionSets() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetResource.cs index 00af7c22bf1c..d8bae6900cfc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ApiVersionSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ApiVersionSetResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_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_ApiManagementDeleteApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_ApiManagementUpdateApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiVersionSet.json // this example is just showing the usage of "ApiVersionSet_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs index d101d1a10dbb..bd24427fbcd7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_AuthorizationAccessPolicyContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,6 +44,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAccessPolicy() string authorizationAccessPolicyId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab"; AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData { + AppIds = { "d5f04bb0-ba78-4878-a43e-35a0b74fe315" }, TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", }; @@ -61,7 +62,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAccessPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +98,7 @@ public async Task Get_ApiManagementGetAuthorizationAccessPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListAuthorizationAccessPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListAuthorizationAccessPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationAccessPolicies.json // this example is just showing the usage of "AuthorizationAccessPolicy_ListByAuthorization" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +136,7 @@ public async Task GetAll_ApiManagementListAuthorizationAccessPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +168,7 @@ public async Task Exists_ApiManagementGetAuthorizationAccessPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs index 5d5e40dbcaca..3836dfd3f7e0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationAccessPolicyContractResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AuthorizationAccessPolicyContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorizationAccessPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteAuthorizationAccessPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationAccessPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAccessPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAccessPolicy.json // this example is just showing the usage of "AuthorizationAccessPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -104,6 +104,7 @@ public async Task Update_ApiManagementCreateAuthorizationAccessPolicy() // invoke the operation AuthorizationAccessPolicyContractData data = new AuthorizationAccessPolicyContractData { + AppIds = { "d5f04bb0-ba78-4878-a43e-35a0b74fe315" }, TenantId = Guid.Parse("13932a0d-5c63-4d37-901d-1df9c97722ff"), ObjectId = "fe0bed83-631f-4149-bd0b-0464b1bc7cab", }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractCollection.cs index 8dc24a78b748..746ce1736ca1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AuthorizationContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADAuthCode() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateAuthorizationAADAuthCode() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADClientCred() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAADClientCred.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +89,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADClientCred() OAuth2GrantType = OAuth2GrantType.AuthorizationCode, Parameters = { -["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", -["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx" +["clientId"] = "clientsecretid", +["clientSecret"] = "clientsecretvalue" }, }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationId, data); @@ -107,7 +107,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationAADClientCred() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorization() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorization.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListAuthorizationsAuthCode() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListAuthorizationsAuthCode.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsAuthCode.json // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListAuthorizationsAuthCode() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListAuthorizationsClientCred() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListAuthorizationsClientCred.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationsClientCred.json // this example is just showing the usage of "Authorization_ListByAuthorizationProvider" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetAll_ApiManagementListAuthorizationsClientCred() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetAuthorization() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorization.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task Exists_ApiManagementGetAuthorization() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetAuthorization() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorization.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractResource.cs index 07e2e40565a3..03c3dbca95ff 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AuthorizationContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorization() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorization.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorization.json // this example is just showing the usage of "Authorization_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorization() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteAuthorization() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteAuthorization.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorization.json // this example is just showing the usage of "Authorization_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_ApiManagementDeleteAuthorization() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationAADAuthCode() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAADAuthCode.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADAuthCode.json // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateAuthorizationAADAuthCode() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationAADClientCred() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationAADClientCred.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationAADClientCred.json // this example is just showing the usage of "Authorization_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +144,8 @@ public async Task Update_ApiManagementCreateAuthorizationAADClientCred() OAuth2GrantType = OAuth2GrantType.AuthorizationCode, Parameters = { -["clientId"] = "53790925-fdd3-4b80-bc7a-4c3aaf25801d", -["clientSecret"] = "xxxxxxxxxxxxxxx~xxxxxxxxx" +["clientId"] = "clientsecretid", +["clientSecret"] = "clientsecretvalue" }, }; ArmOperation lro = await authorizationContract.UpdateAsync(WaitUntil.Completed, data); @@ -162,7 +162,7 @@ public async Task Update_ApiManagementCreateAuthorizationAADClientCred() [Ignore("Only validating compilation of examples")] public async Task ConfirmConsentCode_ApiManagementPostAuthorizationConfirmConsentCodeRequest() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json // this example is just showing the usage of "Authorization_ConfirmConsentCode" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ConfirmConsentCode_ApiManagementPostAuthorizationConfirmConsen [Ignore("Only validating compilation of examples")] public async Task PostAuthorizationLoginLink_ApiManagementGetAuthorizationLoginRequest() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationLoginRequest.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationLoginRequest.json // this example is just showing the usage of "AuthorizationLoginLinks_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 diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs index 07971badac0c..cbd9b17e3d32 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AuthorizationProviderContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADAuthCode() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +52,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADAuth { AuthorizationCode = { -["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", -["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["clientId"] = "clientsecretid", +["clientSecret"] = "clientsecretvalue", ["resourceUri"] = "https://graph.microsoft.com", ["scopes"] = "User.Read.All Group.Read.All" }, @@ -74,7 +74,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADAuth [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderAADClientCred() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateAuthorizationProviderAADClie [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderGenericOAuth2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +159,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderGeneric AuthorizationCode = { ["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", -["clientId"] = "genericClientId", -["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["clientId"] = "clientid", +["clientSecret"] = "clientsecretvalue", ["refreshUrl"] = "https://www.eventbrite.com/oauth/token", ["scopes"] = null, ["tokenUrl"] = "https://www.eventbrite.com/oauth/token" @@ -182,7 +182,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderGeneric [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderOOBGoogle() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +214,8 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderOOBGoog { AuthorizationCode = { -["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", -["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "clientsecretvalue", ["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" }, }, @@ -235,7 +235,7 @@ public async Task CreateOrUpdate_ApiManagementCreateAuthorizationProviderOOBGoog [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetAuthorizationProvider() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListAuthorizationProviders() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListAuthorizationProviders.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListAuthorizationProviders.json // this example is just showing the usage of "AuthorizationProvider_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -305,7 +305,7 @@ public async Task GetAll_ApiManagementListAuthorizationProviders() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetAuthorizationProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -335,7 +335,7 @@ public async Task Exists_ApiManagementGetAuthorizationProvider() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetAuthorizationProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractResource.cs index 78861e2ccf6b..7d0a3da462ac 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_AuthorizationProviderContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_AuthorizationProviderContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AuthorizationProviderContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetAuthorizationProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetAuthorizationProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetAuthorizationProvider.json // this example is just showing the usage of "AuthorizationProvider_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetAuthorizationProvider() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteAuthorizationProvider() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteAuthorizationProvider.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteAuthorizationProvider.json // this example is just showing the usage of "AuthorizationProvider_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_ApiManagementDeleteAuthorizationProvider() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationProviderAADAuthCode() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +108,8 @@ public async Task Update_ApiManagementCreateAuthorizationProviderAADAuthCode() { AuthorizationCode = { -["clientId"] = "59790825-fdd3-4b10-bc7a-4c3aaf25801d", -["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["clientId"] = "clientsecretid", +["clientSecret"] = "clientsecretvalue", ["resourceUri"] = "https://graph.microsoft.com", ["scopes"] = "User.Read.All Group.Read.All" }, @@ -130,7 +130,7 @@ public async Task Update_ApiManagementCreateAuthorizationProviderAADAuthCode() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationProviderAADClientCred() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateAuthorizationProviderAADClientCred() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationProviderGenericOAuth2() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +209,8 @@ public async Task Update_ApiManagementCreateAuthorizationProviderGenericOAuth2() AuthorizationCode = { ["authorizationUrl"] = "https://www.eventbrite.com/oauth/authorize", -["clientId"] = "genericClientId", -["clientSecret"] = "xxxxxxxxxxxxxxxxxxxxxxxx", +["clientId"] = "clientid", +["clientSecret"] = "clientsecretvalue", ["refreshUrl"] = "https://www.eventbrite.com/oauth/token", ["scopes"] = null, ["tokenUrl"] = "https://www.eventbrite.com/oauth/token" @@ -232,7 +232,7 @@ public async Task Update_ApiManagementCreateAuthorizationProviderGenericOAuth2() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateAuthorizationProviderOOBGoogle() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json // this example is just showing the usage of "AuthorizationProvider_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,8 +261,8 @@ public async Task Update_ApiManagementCreateAuthorizationProviderOOBGoogle() { AuthorizationCode = { -["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", -["clientSecret"] = "XXXXXXXXXXXXXXXXXXXX", +["clientId"] = "99999999-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com", +["clientSecret"] = "clientsecretvalue", ["scopes"] = "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email" }, }, diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractCollection.cs index 48ea10b678aa..9eb8719db042 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_DocumentationContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateDocumentation.json // this example is just showing the usage of "Documentation_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateDocumentation() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDocumentation() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListDocumentations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListDocumentations.json // this example is just showing the usage of "Documentation_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListApis() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDocumentation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractResource.cs index 6b92a367ff97..aa64bbaa95c9 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_DocumentationContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_DocumentationContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DocumentationContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetDocumentation.json // this example is just showing the usage of "Documentation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetDocumentation() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteDocumentation.json // this example is just showing the usage of "Documentation_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_ApiManagementDeleteDocumentation() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateDocumentation.json // this example is just showing the usage of "Documentation_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_ApiManagementUpdateDocumentation() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadDocumentation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadDocumentation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadDocumentation.json // this example is just showing the usage of "Documentation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractCollection.cs index c79e2d154dbf..e6f449902230 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PolicyFragmentContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json // this example is just showing the usage of "PolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreatePolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetPolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPolicyFragments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPolicyFragments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragments.json // this example is just showing the usage of "PolicyFragment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListPolicyFragments() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetPolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetPolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task Exists_ApiManagementGetPolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetIfExists_ApiManagementGetPolicyFragment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetPolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractResource.cs index 9b401d2248d9..345c01c54905 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PolicyFragmentContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyFragmentContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PolicyFragmentContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragment.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetPolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetPolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetPolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyFragmentFormat.json // this example is just showing the usage of "PolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetPolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeletePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeletePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyFragment.json // this example is just showing the usage of "PolicyFragment_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 @@ -111,7 +111,7 @@ public async Task Delete_ApiManagementDeletePolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreatePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyFragment.json // this example is just showing the usage of "PolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreatePolicy() [Ignore("Only validating compilation of examples")] public async Task GetReferences_ApiManagementListPolicyFragmentReferences() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPolicyFragmentReferences.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyFragmentReferences.json // this example is just showing the usage of "PolicyFragment_ListReferences" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetReferences_ApiManagementListPolicyFragmentReferences() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadPolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadPolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyFragment.json // this example is just showing the usage of "PolicyFragment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractCollection.cs new file mode 100644 index 000000000000..133c2c9667d2 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractCollection.cs @@ -0,0 +1,202 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyRestrictionContractCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreatePolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyRestrictionContractResource + PolicyRestrictionContractCollection collection = apiManagementService.GetPolicyRestrictionContracts(); + + // invoke the operation + string policyRestrictionId = "policyRestriction1"; + PolicyRestrictionContractData data = new PolicyRestrictionContractData + { + Scope = "Sample Path to the policy document.", + RequireBase = PolicyRestrictionRequireBase.True, + }; + ETag? ifMatch = new ETag("*"); + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, policyRestrictionId, data, ifMatch: ifMatch); + PolicyRestrictionContractResource 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 + PolicyRestrictionContractData 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_ApiManagementGetPolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyRestrictionContractResource + PolicyRestrictionContractCollection collection = apiManagementService.GetPolicyRestrictionContracts(); + + // invoke the operation + string policyRestrictionId = "policyRestriction1"; + PolicyRestrictionContractResource result = await collection.GetAsync(policyRestrictionId); + + // 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 + PolicyRestrictionContractData 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_ApiManagementListPolicyRestrictions() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPolicyRestrictions.json + // this example is just showing the usage of "PolicyRestriction_ListByService" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyRestrictionContractResource + PolicyRestrictionContractCollection collection = apiManagementService.GetPolicyRestrictionContracts(); + + // invoke the operation and iterate over the result + await foreach (PolicyRestrictionContractResource 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 + PolicyRestrictionContractData 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_ApiManagementGetPolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyRestrictionContractResource + PolicyRestrictionContractCollection collection = apiManagementService.GetPolicyRestrictionContracts(); + + // invoke the operation + string policyRestrictionId = "policyRestriction1"; + bool result = await collection.ExistsAsync(policyRestrictionId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetPolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ApiManagementServiceResource created on azure + // for more information of creating ApiManagementServiceResource, please refer to the document of ApiManagementServiceResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + ResourceIdentifier apiManagementServiceResourceId = ApiManagementServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName); + ApiManagementServiceResource apiManagementService = client.GetApiManagementServiceResource(apiManagementServiceResourceId); + + // get the collection of this PolicyRestrictionContractResource + PolicyRestrictionContractCollection collection = apiManagementService.GetPolicyRestrictionContracts(); + + // invoke the operation + string policyRestrictionId = "policyRestriction1"; + NullableResponse response = await collection.GetIfExistsAsync(policyRestrictionId); + PolicyRestrictionContractResource 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 + PolicyRestrictionContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractResource.cs new file mode 100644 index 000000000000..a767705bf826 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PolicyRestrictionContractResource.cs @@ -0,0 +1,141 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_PolicyRestrictionContractResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetPolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetPolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyRestrictionContractResource created on azure + // for more information of creating PolicyRestrictionContractResource, please refer to the document of PolicyRestrictionContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string policyRestrictionId = "policyRestriction1"; + ResourceIdentifier policyRestrictionContractResourceId = PolicyRestrictionContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + PolicyRestrictionContractResource policyRestrictionContract = client.GetPolicyRestrictionContractResource(policyRestrictionContractResourceId); + + // invoke the operation + PolicyRestrictionContractResource result = await policyRestrictionContract.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 + PolicyRestrictionContractData 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_ApiManagementDeletePolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletePolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_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 PolicyRestrictionContractResource created on azure + // for more information of creating PolicyRestrictionContractResource, please refer to the document of PolicyRestrictionContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string policyRestrictionId = "policyRestriction1"; + ResourceIdentifier policyRestrictionContractResourceId = PolicyRestrictionContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + PolicyRestrictionContractResource policyRestrictionContract = client.GetPolicyRestrictionContractResource(policyRestrictionContractResourceId); + + // invoke the operation + ETag? ifMatch = new ETag("*"); + await policyRestrictionContract.DeleteAsync(WaitUntil.Completed, ifMatch: ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdatePolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_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 PolicyRestrictionContractResource created on azure + // for more information of creating PolicyRestrictionContractResource, please refer to the document of PolicyRestrictionContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string policyRestrictionId = "policyRestriction1"; + ResourceIdentifier policyRestrictionContractResourceId = PolicyRestrictionContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + PolicyRestrictionContractResource policyRestrictionContract = client.GetPolicyRestrictionContractResource(policyRestrictionContractResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + PolicyRestrictionContractPatch patch = new PolicyRestrictionContractPatch + { + Scope = "Sample Path 2 to the policy document.", + }; + PolicyRestrictionContractResource result = await policyRestrictionContract.UpdateAsync(ifMatch, 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 + PolicyRestrictionContractData 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 GetEntityTag_ApiManagementHeadPolicyRestriction() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPolicyRestriction.json + // this example is just showing the usage of "PolicyRestriction_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PolicyRestrictionContractResource created on azure + // for more information of creating PolicyRestrictionContractResource, please refer to the document of PolicyRestrictionContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string policyRestrictionId = "policyRestriction1"; + ResourceIdentifier policyRestrictionContractResourceId = PolicyRestrictionContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, policyRestrictionId); + PolicyRestrictionContractResource policyRestrictionContract = client.GetPolicyRestrictionContractResource(policyRestrictionContractResourceId); + + // invoke the operation + bool result = await policyRestrictionContract.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractCollection.cs index 87e66a37e2af..e9b96dca40d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_PortalConfigContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreatePortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreatePortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreatePortalConfig.json // this example is just showing the usage of "PortalConfig_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreatePortalConfig() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementPortalConfig() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListPortalConfig.json // this example is just showing the usage of "PortalConfig_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListPortalConfig() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementPortalConfig() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractResource.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractResource.cs index 9dea8de32e4f..9b14f8a1dd01 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_PortalConfigContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_PortalConfigContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_PortalConfigContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementPortalConfig.json // this example is just showing the usage of "PortalConfig_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementPortalConfig() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdatePortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdatePortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdatePortalConfig.json // this example is just showing the usage of "PortalConfig_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 @@ -107,7 +107,7 @@ public async Task Update_ApiManagementUpdatePortalConfig() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadPortalConfig() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadPortalConfig.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadPortalConfig.json // this example is just showing the usage of "PortalConfig_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractCollection.cs index 8f64884e5b47..22039a7a19b5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ResolverContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGraphQLApiResolvers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGraphQLApiResolvers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolvers.json // this example is just showing the usage of "GraphQLApiResolver_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGraphQLApiResolvers() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractResource.cs index e9b5d3b1aa2f..fff2bd347171 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ResolverContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ResolverContractResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ResolverContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_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_ApiManagementDeleteGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_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 @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateGraphQLApiResolver() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolver() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGraphQLApiResolver.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolver.json // this example is just showing the usage of "GraphQLApiResolver_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs index d178138d41ab..8272a762420a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceApiResolverPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListGraphQLApiResolverPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListGraphQLApiResolverPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGraphQLApiResolverPolicies.json // this example is just showing the usage of "GraphQLApiResolverPolicy_ListByResolver" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListGraphQLApiResolverPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs index 140e8afbd129..1728e1891c8b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiResolverPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceApiResolverPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_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_ApiManagementDeleteGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateGraphQLApiResolverPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadGraphQLApiResolverPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadGraphQLApiResolverPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadGraphQLApiResolverPolicy.json // this example is just showing the usage of "GraphQLApiResolverPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiWikiResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiWikiResource.cs index 0b725a5ed9e9..0d8d3a9c8df0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceApiWikiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceApiWikiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceApiWikiResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetApiWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetApiWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetApiWiki.json // this example is just showing the usage of "ApiWiki_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetApiWiki() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteApiWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteApiWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteApiWiki.json // this example is just showing the usage of "ApiWiki_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_ApiManagementDeleteApiWiki() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateApiWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateApiWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateApiWiki.json // this example is just showing the usage of "ApiWiki_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateApiWiki() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateApiWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateApiWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateApiWiki.json // this example is just showing the usage of "ApiWiki_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateApiWiki() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadApiWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadApiWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadApiWiki.json // this example is just showing the usage of "ApiWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs index 041e637b81b3..6fc7dd83d9db 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceProductApiLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json // this example is just showing the usage of "ProductApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json // this example is just showing the usage of "ProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductApiLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListProductApiLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductApiLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductApiLinks.json // this example is just showing the usage of "ProductApiLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductApiLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json // this example is just showing the usage of "ProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductApiLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json // this example is just showing the usage of "ProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkResource.cs index 6d7ddcef6273..32414b2d4905 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductApiLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceProductApiLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductApiLink.json // this example is just showing the usage of "ProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductApiLink.json // this example is just showing the usage of "ProductApiLink_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_ApiManagementDeleteProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductApiLink.json // this example is just showing the usage of "ProductApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs index 6e9a7cadd958..44236daf757a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceProductGroupLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListProductGroupLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListProductGroupLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListProductGroupLinks.json // this example is just showing the usage of "ProductGroupLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListProductGroupLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs index bfdee34f72af..95658aac2a76 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductGroupLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceProductGroupLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_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_ApiManagementDeleteProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductGroupLink.json // this example is just showing the usage of "ProductGroupLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductWikiResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductWikiResource.cs index 51ca89535844..0c4f13168180 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceProductWikiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceProductWikiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceProductWikiResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetProductWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetProductWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetProductWiki.json // this example is just showing the usage of "ProductWiki_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetProductWiki() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteProductWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteProductWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteProductWiki.json // this example is just showing the usage of "ProductWiki_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_ApiManagementDeleteProductWiki() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateProductWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateProductWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateProductWiki.json // this example is just showing the usage of "ProductWiki_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateProductWiki() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateProductWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateProductWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateProductWiki.json // this example is just showing the usage of "ProductWiki_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_ApiManagementCreateProductWiki() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadProductWiki() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadProductWiki.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadProductWiki.json // this example is just showing the usage of "ProductWiki_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs index 103e65088194..0cba27e1ddee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagApiLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json // this example is just showing the usage of "TagApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json // this example is just showing the usage of "TagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagApiLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTagApiLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTagApiLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagApiLinks.json // this example is just showing the usage of "TagApiLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTagApiLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json // this example is just showing the usage of "TagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagApiLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json // this example is just showing the usage of "TagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkResource.cs index 3f643b4ce49f..9f097d73f788 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagApiLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagApiLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagApiLink.json // this example is just showing the usage of "TagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagApiLink.json // this example is just showing the usage of "TagApiLink_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_ApiManagementDeleteTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagApiLink.json // this example is just showing the usage of "TagApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs index df821a6ab8ec..388c21830e4f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagOperationLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json // this example is just showing the usage of "TagOperationLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json // this example is just showing the usage of "TagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTagOperationLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTagOperationLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagOperationLinks.json // this example is just showing the usage of "TagOperationLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTagOperationLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json // this example is just showing the usage of "TagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json // this example is just showing the usage of "TagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs index d41cfd4fd28f..2c417e690c0c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagOperationLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagOperationLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagOperationLink.json // this example is just showing the usage of "TagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagOperationLink.json // this example is just showing the usage of "TagOperationLink_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_ApiManagementDeleteTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagOperationLink.json // this example is just showing the usage of "TagOperationLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs index 8392157f0113..3ca5b4a6e872 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagProductLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json // this example is just showing the usage of "TagProductLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json // this example is just showing the usage of "TagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagProductLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTagProductLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTagProductLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTagProductLinks.json // this example is just showing the usage of "TagProductLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListTagProductLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json // this example is just showing the usage of "TagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagProductLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json // this example is just showing the usage of "TagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkResource.cs index 7c03d9455bb9..910f1d3fd594 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceTagProductLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceTagProductLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceTagProductLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTagProductLink.json // this example is just showing the usage of "TagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteTagProductLink.json // this example is just showing the usage of "TagProductLink_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_ApiManagementDeleteTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTagProductLink.json // this example is just showing the usage of "TagProductLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs index 0676d8be9cd8..c8400f21057b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApi.json // this example is just showing the usage of "WorkspaceApi_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApi() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceApiContract() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceApiRevision() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApis() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApis.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApis.json // this example is just showing the usage of "WorkspaceApi_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApis() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetWorkspaceApiContract() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiRevision() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +289,7 @@ public async Task GetIfExists_ApiManagementGetWorkspaceApiContract() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticCollection.cs new file mode 100644 index 000000000000..c4a2f5cb9349 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticCollection.cs @@ -0,0 +1,242 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceApiDiagnosticCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiResource created on azure + // for more information of creating ServiceWorkspaceApiResource, please refer to the document of ServiceWorkspaceApiResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceWorkspaceApiResourceId = ServiceWorkspaceApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId); + ServiceWorkspaceApiResource serviceWorkspaceApi = client.GetServiceWorkspaceApiResource(serviceWorkspaceApiResourceId); + + // get the collection of this ServiceWorkspaceApiDiagnosticResource + ServiceWorkspaceApiDiagnosticCollection collection = serviceWorkspaceApi.GetServiceWorkspaceApiDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + DiagnosticContractData data = new DiagnosticContractData + { + AlwaysLog = AlwaysLog.AllErrors, + LoggerId = "/workspaces/wks1/loggers/applicationinsights", + Sampling = new SamplingSettings + { + SamplingType = SamplingType.Fixed, + Percentage = 50, + }, + Frontend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + Backend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticId, data); + ServiceWorkspaceApiDiagnosticResource 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 + DiagnosticContractData 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_ApiManagementGetWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiResource created on azure + // for more information of creating ServiceWorkspaceApiResource, please refer to the document of ServiceWorkspaceApiResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceWorkspaceApiResourceId = ServiceWorkspaceApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId); + ServiceWorkspaceApiResource serviceWorkspaceApi = client.GetServiceWorkspaceApiResource(serviceWorkspaceApiResourceId); + + // get the collection of this ServiceWorkspaceApiDiagnosticResource + ServiceWorkspaceApiDiagnosticCollection collection = serviceWorkspaceApi.GetServiceWorkspaceApiDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + ServiceWorkspaceApiDiagnosticResource result = await collection.GetAsync(diagnosticId); + + // 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 + DiagnosticContractData 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_ApiManagementListWorkspaceApiDiagnostics() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiDiagnostics.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiResource created on azure + // for more information of creating ServiceWorkspaceApiResource, please refer to the document of ServiceWorkspaceApiResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "echo-api"; + ResourceIdentifier serviceWorkspaceApiResourceId = ServiceWorkspaceApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId); + ServiceWorkspaceApiResource serviceWorkspaceApi = client.GetServiceWorkspaceApiResource(serviceWorkspaceApiResourceId); + + // get the collection of this ServiceWorkspaceApiDiagnosticResource + ServiceWorkspaceApiDiagnosticCollection collection = serviceWorkspaceApi.GetServiceWorkspaceApiDiagnostics(); + + // invoke the operation and iterate over the result + await foreach (ServiceWorkspaceApiDiagnosticResource 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 + DiagnosticContractData 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_ApiManagementGetWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiResource created on azure + // for more information of creating ServiceWorkspaceApiResource, please refer to the document of ServiceWorkspaceApiResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceWorkspaceApiResourceId = ServiceWorkspaceApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId); + ServiceWorkspaceApiResource serviceWorkspaceApi = client.GetServiceWorkspaceApiResource(serviceWorkspaceApiResourceId); + + // get the collection of this ServiceWorkspaceApiDiagnosticResource + ServiceWorkspaceApiDiagnosticCollection collection = serviceWorkspaceApi.GetServiceWorkspaceApiDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + bool result = await collection.ExistsAsync(diagnosticId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiResource created on azure + // for more information of creating ServiceWorkspaceApiResource, please refer to the document of ServiceWorkspaceApiResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + ResourceIdentifier serviceWorkspaceApiResourceId = ServiceWorkspaceApiResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId); + ServiceWorkspaceApiResource serviceWorkspaceApi = client.GetServiceWorkspaceApiResource(serviceWorkspaceApiResourceId); + + // get the collection of this ServiceWorkspaceApiDiagnosticResource + ServiceWorkspaceApiDiagnosticCollection collection = serviceWorkspaceApi.GetServiceWorkspaceApiDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + NullableResponse response = await collection.GetIfExistsAsync(diagnosticId); + ServiceWorkspaceApiDiagnosticResource 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 + DiagnosticContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticResource.cs new file mode 100644 index 000000000000..8462b69bf0ce --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiDiagnosticResource.cs @@ -0,0 +1,181 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceApiDiagnosticResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceApiDiagnosticResource, please refer to the document of ServiceWorkspaceApiDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceApiDiagnosticResourceId = ServiceWorkspaceApiDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + ServiceWorkspaceApiDiagnosticResource serviceWorkspaceApiDiagnostic = client.GetServiceWorkspaceApiDiagnosticResource(serviceWorkspaceApiDiagnosticResourceId); + + // invoke the operation + ServiceWorkspaceApiDiagnosticResource result = await serviceWorkspaceApiDiagnostic.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 + DiagnosticContractData 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_ApiManagementDeleteWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_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 ServiceWorkspaceApiDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceApiDiagnosticResource, please refer to the document of ServiceWorkspaceApiDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceApiDiagnosticResourceId = ServiceWorkspaceApiDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + ServiceWorkspaceApiDiagnosticResource serviceWorkspaceApiDiagnostic = client.GetServiceWorkspaceApiDiagnosticResource(serviceWorkspaceApiDiagnosticResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceWorkspaceApiDiagnostic.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdateWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_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 ServiceWorkspaceApiDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceApiDiagnosticResource, please refer to the document of ServiceWorkspaceApiDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "echo-api"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceApiDiagnosticResourceId = ServiceWorkspaceApiDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + ServiceWorkspaceApiDiagnosticResource serviceWorkspaceApiDiagnostic = client.GetServiceWorkspaceApiDiagnosticResource(serviceWorkspaceApiDiagnosticResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + DiagnosticUpdateContract diagnosticUpdateContract = new DiagnosticUpdateContract + { + AlwaysLog = AlwaysLog.AllErrors, + LoggerId = "/workspaces/wks1/loggers/applicationinsights", + Sampling = new SamplingSettings + { + SamplingType = SamplingType.Fixed, + Percentage = 50, + }, + Frontend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + Backend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + }; + ServiceWorkspaceApiDiagnosticResource result = await serviceWorkspaceApiDiagnostic.UpdateAsync(ifMatch, diagnosticUpdateContract); + + // 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 + DiagnosticContractData 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 GetEntityTag_ApiManagementHeadWorkspaceApiDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiDiagnostic.json + // this example is just showing the usage of "WorkspaceApiDiagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceApiDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceApiDiagnosticResource, please refer to the document of ServiceWorkspaceApiDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string apiId = "57d1f7558aa04f15146d9d8a"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceApiDiagnosticResourceId = ServiceWorkspaceApiDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, apiId, diagnosticId); + ServiceWorkspaceApiDiagnosticResource serviceWorkspaceApiDiagnostic = client.GetServiceWorkspaceApiDiagnosticResource(serviceWorkspaceApiDiagnosticResourceId); + + // invoke the operation + bool result = await serviceWorkspaceApiDiagnostic.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs index 2bc0661fc3aa..9b2908e3692c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiOperationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiOperations() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiOperations.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperations.json // this example is just showing the usage of "WorkspaceApiOperation_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListWorkspaceApiOperations() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs index d2f9aa332a30..0d6faff52ac4 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiOperationPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiOperationPolicy( [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiOperationPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiOperationPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiOperationPolicies.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_ListByOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApiOperationPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs index e4a17e13afb5..8b13afb580fb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiOperationPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_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 @@ -85,7 +85,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateWorkspaceApiOperationPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiOperationPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperationPolicy.json // this example is just showing the usage of "WorkspaceApiOperationPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs index 92a0386b139e..a25357f2ce77 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiOperationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiOperationResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_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_ApiManagementDeleteWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_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 @@ -145,7 +145,7 @@ public async Task Update_ApiManagementUpdateWorkspaceApiOperation() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiOperation() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiOperation.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiOperation.json // this example is just showing the usage of "WorkspaceApiOperation_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs index ecc100c9cad6..f89b9ceb7487 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiPolicies.json // this example is just showing the usage of "WorkspaceApiPolicy_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApiPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs index c145e01bef8a..0cc1da719f48 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_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_ApiManagementDeleteWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiPolicy.json // this example is just showing the usage of "WorkspaceApiPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs index 9e528c304f37..0d2d2ab6638a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceApiReleaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiReleases() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiReleases.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiReleases.json // this example is just showing the usage of "WorkspaceApiRelease_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApiReleases() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs index 3ab4187055fc..34ad73f63311 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiReleaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceApiReleaseResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_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 @@ -121,7 +121,7 @@ public async Task Update_ApiManagementUpdateWorkspaceApiRelease() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiRelease() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiRelease.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiRelease.json // this example is just showing the usage of "WorkspaceApiRelease_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs index b8c2457ec541..7b2d12d2df3b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiContract() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiContract.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiContract.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiContract() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiRevision() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiRevision.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiRevision.json // this example is just showing the usage of "WorkspaceApi_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceApiRevision() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApi.json // this example is just showing the usage of "WorkspaceApi_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 @@ -113,7 +113,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceApi() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApi.json // this example is just showing the usage of "WorkspaceApi_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 @@ -152,7 +152,7 @@ public async Task Update_ApiManagementUpdateWorkspaceApi() [Ignore("Only validating compilation of examples")] public async Task GetWorkspaceApiRevisionsByService_ApiManagementListWorkspaceApiRevisions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiRevisions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiRevisions.json // this example is just showing the usage of "WorkspaceApiRevision_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetWorkspaceApiRevisionsByService_ApiManagementListWorkspaceAp [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApi() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApi.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApi.json // this example is just showing the usage of "WorkspaceApi_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs similarity index 96% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs index 45697d2bd4c0..78bc1e50b5a8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceApiSchemaCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiSchemas.json // this example is just showing the usage of "WorkspaceApiSchema_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApiSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs similarity index 96% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs index 00e5ee5dd366..d40aae9be2df 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceApiSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Update_ApiManagementCreateWorkspaceApiSchema() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiSchema.json // this example is just showing the usage of "WorkspaceApiSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs index 6f005ea88886..fc00df2f50f2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiVersionSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceApiVersionSets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceApiVersionSets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceApiVersionSets.json // this example is just showing the usage of "WorkspaceApiVersionSet_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceApiVersionSets() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs index ea86d94a8556..4e45f69f25c0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceApiVersionSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceApiVersionSetResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_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_ApiManagementDeleteWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_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 @@ -120,7 +120,7 @@ public async Task Update_ApiManagementUpdateWorkspaceApiVersionSet() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceApiVersionSet() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceApiVersionSet.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceApiVersionSet.json // this example is just showing the usage of "WorkspaceApiVersionSet_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendCollection.cs new file mode 100644 index 000000000000..b8fd74187d8b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendCollection.cs @@ -0,0 +1,281 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceBackendCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateWorkspaceBackendProxyBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendProxyBackend.json + // this example is just showing the usage of "WorkspaceBackend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation + string backendId = "proxybackend"; + ApiManagementBackendData data = new ApiManagementBackendData + { + Description = "description5308", + Credentials = new BackendCredentialsContract + { + Query = +{ +["sv"] = new string[]{"xx", "bb", "cc"} +}, + Header = +{ +["x-my-1"] = new string[]{"val1", "val2"} +}, + Authorization = new BackendAuthorizationHeaderCredentials("Basic", "opensesma"), + }, + Proxy = new BackendProxyContract(new Uri("http://192.168.1.1:8080")) + { + Username = "Contoso\\admin", + Password = "", + }, + Tls = new BackendTlsProperties + { + ShouldValidateCertificateChain = true, + ShouldValidateCertificateName = true, + }, + Uri = new Uri("https://backendname2644/"), + Protocol = BackendProtocol.Http, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, backendId, data); + ServiceWorkspaceBackendResource 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 + ApiManagementBackendData 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_ApiManagementCreateWorkspaceBackendServiceFabric() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceBackendServiceFabric.json + // this example is just showing the usage of "WorkspaceBackend_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation + string backendId = "sfbackend"; + ApiManagementBackendData data = new ApiManagementBackendData + { + Description = "Service Fabric Test App 1", + BackendServiceFabricCluster = new BackendServiceFabricClusterProperties(new string[] { "https://somecluster.com" }) + { + ClientCertificateId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/workspaces/wks1/certificates/cert1", + MaxPartitionResolutionRetries = 5, + ServerX509Names = {new X509CertificateName +{ +Name = "ServerCommonName1", +IssuerCertificateThumbprint = "IssuerCertificateThumbprint1", +}}, + }, + Uri = new Uri("fabric:/mytestapp/mytestservice"), + Protocol = BackendProtocol.Http, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, backendId, data); + ServiceWorkspaceBackendResource 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 + ApiManagementBackendData 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_ApiManagementGetWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation + string backendId = "sfbackend"; + ServiceWorkspaceBackendResource result = await collection.GetAsync(backendId); + + // 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 + ApiManagementBackendData 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_ApiManagementListWorkspaceBackends() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceBackends.json + // this example is just showing the usage of "WorkspaceBackend_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation and iterate over the result + await foreach (ServiceWorkspaceBackendResource 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 + ApiManagementBackendData 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_ApiManagementGetWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation + string backendId = "sfbackend"; + bool result = await collection.ExistsAsync(backendId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceBackendResource + ServiceWorkspaceBackendCollection collection = workspaceContract.GetServiceWorkspaceBackends(); + + // invoke the operation + string backendId = "sfbackend"; + NullableResponse response = await collection.GetIfExistsAsync(backendId); + ServiceWorkspaceBackendResource 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 + ApiManagementBackendData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendResource.cs new file mode 100644 index 000000000000..0554b5795919 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceBackendResource.cs @@ -0,0 +1,150 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceBackendResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceBackendResource created on azure + // for more information of creating ServiceWorkspaceBackendResource, please refer to the document of ServiceWorkspaceBackendResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string backendId = "sfbackend"; + ResourceIdentifier serviceWorkspaceBackendResourceId = ServiceWorkspaceBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + ServiceWorkspaceBackendResource serviceWorkspaceBackend = client.GetServiceWorkspaceBackendResource(serviceWorkspaceBackendResourceId); + + // invoke the operation + ServiceWorkspaceBackendResource result = await serviceWorkspaceBackend.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 + ApiManagementBackendData 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_ApiManagementDeleteWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_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 ServiceWorkspaceBackendResource created on azure + // for more information of creating ServiceWorkspaceBackendResource, please refer to the document of ServiceWorkspaceBackendResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string backendId = "sfbackend"; + ResourceIdentifier serviceWorkspaceBackendResourceId = ServiceWorkspaceBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + ServiceWorkspaceBackendResource serviceWorkspaceBackend = client.GetServiceWorkspaceBackendResource(serviceWorkspaceBackendResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceWorkspaceBackend.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdateWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_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 ServiceWorkspaceBackendResource created on azure + // for more information of creating ServiceWorkspaceBackendResource, please refer to the document of ServiceWorkspaceBackendResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string backendId = "proxybackend"; + ResourceIdentifier serviceWorkspaceBackendResourceId = ServiceWorkspaceBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + ServiceWorkspaceBackendResource serviceWorkspaceBackend = client.GetServiceWorkspaceBackendResource(serviceWorkspaceBackendResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + ApiManagementBackendPatch patch = new ApiManagementBackendPatch + { + Description = "description5308", + Tls = new BackendTlsProperties + { + ShouldValidateCertificateChain = false, + ShouldValidateCertificateName = true, + }, + }; + ServiceWorkspaceBackendResource result = await serviceWorkspaceBackend.UpdateAsync(ifMatch, 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 + ApiManagementBackendData 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 GetEntityTag_ApiManagementHeadWorkspaceBackend() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceBackend.json + // this example is just showing the usage of "WorkspaceBackend_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceBackendResource created on azure + // for more information of creating ServiceWorkspaceBackendResource, please refer to the document of ServiceWorkspaceBackendResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string backendId = "sfbackend"; + ResourceIdentifier serviceWorkspaceBackendResourceId = ServiceWorkspaceBackendResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, backendId); + ServiceWorkspaceBackendResource serviceWorkspaceBackend = client.GetServiceWorkspaceBackendResource(serviceWorkspaceBackendResourceId); + + // invoke the operation + bool result = await serviceWorkspaceBackend.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateCollection.cs new file mode 100644 index 000000000000..60b1ecdfb284 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateCollection.cs @@ -0,0 +1,359 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceCertificateCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "tempcert"; + ApiManagementCertificateCreateOrUpdateContent content = new ApiManagementCertificateCreateOrUpdateContent + { + Data = "****************Base 64 Encoded Certificate *******************************", + Password = "****Certificate Password******", + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateId, content); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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_ApiManagementCreateWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCertkv"; + ApiManagementCertificateCreateOrUpdateContent content = new ApiManagementCertificateCreateOrUpdateContent + { + KeyVaultDetails = new KeyVaultContractCreateProperties + { + SecretIdentifier = "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + IdentityClientId = "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, certificateId, content); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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_ApiManagementGetWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCert1"; + ServiceWorkspaceCertificateResource result = await collection.GetAsync(certificateId); + + // 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 + ApiManagementCertificateData 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_ApiManagementGetWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCertkv"; + ServiceWorkspaceCertificateResource result = await collection.GetAsync(certificateId); + + // 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 + ApiManagementCertificateData 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_ApiManagementListWorkspaceCertificates() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceCertificates.json + // this example is just showing the usage of "WorkspaceCertificate_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation and iterate over the result + await foreach (ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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_ApiManagementGetWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCert1"; + bool result = await collection.ExistsAsync(certificateId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_ApiManagementGetWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCertkv"; + bool result = await collection.ExistsAsync(certificateId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCert1"; + NullableResponse response = await collection.GetIfExistsAsync(certificateId); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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_ApiManagementGetWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceCertificateResource + ServiceWorkspaceCertificateCollection collection = workspaceContract.GetServiceWorkspaceCertificates(); + + // invoke the operation + string certificateId = "templateCertkv"; + NullableResponse response = await collection.GetIfExistsAsync(certificateId); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateResource.cs new file mode 100644 index 000000000000..f9b8064ab47c --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceCertificateResource.cs @@ -0,0 +1,251 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceCertificateResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "templateCert1"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ServiceWorkspaceCertificateResource result = await serviceWorkspaceCertificate.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 + ApiManagementCertificateData 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_ApiManagementGetWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "templateCertkv"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ServiceWorkspaceCertificateResource result = await serviceWorkspaceCertificate.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 + ApiManagementCertificateData 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_ApiManagementDeleteWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_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 ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "tempcert"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceWorkspaceCertificate.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementCreateWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "tempcert"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ApiManagementCertificateCreateOrUpdateContent content = new ApiManagementCertificateCreateOrUpdateContent + { + Data = "****************Base 64 Encoded Certificate *******************************", + Password = "****Certificate Password******", + }; + ArmOperation lro = await serviceWorkspaceCertificate.UpdateAsync(WaitUntil.Completed, content); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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_ApiManagementCreateWorkspaceCertificateWithKeyVault() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceCertificateWithKeyVault.json + // this example is just showing the usage of "WorkspaceCertificate_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "templateCertkv"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ApiManagementCertificateCreateOrUpdateContent content = new ApiManagementCertificateCreateOrUpdateContent + { + KeyVaultDetails = new KeyVaultContractCreateProperties + { + SecretIdentifier = "https://rpbvtkeyvaultintegration.vault-int.azure-int.net/secrets/msitestingCert", + IdentityClientId = "ceaa6b06-c00f-43ef-99ac-f53d1fe876a0", + }, + }; + ArmOperation lro = await serviceWorkspaceCertificate.UpdateAsync(WaitUntil.Completed, content); + ServiceWorkspaceCertificateResource 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 + ApiManagementCertificateData 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 RefreshSecret_ApiManagementRefreshWorkspaceCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_RefreshSecret" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "templateCertkv"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + ServiceWorkspaceCertificateResource result = await serviceWorkspaceCertificate.RefreshSecretAsync(); + + // 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 + ApiManagementCertificateData 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 GetEntityTag_ApiManagementWorkspaceHeadCertificate() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceCertificate.json + // this example is just showing the usage of "WorkspaceCertificate_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceCertificateResource created on azure + // for more information of creating ServiceWorkspaceCertificateResource, please refer to the document of ServiceWorkspaceCertificateResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string certificateId = "templateCert1"; + ResourceIdentifier serviceWorkspaceCertificateResourceId = ServiceWorkspaceCertificateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, certificateId); + ServiceWorkspaceCertificateResource serviceWorkspaceCertificate = client.GetServiceWorkspaceCertificateResource(serviceWorkspaceCertificateResourceId); + + // invoke the operation + bool result = await serviceWorkspaceCertificate.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticCollection.cs new file mode 100644 index 000000000000..98fa803be817 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticCollection.cs @@ -0,0 +1,237 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceDiagnosticCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceDiagnosticResource + ServiceWorkspaceDiagnosticCollection collection = workspaceContract.GetServiceWorkspaceDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + DiagnosticContractData data = new DiagnosticContractData + { + AlwaysLog = AlwaysLog.AllErrors, + LoggerId = "/workspaces/wks1/loggers/azuremonitor", + Sampling = new SamplingSettings + { + SamplingType = SamplingType.Fixed, + Percentage = 50, + }, + Frontend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + Backend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticId, data); + ServiceWorkspaceDiagnosticResource 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 + DiagnosticContractData 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_ApiManagementGetWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceDiagnosticResource + ServiceWorkspaceDiagnosticCollection collection = workspaceContract.GetServiceWorkspaceDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + ServiceWorkspaceDiagnosticResource result = await collection.GetAsync(diagnosticId); + + // 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 + DiagnosticContractData 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_ApiManagementListWorkspaceDiagnostics() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceDiagnostics.json + // this example is just showing the usage of "WorkspaceDiagnostic_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceDiagnosticResource + ServiceWorkspaceDiagnosticCollection collection = workspaceContract.GetServiceWorkspaceDiagnostics(); + + // invoke the operation and iterate over the result + await foreach (ServiceWorkspaceDiagnosticResource 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 + DiagnosticContractData 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_ApiManagementGetWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceDiagnosticResource + ServiceWorkspaceDiagnosticCollection collection = workspaceContract.GetServiceWorkspaceDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + bool result = await collection.ExistsAsync(diagnosticId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceDiagnosticResource + ServiceWorkspaceDiagnosticCollection collection = workspaceContract.GetServiceWorkspaceDiagnostics(); + + // invoke the operation + string diagnosticId = "applicationinsights"; + NullableResponse response = await collection.GetIfExistsAsync(diagnosticId); + ServiceWorkspaceDiagnosticResource 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 + DiagnosticContractData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticResource.cs new file mode 100644 index 000000000000..5ba1c1b3c0fe --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceDiagnosticResource.cs @@ -0,0 +1,177 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceDiagnosticResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceDiagnosticResource, please refer to the document of ServiceWorkspaceDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceDiagnosticResourceId = ServiceWorkspaceDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + ServiceWorkspaceDiagnosticResource serviceWorkspaceDiagnostic = client.GetServiceWorkspaceDiagnosticResource(serviceWorkspaceDiagnosticResourceId); + + // invoke the operation + ServiceWorkspaceDiagnosticResource result = await serviceWorkspaceDiagnostic.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 + DiagnosticContractData 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_ApiManagementDeleteWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_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 ServiceWorkspaceDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceDiagnosticResource, please refer to the document of ServiceWorkspaceDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceDiagnosticResourceId = ServiceWorkspaceDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + ServiceWorkspaceDiagnosticResource serviceWorkspaceDiagnostic = client.GetServiceWorkspaceDiagnosticResource(serviceWorkspaceDiagnosticResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceWorkspaceDiagnostic.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdateWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_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 ServiceWorkspaceDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceDiagnosticResource, please refer to the document of ServiceWorkspaceDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceDiagnosticResourceId = ServiceWorkspaceDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + ServiceWorkspaceDiagnosticResource serviceWorkspaceDiagnostic = client.GetServiceWorkspaceDiagnosticResource(serviceWorkspaceDiagnosticResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + DiagnosticUpdateContract diagnosticUpdateContract = new DiagnosticUpdateContract + { + AlwaysLog = AlwaysLog.AllErrors, + LoggerId = "/workspaces/wks1/loggers/applicationinsights", + Sampling = new SamplingSettings + { + SamplingType = SamplingType.Fixed, + Percentage = 50, + }, + Frontend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + Backend = new PipelineDiagnosticSettings + { + Request = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + Response = new HttpMessageDiagnostic + { + Headers = { "Content-type" }, + BodyBytes = 512, + }, + }, + }; + ServiceWorkspaceDiagnosticResource result = await serviceWorkspaceDiagnostic.UpdateAsync(ifMatch, diagnosticUpdateContract); + + // 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 + DiagnosticContractData 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 GetEntityTag_ApiManagementHeadWorkspaceDiagnostic() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceDiagnostic.json + // this example is just showing the usage of "WorkspaceDiagnostic_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceDiagnosticResource created on azure + // for more information of creating ServiceWorkspaceDiagnosticResource, please refer to the document of ServiceWorkspaceDiagnosticResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string diagnosticId = "applicationinsights"; + ResourceIdentifier serviceWorkspaceDiagnosticResourceId = ServiceWorkspaceDiagnosticResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, diagnosticId); + ServiceWorkspaceDiagnosticResource serviceWorkspaceDiagnostic = client.GetServiceWorkspaceDiagnosticResource(serviceWorkspaceDiagnosticResourceId); + + // invoke the operation + bool result = await serviceWorkspaceDiagnostic.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs index e9f575eb1945..fe2b60e400a7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceGroupExternal() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceGroupExternal.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupExternal.json // this example is just showing the usage of "WorkspaceGroup_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceGroupExternal() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceGroups() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceGroups.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroups.json // this example is just showing the usage of "WorkspaceGroup_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListWorkspaceGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs index 5845015ab1d4..f9698f24acf0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_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_ApiManagementDeleteWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateWorkspaceGroup() [Ignore("Only validating compilation of examples")] public async Task GetWorkspaceGroupUsers_ApiManagementListWorkspaceGroupUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceGroupUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceGroupUsers.json // this example is just showing the usage of "WorkspaceGroupUser_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 @@ -153,7 +153,7 @@ public async Task GetWorkspaceGroupUsers_ApiManagementListWorkspaceGroupUsers() [Ignore("Only validating compilation of examples")] public async Task CheckEntityExistsWorkspaceGroupUser_ApiManagementHeadWorkspaceGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroupUser.json // this example is just showing the usage of "WorkspaceGroupUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckEntityExistsWorkspaceGroupUser_ApiManagementHeadWorkspace [Ignore("Only validating compilation of examples")] public async Task CreateWorkspaceGroupUser_ApiManagementCreateWorkspaceGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceGroupUser.json // this example is just showing the usage of "WorkspaceGroupUser_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 @@ -215,7 +215,7 @@ public async Task CreateWorkspaceGroupUser_ApiManagementCreateWorkspaceGroupUser [Ignore("Only validating compilation of examples")] public async Task DeleteWorkspaceGroupUser_ApiManagementDeleteWorkspaceGroupUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceGroupUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceGroupUser.json // this example is just showing the usage of "WorkspaceGroupUser_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 @@ -244,7 +244,7 @@ public async Task DeleteWorkspaceGroupUser_ApiManagementDeleteWorkspaceGroupUser [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceGroup() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceGroup.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceGroup.json // this example is just showing the usage of "WorkspaceGroup_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerCollection.cs new file mode 100644 index 000000000000..8fe4c935fa4b --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerCollection.cs @@ -0,0 +1,256 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceLoggerCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ApiManagementCreateWorkspaceAILogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceAILogger.json + // this example is just showing the usage of "WorkspaceLogger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation + string loggerId = "loggerId"; + ApiManagementLoggerData data = new ApiManagementLoggerData + { + LoggerType = LoggerType.ApplicationInsights, + Description = "adding a new logger", + Credentials = +{ +["instrumentationKey"] = "11................a1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, loggerId, data); + ServiceWorkspaceLoggerResource 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 + ApiManagementLoggerData 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_ApiManagementCreateWorkspaceEHLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceEHLogger.json + // this example is just showing the usage of "WorkspaceLogger_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation + string loggerId = "eh1"; + ApiManagementLoggerData data = new ApiManagementLoggerData + { + LoggerType = LoggerType.AzureEventHub, + Description = "adding a new logger", + Credentials = +{ +["name"] = "hydraeventhub", +["connectionString"] = "Endpoint=sb://hydraeventhub-ns.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=********=" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, loggerId, data); + ServiceWorkspaceLoggerResource 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 + ApiManagementLoggerData 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_ApiManagementGetWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation + string loggerId = "templateLogger"; + ServiceWorkspaceLoggerResource result = await collection.GetAsync(loggerId); + + // 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 + ApiManagementLoggerData 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_ApiManagementListWorkspaceLoggers() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceLoggers.json + // this example is just showing the usage of "WorkspaceLogger_ListByWorkspace" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation and iterate over the result + await foreach (ServiceWorkspaceLoggerResource 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 + ApiManagementLoggerData 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_ApiManagementGetWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation + string loggerId = "templateLogger"; + bool result = await collection.ExistsAsync(loggerId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ApiManagementGetWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this WorkspaceContractResource created on azure + // for more information of creating WorkspaceContractResource, please refer to the document of WorkspaceContractResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + ResourceIdentifier workspaceContractResourceId = WorkspaceContractResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId); + WorkspaceContractResource workspaceContract = client.GetWorkspaceContractResource(workspaceContractResourceId); + + // get the collection of this ServiceWorkspaceLoggerResource + ServiceWorkspaceLoggerCollection collection = workspaceContract.GetServiceWorkspaceLoggers(); + + // invoke the operation + string loggerId = "templateLogger"; + NullableResponse response = await collection.GetIfExistsAsync(loggerId); + ServiceWorkspaceLoggerResource 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 + ApiManagementLoggerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerResource.cs new file mode 100644 index 000000000000..18e9b74947d0 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceLoggerResource.cs @@ -0,0 +1,146 @@ +// 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.ApiManagement.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_ServiceWorkspaceLoggerResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ApiManagementGetWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceLoggerResource created on azure + // for more information of creating ServiceWorkspaceLoggerResource, please refer to the document of ServiceWorkspaceLoggerResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string loggerId = "templateLogger"; + ResourceIdentifier serviceWorkspaceLoggerResourceId = ServiceWorkspaceLoggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + ServiceWorkspaceLoggerResource serviceWorkspaceLogger = client.GetServiceWorkspaceLoggerResource(serviceWorkspaceLoggerResourceId); + + // invoke the operation + ServiceWorkspaceLoggerResource result = await serviceWorkspaceLogger.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 + ApiManagementLoggerData 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_ApiManagementDeleteWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_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 ServiceWorkspaceLoggerResource created on azure + // for more information of creating ServiceWorkspaceLoggerResource, please refer to the document of ServiceWorkspaceLoggerResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string loggerId = "loggerId"; + ResourceIdentifier serviceWorkspaceLoggerResourceId = ServiceWorkspaceLoggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + ServiceWorkspaceLoggerResource serviceWorkspaceLogger = client.GetServiceWorkspaceLoggerResource(serviceWorkspaceLoggerResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + await serviceWorkspaceLogger.DeleteAsync(WaitUntil.Completed, ifMatch); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ApiManagementUpdateWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_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 ServiceWorkspaceLoggerResource created on azure + // for more information of creating ServiceWorkspaceLoggerResource, please refer to the document of ServiceWorkspaceLoggerResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string loggerId = "eh1"; + ResourceIdentifier serviceWorkspaceLoggerResourceId = ServiceWorkspaceLoggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + ServiceWorkspaceLoggerResource serviceWorkspaceLogger = client.GetServiceWorkspaceLoggerResource(serviceWorkspaceLoggerResourceId); + + // invoke the operation + ETag ifMatch = new ETag("*"); + ApiManagementLoggerPatch patch = new ApiManagementLoggerPatch + { + LoggerType = LoggerType.AzureEventHub, + Description = "updating description", + }; + ServiceWorkspaceLoggerResource result = await serviceWorkspaceLogger.UpdateAsync(ifMatch, 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 + ApiManagementLoggerData 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 GetEntityTag_ApiManagementHeadWorkspaceLogger() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceLogger.json + // this example is just showing the usage of "WorkspaceLogger_GetEntityTag" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ServiceWorkspaceLoggerResource created on azure + // for more information of creating ServiceWorkspaceLoggerResource, please refer to the document of ServiceWorkspaceLoggerResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg1"; + string serviceName = "apimService1"; + string workspaceId = "wks1"; + string loggerId = "templateLogger"; + ResourceIdentifier serviceWorkspaceLoggerResourceId = ServiceWorkspaceLoggerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serviceName, workspaceId, loggerId); + ServiceWorkspaceLoggerResource serviceWorkspaceLogger = client.GetServiceWorkspaceLoggerResource(serviceWorkspaceLoggerResourceId); + + // invoke the operation + bool result = await serviceWorkspaceLogger.GetEntityTagAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs index 820d2420c8bc..202536a13aef 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceNamedValueCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNamedValueWithKeyVault.json // this example is just showing the usage of "WorkspaceNamedValue_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceNamedValueWithKeyVa [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceNamedValues() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceNamedValues.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNamedValues.json // this example is just showing the usage of "WorkspaceNamedValue_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceNamedValues() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,7 +248,7 @@ public async Task Exists_ApiManagementGetWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task Exists_ApiManagementGetWorkspaceNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +322,7 @@ public async Task GetIfExists_ApiManagementGetWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs index 7f6a0e1594f3..ca3a449f5c5c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNamedValueResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceNamedValueResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNamedValueWithKeyVault() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNamedValueWithKeyVault.json // this example is just showing the usage of "WorkspaceNamedValue_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspaceNamedValueWithKeyVault() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_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 @@ -113,7 +113,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_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 @@ -154,7 +154,7 @@ public async Task Update_ApiManagementUpdateWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetValue_ApiManagementWorkspaceNamedValueListValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementWorkspaceNamedValueListValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceNamedValueListValue.json // this example is just showing the usage of "WorkspaceNamedValue_ListValue" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetValue_ApiManagementWorkspaceNamedValueListValue() [Ignore("Only validating compilation of examples")] public async Task RefreshSecret_ApiManagementRefreshWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementRefreshWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementRefreshWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_RefreshSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RefreshSecret_ApiManagementRefreshWorkspaceNamedValue() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceNamedValue() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceNamedValue.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNamedValue.json // this example is just showing the usage of "WorkspaceNamedValue_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs index aa56d3757ac4..7371689532eb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceNotificationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceNotification() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceNotification() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceNotifications() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceNotifications.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotifications.json // this example is just showing the usage of "WorkspaceNotification_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceNotifications() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceNotification() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs index 3969db2436cd..53f1d88bd4e7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceNotificationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceNotificationResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceNotification() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceNotification() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNotification.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotification.json // this example is just showing the usage of "WorkspaceNotification_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Update_ApiManagementCreateWorkspaceNotification() [Ignore("Only validating compilation of examples")] public async Task GetWorkspaceNotificationRecipientUsersByNotification_ApiManagementListWorkspaceNotificationRecipientUsers() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientUsers.json // this example is just showing the usage of "WorkspaceNotificationRecipientUser_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetWorkspaceNotificationRecipientUsersByNotification_ApiManage [Ignore("Only validating compilation of examples")] public async Task CheckEntityExistsWorkspaceNotificationRecipientUser_ApiManagementHeadWorkspaceNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientUser.json // this example is just showing the usage of "WorkspaceNotificationRecipientUser_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckEntityExistsWorkspaceNotificationRecipientUser_ApiManagem [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateWorkspaceNotificationRecipientUser_ApiManagementCreateWorkspaceNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientUser.json // this example is just showing the usage of "WorkspaceNotificationRecipientUser_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateWorkspaceNotificationRecipientUser_ApiManagement [Ignore("Only validating compilation of examples")] public async Task DeleteWorkspaceNotificationRecipientUser_ApiManagementDeleteWorkspaceNotificationRecipientUser() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientUser.json // this example is just showing the usage of "WorkspaceNotificationRecipientUser_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 @@ -203,7 +203,7 @@ public async Task DeleteWorkspaceNotificationRecipientUser_ApiManagementDeleteWo [Ignore("Only validating compilation of examples")] public async Task GetWorkspaceNotificationRecipientEmailsByNotification_ApiManagementListWorkspaceNotificationRecipientEmails() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceNotificationRecipientEmails.json // this example is just showing the usage of "WorkspaceNotificationRecipientEmail_ListByNotification" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +234,7 @@ public async Task GetWorkspaceNotificationRecipientEmailsByNotification_ApiManag [Ignore("Only validating compilation of examples")] public async Task CheckEntityExistsWorkspaceNotificationRecipientEmail_ApiManagementHeadWorkspaceNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceNotificationRecipientEmail.json // this example is just showing the usage of "WorkspaceNotificationRecipientEmail_CheckEntityExists" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckEntityExistsWorkspaceNotificationRecipientEmail_ApiManage [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateWorkspaceNotificationRecipientEmail_ApiManagementCreateWorkspaceNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceNotificationRecipientEmail.json // this example is just showing the usage of "WorkspaceNotificationRecipientEmail_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateWorkspaceNotificationRecipientEmail_ApiManagemen [Ignore("Only validating compilation of examples")] public async Task DeleteWorkspaceNotificationRecipientEmail_ApiManagementDeleteWorkspaceNotificationRecipientEmail() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceNotificationRecipientEmail.json // this example is just showing the usage of "WorkspaceNotificationRecipientEmail_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/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs index b51f23aa76de..966626b96442 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspacePolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspacePolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json // this example is just showing the usage of "WorkspacePolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspacePolicyNonXmlEncoded [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspacePolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspacePolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicies.json // this example is just showing the usage of "WorkspacePolicy_ListByApi" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -176,7 +176,7 @@ public async Task GetAll_ApiManagementListWorkspacePolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs index 61e7b1f69433..b516166b432d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspacePolicyFragmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspacePolicyFragments() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspacePolicyFragments.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragments.json // this example is just showing the usage of "WorkspacePolicyFragment_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspacePolicyFragments() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspacePolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -233,7 +233,7 @@ public async Task Exists_ApiManagementGetWorkspacePolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetIfExists_ApiManagementGetWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspacePolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs index 89ee22b45ffa..3fa34d5d51eb 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyFragmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspacePolicyFragmentResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicyFragmentFormat() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicyFragmentFormat.json // this example is just showing the usage of "WorkspacePolicyFragment_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -85,7 +85,7 @@ public async Task Get_ApiManagementGetWorkspacePolicyFragmentFormat() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_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 @@ -114,7 +114,7 @@ public async Task Delete_ApiManagementDeleteWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateWorkspacePolicyFragment() [Ignore("Only validating compilation of examples")] public async Task GetReferences_ApiManagementListWorkspacePolicyFragmentReferences() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspacePolicyFragmentReferences.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspacePolicyFragmentReferences.json // this example is just showing the usage of "WorkspacePolicyFragment_ListReferences" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetReferences_ApiManagementListWorkspacePolicyFragmentReferenc [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspacePolicyFragment() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspacePolicyFragment.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicyFragment.json // this example is just showing the usage of "WorkspacePolicyFragment_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs index 89070049a879..4417b65f46e2 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspacePolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspacePolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_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_ApiManagementDeleteWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateWorkspacePolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspacePolicyNonXmlEncoded() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspacePolicyNonXmlEncoded.json // this example is just showing the usage of "WorkspacePolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateWorkspacePolicyNonXmlEncoded() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspacePolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspacePolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspacePolicy.json // this example is just showing the usage of "WorkspacePolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs index 50b837f89884..fcf1f0362097 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceProductApiLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductApiLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceProductApiLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceProductApiLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductApiLinks.json // this example is just showing the usage of "WorkspaceProductApiLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceProductApiLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductApiLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs index d879f72f8465..b3f83637993c 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductApiLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceProductApiLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_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_ApiManagementDeleteWorkspaceProductApiLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceProductApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductApiLink.json // this example is just showing the usage of "WorkspaceProductApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs index 369ea8a20a69..a430d034dddd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceProductCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceProducts() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceProducts.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProducts.json // this example is just showing the usage of "WorkspaceProduct_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceProducts() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs index 014d07a58820..6afc56c67f1a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceProductGroupLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceProductGroupLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceProductGroupLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductGroupLinks.json // this example is just showing the usage of "WorkspaceProductGroupLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceProductGroupLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs index f2487bc62fac..cbae385429a3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductGroupLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceProductGroupLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_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_ApiManagementDeleteWorkspaceProductGroupLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceProductGroupLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductGroupLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductGroupLink.json // this example is just showing the usage of "WorkspaceProductGroupLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs index 111dd543e0a8..7311d1b9f8ae 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceProductPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceProductPolicies() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceProductPolicies.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceProductPolicies.json // this example is just showing the usage of "WorkspaceProductPolicy_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceProductPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_ApiManagementGetWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs index ea243a1d4e3f..e61e884d16bf 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceProductPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_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_ApiManagementDeleteWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceProductPolicy() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceProductPolicy() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceProductPolicy.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProductPolicy.json // this example is just showing the usage of "WorkspaceProductPolicy_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs index fed87d87a54c..ed7473f45488 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceProductResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceProductResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_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 @@ -82,7 +82,7 @@ public async Task Delete_ApiManagementDeleteWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_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 @@ -119,7 +119,7 @@ public async Task Update_ApiManagementUpdateWorkspaceProduct() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceProduct() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceProduct.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceProduct.json // this example is just showing the usage of "WorkspaceProduct_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs similarity index 95% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs index bfd6d6fbe3ca..6ba83472cf4a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceSchemaCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceSchemas() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceSchemas.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSchemas.json // this example is just showing the usage of "WorkspaceGlobalSchema_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs index 4330d606672f..b8f88459de84 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSchemaResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_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_ApiManagementDeleteWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_ApiManagementCreateWorkspaceSchema() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceSchema() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceSchema.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSchema.json // this example is just showing the usage of "WorkspaceGlobalSchema_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs index 78a280776d7e..3fdfe98c7344 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceSubscriptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceSubscriptions() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceSubscriptions.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceSubscriptions.json // this example is just showing the usage of "WorkspaceSubscription_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_ApiManagementListWorkspaceSubscriptions() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs index c92379f2be0e..7e45137800a0 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceSubscriptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_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_ApiManagementDeleteWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateWorkspaceSubscription() [Ignore("Only validating compilation of examples")] public async Task RegeneratePrimaryKey_ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegeneratePrimaryKey.json // this example is just showing the usage of "WorkspaceSubscription_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegeneratePrimaryKey_ApiManagementWorkspaceSubscriptionRegener [Ignore("Only validating compilation of examples")] public async Task RegenerateSecondaryKey_ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionRegenerateSecondaryKey.json // this example is just showing the usage of "WorkspaceSubscription_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegenerateSecondaryKey_ApiManagementWorkspaceSubscriptionRegen [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementWorkspaceSubscriptionListSecrets() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementWorkspaceSubscriptionListSecrets.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementWorkspaceSubscriptionListSecrets.json // this example is just showing the usage of "WorkspaceSubscription_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSecrets_ApiManagementWorkspaceSubscriptionListSecrets() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspaceSubscription() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceSubscription.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceSubscription.json // this example is just showing the usage of "WorkspaceSubscription_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs index 6bf4280e3231..f6a73029339d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagApiLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagApiLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceTagApiLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceTagApiLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagApiLinks.json // this example is just showing the usage of "WorkspaceTagApiLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceTagApiLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagApiLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs index 263659a326e9..b07c86b3af8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagApiLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagApiLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_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_ApiManagementDeleteWorkspaceTagApiLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceTagApiLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagApiLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagApiLink.json // this example is just showing the usage of "WorkspaceTagApiLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs index 109594a6ffa7..e76b85fbd769 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceTagCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceTags() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceTags.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTags.json // this example is just showing the usage of "WorkspaceTag_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceTags() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs index 9da86395c877..8793ee1c9ff3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagOperationLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceTagOperationLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceTagOperationLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagOperationLinks.json // this example is just showing the usage of "WorkspaceTagOperationLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceTagOperationLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs index b343230f3716..a87bc1c005c6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagOperationLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagOperationLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_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_ApiManagementDeleteWorkspaceTagOperationLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceTagOperationLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagOperationLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagOperationLink.json // this example is just showing the usage of "WorkspaceTagOperationLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs index 301bab30a76e..a0bacbf8089b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagProductLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspaceTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagProductLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaceTagProductLinks() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaceTagProductLinks.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaceTagProductLinks.json // this example is just showing the usage of "WorkspaceTagProductLink_ListByProduct" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaceTagProductLinks() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagProductLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs index ede43a47f421..d6ccc3e6e79b 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagProductLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ServiceWorkspaceTagProductLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_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_ApiManagementDeleteWorkspaceTagProductLink() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementCreateWorkspaceTagProductLink() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspaceTagProductLink.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspaceTagProductLink.json // this example is just showing the usage of "WorkspaceTagProductLink_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs index 2c3542c9a6d5..9747c9e47d11 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_ServiceWorkspaceTagResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServiceWorkspaceTagResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_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_ApiManagementDeleteWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateWorkspaceTag() [Ignore("Only validating compilation of examples")] public async Task GetEntityState_ApiManagementHeadWorkspaceTag() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspaceTag.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspaceTag.json // this example is just showing the usage of "WorkspaceTag_GetEntityState" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..f89d7b037dbe --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.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.ApiManagement.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetApiGateways_ApiManagementListGatewaysBySubscription() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListGatewaysBySubscription.json + // this example is just showing the usage of "ApiGateway_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 = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ApiGatewayResource item in subscriptionResource.GetApiGatewaysAsync()) + { + // 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 + ApiGatewayData 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 GetApiManagementDeletedServices_ApiManagementDeletedServicesListBySubscription() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeletedServicesListBySubscription.json + // this example is just showing the usage of "DeletedServices_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); + + // invoke the operation and iterate over the result + await foreach (ApiManagementDeletedServiceResource item in subscriptionResource.GetApiManagementDeletedServicesAsync()) + { + // 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 + ApiManagementDeletedServiceData 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 GetApiManagementServices_ApiManagementListServiceBySubscription() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListServiceBySubscription.json + // this example is just showing the usage of "ApiManagementService_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 = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ApiManagementServiceResource item in subscriptionResource.GetApiManagementServicesAsync()) + { + // 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 + ApiManagementServiceData 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 CheckApiManagementServiceNameAvailability_ApiManagementServiceCheckNameAvailability() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceCheckNameAvailability.json + // this example is just showing the usage of "ApiManagementService_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 + 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 + ApiManagementServiceNameAvailabilityContent content = new ApiManagementServiceNameAvailabilityContent("apimService1"); + ApiManagementServiceNameAvailabilityResult result = await subscriptionResource.CheckApiManagementServiceNameAvailabilityAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetApiManagementServiceDomainOwnershipIdentifier_ApiManagementServiceGetDomainOwnershipIdentifier() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementServiceGetDomainOwnershipIdentifier.json + // this example is just showing the usage of "ApiManagementService_GetDomainOwnershipIdentifier" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 + ApiManagementServiceGetDomainOwnershipIdentifierResult result = await subscriptionResource.GetApiManagementServiceDomainOwnershipIdentifierAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetApiManagementSkus_ListsAllAvailableResourceSKUs() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSku.json + // this example is just showing the usage of "ApiManagementSkus_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 = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ApiManagementSku item in subscriptionResource.GetApiManagementSkusAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperationsResult_ApiManagementGetOperationResult() + { + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetOperationResult.json + // this example is just showing the usage of "OperationsResults_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 + AzureLocation location = new AzureLocation("westus2"); + string operationId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; + await subscriptionResource.GetOperationsResultAsync(location, operationId); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoCollection.cs index eca87188ba45..dd8812636806 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateTenantAccess.json // this example is just showing the usage of "TenantAccess_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_ApiManagementCreateTenantAccess() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTenantAccess() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_ApiManagementGetTenantGitAccess() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListTenantAccess.json // this example is just showing the usage of "TenantAccess_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ApiManagementListTenantAccess() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetTenantAccess() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ApiManagementGetTenantGitAccess() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +266,7 @@ public async Task GetIfExists_ApiManagementGetTenantAccess() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoResource.cs similarity index 93% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoResource.cs index b543c69c522d..253e2ec5f7a7 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_TenantAccessInfoResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_TenantAccessInfoResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantAccessInfoResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTenantAccess() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetTenantGitAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetTenantGitAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetTenantGitAccess.json // this example is just showing the usage of "TenantAccess_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetTenantGitAccess() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateTenantAccess.json // this example is just showing the usage of "TenantAccess_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 @@ -118,7 +118,7 @@ public async Task Update_ApiManagementUpdateTenantAccess() [Ignore("Only validating compilation of examples")] public async Task RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegeneratePrimaryKey_ApiManagementTenantAccessRegenerateKey() [Ignore("Only validating compilation of examples")] public async Task RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccess_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegenerateSecondaryKey_ApiManagementTenantAccessRegenerateKey( [Ignore("Only validating compilation of examples")] public async Task GetSecrets_ApiManagementListSecretsTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListSecretsTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListSecretsTenantAccess.json // this example is just showing the usage of "TenantAccess_ListSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task GetSecrets_ApiManagementListSecretsTenantAccess() [Ignore("Only validating compilation of examples")] public async Task RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegeneratePrimaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegeneratePrimaryKeyForGit_ApiManagementTenantAccessRegenerate [Ignore("Only validating compilation of examples")] public async Task RegenerateSecondaryKeyForGit_ApiManagementTenantAccessRegenerateKey() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementTenantAccessRegenerateKey.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementTenantAccessRegenerateKey.json // this example is just showing the usage of "TenantAccessGit_RegenerateSecondaryKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RegenerateSecondaryKeyForGit_ApiManagementTenantAccessRegenera [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadTenantAccess() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadTenantAccess.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadTenantAccess.json // this example is just showing the usage of "TenantAccess_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractCollection.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractCollection.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractCollection.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractCollection.cs index 4ebadec4286f..a895ad8adc4d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractCollection.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkspaceContractCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApiManagementCreateWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementCreateWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementCreateWorkspace.json // this example is just showing the usage of "Workspace_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementCreateWorkspace() [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json // this example is just showing the usage of "Workspace_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspace() [Ignore("Only validating compilation of examples")] public async Task GetAll_ApiManagementListWorkspaces() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementListWorkspaces.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementListWorkspaces.json // this example is just showing the usage of "Workspace_ListByService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementListWorkspaces() [Ignore("Only validating compilation of examples")] public async Task Exists_ApiManagementGetWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json // this example is just showing the usage of "Workspace_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspace() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ApiManagementGetWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json // this example is just showing the usage of "Workspace_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractResource.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractResource.cs similarity index 94% rename from sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractResource.cs rename to sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractResource.cs index fe8b199e26b9..4961d2c0ebfd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/samples/Generated/Samples/Sample_WorkspaceContractResource.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Generated/Samples/Sample_WorkspaceContractResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkspaceContractResource [Ignore("Only validating compilation of examples")] public async Task Get_ApiManagementGetWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementGetWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementGetWorkspace.json // this example is just showing the usage of "Workspace_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApiManagementGetWorkspace() [Ignore("Only validating compilation of examples")] public async Task Delete_ApiManagementDeleteWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementDeleteWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementDeleteWorkspace.json // this example is just showing the usage of "Workspace_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_ApiManagementDeleteWorkspace() [Ignore("Only validating compilation of examples")] public async Task Update_ApiManagementUpdateWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementUpdateWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementUpdateWorkspace.json // this example is just showing the usage of "Workspace_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 @@ -115,7 +115,7 @@ public async Task Update_ApiManagementUpdateWorkspace() [Ignore("Only validating compilation of examples")] public async Task GetEntityTag_ApiManagementHeadWorkspace() { - // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-03-01-preview/examples/ApiManagementHeadWorkspace.json + // Generated from example definition: specification/apimanagement/resource-manager/Microsoft.ApiManagement/stable/2024-05-01/examples/ApiManagementHeadWorkspace.json // this example is just showing the usage of "Workspace_GetEntityTag" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiCollectionTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiCollectionTests.cs index bb49eb99fb2e..ab20dcf17920 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiCollectionTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiCollectionTests.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiCollectionTests : ApiManagementManagementTestBase { public ApiCollectionTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -35,8 +35,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiService() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -48,7 +48,7 @@ public async Task CreateOrUpdate_GetAll_Get_Exists_Delete() { await CreateApiService(); var collection = ApiServiceResource.GetApis(); - var apiName = Recording.GenerateAssetName("testapi-"); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); var data = new ApiCreateOrUpdateContent() { Description = "apidescription5200", @@ -83,7 +83,7 @@ public async Task GetApiRevisionsByServiceTest() { await CreateApiService(); var collection = ApiServiceResource.GetApis(); - var apiName = Recording.GenerateAssetName("testapi-"); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); var data = new ApiCreateOrUpdateContent() { Description = "apidescription5200", diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiDiagnosticCollectionTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiDiagnosticCollectionTests.cs index 51773c9c25e5..0fc558ba280d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiDiagnosticCollectionTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiDiagnosticCollectionTests.cs @@ -35,7 +35,7 @@ public ApiDiagnosticCollectionTests(bool isAsync) private async Task SetCollectionsAsync() { - ResourceGroup = await CreateResourceGroupAsync(); + ResourceGroup = await CreateResourceGroupAsync(AzureLocation.EastUS); VNetCollection = ResourceGroup.GetVirtualNetworks(); ApiServiceCollection = ResourceGroup.GetApiManagementServices(); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceCollectionTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceCollectionTests.cs index 04b1b0fe11b0..85d0ce59b620 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceCollectionTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceCollectionTests.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiManagementServiceCollectionTests : ApiManagementManagementTestBase { public ApiManagementServiceCollectionTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -30,11 +30,12 @@ private async Task GetApiManagementServiceCollec } [Test] + [Ignore("Record success, playback time out.")] public async Task CRUD() { var collection = await GetApiManagementServiceCollectionAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -72,22 +73,13 @@ public async Task Get() { ApiManagementServiceCollection collection; var apiName = ""; - if (Mode != RecordedTestMode.Playback) + collection = await GetApiManagementServiceCollectionAsync(); + apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { - collection = await GetApiManagementServiceCollectionAsync(); - apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") - { - Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) - }; - await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); - } - else - { - apiName = "sdktestapi"; - var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); - collection = resourceGroup.Value.GetApiManagementServices(); - } + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); var apiManagementService = (await collection.GetAsync(apiName)).Value; Assert.NotNull(apiManagementService.Data.Name); } @@ -96,21 +88,13 @@ public async Task Get() public async Task GetAll() { ApiManagementServiceCollection collection; - if (Mode != RecordedTestMode.Playback) + collection = await GetApiManagementServiceCollectionAsync(); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { - collection = await GetApiManagementServiceCollectionAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") - { - Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) - }; - await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); - } - else - { - var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); - collection = resourceGroup.Value.GetApiManagementServices(); - } + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); var apiManagementServices = await collection.GetAllAsync().ToEnumerableAsync(); Assert.GreaterOrEqual(apiManagementServices.Count, 1); } @@ -120,22 +104,13 @@ public async Task Exists() { ApiManagementServiceCollection collection; var apiName = ""; - if (Mode != RecordedTestMode.Playback) - { - collection = await GetApiManagementServiceCollectionAsync(); - apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") - { - Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) - }; - await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); - } - else + collection = await GetApiManagementServiceCollectionAsync(); + apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { - apiName = "sdktestapi"; - var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); - collection = resourceGroup.Value.GetApiManagementServices(); - } + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); var apiManagementServiceTrue = await collection.ExistsAsync(apiName); var apiManagementServiceFalse = await collection.ExistsAsync("foo"); Assert.IsTrue(apiManagementServiceTrue); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceResourceTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceResourceTests.cs index 5b77598d179b..bb39287f60aa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceResourceTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiManagementServiceResourceTests.cs @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiManagementServiceResourceTests : ApiManagementManagementTestBase { public ApiManagementServiceResourceTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -32,22 +32,13 @@ private async Task GetApiManagementServiceCollec private async Task GetApiManagementServiceAsync() { - if (Mode != RecordedTestMode.Playback) + var collection = await GetApiManagementServiceCollectionAsync(); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Premium, 1), "Sample@Sample.com", "sample") { - var collection = await GetApiManagementServiceCollectionAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") - { - Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) - }; - return (await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; - } - else - { - var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); - var collection = resourceGroup.Value.GetApiManagementServices(); - return (await collection.GetAsync("sdktestapi")).Value; - } + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + return (await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; } [Test] @@ -98,7 +89,7 @@ public async Task GetAvailableApiManagementServiceSkus() public async Task GetNetworkStatusByLocation() { var apiManagementService = await GetApiManagementServiceAsync(); - var status = await apiManagementService.GetNetworkStatusByLocationAsync(AzureLocation.EastUS.DisplayName); + var status = await apiManagementService.GetNetworkStatusByLocationAsync(AzureLocation.WestUS2.DisplayName); Assert.GreaterOrEqual(status.Value.ConnectivityStatus.Count, 0); } @@ -258,6 +249,7 @@ public async Task GetTenantConfigurationSyncState() } [Test] + [Ignore("Functionality not supported")] public async Task PerformConnectivityCheckAsync() { var apiManagementService = await GetApiManagementServiceAsync(); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiOperationTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiOperationTests.cs index 853383198686..31e6c8ee3b69 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiOperationTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiOperationTests.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiOperationTests : ApiManagementManagementTestBase { public ApiOperationTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiProductTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiProductTests.cs index 1e14743b7f8f..f881d1d6a053 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiProductTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiProductTests.cs @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.BasicV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -48,15 +48,21 @@ public async Task CRUD() await CreateApiServiceAsync(); var list = await ApiServiceResource.GetApis().GetAllAsync().ToEnumerableAsync(); - Assert.GreaterOrEqual(list.Count, 1); - var api = list.Single(); + Assert.AreEqual(0, list.Count); var productCollections = ApiServiceResource.GetApiManagementProducts(); var listResponse = await productCollections.GetAllAsync().ToEnumerableAsync(); Assert.NotNull(listResponse); - Assert.AreEqual(2, listResponse.Count()); + Assert.AreEqual(0, listResponse.Count()); - var product = listResponse.FirstOrDefault(); + var productId = Recording.GenerateAssetName("prod-"); + var data = new ApiManagementProductData() + { + Description = "product", + DisplayName = productId, + IsSubscriptionRequired = true, + }; + var product = (await productCollections.CreateOrUpdateAsync(WaitUntil.Completed, productId, data)).Value; var name = product.Data.Name; var result = (await product.GetAsync()).Value; Assert.NotNull(result); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiSchemaTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiSchemaTests.cs index f33e2c1ced73..fced4cd5c6d3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiSchemaTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiSchemaTests.cs @@ -17,7 +17,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiSchemaTests : ApiManagementManagementTestBase { public ApiSchemaTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -168,8 +168,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiVersionSetTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiVersionSetTests.cs index 7c8c57d380db..20f1bc08bf5f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiVersionSetTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ApiVersionSetTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ApiVersionSetTests : ApiManagementManagementTestBase { public ApiVersionSetTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/AuthorizationServerTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/AuthorizationServerTests.cs index 65575a6ca6a7..ec9cd216f036 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/AuthorizationServerTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/AuthorizationServerTests.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class AuthorizationServerTests : ApiManagementManagementTestBase { public AuthorizationServerTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -35,8 +35,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample"); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample"); ApiServiceResource = (await ApiServiceCollection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/BackendTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/BackendTests.cs index d5c687abcc15..67bb8f174f51 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/BackendTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/BackendTests.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class BackendTests : ApiManagementManagementTestBase { public BackendTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -35,8 +35,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CacheTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CacheTests.cs index 06e80ea2f515..7202dd3b4645 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CacheTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CacheTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class CacheTests : ApiManagementManagementTestBase { public CacheTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -53,7 +53,7 @@ public async Task CRUD() Assert.IsEmpty(cacheListResponse); // create new cache - string cacheid = AzureLocation.EastUS; + string cacheid = AzureLocation.WestUS2; var cacheContract = new ApiManagementCacheData() { ConnectionString = Recording.GenerateAssetName("string"), diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CertificateTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CertificateTests.cs index 8639d2b25a52..4183d4bf36c1 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CertificateTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/CertificateTests.cs @@ -16,7 +16,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class CertificateTests : ApiManagementManagementTestBase { public CertificateTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync)// RecordedTestMode.Record) { } @@ -28,7 +28,7 @@ public CertificateTests(bool isAsync) private async Task SetCollectionsAsync() { - ResourceGroup = await CreateResourceGroupAsync(); + ResourceGroup = await CreateResourceGroupAsync(AzureLocation.EastUS); ApiServiceCollection = ResourceGroup.GetApiManagementServices(); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ContentTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ContentTests.cs index 3d8942e020cb..ca11c741766e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ContentTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ContentTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ContentTests : ApiManagementManagementTestBase { public ContentTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/DelegationSettingTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/DelegationSettingTests.cs index ba06345cb852..c49bcb18a2dc 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/DelegationSettingTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/DelegationSettingTests.cs @@ -27,7 +27,7 @@ public DelegationSettingTests(bool isAsync) private async Task SetCollectionsAsync() { - ResourceGroup = await CreateResourceGroupAsync(); + ResourceGroup = await CreateResourceGroupAsync(AzureLocation.EastUS); ApiServiceCollection = ResourceGroup.GetApiManagementServices(); } @@ -78,12 +78,12 @@ public async Task CRUD() ValidationKey = "Sanitized" }; var portalDelegationSettings = (await delegationCollection.CreateOrUpdateAsync(WaitUntil.Completed, portalDelegationSettingsParams)).Value; - //Assert.NotNull(portalDelegationSettings); - //Assert.AreEqual(urlParameter, portalDelegationSettings.Data.Uri.ToString()); - // validation key is generated brand new on playback mode and hence validation fails - //Assert.Equal(portalDelegationSettingsParams.ValidationKey, portalDelegationSettings.ValidationKey); - //Assert.IsTrue(portalDelegationSettings.Data.UserRegistration.Enabled); - //Assert.IsTrue(portalDelegationSettings.Data.Subscriptions.Enabled); + Assert.NotNull(portalDelegationSettings); + Assert.AreEqual(urlParameter, portalDelegationSettings.Data.Uri.ToString()); + //validation key is generated brand new on playback mode and hence validation fails + Assert.AreEqual(portalDelegationSettingsParams.ValidationKey, portalDelegationSettings.Data.ValidationKey); + Assert.IsTrue(portalDelegationSettings.Data.UserRegistration.IsUserRegistrationDelegationEnabled); + Assert.IsTrue(portalDelegationSettings.Data.Subscriptions.IsSubscriptionDelegationEnabled); // update the delegation settings var data = portalDelegationSettings.Data; @@ -92,11 +92,11 @@ public async Task CRUD() await portalDelegationSettings.UpdateAsync(ETag.All, data); portalDelegationSettings = await portalDelegationSettings.GetAsync(); - //Assert.NotNull(portalDelegationSettings); + Assert.NotNull(portalDelegationSettings); //Assert.IsNull(portalDelegationSettings.Data.Uri.ToString()); - //Assert.IsNull(portalDelegationSettings.Data.ValidationKey); - //Assert.IsFalse(portalDelegationSettings.Data.UserRegistration.Enabled); - //Assert.IsFalse(portalDelegationSettings.Data.Subscriptions.Enabled); + Assert.IsNull(portalDelegationSettings.Data.ValidationKey); + Assert.IsFalse(portalDelegationSettings.Data.UserRegistration.IsUserRegistrationDelegationEnabled); + Assert.IsFalse(portalDelegationSettings.Data.Subscriptions.IsSubscriptionDelegationEnabled); } } } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/EmailTemplateTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/EmailTemplateTests.cs index e1fb4e891de9..2add6a778e33 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/EmailTemplateTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/EmailTemplateTests.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class EmailTemplateTests : ApiManagementManagementTestBase { public EmailTemplateTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayConfigConnectionTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayConfigConnectionTests.cs new file mode 100644 index 000000000000..aa0ff91029b7 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayConfigConnectionTests.cs @@ -0,0 +1,118 @@ +// 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; +using Azure.Core; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.EventHubs; +using Azure.ResourceManager.EventHubs.Models; +using NUnit.Framework; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Models; +using Azure.Core.TestFramework.Models; +using Microsoft.Extensions.DependencyInjection; + +namespace Azure.ResourceManager.ApiManagement.Tests +{ + public class GatewayConfigConnectionTests : ApiManagementManagementTestBase + { + public GatewayConfigConnectionTests(bool isAsync) + : base(isAsync) //, RecordedTestMode.Record) + { + } + + private ResourceGroupResource ResourceGroup { get; set; } + + private ApiGatewayResource GatewayResource { get; set; } + + private ApiGatewayCollection GatewayResources { get; set; } + + private async Task SetCollectionsAsync() + { + ResourceGroup = await CreateResourceGroupAsync(); + GatewayResources = ResourceGroup.GetApiGateways(); + } + + private async Task CreateGatewayResourceAsync() + { + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiGatewayData(AzureLocation.WestUS2, new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium)); + GatewayResource = (await GatewayResources.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; + } + + /* + private async Task CreateApiServiceAsync() + { + await SetCollectionsAsync(); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") + { + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + ApiServiceResource = (await ApiServiceCollection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; + } + + + [Test] + public async Task CRUD() + { + await SetCollectionsAsync(); + + var gatewConfigCollections = GatewayResource.GetGatewayConfigConnectionResources(); + + string configName = Recording.GenerateAssetName("cfg"); + + var collection = await GetApiManagementServiceCollectionAsync(); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") + { + Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) + }; + var apiManagementService = (await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; + Assert.AreEqual(apiManagementService.Data.Name, apiName); + + // create new group with default parameters + string loggerDescription = Recording.GenerateAssetName("newloggerDescription"); + var configCreateParameters = new ApiManagementGatewayConfigConnectionResourceData() + { + SourceId = "" + }; + + var configConnectionContract = (await gatewConfigCollections.CreateOrUpdateAsync(WaitUntil.Completed, configName, configCreateParameters)).Value; + + Assert.NotNull(configConnectionContract); + Assert.AreEqual(newloggerId, loggerContract.Data.Name); + Assert.IsTrue(loggerContract.Data.IsBuffered); + Assert.AreEqual(LoggerType.AzureEventHub, loggerContract.Data.LoggerType); + Assert.NotNull(loggerContract.Data.Credentials); + Assert.AreEqual(2, loggerContract.Data.Credentials.Keys.Count); + + var listLoggers = await logCollection.GetAllAsync().ToEnumerableAsync(); + // there should be one user + Assert.GreaterOrEqual(listLoggers.Count, 1); + + // patch logger + string patchedDescription = Recording.GenerateAssetName("patchedDescription"); + await loggerContract.UpdateAsync(ETag.All, new ApiManagementLoggerPatch() { Description = patchedDescription }); + + // get to check it was patched + loggerContract = await logCollection.GetAsync(newloggerId); + + Assert.NotNull(loggerContract); + Assert.AreEqual(newloggerId, loggerContract.Data.Name); + Assert.AreEqual(patchedDescription, loggerContract.Data.Description); + Assert.NotNull(loggerContract.Data.Credentials); + + // delete the logger + await loggerContract.DeleteAsync(WaitUntil.Completed, ETag.All); + var falseResult = await logCollection.ExistsAsync(newloggerId); + Assert.IsFalse(falseResult); + } + */ + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayResourceTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayResourceTests.cs new file mode 100644 index 000000000000..11695cf3a290 --- /dev/null +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayResourceTests.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.ApiManagement.Models; +using Azure.ResourceManager.Network; +using NUnit.Framework; + +namespace Azure.ResourceManager.ApiManagement.Tests +{ + public class GatewayResourceTests : ApiManagementManagementTestBase + { + public GatewayResourceTests(bool isAsync) + : base(isAsync) //, RecordedTestMode.Record) + { + } + + private VirtualNetworkCollection VNetCollection { get; set; } + + private async Task GetGatewayResourceCollectionsAsync() + { + var resourceGroup = await CreateResourceGroupAsync(); + VNetCollection = resourceGroup.GetVirtualNetworks(); + return resourceGroup.GetApiGateways(); + } + + [Test] + [Ignore("Sku limite")] + public async Task CRUD() + { + var collection = await GetGatewayResourceCollectionsAsync(); + var gatewaName = Recording.GenerateAssetName("gateway-"); + var data = new ApiGatewayData(AzureLocation.WestUS2, new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium)); + var apiManagementService = (await collection.CreateOrUpdateAsync(WaitUntil.Completed, gatewaName, data)).Value; + Assert.AreEqual(apiManagementService.Data.Name, gatewaName); + } + + [Test] + [Ignore("Sku limite")] + public async Task Get() + { + ApiGatewayCollection collection; + var apiName = ""; + if (Mode != RecordedTestMode.Playback) + { + collection = await GetGatewayResourceCollectionsAsync(); + apiName = Recording.GenerateAssetName("gateway-"); + var data = new ApiGatewayData(AzureLocation.WestUS2, new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium)); + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); + } + else + { + apiName = "sdktestapi"; + var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); + collection = resourceGroup.Value.GetApiGateways(); + } + var gatewayResource = (await collection.GetAsync(apiName)).Value; + Assert.NotNull(gatewayResource.Data.Name); + } + + [Test] + [Ignore("Sku limite")] + public async Task GetAll() + { + ApiGatewayCollection collection; + if (Mode != RecordedTestMode.Playback) + { + collection = await GetGatewayResourceCollectionsAsync(); + var apiName = Recording.GenerateAssetName("gateway-"); + var data = new ApiGatewayData(AzureLocation.WestUS2, new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium)); + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); + } + else + { + var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); + collection = resourceGroup.Value.GetApiGateways(); + } + var apiManagementServices = await collection.GetAllAsync().ToEnumerableAsync(); + Assert.GreaterOrEqual(apiManagementServices.Count, 1); + } + + [Test] + [Ignore("Sku limite")] + public async Task Exists() + { + ApiGatewayCollection collection; + var apiName = ""; + if (Mode != RecordedTestMode.Playback) + { + collection = await GetGatewayResourceCollectionsAsync(); + apiName = Recording.GenerateAssetName("gateway-"); + var data = new ApiGatewayData(AzureLocation.WestUS2, new ApiManagementGatewaySkuProperties(ApiGatewaySkuType.WorkspaceGatewayPremium)); + await collection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data); + } + else + { + apiName = "sdktestapi"; + var resourceGroup = await DefaultSubscription.GetResourceGroups().GetAsync("sdktestrg"); + collection = resourceGroup.Value.GetApiGateways(); + } + var apiManagementServiceTrue = await collection.ExistsAsync(apiName); + var apiManagementServiceFalse = await collection.ExistsAsync("foo"); + Assert.IsTrue(apiManagementServiceTrue); + Assert.IsFalse(apiManagementServiceFalse); + } + } +} diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayTests.cs index 49b906f8dfba..b89a206904a8 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GatewayTests.cs @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupTests.cs index 265bbe997080..e99c80b92d8e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupTests.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class GroupTests : ApiManagementManagementTestBase { public GroupTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -37,8 +37,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupUserTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupUserTests.cs index f53b8089aa24..621132e441b3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupUserTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/GroupUserTests.cs @@ -19,7 +19,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class GroupUserTests : ApiManagementManagementTestBase { public GroupUserTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -38,8 +38,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IdentityProviderTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IdentityProviderTests.cs index b875fdb8f871..13fa6bcb453d 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IdentityProviderTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IdentityProviderTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class IdentityProviderTests : ApiManagementManagementTestBase { public IdentityProviderTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample"); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample"); ApiServiceResource = (await ApiServiceCollection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IssueTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IssueTests.cs index 1772b3bd6f7c..0448186aaab6 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IssueTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/IssueTests.cs @@ -20,7 +20,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class IssueTests : ApiManagementManagementTestBase { public IssueTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -32,7 +32,7 @@ public IssueTests(bool isAsync) private async Task SetCollectionsAsync() { - ResourceGroup = await CreateResourceGroupAsync(); + ResourceGroup = await CreateResourceGroupAsync(AzureLocation.EastUS); ApiServiceCollection = ResourceGroup.GetApiManagementServices(); } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/LoggerTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/LoggerTests.cs index 764aae709b6e..64df6b78f9ee 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/LoggerTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/LoggerTests.cs @@ -21,7 +21,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class LoggerTests : ApiManagementManagementTestBase { public LoggerTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { IgnoreApiVersionInEventHubOperations(); } @@ -40,8 +40,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -70,7 +70,7 @@ public async Task CRUD() // first create the event hub namespace var eventCollection = ResourceGroup.GetEventHubsNamespaces(); - var eventHubNamespace = (await eventCollection.CreateOrUpdateAsync(WaitUntil.Completed, eventHubNameSpaceName, new EventHubsNamespaceData(AzureLocation.EastUS))).Value; + var eventHubNamespace = (await eventCollection.CreateOrUpdateAsync(WaitUntil.Completed, eventHubNameSpaceName, new EventHubsNamespaceData(AzureLocation.WestUS2))).Value; Assert.NotNull(eventHubNamespace.Data.Name); // then create eventhub diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/NotificationTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/NotificationTests.cs index 84f08e0b4c30..9607443f331e 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/NotificationTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/NotificationTests.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class NotificationTests : ApiManagementManagementTestBase { public NotificationTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -37,8 +37,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/OpenIdConnectProviderTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/OpenIdConnectProviderTests.cs index 35ecf41aa499..e2247334e127 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/OpenIdConnectProviderTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/OpenIdConnectProviderTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class OpenIdConnectProviderTests : ApiManagementManagementTestBase { public OpenIdConnectProviderTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample"); + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample"); ApiServiceResource = (await ApiServiceCollection.CreateOrUpdateAsync(WaitUntil.Completed, apiName, data)).Value; } diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PolicyTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PolicyTests.cs index 47eb9d9431fd..71aa3e5321fa 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PolicyTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PolicyTests.cs @@ -11,7 +11,6 @@ using Azure.ResourceManager.ApiManagement.Models; using Azure.ResourceManager.Models; using Azure.ResourceManager.Resources; -using Newtonsoft.Json.Linq; using NUnit.Framework; namespace Azure.ResourceManager.ApiManagement.Tests @@ -19,7 +18,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class PolicyTests : ApiManagementManagementTestBase { public PolicyTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -83,8 +82,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PortalTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PortalTests.cs index cf137f01060b..c9af14f5829a 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PortalTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PortalTests.cs @@ -18,7 +18,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class PortalTests : ApiManagementManagementTestBase { public PortalTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -37,8 +37,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -46,6 +46,7 @@ private async Task CreateApiServiceAsync() } [Test] + [Ignore("Creation failed")] public async Task CRUD() { await CreateApiServiceAsync(); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ProductTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ProductTests.cs index 07157e529d1c..091c8309a6dd 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ProductTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/ProductTests.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class ProductTests : ApiManagementManagementTestBase { public ProductTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PropertiesTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PropertiesTests.cs index 4bc574417df6..98d65673b44f 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PropertiesTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/PropertiesTests.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class PropertiesTests : ApiManagementManagementTestBase { public PropertiesTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -34,8 +34,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.StandardV2, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignInSettingTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignInSettingTests.cs index 95672588aef1..371a5633b2d5 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignInSettingTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignInSettingTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class SignInSettingTests : ApiManagementManagementTestBase { public SignInSettingTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignUpSettingTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignUpSettingTests.cs index 897be4f47ca8..67378dba5f72 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignUpSettingTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SignUpSettingTests.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.ApiManagement.Tests public class SignUpSettingTests : ApiManagementManagementTestBase { public SignUpSettingTests(bool isAsync) - : base(isAsync)//, RecordedTestMode.Record) + : base(isAsync) //, RecordedTestMode.Record) { } @@ -33,8 +33,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SubscriptionTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SubscriptionTests.cs index 3a50fd30afb6..36b821281be3 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SubscriptionTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Scenario/SubscriptionTests.cs @@ -35,8 +35,8 @@ private async Task SetCollectionsAsync() private async Task CreateApiServiceAsync() { await SetCollectionsAsync(); - var apiName = Recording.GenerateAssetName("testapi-"); - var data = new ApiManagementServiceData(AzureLocation.EastUS, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Developer, 1), "Sample@Sample.com", "sample") + var apiName = Recording.GenerateAssetName("sdktestapimv2-"); + var data = new ApiManagementServiceData(AzureLocation.WestUS2, new ApiManagementServiceSkuProperties(ApiManagementServiceSkuType.Standard, 1), "Sample@Sample.com", "sample") { Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.SystemAssigned) }; @@ -53,7 +53,7 @@ public async Task CRUD() var listResponse = await collection.GetAllAsync().ToEnumerableAsync(); Assert.NotNull(listResponse); - Assert.GreaterOrEqual(listResponse.Count, 3); + Assert.AreEqual(3, listResponse.Count); // get first subscription var firstSubscription = listResponse.FirstOrDefault(); diff --git a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Unit/ArmApiManagementModelFactoryTests.cs b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Unit/ArmApiManagementModelFactoryTests.cs index 639969f2ec30..70ac2a9a4035 100644 --- a/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Unit/ArmApiManagementModelFactoryTests.cs +++ b/sdk/apimanagement/Azure.ResourceManager.ApiManagement/tests/Unit/ArmApiManagementModelFactoryTests.cs @@ -5,7 +5,7 @@ using Azure.ResourceManager.ApiManagement.Models; using NUnit.Framework; -namespace Azure.ResourceManager.ApiManagement.Tests.Scenario +namespace Azure.ResourceManager.ApiManagement.Tests { public class ArmApiManagementModelFactoryTests { diff --git a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportEvidenceResource.Serialization.cs b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportEvidenceResource.Serialization.cs index fae3a6648ce2..beb1830c9d13 100644 --- a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportEvidenceResource.Serialization.cs +++ b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportEvidenceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppComplianceAutomation { public partial class AppComplianceReportEvidenceResource : IJsonModel { + private static AppComplianceReportEvidenceData s_dataDeserializationInstance; + private static AppComplianceReportEvidenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppComplianceReportEvidenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppComplianceReportEvidenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppComplianceAutomationContext.Default); AppComplianceReportEvidenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppComplianceAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportResource.Serialization.cs b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportResource.Serialization.cs index 05c3b3e92b3a..42331a936250 100644 --- a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportResource.Serialization.cs +++ b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppComplianceAutomation { public partial class AppComplianceReportResource : IJsonModel { + private static AppComplianceReportData s_dataDeserializationInstance; + private static AppComplianceReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppComplianceReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppComplianceReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppComplianceAutomationContext.Default); AppComplianceReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppComplianceAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportScopingConfigurationResource.Serialization.cs b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportScopingConfigurationResource.Serialization.cs index fa6415e465e8..6b1785e0e680 100644 --- a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportScopingConfigurationResource.Serialization.cs +++ b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportScopingConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppComplianceAutomation { public partial class AppComplianceReportScopingConfigurationResource : IJsonModel { + private static AppComplianceReportScopingConfigurationData s_dataDeserializationInstance; + private static AppComplianceReportScopingConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppComplianceReportScopingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppComplianceReportScopingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppComplianceAutomationContext.Default); AppComplianceReportScopingConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppComplianceAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportSnapshotResource.Serialization.cs b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportSnapshotResource.Serialization.cs index 84d8d0857ca2..b2d1a6edbc1f 100644 --- a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportSnapshotResource.Serialization.cs +++ b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppComplianceAutomation { public partial class AppComplianceReportSnapshotResource : IJsonModel { + private static AppComplianceReportSnapshotData s_dataDeserializationInstance; + private static AppComplianceReportSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppComplianceReportSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppComplianceReportSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppComplianceAutomationContext.Default); AppComplianceReportSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppComplianceAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportWebhookResource.Serialization.cs b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportWebhookResource.Serialization.cs index 10d58f01dbe5..13b5c514fbb4 100644 --- a/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportWebhookResource.Serialization.cs +++ b/sdk/appcomplianceautomation/Azure.ResourceManager.AppComplianceAutomation/src/Generated/AppComplianceReportWebhookResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppComplianceAutomation { public partial class AppComplianceReportWebhookResource : IJsonModel { + private static AppComplianceReportWebhookData s_dataDeserializationInstance; + private static AppComplianceReportWebhookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppComplianceReportWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppComplianceReportWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppComplianceAutomationContext.Default); AppComplianceReportWebhookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppComplianceAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationKeyValueResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationKeyValueResource.Serialization.cs index 30b7ae133408..e3f52bc56ca3 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationKeyValueResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationKeyValueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationKeyValueResource : IJsonModel { + private static AppConfigurationKeyValueData s_dataDeserializationInstance; + private static AppConfigurationKeyValueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationKeyValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationKeyValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationKeyValueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnectionResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnectionResource.Serialization.cs index 7336bcf09852..c61b148634fa 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationPrivateEndpointConnectionResource : IJsonModel { + private static AppConfigurationPrivateEndpointConnectionData s_dataDeserializationInstance; + private static AppConfigurationPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateLinkResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateLinkResource.Serialization.cs index 77bf1d232eb0..4e34698964c7 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateLinkResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationPrivateLinkResource : IJsonModel { + private static AppConfigurationPrivateLinkResourceData s_dataDeserializationInstance; + private static AppConfigurationPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationReplicaResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationReplicaResource.Serialization.cs index 2b4b74dfb935..ab7bead1e37b 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationReplicaResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationReplicaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationReplicaResource : IJsonModel { + private static AppConfigurationReplicaData s_dataDeserializationInstance; + private static AppConfigurationReplicaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationReplicaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationReplicaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationReplicaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationSnapshotResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationSnapshotResource.Serialization.cs index 5554cafe9f9f..711deb4e453f 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationSnapshotResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationSnapshotResource : IJsonModel { + private static AppConfigurationSnapshotData s_dataDeserializationInstance; + private static AppConfigurationSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationStoreResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationStoreResource.Serialization.cs index d28ac4dab620..2c57615a27f0 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationStoreResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationStoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class AppConfigurationStoreResource : IJsonModel { + private static AppConfigurationStoreData s_dataDeserializationInstance; + private static AppConfigurationStoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppConfigurationStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppConfigurationStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); AppConfigurationStoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/DeletedAppConfigurationStoreResource.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/DeletedAppConfigurationStoreResource.Serialization.cs index ab096d54f7f3..0b55562994ba 100644 --- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/DeletedAppConfigurationStoreResource.Serialization.cs +++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/DeletedAppConfigurationStoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppConfiguration { public partial class DeletedAppConfigurationStoreResource : IJsonModel { + private static DeletedAppConfigurationStoreData s_dataDeserializationInstance; + private static DeletedAppConfigurationStoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedAppConfigurationStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedAppConfigurationStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppConfigurationContext.Default); DeletedAppConfigurationStoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsComponentResource.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsComponentResource.Serialization.cs index ee2f2ff19e82..48eb984ba276 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsComponentResource.Serialization.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsComponentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApplicationInsights { public partial class ApplicationInsightsComponentResource : IJsonModel { + private static ApplicationInsightsComponentData s_dataDeserializationInstance; + private static ApplicationInsightsComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationInsightsComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationInsightsComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApplicationInsightsContext.Default); ApplicationInsightsComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApplicationInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWebTestResource.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWebTestResource.Serialization.cs index cb09e0f99eb1..8223fadda88d 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWebTestResource.Serialization.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWebTestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApplicationInsights { public partial class ApplicationInsightsWebTestResource : IJsonModel { + private static ApplicationInsightsWebTestData s_dataDeserializationInstance; + private static ApplicationInsightsWebTestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationInsightsWebTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationInsightsWebTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApplicationInsightsContext.Default); ApplicationInsightsWebTestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApplicationInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookResource.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookResource.Serialization.cs index 0e5e34b0537e..3c61d36d135a 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookResource.Serialization.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApplicationInsights { public partial class ApplicationInsightsWorkbookResource : IJsonModel { + private static ApplicationInsightsWorkbookData s_dataDeserializationInstance; + private static ApplicationInsightsWorkbookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationInsightsWorkbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationInsightsWorkbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApplicationInsightsContext.Default); ApplicationInsightsWorkbookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApplicationInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookRevisionResource.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookRevisionResource.Serialization.cs index 87e810f9051d..aca7598647f1 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookRevisionResource.Serialization.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookRevisionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApplicationInsights { public partial class ApplicationInsightsWorkbookRevisionResource : IJsonModel { + private static ApplicationInsightsWorkbookData s_dataDeserializationInstance; + private static ApplicationInsightsWorkbookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationInsightsWorkbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationInsightsWorkbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApplicationInsightsContext.Default); ApplicationInsightsWorkbookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApplicationInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplateResource.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplateResource.Serialization.cs index 6a021ebaadbb..e9a98e162dda 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplateResource.Serialization.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ApplicationInsightsWorkbookTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ApplicationInsights { public partial class ApplicationInsightsWorkbookTemplateResource : IJsonModel { + private static ApplicationInsightsWorkbookTemplateData s_dataDeserializationInstance; + private static ApplicationInsightsWorkbookTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationInsightsWorkbookTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationInsightsWorkbookTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerApplicationInsightsContext.Default); ApplicationInsightsWorkbookTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerApplicationInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalCustomDomainResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalCustomDomainResource.Serialization.cs index ce1cbd4a5dd3..38d5aaf2b09e 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalCustomDomainResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformApiPortalCustomDomainResource : IJsonModel { + private static AppPlatformApiPortalCustomDomainData s_dataDeserializationInstance; + private static AppPlatformApiPortalCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformApiPortalCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformApiPortalCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformApiPortalCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalResource.Serialization.cs index 3825f5270d91..497cadb150a2 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformApiPortalResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformApiPortalResource : IJsonModel { + private static AppPlatformApiPortalData s_dataDeserializationInstance; + private static AppPlatformApiPortalData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformApiPortalData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformApiPortalData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformApiPortalData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.Serialization.cs index 947d66ad7449..e81ec11c5216 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformAppResource : IJsonModel { + private static AppPlatformAppData s_dataDeserializationInstance; + private static AppPlatformAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBindingResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBindingResource.Serialization.cs index 25940af2b426..3b5f7653673a 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBindingResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBindingResource : IJsonModel { + private static AppPlatformBindingData s_dataDeserializationInstance; + private static AppPlatformBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.Serialization.cs index df13e96fae99..0a59dcd6b63d 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuildResource : IJsonModel { + private static AppPlatformBuildData s_dataDeserializationInstance; + private static AppPlatformBuildData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuildData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResultResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResultResource.Serialization.cs index f03b6010e588..766f1cb31a1c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResultResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuildResultResource : IJsonModel { + private static AppPlatformBuildResultData s_dataDeserializationInstance; + private static AppPlatformBuildResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuildResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuildResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuildResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceAgentPoolResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceAgentPoolResource.Serialization.cs index fff413cc0450..e1cba3d83206 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceAgentPoolResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceAgentPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuildServiceAgentPoolResource : IJsonModel { + private static AppPlatformBuildServiceAgentPoolData s_dataDeserializationInstance; + private static AppPlatformBuildServiceAgentPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuildServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuildServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuildServiceAgentPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.Serialization.cs index 288a9974247e..08cbcf417e2c 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuildServiceResource : IJsonModel { + private static AppPlatformBuildServiceData s_dataDeserializationInstance; + private static AppPlatformBuildServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuildServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuildServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuildServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuilderResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuilderResource.Serialization.cs index 81abdffccc65..9fda4b56e140 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuilderResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuilderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuilderResource : IJsonModel { + private static AppPlatformBuilderData s_dataDeserializationInstance; + private static AppPlatformBuilderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuilderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuilderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuilderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildpackBindingResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildpackBindingResource.Serialization.cs index 2e82f262a124..ed1e9bf7f57b 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildpackBindingResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformBuildpackBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformBuildpackBindingResource : IJsonModel { + private static AppPlatformBuildpackBindingData s_dataDeserializationInstance; + private static AppPlatformBuildpackBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformBuildpackBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformBuildpackBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformBuildpackBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCertificateResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCertificateResource.Serialization.cs index ca9bc444f4d4..8a30e415b215 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCertificateResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformCertificateResource : IJsonModel { + private static AppPlatformCertificateData s_dataDeserializationInstance; + private static AppPlatformCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigServerResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigServerResource.Serialization.cs index 6367d22ffd90..061cd4552055 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigServerResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformConfigServerResource : IJsonModel { + private static AppPlatformConfigServerData s_dataDeserializationInstance; + private static AppPlatformConfigServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformConfigServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformConfigServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformConfigServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigurationServiceResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigurationServiceResource.Serialization.cs index 9e56bca4a0a9..5520d6530399 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigurationServiceResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformConfigurationServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformConfigurationServiceResource : IJsonModel { + private static AppPlatformConfigurationServiceData s_dataDeserializationInstance; + private static AppPlatformConfigurationServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformConfigurationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformConfigurationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformConfigurationServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.Serialization.cs index 529d41c8ef75..bc968291d6b6 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformCustomDomainResource : IJsonModel { + private static AppPlatformCustomDomainData s_dataDeserializationInstance; + private static AppPlatformCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformDeploymentResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformDeploymentResource.Serialization.cs index 96007eb7ceec..eccb135998dc 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformDeploymentResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformDeploymentResource : IJsonModel { + private static AppPlatformDeploymentData s_dataDeserializationInstance; + private static AppPlatformDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayCustomDomainResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayCustomDomainResource.Serialization.cs index bdaa3b0f68f2..63cc8c00a1da 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayCustomDomainResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformGatewayCustomDomainResource : IJsonModel { + private static AppPlatformGatewayCustomDomainData s_dataDeserializationInstance; + private static AppPlatformGatewayCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformGatewayCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformGatewayCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformGatewayCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.Serialization.cs index 1d052c8b8991..1235f7338aaa 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformGatewayResource : IJsonModel { + private static AppPlatformGatewayData s_dataDeserializationInstance; + private static AppPlatformGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayRouteConfigResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayRouteConfigResource.Serialization.cs index 84a1625c4090..e5e3fd30ae36 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayRouteConfigResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformGatewayRouteConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformGatewayRouteConfigResource : IJsonModel { + private static AppPlatformGatewayRouteConfigData s_dataDeserializationInstance; + private static AppPlatformGatewayRouteConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformGatewayRouteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformGatewayRouteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformGatewayRouteConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformMonitoringSettingResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformMonitoringSettingResource.Serialization.cs index d57930fa0db3..d16bdcbfa568 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformMonitoringSettingResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformMonitoringSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformMonitoringSettingResource : IJsonModel { + private static AppPlatformMonitoringSettingData s_dataDeserializationInstance; + private static AppPlatformMonitoringSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformMonitoringSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformMonitoringSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformMonitoringSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceRegistryResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceRegistryResource.Serialization.cs index ee956bb36765..7d958a946886 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceRegistryResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceRegistryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformServiceRegistryResource : IJsonModel { + private static AppPlatformServiceRegistryData s_dataDeserializationInstance; + private static AppPlatformServiceRegistryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformServiceRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformServiceRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformServiceRegistryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.Serialization.cs index 9c24f3986e40..e7cceeb30463 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformServiceResource : IJsonModel { + private static AppPlatformServiceData s_dataDeserializationInstance; + private static AppPlatformServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformStorageResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformStorageResource.Serialization.cs index 809eba3c96cb..3f6ef5f234fa 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformStorageResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformStorageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformStorageResource : IJsonModel { + private static AppPlatformStorageData s_dataDeserializationInstance; + private static AppPlatformStorageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformStorageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedBuildpackResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedBuildpackResource.Serialization.cs index 0bd744ce197e..e27bc47c1ad0 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedBuildpackResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedBuildpackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformSupportedBuildpackResource : IJsonModel { + private static AppPlatformSupportedBuildpackData s_dataDeserializationInstance; + private static AppPlatformSupportedBuildpackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformSupportedBuildpackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformSupportedBuildpackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformSupportedBuildpackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedStackResource.Serialization.cs b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedStackResource.Serialization.cs index 13ea09bbffc3..ccfc335758b3 100644 --- a/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedStackResource.Serialization.cs +++ b/sdk/appplatform/Azure.ResourceManager.AppPlatform/src/Generated/AppPlatformSupportedStackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppPlatform { public partial class AppPlatformSupportedStackResource : IJsonModel { + private static AppPlatformSupportedStackData s_dataDeserializationInstance; + private static AppPlatformSupportedStackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppPlatformSupportedStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppPlatformSupportedStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppPlatformContext.Default); AppPlatformSupportedStackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppPlatformContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmAvailabilitySetResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmAvailabilitySetResource.Serialization.cs index 750d467208ab..33f3a45846ab 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmAvailabilitySetResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmAvailabilitySetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmAvailabilitySetResource : IJsonModel { + private static ScVmmAvailabilitySetData s_dataDeserializationInstance; + private static ScVmmAvailabilitySetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmAvailabilitySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmAvailabilitySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmAvailabilitySetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmCloudResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmCloudResource.Serialization.cs index a43e69b32857..c91edcfc9b00 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmCloudResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmCloudResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmCloudResource : IJsonModel { + private static ScVmmCloudData s_dataDeserializationInstance; + private static ScVmmCloudData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmCloudData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmCloudData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmCloudData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmGuestAgentResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmGuestAgentResource.Serialization.cs index 1c26605ed063..89cc2405dd4c 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmGuestAgentResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmGuestAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmGuestAgentResource : IJsonModel { + private static ScVmmGuestAgentData s_dataDeserializationInstance; + private static ScVmmGuestAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmGuestAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmGuestAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmGuestAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmHybridIdentityMetadataResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmHybridIdentityMetadataResource.Serialization.cs index 58640317ce6f..8926a68bab33 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmHybridIdentityMetadataResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmHybridIdentityMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmHybridIdentityMetadataResource : IJsonModel { + private static ScVmmHybridIdentityMetadataData s_dataDeserializationInstance; + private static ScVmmHybridIdentityMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmHybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmHybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmHybridIdentityMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmInventoryItemResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmInventoryItemResource.Serialization.cs index 191a8cfd1a5e..781bfe2d7f3e 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmInventoryItemResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmInventoryItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmInventoryItemResource : IJsonModel { + private static ScVmmInventoryItemData s_dataDeserializationInstance; + private static ScVmmInventoryItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmInventoryItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmInventoryItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmInventoryItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmServerResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmServerResource.Serialization.cs index be0e49b43f6b..99005dea38de 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmServerResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmServerResource : IJsonModel { + private static ScVmmServerData s_dataDeserializationInstance; + private static ScVmmServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineInstanceResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineInstanceResource.Serialization.cs index 709cc64ead6f..16dc9fe9cb7c 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineInstanceResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmVirtualMachineInstanceResource : IJsonModel { + private static ScVmmVirtualMachineInstanceData s_dataDeserializationInstance; + private static ScVmmVirtualMachineInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmVirtualMachineInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmVirtualMachineInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmVirtualMachineInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineTemplateResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineTemplateResource.Serialization.cs index 88d92b7524fd..34b402f86acd 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineTemplateResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualMachineTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmVirtualMachineTemplateResource : IJsonModel { + private static ScVmmVirtualMachineTemplateData s_dataDeserializationInstance; + private static ScVmmVirtualMachineTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmVirtualMachineTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmVirtualMachineTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmVirtualMachineTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualNetworkResource.Serialization.cs b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualNetworkResource.Serialization.cs index ac0c87d49ae6..25510afe6608 100644 --- a/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualNetworkResource.Serialization.cs +++ b/sdk/arc-scvmm/Azure.ResourceManager.ScVmm/src/Generated/ScVmmVirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ScVmm { public partial class ScVmmVirtualNetworkResource : IJsonModel { + private static ScVmmVirtualNetworkData s_dataDeserializationInstance; + private static ScVmmVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScVmmVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScVmmVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerScVmmContext.Default); ScVmmVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerScVmmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.Serialization.cs b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.Serialization.cs index 2262dbd35596..d8ebc0ab9a90 100644 --- a/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.Serialization.cs +++ b/sdk/arizeaiobservabilityeval/Azure.ResourceManager.ArizeAIObservabilityEval/src/Generated/ArizeAIObservabilityEvalOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ArizeAIObservabilityEval { public partial class ArizeAIObservabilityEvalOrganizationResource : IJsonModel { + private static ArizeAIObservabilityEvalOrganizationData s_dataDeserializationInstance; + private static ArizeAIObservabilityEvalOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArizeAIObservabilityEvalOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArizeAIObservabilityEvalOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerArizeAIObservabilityEvalContext.Default); ArizeAIObservabilityEvalOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerArizeAIObservabilityEvalContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/astronomer/Azure.ResourceManager.Astro/src/Generated/AstroOrganizationResource.Serialization.cs b/sdk/astronomer/Azure.ResourceManager.Astro/src/Generated/AstroOrganizationResource.Serialization.cs index f41b5e319a0a..db90eea3d455 100644 --- a/sdk/astronomer/Azure.ResourceManager.Astro/src/Generated/AstroOrganizationResource.Serialization.cs +++ b/sdk/astronomer/Azure.ResourceManager.Astro/src/Generated/AstroOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Astro { public partial class AstroOrganizationResource : IJsonModel { + private static AstroOrganizationData s_dataDeserializationInstance; + private static AstroOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AstroOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AstroOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAstroContext.Default); AstroOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAstroContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationPrivateEndpointConnectionResource.Serialization.cs b/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationPrivateEndpointConnectionResource.Serialization.cs index 650d40ce23ee..cb47ad2970dc 100644 --- a/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Attestation { public partial class AttestationPrivateEndpointConnectionResource : IJsonModel { + private static AttestationPrivateEndpointConnectionData s_dataDeserializationInstance; + private static AttestationPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AttestationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AttestationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAttestationContext.Default); AttestationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAttestationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationProviderResource.Serialization.cs b/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationProviderResource.Serialization.cs index fcd738a0769e..549c36dfd8e4 100644 --- a/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationProviderResource.Serialization.cs +++ b/sdk/attestation/Azure.ResourceManager.Attestation/src/Generated/AttestationProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Attestation { public partial class AttestationProviderResource : IJsonModel { + private static AttestationProviderData s_dataDeserializationInstance; + private static AttestationProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AttestationProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AttestationProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAttestationContext.Default); AttestationProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAttestationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationProviderOperationsMetadataResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationProviderOperationsMetadataResource.Serialization.cs index c1199173d7be..c15a95e3b43f 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationProviderOperationsMetadataResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationProviderOperationsMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class AuthorizationProviderOperationsMetadataResource : IJsonModel { + private static AuthorizationProviderOperationsMetadataData s_dataDeserializationInstance; + private static AuthorizationProviderOperationsMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationProviderOperationsMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationProviderOperationsMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); AuthorizationProviderOperationsMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionResource.Serialization.cs index 33a63b934d31..166afff59547 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/AuthorizationRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class AuthorizationRoleDefinitionResource : IJsonModel { + private static AuthorizationRoleDefinitionData s_dataDeserializationInstance; + private static AuthorizationRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); AuthorizationRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentResource.Serialization.cs index 89cb96c4a349..e7df3b319259 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/DenyAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class DenyAssignmentResource : IJsonModel { + private static DenyAssignmentData s_dataDeserializationInstance; + private static DenyAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DenyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DenyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); DenyAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentResource.Serialization.cs index 7c8944366e43..158dc08f3498 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleAssignmentResource : IJsonModel { + private static RoleAssignmentData s_dataDeserializationInstance; + private static RoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleInstanceResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleInstanceResource.Serialization.cs index f8b6f5f28a2f..82fb0019cf18 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleInstanceResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleAssignmentScheduleInstanceResource : IJsonModel { + private static RoleAssignmentScheduleInstanceData s_dataDeserializationInstance; + private static RoleAssignmentScheduleInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleAssignmentScheduleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleAssignmentScheduleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleAssignmentScheduleInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleRequestResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleRequestResource.Serialization.cs index 150e0b463642..b0e2f3889555 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleRequestResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleAssignmentScheduleRequestResource : IJsonModel { + private static RoleAssignmentScheduleRequestData s_dataDeserializationInstance; + private static RoleAssignmentScheduleRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleAssignmentScheduleRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleAssignmentScheduleRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleAssignmentScheduleRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleResource.Serialization.cs index ce2094694368..956380c84737 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleAssignmentScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleAssignmentScheduleResource : IJsonModel { + private static RoleAssignmentScheduleData s_dataDeserializationInstance; + private static RoleAssignmentScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleAssignmentScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleAssignmentScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleAssignmentScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleInstanceResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleInstanceResource.Serialization.cs index 7e95c61f13a5..1009274b9ccb 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleInstanceResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleEligibilityScheduleInstanceResource : IJsonModel { + private static RoleEligibilityScheduleInstanceData s_dataDeserializationInstance; + private static RoleEligibilityScheduleInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleEligibilityScheduleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleEligibilityScheduleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleEligibilityScheduleInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleRequestResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleRequestResource.Serialization.cs index cf25d402b1e6..2ed9dc9067b7 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleRequestResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleEligibilityScheduleRequestResource : IJsonModel { + private static RoleEligibilityScheduleRequestData s_dataDeserializationInstance; + private static RoleEligibilityScheduleRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleEligibilityScheduleRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleEligibilityScheduleRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleEligibilityScheduleRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleResource.Serialization.cs index 522f7793b0db..106cf08b1816 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleEligibilityScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleEligibilityScheduleResource : IJsonModel { + private static RoleEligibilityScheduleData s_dataDeserializationInstance; + private static RoleEligibilityScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleEligibilityScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleEligibilityScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleEligibilityScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyAssignmentResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyAssignmentResource.Serialization.cs index 528c119ab164..64e79dc39065 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyAssignmentResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleManagementPolicyAssignmentResource : IJsonModel { + private static RoleManagementPolicyAssignmentData s_dataDeserializationInstance; + private static RoleManagementPolicyAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleManagementPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleManagementPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleManagementPolicyAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyResource.Serialization.cs b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyResource.Serialization.cs index 4fcfce033bb1..6b2a760338b1 100644 --- a/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyResource.Serialization.cs +++ b/sdk/authorization/Azure.ResourceManager.Authorization/src/Generated/RoleManagementPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Authorization { public partial class RoleManagementPolicyResource : IJsonModel { + private static RoleManagementPolicyData s_dataDeserializationInstance; + private static RoleManagementPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleManagementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleManagementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAuthorizationContext.Default); RoleManagementPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAuthorizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageBestPracticeResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageBestPracticeResource.Serialization.cs index d3691845df39..acb9214a4a52 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageBestPracticeResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageBestPracticeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageBestPracticeResource : IJsonModel { + private static AutomanageBestPracticeData s_dataDeserializationInstance; + private static AutomanageBestPracticeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageBestPracticeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageBestPracticeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageBestPracticeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileResource.Serialization.cs index b2b055a7ae1b..82426eb6a029 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageConfigurationProfileResource : IJsonModel { + private static AutomanageConfigurationProfileData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileVersionResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileVersionResource.Serialization.cs index ebad3478e2b6..6227122601be 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileVersionResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageConfigurationProfileVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageConfigurationProfileVersionResource : IJsonModel { + private static AutomanageConfigurationProfileData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentReportResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentReportResource.Serialization.cs index 54089af88fc9..7b137b3cd990 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentReportResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentReportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageHciClusterConfigurationProfileAssignmentReportResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentReportData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentResource.Serialization.cs index 6c0a380bea9d..d29f218159df 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHciClusterConfigurationProfileAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageHciClusterConfigurationProfileAssignmentResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentReportResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentReportResource.Serialization.cs index 1b990c837310..3226453752f3 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentReportResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentReportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageHcrpConfigurationProfileAssignmentReportResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentReportData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentResource.Serialization.cs index b2b4bf3aac3a..a09f5ffe94c2 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageHcrpConfigurationProfileAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageHcrpConfigurationProfileAssignmentResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentReportResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentReportResource.Serialization.cs index 7e415d9c25d2..f3794c9306d3 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentReportResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentReportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageVmConfigurationProfileAssignmentReportResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentReportData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentResource.Serialization.cs b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentResource.Serialization.cs index 085e5bf3fc41..02d2eccfde4f 100644 --- a/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentResource.Serialization.cs +++ b/sdk/automanage/Azure.ResourceManager.Automanage/src/Generated/AutomanageVmConfigurationProfileAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automanage { public partial class AutomanageVmConfigurationProfileAssignmentResource : IJsonModel { + private static AutomanageConfigurationProfileAssignmentData s_dataDeserializationInstance; + private static AutomanageConfigurationProfileAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomanageConfigurationProfileAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomanageContext.Default); AutomanageConfigurationProfileAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomanageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountModuleResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountModuleResource.Serialization.cs index 75c0cc8269f2..fd7746c6ffc4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountModuleResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountModuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationAccountModuleResource : IJsonModel { + private static AutomationModuleData s_dataDeserializationInstance; + private static AutomationModuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationModuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationModuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationModuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.Serialization.cs index bd7c78044854..3dddcdfb95be 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationAccountPython2PackageResource : IJsonModel { + private static AutomationModuleData s_dataDeserializationInstance; + private static AutomationModuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationModuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationModuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationModuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.Serialization.cs index e30547d28a24..1c3823135dbc 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationAccountResource : IJsonModel { + private static AutomationAccountData s_dataDeserializationInstance; + private static AutomationAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCertificateResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCertificateResource.Serialization.cs index 02ca65c15f22..71b806b42308 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCertificateResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationCertificateResource : IJsonModel { + private static AutomationCertificateData s_dataDeserializationInstance; + private static AutomationCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionResource.Serialization.cs index c09542c82f83..37902b1e1073 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationConnectionResource : IJsonModel { + private static AutomationConnectionData s_dataDeserializationInstance; + private static AutomationConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionTypeResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionTypeResource.Serialization.cs index 8e7fdae3fdc5..6b0a51d1a2d2 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionTypeResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationConnectionTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationConnectionTypeResource : IJsonModel { + private static AutomationConnectionTypeData s_dataDeserializationInstance; + private static AutomationConnectionTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationConnectionTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationConnectionTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationConnectionTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCredentialResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCredentialResource.Serialization.cs index 2b5ab9619a0c..cbef6fe8c33f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCredentialResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationCredentialResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationCredentialResource : IJsonModel { + private static AutomationCredentialData s_dataDeserializationInstance; + private static AutomationCredentialData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationCredentialData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobResource.Serialization.cs index 50d62735cc96..83a99f2eb5ce 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationJobResource : IJsonModel { + private static AutomationJobData s_dataDeserializationInstance; + private static AutomationJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobScheduleResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobScheduleResource.Serialization.cs index 3f47374f3b4b..9fb4a1fc8dfe 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobScheduleResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationJobScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationJobScheduleResource : IJsonModel { + private static AutomationJobScheduleData s_dataDeserializationInstance; + private static AutomationJobScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationJobScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationJobScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationJobScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationPrivateEndpointConnectionResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationPrivateEndpointConnectionResource.Serialization.cs index 7e400b519dab..3052a1c1c60c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationPrivateEndpointConnectionResource : IJsonModel { + private static AutomationPrivateEndpointConnectionData s_dataDeserializationInstance; + private static AutomationPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookResource.Serialization.cs index be5094c0c939..81e487a4d3c1 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationRunbookResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationRunbookResource : IJsonModel { + private static AutomationRunbookData s_dataDeserializationInstance; + private static AutomationRunbookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationRunbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationRunbookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationRunbookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationScheduleResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationScheduleResource.Serialization.cs index dec91c2ce0e6..47eb5bdad42a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationScheduleResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationScheduleResource : IJsonModel { + private static AutomationScheduleData s_dataDeserializationInstance; + private static AutomationScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationSourceControlResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationSourceControlResource.Serialization.cs index ea467076867a..b9069c292e42 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationSourceControlResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationSourceControlResource : IJsonModel { + private static AutomationSourceControlData s_dataDeserializationInstance; + private static AutomationSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationVariableResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationVariableResource.Serialization.cs index 1cc5efa45107..4e49603fd855 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationVariableResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationVariableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationVariableResource : IJsonModel { + private static AutomationVariableData s_dataDeserializationInstance; + private static AutomationVariableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationVariableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationVariableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationVariableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWatcherResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWatcherResource.Serialization.cs index 009e2701b675..f5079c6c4ecb 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWatcherResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWatcherResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationWatcherResource : IJsonModel { + private static AutomationWatcherData s_dataDeserializationInstance; + private static AutomationWatcherData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationWatcherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWebhookResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWebhookResource.Serialization.cs index c540e9f91c96..5634453b9290 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWebhookResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationWebhookResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class AutomationWebhookResource : IJsonModel { + private static AutomationWebhookData s_dataDeserializationInstance; + private static AutomationWebhookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutomationWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutomationWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); AutomationWebhookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscCompilationJobResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscCompilationJobResource.Serialization.cs index 73d704f8d739..67df15c031b2 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscCompilationJobResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscCompilationJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class DscCompilationJobResource : IJsonModel { + private static DscCompilationJobData s_dataDeserializationInstance; + private static DscCompilationJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DscCompilationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DscCompilationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); DscCompilationJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscConfigurationResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscConfigurationResource.Serialization.cs index 3798f381de2d..7eaea3902e63 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscConfigurationResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class DscConfigurationResource : IJsonModel { + private static DscConfigurationData s_dataDeserializationInstance; + private static DscConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DscConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DscConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); DscConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeConfigurationResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeConfigurationResource.Serialization.cs index d0c647a9ad7a..7c986a334d9e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeConfigurationResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class DscNodeConfigurationResource : IJsonModel { + private static DscNodeConfigurationData s_dataDeserializationInstance; + private static DscNodeConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DscNodeConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DscNodeConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); DscNodeConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeResource.Serialization.cs index 8448f76b5d94..0afe2166c7bb 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/DscNodeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class DscNodeResource : IJsonModel { + private static DscNodeData s_dataDeserializationInstance; + private static DscNodeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DscNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DscNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); DscNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupResource.Serialization.cs index 0628109cdf00..3a726b45ad05 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class HybridRunbookWorkerGroupResource : IJsonModel { + private static HybridRunbookWorkerGroupData s_dataDeserializationInstance; + private static HybridRunbookWorkerGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridRunbookWorkerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridRunbookWorkerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); HybridRunbookWorkerGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.Serialization.cs index dda6607f0ea5..2e88d9a8039c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/HybridRunbookWorkerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class HybridRunbookWorkerResource : IJsonModel { + private static HybridRunbookWorkerData s_dataDeserializationInstance; + private static HybridRunbookWorkerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridRunbookWorkerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridRunbookWorkerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); HybridRunbookWorkerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/SoftwareUpdateConfigurationResource.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/SoftwareUpdateConfigurationResource.Serialization.cs index 66a6d166c315..9c9aab2f5720 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/SoftwareUpdateConfigurationResource.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/SoftwareUpdateConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Automation { public partial class SoftwareUpdateConfigurationResource : IJsonModel { + private static SoftwareUpdateConfigurationData s_dataDeserializationInstance; + private static SoftwareUpdateConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SoftwareUpdateConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SoftwareUpdateConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAutomationContext.Default); SoftwareUpdateConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAutomationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.Serialization.cs index e6db8a43d4ab..733b0186dec1 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsCloudLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsCloudLinkResource : IJsonModel { + private static AvsCloudLinkData s_dataDeserializationInstance; + private static AvsCloudLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsCloudLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsCloudLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsCloudLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.Serialization.cs index e2bece44d242..9aa25051e556 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudAddonResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsPrivateCloudAddonResource : IJsonModel { + private static AvsPrivateCloudAddonData s_dataDeserializationInstance; + private static AvsPrivateCloudAddonData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsPrivateCloudAddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsPrivateCloudAddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsPrivateCloudAddonData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.Serialization.cs index 1fa459c89608..2e177a119b66 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsPrivateCloudClusterResource : IJsonModel { + private static AvsPrivateCloudClusterData s_dataDeserializationInstance; + private static AvsPrivateCloudClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsPrivateCloudClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsPrivateCloudClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsPrivateCloudClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.Serialization.cs index 0518ae65a666..a9487761ff6e 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudClusterVirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsPrivateCloudClusterVirtualMachineResource : IJsonModel { + private static AvsPrivateCloudClusterVirtualMachineData s_dataDeserializationInstance; + private static AvsPrivateCloudClusterVirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsPrivateCloudClusterVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsPrivateCloudClusterVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsPrivateCloudClusterVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.Serialization.cs index 5bb360a905a8..c3676e5ba3a4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudDatastoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsPrivateCloudDatastoreResource : IJsonModel { + private static AvsPrivateCloudDatastoreData s_dataDeserializationInstance; + private static AvsPrivateCloudDatastoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsPrivateCloudDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsPrivateCloudDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsPrivateCloudDatastoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.Serialization.cs index b04c99cf5581..f130a2cb1463 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/AvsPrivateCloudResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class AvsPrivateCloudResource : IJsonModel { + private static AvsPrivateCloudData s_dataDeserializationInstance; + private static AvsPrivateCloudData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvsPrivateCloudData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvsPrivateCloudData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); AvsPrivateCloudData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.Serialization.cs index 57ed33923f03..c0c5b75823dc 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ExpressRouteAuthorizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class ExpressRouteAuthorizationResource : IJsonModel { + private static ExpressRouteAuthorizationData s_dataDeserializationInstance; + private static ExpressRouteAuthorizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); ExpressRouteAuthorizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.Serialization.cs index cbdcd995b6e2..6a063f11245f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/GlobalReachConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class GlobalReachConnectionResource : IJsonModel { + private static GlobalReachConnectionData s_dataDeserializationInstance; + private static GlobalReachConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GlobalReachConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GlobalReachConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); GlobalReachConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.Serialization.cs index 49f7bb9c98dd..a89bffc115da 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/HcxEnterpriseSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class HcxEnterpriseSiteResource : IJsonModel { + private static HcxEnterpriseSiteData s_dataDeserializationInstance; + private static HcxEnterpriseSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HcxEnterpriseSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HcxEnterpriseSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); HcxEnterpriseSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs index ab82f7362851..5e63601acc51 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/IscsiPathResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class IscsiPathResource : IJsonModel { + private static IscsiPathData s_dataDeserializationInstance; + private static IscsiPathData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IscsiPathData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IscsiPathData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); IscsiPathData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.Serialization.cs index 5805bdbbcde6..2a7dbd7c44a4 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/PlacementPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class PlacementPolicyResource : IJsonModel { + private static PlacementPolicyData s_dataDeserializationInstance; + private static PlacementPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PlacementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PlacementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); PlacementPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.Serialization.cs index 345fc443be7a..30024dcfc9b9 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptCmdletResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class ScriptCmdletResource : IJsonModel { + private static ScriptCmdletData s_dataDeserializationInstance; + private static ScriptCmdletData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScriptCmdletData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScriptCmdletData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); ScriptCmdletData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.Serialization.cs index 3b206df60209..cc1d6cbfeddd 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptExecutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class ScriptExecutionResource : IJsonModel { + private static ScriptExecutionData s_dataDeserializationInstance; + private static ScriptExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScriptExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScriptExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); ScriptExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.Serialization.cs index cceb7b230bf3..d6674226d21a 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/ScriptPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class ScriptPackageResource : IJsonModel { + private static ScriptPackageData s_dataDeserializationInstance; + private static ScriptPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScriptPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScriptPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); ScriptPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.Serialization.cs index 2df706075048..ea6c7922a77b 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDhcpResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkDhcpResource : IJsonModel { + private static WorkloadNetworkDhcpData s_dataDeserializationInstance; + private static WorkloadNetworkDhcpData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkDhcpData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkDhcpData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkDhcpData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.Serialization.cs index af6d13b95ba2..36bbf6deba4d 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkDnsServiceResource : IJsonModel { + private static WorkloadNetworkDnsServiceData s_dataDeserializationInstance; + private static WorkloadNetworkDnsServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkDnsServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkDnsServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkDnsServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.Serialization.cs index 24521ab5219f..f5a72050566f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkDnsZoneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkDnsZoneResource : IJsonModel { + private static WorkloadNetworkDnsZoneData s_dataDeserializationInstance; + private static WorkloadNetworkDnsZoneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkDnsZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkDnsZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkDnsZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.Serialization.cs index 9aa44af68471..7630070fb88f 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkGatewayResource : IJsonModel { + private static WorkloadNetworkGatewayData s_dataDeserializationInstance; + private static WorkloadNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.Serialization.cs index 0fa367a8db43..d3b111efa058 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPortMirroringProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkPortMirroringProfileResource : IJsonModel { + private static WorkloadNetworkPortMirroringProfileData s_dataDeserializationInstance; + private static WorkloadNetworkPortMirroringProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkPortMirroringProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkPortMirroringProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkPortMirroringProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.Serialization.cs index 80c7e33bd2fa..0ab9975b708c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkPublicIPResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkPublicIPResource : IJsonModel { + private static WorkloadNetworkPublicIPData s_dataDeserializationInstance; + private static WorkloadNetworkPublicIPData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkPublicIPData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkPublicIPData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkPublicIPData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.Serialization.cs index 1af7e6d427a8..7d7a4bba64d7 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkResource : IJsonModel { + private static WorkloadNetworkData s_dataDeserializationInstance; + private static WorkloadNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.Serialization.cs index 1f20860b01fc..52a50a639fcd 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkSegmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkSegmentResource : IJsonModel { + private static WorkloadNetworkSegmentData s_dataDeserializationInstance; + private static WorkloadNetworkSegmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkSegmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkSegmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkSegmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.Serialization.cs index 44cd0d9de0a0..8f4ad44ebaee 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkVirtualMachineResource : IJsonModel { + private static WorkloadNetworkVirtualMachineData s_dataDeserializationInstance; + private static WorkloadNetworkVirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.Serialization.cs b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.Serialization.cs index 242a4eeb2374..a8ef7cf94b2c 100644 --- a/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.Serialization.cs +++ b/sdk/avs/Azure.ResourceManager.Avs/src/Generated/WorkloadNetworkVmGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Avs { public partial class WorkloadNetworkVmGroupResource : IJsonModel { + private static WorkloadNetworkVmGroupData s_dataDeserializationInstance; + private static WorkloadNetworkVmGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadNetworkVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadNetworkVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAvsContext.Default); WorkloadNetworkVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAvsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeInstanceResource.Serialization.cs b/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeInstanceResource.Serialization.cs index a0daee822961..86a19d972e63 100644 --- a/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeInstanceResource.Serialization.cs +++ b/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LargeInstance { public partial class LargeInstanceResource : IJsonModel { + private static LargeInstanceData s_dataDeserializationInstance; + private static LargeInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LargeInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LargeInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLargeInstanceContext.Default); LargeInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLargeInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeStorageInstanceResource.Serialization.cs b/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeStorageInstanceResource.Serialization.cs index 6f14b5294ba2..c91f6fbae75b 100644 --- a/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeStorageInstanceResource.Serialization.cs +++ b/sdk/azurelargeinstance/Azure.ResourceManager.LargeInstance/src/Generated/LargeStorageInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LargeInstance { public partial class LargeStorageInstanceResource : IJsonModel { + private static LargeStorageInstanceData s_dataDeserializationInstance; + private static LargeStorageInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LargeStorageInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LargeStorageInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLargeInstanceContext.Default); LargeStorageInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLargeInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcExtensionResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcExtensionResource.Serialization.cs index c632e720b826..d49b0641ac7a 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcExtensionResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class ArcExtensionResource : IJsonModel { + private static ArcExtensionData s_dataDeserializationInstance; + private static ArcExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArcExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArcExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); ArcExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcSettingResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcSettingResource.Serialization.cs index 5a71364f44c4..8ef8e05996a2 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcSettingResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/ArcSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class ArcSettingResource : IJsonModel { + private static ArcSettingData s_dataDeserializationInstance; + private static ArcSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArcSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArcSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); ArcSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterDeploymentSettingResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterDeploymentSettingResource.Serialization.cs index 7f9db72262f5..54767525dacd 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterDeploymentSettingResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterDeploymentSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterDeploymentSettingResource : IJsonModel { + private static HciClusterDeploymentSettingData s_dataDeserializationInstance; + private static HciClusterDeploymentSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterDeploymentSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterDeploymentSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterDeploymentSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterOfferResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterOfferResource.Serialization.cs index 968f93dede24..3b4a4802c4ce 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterOfferResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterOfferResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterOfferResource : IJsonModel { + private static HciClusterOfferData s_dataDeserializationInstance; + private static HciClusterOfferData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterOfferData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterOfferData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterOfferData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterPublisherResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterPublisherResource.Serialization.cs index 6de3e3593b7d..13145f4b72a7 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterPublisherResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterPublisherResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterPublisherResource : IJsonModel { + private static HciClusterPublisherData s_dataDeserializationInstance; + private static HciClusterPublisherData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterPublisherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterPublisherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterPublisherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterResource.Serialization.cs index d6eeade6565a..ed0cf137d3db 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterResource : IJsonModel { + private static HciClusterData s_dataDeserializationInstance; + private static HciClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterSecuritySettingResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterSecuritySettingResource.Serialization.cs index 5e416b628207..f641d5dcf3a8 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterSecuritySettingResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterSecuritySettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterSecuritySettingResource : IJsonModel { + private static HciClusterSecuritySettingData s_dataDeserializationInstance; + private static HciClusterSecuritySettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterSecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterSecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterSecuritySettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateResource.Serialization.cs index 91c73695c72d..d232f55d1c55 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterUpdateResource : IJsonModel { + private static HciClusterUpdateData s_dataDeserializationInstance; + private static HciClusterUpdateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterUpdateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterUpdateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterUpdateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateRunResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateRunResource.Serialization.cs index 7138b3cd01f7..cc299ca611eb 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateRunResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterUpdateRunResource : IJsonModel { + private static HciClusterUpdateRunData s_dataDeserializationInstance; + private static HciClusterUpdateRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterUpdateRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterUpdateRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterUpdateRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateSummaryResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateSummaryResource.Serialization.cs index 6b64a77ba3dc..7e4818282c77 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateSummaryResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciClusterUpdateSummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciClusterUpdateSummaryResource : IJsonModel { + private static HciClusterUpdateSummaryData s_dataDeserializationInstance; + private static HciClusterUpdateSummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciClusterUpdateSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciClusterUpdateSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciClusterUpdateSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciEdgeDeviceResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciEdgeDeviceResource.Serialization.cs index bc71b4d968bb..9f8d06efc52c 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciEdgeDeviceResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciEdgeDeviceResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.Hci.Models; namespace Azure.ResourceManager.Hci { public partial class HciEdgeDeviceResource : IJsonModel { + private static UnknownEdgeDevice s_dataDeserializationInstance; + private static UnknownEdgeDevice DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciEdgeDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciEdgeDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciEdgeDeviceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciSkuResource.Serialization.cs b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciSkuResource.Serialization.cs index e18fd410a2a6..68389092b742 100644 --- a/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciSkuResource.Serialization.cs +++ b/sdk/azurestackhci/Azure.ResourceManager.Hci/src/Generated/HciSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Hci { public partial class HciSkuResource : IJsonModel { + private static HciSkuData s_dataDeserializationInstance; + private static HciSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HciSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HciSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHciContext.Default); HciSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHciContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.Serialization.cs index d00f3ab29d6c..cfba929dec84 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchAccountCertificateResource : IJsonModel { + private static BatchAccountCertificateData s_dataDeserializationInstance; + private static BatchAccountCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchAccountCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchAccountCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchAccountCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.Serialization.cs index beb74609345d..83cf0ffc7295 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchAccountDetectorResource : IJsonModel { + private static BatchAccountDetectorData s_dataDeserializationInstance; + private static BatchAccountDetectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchAccountDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchAccountDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchAccountDetectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.Serialization.cs index 28153c5cb232..38b68eca6b6e 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchAccountPoolResource : IJsonModel { + private static BatchAccountPoolData s_dataDeserializationInstance; + private static BatchAccountPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchAccountPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchAccountPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchAccountPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.Serialization.cs index b7eeb2c57f55..d07e5cdd4693 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchAccountResource : IJsonModel { + private static BatchAccountData s_dataDeserializationInstance; + private static BatchAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.Serialization.cs index bc1811e3dbcf..0182ed9ab16f 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchApplicationPackageResource : IJsonModel { + private static BatchApplicationPackageData s_dataDeserializationInstance; + private static BatchApplicationPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchApplicationPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchApplicationPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchApplicationPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.Serialization.cs index dce8ab0c9548..723465d2b5f5 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchApplicationResource : IJsonModel { + private static BatchApplicationData s_dataDeserializationInstance; + private static BatchApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.Serialization.cs index dc936a82152a..142d13f19bea 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchPrivateEndpointConnectionResource : IJsonModel { + private static BatchPrivateEndpointConnectionData s_dataDeserializationInstance; + private static BatchPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.Serialization.cs index 66946fd78fc4..f4c66f6b34a6 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/BatchPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class BatchPrivateLinkResource : IJsonModel { + private static BatchPrivateLinkResourceData s_dataDeserializationInstance; + private static BatchPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BatchPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BatchPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); BatchPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index 3ad6b1261662..036731189fd6 100644 --- a/sdk/batch/Azure.ResourceManager.Batch/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/batch/Azure.ResourceManager.Batch/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Batch { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBatchContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBatchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPaymentMethodResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPaymentMethodResource.Serialization.cs index 5e6c06c32a4d..06d28c0c95bb 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPaymentMethodResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPaymentMethodResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingAccountPaymentMethodResource : IJsonModel { + private static BillingPaymentMethodData s_dataDeserializationInstance; + private static BillingPaymentMethodData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingPaymentMethodData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingPaymentMethodData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingPaymentMethodData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPolicyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPolicyResource.Serialization.cs index 613a0e635d20..61c79e8725de 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPolicyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingAccountPolicyResource : IJsonModel { + private static BillingAccountPolicyData s_dataDeserializationInstance; + private static BillingAccountPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingAccountPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingAccountPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingAccountPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountResource.Serialization.cs index 585a12237900..9f7aa454a88c 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingAccountResource : IJsonModel { + private static BillingAccountData s_dataDeserializationInstance; + private static BillingAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAgreementResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAgreementResource.Serialization.cs index 57ff099c8a83..e1c605a1a3ca 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAgreementResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAgreementResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingAgreementResource : IJsonModel { + private static BillingAgreementData s_dataDeserializationInstance; + private static BillingAgreementData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingAgreementData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingAgreementData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingAgreementData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAssociatedTenantResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAssociatedTenantResource.Serialization.cs index af91290de81b..db4cce79ee87 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAssociatedTenantResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingAssociatedTenantResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingAssociatedTenantResource : IJsonModel { + private static BillingAssociatedTenantData s_dataDeserializationInstance; + private static BillingAssociatedTenantData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingAssociatedTenantData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingAssociatedTenantData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingAssociatedTenantData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerPolicyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerPolicyResource.Serialization.cs index eb3c92cc5351..5043f426631b 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerPolicyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingCustomerPolicyResource : IJsonModel { + private static BillingCustomerPolicyData s_dataDeserializationInstance; + private static BillingCustomerPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingCustomerPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingCustomerPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingCustomerPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerResource.Serialization.cs index de259d822a74..1edede0dcae4 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingCustomerResource : IJsonModel { + private static BillingCustomerData s_dataDeserializationInstance; + private static BillingCustomerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingCustomerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingCustomerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingCustomerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleAssignmentResource.Serialization.cs index 1761e620d623..97ede6022de1 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingCustomerRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleDefinitionResource.Serialization.cs index 44056eb8d093..f1e2c9dedddc 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingCustomerRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingCustomerRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentEnrollmentAccountResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentEnrollmentAccountResource.Serialization.cs index 22046783033c..f3fd64d92a41 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentEnrollmentAccountResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentEnrollmentAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingDepartmentEnrollmentAccountResource : IJsonModel { + private static BillingEnrollmentAccountData s_dataDeserializationInstance; + private static BillingEnrollmentAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingEnrollmentAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingEnrollmentAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingEnrollmentAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentResource.Serialization.cs index b41706a65202..29ef3d8177e9 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingDepartmentResource : IJsonModel { + private static BillingDepartmentData s_dataDeserializationInstance; + private static BillingDepartmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingDepartmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingDepartmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingDepartmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleAssignmentResource.Serialization.cs index 726cb5dde8c7..7bb503317d89 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingDepartmentRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleDefinitionResource.Serialization.cs index 4668d4d5477a..88dc3b42a031 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingDepartmentRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingDepartmentRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountResource.Serialization.cs index a6ea18644743..efbae755774e 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingEnrollmentAccountResource : IJsonModel { + private static BillingEnrollmentAccountData s_dataDeserializationInstance; + private static BillingEnrollmentAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingEnrollmentAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingEnrollmentAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingEnrollmentAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleAssignmentResource.Serialization.cs index f12eca3a2661..64ec402e3e19 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingEnrollmentAccountRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleDefinitionResource.Serialization.cs index a251a929f96a..9cea2e1b3d43 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingEnrollmentAccountRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingEnrollmentAccountRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceResource.Serialization.cs index 01e6edacfb57..53f85737c7fc 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingInvoiceResource : IJsonModel { + private static BillingInvoiceData s_dataDeserializationInstance; + private static BillingInvoiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingInvoiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionResource.Serialization.cs index bd37b3b907ea..9f66e2657d54 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingInvoiceSectionResource : IJsonModel { + private static BillingInvoiceSectionData s_dataDeserializationInstance; + private static BillingInvoiceSectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingInvoiceSectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingInvoiceSectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingInvoiceSectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleAssignmentResource.Serialization.cs index 816f77ae427d..54721fba6322 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingInvoiceSectionRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleDefinitionResource.Serialization.cs index dd4bcbd93910..d482b3eafaba 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingInvoiceSectionRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingInvoiceSectionRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodLinkResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodLinkResource.Serialization.cs index 0f919b1c1748..a13b56039f07 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodLinkResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingPaymentMethodLinkResource : IJsonModel { + private static BillingPaymentMethodLinkData s_dataDeserializationInstance; + private static BillingPaymentMethodLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingPaymentMethodLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingPaymentMethodLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingPaymentMethodLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodResource.Serialization.cs index 76d248a385eb..47743a9ab65e 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPaymentMethodResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingPaymentMethodResource : IJsonModel { + private static BillingPaymentMethodData s_dataDeserializationInstance; + private static BillingPaymentMethodData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingPaymentMethodData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingPaymentMethodData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingPaymentMethodData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProductResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProductResource.Serialization.cs index 2689e3ecd955..de85732de39a 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProductResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProductResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProductResource : IJsonModel { + private static BillingProductData s_dataDeserializationInstance; + private static BillingProductData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingProductData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerPolicyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerPolicyResource.Serialization.cs index a401a2ef785c..3c4b364fdd97 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerPolicyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileCustomerPolicyResource : IJsonModel { + private static BillingCustomerPolicyData s_dataDeserializationInstance; + private static BillingCustomerPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingCustomerPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingCustomerPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingCustomerPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerResource.Serialization.cs index e50bc8704032..ce8b1160f476 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileCustomerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileCustomerResource : IJsonModel { + private static BillingCustomerData s_dataDeserializationInstance; + private static BillingCustomerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingCustomerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingCustomerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingCustomerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfilePolicyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfilePolicyResource.Serialization.cs index 7a0eb4cd54cd..a4965ee41193 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfilePolicyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfilePolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfilePolicyResource : IJsonModel { + private static BillingProfilePolicyData s_dataDeserializationInstance; + private static BillingProfilePolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingProfilePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingProfilePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingProfilePolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileResource.Serialization.cs index e9003ed427d3..ad1e88d479b8 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileResource : IJsonModel { + private static BillingProfileData s_dataDeserializationInstance; + private static BillingProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleAssignmentResource.Serialization.cs index f4f4a91c43b6..34e39885019e 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleDefinitionResource.Serialization.cs index ba2571b036ce..db38c3f9e464 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileSubscriptionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileSubscriptionResource.Serialization.cs index 06b901a7a92c..c039cfac0c97 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileSubscriptionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingProfileSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingProfileSubscriptionResource : IJsonModel { + private static BillingSubscriptionData s_dataDeserializationInstance; + private static BillingSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPropertyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPropertyResource.Serialization.cs index 7f03a7acc376..aa242f067e36 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPropertyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingPropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingPropertyResource : IJsonModel { + private static BillingPropertyData s_dataDeserializationInstance; + private static BillingPropertyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRequestResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRequestResource.Serialization.cs index b06b3287e72c..0ff7b9ae8274 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRequestResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingRequestResource : IJsonModel { + private static BillingRequestData s_dataDeserializationInstance; + private static BillingRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationOrderResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationOrderResource.Serialization.cs index 3cb08cb2b270..70d47ff30aa5 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationOrderResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingReservationOrderResource : IJsonModel { + private static BillingReservationOrderData s_dataDeserializationInstance; + private static BillingReservationOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingReservationOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingReservationOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingReservationOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationResource.Serialization.cs index b2310e0d1984..fea6b801a906 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingReservationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingReservationResource : IJsonModel { + private static BillingReservationData s_dataDeserializationInstance; + private static BillingReservationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingReservationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleAssignmentResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleAssignmentResource.Serialization.cs index 0860d2036ac1..414461a85580 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleAssignmentResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingRoleAssignmentResource : IJsonModel { + private static BillingRoleAssignmentData s_dataDeserializationInstance; + private static BillingRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleDefinitionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleDefinitionResource.Serialization.cs index 4e6f7c3409ff..9afec34b5f8d 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleDefinitionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingRoleDefinitionResource : IJsonModel { + private static BillingRoleDefinitionData s_dataDeserializationInstance; + private static BillingRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSavingsPlanModelResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSavingsPlanModelResource.Serialization.cs index 33e0ed31fb53..f7748ecd08cf 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSavingsPlanModelResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSavingsPlanModelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingSavingsPlanModelResource : IJsonModel { + private static BillingSavingsPlanModelData s_dataDeserializationInstance; + private static BillingSavingsPlanModelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingSavingsPlanModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingSavingsPlanModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingSavingsPlanModelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasResource.Serialization.cs index fb481bff845e..e55fe38e09dd 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingSubscriptionAliasResource : IJsonModel { + private static BillingSubscriptionAliasData s_dataDeserializationInstance; + private static BillingSubscriptionAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingSubscriptionAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingSubscriptionAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingSubscriptionAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionResource.Serialization.cs index f6bf0690a3e1..ed8fe51c35a1 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingSubscriptionResource : IJsonModel { + private static BillingSubscriptionData s_dataDeserializationInstance; + private static BillingSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingTransferDetailResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingTransferDetailResource.Serialization.cs index 578a8eb9f22c..9117f6f3afc1 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingTransferDetailResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/BillingTransferDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class BillingTransferDetailResource : IJsonModel { + private static BillingTransferDetailData s_dataDeserializationInstance; + private static BillingTransferDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingTransferDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/DefaultBillingInvoiceResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/DefaultBillingInvoiceResource.Serialization.cs index 015f7ed7ab3a..d95bbdc218e8 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/DefaultBillingInvoiceResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/DefaultBillingInvoiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class DefaultBillingInvoiceResource : IJsonModel { + private static BillingInvoiceData s_dataDeserializationInstance; + private static BillingInvoiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingInvoiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/PartnerTransferDetailResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/PartnerTransferDetailResource.Serialization.cs index 4e0c19fca1f7..0b8c8ed3c789 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/PartnerTransferDetailResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/PartnerTransferDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class PartnerTransferDetailResource : IJsonModel { + private static PartnerTransferDetailData s_dataDeserializationInstance; + private static PartnerTransferDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); PartnerTransferDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/RecipientTransferDetailResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/RecipientTransferDetailResource.Serialization.cs index 0291cbc3c4bd..6add49a96f92 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/RecipientTransferDetailResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/RecipientTransferDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class RecipientTransferDetailResource : IJsonModel { + private static RecipientTransferDetailData s_dataDeserializationInstance; + private static RecipientTransferDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecipientTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecipientTransferDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); RecipientTransferDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SavingsPlanOrderModelResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SavingsPlanOrderModelResource.Serialization.cs index 062fcc71c207..af67121d9cac 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SavingsPlanOrderModelResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SavingsPlanOrderModelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class SavingsPlanOrderModelResource : IJsonModel { + private static SavingsPlanOrderModelData s_dataDeserializationInstance; + private static SavingsPlanOrderModelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SavingsPlanOrderModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SavingsPlanOrderModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); SavingsPlanOrderModelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionBillingInvoiceResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionBillingInvoiceResource.Serialization.cs index 9a5acc951d6e..1610822464a4 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionBillingInvoiceResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionBillingInvoiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class SubscriptionBillingInvoiceResource : IJsonModel { + private static BillingInvoiceData s_dataDeserializationInstance; + private static BillingInvoiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingInvoiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); BillingInvoiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionPolicyResource.Serialization.cs b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionPolicyResource.Serialization.cs index 7c7416febaa8..8ea03dbbd644 100644 --- a/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionPolicyResource.Serialization.cs +++ b/sdk/billing/Azure.ResourceManager.Billing/src/Generated/SubscriptionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Billing { public partial class SubscriptionPolicyResource : IJsonModel { + private static SubscriptionPolicyData s_dataDeserializationInstance; + private static SubscriptionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingContext.Default); SubscriptionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsReservationOrderAliasResource.Serialization.cs b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsReservationOrderAliasResource.Serialization.cs index 170c50b6659a..ea7ac49f02c4 100644 --- a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsReservationOrderAliasResource.Serialization.cs +++ b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsReservationOrderAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BillingBenefits { public partial class BillingBenefitsReservationOrderAliasResource : IJsonModel { + private static BillingBenefitsReservationOrderAliasData s_dataDeserializationInstance; + private static BillingBenefitsReservationOrderAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingBenefitsReservationOrderAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingBenefitsReservationOrderAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingBenefitsContext.Default); BillingBenefitsReservationOrderAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingBenefitsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderAliasResource.Serialization.cs b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderAliasResource.Serialization.cs index 83de84731712..ef99caf17ccf 100644 --- a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderAliasResource.Serialization.cs +++ b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BillingBenefits { public partial class BillingBenefitsSavingsPlanOrderAliasResource : IJsonModel { + private static BillingBenefitsSavingsPlanOrderAliasData s_dataDeserializationInstance; + private static BillingBenefitsSavingsPlanOrderAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingBenefitsSavingsPlanOrderAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingBenefitsSavingsPlanOrderAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingBenefitsContext.Default); BillingBenefitsSavingsPlanOrderAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingBenefitsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderResource.Serialization.cs b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderResource.Serialization.cs index 4ea8ac34f733..5d1d1c906fa3 100644 --- a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderResource.Serialization.cs +++ b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BillingBenefits { public partial class BillingBenefitsSavingsPlanOrderResource : IJsonModel { + private static BillingBenefitsSavingsPlanOrderData s_dataDeserializationInstance; + private static BillingBenefitsSavingsPlanOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingBenefitsSavingsPlanOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingBenefitsSavingsPlanOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingBenefitsContext.Default); BillingBenefitsSavingsPlanOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingBenefitsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanResource.Serialization.cs b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanResource.Serialization.cs index 0b99844859a5..aafed24798c8 100644 --- a/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanResource.Serialization.cs +++ b/sdk/billingbenefits/Azure.ResourceManager.BillingBenefits/src/Generated/BillingBenefitsSavingsPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BillingBenefits { public partial class BillingBenefitsSavingsPlanResource : IJsonModel { + private static BillingBenefitsSavingsPlanData s_dataDeserializationInstance; + private static BillingBenefitsSavingsPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingBenefitsSavingsPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingBenefitsSavingsPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBillingBenefitsContext.Default); BillingBenefitsSavingsPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBillingBenefitsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/assets.json b/sdk/blueprint/Azure.ResourceManager.Blueprint/assets.json index de2d944d1d83..c87e36f395f4 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/assets.json +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/blueprint/Azure.ResourceManager.Blueprint", - "Tag": "net/blueprint/Azure.ResourceManager.Blueprint_168558b38f" + "Tag": "net/blueprint/Azure.ResourceManager.Blueprint_f3390eac13" } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentOperationResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentOperationResource.Serialization.cs index b9384d21c3e7..84b5f949d325 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentOperationResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Blueprint { public partial class AssignmentOperationResource : IJsonModel { + private static AssignmentOperationData s_dataDeserializationInstance; + private static AssignmentOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AssignmentOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AssignmentOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); AssignmentOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentResource.Serialization.cs index 87481a33d6af..47f133dfd0cc 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/AssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Blueprint { public partial class AssignmentResource : IJsonModel { + private static AssignmentData s_dataDeserializationInstance; + private static AssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); AssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintArtifactResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintArtifactResource.Serialization.cs index cecc96680240..6f8b6a34befa 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintArtifactResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintArtifactResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.Blueprint.Models; namespace Azure.ResourceManager.Blueprint { public partial class BlueprintArtifactResource : IJsonModel { + private static UnknownArtifact s_dataDeserializationInstance; + private static UnknownArtifact DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); ArtifactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintResource.Serialization.cs index 1edb0ca675b7..b85c2c058988 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Blueprint { public partial class BlueprintResource : IJsonModel { + private static BlueprintData s_dataDeserializationInstance; + private static BlueprintData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BlueprintData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BlueprintData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); BlueprintData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintVersionArtifactResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintVersionArtifactResource.Serialization.cs index 46ee8176a766..39168b78026f 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintVersionArtifactResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/BlueprintVersionArtifactResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.Blueprint.Models; namespace Azure.ResourceManager.Blueprint { public partial class BlueprintVersionArtifactResource : IJsonModel { + private static UnknownArtifact s_dataDeserializationInstance; + private static UnknownArtifact DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); ArtifactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/PublishedBlueprintResource.Serialization.cs b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/PublishedBlueprintResource.Serialization.cs index 1179e90ac3fd..4594045248a6 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/PublishedBlueprintResource.Serialization.cs +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/src/Generated/PublishedBlueprintResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Blueprint { public partial class PublishedBlueprintResource : IJsonModel { + private static PublishedBlueprintData s_dataDeserializationInstance; + private static PublishedBlueprintData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublishedBlueprintData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublishedBlueprintData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBlueprintContext.Default); PublishedBlueprintData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBlueprintContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/blueprint/Azure.ResourceManager.Blueprint/tests/Azure.ResourceManager.Blueprint.Tests.csproj b/sdk/blueprint/Azure.ResourceManager.Blueprint/tests/Azure.ResourceManager.Blueprint.Tests.csproj index da20e2df4a64..5cbcbbfaaf65 100644 --- a/sdk/blueprint/Azure.ResourceManager.Blueprint/tests/Azure.ResourceManager.Blueprint.Tests.csproj +++ b/sdk/blueprint/Azure.ResourceManager.Blueprint/tests/Azure.ResourceManager.Blueprint.Tests.csproj @@ -6,4 +6,9 @@ + + + + + diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.Serialization.cs index dc0650739f64..1a385d3b9a1f 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BotService { public partial class BotChannelResource : IJsonModel { + private static BotChannelData s_dataDeserializationInstance; + private static BotChannelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BotChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BotChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBotServiceContext.Default); BotChannelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBotServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.Serialization.cs index f4b06977378d..ee9b62752fd0 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BotService { public partial class BotConnectionSettingResource : IJsonModel { + private static BotConnectionSettingData s_dataDeserializationInstance; + private static BotConnectionSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BotConnectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BotConnectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBotServiceContext.Default); BotConnectionSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBotServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.Serialization.cs index f3a1dd09ccd5..9d954e0789fd 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BotService { public partial class BotResource : IJsonModel { + private static BotData s_dataDeserializationInstance; + private static BotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBotServiceContext.Default); BotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBotServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.Serialization.cs index f3e13eabe1e7..73ebd099b4eb 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.BotService { public partial class BotServicePrivateEndpointConnectionResource : IJsonModel { + private static BotServicePrivateEndpointConnectionData s_dataDeserializationInstance; + private static BotServicePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BotServicePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BotServicePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerBotServiceContext.Default); BotServicePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerBotServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/CHANGELOG.md b/sdk/cdn/Azure.ResourceManager.Cdn/CHANGELOG.md index 112972ff2214..f9fe715e9f4d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/CHANGELOG.md +++ b/sdk/cdn/Azure.ResourceManager.Cdn/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.5.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,13 @@ ### Other Changes +## 1.4.0 (2025-05-10) + +### Features Added + +- Updated API version to 2025-04-15 +- Added support for cipher + ## 1.3.1 (2025-03-11) ### Features Added diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.net8.0.cs b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.net8.0.cs index 44d53331d00f..e194cefdd5dd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.net8.0.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.net8.0.cs @@ -927,8 +927,12 @@ public partial class ProfileResource : Azure.ResourceManager.ArmResource, System protected ProfileResource() { } public virtual Azure.ResourceManager.Cdn.ProfileData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation AbortMigration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AbortMigrationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CheckCdnMigrationCompatibility(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckCdnMigrationCompatibilityAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckEndpointNameAvailabilityFrontDoorProfile(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckEndpointNameAvailabilityFrontDoorProfileAsync(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckFrontDoorProfileHostNameAvailability(Azure.ResourceManager.Cdn.Models.HostNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -987,6 +991,8 @@ protected ProfileResource() { } public virtual Azure.Response GetWafLogAnalyticsRankings(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsRankingsAsync(Azure.ResourceManager.Cdn.Models.ProfileResourceGetWafLogAnalyticsRankingsOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsRankingsAsync(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrateCdnToAfd(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MigrateCdnToAfdAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrationCommit(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task MigrationCommitAsync(Azure.WaitUntil waitUntil, 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; } @@ -1068,14 +1074,77 @@ protected MockableCdnTenantResource() { } } namespace Azure.ResourceManager.Cdn.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCipherSuiteSetType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCipherSuiteSetType(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Customized { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_0_2019 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_2_2022 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_2_2023 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType 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.Cdn.Models.AfdCipherSuiteSetType left, Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType left, Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCustomizedCipherSuiteForTls12 : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCustomizedCipherSuiteForTls12(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes256_Gcm_Sha384 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Gcm_Sha384 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Sha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 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.Cdn.Models.AfdCustomizedCipherSuiteForTls12 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCustomizedCipherSuiteForTls13 : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCustomizedCipherSuiteForTls13(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 Tls_Aes_128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 Tls_Aes_256_Gcm_Sha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 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.Cdn.Models.AfdCustomizedCipherSuiteForTls13 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmCdnModelFactory { public static Azure.ResourceManager.Cdn.Models.AzureFirstPartyManagedCertificateProperties AzureFirstPartyManagedCertificateProperties(Azure.Core.ResourceIdentifier secretSourceId = null, string subject = null, string expirationDate = null, string certificateAuthority = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, string thumbprint = null) { throw null; } - public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(string id = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(Azure.Core.ResourceIdentifier resourceId = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(string Id = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Cdn.CdnCustomDomainData CdnCustomDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostName = null, Azure.ResourceManager.Cdn.Models.CustomDomainResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.CustomDomainResourceState?), Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState? customHttpsProvisioningState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState?), Azure.ResourceManager.Cdn.Models.CustomHttpsAvailabilityState? customHttpsAvailabilityState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsAvailabilityState?), Azure.ResourceManager.Cdn.Models.CustomDomainHttpsContent customDomainHttpsContent = null, string validationData = null, Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Cdn.CdnEndpointData CdnEndpointData(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 originPath = null, System.Collections.Generic.IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = default(bool?), bool? isHttpAllowed = default(bool?), bool? isHttpsAllowed = default(bool?), Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior? queryStringCachingBehavior = default(Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior?), Azure.ResourceManager.Cdn.Models.OptimizationType? optimizationType = default(Azure.ResourceManager.Cdn.Models.OptimizationType?), string probePath = null, System.Collections.Generic.IEnumerable geoFilters = null, Azure.Core.ResourceIdentifier defaultOriginGroupId = null, System.Collections.Generic.IEnumerable uriSigningKeys = null, Azure.ResourceManager.Cdn.Models.EndpointDeliveryPolicy deliveryPolicy = null, Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, System.Collections.Generic.IEnumerable origins = null, System.Collections.Generic.IEnumerable originGroups = null, System.Collections.Generic.IEnumerable customDomains = null, Azure.ResourceManager.Cdn.Models.EndpointResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.EndpointResourceState?), Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState?)) { throw null; } public static Azure.ResourceManager.Cdn.CdnEndpointData CdnEndpointData(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 originPath = null, System.Collections.Generic.IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = default(bool?), bool? isHttpAllowed = default(bool?), bool? isHttpsAllowed = default(bool?), Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior? queryStringCachingBehavior = default(Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior?), Azure.ResourceManager.Cdn.Models.OptimizationType? optimizationType = default(Azure.ResourceManager.Cdn.Models.OptimizationType?), string probePath = null, System.Collections.Generic.IEnumerable geoFilters = null, Azure.Core.ResourceIdentifier defaultOriginGroupId = null, System.Collections.Generic.IEnumerable uriSigningKeys = null, Azure.ResourceManager.Cdn.Models.EndpointDeliveryPolicy deliveryPolicy = null, Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, System.Collections.Generic.IEnumerable origins = null, System.Collections.Generic.IEnumerable originGroups = null, System.Collections.Generic.IEnumerable deepCreatedCustomDomains = null, Azure.ResourceManager.Cdn.Models.EndpointResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.EndpointResourceState?), Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent CdnMigrationToAfdContent(Azure.ResourceManager.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), System.Collections.Generic.IEnumerable migrationEndpointMappings = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.Cdn.CdnOriginData CdnOriginData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostName = null, int? httpPort = default(int?), int? httpsPort = default(int?), string originHostHeader = null, int? priority = default(int?), int? weight = default(int?), bool? enabled = default(bool?), string privateLinkAlias = null, Azure.Core.ResourceIdentifier privateLinkResourceId = null, string privateLinkLocation = null, string privateLinkApprovalMessage = null, Azure.ResourceManager.Cdn.Models.OriginResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.OriginResourceState?), Azure.ResourceManager.Cdn.Models.OriginProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.OriginProvisioningState?), Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus? privateEndpointStatus = default(Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus?)) { throw null; } public static Azure.ResourceManager.Cdn.CdnOriginGroupData CdnOriginGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Cdn.Models.HealthProbeSettings healthProbeSettings = null, System.Collections.Generic.IEnumerable origins = null, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes = default(int?), Azure.ResourceManager.Cdn.Models.ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings = null, Azure.ResourceManager.Cdn.Models.OriginGroupResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.OriginGroupResourceState?), Azure.ResourceManager.Cdn.Models.OriginGroupProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.OriginGroupProvisioningState?)) { throw null; } @@ -1123,7 +1192,9 @@ public static partial class ArmCdnModelFactory public static Azure.ResourceManager.Cdn.Models.MetricsResponse MetricsResponse(System.DateTimeOffset? dateTimeBegin = default(System.DateTimeOffset?), System.DateTimeOffset? dateTimeEnd = default(System.DateTimeOffset?), Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity? granularity = default(Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity?), System.Collections.Generic.IEnumerable series = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric = null, Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit? unit = default(Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit?), System.Collections.Generic.IEnumerable groups = null, System.Collections.Generic.IEnumerable data = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesPropertiesItemsItem MetricsResponseSeriesPropertiesItemsItem(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(string id = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } + public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(Azure.Core.ResourceIdentifier resourceId = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(string Id = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MigrationContent MigrationContent(Azure.ResourceManager.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), Azure.Core.ResourceIdentifier classicResourceReferenceId = null, string profileName = null, System.Collections.Generic.IEnumerable migrationWebApplicationFirewallMappings = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MigrationErrorType MigrationErrorType(string code = null, string resourceName = null, string errorMessage = null, string nextSteps = null) { throw null; } public static Azure.ResourceManager.Cdn.ProfileData ProfileData(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.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Cdn.Models.ProfileResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.ProfileResourceState?), Azure.ResourceManager.Cdn.Models.ProfileProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.ProfileProvisioningState?), System.Collections.Generic.IReadOnlyDictionary extendedProperties = null, System.Guid? frontDoorId = default(System.Guid?), int? originResponseTimeoutSeconds = default(int?), Azure.ResourceManager.Cdn.Models.ProfileLogScrubbing logScrubbing = null) { throw null; } @@ -1199,14 +1270,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 CacheExpirationActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheExpirationActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public CacheExpirationActionProperties(Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting cacheBehavior, Azure.ResourceManager.Cdn.Models.CdnCacheLevel cacheType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CacheExpirationActionProperties(Azure.ResourceManager.Cdn.Models.CacheExpirationActionType actionType, Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting cacheBehavior, Azure.ResourceManager.Cdn.Models.CdnCacheLevel cacheType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CacheExpirationActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting CacheBehavior { get { throw null; } set { } } public System.TimeSpan? CacheDuration { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CdnCacheLevel CacheType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1230,13 +1304,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CacheExpirationActionType left, Azure.ResourceManager.Cdn.Models.CacheExpirationActionType right) { throw null; } public override string ToString() { throw null; } } - public partial class CacheKeyQueryStringActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheKeyQueryStringActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CacheKeyQueryStringActionProperties(Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType actionType, Azure.ResourceManager.Cdn.Models.QueryStringBehavior queryStringBehavior) { } + public CacheKeyQueryStringActionProperties(Azure.ResourceManager.Cdn.Models.QueryStringBehavior queryStringBehavior) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType ActionType { get { throw null; } set { } } public string QueryParameters { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.QueryStringBehavior QueryStringBehavior { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1296,7 +1373,9 @@ internal CanMigrateResult() { } public string CanMigrateResultType { get { throw null; } } public Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? DefaultSku { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Id { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CanMigrateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1321,12 +1400,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CdnCacheLevel left, Azure.ResourceManager.Cdn.Models.CdnCacheLevel right) { throw null; } public override string ToString() { throw null; } } - public partial class CdnCertificateSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CdnCertificateSource : Azure.ResourceManager.Cdn.Models.CertificateSourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CdnCertificateSource(Azure.ResourceManager.Cdn.Models.CdnCertificateSourceType sourceType, Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType certificateType) { } + public CdnCertificateSource(Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType certificateType) { } public Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType CertificateType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CdnCertificateSourceType SourceType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CdnCertificateSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CdnCertificateSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1436,6 +1518,18 @@ 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 CdnMigrationToAfdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CdnMigrationToAfdContent(Azure.ResourceManager.Cdn.Models.CdnSku sku) { } + public System.Collections.Generic.IList MigrationEndpointMappings { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.CdnSkuName? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum CdnMinimumTlsVersion { None = 0, @@ -1619,6 +1713,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CertificateDeleteAction left, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class CertificateSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected CertificateSourceProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CertificateSourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CertificateSourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CertificateUpdateAction : System.IEquatable { @@ -1648,15 +1752,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 ClientPortMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ClientPortMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ClientPortMatchCondition(Azure.ResourceManager.Cdn.Models.ClientPortMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.ClientPortOperator clientPortOperator) { } + public ClientPortMatchCondition(Azure.ResourceManager.Cdn.Models.ClientPortOperator clientPortOperator) { } public Azure.ResourceManager.Cdn.Models.ClientPortOperator ClientPortOperator { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.ClientPortMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ClientPortMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ClientPortMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1778,16 +1885,19 @@ 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 CookiesMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CookiesMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CookiesMatchCondition(Azure.ResourceManager.Cdn.Models.CookiesMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.CookiesOperator cookiesOperator) { } + public CookiesMatchCondition(Azure.ResourceManager.Cdn.Models.CookiesOperator cookiesOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CookiesMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CookiesOperator CookiesOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CookiesMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CookiesMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2057,6 +2167,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 abstract partial class DeliveryRuleActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DeliveryRuleActionProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeliveryRuleCacheExpirationAction : Azure.ResourceManager.Cdn.Models.DeliveryRuleAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeliveryRuleCacheExpirationAction(Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties properties) { } @@ -2100,6 +2220,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 abstract partial class DeliveryRuleConditionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DeliveryRuleConditionProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeliveryRuleCookiesCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleCondition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeliveryRuleCookiesCondition(Azure.ResourceManager.Cdn.Models.CookiesMatchCondition properties) { } @@ -2317,15 +2447,18 @@ 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 DeliveryRuleSslProtocolMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DeliveryRuleSslProtocolMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public DeliveryRuleSslProtocolMatchCondition(Azure.ResourceManager.Cdn.Models.SslProtocolMatchConditionType sslProtocolMatchConditionType, Azure.ResourceManager.Cdn.Models.SslProtocolOperator sslProtocolOperator) { } + public DeliveryRuleSslProtocolMatchCondition(Azure.ResourceManager.Cdn.Models.SslProtocolOperator sslProtocolOperator) { } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.SslProtocolMatchConditionType SslProtocolMatchConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.SslProtocolOperator SslProtocolOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.DeliveryRuleSslProtocolMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.DeliveryRuleSslProtocolMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2585,6 +2718,8 @@ public partial class FrontDoorCustomDomainHttpsContent : System.ClientModel.Prim { public FrontDoorCustomDomainHttpsContent(Azure.ResourceManager.Cdn.Models.FrontDoorCertificateType certificateType) { } public Azure.ResourceManager.Cdn.Models.FrontDoorCertificateType CertificateType { get { throw null; } set { } } + public Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType? CipherSuiteSetType { get { throw null; } set { } } + public Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet CustomizedCipherSuiteSet { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.FrontDoorMinimumTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2594,6 +2729,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 FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet() { } + public System.Collections.Generic.IList CipherSuiteSetForTls12 { get { throw null; } } + public System.Collections.Generic.IList CipherSuiteSetForTls13 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FrontDoorCustomDomainPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FrontDoorCustomDomainPatch() { } @@ -2663,6 +2810,7 @@ public enum FrontDoorMinimumTlsVersion { Tls1_0 = 0, Tls1_2 = 1, + Tls1_3 = 2, } public partial class FrontDoorOriginGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -2905,14 +3053,17 @@ public enum GeoFilterAction public static bool operator !=(Azure.ResourceManager.Cdn.Models.HeaderAction left, Azure.ResourceManager.Cdn.Models.HeaderAction right) { throw null; } public override string ToString() { throw null; } } - public partial class HeaderActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HeaderActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public HeaderActionProperties(Azure.ResourceManager.Cdn.Models.HeaderAction headerAction, string headerName) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HeaderActionProperties(Azure.ResourceManager.Cdn.Models.HeaderActionType actionType, Azure.ResourceManager.Cdn.Models.HeaderAction headerAction, string headerName) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HeaderActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HeaderAction HeaderAction { get { throw null; } set { } } public string HeaderName { get { throw null; } set { } } public string Value { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HeaderActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HeaderActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2973,15 +3124,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 HostNameMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HostNameMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HostNameMatchCondition(Azure.ResourceManager.Cdn.Models.HostNameMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.HostNameOperator hostNameOperator) { } + public HostNameMatchCondition(Azure.ResourceManager.Cdn.Models.HostNameOperator hostNameOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HostNameMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HostNameOperator HostNameOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HostNameMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HostNameMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3061,15 +3215,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.HttpsRedirect left, Azure.ResourceManager.Cdn.Models.HttpsRedirect right) { throw null; } public override string ToString() { throw null; } } - public partial class HttpVersionMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HttpVersionMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HttpVersionMatchCondition(Azure.ResourceManager.Cdn.Models.HttpVersionMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.HttpVersionOperator httpVersionOperator) { } + public HttpVersionMatchCondition(Azure.ResourceManager.Cdn.Models.HttpVersionOperator httpVersionOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HttpVersionMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HttpVersionOperator HttpVersionOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HttpVersionMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HttpVersionMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3123,15 +3280,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 IsDeviceMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class IsDeviceMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public IsDeviceMatchCondition(Azure.ResourceManager.Cdn.Models.IsDeviceMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.IsDeviceOperator isDeviceOperator) { } + public IsDeviceMatchCondition(Azure.ResourceManager.Cdn.Models.IsDeviceOperator isDeviceOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.IsDeviceMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.IsDeviceOperator IsDeviceOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.IsDeviceMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.IsDeviceMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3190,18 +3350,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.IsDeviceOperator left, Azure.ResourceManager.Cdn.Models.IsDeviceOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class KeyVaultCertificateSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class KeyVaultCertificateSource : Azure.ResourceManager.Cdn.Models.CertificateSourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public KeyVaultCertificateSource(Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, Azure.ResourceManager.Cdn.Models.CertificateUpdateAction updateRule, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction deleteRule) { } + public KeyVaultCertificateSource(string subscriptionId, string resourceGroupName, string vaultName, string secretName, Azure.ResourceManager.Cdn.Models.CertificateUpdateAction updateRule, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction deleteRule) { } public Azure.ResourceManager.Cdn.Models.CertificateDeleteAction DeleteRule { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public string SecretName { get { throw null; } set { } } public string SecretVersion { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSourceType SourceType { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CertificateUpdateAction UpdateRule { get { throw null; } set { } } public string VaultName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3628,9 +3791,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MigrateResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MigrateResult() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Id { get { throw null; } } public Azure.Core.ResourceIdentifier MigratedProfileResourceIdId { get { throw null; } } public string MigrateResultType { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.MigrateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3652,6 +3817,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 MigrationEndpointMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MigrationEndpointMapping() { } + public string MigratedFrom { get { throw null; } set { } } + public string MigratedTo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.MigrationEndpointMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.MigrationEndpointMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class MigrationErrorType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MigrationErrorType() { } @@ -3722,12 +3899,15 @@ 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 OriginGroupOverrideActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OriginGroupOverrideActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public OriginGroupOverrideActionProperties(Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionType actionType, Azure.ResourceManager.Resources.Models.WritableSubResource originGroup) { } + public OriginGroupOverrideActionProperties(Azure.ResourceManager.Resources.Models.WritableSubResource originGroup) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionType ActionType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier OriginGroupId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3948,16 +4128,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.PolicySettingsDefaultCustomBlockResponseStatusCode left, Azure.ResourceManager.Cdn.Models.PolicySettingsDefaultCustomBlockResponseStatusCode right) { throw null; } public override string ToString() { throw null; } } - public partial class PostArgsMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PostArgsMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public PostArgsMatchCondition(Azure.ResourceManager.Cdn.Models.PostArgsMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.PostArgsOperator postArgsOperator) { } + public PostArgsMatchCondition(Azure.ResourceManager.Cdn.Models.PostArgsOperator postArgsOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.PostArgsMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.PostArgsOperator PostArgsOperator { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.PostArgsMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.PostArgsMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4260,15 +4443,18 @@ public enum QueryStringCachingBehavior BypassCaching = 2, UseQueryString = 3, } - public partial class QueryStringMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class QueryStringMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public QueryStringMatchCondition(Azure.ResourceManager.Cdn.Models.QueryStringMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.QueryStringOperator queryStringOperator) { } + public QueryStringMatchCondition(Azure.ResourceManager.Cdn.Models.QueryStringOperator queryStringOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.QueryStringMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.QueryStringOperator QueryStringOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.QueryStringMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.QueryStringMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4400,15 +4586,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.Cdn.Models.RedirectType left, Azure.ResourceManager.Cdn.Models.RedirectType right) { throw null; } public override string ToString() { throw null; } } - public partial class RemoteAddressMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RemoteAddressMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RemoteAddressMatchCondition(Azure.ResourceManager.Cdn.Models.RemoteAddressMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RemoteAddressOperator remoteAddressOperator) { } + public RemoteAddressMatchCondition(Azure.ResourceManager.Cdn.Models.RemoteAddressOperator remoteAddressOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RemoteAddressMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RemoteAddressOperator RemoteAddressOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RemoteAddressMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RemoteAddressMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4451,15 +4640,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RemoteAddressOperator left, Azure.ResourceManager.Cdn.Models.RemoteAddressOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestBodyMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestBodyMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestBodyMatchCondition(Azure.ResourceManager.Cdn.Models.RequestBodyMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestBodyOperator requestBodyOperator) { } + public RequestBodyMatchCondition(Azure.ResourceManager.Cdn.Models.RequestBodyOperator requestBodyOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestBodyMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestBodyOperator RequestBodyOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestBodyMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestBodyMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4509,16 +4701,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestBodyOperator left, Azure.ResourceManager.Cdn.Models.RequestBodyOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestHeaderMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestHeaderMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestHeaderMatchCondition(Azure.ResourceManager.Cdn.Models.RequestHeaderMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestHeaderOperator requestHeaderOperator) { } + public RequestHeaderMatchCondition(Azure.ResourceManager.Cdn.Models.RequestHeaderOperator requestHeaderOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestHeaderMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestHeaderOperator RequestHeaderOperator { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestHeaderMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestHeaderMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4568,15 +4763,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestHeaderOperator left, Azure.ResourceManager.Cdn.Models.RequestHeaderOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestMethodMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestMethodMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestMethodMatchCondition(Azure.ResourceManager.Cdn.Models.RequestMethodMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestMethodOperator requestMethodOperator) { } + public RequestMethodMatchCondition(Azure.ResourceManager.Cdn.Models.RequestMethodOperator requestMethodOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestMethodMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestMethodOperator RequestMethodOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestMethodMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestMethodMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4640,15 +4838,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestMethodOperator left, Azure.ResourceManager.Cdn.Models.RequestMethodOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestSchemeMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestSchemeMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestSchemeMatchCondition(Azure.ResourceManager.Cdn.Models.RequestSchemeMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestSchemeOperator requestSchemeOperator) { } + public RequestSchemeMatchCondition(Azure.ResourceManager.Cdn.Models.RequestSchemeOperator requestSchemeOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestSchemeMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestSchemeOperator RequestSchemeOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestSchemeMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestSchemeMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4707,15 +4908,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestSchemeOperator left, Azure.ResourceManager.Cdn.Models.RequestSchemeOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestUriMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestUriMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestUriMatchCondition(Azure.ResourceManager.Cdn.Models.RequestUriMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestUriOperator requestUriOperator) { } + public RequestUriMatchCondition(Azure.ResourceManager.Cdn.Models.RequestUriOperator requestUriOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestUriMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestUriOperator RequestUriOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestUriMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestUriMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4850,13 +5054,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 RouteConfigurationOverrideActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RouteConfigurationOverrideActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public RouteConfigurationOverrideActionProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RouteConfigurationOverrideActionProperties(Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionType actionType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CacheConfiguration CacheConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.OriginGroupOverride OriginGroupOverride { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5063,15 +5270,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 ServerPortMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ServerPortMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ServerPortMatchCondition(Azure.ResourceManager.Cdn.Models.ServerPortMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.ServerPortOperator serverPortOperator) { } + public ServerPortMatchCondition(Azure.ResourceManager.Cdn.Models.ServerPortOperator serverPortOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.ServerPortMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.ServerPortOperator ServerPortOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ServerPortMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ServerPortMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5144,15 +5354,18 @@ public enum SharedPrivateLinkResourceStatus Disconnected = 3, Timeout = 4, } - public partial class SocketAddressMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SocketAddressMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public SocketAddressMatchCondition(Azure.ResourceManager.Cdn.Models.SocketAddressMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.SocketAddressOperator socketAddressOperator) { } + public SocketAddressMatchCondition(Azure.ResourceManager.Cdn.Models.SocketAddressOperator socketAddressOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.SocketAddressMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.SocketAddressOperator SocketAddressOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.SocketAddressMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.SocketAddressMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5272,15 +5485,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.TransformType left, Azure.ResourceManager.Cdn.Models.TransformType right) { throw null; } public override string ToString() { throw null; } } - public partial class UriFileExtensionMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriFileExtensionMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriFileExtensionMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator uriFileExtensionOperator) { } + public UriFileExtensionMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator uriFileExtensionOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator UriFileExtensionOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5330,15 +5546,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator left, Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class UriFileNameMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriFileNameMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriFileNameMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileNameMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriFileNameOperator uriFileNameOperator) { } + public UriFileNameMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileNameOperator uriFileNameOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriFileNameMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriFileNameOperator UriFileNameOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileNameMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileNameMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5388,15 +5607,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.UriFileNameOperator left, Azure.ResourceManager.Cdn.Models.UriFileNameOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class UriPathMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriPathMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriPathMatchCondition(Azure.ResourceManager.Cdn.Models.UriPathMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriPathOperator uriPathOperator) { } + public UriPathMatchCondition(Azure.ResourceManager.Cdn.Models.UriPathOperator uriPathOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriPathMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriPathOperator UriPathOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriPathMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriPathMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5458,9 +5680,12 @@ 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 UriRedirectActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriRedirectActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.RedirectType redirectType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.UriRedirectActionType actionType, Azure.ResourceManager.Cdn.Models.RedirectType redirectType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriRedirectActionType ActionType { get { throw null; } set { } } public string CustomFragment { get { throw null; } set { } } public string CustomHostname { get { throw null; } set { } } @@ -5468,7 +5693,7 @@ public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.UriRedirectA public string CustomQueryString { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.DestinationProtocol? DestinationProtocol { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RedirectType RedirectType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRedirectActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRedirectActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,14 +5728,17 @@ 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 UriRewriteActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriRewriteActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriRewriteActionProperties(Azure.ResourceManager.Cdn.Models.UriRewriteActionType actionType, string sourcePattern, string destination) { } + public UriRewriteActionProperties(string sourcePattern, string destination) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriRewriteActionType ActionType { get { throw null; } set { } } public string Destination { get { throw null; } set { } } public bool? PreserveUnmatchedPath { get { throw null; } set { } } public string SourcePattern { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRewriteActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRewriteActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5545,13 +5773,16 @@ 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 UriSigningActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriSigningActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public UriSigningActionProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriSigningActionProperties(Azure.ResourceManager.Cdn.Models.UriSigningActionType actionType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriSigningActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.UriSigningAlgorithm? Algorithm { get { throw null; } set { } } public System.Collections.Generic.IList ParameterNameOverride { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriSigningActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriSigningActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5606,7 +5837,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class UriSigningKeyProperties : Azure.ResourceManager.Cdn.Models.FrontDoorSecretProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriSigningKeyProperties(string keyId, Azure.ResourceManager.Resources.Models.WritableSubResource secretSource) { } + public UriSigningKeyProperties(string keyId, Azure.ResourceManager.Resources.Models.WritableSubResource secretSource, string secretVersion) { } public string KeyId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretSourceId { get { throw null; } set { } } public string SecretVersion { get { throw null; } set { } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs index 44d53331d00f..e194cefdd5dd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/api/Azure.ResourceManager.Cdn.netstandard2.0.cs @@ -927,8 +927,12 @@ public partial class ProfileResource : Azure.ResourceManager.ArmResource, System protected ProfileResource() { } public virtual Azure.ResourceManager.Cdn.ProfileData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.ResourceManager.ArmOperation AbortMigration(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task AbortMigrationAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CheckCdnMigrationCompatibility(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CheckCdnMigrationCompatibilityAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckEndpointNameAvailabilityFrontDoorProfile(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckEndpointNameAvailabilityFrontDoorProfileAsync(Azure.ResourceManager.Cdn.Models.EndpointNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CheckFrontDoorProfileHostNameAvailability(Azure.ResourceManager.Cdn.Models.HostNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -987,6 +991,8 @@ protected ProfileResource() { } public virtual Azure.Response GetWafLogAnalyticsRankings(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsRankingsAsync(Azure.ResourceManager.Cdn.Models.ProfileResourceGetWafLogAnalyticsRankingsOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWafLogAnalyticsRankingsAsync(System.Collections.Generic.IEnumerable metrics, System.DateTimeOffset dateTimeBegin, System.DateTimeOffset dateTimeEnd, int maxRanking, System.Collections.Generic.IEnumerable rankings, System.Collections.Generic.IEnumerable actions = null, System.Collections.Generic.IEnumerable ruleTypes = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation MigrateCdnToAfd(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> MigrateCdnToAfdAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ArmOperation MigrationCommit(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task MigrationCommitAsync(Azure.WaitUntil waitUntil, 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; } @@ -1068,14 +1074,77 @@ protected MockableCdnTenantResource() { } } namespace Azure.ResourceManager.Cdn.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCipherSuiteSetType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCipherSuiteSetType(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Customized { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_0_2019 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_2_2022 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType Tls1_2_2023 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType 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.Cdn.Models.AfdCipherSuiteSetType left, Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType left, Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCustomizedCipherSuiteForTls12 : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCustomizedCipherSuiteForTls12(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes256_Gcm_Sha384 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Gcm_Sha384 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Sha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 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.Cdn.Models.AfdCustomizedCipherSuiteForTls12 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls12 right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AfdCustomizedCipherSuiteForTls13 : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AfdCustomizedCipherSuiteForTls13(string value) { throw null; } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 Tls_Aes_128_Gcm_Sha256 { get { throw null; } } + public static Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 Tls_Aes_256_Gcm_Sha384 { get { throw null; } } + public bool Equals(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 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.Cdn.Models.AfdCustomizedCipherSuiteForTls13 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 right) { throw null; } + public static implicit operator Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 left, Azure.ResourceManager.Cdn.Models.AfdCustomizedCipherSuiteForTls13 right) { throw null; } + public override string ToString() { throw null; } + } public static partial class ArmCdnModelFactory { public static Azure.ResourceManager.Cdn.Models.AzureFirstPartyManagedCertificateProperties AzureFirstPartyManagedCertificateProperties(Azure.Core.ResourceIdentifier secretSourceId = null, string subject = null, string expirationDate = null, string certificateAuthority = null, System.Collections.Generic.IEnumerable subjectAlternativeNames = null, string thumbprint = null) { throw null; } - public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(string id = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } + public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(Azure.Core.ResourceIdentifier resourceId = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Cdn.Models.CanMigrateResult CanMigrateResult(string Id = null, string canMigrateResultType = null, bool? canMigrate = default(bool?), Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? defaultSku = default(Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku?), System.Collections.Generic.IEnumerable errors = null) { throw null; } public static Azure.ResourceManager.Cdn.CdnCustomDomainData CdnCustomDomainData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostName = null, Azure.ResourceManager.Cdn.Models.CustomDomainResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.CustomDomainResourceState?), Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState? customHttpsProvisioningState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState?), Azure.ResourceManager.Cdn.Models.CustomHttpsAvailabilityState? customHttpsAvailabilityState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsAvailabilityState?), Azure.ResourceManager.Cdn.Models.CustomDomainHttpsContent customDomainHttpsContent = null, string validationData = null, Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CustomHttpsProvisioningState?)) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.ResourceManager.Cdn.CdnEndpointData CdnEndpointData(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 originPath = null, System.Collections.Generic.IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = default(bool?), bool? isHttpAllowed = default(bool?), bool? isHttpsAllowed = default(bool?), Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior? queryStringCachingBehavior = default(Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior?), Azure.ResourceManager.Cdn.Models.OptimizationType? optimizationType = default(Azure.ResourceManager.Cdn.Models.OptimizationType?), string probePath = null, System.Collections.Generic.IEnumerable geoFilters = null, Azure.Core.ResourceIdentifier defaultOriginGroupId = null, System.Collections.Generic.IEnumerable uriSigningKeys = null, Azure.ResourceManager.Cdn.Models.EndpointDeliveryPolicy deliveryPolicy = null, Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, System.Collections.Generic.IEnumerable origins = null, System.Collections.Generic.IEnumerable originGroups = null, System.Collections.Generic.IEnumerable customDomains = null, Azure.ResourceManager.Cdn.Models.EndpointResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.EndpointResourceState?), Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState?)) { throw null; } public static Azure.ResourceManager.Cdn.CdnEndpointData CdnEndpointData(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 originPath = null, System.Collections.Generic.IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = default(bool?), bool? isHttpAllowed = default(bool?), bool? isHttpsAllowed = default(bool?), Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior? queryStringCachingBehavior = default(Azure.ResourceManager.Cdn.Models.QueryStringCachingBehavior?), Azure.ResourceManager.Cdn.Models.OptimizationType? optimizationType = default(Azure.ResourceManager.Cdn.Models.OptimizationType?), string probePath = null, System.Collections.Generic.IEnumerable geoFilters = null, Azure.Core.ResourceIdentifier defaultOriginGroupId = null, System.Collections.Generic.IEnumerable uriSigningKeys = null, Azure.ResourceManager.Cdn.Models.EndpointDeliveryPolicy deliveryPolicy = null, Azure.Core.ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, System.Collections.Generic.IEnumerable origins = null, System.Collections.Generic.IEnumerable originGroups = null, System.Collections.Generic.IEnumerable deepCreatedCustomDomains = null, Azure.ResourceManager.Cdn.Models.EndpointResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.EndpointResourceState?), Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.CdnEndpointProvisioningState?)) { throw null; } + public static Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent CdnMigrationToAfdContent(Azure.ResourceManager.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), System.Collections.Generic.IEnumerable migrationEndpointMappings = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.Cdn.CdnOriginData CdnOriginData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string hostName = null, int? httpPort = default(int?), int? httpsPort = default(int?), string originHostHeader = null, int? priority = default(int?), int? weight = default(int?), bool? enabled = default(bool?), string privateLinkAlias = null, Azure.Core.ResourceIdentifier privateLinkResourceId = null, string privateLinkLocation = null, string privateLinkApprovalMessage = null, Azure.ResourceManager.Cdn.Models.OriginResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.OriginResourceState?), Azure.ResourceManager.Cdn.Models.OriginProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.OriginProvisioningState?), Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus? privateEndpointStatus = default(Azure.ResourceManager.Cdn.Models.PrivateEndpointStatus?)) { throw null; } public static Azure.ResourceManager.Cdn.CdnOriginGroupData CdnOriginGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Cdn.Models.HealthProbeSettings healthProbeSettings = null, System.Collections.Generic.IEnumerable origins = null, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes = default(int?), Azure.ResourceManager.Cdn.Models.ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings = null, Azure.ResourceManager.Cdn.Models.OriginGroupResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.OriginGroupResourceState?), Azure.ResourceManager.Cdn.Models.OriginGroupProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.OriginGroupProvisioningState?)) { throw null; } @@ -1123,7 +1192,9 @@ public static partial class ArmCdnModelFactory public static Azure.ResourceManager.Cdn.Models.MetricsResponse MetricsResponse(System.DateTimeOffset? dateTimeBegin = default(System.DateTimeOffset?), System.DateTimeOffset? dateTimeEnd = default(System.DateTimeOffset?), Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity? granularity = default(Azure.ResourceManager.Cdn.Models.MetricsResponseGranularity?), System.Collections.Generic.IEnumerable series = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric = null, Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit? unit = default(Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesItemUnit?), System.Collections.Generic.IEnumerable groups = null, System.Collections.Generic.IEnumerable data = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MetricsResponseSeriesPropertiesItemsItem MetricsResponseSeriesPropertiesItemsItem(string name = null, string value = null) { throw null; } - public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(string id = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } + public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(Azure.Core.ResourceIdentifier resourceId = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Cdn.Models.MigrateResult MigrateResult(string Id = null, string migrateResultType = null, Azure.Core.ResourceIdentifier migratedProfileResourceIdId = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MigrationContent MigrationContent(Azure.ResourceManager.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), Azure.Core.ResourceIdentifier classicResourceReferenceId = null, string profileName = null, System.Collections.Generic.IEnumerable migrationWebApplicationFirewallMappings = null) { throw null; } public static Azure.ResourceManager.Cdn.Models.MigrationErrorType MigrationErrorType(string code = null, string resourceName = null, string errorMessage = null, string nextSteps = null) { throw null; } public static Azure.ResourceManager.Cdn.ProfileData ProfileData(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.Cdn.Models.CdnSkuName? skuName = default(Azure.ResourceManager.Cdn.Models.CdnSkuName?), string kind = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.Cdn.Models.ProfileResourceState? resourceState = default(Azure.ResourceManager.Cdn.Models.ProfileResourceState?), Azure.ResourceManager.Cdn.Models.ProfileProvisioningState? provisioningState = default(Azure.ResourceManager.Cdn.Models.ProfileProvisioningState?), System.Collections.Generic.IReadOnlyDictionary extendedProperties = null, System.Guid? frontDoorId = default(System.Guid?), int? originResponseTimeoutSeconds = default(int?), Azure.ResourceManager.Cdn.Models.ProfileLogScrubbing logScrubbing = null) { throw null; } @@ -1199,14 +1270,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 CacheExpirationActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheExpirationActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public CacheExpirationActionProperties(Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting cacheBehavior, Azure.ResourceManager.Cdn.Models.CdnCacheLevel cacheType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CacheExpirationActionProperties(Azure.ResourceManager.Cdn.Models.CacheExpirationActionType actionType, Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting cacheBehavior, Azure.ResourceManager.Cdn.Models.CdnCacheLevel cacheType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CacheExpirationActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CacheBehaviorSetting CacheBehavior { get { throw null; } set { } } public System.TimeSpan? CacheDuration { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CdnCacheLevel CacheType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1230,13 +1304,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CacheExpirationActionType left, Azure.ResourceManager.Cdn.Models.CacheExpirationActionType right) { throw null; } public override string ToString() { throw null; } } - public partial class CacheKeyQueryStringActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CacheKeyQueryStringActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CacheKeyQueryStringActionProperties(Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType actionType, Azure.ResourceManager.Cdn.Models.QueryStringBehavior queryStringBehavior) { } + public CacheKeyQueryStringActionProperties(Azure.ResourceManager.Cdn.Models.QueryStringBehavior queryStringBehavior) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionType ActionType { get { throw null; } set { } } public string QueryParameters { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.QueryStringBehavior QueryStringBehavior { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CacheKeyQueryStringActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1296,7 +1373,9 @@ internal CanMigrateResult() { } public string CanMigrateResultType { get { throw null; } } public Azure.ResourceManager.Cdn.Models.CanMigrateDefaultSku? DefaultSku { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Id { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CanMigrateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1321,12 +1400,15 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CdnCacheLevel left, Azure.ResourceManager.Cdn.Models.CdnCacheLevel right) { throw null; } public override string ToString() { throw null; } } - public partial class CdnCertificateSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CdnCertificateSource : Azure.ResourceManager.Cdn.Models.CertificateSourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CdnCertificateSource(Azure.ResourceManager.Cdn.Models.CdnCertificateSourceType sourceType, Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType certificateType) { } + public CdnCertificateSource(Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType certificateType) { } public Azure.ResourceManager.Cdn.Models.CdnManagedCertificateType CertificateType { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CdnCertificateSourceType SourceType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CdnCertificateSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CdnCertificateSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1436,6 +1518,18 @@ 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 CdnMigrationToAfdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CdnMigrationToAfdContent(Azure.ResourceManager.Cdn.Models.CdnSku sku) { } + public System.Collections.Generic.IList MigrationEndpointMappings { get { throw null; } } + public Azure.ResourceManager.Cdn.Models.CdnSkuName? SkuName { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CdnMigrationToAfdContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public enum CdnMinimumTlsVersion { None = 0, @@ -1619,6 +1713,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.CertificateDeleteAction left, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction right) { throw null; } public override string ToString() { throw null; } } + public abstract partial class CertificateSourceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected CertificateSourceProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CertificateSourceProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.CertificateSourceProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 CertificateUpdateAction : System.IEquatable { @@ -1648,15 +1752,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 ClientPortMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ClientPortMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ClientPortMatchCondition(Azure.ResourceManager.Cdn.Models.ClientPortMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.ClientPortOperator clientPortOperator) { } + public ClientPortMatchCondition(Azure.ResourceManager.Cdn.Models.ClientPortOperator clientPortOperator) { } public Azure.ResourceManager.Cdn.Models.ClientPortOperator ClientPortOperator { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.ClientPortMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ClientPortMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ClientPortMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1778,16 +1885,19 @@ 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 CookiesMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class CookiesMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public CookiesMatchCondition(Azure.ResourceManager.Cdn.Models.CookiesMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.CookiesOperator cookiesOperator) { } + public CookiesMatchCondition(Azure.ResourceManager.Cdn.Models.CookiesOperator cookiesOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.CookiesMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CookiesOperator CookiesOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CookiesMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.CookiesMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2057,6 +2167,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 abstract partial class DeliveryRuleActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DeliveryRuleActionProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeliveryRuleCacheExpirationAction : Azure.ResourceManager.Cdn.Models.DeliveryRuleAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeliveryRuleCacheExpirationAction(Azure.ResourceManager.Cdn.Models.CacheExpirationActionProperties properties) { } @@ -2100,6 +2220,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 abstract partial class DeliveryRuleConditionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DeliveryRuleConditionProperties() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeliveryRuleCookiesCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleCondition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DeliveryRuleCookiesCondition(Azure.ResourceManager.Cdn.Models.CookiesMatchCondition properties) { } @@ -2317,15 +2447,18 @@ 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 DeliveryRuleSslProtocolMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class DeliveryRuleSslProtocolMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public DeliveryRuleSslProtocolMatchCondition(Azure.ResourceManager.Cdn.Models.SslProtocolMatchConditionType sslProtocolMatchConditionType, Azure.ResourceManager.Cdn.Models.SslProtocolOperator sslProtocolOperator) { } + public DeliveryRuleSslProtocolMatchCondition(Azure.ResourceManager.Cdn.Models.SslProtocolOperator sslProtocolOperator) { } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.SslProtocolMatchConditionType SslProtocolMatchConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.SslProtocolOperator SslProtocolOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.DeliveryRuleSslProtocolMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.DeliveryRuleSslProtocolMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2585,6 +2718,8 @@ public partial class FrontDoorCustomDomainHttpsContent : System.ClientModel.Prim { public FrontDoorCustomDomainHttpsContent(Azure.ResourceManager.Cdn.Models.FrontDoorCertificateType certificateType) { } public Azure.ResourceManager.Cdn.Models.FrontDoorCertificateType CertificateType { get { throw null; } set { } } + public Azure.ResourceManager.Cdn.Models.AfdCipherSuiteSetType? CipherSuiteSetType { get { throw null; } set { } } + public Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet CustomizedCipherSuiteSet { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.FrontDoorMinimumTlsVersion? MinimumTlsVersion { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretId { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2594,6 +2729,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 FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet() { } + public System.Collections.Generic.IList CipherSuiteSetForTls12 { get { throw null; } } + public System.Collections.Generic.IList CipherSuiteSetForTls13 { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FrontDoorCustomDomainPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FrontDoorCustomDomainPatch() { } @@ -2663,6 +2810,7 @@ public enum FrontDoorMinimumTlsVersion { Tls1_0 = 0, Tls1_2 = 1, + Tls1_3 = 2, } public partial class FrontDoorOriginGroupPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -2905,14 +3053,17 @@ public enum GeoFilterAction public static bool operator !=(Azure.ResourceManager.Cdn.Models.HeaderAction left, Azure.ResourceManager.Cdn.Models.HeaderAction right) { throw null; } public override string ToString() { throw null; } } - public partial class HeaderActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HeaderActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public HeaderActionProperties(Azure.ResourceManager.Cdn.Models.HeaderAction headerAction, string headerName) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HeaderActionProperties(Azure.ResourceManager.Cdn.Models.HeaderActionType actionType, Azure.ResourceManager.Cdn.Models.HeaderAction headerAction, string headerName) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HeaderActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HeaderAction HeaderAction { get { throw null; } set { } } public string HeaderName { get { throw null; } set { } } public string Value { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HeaderActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HeaderActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2973,15 +3124,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 HostNameMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HostNameMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HostNameMatchCondition(Azure.ResourceManager.Cdn.Models.HostNameMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.HostNameOperator hostNameOperator) { } + public HostNameMatchCondition(Azure.ResourceManager.Cdn.Models.HostNameOperator hostNameOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HostNameMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HostNameOperator HostNameOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HostNameMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HostNameMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3061,15 +3215,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.HttpsRedirect left, Azure.ResourceManager.Cdn.Models.HttpsRedirect right) { throw null; } public override string ToString() { throw null; } } - public partial class HttpVersionMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class HttpVersionMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public HttpVersionMatchCondition(Azure.ResourceManager.Cdn.Models.HttpVersionMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.HttpVersionOperator httpVersionOperator) { } + public HttpVersionMatchCondition(Azure.ResourceManager.Cdn.Models.HttpVersionOperator httpVersionOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.HttpVersionMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.HttpVersionOperator HttpVersionOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HttpVersionMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.HttpVersionMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3123,15 +3280,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 IsDeviceMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class IsDeviceMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public IsDeviceMatchCondition(Azure.ResourceManager.Cdn.Models.IsDeviceMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.IsDeviceOperator isDeviceOperator) { } + public IsDeviceMatchCondition(Azure.ResourceManager.Cdn.Models.IsDeviceOperator isDeviceOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.IsDeviceMatchConditionType ConditionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.IsDeviceOperator IsDeviceOperator { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.IsDeviceMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.IsDeviceMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3190,18 +3350,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.IsDeviceOperator left, Azure.ResourceManager.Cdn.Models.IsDeviceOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class KeyVaultCertificateSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class KeyVaultCertificateSource : Azure.ResourceManager.Cdn.Models.CertificateSourceProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public KeyVaultCertificateSource(Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, Azure.ResourceManager.Cdn.Models.CertificateUpdateAction updateRule, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction deleteRule) { } + public KeyVaultCertificateSource(string subscriptionId, string resourceGroupName, string vaultName, string secretName, Azure.ResourceManager.Cdn.Models.CertificateUpdateAction updateRule, Azure.ResourceManager.Cdn.Models.CertificateDeleteAction deleteRule) { } public Azure.ResourceManager.Cdn.Models.CertificateDeleteAction DeleteRule { get { throw null; } set { } } public string ResourceGroupName { get { throw null; } set { } } public string SecretName { get { throw null; } set { } } public string SecretVersion { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSourceType SourceType { get { throw null; } set { } } public string SubscriptionId { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CertificateUpdateAction UpdateRule { get { throw null; } set { } } public string VaultName { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.KeyVaultCertificateSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3628,9 +3791,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class MigrateResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MigrateResult() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public string Id { get { throw null; } } public Azure.Core.ResourceIdentifier MigratedProfileResourceIdId { get { throw null; } } public string MigrateResultType { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.MigrateResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -3652,6 +3817,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 MigrationEndpointMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MigrationEndpointMapping() { } + public string MigratedFrom { get { throw null; } set { } } + public string MigratedTo { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.MigrationEndpointMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Cdn.Models.MigrationEndpointMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class MigrationErrorType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MigrationErrorType() { } @@ -3722,12 +3899,15 @@ 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 OriginGroupOverrideActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class OriginGroupOverrideActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public OriginGroupOverrideActionProperties(Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionType actionType, Azure.ResourceManager.Resources.Models.WritableSubResource originGroup) { } + public OriginGroupOverrideActionProperties(Azure.ResourceManager.Resources.Models.WritableSubResource originGroup) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionType ActionType { get { throw null; } set { } } public Azure.Core.ResourceIdentifier OriginGroupId { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.OriginGroupOverrideActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -3948,16 +4128,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.PolicySettingsDefaultCustomBlockResponseStatusCode left, Azure.ResourceManager.Cdn.Models.PolicySettingsDefaultCustomBlockResponseStatusCode right) { throw null; } public override string ToString() { throw null; } } - public partial class PostArgsMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class PostArgsMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public PostArgsMatchCondition(Azure.ResourceManager.Cdn.Models.PostArgsMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.PostArgsOperator postArgsOperator) { } + public PostArgsMatchCondition(Azure.ResourceManager.Cdn.Models.PostArgsOperator postArgsOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.PostArgsMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.PostArgsOperator PostArgsOperator { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.PostArgsMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.PostArgsMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4260,15 +4443,18 @@ public enum QueryStringCachingBehavior BypassCaching = 2, UseQueryString = 3, } - public partial class QueryStringMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class QueryStringMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public QueryStringMatchCondition(Azure.ResourceManager.Cdn.Models.QueryStringMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.QueryStringOperator queryStringOperator) { } + public QueryStringMatchCondition(Azure.ResourceManager.Cdn.Models.QueryStringOperator queryStringOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.QueryStringMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.QueryStringOperator QueryStringOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.QueryStringMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.QueryStringMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4400,15 +4586,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.ResourceManager.Cdn.Models.RedirectType left, Azure.ResourceManager.Cdn.Models.RedirectType right) { throw null; } public override string ToString() { throw null; } } - public partial class RemoteAddressMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RemoteAddressMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RemoteAddressMatchCondition(Azure.ResourceManager.Cdn.Models.RemoteAddressMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RemoteAddressOperator remoteAddressOperator) { } + public RemoteAddressMatchCondition(Azure.ResourceManager.Cdn.Models.RemoteAddressOperator remoteAddressOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RemoteAddressMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RemoteAddressOperator RemoteAddressOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RemoteAddressMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RemoteAddressMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4451,15 +4640,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RemoteAddressOperator left, Azure.ResourceManager.Cdn.Models.RemoteAddressOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestBodyMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestBodyMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestBodyMatchCondition(Azure.ResourceManager.Cdn.Models.RequestBodyMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestBodyOperator requestBodyOperator) { } + public RequestBodyMatchCondition(Azure.ResourceManager.Cdn.Models.RequestBodyOperator requestBodyOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestBodyMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestBodyOperator RequestBodyOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestBodyMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestBodyMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4509,16 +4701,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestBodyOperator left, Azure.ResourceManager.Cdn.Models.RequestBodyOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestHeaderMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestHeaderMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestHeaderMatchCondition(Azure.ResourceManager.Cdn.Models.RequestHeaderMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestHeaderOperator requestHeaderOperator) { } + public RequestHeaderMatchCondition(Azure.ResourceManager.Cdn.Models.RequestHeaderOperator requestHeaderOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestHeaderMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestHeaderOperator RequestHeaderOperator { get { throw null; } set { } } public string Selector { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestHeaderMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestHeaderMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4568,15 +4763,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestHeaderOperator left, Azure.ResourceManager.Cdn.Models.RequestHeaderOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestMethodMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestMethodMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestMethodMatchCondition(Azure.ResourceManager.Cdn.Models.RequestMethodMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestMethodOperator requestMethodOperator) { } + public RequestMethodMatchCondition(Azure.ResourceManager.Cdn.Models.RequestMethodOperator requestMethodOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestMethodMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestMethodOperator RequestMethodOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestMethodMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestMethodMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4640,15 +4838,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestMethodOperator left, Azure.ResourceManager.Cdn.Models.RequestMethodOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestSchemeMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestSchemeMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestSchemeMatchCondition(Azure.ResourceManager.Cdn.Models.RequestSchemeMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestSchemeOperator requestSchemeOperator) { } + public RequestSchemeMatchCondition(Azure.ResourceManager.Cdn.Models.RequestSchemeOperator requestSchemeOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestSchemeMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestSchemeOperator RequestSchemeOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestSchemeMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestSchemeMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4707,15 +4908,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.RequestSchemeOperator left, Azure.ResourceManager.Cdn.Models.RequestSchemeOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class RequestUriMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RequestUriMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RequestUriMatchCondition(Azure.ResourceManager.Cdn.Models.RequestUriMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.RequestUriOperator requestUriOperator) { } + public RequestUriMatchCondition(Azure.ResourceManager.Cdn.Models.RequestUriOperator requestUriOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RequestUriMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RequestUriOperator RequestUriOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestUriMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RequestUriMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -4850,13 +5054,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 RouteConfigurationOverrideActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class RouteConfigurationOverrideActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public RouteConfigurationOverrideActionProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public RouteConfigurationOverrideActionProperties(Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionType actionType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.CacheConfiguration CacheConfiguration { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.OriginGroupOverride OriginGroupOverride { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.RouteConfigurationOverrideActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5063,15 +5270,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 ServerPortMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class ServerPortMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ServerPortMatchCondition(Azure.ResourceManager.Cdn.Models.ServerPortMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.ServerPortOperator serverPortOperator) { } + public ServerPortMatchCondition(Azure.ResourceManager.Cdn.Models.ServerPortOperator serverPortOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.ServerPortMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.ServerPortOperator ServerPortOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ServerPortMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.ServerPortMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5144,15 +5354,18 @@ public enum SharedPrivateLinkResourceStatus Disconnected = 3, Timeout = 4, } - public partial class SocketAddressMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class SocketAddressMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public SocketAddressMatchCondition(Azure.ResourceManager.Cdn.Models.SocketAddressMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.SocketAddressOperator socketAddressOperator) { } + public SocketAddressMatchCondition(Azure.ResourceManager.Cdn.Models.SocketAddressOperator socketAddressOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.SocketAddressMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.SocketAddressOperator SocketAddressOperator { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.SocketAddressMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.SocketAddressMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5272,15 +5485,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.TransformType left, Azure.ResourceManager.Cdn.Models.TransformType right) { throw null; } public override string ToString() { throw null; } } - public partial class UriFileExtensionMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriFileExtensionMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriFileExtensionMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator uriFileExtensionOperator) { } + public UriFileExtensionMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator uriFileExtensionOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator UriFileExtensionOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileExtensionMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5330,15 +5546,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator left, Azure.ResourceManager.Cdn.Models.UriFileExtensionOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class UriFileNameMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriFileNameMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriFileNameMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileNameMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriFileNameOperator uriFileNameOperator) { } + public UriFileNameMatchCondition(Azure.ResourceManager.Cdn.Models.UriFileNameOperator uriFileNameOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriFileNameMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriFileNameOperator UriFileNameOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileNameMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriFileNameMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5388,15 +5607,18 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Cdn.Models.UriFileNameOperator left, Azure.ResourceManager.Cdn.Models.UriFileNameOperator right) { throw null; } public override string ToString() { throw null; } } - public partial class UriPathMatchCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriPathMatchCondition : Azure.ResourceManager.Cdn.Models.DeliveryRuleConditionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriPathMatchCondition(Azure.ResourceManager.Cdn.Models.UriPathMatchConditionType conditionType, Azure.ResourceManager.Cdn.Models.UriPathOperator uriPathOperator) { } + public UriPathMatchCondition(Azure.ResourceManager.Cdn.Models.UriPathOperator uriPathOperator) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriPathMatchConditionType ConditionType { get { throw null; } set { } } public System.Collections.Generic.IList MatchValues { get { throw null; } } public bool? NegateCondition { get { throw null; } set { } } public System.Collections.Generic.IList Transforms { get { throw null; } } public Azure.ResourceManager.Cdn.Models.UriPathOperator UriPathOperator { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriPathMatchCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriPathMatchCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5458,9 +5680,12 @@ 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 UriRedirectActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriRedirectActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.RedirectType redirectType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.UriRedirectActionType actionType, Azure.ResourceManager.Cdn.Models.RedirectType redirectType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriRedirectActionType ActionType { get { throw null; } set { } } public string CustomFragment { get { throw null; } set { } } public string CustomHostname { get { throw null; } set { } } @@ -5468,7 +5693,7 @@ public UriRedirectActionProperties(Azure.ResourceManager.Cdn.Models.UriRedirectA public string CustomQueryString { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.DestinationProtocol? DestinationProtocol { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.RedirectType RedirectType { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRedirectActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRedirectActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5503,14 +5728,17 @@ 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 UriRewriteActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriRewriteActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriRewriteActionProperties(Azure.ResourceManager.Cdn.Models.UriRewriteActionType actionType, string sourcePattern, string destination) { } + public UriRewriteActionProperties(string sourcePattern, string destination) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriRewriteActionType ActionType { get { throw null; } set { } } public string Destination { get { throw null; } set { } } public bool? PreserveUnmatchedPath { get { throw null; } set { } } public string SourcePattern { get { throw null; } set { } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRewriteActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriRewriteActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5545,13 +5773,16 @@ 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 UriSigningActionProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class UriSigningActionProperties : Azure.ResourceManager.Cdn.Models.DeliveryRuleActionProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public UriSigningActionProperties() { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriSigningActionProperties(Azure.ResourceManager.Cdn.Models.UriSigningActionType actionType) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public Azure.ResourceManager.Cdn.Models.UriSigningActionType ActionType { get { throw null; } set { } } public Azure.ResourceManager.Cdn.Models.UriSigningAlgorithm? Algorithm { get { throw null; } set { } } public System.Collections.Generic.IList ParameterNameOverride { get { throw null; } } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriSigningActionProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Cdn.Models.UriSigningActionProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -5606,7 +5837,9 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class UriSigningKeyProperties : Azure.ResourceManager.Cdn.Models.FrontDoorSecretProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public UriSigningKeyProperties(string keyId, Azure.ResourceManager.Resources.Models.WritableSubResource secretSource) { } + public UriSigningKeyProperties(string keyId, Azure.ResourceManager.Resources.Models.WritableSubResource secretSource, string secretVersion) { } public string KeyId { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SecretSourceId { get { throw null; } set { } } public string SecretVersion { get { throw null; } set { } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs index c463fa82f17b..616875918ace 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CdnCustomDomainCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Create.json // this example is just showing the usage of "CdnCustomDomains_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_CustomDomainsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_CustomDomainsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_ListByEndpoint.json // this example is just showing the usage of "CdnCustomDomains_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CustomDomainsListByEndpoint() [Ignore("Only validating compilation of examples")] public async Task Exists_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs index 04eb45747b66..22d4ed97a4f6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnCustomDomainResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CdnCustomDomainResource [Ignore("Only validating compilation of examples")] public async Task Get_CustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Get.json // this example is just showing the usage of "CdnCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_CustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Delete.json // this example is just showing the usage of "CdnCustomDomains_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_CustomDomainsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_CustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_Create.json // this example is just showing the usage of "CdnCustomDomains_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 @@ -117,7 +117,7 @@ public async Task Update_CustomDomainsCreate() [Ignore("Only validating compilation of examples")] public async Task DisableCustomHttps_CustomDomainsDisableCustomHttps() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_DisableCustomHttps.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_DisableCustomHttps.json // this example is just showing the usage of "CdnCustomDomains_DisableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 DisableCustomHttps_CustomDomainsDisableCustomHttps() [Ignore("Only validating compilation of examples")] public async Task EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingCDNManagedCertificate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_EnableCustomHttpsUsingCDNManagedCertificate.json // this example is just showing the usage of "CdnCustomDomains_EnableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingCDNManage [Ignore("Only validating compilation of examples")] public async Task EnableCustomHttps_CustomDomainsEnableCustomHttpsUsingYourOwnCertificate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CustomDomains_EnableCustomHttpsUsingBYOC.json // this example is just showing the usage of "CdnCustomDomains_EnableCustomHttps" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs index def9b6841bed..6442762fa86c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CdnEndpointCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EndpointsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Create.json // this example is just showing the usage of "CdnEndpoints_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_EndpointsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EndpointsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_EndpointsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_ListByProfile.json // this example is just showing the usage of "CdnEndpoints_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EndpointsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EndpointsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs index 2a175eb99baf..14e36b16b9a0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnEndpointResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CdnEndpointResource [Ignore("Only validating compilation of examples")] public async Task Get_EndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Get.json // this example is just showing the usage of "CdnEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EndpointsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_EndpointsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Delete.json // this example is just showing the usage of "CdnEndpoints_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_EndpointsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_EndpointsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Update.json // this example is just showing the usage of "CdnEndpoints_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_EndpointsUpdate() [Ignore("Only validating compilation of examples")] public async Task Start_EndpointsStart() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Start.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Start.json // this example is just showing the usage of "CdnEndpoints_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 @@ -149,7 +149,7 @@ public async Task Start_EndpointsStart() [Ignore("Only validating compilation of examples")] public async Task Stop_EndpointsStop() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_Stop.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_Stop.json // this example is just showing the usage of "CdnEndpoints_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 @@ -181,7 +181,7 @@ public async Task Stop_EndpointsStop() [Ignore("Only validating compilation of examples")] public async Task PurgeContent_EndpointsPurgeContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_PurgeContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_PurgeContent.json // this example is just showing the usage of "CdnEndpoints_PurgeContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 PurgeContent_EndpointsPurgeContent() [Ignore("Only validating compilation of examples")] public async Task LoadContent_EndpointsLoadContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_LoadContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_LoadContent.json // this example is just showing the usage of "CdnEndpoints_LoadContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 LoadContent_EndpointsLoadContent() [Ignore("Only validating compilation of examples")] public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ValidateCustomDomain.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_ValidateCustomDomain.json // this example is just showing the usage of "CdnEndpoints_ValidateCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,7 +265,7 @@ public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_EndpointsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Endpoints_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Endpoints_ListResourceUsage.json // this example is just showing the usage of "CdnEndpoints_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs index 02988800ba18..e2faed456d78 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CdnOriginCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_OriginsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Create.json // this example is just showing the usage of "CdnOrigins_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_OriginsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_OriginsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_ListByEndpoint.json // this example is just showing the usage of "CdnOrigins_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginsListByEndpoint() [Ignore("Only validating compilation of examples")] public async Task Exists_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs index 0081b71ce2be..d8cd44153951 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CdnOriginGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_OriginGroupsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Create.json // this example is just showing the usage of "CdnOriginGroups_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 @@ -76,7 +76,7 @@ public async Task CreateOrUpdate_OriginGroupsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_OriginsGroupsListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_ListByEndpoint.json // this example is just showing the usage of "CdnOriginGroups_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_OriginsGroupsListByEndpoint() [Ignore("Only validating compilation of examples")] public async Task Exists_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs index 34b87c0f3f22..723d48561c9d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginGroupResource.cs @@ -21,7 +21,7 @@ public partial class Sample_CdnOriginGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_OriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Get.json // this example is just showing the usage of "CdnOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_OriginGroupsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Delete.json // this example is just showing the usage of "CdnOriginGroups_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_OriginGroupsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_OriginGroupsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/OriginGroups_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/OriginGroups_Update.json // this example is just showing the usage of "CdnOriginGroups_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs index 4338971bc13d..6f23d65ec21a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnOriginResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CdnOriginResource [Ignore("Only validating compilation of examples")] public async Task Get_OriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Get.json // this example is just showing the usage of "CdnOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_OriginsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_OriginsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Delete.json // this example is just showing the usage of "CdnOrigins_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_OriginsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_OriginsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Origins_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Origins_Update.json // this example is just showing the usage of "CdnOrigins_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs index 5336a99c9590..8f8c35f73b76 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CdnWebApplicationFirewallPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesSpecificPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "Policies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesSpecificPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListPoliciesInAResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafListPolicies.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafListPolicies.json // this example is just showing the usage of "Policies_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 @@ -191,7 +191,7 @@ public async Task GetAll_ListPoliciesInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs index b637b928fbb9..f779af7cdd09 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_CdnWebApplicationFirewallPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CdnWebApplicationFirewallPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteProtectionPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPolicyDelete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPolicyDelete.json // this example is just showing the usage of "Policies_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_DeleteProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesSpecificPolicy() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafPatchPolicy.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafPatchPolicy.json // this example is just showing the usage of "Policies_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs index 7330b9ede146..4b5c757ddb05 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorCustomDomainCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AFDCustomDomainsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Create.json // this example is just showing the usage of "FrontDoorCustomDomains_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 @@ -45,7 +45,13 @@ public async Task CreateOrUpdate_AFDCustomDomainsCreate() { TlsSettings = new FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType.ManagedCertificate) { + CipherSuiteSetType = AfdCipherSuiteSetType.Customized, MinimumTlsVersion = FrontDoorMinimumTlsVersion.Tls1_2, + CustomizedCipherSuiteSet = new FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet + { + CipherSuiteSetForTls12 = { AfdCustomizedCipherSuiteForTls12.Ecdhe_Rsa_Aes128_Gcm_Sha256 }, + CipherSuiteSetForTls13 = { AfdCustomizedCipherSuiteForTls13.Tls_Aes_128_Gcm_Sha256, AfdCustomizedCipherSuiteForTls13.Tls_Aes_256_Gcm_Sha384 }, + }, }, DnsZoneId = new ResourceIdentifier(""), HostName = "www.someDomain.net", @@ -64,7 +70,7 @@ public async Task CreateOrUpdate_AFDCustomDomainsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +104,7 @@ public async Task Get_AFDCustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AFDCustomDomainsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_ListByProfile.json // this example is just showing the usage of "FrontDoorCustomDomains_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +140,7 @@ public async Task GetAll_AFDCustomDomainsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +170,7 @@ public async Task Exists_AFDCustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs index 5decd9ec0760..cbc7b639d5a1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorCustomDomainResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorCustomDomainResource [Ignore("Only validating compilation of examples")] public async Task Get_AFDCustomDomainsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Get.json // this example is just showing the usage of "FrontDoorCustomDomains_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDCustomDomainsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AFDCustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Delete.json // this example is just showing the usage of "FrontDoorCustomDomains_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_AFDCustomDomainsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AFDCustomDomainsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_Update.json // this example is just showing the usage of "FrontDoorCustomDomains_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 @@ -98,9 +98,15 @@ public async Task Update_AFDCustomDomainsUpdate() // invoke the operation FrontDoorCustomDomainPatch patch = new FrontDoorCustomDomainPatch { - TlsSettings = new FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType.CustomerCertificate) + TlsSettings = new FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType.ManagedCertificate) { + CipherSuiteSetType = AfdCipherSuiteSetType.Customized, MinimumTlsVersion = FrontDoorMinimumTlsVersion.Tls1_2, + CustomizedCipherSuiteSet = new FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet + { + CipherSuiteSetForTls12 = { AfdCustomizedCipherSuiteForTls12.Ecdhe_Rsa_Aes128_Gcm_Sha256 }, + CipherSuiteSetForTls13 = { AfdCustomizedCipherSuiteForTls13.Tls_Aes_128_Gcm_Sha256, AfdCustomizedCipherSuiteForTls13.Tls_Aes_256_Gcm_Sha384 }, + }, }, DnsZoneId = new ResourceIdentifier(""), }; @@ -118,7 +124,7 @@ public async Task Update_AFDCustomDomainsUpdate() [Ignore("Only validating compilation of examples")] public async Task RefreshValidationToken_AFDCustomDomainsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDCustomDomains_RefreshValidationToken.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDCustomDomains_RefreshValidationToken.json // this example is just showing the usage of "FrontDoorCustomDomains_RefreshValidationToken" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs index 698f61cc11fe..14a01f5121b2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontDoorEndpointCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AFDEndpointsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Create.json // this example is just showing the usage of "FrontDoorEndpoints_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 @@ -55,7 +55,7 @@ public async Task CreateOrUpdate_AFDEndpointsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDEndpointsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AFDEndpointsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_ListByProfile.json // this example is just showing the usage of "FrontDoorEndpoints_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDEndpointsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDEndpointsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs index 58377afbb812..52e7ebaac749 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorEndpointResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorEndpointResource [Ignore("Only validating compilation of examples")] public async Task Get_AFDEndpointsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Get.json // this example is just showing the usage of "FrontDoorEndpoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDEndpointsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AFDEndpointsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Delete.json // this example is just showing the usage of "FrontDoorEndpoints_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_AFDEndpointsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AFDEndpointsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_Update.json // this example is just showing the usage of "FrontDoorEndpoints_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 @@ -115,7 +115,7 @@ public async Task Update_AFDEndpointsUpdate() [Ignore("Only validating compilation of examples")] public async Task PurgeContent_AFDEndpointsPurgeContent() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_PurgeContent.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_PurgeContent.json // this example is just showing the usage of "FrontDoorEndpoints_PurgeContent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 PurgeContent_AFDEndpointsPurgeContent() [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_AFDEndpointsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_ListResourceUsage.json // this example is just showing the usage of "FrontDoorEndpoints_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetResourceUsages_AFDEndpointsListResourceUsage() [Ignore("Only validating compilation of examples")] public async Task ValidateCustomDomain_EndpointsValidateCustomDomain() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDEndpoints_ValidateCustomDomain.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDEndpoints_ValidateCustomDomain.json // this example is just showing the usage of "FrontDoorEndpoints_ValidateCustomDomain" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs index 33a4c830e63b..1e65897e6190 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorOriginCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AFDOriginsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Create.json // this example is just showing the usage of "FrontDoorOrigins_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 @@ -64,7 +64,7 @@ public async Task CreateOrUpdate_AFDOriginsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AFDOriginsListByOriginGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_ListByOriginGroup.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_ListByOriginGroup.json // this example is just showing the usage of "FrontDoorOrigins_ListByOriginGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginsListByOriginGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs index e4dc0545d80e..5e4bff023282 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorOriginGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AFDOriginGroupsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Create.json // this example is just showing the usage of "FrontDoorOriginGroups_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_AFDOriginGroupsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_AFDOriginGroupsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_ListByProfile.json // this example is just showing the usage of "FrontDoorOriginGroups_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginGroupsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs index 50600cc1b631..1290bd257532 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorOriginGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_AFDOriginGroupsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Get.json // this example is just showing the usage of "FrontDoorOriginGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginGroupsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AFDOriginGroupsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Delete.json // this example is just showing the usage of "FrontDoorOriginGroups_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_AFDOriginGroupsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AFDOriginGroupsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_Update.json // this example is just showing the usage of "FrontDoorOriginGroups_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 @@ -127,7 +127,7 @@ public async Task Update_AFDOriginGroupsUpdate() [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_AFDOriginGroupsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOriginGroups_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOriginGroups_ListResourceUsage.json // this example is just showing the usage of "FrontDoorOriginGroups_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs index 094a880cdc99..4ac7a624b6b7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorOriginResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorOriginResource [Ignore("Only validating compilation of examples")] public async Task Get_AFDOriginsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Get.json // this example is just showing the usage of "FrontDoorOrigins_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AFDOriginsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_AFDOriginsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Delete.json // this example is just showing the usage of "FrontDoorOrigins_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_AFDOriginsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_AFDOriginsUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDOrigins_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDOrigins_Update.json // this example is just showing the usage of "FrontDoorOrigins_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs index 5554ae10d410..f5c1b0099312 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FrontDoorRouteCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RoutesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Create.json // this example is just showing the usage of "FrontDoorRoutes_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 @@ -86,7 +86,7 @@ public async Task CreateOrUpdate_RoutesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Get_RoutesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RoutesListByEndpoint() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_ListByEndpoint.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_ListByEndpoint.json // this example is just showing the usage of "FrontDoorRoutes_ListByEndpoint" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_RoutesListByEndpoint() [Ignore("Only validating compilation of examples")] public async Task Exists_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task Exists_RoutesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs index bcb8607610ad..828b3a90e720 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRouteResource.cs @@ -21,7 +21,7 @@ public partial class Sample_FrontDoorRouteResource [Ignore("Only validating compilation of examples")] public async Task Get_RoutesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Get.json // this example is just showing the usage of "FrontDoorRoutes_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RoutesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RoutesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Delete.json // this example is just showing the usage of "FrontDoorRoutes_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_RoutesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RoutesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Routes_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Routes_Update.json // this example is just showing the usage of "FrontDoorRoutes_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs index 202579210b7d..09b10f973279 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RulesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Create.json // this example is just showing the usage of "FrontDoorRules_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 @@ -45,12 +45,12 @@ public async Task CreateOrUpdate_RulesCreate() FrontDoorRuleData data = new FrontDoorRuleData { Order = 1, - Conditions = {new DeliveryRuleRequestMethodCondition(new RequestMethodMatchCondition(RequestMethodMatchConditionType.RequestMethodCondition, RequestMethodOperator.Equal) + Conditions = {new DeliveryRuleRequestMethodCondition(new RequestMethodMatchCondition(RequestMethodOperator.Equal) { NegateCondition = false, MatchValues = {RequestMethodMatchConditionMatchValue.Get}, })}, - Actions = {new DeliveryRuleResponseHeaderAction(new HeaderActionProperties(HeaderActionType.HeaderAction, HeaderAction.Overwrite, "X-CDN") + Actions = {new DeliveryRuleResponseHeaderAction(new HeaderActionProperties(HeaderAction.Overwrite, "X-CDN") { Value = "MSFT", })}, @@ -69,7 +69,7 @@ public async Task CreateOrUpdate_RulesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RulesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RulesListByRuleSet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_ListByRuleSet.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_ListByRuleSet.json // this example is just showing the usage of "FrontDoorRules_ListByRuleSet" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RulesListByRuleSet() [Ignore("Only validating compilation of examples")] public async Task Exists_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RulesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs index a046bb329b79..e1e06dc4a25b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_RulesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Get.json // this example is just showing the usage of "FrontDoorRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RulesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RulesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Delete.json // this example is just showing the usage of "FrontDoorRules_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_RulesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RulesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Rules_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Rules_Update.json // this example is just showing the usage of "FrontDoorRules_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 @@ -102,7 +102,7 @@ public async Task Update_RulesUpdate() FrontDoorRulePatch patch = new FrontDoorRulePatch { Order = 1, - Actions = {new DeliveryRuleResponseHeaderAction(new HeaderActionProperties(HeaderActionType.HeaderAction, HeaderAction.Overwrite, "X-CDN") + Actions = {new DeliveryRuleResponseHeaderAction(new HeaderActionProperties(HeaderAction.Overwrite, "X-CDN") { Value = "MSFT", })}, diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs index 32b4b2cbd2e8..7063f627b9b4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_FrontDoorRuleSetCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_RuleSetsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Create.json // this example is just showing the usage of "FrontDoorRuleSets_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_RuleSetsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RuleSetsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_RuleSetsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_ListByProfile.json // this example is just showing the usage of "FrontDoorRuleSets_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_RuleSetsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_RuleSetsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs index 39ffe8ae683d..d4fba0d7b6a2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorRuleSetResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorRuleSetResource [Ignore("Only validating compilation of examples")] public async Task Get_RuleSetsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Get.json // this example is just showing the usage of "FrontDoorRuleSets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_RuleSetsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_RuleSetsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Delete.json // this example is just showing the usage of "FrontDoorRuleSets_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_RuleSetsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_RuleSetsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_Create.json // this example is just showing the usage of "FrontDoorRuleSets_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 @@ -110,7 +110,7 @@ public async Task Update_RuleSetsCreate() [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_RuleSetsListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/RuleSets_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/RuleSets_ListResourceUsage.json // this example is just showing the usage of "FrontDoorRuleSets_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs index 28d2c6be9c37..12f1146d15fe 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FrontDoorSecretCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SecretsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Create.json // this example is just showing the usage of "FrontDoorSecrets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_SecretsCreate() [Ignore("Only validating compilation of examples")] public async Task Get_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecretsGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SecretsListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_ListByProfile.json // this example is just showing the usage of "FrontDoorSecrets_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecretsListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecretsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs index 0ca2d982b422..82c846340b56 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecretResource.cs @@ -21,7 +21,7 @@ public partial class Sample_FrontDoorSecretResource [Ignore("Only validating compilation of examples")] public async Task Get_SecretsGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Get.json // this example is just showing the usage of "FrontDoorSecrets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecretsGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SecretsDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Delete.json // this example is just showing the usage of "FrontDoorSecrets_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_SecretsDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SecretsCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Secrets_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Secrets_Create.json // this example is just showing the usage of "FrontDoorSecrets_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs index a9694f2505b4..d84b73d57603 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorSecurityPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SecurityPoliciesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Create.json // this example is just showing the usage of "FrontDoorSecurityPolicies_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 @@ -73,7 +73,7 @@ public async Task CreateOrUpdate_SecurityPoliciesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecurityPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_SecurityPoliciesListByProfile() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_ListByProfile.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_ListByProfile.json // this example is just showing the usage of "FrontDoorSecurityPolicies_ListByProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecurityPoliciesListByProfile() [Ignore("Only validating compilation of examples")] public async Task Exists_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecurityPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs index d3f0d547ceec..ed99ee97299b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_FrontDoorSecurityPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorSecurityPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_SecurityPoliciesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Get.json // this example is just showing the usage of "FrontDoorSecurityPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_SecurityPoliciesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_SecurityPoliciesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Delete.json // this example is just showing the usage of "FrontDoorSecurityPolicies_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_SecurityPoliciesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_SecurityPoliciesPatch() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/SecurityPolicies_Patch.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/SecurityPolicies_Patch.json // this example is just showing the usage of "FrontDoorSecurityPolicies_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs index 049fe08d5a67..4e8f062092cb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ProfileCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ProfilesCreate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Create.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Create.json // this example is just showing the usage of "Profiles_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task CreateOrUpdate_ProfilesCreate() [Ignore("Only validating compilation of examples")] public async Task Get_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ProfilesGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ProfilesListByResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListByResourceGroup.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_ListByResourceGroup.json // this example is just showing the usage of "Profiles_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_ProfilesListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ProfilesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs index c01c3cf0be30..917bc812c45f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ProfileResource.cs @@ -22,7 +22,7 @@ public partial class Sample_ProfileResource [Ignore("Only validating compilation of examples")] public async Task Get_ProfilesGet() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Get.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Get.json // this example is just showing the usage of "Profiles_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ProfilesGet() [Ignore("Only validating compilation of examples")] public async Task Delete_ProfilesDelete() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Delete.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Delete.json // this example is just showing the usage of "Profiles_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_ProfilesDelete() [Ignore("Only validating compilation of examples")] public async Task Update_ProfilesUpdate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Update.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Update.json // this example is just showing the usage of "Profiles_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_ProfilesUpdate() [Ignore("Only validating compilation of examples")] public async Task CheckEndpointNameAvailabilityFrontDoorProfile_CheckEndpointNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_CheckEndpointNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDProfiles_CheckEndpointNameAvailability.json // this example is just showing the usage of "FrontDoorProfiles_CheckEndpointNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckEndpointNameAvailabilityFrontDoorProfile_CheckEndpointNam [Ignore("Only validating compilation of examples")] public async Task GetFrontDoorProfileResourceUsages_AFDProfilesListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDProfiles_ListResourceUsage.json // this example is just showing the usage of "FrontDoorProfiles_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetFrontDoorProfileResourceUsages_AFDProfilesListResourceUsage [Ignore("Only validating compilation of examples")] public async Task CheckFrontDoorProfileHostNameAvailability_AFDProfilesCheckHostNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_CheckHostNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDProfiles_CheckHostNameAvailability.json // this example is just showing the usage of "FrontDoorProfiles_CheckHostNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckFrontDoorProfileHostNameAvailability_AFDProfilesCheckHost [Ignore("Only validating compilation of examples")] public async Task ValidateSecretFrontDoorProfile_ValidateSecret() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_ValidateSecret.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDProfiles_ValidateSecret.json // this example is just showing the usage of "FrontDoorProfiles_ValidateSecret" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ValidateSecretFrontDoorProfile_ValidateSecret() [Ignore("Only validating compilation of examples")] public async Task UpgradeFrontDoorProfile_AFDProfilesUpgrade() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/AFDProfiles_Upgrade.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/AFDProfiles_Upgrade.json // this example is just showing the usage of "FrontDoorProfiles_Upgrade" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 UpgradeFrontDoorProfile_AFDProfilesUpgrade() [Ignore("Only validating compilation of examples")] public async Task GetLogAnalyticsRankings_LogAnalyticsGetLogAnalyticsRankings() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsRankings.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/LogAnalytics_GetLogAnalyticsRankings.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsRankings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -302,7 +302,7 @@ public async Task GetLogAnalyticsRankings_LogAnalyticsGetLogAnalyticsRankings() [Ignore("Only validating compilation of examples")] public async Task GetLogAnalyticsLocations_LogAnalyticsGetLogAnalyticsLocations() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsLocations.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/LogAnalytics_GetLogAnalyticsLocations.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsLocations" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +328,7 @@ public async Task GetLogAnalyticsLocations_LogAnalyticsGetLogAnalyticsLocations( [Ignore("Only validating compilation of examples")] public async Task GetLogAnalyticsResources_LogAnalyticsGetLogAnalyticsResources() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetLogAnalyticsResources.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/LogAnalytics_GetLogAnalyticsResources.json // this example is just showing the usage of "LogAnalytics_GetLogAnalyticsResources" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLogAnalyticsResources_LogAnalyticsGetLogAnalyticsResources( [Ignore("Only validating compilation of examples")] public async Task GetWafLogAnalyticsRankings_LogAnalyticsGetWafLogAnalyticsRankings() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/LogAnalytics_GetWafLogAnalyticsRankings.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/LogAnalytics_GetWafLogAnalyticsRankings.json // this example is just showing the usage of "LogAnalytics_GetWafLogAnalyticsRankings" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -386,7 +386,7 @@ public async Task GetWafLogAnalyticsRankings_LogAnalyticsGetWafLogAnalyticsRanki [Ignore("Only validating compilation of examples")] public async Task MigrationCommit_ProfilesMigrationCommit() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_MigrationCommit.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_MigrationCommit.json // this example is just showing the usage of "Profiles_MigrationCommit" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 MigrationCommit_ProfilesMigrationCommit() [Ignore("Only validating compilation of examples")] public async Task GenerateSsoUri_ProfilesGenerateSsoUri() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_GenerateSsoUri.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_GenerateSsoUri.json // this example is just showing the usage of "Profiles_GenerateSsoUri" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GenerateSsoUri_ProfilesGenerateSsoUri() [Ignore("Only validating compilation of examples")] public async Task GetSupportedOptimizationTypes_ProfilesListSupportedOptimizationTypes() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListSupportedOptimizationTypes.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_ListSupportedOptimizationTypes.json // this example is just showing the usage of "Profiles_ListSupportedOptimizationTypes" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetSupportedOptimizationTypes_ProfilesListSupportedOptimizatio [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_ProfilesListResourceUsage() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_ListResourceUsage.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_ListResourceUsage.json // this example is just showing the usage of "Profiles_ListResourceUsage" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -488,5 +488,89 @@ public async Task GetResourceUsages_ProfilesListResourceUsage() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CheckCdnMigrationCompatibility_ProfilesCdnCanMigrate() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CdnProfiles_CanMigrate.json + // this example is just showing the usage of "Profiles_CdnCanMigrateToAfd" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + ArmOperation lro = await profile.CheckCdnMigrationCompatibilityAsync(WaitUntil.Completed); + CanMigrateResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task MigrateCdnToAfd_ProfilesCdnMigrate() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CdnProfiles_Migrate.json + // this example is just showing the usage of "Profiles_CdnMigrateToAfd" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + CdnMigrationToAfdContent content = new CdnMigrationToAfdContent(new CdnSku + { + Name = CdnSkuName.StandardAzureFrontDoor, + }); + ArmOperation lro = await profile.MigrateCdnToAfdAsync(WaitUntil.Completed, content); + MigrateResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AbortMigration_ProfilesCdnMigrationCommit() + { + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_MigrationAbort.json + // this example is just showing the usage of "Profiles_MigrationAbort" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ProfileResource created on azure + // for more information of creating ProfileResource, please refer to the document of ProfileResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "RG"; + string profileName = "profile1"; + ResourceIdentifier profileResourceId = ProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, profileName); + ProfileResource profile = client.GetProfileResource(profileResourceId); + + // invoke the operation + await profile.AbortMigrationAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 3be1ccb0bf96..2a3e06a9bf5a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -22,7 +22,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckEndpointNameAvailability_CheckEndpointNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckEndpointNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CheckEndpointNameAvailability.json // this example is just showing the usage of "CheckEndpointNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CheckEndpointNameAvailability_CheckEndpointNameAvailability() [Ignore("Only validating compilation of examples")] public async Task CanMigrateProfile_ProfilesCanMigrate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_CanMigrate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_CanMigrate.json // this example is just showing the usage of "Profiles_CanMigrate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CanMigrateProfile_ProfilesCanMigrate() [Ignore("Only validating compilation of examples")] public async Task MigrateProfile_ProfilesMigrate() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_Migrate.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_Migrate.json // this example is just showing the usage of "Profiles_Migrate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index be8d97130240..70a3a1a3db64 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckCdnNameAvailabilityWithSubscription_CheckNameAvailabilityWithSubscription() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckNameAvailabilityWithSubscription.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CheckNameAvailabilityWithSubscription.json // this example is just showing the usage of "CheckNameAvailabilityWithSubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -46,7 +46,7 @@ public async Task CheckCdnNameAvailabilityWithSubscription_CheckNameAvailability [Ignore("Only validating compilation of examples")] public async Task ValidateProbe_ValidateProbe() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/ValidateProbe.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/ValidateProbe.json // this example is just showing the usage of "ValidateProbe" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ValidateProbe_ValidateProbe() [Ignore("Only validating compilation of examples")] public async Task GetProfiles_ProfilesList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/Profiles_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/Profiles_List.json // this example is just showing the usage of "Profiles_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 @@ -102,7 +102,7 @@ public async Task GetProfiles_ProfilesList() [Ignore("Only validating compilation of examples")] public async Task GetResourceUsages_ResourceUsageList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/ResourceUsage_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/ResourceUsage_List.json // this example is just showing the usage of "ResourceUsage_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 GetResourceUsages_ResourceUsageList() [Ignore("Only validating compilation of examples")] public async Task GetManagedRuleSets_ListPoliciesInAResourceGroup() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/WafListManagedRuleSets.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/WafListManagedRuleSets.json // this example is just showing the usage of "ManagedRuleSets_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/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs index 15365e7a0a5f..c7a7ea567a05 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_TenantResourceExtensions [Ignore("Only validating compilation of examples")] public async Task CheckCdnNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/CheckNameAvailability.json // this example is just showing the usage of "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 @@ -42,7 +42,7 @@ public async Task CheckCdnNameAvailability_CheckNameAvailability() [Ignore("Only validating compilation of examples")] public async Task GetEdgeNodes_EdgeNodesList() { - // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2024-02-01/examples/EdgeNodes_List.json + // Generated from example definition: specification/cdn/resource-manager/Microsoft.Cdn/stable/2025-04-15/examples/EdgeNodes_List.json // this example is just showing the usage of "EdgeNodes_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/cdn/Azure.ResourceManager.Cdn/src/Azure.ResourceManager.Cdn.csproj b/sdk/cdn/Azure.ResourceManager.Cdn/src/Azure.ResourceManager.Cdn.csproj index b9149adee6a3..cdbd1ce520d6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Azure.ResourceManager.Cdn.csproj +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Azure.ResourceManager.Cdn.csproj @@ -1,8 +1,8 @@ - 1.4.0-beta.1 + 1.5.0-beta.1 - 1.3.1 + 1.4.0 Azure.ResourceManager.Cdn Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Cdn. azure;management;arm;resource manager;cdn diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/ArmCdnModelFactory.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/ArmCdnModelFactory.cs index b25972b5bbc3..c1e2b6e55761 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/ArmCdnModelFactory.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/ArmCdnModelFactory.cs @@ -79,5 +79,57 @@ public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, stri provisioningState, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// + /// Resource ID, String. + /// Serialized Name: CanMigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: CanMigrateResult.type + /// + /// + /// Flag that says if the profile can be migrated + /// Serialized Name: CanMigrateResult.properties.canMigrate + /// + /// + /// Recommended sku for the migration + /// Serialized Name: CanMigrateResult.properties.defaultSku + /// + /// Serialized Name: CanMigrateResult.properties.errors. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static CanMigrateResult CanMigrateResult(string Id = null, string canMigrateResultType = null, bool? canMigrate = null, CanMigrateDefaultSku? defaultSku = null, IEnumerable errors = null) + { + var resourceId = Id != null ? new ResourceIdentifier(Id) : null; + + return CanMigrateResult( + resourceId, + canMigrateResultType, + canMigrate, + defaultSku, + errors); + } + /// Initializes a new instance of . + /// + /// Resource ID. + /// Serialized Name: MigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: MigrateResult.type + /// + /// + /// Arm resource id of the migrated profile + /// Serialized Name: MigrateResult.properties.migratedProfileResourceId + /// + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MigrateResult MigrateResult(string Id = null, string migrateResultType = null, ResourceIdentifier migratedProfileResourceIdId = null) + { + var resourceId = Id != null ? new ResourceIdentifier(Id) : null; + return MigrateResult(resourceId, migrateResultType, migratedProfileResourceIdId); + } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCipherSuiteSetType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCipherSuiteSetType.cs new file mode 100644 index 000000000000..7285ebd478c5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCipherSuiteSetType.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public readonly partial struct AfdCipherSuiteSetType + { + /// TLS1_0_2019. + [CodeGenMember("TLS102019")] + public static AfdCipherSuiteSetType Tls1_0_2019 { get; } = new AfdCipherSuiteSetType(Tls1_0_2019Value); + /// TLS1_2_2022. + [CodeGenMember("TLS122022")] + public static AfdCipherSuiteSetType Tls1_2_2022 { get; } = new AfdCipherSuiteSetType(Tls1_2_2022Value); + /// TLS1_2_2023. + [CodeGenMember("TLS122023")] + public static AfdCipherSuiteSetType Tls1_2_2023 { get; } = new AfdCipherSuiteSetType(Tls1_2_2023Value); + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls12.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls12.cs new file mode 100644 index 000000000000..8260326eec99 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls12.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public readonly partial struct AfdCustomizedCipherSuiteForTls12 + { + /// ECDHE_RSA_AES128_GCM_SHA256. + [CodeGenMember("EcdheRSAAES128GCMSHA256")] + public static AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Gcm_Sha256 { get; } = new AfdCustomizedCipherSuiteForTls12(Ecdhe_Rsa_Aes128_Gcm_Sha256Value); + /// ECDHE_RSA_AES256_GCM_SHA384. + [CodeGenMember("EcdheRSAAES256GCMSHA384")] + public static AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Gcm_Sha384 { get; } = new AfdCustomizedCipherSuiteForTls12(Ecdhe_Rsa_Aes256_Gcm_Sha384Value); + /// DHE_RSA_AES256_GCM_SHA384. + [CodeGenMember("DHERSAAES256GCMSHA384")] + public static AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes256_Gcm_Sha384 { get; } = new AfdCustomizedCipherSuiteForTls12(Dhe_Rsa_Aes256_Gcm_Sha384Value); + /// DHE_RSA_AES128_GCM_SHA256. + [CodeGenMember("DHERSAAES128GCMSHA256")] + public static AfdCustomizedCipherSuiteForTls12 Dhe_Rsa_Aes128_Gcm_Sha256 { get; } = new AfdCustomizedCipherSuiteForTls12(Dhe_Rsa_Aes128_Gcm_Sha256Value); + /// ECDHE_RSA_AES128_SHA256. + [CodeGenMember("EcdheRSAAES128Sha256")] + public static AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes128_Sha256 { get; } = new AfdCustomizedCipherSuiteForTls12(Ecdhe_Rsa_Aes128_Sha256Value); + /// ECDHE_RSA_AES256_SHA384. + [CodeGenMember("EcdheRSAAES256SHA384")] + public static AfdCustomizedCipherSuiteForTls12 Ecdhe_Rsa_Aes256_Sha384 { get; } = new AfdCustomizedCipherSuiteForTls12(Ecdhe_Rsa_Aes256_Sha384Value); + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls13.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls13.cs new file mode 100644 index 000000000000..2171c83622c5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/AfdCustomizedCipherSuiteForTls13.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public readonly partial struct AfdCustomizedCipherSuiteForTls13 + { + /// TLS_AES_128_GCM_SHA256. + [CodeGenMember("TLSAES128GCMSHA256")] + public static AfdCustomizedCipherSuiteForTls13 Tls_Aes_128_Gcm_Sha256 { get; } = new AfdCustomizedCipherSuiteForTls13(Tls_Aes_128_Gcm_Sha256Value); + /// TLS_AES_256_GCM_SHA384. + [CodeGenMember("TLSAES256GCMSHA384")] + public static AfdCustomizedCipherSuiteForTls13 Tls_Aes_256_Gcm_Sha384 { get; } = new AfdCustomizedCipherSuiteForTls13(Tls_Aes_256_Gcm_Sha384Value); + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionProperties.cs new file mode 100644 index 000000000000..95fc86564f38 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CacheExpirationActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public CacheExpirationActionProperties(CacheExpirationActionType actionType, CacheBehaviorSetting cacheBehavior, CdnCacheLevel cacheType) : this(cacheBehavior, cacheType) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public CacheExpirationActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionType.cs index fc979ed9eeac..ef69d5340772 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheExpirationActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public CacheExpirationActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionProperties.cs new file mode 100644 index 000000000000..6bf1757bf67c --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CacheKeyQueryStringActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public CacheKeyQueryStringActionProperties(CacheKeyQueryStringActionType actionType, QueryStringBehavior queryStringBehavior) : this(queryStringBehavior) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public CacheKeyQueryStringActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionType.cs index 1bf84acfae31..542744183d3e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CacheKeyQueryStringActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public CacheKeyQueryStringActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CanMigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CanMigrateResult.cs new file mode 100644 index 000000000000..291e29ce81a5 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CanMigrateResult.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CanMigrateResult + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Id => ResourceId?.ToString(); + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSource.cs new file mode 100644 index 000000000000..f73f745efda0 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSource.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CdnCertificateSource + { + [EditorBrowsable(EditorBrowsableState.Never)] + public CdnCertificateSource(CdnCertificateSourceType sourceType, CdnManagedCertificateType certificateType) : this(certificateType) + { + SourceType = sourceType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public CdnCertificateSourceType SourceType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSourceType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSourceType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSourceType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSourceType.cs index 89f87901e75a..4f19659e6c28 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSourceType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CdnCertificateSourceType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public CdnCertificateSourceType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchCondition.cs new file mode 100644 index 000000000000..6c96d20481e3 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class ClientPortMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public ClientPortMatchCondition(ClientPortMatchConditionType conditionType, ClientPortOperator clientPortOperator) : this(clientPortOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public ClientPortMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchConditionType.cs index 288f0084d30d..7255df36c497 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ClientPortMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public ClientPortMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchCondition.cs new file mode 100644 index 000000000000..39c109b68a70 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class CookiesMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public CookiesMatchCondition(CookiesMatchConditionType conditionType, CookiesOperator cookiesOperator) : this(cookiesOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public CookiesMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchConditionType.cs index e0fe2b33ecab..2e608a28fe98 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/CookiesMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public CookiesMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/DeliveryRuleSslProtocolMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/DeliveryRuleSslProtocolMatchCondition.cs new file mode 100644 index 000000000000..7435719052c1 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/DeliveryRuleSslProtocolMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class DeliveryRuleSslProtocolMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public DeliveryRuleSslProtocolMatchCondition(SslProtocolMatchConditionType sslProtocolMatchConditionType, SslProtocolOperator sslProtocolOperator) : this(sslProtocolOperator) + { + SslProtocolMatchConditionType = sslProtocolMatchConditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public SslProtocolMatchConditionType SslProtocolMatchConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/FrontDoorMinimumTlsVersion.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/FrontDoorMinimumTlsVersion.cs index 8c7e5b97e17e..5be262874435 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/FrontDoorMinimumTlsVersion.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/FrontDoorMinimumTlsVersion.cs @@ -16,7 +16,10 @@ public enum FrontDoorMinimumTlsVersion Tls1_0, /// TLS 1.2. [CodeGenMember("TLS12")] - Tls1_2 + Tls1_2, + /// TLS 1.3. + [CodeGenMember("TLS13")] + Tls1_3 #pragma warning restore CA1707 } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionProperties.cs new file mode 100644 index 000000000000..7251ff110b20 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionProperties.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class HeaderActionProperties { + [EditorBrowsable(EditorBrowsableState.Never)] + public HeaderActionProperties(HeaderActionType actionType, HeaderAction headerAction, string headerName) : this(headerAction, headerName) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public HeaderActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionType.cs similarity index 98% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionType.cs index 66e8ccb41fa9..77b63beb1a1a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HeaderActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public HeaderActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchCondition.cs new file mode 100644 index 000000000000..8dab6709975f --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class HostNameMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public HostNameMatchCondition(HostNameMatchConditionType conditionType, HostNameOperator hostNameOperator) : this(hostNameOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public HostNameMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchConditionType.cs index 529e24a3279c..896b8a686228 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HostNameMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public HostNameMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchCondition.cs new file mode 100644 index 000000000000..b1298b79c044 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class HttpVersionMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public HttpVersionMatchCondition(HttpVersionMatchConditionType conditionType, HttpVersionOperator httpVersionOperator) : this(httpVersionOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public HttpVersionMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchConditionType.cs index 8c5e34e184b1..ad453a397b25 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/HttpVersionMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public HttpVersionMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchCondition.cs new file mode 100644 index 000000000000..1bfc2356b218 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchCondition.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class IsDeviceMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public IsDeviceMatchCondition(IsDeviceMatchConditionType conditionType, IsDeviceOperator isDeviceOperator): this(isDeviceOperator) + { + ConditionType = conditionType; + } + [EditorBrowsable(EditorBrowsableState.Never)] + public IsDeviceMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchConditionType.cs index 2aa44faa542f..515bf4466742 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/IsDeviceMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public IsDeviceMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSource.cs new file mode 100644 index 000000000000..a7b382b78e86 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSource.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class KeyVaultCertificateSource + { + [EditorBrowsable(EditorBrowsableState.Never)] + public KeyVaultCertificateSource + ( + KeyVaultCertificateSourceType sourceType, + string subscriptionId, + string resourceGroupName, + string vaultName, + string secretName, + CertificateUpdateAction updateRule, + CertificateDeleteAction deleteRule + ) : this + ( + subscriptionId, + resourceGroupName, + vaultName, + secretName, + updateRule, + deleteRule + ) + { + SourceType = sourceType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public KeyVaultCertificateSourceType SourceType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSourceType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSourceType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSourceType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSourceType.cs index 484f7dcf0831..ca8957015968 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSourceType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/KeyVaultCertificateSourceType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public KeyVaultCertificateSourceType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/MigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/MigrateResult.cs new file mode 100644 index 000000000000..b428ca6eb016 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/MigrateResult.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class MigrateResult + { + [EditorBrowsable(EditorBrowsableState.Never)] + public string Id => ResourceId?.ToString(); + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionProperties.cs new file mode 100644 index 000000000000..892c94cecf1d --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionProperties.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class OriginGroupOverrideActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public OriginGroupOverrideActionProperties(OriginGroupOverrideActionType actionType, WritableSubResource originGroup) : this(originGroup) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public OriginGroupOverrideActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionType.cs index b3507c0ffda2..ff91ee34ce34 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/OriginGroupOverrideActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public OriginGroupOverrideActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchCondition.cs new file mode 100644 index 000000000000..9390eba6fd35 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class PostArgsMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public PostArgsMatchCondition(PostArgsMatchConditionType conditionType, PostArgsOperator postArgsOperator) : this(postArgsOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public PostArgsMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchConditionType.cs index a68d95cac142..6be84882a92d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/PostArgsMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public PostArgsMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchCondition.cs new file mode 100644 index 000000000000..bc380ff610d6 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class QueryStringMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public QueryStringMatchCondition(QueryStringMatchConditionType conditionType, QueryStringOperator queryStringOperator) : this(queryStringOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public QueryStringMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchConditionType.cs index 1da94d0c97cb..17da15e965a7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/QueryStringMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public QueryStringMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchCondition.cs new file mode 100644 index 000000000000..c224cecb16fc --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RemoteAddressMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RemoteAddressMatchCondition(RemoteAddressMatchConditionType conditionType, RemoteAddressOperator remoteAddressOperator) : this(remoteAddressOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RemoteAddressMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchConditionType.cs index a9c59b7221e6..1c84e01c217f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RemoteAddressMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RemoteAddressMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchCondition.cs new file mode 100644 index 000000000000..0d5d2b7389b7 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RequestBodyMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestBodyMatchCondition(RequestBodyMatchConditionType conditionType, RequestBodyOperator requestBodyOperator) : this(requestBodyOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestBodyMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchConditionType.cs index 319c3a5810d9..edeb1e28ffc4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestBodyMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RequestBodyMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchCondition.cs new file mode 100644 index 000000000000..0f343ceae3fc --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RequestHeaderMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestHeaderMatchCondition(RequestHeaderMatchConditionType conditionType, RequestHeaderOperator requestHeaderOperator) : this(requestHeaderOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestHeaderMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchConditionType.cs index f9d8466091c6..1e9e50112d07 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestHeaderMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RequestHeaderMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchCondition.cs new file mode 100644 index 000000000000..8a11850eed63 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RequestMethodMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestMethodMatchCondition(RequestMethodMatchConditionType conditionType, RequestMethodOperator requestMethodOperator) : this(requestMethodOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestMethodMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchConditionType.cs index bbec932ebb8e..d17c810f5904 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestMethodMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RequestMethodMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchCondition.cs new file mode 100644 index 000000000000..640871226468 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RequestSchemeMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestSchemeMatchCondition(RequestSchemeMatchConditionType conditionType, RequestSchemeOperator requestSchemeOperator) : this(requestSchemeOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestSchemeMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchConditionType.cs index b78d9cd3de45..2696d825236a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestSchemeMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RequestSchemeMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchCondition.cs new file mode 100644 index 000000000000..8e8060fb8b88 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RequestUriMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestUriMatchCondition(RequestUriMatchConditionType conditionType, RequestUriOperator requestUriOperator) : this(requestUriOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RequestUriMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchConditionType.cs index 3fd69168b138..0a8da6dbdc2d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RequestUriMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RequestUriMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionProperties.cs new file mode 100644 index 000000000000..cafc0c86dfb1 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class RouteConfigurationOverrideActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public RouteConfigurationOverrideActionProperties(RouteConfigurationOverrideActionType actionType) : this() + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public RouteConfigurationOverrideActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionType.cs index cbdddcb1039c..dad81d022111 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/RouteConfigurationOverrideActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public RouteConfigurationOverrideActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchCondition.cs new file mode 100644 index 000000000000..97dbc8defc01 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class ServerPortMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public ServerPortMatchCondition(ServerPortMatchConditionType conditionType, ServerPortOperator serverPortOperator) : this(serverPortOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public ServerPortMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchConditionType.cs index d6c7ddbe7f4f..361aee00ffa7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/ServerPortMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public ServerPortMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchCondition.cs new file mode 100644 index 000000000000..27bc6438cdb9 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class SocketAddressMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public SocketAddressMatchCondition(SocketAddressMatchConditionType conditionType, SocketAddressOperator socketAddressOperator) : this(socketAddressOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public SocketAddressMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchConditionType.cs index 97b40f03a1a2..dacdff503314 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SocketAddressMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public SocketAddressMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SslProtocolMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SslProtocolMatchConditionType.cs index e2c3736deffd..61310b6f3451 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/SslProtocolMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public SslProtocolMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchCondition.cs new file mode 100644 index 000000000000..0b21706311b7 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriFileExtensionMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriFileExtensionMatchCondition(UriFileExtensionMatchConditionType conditionType, UriFileExtensionOperator uriFileExtensionOperator) : this(uriFileExtensionOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriFileExtensionMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchConditionType.cs index e666e0a6ea12..4312922b4f6a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileExtensionMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriFileExtensionMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchCondition.cs new file mode 100644 index 000000000000..33733bef0025 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriFileNameMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriFileNameMatchCondition(UriFileNameMatchConditionType conditionType, UriFileNameOperator uriFileNameOperator) : this(uriFileNameOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriFileNameMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchConditionType.cs index 9de739c7efd1..eb7425db0d0c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriFileNameMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriFileNameMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchCondition.cs new file mode 100644 index 000000000000..21f660af3c64 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchCondition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriPathMatchCondition + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriPathMatchCondition(UriPathMatchConditionType conditionType, UriPathOperator uriPathOperator) : this(uriPathOperator) + { + ConditionType = conditionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriPathMatchConditionType ConditionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchConditionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchConditionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchConditionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchConditionType.cs index 97178a96000f..0c6a221c5175 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchConditionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriPathMatchConditionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriPathMatchConditionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionProperties.cs new file mode 100644 index 000000000000..2426b697cfad --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriRedirectActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriRedirectActionProperties(UriRedirectActionType actionType, RedirectType redirectType) : this(redirectType) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriRedirectActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionType.cs similarity index 99% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionType.cs index a026292ed8fc..75a5de938445 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRedirectActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriRedirectActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionProperties.cs new file mode 100644 index 000000000000..2b6124077836 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriRewriteActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriRewriteActionProperties(UriRewriteActionType actionType, string sourcePattern, string destination) : this(sourcePattern, destination) + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriRewriteActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionType.cs similarity index 98% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionType.cs index 14247e073177..23a95479bea2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriRewriteActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriRewriteActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionProperties.cs new file mode 100644 index 000000000000..e313b61801fc --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriSigningActionProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriSigningActionProperties(UriSigningActionType actionType) : this() + { + ActionType = actionType; + } + + [EditorBrowsable(EditorBrowsableState.Never)] + public UriSigningActionType ActionType + { + get => new(TypeName.ToString()); + set + { + TypeName = value.ToString(); + } + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionType.cs similarity index 98% rename from sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionType.cs rename to sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionType.cs index ebc0e685cf55..bd6e43f6c28f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningActionType.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// - #nullable disable using System; @@ -45,4 +43,4 @@ public UriSigningActionType(string value) /// public override string ToString() => _value; } -} +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningKeyProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningKeyProperties.cs new file mode 100644 index 000000000000..6da9b80b666a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Customization/Models/UriSigningKeyProperties.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System.ComponentModel; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.Cdn.Models +{ + public partial class UriSigningKeyProperties + { + [EditorBrowsable(EditorBrowsableState.Never)] + public UriSigningKeyProperties(string keyId, WritableSubResource secretSource) + { + Argument.AssertNotNull(keyId, nameof(keyId)); + Argument.AssertNotNull(secretSource, nameof(secretSource)); + + KeyId = keyId; + SecretSource = secretSource; + SecretType = SecretType.UriSigningKey; + } + } +} \ No newline at end of file diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs index 87e260798d6c..624e4078ac3c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ArmCdnModelFactory.cs @@ -19,9 +19,18 @@ namespace Azure.ResourceManager.Cdn.Models public static partial class ArmCdnModelFactory { /// Initializes a new instance of . - /// The resource name to validate. - /// The type of the resource whose name is to be validated. - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// The resource name to validate. + /// Serialized Name: CheckEndpointNameAvailabilityInput.name + /// + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckEndpointNameAvailabilityInput.type + /// + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: CheckEndpointNameAvailabilityInput.autoGeneratedDomainNameLabelScope + /// /// A new instance for mocking. public static EndpointNameAvailabilityContent EndpointNameAvailabilityContent(string name = null, CdnResourceType resourceType = default, DomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) { @@ -29,10 +38,22 @@ public static EndpointNameAvailabilityContent EndpointNameAvailabilityContent(st } /// Initializes a new instance of . - /// Indicates whether the name is available. - /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string. - /// The reason why the name is not available. - /// The detailed error message describing why the name is not available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.nameAvailable + /// + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string + /// Serialized Name: CheckEndpointNameAvailabilityOutput.availableHostname + /// + /// + /// The reason why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.reason + /// + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.message + /// /// A new instance for mocking. public static EndpointNameAvailabilityResult EndpointNameAvailabilityResult(bool? nameAvailable = null, string availableHostname = null, string reason = null, string message = null) { @@ -40,11 +61,26 @@ public static EndpointNameAvailabilityResult EndpointNameAvailabilityResult(bool } /// Initializes a new instance of . - /// Resource identifier. - /// An enum describing the unit of measurement. - /// The current value of the usage. - /// The limit of usage. - /// The name of the type of usage. + /// + /// Resource identifier. + /// Serialized Name: Usage.id + /// + /// + /// An enum describing the unit of measurement. + /// Serialized Name: Usage.unit + /// + /// + /// The current value of the usage. + /// Serialized Name: Usage.currentValue + /// + /// + /// The limit of usage. + /// Serialized Name: Usage.limit + /// + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// /// A new instance for mocking. public static FrontDoorUsage FrontDoorUsage(ResourceIdentifier id = null, FrontDoorUsageUnit unit = default, long currentValue = default, long limit = default, FrontDoorUsageResourceName name = null) { @@ -58,8 +94,14 @@ public static FrontDoorUsage FrontDoorUsage(ResourceIdentifier id = null, FrontD } /// Initializes a new instance of . - /// A string describing the resource name. - /// A localized string describing the resource name. + /// + /// A string describing the resource name. + /// Serialized Name: UsageName.value + /// + /// + /// A localized string describing the resource name. + /// Serialized Name: UsageName.localizedValue + /// /// A new instance for mocking. public static FrontDoorUsageResourceName FrontDoorUsageResourceName(string value = null, string localizedValue = null) { @@ -67,9 +109,18 @@ public static FrontDoorUsageResourceName FrontDoorUsageResourceName(string value } /// Initializes a new instance of . - /// Indicates whether the name is available. - /// The reason why the name is not available. - /// The detailed error message describing why the name is not available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckNameAvailabilityOutput.nameAvailable + /// + /// + /// The reason why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.reason + /// + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.message + /// /// A new instance for mocking. public static CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvailable = null, string reason = null, string message = null) { @@ -77,9 +128,18 @@ public static CdnNameAvailabilityResult CdnNameAvailabilityResult(bool? nameAvai } /// Initializes a new instance of . - /// The secret type. - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Secret version, if customer is using a specific version. + /// + /// The secret type. + /// Serialized Name: ValidateSecretInput.secretType + /// + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: ValidateSecretInput.secretSource + /// + /// + /// Secret version, if customer is using a specific version. + /// Serialized Name: ValidateSecretInput.secretVersion + /// /// A new instance for mocking. public static ValidateSecretContent ValidateSecretContent(SecretType secretType = default, ResourceIdentifier secretSourceId = null, string secretVersion = null) { @@ -87,8 +147,14 @@ public static ValidateSecretContent ValidateSecretContent(SecretType secretType } /// Initializes a new instance of . - /// The validation status. - /// Detailed error message. + /// + /// The validation status. + /// Serialized Name: ValidateSecretOutput.status + /// + /// + /// Detailed error message + /// Serialized Name: ValidateSecretOutput.message + /// /// A new instance for mocking. public static ValidateSecretResult ValidateSecretResult(ValidationStatus? status = null, string message = null) { @@ -102,15 +168,42 @@ public static ValidateSecretResult ValidateSecretResult(ValidationStatus? status /// The systemData. /// The tags. /// The location. - /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. - /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. - /// Managed service identity (system assigned and/or user assigned identities). - /// Resource status of the profile. - /// Provisioning status of the profile. - /// Key-Value pair representing additional properties for profiles. - /// The Id of the frontdoor. - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// Serialized Name: Profile.sku + /// + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// Serialized Name: Profile.kind + /// + /// + /// Managed service identity (system assigned and/or user assigned identities). + /// Serialized Name: Profile.identity + /// + /// + /// Resource status of the profile. + /// Serialized Name: Profile.properties.resourceState + /// + /// + /// Provisioning status of the profile. + /// Serialized Name: Profile.properties.provisioningState + /// + /// + /// Key-Value pair representing additional properties for profiles. + /// Serialized Name: Profile.properties.extendedProperties + /// + /// + /// The Id of the frontdoor. + /// Serialized Name: Profile.properties.frontDoorId + /// + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// Serialized Name: Profile.properties.originResponseTimeoutSeconds + /// + /// + /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// Serialized Name: Profile.properties.logScrubbing + /// /// A new instance for mocking. public static ProfileData ProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, CdnSkuName? skuName = null, string kind = null, ManagedServiceIdentity identity = null, ProfileResourceState? resourceState = null, ProfileProvisioningState? provisioningState = null, IReadOnlyDictionary extendedProperties = null, Guid? frontDoorId = null, int? originResponseTimeoutSeconds = null, ProfileLogScrubbing logScrubbing = null) { @@ -141,16 +234,43 @@ public static ProfileData ProfileData(ResourceIdentifier id = null, string name /// The name. /// The resourceType. /// The systemData. - /// The name of the profile which holds the domain. - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. - /// Resource reference to the Azure DNS zone. - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. - /// Provisioning status. - /// - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. - /// The host name of the domain. Must be a domain name. - /// Key-Value pair representing migration properties for domains. - /// Values the customer needs to validate domain ownership. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomain.properties.profileName + /// + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomain.properties.tlsSettings + /// + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomain.properties.azureDnsZone + /// + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomain.properties.preValidatedCustomDomainResourceId + /// + /// + /// Provisioning status + /// Serialized Name: AFDDomain.properties.provisioningState + /// + /// Serialized Name: AFDDomain.properties.deploymentStatus. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// Serialized Name: AFDDomain.properties.domainValidationState + /// + /// + /// The host name of the domain. Must be a domain name. + /// Serialized Name: AFDDomain.properties.hostName + /// + /// + /// Key-Value pair representing migration properties for domains. + /// Serialized Name: AFDDomain.properties.extendedProperties + /// + /// + /// Values the customer needs to validate domain ownership + /// Serialized Name: AFDDomain.properties.validationProperties + /// /// A new instance for mocking. public static FrontDoorCustomDomainData FrontDoorCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string profileName = null, FrontDoorCustomDomainHttpsContent tlsSettings = null, ResourceIdentifier dnsZoneId = null, ResourceIdentifier preValidatedCustomDomainResourceId = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, DomainValidationState? domainValidationState = null, string hostName = null, IDictionary extendedProperties = null, DomainValidationProperties validationProperties = null) { @@ -175,8 +295,14 @@ public static FrontDoorCustomDomainData FrontDoorCustomDomainData(ResourceIdenti } /// Initializes a new instance of . - /// Challenge used for DNS TXT record or file based validation. - /// The date time that the token expires. + /// + /// Challenge used for DNS TXT record or file based validation + /// Serialized Name: DomainValidationProperties.validationToken + /// + /// + /// The date time that the token expires + /// Serialized Name: DomainValidationProperties.expirationDate + /// /// A new instance for mocking. public static DomainValidationProperties DomainValidationProperties(string validationToken = null, DateTimeOffset? expiresOn = null) { @@ -184,10 +310,22 @@ public static DomainValidationProperties DomainValidationProperties(string valid } /// Initializes a new instance of . - /// The name of the profile which holds the domain. - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. - /// Resource reference to the Azure DNS zone. - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomainUpdateParameters.properties.profileName + /// + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomainUpdateParameters.properties.tlsSettings + /// + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomainUpdateParameters.properties.azureDnsZone + /// + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomainUpdateParameters.properties.preValidatedCustomDomainResourceId + /// /// A new instance for mocking. public static FrontDoorCustomDomainPatch FrontDoorCustomDomainPatch(string profileName = null, FrontDoorCustomDomainHttpsContent tlsSettings = null, ResourceIdentifier dnsZoneId = null, ResourceIdentifier preValidatedCustomDomainResourceId = null) { @@ -201,12 +339,27 @@ public static FrontDoorCustomDomainPatch FrontDoorCustomDomainPatch(string profi /// The systemData. /// The tags. /// The location. - /// The name of the profile which holds the endpoint. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpoint.properties.profileName + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpoint.properties.enabledState + /// + /// + /// Provisioning status + /// Serialized Name: AFDEndpoint.properties.provisioningState + /// + /// Serialized Name: AFDEndpoint.properties.deploymentStatus. + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: AFDEndpoint.properties.hostName + /// + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: AFDEndpoint.properties.autoGeneratedDomainNameLabelScope + /// /// A new instance for mocking. public static FrontDoorEndpointData FrontDoorEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string profileName = null, EnabledState? enabledState = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, string hostName = null, DomainNameLabelScope? autoGeneratedDomainNameLabelScope = null) { @@ -229,9 +382,18 @@ public static FrontDoorEndpointData FrontDoorEndpointData(ResourceIdentifier id } /// Initializes a new instance of . - /// Endpoint tags. - /// The name of the profile which holds the endpoint. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Endpoint tags. + /// Serialized Name: AFDEndpointUpdateParameters.tags + /// + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpointUpdateParameters.properties.profileName + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpointUpdateParameters.properties.enabledState + /// /// A new instance for mocking. public static FrontDoorEndpointPatch FrontDoorEndpointPatch(IDictionary tags = null, string profileName = null, EnabledState? enabledState = null) { @@ -241,9 +403,18 @@ public static FrontDoorEndpointPatch FrontDoorEndpointPatch(IDictionary Initializes a new instance of . - /// Indicates whether the custom domain is valid or not. - /// The reason why the custom domain is not valid. - /// Error message describing why the custom domain is not valid. + /// + /// Indicates whether the custom domain is valid or not. + /// Serialized Name: ValidateCustomDomainOutput.customDomainValidated + /// + /// + /// The reason why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.reason + /// + /// + /// Error message describing why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.message + /// /// A new instance for mocking. public static ValidateCustomDomainResult ValidateCustomDomainResult(bool? isCustomDomainValid = null, string reason = null, string message = null) { @@ -255,13 +426,31 @@ public static ValidateCustomDomainResult ValidateCustomDomainResult(bool? isCust /// The name. /// The resourceType. /// The systemData. - /// The name of the profile which holds the origin group. - /// Load balancing settings for a backend pool. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroup.properties.profileName + /// + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroup.properties.loadBalancingSettings + /// + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroup.properties.healthProbeSettings + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroup.properties.sessionAffinityState + /// + /// + /// Provisioning status + /// Serialized Name: AFDOriginGroup.properties.provisioningState + /// + /// Serialized Name: AFDOriginGroup.properties.deploymentStatus. /// A new instance for mocking. public static FrontDoorOriginGroupData FrontDoorOriginGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string profileName = null, LoadBalancingSettings loadBalancingSettings = null, HealthProbeSettings healthProbeSettings = null, int? trafficRestorationTimeInMinutes = null, EnabledState? sessionAffinityState = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null) { @@ -281,11 +470,26 @@ public static FrontDoorOriginGroupData FrontDoorOriginGroupData(ResourceIdentifi } /// Initializes a new instance of . - /// The name of the profile which holds the origin group. - /// Load balancing settings for a backend pool. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.profileName + /// + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.loadBalancingSettings + /// + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.healthProbeSettings + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.sessionAffinityState + /// /// A new instance for mocking. public static FrontDoorOriginGroupPatch FrontDoorOriginGroupPatch(string profileName = null, LoadBalancingSettings loadBalancingSettings = null, HealthProbeSettings healthProbeSettings = null, int? trafficRestorationTimeInMinutes = null, EnabledState? sessionAffinityState = null) { @@ -303,19 +507,55 @@ public static FrontDoorOriginGroupPatch FrontDoorOriginGroupPatch(string profile /// The name. /// The resourceType. /// The systemData. - /// The name of the origin group which contains this origin. - /// Resource reference to the Azure origin resource. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// The properties of the private link resource for private origin. - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. - /// Whether to enable certificate name check at origin level. - /// Provisioning status. - /// + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOrigin.properties.originGroupName + /// + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOrigin.properties.azureOrigin + /// + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOrigin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOrigin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOrigin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOrigin.properties.weight + /// + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOrigin.properties.sharedPrivateLinkResource + /// + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOrigin.properties.enabledState + /// + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOrigin.properties.enforceCertificateNameCheck + /// + /// + /// Provisioning status + /// Serialized Name: AFDOrigin.properties.provisioningState + /// + /// Serialized Name: AFDOrigin.properties.deploymentStatus. /// A new instance for mocking. public static FrontDoorOriginData FrontDoorOriginData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string originGroupName = null, ResourceIdentifier originId = null, string hostName = null, int? httpPort = null, int? httpsPort = null, string originHostHeader = null, int? priority = null, int? weight = null, SharedPrivateLinkResourceProperties sharedPrivateLinkResource = null, EnabledState? enabledState = null, bool? enforceCertificateNameCheck = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null) { @@ -341,17 +581,50 @@ public static FrontDoorOriginData FrontDoorOriginData(ResourceIdentifier id = nu } /// Initializes a new instance of . - /// The name of the origin group which contains this origin. - /// Resource reference to the Azure origin resource. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// The properties of the private link resource for private origin. - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. - /// Whether to enable certificate name check at origin level. + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.originGroupName + /// + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOriginUpdateParameters.properties.azureOrigin + /// + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOriginUpdateParameters.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOriginUpdateParameters.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOriginUpdateParameters.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOriginUpdateParameters.properties.weight + /// + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.sharedPrivateLinkResource + /// + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOriginUpdateParameters.properties.enabledState + /// + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOriginUpdateParameters.properties.enforceCertificateNameCheck + /// /// A new instance for mocking. public static FrontDoorOriginPatch FrontDoorOriginPatch(string originGroupName = null, ResourceIdentifier originId = null, string hostName = null, int? httpPort = null, int? httpsPort = null, string originHostHeader = null, int? priority = null, int? weight = null, SharedPrivateLinkResourceProperties sharedPrivateLinkResource = null, EnabledState? enabledState = null, bool? enforceCertificateNameCheck = null) { @@ -375,20 +648,59 @@ public static FrontDoorOriginPatch FrontDoorOriginPatch(string originGroupName = /// The name. /// The resourceType. /// The systemData. - /// The name of the endpoint which holds the route. - /// Domains referenced by this endpoint. - /// A reference to the origin group. - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// rule sets referenced by this endpoint. - /// List of supported protocols for this route. - /// The route patterns of the rule. - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - /// Protocol this rule will use when forwarding traffic to backends. - /// whether this route will be linked to the default endpoint domain. - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: Route.properties.endpointName + /// + /// + /// Domains referenced by this endpoint. + /// Serialized Name: Route.properties.customDomains + /// + /// + /// A reference to the origin group. + /// Serialized Name: Route.properties.originGroup + /// + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Route.properties.originPath + /// + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: Route.properties.ruleSets + /// + /// + /// List of supported protocols for this route. + /// Serialized Name: Route.properties.supportedProtocols + /// + /// + /// The route patterns of the rule. + /// Serialized Name: Route.properties.patternsToMatch + /// + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: Route.properties.cacheConfiguration + /// + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: Route.properties.forwardingProtocol + /// + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: Route.properties.linkToDefaultDomain + /// + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: Route.properties.httpsRedirect + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: Route.properties.enabledState + /// + /// + /// Provisioning status + /// Serialized Name: Route.properties.provisioningState + /// + /// Serialized Name: Route.properties.deploymentStatus. /// A new instance for mocking. public static FrontDoorRouteData FrontDoorRouteData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string endpointName = null, IEnumerable customDomains = null, ResourceIdentifier originGroupId = null, string originPath = null, IEnumerable ruleSets = null, IEnumerable supportedProtocols = null, IEnumerable patternsToMatch = null, FrontDoorRouteCacheConfiguration cacheConfiguration = null, ForwardingProtocol? forwardingProtocol = null, LinkToDefaultDomain? linkToDefaultDomain = null, HttpsRedirect? httpsRedirect = null, EnabledState? enabledState = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null) { @@ -420,8 +732,14 @@ public static FrontDoorRouteData FrontDoorRouteData(ResourceIdentifier id = null } /// Initializes a new instance of . - /// Resource ID. - /// Whether the resource is active or inactive. + /// + /// Resource ID. + /// Serialized Name: ActivatedResourceReference.id + /// + /// + /// Whether the resource is active or inactive + /// Serialized Name: ActivatedResourceReference.isActive + /// /// A new instance for mocking. public static FrontDoorActivatedResourceInfo FrontDoorActivatedResourceInfo(ResourceIdentifier id = null, bool? isActive = null) { @@ -429,18 +747,54 @@ public static FrontDoorActivatedResourceInfo FrontDoorActivatedResourceInfo(Reso } /// Initializes a new instance of . - /// The name of the endpoint which holds the route. - /// Domains referenced by this endpoint. - /// A reference to the origin group. - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// rule sets referenced by this endpoint. - /// List of supported protocols for this route. - /// The route patterns of the rule. - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - /// Protocol this rule will use when forwarding traffic to backends. - /// whether this route will be linked to the default endpoint domain. - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: RouteUpdateParameters.properties.endpointName + /// + /// + /// Domains referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.customDomains + /// + /// + /// A reference to the origin group. + /// Serialized Name: RouteUpdateParameters.properties.originGroup + /// + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: RouteUpdateParameters.properties.originPath + /// + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.ruleSets + /// + /// + /// List of supported protocols for this route. + /// Serialized Name: RouteUpdateParameters.properties.supportedProtocols + /// + /// + /// The route patterns of the rule. + /// Serialized Name: RouteUpdateParameters.properties.patternsToMatch + /// + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: RouteUpdateParameters.properties.cacheConfiguration + /// + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: RouteUpdateParameters.properties.forwardingProtocol + /// + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: RouteUpdateParameters.properties.linkToDefaultDomain + /// + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: RouteUpdateParameters.properties.httpsRedirect + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: RouteUpdateParameters.properties.enabledState + /// /// A new instance for mocking. public static FrontDoorRoutePatch FrontDoorRoutePatch(string endpointName = null, IEnumerable customDomains = null, ResourceIdentifier originGroupId = null, string originPath = null, IEnumerable ruleSets = null, IEnumerable supportedProtocols = null, IEnumerable patternsToMatch = null, FrontDoorRouteCacheConfiguration cacheConfiguration = null, ForwardingProtocol? forwardingProtocol = null, LinkToDefaultDomain? linkToDefaultDomain = null, HttpsRedirect? httpsRedirect = null, EnabledState? enabledState = null) { @@ -470,9 +824,15 @@ public static FrontDoorRoutePatch FrontDoorRoutePatch(string endpointName = null /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the rule set. + /// + /// Provisioning status + /// Serialized Name: RuleSet.properties.provisioningState + /// + /// Serialized Name: RuleSet.properties.deploymentStatus. + /// + /// The name of the profile which holds the rule set. + /// Serialized Name: RuleSet.properties.profileName + /// /// A new instance for mocking. public static FrontDoorRuleSetData FrontDoorRuleSetData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null, string profileName = null) { @@ -492,21 +852,35 @@ public static FrontDoorRuleSetData FrontDoorRuleSetData(ResourceIdentifier id = /// The name. /// The resourceType. /// The systemData. - /// The name of the rule set containing the rule. - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: Rule.properties.ruleSetName + /// + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: Rule.properties.order + /// /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: Rule.properties.conditions /// 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 list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: Rule.properties.actions /// 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 . /// - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. - /// Provisioning status. - /// + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: Rule.properties.matchProcessingBehavior + /// + /// + /// Provisioning status + /// Serialized Name: Rule.properties.provisioningState + /// + /// Serialized Name: Rule.properties.deploymentStatus. /// A new instance for mocking. public static FrontDoorRuleData FrontDoorRuleData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string ruleSetName = null, int? order = null, IEnumerable conditions = null, IEnumerable actions = null, MatchProcessingBehavior? matchProcessingBehavior = null, FrontDoorProvisioningState? provisioningState = null, FrontDoorDeploymentStatus? deploymentStatus = null) { @@ -529,19 +903,30 @@ public static FrontDoorRuleData FrontDoorRuleData(ResourceIdentifier id = null, } /// Initializes a new instance of . - /// The name of the rule set containing the rule. - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: RuleUpdateParameters.properties.ruleSetName + /// + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: RuleUpdateParameters.properties.order + /// /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: RuleUpdateParameters.properties.conditions /// 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 list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: RuleUpdateParameters.properties.actions /// 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 . /// - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: RuleUpdateParameters.properties.matchProcessingBehavior + /// /// A new instance for mocking. public static FrontDoorRulePatch FrontDoorRulePatch(string ruleSetName = null, int? order = null, IEnumerable conditions = null, IEnumerable actions = null, MatchProcessingBehavior? matchProcessingBehavior = null) { @@ -562,11 +947,18 @@ public static FrontDoorRulePatch FrontDoorRulePatch(string ruleSetName = null, i /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the security policy. + /// + /// Provisioning status + /// Serialized Name: SecurityPolicy.properties.provisioningState + /// + /// Serialized Name: SecurityPolicy.properties.deploymentStatus. + /// + /// The name of the profile which holds the security policy. + /// Serialized Name: SecurityPolicy.properties.profileName + /// /// /// object which contains security policy parameters + /// Serialized Name: SecurityPolicy.properties.parameters /// 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 . /// @@ -590,11 +982,18 @@ public static FrontDoorSecurityPolicyData FrontDoorSecurityPolicyData(ResourceId /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the secret. + /// + /// Provisioning status + /// Serialized Name: Secret.properties.provisioningState + /// + /// Serialized Name: Secret.properties.deploymentStatus. + /// + /// The name of the profile which holds the secret. + /// Serialized Name: Secret.properties.profileName + /// /// /// object which contains secret parameters + /// Serialized Name: Secret.properties.parameters /// 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 . /// @@ -614,10 +1013,10 @@ public static FrontDoorSecretData FrontDoorSecretData(ResourceIdentifier id = nu } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: MetricsResponse.dateTimeBegin. + /// Serialized Name: MetricsResponse.dateTimeEnd. + /// Serialized Name: MetricsResponse.granularity. + /// Serialized Name: MetricsResponse.series. /// A new instance for mocking. public static MetricsResponse MetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, MetricsResponseGranularity? granularity = null, IEnumerable series = null) { @@ -627,10 +1026,10 @@ public static MetricsResponse MetricsResponse(DateTimeOffset? dateTimeBegin = nu } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: MetricsResponseSeriesItem.metric. + /// Serialized Name: MetricsResponseSeriesItem.unit. + /// Serialized Name: MetricsResponseSeriesItem.groups. + /// Serialized Name: MetricsResponseSeriesItem.data. /// A new instance for mocking. public static MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric = null, MetricsResponseSeriesItemUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) { @@ -641,8 +1040,8 @@ public static MetricsResponseSeriesItem MetricsResponseSeriesItem(string metric } /// Initializes a new instance of . - /// - /// + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.name. + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.value. /// A new instance for mocking. public static MetricsResponseSeriesPropertiesItemsItem MetricsResponseSeriesPropertiesItemsItem(string name = null, string value = null) { @@ -650,8 +1049,8 @@ public static MetricsResponseSeriesPropertiesItemsItem MetricsResponseSeriesProp } /// Initializes a new instance of . - /// - /// + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. /// A new instance for mocking. public static Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(DateTimeOffset? dateOn = null, float? value = null) { @@ -659,9 +1058,9 @@ public static Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsProper } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: RankingsResponse.dateTimeBegin. + /// Serialized Name: RankingsResponse.dateTimeEnd. + /// Serialized Name: RankingsResponse.tables. /// A new instance for mocking. public static RankingsResponse RankingsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, IEnumerable tables = null) { @@ -671,8 +1070,8 @@ public static RankingsResponse RankingsResponse(DateTimeOffset? dateTimeBegin = } /// Initializes a new instance of . - /// - /// + /// Serialized Name: RankingsResponseTablesItem.ranking. + /// Serialized Name: RankingsResponseTablesItem.data. /// A new instance for mocking. public static RankingsResponseTablesItem RankingsResponseTablesItem(string ranking = null, IEnumerable data = null) { @@ -682,8 +1081,8 @@ public static RankingsResponseTablesItem RankingsResponseTablesItem(string ranki } /// Initializes a new instance of . - /// - /// + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.name. + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.metrics. /// A new instance for mocking. public static RankingsResponseTablesPropertiesItemsItem RankingsResponseTablesPropertiesItemsItem(string name = null, IEnumerable metrics = null) { @@ -693,9 +1092,9 @@ public static RankingsResponseTablesPropertiesItemsItem RankingsResponseTablesPr } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.metric. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.value. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.percentage. /// A new instance for mocking. public static RankingsResponseTablesPropertiesItemsMetricsItem RankingsResponseTablesPropertiesItemsMetricsItem(string metric = null, long? value = null, float? percentage = null) { @@ -703,8 +1102,8 @@ public static RankingsResponseTablesPropertiesItemsMetricsItem RankingsResponseT } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ContinentsResponse.continents. + /// Serialized Name: ContinentsResponse.countryOrRegions. /// A new instance for mocking. public static ContinentsResponse ContinentsResponse(IEnumerable continents = null, IEnumerable countryOrRegions = null) { @@ -715,7 +1114,7 @@ public static ContinentsResponse ContinentsResponse(IEnumerable Initializes a new instance of . - /// + /// Serialized Name: ContinentsResponseContinentsItem.id. /// A new instance for mocking. public static ContinentsResponseContinentsItem ContinentsResponseContinentsItem(string id = null) { @@ -723,8 +1122,8 @@ public static ContinentsResponseContinentsItem ContinentsResponseContinentsItem( } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.id. + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.continentId. /// A new instance for mocking. public static ContinentsResponseCountryOrRegionsItem ContinentsResponseCountryOrRegionsItem(string id = null, string continentId = null) { @@ -732,8 +1131,8 @@ public static ContinentsResponseCountryOrRegionsItem ContinentsResponseCountryOr } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ResourcesResponse.endpoints. + /// Serialized Name: ResourcesResponse.customDomains. /// A new instance for mocking. public static ResourcesResponse ResourcesResponse(IEnumerable endpoints = null, IEnumerable customDomains = null) { @@ -744,10 +1143,10 @@ public static ResourcesResponse ResourcesResponse(IEnumerable Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseEndpointsItem.id. + /// Serialized Name: ResourcesResponseEndpointsItem.name. + /// Serialized Name: ResourcesResponseEndpointsItem.history. + /// Serialized Name: ResourcesResponseEndpointsItem.customDomains. /// A new instance for mocking. public static ResourcesResponseEndpointsItem ResourcesResponseEndpointsItem(string id = null, string name = null, bool? history = null, IEnumerable customDomains = null) { @@ -757,10 +1156,10 @@ public static ResourcesResponseEndpointsItem ResourcesResponseEndpointsItem(stri } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.id. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.name. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.endpointId. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.history. /// A new instance for mocking. public static ResourcesResponseEndpointsPropertiesItemsItem ResourcesResponseEndpointsPropertiesItemsItem(string id = null, string name = null, string endpointId = null, bool? history = null) { @@ -768,10 +1167,10 @@ public static ResourcesResponseEndpointsPropertiesItemsItem ResourcesResponseEnd } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseCustomDomainsItem.id. + /// Serialized Name: ResourcesResponseCustomDomainsItem.name. + /// Serialized Name: ResourcesResponseCustomDomainsItem.endpointId. + /// Serialized Name: ResourcesResponseCustomDomainsItem.history. /// A new instance for mocking. public static ResourcesResponseCustomDomainsItem ResourcesResponseCustomDomainsItem(string id = null, string name = null, string endpointId = null, bool? history = null) { @@ -779,10 +1178,10 @@ public static ResourcesResponseCustomDomainsItem ResourcesResponseCustomDomainsI } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafMetricsResponse.dateTimeBegin. + /// Serialized Name: WafMetricsResponse.dateTimeEnd. + /// Serialized Name: WafMetricsResponse.granularity. + /// Serialized Name: WafMetricsResponse.series. /// A new instance for mocking. public static WafMetricsResponse WafMetricsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, WafMetricsResponseGranularity? granularity = null, IEnumerable series = null) { @@ -792,10 +1191,10 @@ public static WafMetricsResponse WafMetricsResponse(DateTimeOffset? dateTimeBegi } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafMetricsResponseSeriesItem.metric. + /// Serialized Name: WafMetricsResponseSeriesItem.unit. + /// Serialized Name: WafMetricsResponseSeriesItem.groups. + /// Serialized Name: WafMetricsResponseSeriesItem.data. /// A new instance for mocking. public static WafMetricsResponseSeriesItem WafMetricsResponseSeriesItem(string metric = null, WafMetricsResponseSeriesItemUnit? unit = null, IEnumerable groups = null, IEnumerable data = null) { @@ -806,8 +1205,8 @@ public static WafMetricsResponseSeriesItem WafMetricsResponseSeriesItem(string m } /// Initializes a new instance of . - /// - /// + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.name. + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.value. /// A new instance for mocking. public static WafMetricsResponseSeriesPropertiesItemsItem WafMetricsResponseSeriesPropertiesItemsItem(string name = null, string value = null) { @@ -815,8 +1214,8 @@ public static WafMetricsResponseSeriesPropertiesItemsItem WafMetricsResponseSeri } /// Initializes a new instance of . - /// - /// + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. /// A new instance for mocking. public static Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(DateTimeOffset? dateOn = null, float? value = null) { @@ -824,10 +1223,10 @@ public static Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPro } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafRankingsResponse.dateTimeBegin. + /// Serialized Name: WafRankingsResponse.dateTimeEnd. + /// Serialized Name: WafRankingsResponse.groups. + /// Serialized Name: WafRankingsResponse.data. /// A new instance for mocking. public static WafRankingsResponse WafRankingsResponse(DateTimeOffset? dateTimeBegin = null, DateTimeOffset? dateTimeEnd = null, IEnumerable groups = null, IEnumerable data = null) { @@ -838,8 +1237,8 @@ public static WafRankingsResponse WafRankingsResponse(DateTimeOffset? dateTimeBe } /// Initializes a new instance of . - /// - /// + /// Serialized Name: WafRankingsResponseDataItem.groupValues. + /// Serialized Name: WafRankingsResponseDataItem.metrics. /// A new instance for mocking. public static WafRankingsResponseDataItem WafRankingsResponseDataItem(IEnumerable groupValues = null, IEnumerable metrics = null) { @@ -850,9 +1249,9 @@ public static WafRankingsResponseDataItem WafRankingsResponseDataItem(IEnumerabl } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.metric. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.value. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.percentage. /// A new instance for mocking. public static ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(string metric = null, long? value = null, double? percentage = null) { @@ -860,18 +1259,30 @@ public static ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPrope } /// Initializes a new instance of . - /// Resource ID. - /// Resource type. - /// Flag that says if the profile can be migrated. - /// Recommended sku for the migration. - /// + /// + /// Resource ID. + /// Serialized Name: CanMigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: CanMigrateResult.type + /// + /// + /// Flag that says if the profile can be migrated + /// Serialized Name: CanMigrateResult.properties.canMigrate + /// + /// + /// Recommended sku for the migration + /// Serialized Name: CanMigrateResult.properties.defaultSku + /// + /// Serialized Name: CanMigrateResult.properties.errors. /// A new instance for mocking. - public static CanMigrateResult CanMigrateResult(string id = null, string canMigrateResultType = null, bool? canMigrate = null, CanMigrateDefaultSku? defaultSku = null, IEnumerable errors = null) + public static CanMigrateResult CanMigrateResult(ResourceIdentifier resourceId = null, string canMigrateResultType = null, bool? canMigrate = null, CanMigrateDefaultSku? defaultSku = null, IEnumerable errors = null) { errors ??= new List(); return new CanMigrateResult( - id, + resourceId, canMigrateResultType, canMigrate, defaultSku, @@ -880,10 +1291,22 @@ public static CanMigrateResult CanMigrateResult(string id = null, string canMigr } /// Initializes a new instance of . - /// Error code. - /// Resource which has the problem. - /// Error message indicating why the operation failed. - /// Describes what needs to be done to fix the problem. + /// + /// Error code. + /// Serialized Name: MigrationErrorType.code + /// + /// + /// Resource which has the problem. + /// Serialized Name: MigrationErrorType.resourceName + /// + /// + /// Error message indicating why the operation failed. + /// Serialized Name: MigrationErrorType.errorMessage + /// + /// + /// Describes what needs to be done to fix the problem + /// Serialized Name: MigrationErrorType.nextSteps + /// /// A new instance for mocking. public static MigrationErrorType MigrationErrorType(string code = null, string resourceName = null, string errorMessage = null, string nextSteps = null) { @@ -891,10 +1314,22 @@ public static MigrationErrorType MigrationErrorType(string code = null, string r } /// Initializes a new instance of . - /// Sku for the migration. - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. - /// Name of the new profile that need to be created. - /// Waf mapping for the migrated profile. + /// + /// Sku for the migration + /// Serialized Name: MigrationParameters.sku + /// + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: MigrationParameters.classicResourceReference + /// + /// + /// Name of the new profile that need to be created. + /// Serialized Name: MigrationParameters.profileName + /// + /// + /// Waf mapping for the migrated profile + /// Serialized Name: MigrationParameters.migrationWebApplicationFirewallMappings + /// /// A new instance for mocking. public static MigrationContent MigrationContent(CdnSkuName? skuName = null, ResourceIdentifier classicResourceReferenceId = null, string profileName = null, IEnumerable migrationWebApplicationFirewallMappings = null) { @@ -904,17 +1339,29 @@ public static MigrationContent MigrationContent(CdnSkuName? skuName = null, Reso } /// Initializes a new instance of . - /// Resource ID. - /// Resource type. - /// Arm resource id of the migrated profile. + /// + /// Resource ID. + /// Serialized Name: MigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: MigrateResult.type + /// + /// + /// Arm resource id of the migrated profile + /// Serialized Name: MigrateResult.properties.migratedProfileResourceId + /// /// A new instance for mocking. - public static MigrateResult MigrateResult(string id = null, string migrateResultType = null, ResourceIdentifier migratedProfileResourceIdId = null) + public static MigrateResult MigrateResult(ResourceIdentifier resourceId = null, string migrateResultType = null, ResourceIdentifier migratedProfileResourceIdId = null) { - return new MigrateResult(id, migrateResultType, migratedProfileResourceIdId != null ? ResourceManagerModelFactory.WritableSubResource(migratedProfileResourceIdId) : null, serializedAdditionalRawData: null); + return new MigrateResult(resourceId, migrateResultType, migratedProfileResourceIdId != null ? ResourceManagerModelFactory.WritableSubResource(migratedProfileResourceIdId) : null, serializedAdditionalRawData: null); } /// Initializes a new instance of . - /// The URI used to login to the supplemental portal. + /// + /// The URI used to login to the supplemental portal. + /// Serialized Name: SsoUri.ssoUriValue + /// /// A new instance for mocking. public static SsoUri SsoUri(Uri availableSsoUri = null) { @@ -922,7 +1369,10 @@ public static SsoUri SsoUri(Uri availableSsoUri = null) } /// Initializes a new instance of . - /// Supported optimization types for a profile. + /// + /// Supported optimization types for a profile. + /// Serialized Name: SupportedOptimizationTypesListResult.supportedOptimizationTypes + /// /// A new instance for mocking. public static SupportedOptimizationTypesListResult SupportedOptimizationTypesListResult(IEnumerable supportedOptimizationTypes = null) { @@ -932,10 +1382,22 @@ public static SupportedOptimizationTypesListResult SupportedOptimizationTypesLis } /// Initializes a new instance of . - /// Resource type for which the usage is provided. - /// Unit of the usage. e.g. count. - /// Actual value of usage on the specified resource type. - /// Quota of the specified resource type. + /// + /// Resource type for which the usage is provided. + /// Serialized Name: ResourceUsage.resourceType + /// + /// + /// Unit of the usage. e.g. count. + /// Serialized Name: ResourceUsage.unit + /// + /// + /// Actual value of usage on the specified resource type. + /// Serialized Name: ResourceUsage.currentValue + /// + /// + /// Quota of the specified resource type. + /// Serialized Name: ResourceUsage.limit + /// /// A new instance for mocking. public static CdnUsage CdnUsage(string resourceType = null, CdnUsageUnit? unit = null, int? currentValue = null, int? limit = null) { @@ -949,26 +1411,86 @@ public static CdnUsage CdnUsage(string resourceType = null, CdnUsageUnit? unit = /// The systemData. /// The tags. /// The location. - /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// List of content types on which compression applies. The value should be a valid MIME type. - /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. - /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. - /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. - /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. - /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. - /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/. - /// A reference to the origin group. - /// List of keys used to validate the signed URL hashes. - /// A policy that specifies the delivery rules to be used for an endpoint. - /// Defines the Web Application Firewall policy for the endpoint (if applicable). - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. - /// The source of the content being delivered via CDN. - /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. - /// The custom domains under the endpoint. - /// Resource status of the endpoint. - /// Provisioning status of the endpoint. + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Endpoint.properties.originPath + /// + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: Endpoint.properties.contentTypesToCompress + /// + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: Endpoint.properties.originHostHeader + /// + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: Endpoint.properties.isCompressionEnabled + /// + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpAllowed + /// + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpsAllowed + /// + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: Endpoint.properties.queryStringCachingBehavior + /// + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// Serialized Name: Endpoint.properties.optimizationType + /// + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// Serialized Name: Endpoint.properties.probePath + /// + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + /// Serialized Name: Endpoint.properties.geoFilters + /// + /// + /// A reference to the origin group. + /// Serialized Name: Endpoint.properties.defaultOriginGroup + /// + /// + /// List of keys used to validate the signed URL hashes. + /// Serialized Name: Endpoint.properties.urlSigningKeys + /// + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: Endpoint.properties.deliveryPolicy + /// + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: Endpoint.properties.webApplicationFirewallPolicyLink + /// + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: Endpoint.properties.hostName + /// + /// + /// The source of the content being delivered via CDN. + /// Serialized Name: Endpoint.properties.origins + /// + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// Serialized Name: Endpoint.properties.originGroups + /// + /// + /// The custom domains under the endpoint. + /// Serialized Name: Endpoint.properties.customDomains + /// + /// + /// Resource status of the endpoint. + /// Serialized Name: Endpoint.properties.resourceState + /// + /// + /// Provisioning status of the endpoint. + /// Serialized Name: Endpoint.properties.provisioningState + /// /// A new instance for mocking. public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string originPath = null, IEnumerable contentTypesToCompress = null, string originHostHeader = null, bool? isCompressionEnabled = null, bool? isHttpAllowed = null, bool? isHttpsAllowed = null, QueryStringCachingBehavior? queryStringCachingBehavior = null, OptimizationType? optimizationType = null, string probePath = null, IEnumerable geoFilters = null, ResourceIdentifier defaultOriginGroupId = null, IEnumerable uriSigningKeys = null, EndpointDeliveryPolicy deliveryPolicy = null, ResourceIdentifier webApplicationFirewallPolicyLinkId = null, string hostName = null, IEnumerable origins = null, IEnumerable originGroups = null, IEnumerable deepCreatedCustomDomains = null, EndpointResourceState? resourceState = null, CdnEndpointProvisioningState? provisioningState = null) { @@ -1011,19 +1533,58 @@ public static CdnEndpointData CdnEndpointData(ResourceIdentifier id = null, stri } /// Initializes a new instance of . - /// Origin name which must be unique within the endpoint. - /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// Origin is enabled for load balancing or not. By default, origin is always enabled. - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. - /// A custom message to be included in the approval request to connect to the Private Link. - /// The approval status for the connection to the Private Link. + /// + /// Origin name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOrigin.name + /// + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + /// Serialized Name: DeepCreatedOrigin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: DeepCreatedOrigin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// Serialized Name: DeepCreatedOrigin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: DeepCreatedOrigin.properties.weight + /// + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// Serialized Name: DeepCreatedOrigin.properties.enabled + /// + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkAlias + /// + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkResourceId + /// + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkLocation + /// + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkApprovalMessage + /// + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: DeepCreatedOrigin.properties.privateEndpointStatus + /// /// A new instance for mocking. public static DeepCreatedOrigin DeepCreatedOrigin(string name = null, string hostName = null, int? httpPort = null, int? httpsPort = null, string originHostHeader = null, int? priority = null, int? weight = null, bool? enabled = null, string privateLinkAlias = null, ResourceIdentifier privateLinkResourceId = null, string privateLinkLocation = null, string privateLinkApprovalMessage = null, PrivateEndpointStatus? privateEndpointStatus = null) { @@ -1045,9 +1606,18 @@ public static DeepCreatedOrigin DeepCreatedOrigin(string name = null, string hos } /// Initializes a new instance of . - /// Custom domain name. - /// The host name of the custom domain. Must be a domain name. - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// + /// Custom domain name. + /// Serialized Name: DeepCreatedCustomDomain.name + /// + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: DeepCreatedCustomDomain.properties.hostName + /// + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: DeepCreatedCustomDomain.properties.validationData + /// /// A new instance for mocking. public static DeepCreatedCustomDomain DeepCreatedCustomDomain(string name = null, string hostName = null, string validationData = null) { @@ -1059,20 +1629,62 @@ public static DeepCreatedCustomDomain DeepCreatedCustomDomain(string name = null /// The name. /// The resourceType. /// The systemData. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// Origin is enabled for load balancing or not. - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. - /// A custom message to be included in the approval request to connect to the Private Link. - /// Resource status of the origin. - /// Provisioning status of the origin. - /// The approval status for the connection to the Private Link. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: Origin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: Origin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: Origin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: Origin.properties.weight + /// + /// + /// Origin is enabled for load balancing or not + /// Serialized Name: Origin.properties.enabled + /// + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: Origin.properties.privateLinkAlias + /// + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: Origin.properties.privateLinkResourceId + /// + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: Origin.properties.privateLinkLocation + /// + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: Origin.properties.privateLinkApprovalMessage + /// + /// + /// Resource status of the origin. + /// Serialized Name: Origin.properties.resourceState + /// + /// + /// Provisioning status of the origin. + /// Serialized Name: Origin.properties.provisioningState + /// + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: Origin.properties.privateEndpointStatus + /// /// A new instance for mocking. public static CdnOriginData CdnOriginData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string hostName = null, int? httpPort = null, int? httpsPort = null, string originHostHeader = null, int? priority = null, int? weight = null, bool? enabled = null, string privateLinkAlias = null, ResourceIdentifier privateLinkResourceId = null, string privateLinkLocation = null, string privateLinkApprovalMessage = null, OriginResourceState? resourceState = null, OriginProvisioningState? provisioningState = null, PrivateEndpointStatus? privateEndpointStatus = null) { @@ -1103,12 +1715,30 @@ public static CdnOriginData CdnOriginData(ResourceIdentifier id = null, string n /// The name. /// The resourceType. /// The systemData. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// The source of the content being delivered via CDN within given origin group. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. - /// Resource status of the origin group. - /// Provisioning status of the origin group. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: OriginGroup.properties.healthProbeSettings + /// + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: OriginGroup.properties.origins + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.responseBasedOriginErrorDetectionSettings + /// + /// + /// Resource status of the origin group. + /// Serialized Name: OriginGroup.properties.resourceState + /// + /// + /// Provisioning status of the origin group. + /// Serialized Name: OriginGroup.properties.provisioningState + /// /// A new instance for mocking. public static CdnOriginGroupData CdnOriginGroupData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, HealthProbeSettings healthProbeSettings = null, IEnumerable origins = null, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes = null, ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings = null, OriginGroupResourceState? resourceState = null, OriginGroupProvisioningState? provisioningState = null) { @@ -1133,17 +1763,36 @@ public static CdnOriginGroupData CdnOriginGroupData(ResourceIdentifier id = null /// The name. /// The resourceType. /// The systemData. - /// The host name of the custom domain. Must be a domain name. - /// Resource status of the custom domain. - /// Provisioning status of the custom domain. - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: CustomDomain.properties.hostName + /// + /// + /// Resource status of the custom domain. + /// Serialized Name: CustomDomain.properties.resourceState + /// + /// + /// Provisioning status of the custom domain. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningState + /// + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningSubstate + /// /// /// Certificate parameters for securing custom HTTPS + /// Serialized Name: CustomDomain.properties.customHttpsParameters /// 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 . /// - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. - /// Provisioning status of Custom Https of the custom domain. + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: CustomDomain.properties.validationData + /// + /// + /// Provisioning status of Custom Https of the custom domain. + /// Serialized Name: CustomDomain.properties.provisioningState + /// /// A new instance for mocking. public static CdnCustomDomainData CdnCustomDomainData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string hostName = null, CustomDomainResourceState? resourceState = null, CustomHttpsProvisioningState? customHttpsProvisioningState = null, CustomHttpsAvailabilityState? customHttpsAvailabilityState = null, CustomDomainHttpsContent customDomainHttpsContent = null, string validationData = null, CustomHttpsProvisioningState? provisioningState = null) { @@ -1163,9 +1812,18 @@ public static CdnCustomDomainData CdnCustomDomainData(ResourceIdentifier id = nu } /// Initializes a new instance of . - /// Indicates whether the probe URL is accepted or not. - /// Specifies the error code when the probe url is not accepted. - /// The detailed error message describing why the probe URL is not accepted. + /// + /// Indicates whether the probe URL is accepted or not. + /// Serialized Name: ValidateProbeOutput.isValid + /// + /// + /// Specifies the error code when the probe url is not accepted. + /// Serialized Name: ValidateProbeOutput.errorCode + /// + /// + /// The detailed error message describing why the probe URL is not accepted. + /// Serialized Name: ValidateProbeOutput.message + /// /// A new instance for mocking. public static ValidateProbeResult ValidateProbeResult(bool? isValid = null, string errorCode = null, string message = null) { @@ -1177,7 +1835,10 @@ public static ValidateProbeResult ValidateProbeResult(bool? isValid = null, stri /// The name. /// The resourceType. /// The systemData. - /// List of ip address groups. + /// + /// List of ip address groups. + /// Serialized Name: EdgeNode.properties.ipAddressGroups + /// /// A new instance for mocking. public static EdgeNode EdgeNode(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable ipAddressGroups = null) { @@ -1192,6 +1853,23 @@ public static EdgeNode EdgeNode(ResourceIdentifier id = null, string name = null serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// Sku for the migration + /// Serialized Name: CdnMigrationToAfdParameters.sku + /// + /// + /// A name map between classic CDN endpoints and AFD Premium/Standard endpoints. + /// Serialized Name: CdnMigrationToAfdParameters.migrationEndpointMappings + /// + /// A new instance for mocking. + public static CdnMigrationToAfdContent CdnMigrationToAfdContent(CdnSkuName? skuName = null, IEnumerable migrationEndpointMappings = null) + { + migrationEndpointMappings ??= new List(); + + return new CdnMigrationToAfdContent(skuName != null ? new CdnSku(skuName, serializedAdditionalRawData: null) : null, migrationEndpointMappings?.ToList(), serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1199,16 +1877,46 @@ public static EdgeNode EdgeNode(ResourceIdentifier id = null, string name = null /// The systemData. /// The tags. /// The location. - /// Gets a unique read-only string that changes whenever the resource is updated. - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - /// Describes policySettings for policy. - /// Describes rate limit rules inside the policy. - /// Describes custom rules inside the policy. - /// Describes managed rules inside the policy. - /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. - /// Key-Value pair representing additional properties for Web Application Firewall policy. - /// Provisioning state of the WebApplicationFirewallPolicy. - /// Resource status of the policy. + /// + /// Gets a unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CdnWebApplicationFirewallPolicy.etag + /// + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.sku + /// + /// + /// Describes policySettings for policy + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.policySettings + /// + /// + /// Describes rate limit rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.rateLimitRules + /// + /// + /// Describes custom rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.customRules + /// + /// + /// Describes managed rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.managedRules + /// + /// + /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.endpointLinks + /// + /// + /// Key-Value pair representing additional properties for Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.extendedProperties + /// + /// + /// Provisioning state of the WebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.provisioningState + /// + /// + /// Resource status of the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.resourceState + /// /// A new instance for mocking. public static CdnWebApplicationFirewallPolicyData CdnWebApplicationFirewallPolicyData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, CdnSkuName? skuName = null, WafPolicySettings policySettings = null, IEnumerable rateLimitRules = null, IEnumerable customRules = null, IEnumerable managedRuleSets = null, IEnumerable endpointLinks = null, IDictionary extendedProperties = null, WebApplicationFirewallPolicyProvisioningState? provisioningState = null, PolicyResourceState? resourceState = null) { @@ -1244,11 +1952,26 @@ public static CdnWebApplicationFirewallPolicyData CdnWebApplicationFirewallPolic /// The name. /// The resourceType. /// The systemData. - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - /// Provisioning state of the managed rule set. - /// Type of the managed rule set. - /// Version of the managed rule set type. - /// Rule groups of the managed rule set. + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: ManagedRuleSetDefinition.sku + /// + /// + /// Provisioning state of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.provisioningState + /// + /// + /// Type of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetType + /// + /// + /// Version of the managed rule set type. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetVersion + /// + /// + /// Rule groups of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleGroups + /// /// A new instance for mocking. public static ManagedRuleSetDefinition ManagedRuleSetDefinition(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, CdnSkuName? skuName = null, string provisioningState = null, string ruleSetType = null, string ruleSetVersion = null, IEnumerable ruleGroups = null) { @@ -1268,9 +1991,18 @@ public static ManagedRuleSetDefinition ManagedRuleSetDefinition(ResourceIdentifi } /// Initializes a new instance of . - /// Name of the managed rule group. - /// Description of the managed rule group. - /// List of rules within the managed rule group. + /// + /// Name of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.ruleGroupName + /// + /// + /// Description of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.description + /// + /// + /// List of rules within the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.rules + /// /// A new instance for mocking. public static ManagedRuleGroupDefinition ManagedRuleGroupDefinition(string ruleGroupName = null, string description = null, IEnumerable rules = null) { @@ -1280,8 +2012,14 @@ public static ManagedRuleGroupDefinition ManagedRuleGroupDefinition(string ruleG } /// Initializes a new instance of . - /// Identifier for the managed rule. - /// Describes the functionality of the managed rule. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleDefinition.ruleId + /// + /// + /// Describes the functionality of the managed rule. + /// Serialized Name: ManagedRuleDefinition.description + /// /// A new instance for mocking. public static ManagedRuleDefinition ManagedRuleDefinition(string ruleId = null, string description = null) { @@ -1289,8 +2027,14 @@ public static ManagedRuleDefinition ManagedRuleDefinition(string ruleId = null, } /// Initializes a new instance of . - /// Subject name in the certificate. - /// Certificate expiration date. + /// + /// Subject name in the certificate. + /// Serialized Name: ManagedCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: ManagedCertificateParameters.expirationDate + /// /// A new instance for mocking. public static ManagedCertificateProperties ManagedCertificateProperties(string subject = null, DateTimeOffset? expiresOn = null) { @@ -1298,14 +2042,38 @@ public static ManagedCertificateProperties ManagedCertificateProperties(string s } /// Initializes a new instance of . - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Version of the secret to be used. - /// Whether to use the latest version for the certificate. - /// Subject name in the certificate. - /// Certificate expiration date. - /// Certificate issuing authority. - /// The list of SANs. - /// Certificate thumbprint. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: CustomerCertificateParameters.secretSource + /// + /// + /// Version of the secret to be used + /// Serialized Name: CustomerCertificateParameters.secretVersion + /// + /// + /// Whether to use the latest version for the certificate + /// Serialized Name: CustomerCertificateParameters.useLatestVersion + /// + /// + /// Subject name in the certificate. + /// Serialized Name: CustomerCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: CustomerCertificateParameters.expirationDate + /// + /// + /// Certificate issuing authority. + /// Serialized Name: CustomerCertificateParameters.certificateAuthority + /// + /// + /// The list of SANs. + /// Serialized Name: CustomerCertificateParameters.subjectAlternativeNames + /// + /// + /// Certificate thumbprint. + /// Serialized Name: CustomerCertificateParameters.thumbprint + /// /// A new instance for mocking. public static CustomerCertificateProperties CustomerCertificateProperties(ResourceIdentifier secretSourceId = null, string secretVersion = null, bool? useLatestVersion = null, string subject = null, DateTimeOffset? expiresOn = null, string certificateAuthority = null, IEnumerable subjectAlternativeNames = null, string thumbprint = null) { @@ -1325,12 +2093,30 @@ public static CustomerCertificateProperties CustomerCertificateProperties(Resour } /// Initializes a new instance of . - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Subject name in the certificate. - /// Certificate expiration date. - /// Certificate issuing authority. - /// The list of SANs. - /// Certificate thumbprint. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.secretSource + /// + /// + /// Subject name in the certificate. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.expirationDate + /// + /// + /// Certificate issuing authority. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.certificateAuthority + /// + /// + /// The list of SANs. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subjectAlternativeNames + /// + /// + /// Certificate thumbprint. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.thumbprint + /// /// A new instance for mocking. public static AzureFirstPartyManagedCertificateProperties AzureFirstPartyManagedCertificateProperties(ResourceIdentifier secretSourceId = null, string subject = null, string expirationDate = null, string certificateAuthority = null, IEnumerable subjectAlternativeNames = null, string thumbprint = null) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainCollection.cs index 1c55106ae450..89c6859d92a6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string cus /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string customDomainName, Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string customDomainName, C /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string customDomainName, CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainData.cs index 452b29530822..23c67612e8b8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the CdnCustomDomain data model. /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// Serialized Name: CustomDomain /// public partial class CdnCustomDomainData : ResourceData { @@ -61,17 +62,36 @@ public CdnCustomDomainData() /// The name. /// The resourceType. /// The systemData. - /// The host name of the custom domain. Must be a domain name. - /// Resource status of the custom domain. - /// Provisioning status of the custom domain. - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: CustomDomain.properties.hostName + /// + /// + /// Resource status of the custom domain. + /// Serialized Name: CustomDomain.properties.resourceState + /// + /// + /// Provisioning status of the custom domain. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningState + /// + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningSubstate + /// /// /// Certificate parameters for securing custom HTTPS + /// Serialized Name: CustomDomain.properties.customHttpsParameters /// 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 . /// - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. - /// Provisioning status of Custom Https of the custom domain. + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: CustomDomain.properties.validationData + /// + /// + /// Provisioning status of Custom Https of the custom domain. + /// Serialized Name: CustomDomain.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal CdnCustomDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string hostName, CustomDomainResourceState? resourceState, CustomHttpsProvisioningState? customHttpsProvisioningState, CustomHttpsAvailabilityState? customHttpsAvailabilityState, CustomDomainHttpsContent customDomainHttpsContent, string validationData, CustomHttpsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -85,23 +105,42 @@ internal CdnCustomDomainData(ResourceIdentifier id, string name, ResourceType re _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: CustomDomain.properties.hostName + /// public string HostName { get; set; } - /// Resource status of the custom domain. + /// + /// Resource status of the custom domain. + /// Serialized Name: CustomDomain.properties.resourceState + /// public CustomDomainResourceState? ResourceState { get; } - /// Provisioning status of the custom domain. + /// + /// Provisioning status of the custom domain. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningState + /// public CustomHttpsProvisioningState? CustomHttpsProvisioningState { get; } - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// Serialized Name: CustomDomain.properties.customHttpsProvisioningSubstate + /// public CustomHttpsAvailabilityState? CustomHttpsAvailabilityState { get; } /// /// Certificate parameters for securing custom HTTPS + /// Serialized Name: CustomDomain.properties.customHttpsParameters /// 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 CustomDomainHttpsContent CustomDomainHttpsContent { get; set; } - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: CustomDomain.properties.validationData + /// public string ValidationData { get; set; } - /// Provisioning status of Custom Https of the custom domain. + /// + /// Provisioning status of Custom Https of the custom domain. + /// Serialized Name: CustomDomain.properties.provisioningState + /// public CustomHttpsProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.Serialization.cs index 9bf6ea81378b..d4f3d3c24151 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class CdnCustomDomainResource : IJsonModel { + private static CdnCustomDomainData s_dataDeserializationInstance; + private static CdnCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CdnCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CdnCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); CdnCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.cs index 40120806cbb9..f9d7c2452d3c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnCustomDomainResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> DisableCustomHt /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation DisableCustomHttps(WaitUnti /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task> EnableCustomHtt /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointCollection.cs index a3d865175d48..7fbf7d33a0e2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string endpoin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string endpointName, Cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs index 827f9c2ba8dc..c9eb4ade7c84 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the CdnEndpoint data model. /// CDN endpoint is the entity within a CDN profile containing configuration information such as origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format <endpointname>.azureedge.net. + /// Serialized Name: Endpoint /// public partial class CdnEndpointData : TrackedResourceData { @@ -71,26 +72,86 @@ public CdnEndpointData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// List of content types on which compression applies. The value should be a valid MIME type. - /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. - /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. - /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. - /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. - /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. - /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/. - /// A reference to the origin group. - /// List of keys used to validate the signed URL hashes. - /// A policy that specifies the delivery rules to be used for an endpoint. - /// Defines the Web Application Firewall policy for the endpoint (if applicable). - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. - /// The source of the content being delivered via CDN. - /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. - /// The custom domains under the endpoint. - /// Resource status of the endpoint. - /// Provisioning status of the endpoint. + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Endpoint.properties.originPath + /// + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: Endpoint.properties.contentTypesToCompress + /// + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: Endpoint.properties.originHostHeader + /// + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: Endpoint.properties.isCompressionEnabled + /// + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpAllowed + /// + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpsAllowed + /// + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: Endpoint.properties.queryStringCachingBehavior + /// + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// Serialized Name: Endpoint.properties.optimizationType + /// + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// Serialized Name: Endpoint.properties.probePath + /// + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + /// Serialized Name: Endpoint.properties.geoFilters + /// + /// + /// A reference to the origin group. + /// Serialized Name: Endpoint.properties.defaultOriginGroup + /// + /// + /// List of keys used to validate the signed URL hashes. + /// Serialized Name: Endpoint.properties.urlSigningKeys + /// + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: Endpoint.properties.deliveryPolicy + /// + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: Endpoint.properties.webApplicationFirewallPolicyLink + /// + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: Endpoint.properties.hostName + /// + /// + /// The source of the content being delivered via CDN. + /// Serialized Name: Endpoint.properties.origins + /// + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// Serialized Name: Endpoint.properties.originGroups + /// + /// + /// The custom domains under the endpoint. + /// Serialized Name: Endpoint.properties.customDomains + /// + /// + /// Resource status of the endpoint. + /// Serialized Name: Endpoint.properties.resourceState + /// + /// + /// Provisioning status of the endpoint. + /// Serialized Name: Endpoint.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal CdnEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string originPath, IList contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList geoFilters, WritableSubResource defaultOriginGroup, IList uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, string hostName, IList origins, IList originGroups, IReadOnlyList deepCreatedCustomDomains, EndpointResourceState? resourceState, CdnEndpointProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -122,27 +183,60 @@ internal CdnEndpointData() { } - /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Endpoint.properties.originPath + /// public string OriginPath { get; set; } - /// List of content types on which compression applies. The value should be a valid MIME type. + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: Endpoint.properties.contentTypesToCompress + /// public IList ContentTypesToCompress { get; } - /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: Endpoint.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: Endpoint.properties.isCompressionEnabled + /// public bool? IsCompressionEnabled { get; set; } - /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpAllowed + /// public bool? IsHttpAllowed { get; set; } - /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: Endpoint.properties.isHttpsAllowed + /// public bool? IsHttpsAllowed { get; set; } - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: Endpoint.properties.queryStringCachingBehavior + /// public QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } - /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// Serialized Name: Endpoint.properties.optimizationType + /// public OptimizationType? OptimizationType { get; set; } - /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// Serialized Name: Endpoint.properties.probePath + /// public string ProbePath { get; set; } - /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/. + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + /// Serialized Name: Endpoint.properties.geoFilters + /// public IList GeoFilters { get; } - /// A reference to the origin group. + /// + /// A reference to the origin group. + /// Serialized Name: Endpoint.properties.defaultOriginGroup + /// internal WritableSubResource DefaultOriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier DefaultOriginGroupId @@ -156,13 +250,25 @@ public ResourceIdentifier DefaultOriginGroupId } } - /// List of keys used to validate the signed URL hashes. + /// + /// List of keys used to validate the signed URL hashes. + /// Serialized Name: Endpoint.properties.urlSigningKeys + /// public IList UriSigningKeys { get; set; } - /// A policy that specifies the delivery rules to be used for an endpoint. + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: Endpoint.properties.deliveryPolicy + /// public EndpointDeliveryPolicy DeliveryPolicy { get; set; } - /// Defines the Web Application Firewall policy for the endpoint (if applicable). + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: Endpoint.properties.webApplicationFirewallPolicyLink + /// internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.id + /// public ResourceIdentifier WebApplicationFirewallPolicyLinkId { get => WebApplicationFirewallPolicyLink is null ? default : WebApplicationFirewallPolicyLink.Id; @@ -174,17 +280,35 @@ public ResourceIdentifier WebApplicationFirewallPolicyLinkId } } - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: Endpoint.properties.hostName + /// public string HostName { get; } - /// The source of the content being delivered via CDN. + /// + /// The source of the content being delivered via CDN. + /// Serialized Name: Endpoint.properties.origins + /// public IList Origins { get; } - /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// + /// The origin groups comprising of origins that are used for load balancing the traffic based on availability. + /// Serialized Name: Endpoint.properties.originGroups + /// public IList OriginGroups { get; } - /// The custom domains under the endpoint. + /// + /// The custom domains under the endpoint. + /// Serialized Name: Endpoint.properties.customDomains + /// public IReadOnlyList DeepCreatedCustomDomains { get; } - /// Resource status of the endpoint. + /// + /// Resource status of the endpoint. + /// Serialized Name: Endpoint.properties.resourceState + /// public EndpointResourceState? ResourceState { get; } - /// Provisioning status of the endpoint. + /// + /// Provisioning status of the endpoint. + /// Serialized Name: Endpoint.properties.provisioningState + /// public CdnEndpointProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.Serialization.cs index 4cc7669fdc13..3f4e3e739d07 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class CdnEndpointResource : IJsonModel { + private static CdnEndpointData s_dataDeserializationInstance; + private static CdnEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CdnEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CdnEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); CdnEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.cs index 4627b6ab7fba..4ea32ab21fe3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnEndpointResource.cs @@ -111,7 +111,7 @@ public virtual CdnOriginCollection GetCdnOrigins() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetCdnOriginAsync(string /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual CdnOriginGroupCollection GetCdnOriginGroups() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetCdnOriginGroupAsy /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual CdnCustomDomainCollection GetCdnCustomDomains() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -280,7 +280,7 @@ public virtual async Task> GetCdnCustomDomainA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual Response GetCdnCustomDomain(string custo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -391,7 +391,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -433,7 +433,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -521,7 +521,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -567,7 +567,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Cdn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -609,7 +609,7 @@ public virtual async Task> StartAsync(WaitUnti /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -651,7 +651,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, Canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> StopAsync(WaitUntil /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -735,7 +735,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, Cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -781,7 +781,7 @@ public virtual async Task PurgeContentAsync(WaitUntil waitUntil, P /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -827,7 +827,7 @@ public virtual ArmOperation PurgeContent(WaitUntil waitUntil, PurgeContent conte /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -873,7 +873,7 @@ public virtual async Task LoadContentAsync(WaitUntil waitUntil, Lo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -919,7 +919,7 @@ public virtual ArmOperation LoadContent(WaitUntil waitUntil, LoadContent content /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -961,7 +961,7 @@ public virtual async Task> ValidateCustomDo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1003,7 +1003,7 @@ public virtual Response ValidateCustomDomain(Validat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1033,7 +1033,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1063,7 +1063,7 @@ public virtual Pageable GetResourceUsages(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1125,7 +1125,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1187,7 +1187,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1244,7 +1244,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1301,7 +1301,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1361,7 +1361,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginCollection.cs index 7ab619d438fd..fd06754ee4ad 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string originNam /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string originName, CancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string originName, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string originName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginData.cs index 0444c3a4a70c..f9350705ad29 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the CdnOrigin data model. /// CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// Serialized Name: Origin /// public partial class CdnOriginData : ResourceData { @@ -61,20 +62,62 @@ public CdnOriginData() /// The name. /// The resourceType. /// The systemData. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// Origin is enabled for load balancing or not. - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. - /// A custom message to be included in the approval request to connect to the Private Link. - /// Resource status of the origin. - /// Provisioning status of the origin. - /// The approval status for the connection to the Private Link. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: Origin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: Origin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: Origin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: Origin.properties.weight + /// + /// + /// Origin is enabled for load balancing or not + /// Serialized Name: Origin.properties.enabled + /// + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: Origin.properties.privateLinkAlias + /// + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: Origin.properties.privateLinkResourceId + /// + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: Origin.properties.privateLinkLocation + /// + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: Origin.properties.privateLinkApprovalMessage + /// + /// + /// Resource status of the origin. + /// Serialized Name: Origin.properties.resourceState + /// + /// + /// Provisioning status of the origin. + /// Serialized Name: Origin.properties.provisioningState + /// + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: Origin.properties.privateEndpointStatus + /// /// Keeps track of any properties unknown to the library. internal CdnOriginData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string hostName, int? httpPort, int? httpsPort, string originHostHeader, int? priority, int? weight, bool? enabled, string privateLinkAlias, ResourceIdentifier privateLinkResourceId, string privateLinkLocation, string privateLinkApprovalMessage, OriginResourceState? resourceState, OriginProvisioningState? provisioningState, PrivateEndpointStatus? privateEndpointStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -95,33 +138,75 @@ internal CdnOriginData(ResourceIdentifier id, string name, ResourceType resource _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: Origin.properties.hostName + /// public string HostName { get; set; } - /// The value of the HTTP port. Must be between 1 and 65535. + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpPort + /// public int? HttpPort { get; set; } - /// The value of the HTTPS port. Must be between 1 and 65535. + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: Origin.properties.httpsPort + /// public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: Origin.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: Origin.properties.priority + /// public int? Priority { get; set; } - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: Origin.properties.weight + /// public int? Weight { get; set; } - /// Origin is enabled for load balancing or not. + /// + /// Origin is enabled for load balancing or not + /// Serialized Name: Origin.properties.enabled + /// public bool? Enabled { get; set; } - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: Origin.properties.privateLinkAlias + /// public string PrivateLinkAlias { get; set; } - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: Origin.properties.privateLinkResourceId + /// public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: Origin.properties.privateLinkLocation + /// public string PrivateLinkLocation { get; set; } - /// A custom message to be included in the approval request to connect to the Private Link. + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: Origin.properties.privateLinkApprovalMessage + /// public string PrivateLinkApprovalMessage { get; set; } - /// Resource status of the origin. + /// + /// Resource status of the origin. + /// Serialized Name: Origin.properties.resourceState + /// public OriginResourceState? ResourceState { get; } - /// Provisioning status of the origin. + /// + /// Provisioning status of the origin. + /// Serialized Name: Origin.properties.provisioningState + /// public OriginProvisioningState? ProvisioningState { get; } - /// The approval status for the connection to the Private Link. + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: Origin.properties.privateEndpointStatus + /// public PrivateEndpointStatus? PrivateEndpointStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupCollection.cs index 57ed84006b7b..cd47b1a1489a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string orig /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string originGroupName, Canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string originGroupName, Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string originGroupName, CancellationToken c /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupData.cs index ad0688530581..95c53e5a0a49 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the CdnOriginGroup data model. /// Origin group comprising of origins is used for load balancing to origins when the content cannot be served from CDN. + /// Serialized Name: OriginGroup /// public partial class CdnOriginGroupData : ResourceData { @@ -63,12 +64,30 @@ public CdnOriginGroupData() /// The name. /// The resourceType. /// The systemData. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// The source of the content being delivered via CDN within given origin group. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. - /// Resource status of the origin group. - /// Provisioning status of the origin group. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: OriginGroup.properties.healthProbeSettings + /// + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: OriginGroup.properties.origins + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.responseBasedOriginErrorDetectionSettings + /// + /// + /// Resource status of the origin group. + /// Serialized Name: OriginGroup.properties.resourceState + /// + /// + /// Provisioning status of the origin group. + /// Serialized Name: OriginGroup.properties.provisioningState + /// /// Keeps track of any properties unknown to the library. internal CdnOriginGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, HealthProbeSettings healthProbeSettings, IList origins, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes, ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings, OriginGroupResourceState? resourceState, OriginGroupProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -81,17 +100,35 @@ internal CdnOriginGroupData(ResourceIdentifier id, string name, ResourceType res _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Health probe settings to the origin that is used to determine the health of the origin. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: OriginGroup.properties.healthProbeSettings + /// public HealthProbeSettings HealthProbeSettings { get; set; } - /// The source of the content being delivered via CDN within given origin group. + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: OriginGroup.properties.origins + /// public IList Origins { get; } - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } - /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// Serialized Name: OriginGroup.properties.responseBasedOriginErrorDetectionSettings + /// public ResponseBasedOriginErrorDetectionSettings ResponseBasedOriginErrorDetectionSettings { get; set; } - /// Resource status of the origin group. + /// + /// Resource status of the origin group. + /// Serialized Name: OriginGroup.properties.resourceState + /// public OriginGroupResourceState? ResourceState { get; } - /// Provisioning status of the origin group. + /// + /// Provisioning status of the origin group. + /// Serialized Name: OriginGroup.properties.provisioningState + /// public OriginGroupProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.Serialization.cs index 4edf9172f911..9a5f0ab468f7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class CdnOriginGroupResource : IJsonModel { + private static CdnOriginGroupData s_dataDeserializationInstance; + private static CdnOriginGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CdnOriginGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CdnOriginGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); CdnOriginGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.cs index 4f13e233331c..8bbdd5a333b1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.Serialization.cs index 8cfcbe703084..41008f027f52 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class CdnOriginResource : IJsonModel { + private static CdnOriginData s_dataDeserializationInstance; + private static CdnOriginData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CdnOriginData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CdnOriginData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); CdnOriginData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.cs index e6f5c6e27580..9de39cd60c00 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnOriginResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyCollection.cs index 7389de1ef4a2..48725d91a338 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string poli /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs index 018526e27fe4..df67159f59f5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the CdnWebApplicationFirewallPolicy data model. /// Defines web application firewall policy for Azure CDN. + /// Serialized Name: CdnWebApplicationFirewallPolicy /// public partial class CdnWebApplicationFirewallPolicyData : TrackedResourceData { @@ -54,7 +55,10 @@ public partial class CdnWebApplicationFirewallPolicyData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.sku + /// /// is null. public CdnWebApplicationFirewallPolicyData(AzureLocation location, CdnSku sku) : base(location) { @@ -72,16 +76,46 @@ public CdnWebApplicationFirewallPolicyData(AzureLocation location, CdnSku sku) : /// The systemData. /// The tags. /// The location. - /// Gets a unique read-only string that changes whenever the resource is updated. - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - /// Describes policySettings for policy. - /// Describes rate limit rules inside the policy. - /// Describes custom rules inside the policy. - /// Describes managed rules inside the policy. - /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. - /// Key-Value pair representing additional properties for Web Application Firewall policy. - /// Provisioning state of the WebApplicationFirewallPolicy. - /// Resource status of the policy. + /// + /// Gets a unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CdnWebApplicationFirewallPolicy.etag + /// + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.sku + /// + /// + /// Describes policySettings for policy + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.policySettings + /// + /// + /// Describes rate limit rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.rateLimitRules + /// + /// + /// Describes custom rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.customRules + /// + /// + /// Describes managed rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.managedRules + /// + /// + /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.endpointLinks + /// + /// + /// Key-Value pair representing additional properties for Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.extendedProperties + /// + /// + /// Provisioning state of the WebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.provisioningState + /// + /// + /// Resource status of the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.resourceState + /// /// Keeps track of any properties unknown to the library. internal CdnWebApplicationFirewallPolicyData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, CdnSku sku, WafPolicySettings policySettings, RateLimitRuleList rateLimitSettings, CustomRuleList customSettings, ManagedRuleSetList managedRules, IReadOnlyList endpointLinks, IDictionary extendedProperties, WebApplicationFirewallPolicyProvisioningState? provisioningState, PolicyResourceState? resourceState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -103,11 +137,20 @@ internal CdnWebApplicationFirewallPolicyData() { } - /// Gets a unique read-only string that changes whenever the resource is updated. + /// + /// Gets a unique read-only string that changes whenever the resource is updated. + /// Serialized Name: CdnWebApplicationFirewallPolicy.etag + /// public ETag? ETag { get; set; } - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.sku + /// internal CdnSku Sku { get; set; } - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// public CdnSkuName? SkuName { get => Sku is null ? default : Sku.Name; @@ -119,11 +162,20 @@ public CdnSkuName? SkuName } } - /// Describes policySettings for policy. + /// + /// Describes policySettings for policy + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.policySettings + /// public WafPolicySettings PolicySettings { get; set; } - /// Describes rate limit rules inside the policy. + /// + /// Describes rate limit rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.rateLimitRules + /// internal RateLimitRuleList RateLimitSettings { get; set; } - /// List of rules. + /// + /// List of rules + /// Serialized Name: RateLimitRuleList.rules + /// public IList RateLimitRules { get @@ -134,9 +186,15 @@ public IList RateLimitRules } } - /// Describes custom rules inside the policy. + /// + /// Describes custom rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.customRules + /// internal CustomRuleList CustomSettings { get; set; } - /// List of rules. + /// + /// List of rules + /// Serialized Name: CustomRuleList.rules + /// public IList CustomRules { get @@ -147,9 +205,15 @@ public IList CustomRules } } - /// Describes managed rules inside the policy. + /// + /// Describes managed rules inside the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.managedRules + /// internal ManagedRuleSetList ManagedRules { get; set; } - /// List of rule sets. + /// + /// List of rule sets. + /// Serialized Name: ManagedRuleSetList.managedRuleSets + /// public IList ManagedRuleSets { get @@ -160,13 +224,25 @@ public IList ManagedRuleSets } } - /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. + /// + /// Describes Azure CDN endpoints associated with this Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.endpointLinks + /// public IReadOnlyList EndpointLinks { get; } - /// Key-Value pair representing additional properties for Web Application Firewall policy. + /// + /// Key-Value pair representing additional properties for Web Application Firewall policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.extendedProperties + /// public IDictionary ExtendedProperties { get; } - /// Provisioning state of the WebApplicationFirewallPolicy. + /// + /// Provisioning state of the WebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.provisioningState + /// public WebApplicationFirewallPolicyProvisioningState? ProvisioningState { get; } - /// Resource status of the policy. + /// + /// Resource status of the policy. + /// Serialized Name: CdnWebApplicationFirewallPolicy.properties.resourceState + /// public PolicyResourceState? ResourceState { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.Serialization.cs index 928d1160b8b3..48afcb510da7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class CdnWebApplicationFirewallPolicyResource : IJsonModel { + private static CdnWebApplicationFirewallPolicyData s_dataDeserializationInstance; + private static CdnWebApplicationFirewallPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CdnWebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CdnWebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); CdnWebApplicationFirewallPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.cs index 3629131e98f3..5aa9918b7ce9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/CdnWebApplicationFirewallPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -363,7 +363,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -425,7 +425,7 @@ public virtual async Task> Add /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -487,7 +487,7 @@ public virtual Response AddTag(string k /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> Set /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -601,7 +601,7 @@ public virtual Response SetTags(IDictio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -661,7 +661,7 @@ public virtual async Task> Rem /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs index be501f6d5db2..2054344bc684 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/CdnExtensions.cs @@ -353,7 +353,7 @@ public static ProfileCollection GetProfiles(this ResourceGroupResource resourceG /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -391,7 +391,7 @@ public static async Task> GetProfileAsync(this Resourc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -446,7 +446,7 @@ public static CdnWebApplicationFirewallPolicyCollection GetCdnWebApplicationFire /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -484,7 +484,7 @@ public static async Task> GetC /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -522,7 +522,7 @@ public static Response GetCdnWebApplica /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -554,7 +554,7 @@ public static async Task> CheckEndpoint /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -586,7 +586,7 @@ public static Response CheckEndpointNameAvailabi /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -623,7 +623,7 @@ public static async Task> CanMigrateProfileAsync( /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -660,7 +660,7 @@ public static ArmOperation CanMigrateProfile(this ResourceGrou /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -697,7 +697,7 @@ public static async Task> MigrateProfileAsync(this R /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -734,7 +734,7 @@ public static ArmOperation MigrateProfile(this ResourceGroupResou /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -766,7 +766,7 @@ public static async Task> CheckCdnNameAvaila /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -798,7 +798,7 @@ public static Response CheckCdnNameAvailabilityWithSu /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -830,7 +830,7 @@ public static async Task> ValidateProbeAsync(this /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -862,7 +862,7 @@ public static Response ValidateProbe(this SubscriptionResou /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -898,7 +898,7 @@ public static AsyncPageable GetProfilesAsync(this SubscriptionR /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -934,7 +934,7 @@ public static Pageable GetProfiles(this SubscriptionResource su /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -966,7 +966,7 @@ public static AsyncPageable GetResourceUsagesAsync(this SubscriptionRe /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -998,7 +998,7 @@ public static Pageable GetResourceUsages(this SubscriptionResource sub /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1030,7 +1030,7 @@ public static AsyncPageable GetManagedRuleSetsAsync(th /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1062,7 +1062,7 @@ public static Pageable GetManagedRuleSets(this Subscri /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1094,7 +1094,7 @@ public static async Task> CheckCdnNameAvaila /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1126,7 +1126,7 @@ public static Response CheckCdnNameAvailability(this /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1158,7 +1158,7 @@ public static AsyncPageable GetEdgeNodesAsync(this TenantResource tena /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnResourceGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnResourceGroupResource.cs index 217e0a48dedc..2fcf7ad04d5d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnResourceGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnResourceGroupResource.cs @@ -65,7 +65,7 @@ public virtual ProfileCollection GetProfiles() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -96,7 +96,7 @@ public virtual async Task> GetProfileAsync(string prof /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -134,7 +134,7 @@ public virtual CdnWebApplicationFirewallPolicyCollection GetCdnWebApplicationFir /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -165,7 +165,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -196,7 +196,7 @@ public virtual Response GetCdnWebApplic /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -234,7 +234,7 @@ public virtual async Task> CheckEndpoin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -272,7 +272,7 @@ public virtual Response CheckEndpointNameAvailab /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> CanMigrateProfileAsync /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual ArmOperation CanMigrateProfile(WaitUntil waitUn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -410,7 +410,7 @@ public virtual async Task> MigrateProfileAsync(WaitU /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnSubscriptionResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnSubscriptionResource.cs index 962b28591861..426f583460d3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnSubscriptionResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnSubscriptionResource.cs @@ -67,7 +67,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -105,7 +105,7 @@ public virtual async Task> CheckCdnNameAvail /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -143,7 +143,7 @@ public virtual Response CheckCdnNameAvailabilityWithS /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -181,7 +181,7 @@ public virtual async Task> ValidateProbeAsync(Vali /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -219,7 +219,7 @@ public virtual Response ValidateProbe(ValidateProbeContent /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -249,7 +249,7 @@ public virtual AsyncPageable GetProfilesAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -279,7 +279,7 @@ public virtual Pageable GetProfiles(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -305,7 +305,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -331,7 +331,7 @@ public virtual Pageable GetResourceUsages(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -357,7 +357,7 @@ public virtual AsyncPageable GetManagedRuleSetsAsync(C /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnTenantResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnTenantResource.cs index a838874dbc92..450ff4a27951 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnTenantResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Extensions/MockableCdnTenantResource.cs @@ -59,7 +59,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -97,7 +97,7 @@ public virtual async Task> CheckCdnNameAvail /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -135,7 +135,7 @@ public virtual Response CheckCdnNameAvailability(CdnN /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -161,7 +161,7 @@ public virtual AsyncPageable GetEdgeNodesAsync(CancellationToken cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainCollection.cs index 491e2689b9d7..a1ca5834a9b6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string customDomainNa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string customDomainName, C /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string customDomainName, CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs index ca370cb9ca98..9b8d8c8f4400 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorCustomDomain data model. /// Friendly domain name mapping to the endpoint hostname that the customer provides for branding purposes, e.g. www.contoso.com. + /// Serialized Name: AFDDomain /// public partial class FrontDoorCustomDomainData : ResourceData { @@ -63,16 +64,43 @@ public FrontDoorCustomDomainData() /// The name. /// The resourceType. /// The systemData. - /// The name of the profile which holds the domain. - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. - /// Resource reference to the Azure DNS zone. - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. - /// Provisioning status. - /// - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. - /// The host name of the domain. Must be a domain name. - /// Key-Value pair representing migration properties for domains. - /// Values the customer needs to validate domain ownership. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomain.properties.profileName + /// + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomain.properties.tlsSettings + /// + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomain.properties.azureDnsZone + /// + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomain.properties.preValidatedCustomDomainResourceId + /// + /// + /// Provisioning status + /// Serialized Name: AFDDomain.properties.provisioningState + /// + /// Serialized Name: AFDDomain.properties.deploymentStatus. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// Serialized Name: AFDDomain.properties.domainValidationState + /// + /// + /// The host name of the domain. Must be a domain name. + /// Serialized Name: AFDDomain.properties.hostName + /// + /// + /// Key-Value pair representing migration properties for domains. + /// Serialized Name: AFDDomain.properties.extendedProperties + /// + /// + /// Values the customer needs to validate domain ownership + /// Serialized Name: AFDDomain.properties.validationProperties + /// /// Keeps track of any properties unknown to the library. internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string profileName, FrontDoorCustomDomainHttpsContent tlsSettings, WritableSubResource dnsZone, WritableSubResource preValidatedCustomDomainResource, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, DomainValidationState? domainValidationState, string hostName, IDictionary extendedProperties, DomainValidationProperties validationProperties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -89,11 +117,20 @@ internal FrontDoorCustomDomainData(ResourceIdentifier id, string name, ResourceT _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the profile which holds the domain. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomain.properties.profileName + /// public string ProfileName { get; } - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomain.properties.tlsSettings + /// public FrontDoorCustomDomainHttpsContent TlsSettings { get; set; } - /// Resource reference to the Azure DNS zone. + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomain.properties.azureDnsZone + /// internal WritableSubResource DnsZone { get; set; } /// Gets or sets Id. public ResourceIdentifier DnsZoneId @@ -107,7 +144,10 @@ public ResourceIdentifier DnsZoneId } } - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomain.properties.preValidatedCustomDomainResourceId + /// internal WritableSubResource PreValidatedCustomDomainResource { get; set; } /// Gets or sets Id. public ResourceIdentifier PreValidatedCustomDomainResourceId @@ -121,17 +161,32 @@ public ResourceIdentifier PreValidatedCustomDomainResourceId } } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: AFDDomain.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: AFDDomain.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// Serialized Name: AFDDomain.properties.domainValidationState + /// public DomainValidationState? DomainValidationState { get; } - /// The host name of the domain. Must be a domain name. + /// + /// The host name of the domain. Must be a domain name. + /// Serialized Name: AFDDomain.properties.hostName + /// public string HostName { get; set; } - /// Key-Value pair representing migration properties for domains. + /// + /// Key-Value pair representing migration properties for domains. + /// Serialized Name: AFDDomain.properties.extendedProperties + /// public IDictionary ExtendedProperties { get; } - /// Values the customer needs to validate domain ownership. + /// + /// Values the customer needs to validate domain ownership + /// Serialized Name: AFDDomain.properties.validationProperties + /// public DomainValidationProperties ValidationProperties { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.Serialization.cs index 948640f4b831..2604d43869ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorCustomDomainResource : IJsonModel { + private static FrontDoorCustomDomainData s_dataDeserializationInstance; + private static FrontDoorCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.cs index 5513ff985ba3..5b08e49a451d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorCustomDomainResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task RefreshValidationTokenAsync(WaitUntil wa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointCollection.cs index fdcf58328fee..1e459e975225 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string e /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string endpointName, Canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string endpointName, Cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string endpointName, CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs index 8ae1d24bdbe6..26020e939459 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorEndpoint data model. /// Azure Front Door endpoint is the entity within a Azure Front Door profile containing configuration information such as origin, protocol, content caching and delivery behavior. The AzureFrontDoor endpoint uses the URL format <endpointname>.azureedge.net. + /// Serialized Name: AFDEndpoint /// public partial class FrontDoorEndpointData : TrackedResourceData { @@ -64,12 +65,27 @@ public FrontDoorEndpointData(AzureLocation location) : base(location) /// The systemData. /// The tags. /// The location. - /// The name of the profile which holds the endpoint. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpoint.properties.profileName + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpoint.properties.enabledState + /// + /// + /// Provisioning status + /// Serialized Name: AFDEndpoint.properties.provisioningState + /// + /// Serialized Name: AFDEndpoint.properties.deploymentStatus. + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: AFDEndpoint.properties.hostName + /// + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: AFDEndpoint.properties.autoGeneratedDomainNameLabelScope + /// /// Keeps track of any properties unknown to the library. internal FrontDoorEndpointData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string profileName, EnabledState? enabledState, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, string hostName, DomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -87,17 +103,32 @@ internal FrontDoorEndpointData() { } - /// The name of the profile which holds the endpoint. + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpoint.properties.profileName + /// public string ProfileName { get; } - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpoint.properties.enabledState + /// public EnabledState? EnabledState { get; set; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: AFDEndpoint.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: AFDEndpoint.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } - /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net. + /// + /// The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net + /// Serialized Name: AFDEndpoint.properties.hostName + /// public string HostName { get; } - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: AFDEndpoint.properties.autoGeneratedDomainNameLabelScope + /// public DomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.Serialization.cs index 510a5abdadbf..19373feb7d91 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorEndpointResource : IJsonModel { + private static FrontDoorEndpointData s_dataDeserializationInstance; + private static FrontDoorEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs index b05184c250b3..60089d912cb8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorEndpointResource.cs @@ -111,7 +111,7 @@ public virtual FrontDoorRouteCollection GetFrontDoorRoutes() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetFrontDoorRouteAsy /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetFrontDoorRoute(string routeNa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -475,7 +475,7 @@ public virtual async Task PurgeContentAsync(WaitUntil waitUntil, F /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -521,7 +521,7 @@ public virtual ArmOperation PurgeContent(WaitUntil waitUntil, FrontDoorPurgeCont /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -551,7 +551,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -581,7 +581,7 @@ public virtual Pageable GetResourceUsages(CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -623,7 +623,7 @@ public virtual async Task> ValidateCustomDo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -665,7 +665,7 @@ public virtual Response ValidateCustomDomain(Validat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -727,7 +727,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -789,7 +789,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -846,7 +846,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -903,7 +903,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -963,7 +963,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginCollection.cs index 7c9af25b9bf3..4a8c3257b07e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ori /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string originName, Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string originName, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string originName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs index c8e78b2bc7dc..92500d0d7f72 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorOrigin data model. /// Azure Front Door origin is the source of the content being delivered via Azure Front Door. When the edge nodes represented by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured origins. + /// Serialized Name: AFDOrigin /// public partial class FrontDoorOriginData : ResourceData { @@ -62,19 +63,55 @@ public FrontDoorOriginData() /// The name. /// The resourceType. /// The systemData. - /// The name of the origin group which contains this origin. - /// Resource reference to the Azure origin resource. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// The properties of the private link resource for private origin. - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. - /// Whether to enable certificate name check at origin level. - /// Provisioning status. - /// + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOrigin.properties.originGroupName + /// + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOrigin.properties.azureOrigin + /// + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOrigin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOrigin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOrigin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOrigin.properties.weight + /// + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOrigin.properties.sharedPrivateLinkResource + /// + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOrigin.properties.enabledState + /// + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOrigin.properties.enforceCertificateNameCheck + /// + /// + /// Provisioning status + /// Serialized Name: AFDOrigin.properties.provisioningState + /// + /// Serialized Name: AFDOrigin.properties.deploymentStatus. /// Keeps track of any properties unknown to the library. internal FrontDoorOriginData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string originGroupName, WritableSubResource origin, string hostName, int? httpPort, int? httpsPort, string originHostHeader, int? priority, int? weight, SharedPrivateLinkResourceProperties sharedPrivateLinkResource, EnabledState? enabledState, bool? enforceCertificateNameCheck, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -94,9 +131,15 @@ internal FrontDoorOriginData(ResourceIdentifier id, string name, ResourceType re _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the origin group which contains this origin. + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOrigin.properties.originGroupName + /// public string OriginGroupName { get; } - /// Resource reference to the Azure origin resource. + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOrigin.properties.azureOrigin + /// internal WritableSubResource Origin { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginId @@ -110,27 +153,57 @@ public ResourceIdentifier OriginId } } - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOrigin.properties.hostName + /// public string HostName { get; set; } - /// The value of the HTTP port. Must be between 1 and 65535. + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpPort + /// public int? HttpPort { get; set; } - /// The value of the HTTPS port. Must be between 1 and 65535. + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOrigin.properties.httpsPort + /// public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOrigin.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOrigin.properties.priority + /// public int? Priority { get; set; } - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOrigin.properties.weight + /// public int? Weight { get; set; } - /// The properties of the private link resource for private origin. + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOrigin.properties.sharedPrivateLinkResource + /// public SharedPrivateLinkResourceProperties SharedPrivateLinkResource { get; set; } - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOrigin.properties.enabledState + /// public EnabledState? EnabledState { get; set; } - /// Whether to enable certificate name check at origin level. + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOrigin.properties.enforceCertificateNameCheck + /// public bool? EnforceCertificateNameCheck { get; set; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: AFDOrigin.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: AFDOrigin.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupCollection.cs index af540bbfc912..caec3a25473c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string originGroupName /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string originGroupName, Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string originGroupName, CancellationToken c /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs index d323f0dff69e..06453417c647 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorOriginGroup data model. /// AFDOrigin group comprising of origins is used for load balancing to origins when the content cannot be served from Azure Front Door. + /// Serialized Name: AFDOriginGroup /// public partial class FrontDoorOriginGroupData : ResourceData { @@ -61,13 +62,31 @@ public FrontDoorOriginGroupData() /// The name. /// The resourceType. /// The systemData. - /// The name of the profile which holds the origin group. - /// Load balancing settings for a backend pool. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroup.properties.profileName + /// + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroup.properties.loadBalancingSettings + /// + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroup.properties.healthProbeSettings + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroup.properties.sessionAffinityState + /// + /// + /// Provisioning status + /// Serialized Name: AFDOriginGroup.properties.provisioningState + /// + /// Serialized Name: AFDOriginGroup.properties.deploymentStatus. /// Keeps track of any properties unknown to the library. internal FrontDoorOriginGroupData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string profileName, LoadBalancingSettings loadBalancingSettings, HealthProbeSettings healthProbeSettings, int? trafficRestorationTimeInMinutes, EnabledState? sessionAffinityState, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -81,19 +100,37 @@ internal FrontDoorOriginGroupData(ResourceIdentifier id, string name, ResourceTy _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the profile which holds the origin group. + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroup.properties.profileName + /// public string ProfileName { get; } - /// Load balancing settings for a backend pool. + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroup.properties.loadBalancingSettings + /// public LoadBalancingSettings LoadBalancingSettings { get; set; } - /// Health probe settings to the origin that is used to determine the health of the origin. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroup.properties.healthProbeSettings + /// public HealthProbeSettings HealthProbeSettings { get; set; } - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// public int? TrafficRestorationTimeInMinutes { get; set; } - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroup.properties.sessionAffinityState + /// public EnabledState? SessionAffinityState { get; set; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: AFDOriginGroup.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: AFDOriginGroup.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.Serialization.cs index 10bf4334468d..2e86d949110a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorOriginGroupResource : IJsonModel { + private static FrontDoorOriginGroupData s_dataDeserializationInstance; + private static FrontDoorOriginGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorOriginGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorOriginGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorOriginGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs index 66baa43a892c..6fa2a86b00c3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginGroupResource.cs @@ -110,7 +110,7 @@ public virtual FrontDoorOriginCollection GetFrontDoorOrigins() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetFrontDoorOriginA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetFrontDoorOrigin(string origi /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil waitU /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -458,7 +458,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.Serialization.cs index 2b4f8e57c452..d46e69d432b3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorOriginResource : IJsonModel { + private static FrontDoorOriginData s_dataDeserializationInstance; + private static FrontDoorOriginData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorOriginData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorOriginData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorOriginData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.cs index 2f990504e7ad..d51d2c3c3f78 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorOriginResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteCollection.cs index 351ba9313d32..f568781d8e2d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string rout /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string routeName, Cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string routeName, Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string routeName, CancellationToken cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteData.cs index d541479a63df..33b79610996c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteData.cs @@ -17,6 +17,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorRoute data model. /// Friendly Routes name mapping to the any Routes or secret related information. + /// Serialized Name: Route /// public partial class FrontDoorRouteData : ResourceData { @@ -66,20 +67,59 @@ public FrontDoorRouteData() /// The name. /// The resourceType. /// The systemData. - /// The name of the endpoint which holds the route. - /// Domains referenced by this endpoint. - /// A reference to the origin group. - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// rule sets referenced by this endpoint. - /// List of supported protocols for this route. - /// The route patterns of the rule. - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - /// Protocol this rule will use when forwarding traffic to backends. - /// whether this route will be linked to the default endpoint domain. - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. - /// Provisioning status. - /// + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: Route.properties.endpointName + /// + /// + /// Domains referenced by this endpoint. + /// Serialized Name: Route.properties.customDomains + /// + /// + /// A reference to the origin group. + /// Serialized Name: Route.properties.originGroup + /// + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Route.properties.originPath + /// + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: Route.properties.ruleSets + /// + /// + /// List of supported protocols for this route. + /// Serialized Name: Route.properties.supportedProtocols + /// + /// + /// The route patterns of the rule. + /// Serialized Name: Route.properties.patternsToMatch + /// + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: Route.properties.cacheConfiguration + /// + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: Route.properties.forwardingProtocol + /// + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: Route.properties.linkToDefaultDomain + /// + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: Route.properties.httpsRedirect + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: Route.properties.enabledState + /// + /// + /// Provisioning status + /// Serialized Name: Route.properties.provisioningState + /// + /// Serialized Name: Route.properties.deploymentStatus. /// Keeps track of any properties unknown to the library. internal FrontDoorRouteData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string endpointName, IList customDomains, WritableSubResource originGroup, string originPath, IList ruleSets, IList supportedProtocols, IList patternsToMatch, FrontDoorRouteCacheConfiguration cacheConfiguration, ForwardingProtocol? forwardingProtocol, LinkToDefaultDomain? linkToDefaultDomain, HttpsRedirect? httpsRedirect, EnabledState? enabledState, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -100,11 +140,20 @@ internal FrontDoorRouteData(ResourceIdentifier id, string name, ResourceType res _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the endpoint which holds the route. + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: Route.properties.endpointName + /// public string EndpointName { get; } - /// Domains referenced by this endpoint. + /// + /// Domains referenced by this endpoint. + /// Serialized Name: Route.properties.customDomains + /// public IList CustomDomains { get; } - /// A reference to the origin group. + /// + /// A reference to the origin group. + /// Serialized Name: Route.properties.originGroup + /// internal WritableSubResource OriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginGroupId @@ -118,27 +167,57 @@ public ResourceIdentifier OriginGroupId } } - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: Route.properties.originPath + /// public string OriginPath { get; set; } - /// rule sets referenced by this endpoint. + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: Route.properties.ruleSets + /// public IList RuleSets { get; } - /// List of supported protocols for this route. + /// + /// List of supported protocols for this route. + /// Serialized Name: Route.properties.supportedProtocols + /// public IList SupportedProtocols { get; } - /// The route patterns of the rule. + /// + /// The route patterns of the rule. + /// Serialized Name: Route.properties.patternsToMatch + /// public IList PatternsToMatch { get; } - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: Route.properties.cacheConfiguration + /// public FrontDoorRouteCacheConfiguration CacheConfiguration { get; set; } - /// Protocol this rule will use when forwarding traffic to backends. + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: Route.properties.forwardingProtocol + /// public ForwardingProtocol? ForwardingProtocol { get; set; } - /// whether this route will be linked to the default endpoint domain. + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: Route.properties.linkToDefaultDomain + /// public LinkToDefaultDomain? LinkToDefaultDomain { get; set; } - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: Route.properties.httpsRedirect + /// public HttpsRedirect? HttpsRedirect { get; set; } - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: Route.properties.enabledState + /// public EnabledState? EnabledState { get; set; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: Route.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: Route.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.Serialization.cs index 78b37c9cef30..201de4512375 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorRouteResource : IJsonModel { + private static FrontDoorRouteData s_dataDeserializationInstance; + private static FrontDoorRouteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorRouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorRouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorRouteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.cs index 69e8dd53834c..b000c094dfd9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRouteResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleCollection.cs index bc4ec8bb0eec..8cd0a5c220d4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ruleN /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ruleName, Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleName, Cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleData.cs index 56270e0dc565..239614b54e61 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorRule data model. /// Friendly Rules name mapping to the any Rules or secret related information. + /// Serialized Name: Rule /// public partial class FrontDoorRuleData : ResourceData { @@ -63,21 +64,35 @@ public FrontDoorRuleData() /// The name. /// The resourceType. /// The systemData. - /// The name of the rule set containing the rule. - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: Rule.properties.ruleSetName + /// + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: Rule.properties.order + /// /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: Rule.properties.conditions /// 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 list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: Rule.properties.actions /// 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 . /// - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. - /// Provisioning status. - /// + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: Rule.properties.matchProcessingBehavior + /// + /// + /// Provisioning status + /// Serialized Name: Rule.properties.provisioningState + /// + /// Serialized Name: Rule.properties.deploymentStatus. /// Keeps track of any properties unknown to the library. internal FrontDoorRuleData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string ruleSetName, int? order, IList conditions, IList actions, MatchProcessingBehavior? matchProcessingBehavior, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -91,27 +106,41 @@ internal FrontDoorRuleData(ResourceIdentifier id, string name, ResourceType reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the rule set containing the rule. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: Rule.properties.ruleSetName + /// public string RuleSetName { get; } - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: Rule.properties.order + /// public int? Order { get; set; } /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: Rule.properties.conditions /// 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 IList Conditions { get; } /// /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: Rule.properties.actions /// 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 IList Actions { get; } - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: Rule.properties.matchProcessingBehavior + /// public MatchProcessingBehavior? MatchProcessingBehavior { get; set; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: Rule.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: Rule.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.Serialization.cs index 2de64f572129..d121f1184682 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorRuleResource : IJsonModel { + private static FrontDoorRuleData s_dataDeserializationInstance; + private static FrontDoorRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.cs index 980a8ab44e71..6fa04a88edd3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetCollection.cs index b63f3b57fa20..3bff1bd54f44 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string ru /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string ruleSetName, Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string ruleSetName, Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string ruleSetName, CancellationToken cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetData.cs index a81bd25d8a7b..8ee775e0c22d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorRuleSet data model. /// Friendly RuleSet name mapping to the any RuleSet or secret related information. + /// Serialized Name: RuleSet /// public partial class FrontDoorRuleSetData : ResourceData { @@ -61,9 +62,15 @@ public FrontDoorRuleSetData() /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the rule set. + /// + /// Provisioning status + /// Serialized Name: RuleSet.properties.provisioningState + /// + /// Serialized Name: RuleSet.properties.deploymentStatus. + /// + /// The name of the profile which holds the rule set. + /// Serialized Name: RuleSet.properties.profileName + /// /// Keeps track of any properties unknown to the library. internal FrontDoorRuleSetData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, FrontDoorProvisioningState? provisioningState, FrontDoorDeploymentStatus? deploymentStatus, string profileName, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -73,11 +80,17 @@ internal FrontDoorRuleSetData(ResourceIdentifier id, string name, ResourceType r _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: RuleSet.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: RuleSet.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } - /// The name of the profile which holds the rule set. + /// + /// The name of the profile which holds the rule set. + /// Serialized Name: RuleSet.properties.profileName + /// public string ProfileName { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.Serialization.cs index f713107374e6..502c37d3a144 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorRuleSetResource : IJsonModel { + private static FrontDoorRuleSetData s_dataDeserializationInstance; + private static FrontDoorRuleSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorRuleSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs index dee829056f63..a6b8c3e65dc8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorRuleSetResource.cs @@ -110,7 +110,7 @@ public virtual FrontDoorRuleCollection GetFrontDoorRules() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetFrontDoorRuleAsync /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetFrontDoorRule(string ruleName, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -380,7 +380,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -424,7 +424,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -454,7 +454,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretCollection.cs index 31a2c82bde60..ae3111641bcb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string sec /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string secretName, Cancella /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string secretName, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string secretName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretData.cs index 579e468de006..7a85f72f2d7c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorSecret data model. /// Friendly Secret name mapping to the any Secret or secret related information. + /// Serialized Name: Secret /// public partial class FrontDoorSecretData : ResourceData { @@ -61,11 +62,18 @@ public FrontDoorSecretData() /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the secret. + /// + /// Provisioning status + /// Serialized Name: Secret.properties.provisioningState + /// + /// Serialized Name: Secret.properties.deploymentStatus. + /// + /// The name of the profile which holds the secret. + /// Serialized Name: Secret.properties.profileName + /// /// /// object which contains secret parameters + /// Serialized Name: Secret.properties.parameters /// 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 . /// @@ -79,14 +87,21 @@ internal FrontDoorSecretData(ResourceIdentifier id, string name, ResourceType re _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: Secret.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: Secret.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } - /// The name of the profile which holds the secret. + /// + /// The name of the profile which holds the secret. + /// Serialized Name: Secret.properties.profileName + /// public string ProfileName { get; } /// /// object which contains secret parameters + /// Serialized Name: Secret.properties.parameters /// 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 . /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.Serialization.cs index aab38c04c6ac..1d44b0e33eab 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorSecretResource : IJsonModel { + private static FrontDoorSecretData s_dataDeserializationInstance; + private static FrontDoorSecretData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorSecretData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.cs index 5a4ab266a1b4..cf409d84fe97 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecretResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyCollection.cs index c931a9600a21..ac0ea084cca1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string securityPoli /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string securityPolicyName, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string securityPolicyName, CancellationToke /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyData.cs index a61d298018bb..5d73ee2d3923 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the FrontDoorSecurityPolicy data model. /// SecurityPolicy association for AzureFrontDoor profile + /// Serialized Name: SecurityPolicy /// public partial class FrontDoorSecurityPolicyData : ResourceData { @@ -61,11 +62,18 @@ public FrontDoorSecurityPolicyData() /// The name. /// The resourceType. /// The systemData. - /// Provisioning status. - /// - /// The name of the profile which holds the security policy. + /// + /// Provisioning status + /// Serialized Name: SecurityPolicy.properties.provisioningState + /// + /// Serialized Name: SecurityPolicy.properties.deploymentStatus. + /// + /// The name of the profile which holds the security policy. + /// Serialized Name: SecurityPolicy.properties.profileName + /// /// /// object which contains security policy parameters + /// Serialized Name: SecurityPolicy.properties.parameters /// 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 . /// @@ -79,14 +87,21 @@ internal FrontDoorSecurityPolicyData(ResourceIdentifier id, string name, Resourc _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: SecurityPolicy.properties.provisioningState + /// public FrontDoorProvisioningState? ProvisioningState { get; } - /// Gets the deployment status. + /// Serialized Name: SecurityPolicy.properties.deploymentStatus. public FrontDoorDeploymentStatus? DeploymentStatus { get; } - /// The name of the profile which holds the security policy. + /// + /// The name of the profile which holds the security policy. + /// Serialized Name: SecurityPolicy.properties.profileName + /// public string ProfileName { get; } /// /// object which contains security policy parameters + /// Serialized Name: SecurityPolicy.properties.parameters /// 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 . /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.Serialization.cs index eb6a366e06c7..75a1c5bc3cee 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class FrontDoorSecurityPolicyResource : IJsonModel { + private static FrontDoorSecurityPolicyData s_dataDeserializationInstance; + private static FrontDoorSecurityPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorSecurityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorSecurityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); FrontDoorSecurityPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.cs index 6db5cc0deb8e..8d01737ed5d5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/FrontDoorSecurityPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCipherSuiteSetType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCipherSuiteSetType.cs new file mode 100644 index 000000000000..bd55a23a44a7 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCipherSuiteSetType.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.Cdn.Models +{ + /// + /// cipher suite set type that will be used for Https + /// Serialized Name: AfdCipherSuiteSetType + /// + public readonly partial struct AfdCipherSuiteSetType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AfdCipherSuiteSetType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CustomizedValue = "Customized"; + private const string Tls1_0_2019Value = "TLS10_2019"; + private const string Tls1_2_2022Value = "TLS12_2022"; + private const string Tls1_2_2023Value = "TLS12_2023"; + + /// + /// Customized + /// Serialized Name: AfdCipherSuiteSetType.Customized + /// + public static AfdCipherSuiteSetType Customized { get; } = new AfdCipherSuiteSetType(CustomizedValue); + /// Determines if two values are the same. + public static bool operator ==(AfdCipherSuiteSetType left, AfdCipherSuiteSetType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AfdCipherSuiteSetType left, AfdCipherSuiteSetType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AfdCipherSuiteSetType(string value) => new AfdCipherSuiteSetType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AfdCipherSuiteSetType other && Equals(other); + /// + public bool Equals(AfdCipherSuiteSetType 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls12.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls12.cs new file mode 100644 index 000000000000..5aa7c7b3d754 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls12.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// The AfdCustomizedCipherSuiteForTls12. + /// Serialized Name: AfdCustomizedCipherSuiteForTls12 + /// + public readonly partial struct AfdCustomizedCipherSuiteForTls12 : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AfdCustomizedCipherSuiteForTls12(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Ecdhe_Rsa_Aes128_Gcm_Sha256Value = "ECDHE_RSA_AES128_GCM_SHA256"; + private const string Ecdhe_Rsa_Aes256_Gcm_Sha384Value = "ECDHE_RSA_AES256_GCM_SHA384"; + private const string Dhe_Rsa_Aes256_Gcm_Sha384Value = "DHE_RSA_AES256_GCM_SHA384"; + private const string Dhe_Rsa_Aes128_Gcm_Sha256Value = "DHE_RSA_AES128_GCM_SHA256"; + private const string Ecdhe_Rsa_Aes128_Sha256Value = "ECDHE_RSA_AES128_SHA256"; + private const string Ecdhe_Rsa_Aes256_Sha384Value = "ECDHE_RSA_AES256_SHA384"; + /// Determines if two values are the same. + public static bool operator ==(AfdCustomizedCipherSuiteForTls12 left, AfdCustomizedCipherSuiteForTls12 right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AfdCustomizedCipherSuiteForTls12 left, AfdCustomizedCipherSuiteForTls12 right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AfdCustomizedCipherSuiteForTls12(string value) => new AfdCustomizedCipherSuiteForTls12(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AfdCustomizedCipherSuiteForTls12 other && Equals(other); + /// + public bool Equals(AfdCustomizedCipherSuiteForTls12 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls13.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls13.cs new file mode 100644 index 000000000000..6d6d34b281be --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AfdCustomizedCipherSuiteForTls13.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// The AfdCustomizedCipherSuiteForTls13. + /// Serialized Name: AfdCustomizedCipherSuiteForTls13 + /// + public readonly partial struct AfdCustomizedCipherSuiteForTls13 : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AfdCustomizedCipherSuiteForTls13(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string Tls_Aes_128_Gcm_Sha256Value = "TLS_AES_128_GCM_SHA256"; + private const string Tls_Aes_256_Gcm_Sha384Value = "TLS_AES_256_GCM_SHA384"; + /// Determines if two values are the same. + public static bool operator ==(AfdCustomizedCipherSuiteForTls13 left, AfdCustomizedCipherSuiteForTls13 right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AfdCustomizedCipherSuiteForTls13 left, AfdCustomizedCipherSuiteForTls13 right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AfdCustomizedCipherSuiteForTls13(string value) => new AfdCustomizedCipherSuiteForTls13(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AfdCustomizedCipherSuiteForTls13 other && Equals(other); + /// + public bool Equals(AfdCustomizedCipherSuiteForTls13 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs index 7f278ae609df..e4aa181b1407 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/AzureFirstPartyManagedCertificateProperties.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// + /// Azure FirstParty Managed Certificate provided by other first party resource providers to enable HTTPS. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters + /// public partial class AzureFirstPartyManagedCertificateProperties : FrontDoorSecretProperties { /// Initializes a new instance of . @@ -23,14 +26,35 @@ public AzureFirstPartyManagedCertificateProperties() } /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Subject name in the certificate. - /// Certificate expiration date. - /// Certificate issuing authority. - /// The list of SANs. - /// Certificate thumbprint. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.secretSource + /// + /// + /// Subject name in the certificate. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.expirationDate + /// + /// + /// Certificate issuing authority. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.certificateAuthority + /// + /// + /// The list of SANs. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subjectAlternativeNames + /// + /// + /// Certificate thumbprint. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.thumbprint + /// internal AzureFirstPartyManagedCertificateProperties(SecretType secretType, IDictionary serializedAdditionalRawData, WritableSubResource secretSource, string subject, string expirationDate, string certificateAuthority, IList subjectAlternativeNames, string thumbprint) : base(secretType, serializedAdditionalRawData) { SecretSource = secretSource; @@ -42,7 +66,10 @@ internal AzureFirstPartyManagedCertificateProperties(SecretType secretType, IDic SecretType = secretType; } - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.secretSource + /// internal WritableSubResource SecretSource { get; } /// Gets or sets Id. public ResourceIdentifier SecretSourceId @@ -50,15 +77,30 @@ public ResourceIdentifier SecretSourceId get => SecretSource?.Id; } - /// Subject name in the certificate. + /// + /// Subject name in the certificate. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subject + /// public string Subject { get; } - /// Certificate expiration date. + /// + /// Certificate expiration date. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.expirationDate + /// public string ExpirationDate { get; } - /// Certificate issuing authority. + /// + /// Certificate issuing authority. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.certificateAuthority + /// public string CertificateAuthority { get; } - /// The list of SANs. + /// + /// The list of SANs. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.subjectAlternativeNames + /// public IList SubjectAlternativeNames { get; } - /// Certificate thumbprint. + /// + /// Certificate thumbprint. + /// Serialized Name: AzureFirstPartyManagedCertificateParameters.thumbprint + /// public string Thumbprint { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheBehaviorSetting.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheBehaviorSetting.cs index b2ae57023d76..880e05f591df 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheBehaviorSetting.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheBehaviorSetting.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: CacheBehavior + /// public readonly partial struct CacheBehaviorSetting : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public CacheBehaviorSetting(string value) private const string OverrideValue = "Override"; private const string SetIfMissingValue = "SetIfMissing"; - /// BypassCache. + /// + /// BypassCache + /// Serialized Name: CacheBehavior.BypassCache + /// public static CacheBehaviorSetting BypassCache { get; } = new CacheBehaviorSetting(BypassCacheValue); - /// Override. + /// + /// Override + /// Serialized Name: CacheBehavior.Override + /// public static CacheBehaviorSetting Override { get; } = new CacheBehaviorSetting(OverrideValue); - /// SetIfMissing. + /// + /// SetIfMissing + /// Serialized Name: CacheBehavior.SetIfMissing + /// public static CacheBehaviorSetting SetIfMissing { get; } = new CacheBehaviorSetting(SetIfMissingValue); /// Determines if two values are the same. public static bool operator ==(CacheBehaviorSetting left, CacheBehaviorSetting right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheConfiguration.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheConfiguration.cs index 729a7cb67984..af9ee57c76cc 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheConfiguration.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheConfiguration.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: CacheConfiguration + /// public partial class CacheConfiguration { /// @@ -51,11 +54,26 @@ public CacheConfiguration() } /// Initializes a new instance of . - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. - /// query parameters to include or exclude (comma separated). - /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. - /// Caching behavior for the requests. - /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: CacheConfiguration.queryStringCachingBehavior + /// + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: CacheConfiguration.queryParameters + /// + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: CacheConfiguration.isCompressionEnabled + /// + /// + /// Caching behavior for the requests + /// Serialized Name: CacheConfiguration.cacheBehavior + /// + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// Serialized Name: CacheConfiguration.cacheDuration + /// /// Keeps track of any properties unknown to the library. internal CacheConfiguration(RuleQueryStringCachingBehavior? queryStringCachingBehavior, string queryParameters, RuleIsCompressionEnabled? isCompressionEnabled, RuleCacheBehavior? cacheBehavior, TimeSpan? cacheDuration, IDictionary serializedAdditionalRawData) { @@ -67,15 +85,30 @@ internal CacheConfiguration(RuleQueryStringCachingBehavior? queryStringCachingBe _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: CacheConfiguration.queryStringCachingBehavior + /// public RuleQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } - /// query parameters to include or exclude (comma separated). + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: CacheConfiguration.queryParameters + /// public string QueryParameters { get; set; } - /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: CacheConfiguration.isCompressionEnabled + /// public RuleIsCompressionEnabled? IsCompressionEnabled { get; set; } - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: CacheConfiguration.cacheBehavior + /// public RuleCacheBehavior? CacheBehavior { get; set; } - /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss. + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// Serialized Name: CacheConfiguration.cacheDuration + /// public TimeSpan? CacheDuration { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.Serialization.cs index 4de0f3af3afd..817df9c3ccf3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CacheExpirationActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("cacheBehavior"u8); writer.WriteStringValue(CacheBehavior.ToString()); writer.WritePropertyName("cacheType"u8); @@ -52,21 +51,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("cacheDuration"); } } - 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 - } - } } CacheExpirationActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -89,19 +73,14 @@ internal static CacheExpirationActionProperties DeserializeCacheExpirationAction { return null; } - CacheExpirationActionType typeName = default; CacheBehaviorSetting cacheBehavior = default; CdnCacheLevel cacheType = default; TimeSpan? cacheDuration = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new CacheExpirationActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("cacheBehavior"u8)) { cacheBehavior = new CacheBehaviorSetting(property.Value.GetString()); @@ -122,13 +101,18 @@ internal static CacheExpirationActionProperties DeserializeCacheExpirationAction cacheDuration = property.Value.GetTimeSpan("c"); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CacheExpirationActionProperties(typeName, cacheBehavior, cacheType, cacheDuration, serializedAdditionalRawData); + return new CacheExpirationActionProperties(typeName, serializedAdditionalRawData, cacheBehavior, cacheType, cacheDuration); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.cs index 98645ce43f9f..5c96a9075ce1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheExpirationActionProperties.cs @@ -10,65 +10,49 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the cache expiration action. - public partial class CacheExpirationActionProperties + /// + /// Defines the parameters for the cache expiration action. + /// Serialized Name: CacheExpirationActionParameters + /// + public partial class CacheExpirationActionProperties : DeliveryRuleActionProperties { - /// - /// 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 . - /// - /// Caching behavior for the requests. - /// The level at which the content needs to be cached. - public CacheExpirationActionProperties(CacheExpirationActionType actionType, CacheBehaviorSetting cacheBehavior, CdnCacheLevel cacheType) + /// + /// Caching behavior for the requests + /// Serialized Name: CacheExpirationActionParameters.cacheBehavior + /// + /// + /// The level at which the content needs to be cached. + /// Serialized Name: CacheExpirationActionParameters.cacheType + /// + public CacheExpirationActionProperties(CacheBehaviorSetting cacheBehavior, CdnCacheLevel cacheType) { - ActionType = actionType; CacheBehavior = cacheBehavior; CacheType = cacheType; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleCacheExpirationActionParameters; } /// Initializes a new instance of . - /// - /// Caching behavior for the requests. - /// The level at which the content needs to be cached. - /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal CacheExpirationActionProperties(CacheExpirationActionType actionType, CacheBehaviorSetting cacheBehavior, CdnCacheLevel cacheType, TimeSpan? cacheDuration, IDictionary serializedAdditionalRawData) + /// + /// Caching behavior for the requests + /// Serialized Name: CacheExpirationActionParameters.cacheBehavior + /// + /// + /// The level at which the content needs to be cached. + /// Serialized Name: CacheExpirationActionParameters.cacheType + /// + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// Serialized Name: CacheExpirationActionParameters.cacheDuration + /// + internal CacheExpirationActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, CacheBehaviorSetting cacheBehavior, CdnCacheLevel cacheType, TimeSpan? cacheDuration) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; CacheBehavior = cacheBehavior; CacheType = cacheType; CacheDuration = cacheDuration; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -76,13 +60,20 @@ internal CacheExpirationActionProperties() { } - /// Gets or sets the action type. - public CacheExpirationActionType ActionType { get; set; } - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: CacheExpirationActionParameters.cacheBehavior + /// public CacheBehaviorSetting CacheBehavior { get; set; } - /// The level at which the content needs to be cached. + /// + /// The level at which the content needs to be cached. + /// Serialized Name: CacheExpirationActionParameters.cacheType + /// public CdnCacheLevel CacheType { get; set; } - /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss. + /// + /// The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss + /// Serialized Name: CacheExpirationActionParameters.cacheDuration + /// public TimeSpan? CacheDuration { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.Serialization.cs index dba4f432e1a1..1c0e328b5189 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CacheKeyQueryStringActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("queryStringBehavior"u8); writer.WriteStringValue(QueryStringBehavior.ToString()); if (Optional.IsDefined(QueryParameters)) @@ -50,21 +49,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteNull("queryParameters"); } } - 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 - } - } } CacheKeyQueryStringActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,18 +71,13 @@ internal static CacheKeyQueryStringActionProperties DeserializeCacheKeyQueryStri { return null; } - CacheKeyQueryStringActionType typeName = default; QueryStringBehavior queryStringBehavior = default; string queryParameters = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new CacheKeyQueryStringActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("queryStringBehavior"u8)) { queryStringBehavior = new QueryStringBehavior(property.Value.GetString()); @@ -114,13 +93,18 @@ internal static CacheKeyQueryStringActionProperties DeserializeCacheKeyQueryStri queryParameters = property.Value.GetString(); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new CacheKeyQueryStringActionProperties(typeName, queryStringBehavior, queryParameters, serializedAdditionalRawData); + return new CacheKeyQueryStringActionProperties(typeName, serializedAdditionalRawData, queryStringBehavior, queryParameters); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.cs index 8d2fa3f2bf34..6f0bc12f92e9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CacheKeyQueryStringActionProperties.cs @@ -10,61 +10,39 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the cache-key query string action. - public partial class CacheKeyQueryStringActionProperties + /// + /// Defines the parameters for the cache-key query string action. + /// Serialized Name: CacheKeyQueryStringActionParameters + /// + public partial class CacheKeyQueryStringActionProperties : DeliveryRuleActionProperties { - /// - /// 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 . - /// - /// Caching behavior for the requests. - public CacheKeyQueryStringActionProperties(CacheKeyQueryStringActionType actionType, QueryStringBehavior queryStringBehavior) + /// + /// Caching behavior for the requests + /// Serialized Name: CacheKeyQueryStringActionParameters.queryStringBehavior + /// + public CacheKeyQueryStringActionProperties(QueryStringBehavior queryStringBehavior) { - ActionType = actionType; QueryStringBehavior = queryStringBehavior; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters; } /// Initializes a new instance of . - /// - /// Caching behavior for the requests. - /// query parameters to include or exclude (comma separated). + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal CacheKeyQueryStringActionProperties(CacheKeyQueryStringActionType actionType, QueryStringBehavior queryStringBehavior, string queryParameters, IDictionary serializedAdditionalRawData) + /// + /// Caching behavior for the requests + /// Serialized Name: CacheKeyQueryStringActionParameters.queryStringBehavior + /// + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: CacheKeyQueryStringActionParameters.queryParameters + /// + internal CacheKeyQueryStringActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, QueryStringBehavior queryStringBehavior, string queryParameters) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; QueryStringBehavior = queryStringBehavior; QueryParameters = queryParameters; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -72,11 +50,15 @@ internal CacheKeyQueryStringActionProperties() { } - /// Gets or sets the action type. - public CacheKeyQueryStringActionType ActionType { get; set; } - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: CacheKeyQueryStringActionParameters.queryStringBehavior + /// public QueryStringBehavior QueryStringBehavior { get; set; } - /// query parameters to include or exclude (comma separated). + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: CacheKeyQueryStringActionParameters.queryParameters + /// public string QueryParameters { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs index 347941d8c3ed..c225d9b781e3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateContent.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Request body for CanMigrate operation. + /// + /// Request body for CanMigrate operation. + /// Serialized Name: CanMigrateParameters + /// public partial class CanMigrateContent { /// @@ -48,7 +51,10 @@ public partial class CanMigrateContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: CanMigrateParameters.classicResourceReference + /// /// is null. public CanMigrateContent(WritableSubResource classicResourceReference) { @@ -58,7 +64,10 @@ public CanMigrateContent(WritableSubResource classicResourceReference) } /// Initializes a new instance of . - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: CanMigrateParameters.classicResourceReference + /// /// Keeps track of any properties unknown to the library. internal CanMigrateContent(WritableSubResource classicResourceReference, IDictionary serializedAdditionalRawData) { @@ -71,7 +80,10 @@ internal CanMigrateContent() { } - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: CanMigrateParameters.classicResourceReference + /// internal WritableSubResource ClassicResourceReference { get; } /// Gets or sets Id. public ResourceIdentifier ClassicResourceReferenceId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs index feec1f4a2580..a7f919a235c6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateDefaultSku.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Recommended sku for the migration. + /// + /// Recommended sku for the migration + /// Serialized Name: CanMigrateDefaultSku + /// public readonly partial struct CanMigrateDefaultSku : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CanMigrateDefaultSku(string value) private const string StandardAzureFrontDoorValue = "Standard_AzureFrontDoor"; private const string PremiumAzureFrontDoorValue = "Premium_AzureFrontDoor"; - /// Standard_AzureFrontDoor. + /// + /// Standard_AzureFrontDoor + /// Serialized Name: CanMigrateDefaultSku.Standard_AzureFrontDoor + /// public static CanMigrateDefaultSku StandardAzureFrontDoor { get; } = new CanMigrateDefaultSku(StandardAzureFrontDoorValue); - /// Premium_AzureFrontDoor. + /// + /// Premium_AzureFrontDoor + /// Serialized Name: CanMigrateDefaultSku.Premium_AzureFrontDoor + /// public static CanMigrateDefaultSku PremiumAzureFrontDoor { get; } = new CanMigrateDefaultSku(PremiumAzureFrontDoorValue); /// Determines if two values are the same. public static bool operator ==(CanMigrateDefaultSku left, CanMigrateDefaultSku right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs index 4a7bdd990cfb..444e25e58016 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.Serialization.cs @@ -34,10 +34,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CanMigrateResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(Id)) + if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WriteStringValue(ResourceId); } if (options.Format != "W" && Optional.IsDefined(CanMigrateResultType)) { @@ -104,7 +104,7 @@ internal static CanMigrateResult DeserializeCanMigrateResult(JsonElement element { return null; } - string id = default; + ResourceIdentifier id = default; string type = default; bool? canMigrate = default; CanMigrateDefaultSku? defaultSku = default; @@ -115,7 +115,11 @@ internal static CanMigrateResult DeserializeCanMigrateResult(JsonElement element { if (property.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("type"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs index aad13ad25fe8..f51131f4b943 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CanMigrateResult.cs @@ -7,10 +7,14 @@ using System; using System.Collections.Generic; +using Azure.Core; namespace Azure.ResourceManager.Cdn.Models { - /// Result for canMigrate operation. + /// + /// Result for canMigrate operation. + /// Serialized Name: CanMigrateResult + /// public partial class CanMigrateResult { /// @@ -52,15 +56,27 @@ internal CanMigrateResult() } /// Initializes a new instance of . - /// Resource ID. - /// Resource type. - /// Flag that says if the profile can be migrated. - /// Recommended sku for the migration. - /// + /// + /// Resource ID. + /// Serialized Name: CanMigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: CanMigrateResult.type + /// + /// + /// Flag that says if the profile can be migrated + /// Serialized Name: CanMigrateResult.properties.canMigrate + /// + /// + /// Recommended sku for the migration + /// Serialized Name: CanMigrateResult.properties.defaultSku + /// + /// Serialized Name: CanMigrateResult.properties.errors. /// Keeps track of any properties unknown to the library. - internal CanMigrateResult(string id, string canMigrateResultType, bool? canMigrate, CanMigrateDefaultSku? defaultSku, IReadOnlyList errors, IDictionary serializedAdditionalRawData) + internal CanMigrateResult(ResourceIdentifier resourceId, string canMigrateResultType, bool? canMigrate, CanMigrateDefaultSku? defaultSku, IReadOnlyList errors, IDictionary serializedAdditionalRawData) { - Id = id; + ResourceId = resourceId; CanMigrateResultType = canMigrateResultType; CanMigrate = canMigrate; DefaultSku = defaultSku; @@ -68,15 +84,27 @@ internal CanMigrateResult(string id, string canMigrateResultType, bool? canMigra _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource ID. - public string Id { get; } - /// Resource type. + /// + /// Resource ID. + /// Serialized Name: CanMigrateResult.id + /// + public ResourceIdentifier ResourceId { get; } + /// + /// Resource type. + /// Serialized Name: CanMigrateResult.type + /// public string CanMigrateResultType { get; } - /// Flag that says if the profile can be migrated. + /// + /// Flag that says if the profile can be migrated + /// Serialized Name: CanMigrateResult.properties.canMigrate + /// public bool? CanMigrate { get; } - /// Recommended sku for the migration. + /// + /// Recommended sku for the migration + /// Serialized Name: CanMigrateResult.properties.defaultSku + /// public CanMigrateDefaultSku? DefaultSku { get; } - /// Gets the errors. + /// Serialized Name: CanMigrateResult.properties.errors. public IReadOnlyList Errors { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCacheLevel.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCacheLevel.cs index 372eec8ba83f..84e869c44192 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCacheLevel.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCacheLevel.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The level at which the content needs to be cached. + /// + /// The level at which the content needs to be cached. + /// Serialized Name: CacheType + /// public readonly partial struct CdnCacheLevel : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public CdnCacheLevel(string value) private const string AllValue = "All"; - /// All. + /// + /// All + /// Serialized Name: CacheType.All + /// public static CdnCacheLevel All { get; } = new CdnCacheLevel(AllValue); /// Determines if two values are the same. public static bool operator ==(CdnCacheLevel left, CdnCacheLevel right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.Serialization.cs index 5f1ab22762eb..31bfe1609c2a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,25 +34,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CdnCertificateSource)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(SourceType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("certificateType"u8); writer.WriteStringValue(CertificateType.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 - } - } } CdnCertificateSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -75,20 +59,20 @@ internal static CdnCertificateSource DeserializeCdnCertificateSource(JsonElement { return null; } - CdnCertificateSourceType typeName = default; CdnManagedCertificateType certificateType = default; + CertificateSourceParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) + if (property.NameEquals("certificateType"u8)) { - typeName = new CdnCertificateSourceType(property.Value.GetString()); + certificateType = new CdnManagedCertificateType(property.Value.GetString()); continue; } - if (property.NameEquals("certificateType"u8)) + if (property.NameEquals("typeName"u8)) { - certificateType = new CdnManagedCertificateType(property.Value.GetString()); + typeName = new CertificateSourceParametersType(property.Value.GetString()); continue; } if (options.Format != "W") @@ -97,7 +81,7 @@ internal static CdnCertificateSource DeserializeCdnCertificateSource(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new CdnCertificateSource(typeName, certificateType, serializedAdditionalRawData); + return new CdnCertificateSource(typeName, serializedAdditionalRawData, certificateType); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.cs index 6e4d0403d53c..8631fdef5bde 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCertificateSource.cs @@ -10,59 +10,34 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for using CDN managed certificate for securing custom domain. - public partial class CdnCertificateSource + /// + /// Defines the parameters for using CDN managed certificate for securing custom domain. + /// Serialized Name: CdnCertificateSourceParameters + /// + public partial class CdnCertificateSource : CertificateSourceProperties { - /// - /// 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 . - /// - /// Type of certificate used. - public CdnCertificateSource(CdnCertificateSourceType sourceType, CdnManagedCertificateType certificateType) + /// + /// Type of certificate used + /// Serialized Name: CdnCertificateSourceParameters.certificateType + /// + public CdnCertificateSource(CdnManagedCertificateType certificateType) { - SourceType = sourceType; CertificateType = certificateType; + TypeName = CertificateSourceParametersType.CdnCertificateSourceParameters; } /// Initializes a new instance of . - /// - /// Type of certificate used. + /// Serialized Name: CertificateSourceParameters.typeName. /// Keeps track of any properties unknown to the library. - internal CdnCertificateSource(CdnCertificateSourceType sourceType, CdnManagedCertificateType certificateType, IDictionary serializedAdditionalRawData) + /// + /// Type of certificate used + /// Serialized Name: CdnCertificateSourceParameters.certificateType + /// + internal CdnCertificateSource(CertificateSourceParametersType typeName, IDictionary serializedAdditionalRawData, CdnManagedCertificateType certificateType) : base(typeName, serializedAdditionalRawData) { - SourceType = sourceType; CertificateType = certificateType; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -70,9 +45,10 @@ internal CdnCertificateSource() { } - /// Gets or sets the source type. - public CdnCertificateSourceType SourceType { get; set; } - /// Type of certificate used. + /// + /// Type of certificate used + /// Serialized Name: CdnCertificateSourceParameters.certificateType + /// public CdnManagedCertificateType CertificateType { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCustomDomainCreateOrUpdateContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCustomDomainCreateOrUpdateContent.cs index a150f2d65211..2836785f8810 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCustomDomainCreateOrUpdateContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnCustomDomainCreateOrUpdateContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The customDomain JSON object required for custom domain creation or update. + /// + /// The customDomain JSON object required for custom domain creation or update. + /// Serialized Name: CustomDomainParameters + /// public partial class CdnCustomDomainCreateOrUpdateContent { /// @@ -51,7 +54,10 @@ public CdnCustomDomainCreateOrUpdateContent() } /// Initializes a new instance of . - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: CustomDomainParameters.properties.hostName + /// /// Keeps track of any properties unknown to the library. internal CdnCustomDomainCreateOrUpdateContent(string hostName, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal CdnCustomDomainCreateOrUpdateContent(string hostName, IDictionary The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: CustomDomainParameters.properties.hostName + /// public string HostName { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointPatch.cs index c3402aa814b4..10ce41ff7eeb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Properties required to create or update an endpoint. + /// + /// Properties required to create or update an endpoint. + /// Serialized Name: EndpointUpdateParameters + /// public partial class CdnEndpointPatch { /// @@ -57,21 +60,66 @@ public CdnEndpointPatch() } /// Initializes a new instance of . - /// Endpoint tags. - /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// List of content types on which compression applies. The value should be a valid MIME type. - /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. - /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. - /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. - /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. - /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. - /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/. - /// A reference to the origin group. - /// List of keys used to validate the signed URL hashes. - /// A policy that specifies the delivery rules to be used for an endpoint. - /// Defines the Web Application Firewall policy for the endpoint (if applicable). + /// + /// Endpoint tags. + /// Serialized Name: EndpointUpdateParameters.tags + /// + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: EndpointUpdateParameters.properties.originPath + /// + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: EndpointUpdateParameters.properties.contentTypesToCompress + /// + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: EndpointUpdateParameters.properties.originHostHeader + /// + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: EndpointUpdateParameters.properties.isCompressionEnabled + /// + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: EndpointUpdateParameters.properties.isHttpAllowed + /// + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: EndpointUpdateParameters.properties.isHttpsAllowed + /// + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: EndpointUpdateParameters.properties.queryStringCachingBehavior + /// + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// Serialized Name: EndpointUpdateParameters.properties.optimizationType + /// + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// Serialized Name: EndpointUpdateParameters.properties.probePath + /// + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + /// Serialized Name: EndpointUpdateParameters.properties.geoFilters + /// + /// + /// A reference to the origin group. + /// Serialized Name: EndpointUpdateParameters.properties.defaultOriginGroup + /// + /// + /// List of keys used to validate the signed URL hashes. + /// Serialized Name: EndpointUpdateParameters.properties.urlSigningKeys + /// + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: EndpointUpdateParameters.properties.deliveryPolicy + /// + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: EndpointUpdateParameters.properties.webApplicationFirewallPolicyLink + /// /// Keeps track of any properties unknown to the library. internal CdnEndpointPatch(IDictionary tags, string originPath, IList contentTypesToCompress, string originHostHeader, bool? isCompressionEnabled, bool? isHttpAllowed, bool? isHttpsAllowed, QueryStringCachingBehavior? queryStringCachingBehavior, OptimizationType? optimizationType, string probePath, IList geoFilters, WritableSubResource defaultOriginGroup, IList uriSigningKeys, EndpointDeliveryPolicy deliveryPolicy, EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink webApplicationFirewallPolicyLink, IDictionary serializedAdditionalRawData) { @@ -93,29 +141,65 @@ internal CdnEndpointPatch(IDictionary tags, string originPath, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Endpoint tags. + /// + /// Endpoint tags. + /// Serialized Name: EndpointUpdateParameters.tags + /// public IDictionary Tags { get; } - /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + /// A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: EndpointUpdateParameters.properties.originPath + /// public string OriginPath { get; set; } - /// List of content types on which compression applies. The value should be a valid MIME type. + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: EndpointUpdateParameters.properties.contentTypesToCompress + /// public IList ContentTypesToCompress { get; } - /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// + /// The host header value sent to the origin with each request. This property at Endpoint is only allowed when endpoint uses single origin and can be overridden by the same property specified at origin.If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: EndpointUpdateParameters.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// Indicates whether content compression is enabled on CDN. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on CDN when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: EndpointUpdateParameters.properties.isCompressionEnabled + /// public bool? IsCompressionEnabled { get; set; } - /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// + /// Indicates whether HTTP traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: EndpointUpdateParameters.properties.isHttpAllowed + /// public bool? IsHttpAllowed { get; set; } - /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// + /// Indicates whether HTTPS traffic is allowed on the endpoint. Default value is true. At least one protocol (HTTP or HTTPS) must be allowed. + /// Serialized Name: EndpointUpdateParameters.properties.isHttpsAllowed + /// public bool? IsHttpsAllowed { get; set; } - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: EndpointUpdateParameters.properties.queryStringCachingBehavior + /// public QueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } - /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize for, e.g. Download, Media services. With this information, CDN can apply scenario driven optimization. + /// Serialized Name: EndpointUpdateParameters.properties.optimizationType + /// public OptimizationType? OptimizationType { get; set; } - /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// + /// Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path. This property is only relevant when using a single origin. + /// Serialized Name: EndpointUpdateParameters.properties.probePath + /// public string ProbePath { get; set; } - /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/. + /// + /// List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/ + /// Serialized Name: EndpointUpdateParameters.properties.geoFilters + /// public IList GeoFilters { get; } - /// A reference to the origin group. + /// + /// A reference to the origin group. + /// Serialized Name: EndpointUpdateParameters.properties.defaultOriginGroup + /// internal WritableSubResource DefaultOriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier DefaultOriginGroupId @@ -129,13 +213,25 @@ public ResourceIdentifier DefaultOriginGroupId } } - /// List of keys used to validate the signed URL hashes. + /// + /// List of keys used to validate the signed URL hashes. + /// Serialized Name: EndpointUpdateParameters.properties.urlSigningKeys + /// public IList UriSigningKeys { get; set; } - /// A policy that specifies the delivery rules to be used for an endpoint. + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: EndpointUpdateParameters.properties.deliveryPolicy + /// public EndpointDeliveryPolicy DeliveryPolicy { get; set; } - /// Defines the Web Application Firewall policy for the endpoint (if applicable). + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: EndpointUpdateParameters.properties.webApplicationFirewallPolicyLink + /// internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink WebApplicationFirewallPolicyLink { get; set; } - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.id + /// public ResourceIdentifier WebApplicationFirewallPolicyLinkId { get => WebApplicationFirewallPolicyLink is null ? default : WebApplicationFirewallPolicyLink.Id; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointProvisioningState.cs index 031158d62e16..edf9f2162751 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnEndpointProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status of the endpoint. + /// + /// Provisioning status of the endpoint. + /// Serialized Name: EndpointProvisioningState + /// public readonly partial struct CdnEndpointProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public CdnEndpointProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string CreatingValue = "Creating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: EndpointProvisioningState.Succeeded + /// public static CdnEndpointProvisioningState Succeeded { get; } = new CdnEndpointProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: EndpointProvisioningState.Failed + /// public static CdnEndpointProvisioningState Failed { get; } = new CdnEndpointProvisioningState(FailedValue); - /// Updating. + /// + /// Updating + /// Serialized Name: EndpointProvisioningState.Updating + /// public static CdnEndpointProvisioningState Updating { get; } = new CdnEndpointProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: EndpointProvisioningState.Deleting + /// public static CdnEndpointProvisioningState Deleting { get; } = new CdnEndpointProvisioningState(DeletingValue); - /// Creating. + /// + /// Creating + /// Serialized Name: EndpointProvisioningState.Creating + /// public static CdnEndpointProvisioningState Creating { get; } = new CdnEndpointProvisioningState(CreatingValue); /// Determines if two values are the same. public static bool operator ==(CdnEndpointProvisioningState left, CdnEndpointProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedCertificateType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedCertificateType.cs index 454800968ca8..5e7809278bec 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedCertificateType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedCertificateType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Type of certificate used. + /// + /// Type of certificate used + /// Serialized Name: CertificateType + /// public readonly partial struct CdnManagedCertificateType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CdnManagedCertificateType(string value) private const string SharedValue = "Shared"; private const string DedicatedValue = "Dedicated"; - /// Shared. + /// + /// Shared + /// Serialized Name: CertificateType.Shared + /// public static CdnManagedCertificateType Shared { get; } = new CdnManagedCertificateType(SharedValue); - /// Dedicated. + /// + /// Dedicated + /// Serialized Name: CertificateType.Dedicated + /// public static CdnManagedCertificateType Dedicated { get; } = new CdnManagedCertificateType(DedicatedValue); /// Determines if two values are the same. public static bool operator ==(CdnManagedCertificateType left, CdnManagedCertificateType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedHttpsContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedHttpsContent.cs index c187d1179a7e..5b2f6b670e76 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedHttpsContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnManagedHttpsContent.cs @@ -10,12 +10,21 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// Serialized Name: CdnManagedHttpsParameters + /// public partial class CdnManagedHttpsContent : CustomDomainHttpsContent { /// Initializes a new instance of . - /// Defines the TLS extension protocol that is used for secure delivery. - /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// Serialized Name: CdnManagedHttpsParameters.certificateSourceParameters + /// /// is null. public CdnManagedHttpsContent(SecureDeliveryProtocolType protocolType, CdnCertificateSource certificateSourceParameters) : base(protocolType) { @@ -26,11 +35,23 @@ public CdnManagedHttpsContent(SecureDeliveryProtocolType protocolType, CdnCertif } /// Initializes a new instance of . - /// Defines the source of the SSL certificate. - /// Defines the TLS extension protocol that is used for secure delivery. - /// TLS protocol version that will be used for Https. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CustomDomainHttpsParameters.certificateSource + /// + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// TLS protocol version that will be used for Https + /// Serialized Name: CustomDomainHttpsParameters.minimumTlsVersion + /// /// Keeps track of any properties unknown to the library. - /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// Serialized Name: CdnManagedHttpsParameters.certificateSourceParameters + /// internal CdnManagedHttpsContent(CertificateSource certificateSource, SecureDeliveryProtocolType protocolType, CdnMinimumTlsVersion? minimumTlsVersion, IDictionary serializedAdditionalRawData, CdnCertificateSource certificateSourceParameters) : base(certificateSource, protocolType, minimumTlsVersion, serializedAdditionalRawData) { CertificateSourceParameters = certificateSourceParameters; @@ -42,7 +63,10 @@ internal CdnManagedHttpsContent() { } - /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// + /// Defines the certificate source parameters using CDN managed certificate for enabling SSL. + /// Serialized Name: CdnManagedHttpsParameters.certificateSourceParameters + /// public CdnCertificateSource CertificateSourceParameters { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.Serialization.cs new file mode 100644 index 000000000000..73851483446a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.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.Cdn.Models +{ + public partial class CdnMigrationToAfdContent : 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(CdnMigrationToAfdContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + if (Optional.IsCollectionDefined(MigrationEndpointMappings)) + { + writer.WritePropertyName("migrationEndpointMappings"u8); + writer.WriteStartArray(); + foreach (var item in MigrationEndpointMappings) + { + 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 + } + } + } + + CdnMigrationToAfdContent 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(CdnMigrationToAfdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCdnMigrationToAfdContent(document.RootElement, options); + } + + internal static CdnMigrationToAfdContent DeserializeCdnMigrationToAfdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CdnSku sku = default; + IList migrationEndpointMappings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sku"u8)) + { + sku = CdnSku.DeserializeCdnSku(property.Value, options); + continue; + } + if (property.NameEquals("migrationEndpointMappings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(MigrationEndpointMapping.DeserializeMigrationEndpointMapping(item, options)); + } + migrationEndpointMappings = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new CdnMigrationToAfdContent(sku, migrationEndpointMappings ?? 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(CdnMigrationToAfdContent)} does not support writing '{options.Format}' format."); + } + } + + CdnMigrationToAfdContent 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 DeserializeCdnMigrationToAfdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CdnMigrationToAfdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.cs new file mode 100644 index 000000000000..ece82958ad8f --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnMigrationToAfdContent.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; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// Request body for Migrate operation. + /// Serialized Name: CdnMigrationToAfdParameters + /// + public partial class CdnMigrationToAfdContent + { + /// + /// 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 . + /// + /// Sku for the migration + /// Serialized Name: CdnMigrationToAfdParameters.sku + /// + /// is null. + public CdnMigrationToAfdContent(CdnSku sku) + { + Argument.AssertNotNull(sku, nameof(sku)); + + Sku = sku; + MigrationEndpointMappings = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Sku for the migration + /// Serialized Name: CdnMigrationToAfdParameters.sku + /// + /// + /// A name map between classic CDN endpoints and AFD Premium/Standard endpoints. + /// Serialized Name: CdnMigrationToAfdParameters.migrationEndpointMappings + /// + /// Keeps track of any properties unknown to the library. + internal CdnMigrationToAfdContent(CdnSku sku, IList migrationEndpointMappings, IDictionary serializedAdditionalRawData) + { + Sku = sku; + MigrationEndpointMappings = migrationEndpointMappings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal CdnMigrationToAfdContent() + { + } + + /// + /// Sku for the migration + /// Serialized Name: CdnMigrationToAfdParameters.sku + /// + internal CdnSku Sku { get; } + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// + public CdnSkuName? SkuName + { + get => Sku?.Name; + } + + /// + /// A name map between classic CDN endpoints and AFD Premium/Standard endpoints. + /// Serialized Name: CdnMigrationToAfdParameters.migrationEndpointMappings + /// + public IList MigrationEndpointMappings { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityContent.cs index e1d73d6e79ec..f68dfc4a1ef7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of CheckNameAvailability API. + /// + /// Input of CheckNameAvailability API. + /// Serialized Name: CheckNameAvailabilityInput + /// public partial class CdnNameAvailabilityContent { /// @@ -46,8 +49,14 @@ public partial class CdnNameAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The resource name to validate. - /// The type of the resource whose name is to be validated. + /// + /// The resource name to validate. + /// Serialized Name: CheckNameAvailabilityInput.name + /// + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckNameAvailabilityInput.type + /// /// is null. public CdnNameAvailabilityContent(string name, CdnResourceType resourceType) { @@ -58,8 +67,14 @@ public CdnNameAvailabilityContent(string name, CdnResourceType resourceType) } /// Initializes a new instance of . - /// The resource name to validate. - /// The type of the resource whose name is to be validated. + /// + /// The resource name to validate. + /// Serialized Name: CheckNameAvailabilityInput.name + /// + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckNameAvailabilityInput.type + /// /// Keeps track of any properties unknown to the library. internal CdnNameAvailabilityContent(string name, CdnResourceType resourceType, IDictionary serializedAdditionalRawData) { @@ -73,9 +88,15 @@ internal CdnNameAvailabilityContent() { } - /// The resource name to validate. + /// + /// The resource name to validate. + /// Serialized Name: CheckNameAvailabilityInput.name + /// public string Name { get; } - /// The type of the resource whose name is to be validated. + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckNameAvailabilityInput.type + /// public CdnResourceType ResourceType { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityResult.cs index 47e98fd3306a..f4390fde039e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnNameAvailabilityResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of check name availability API. + /// + /// Output of check name availability API. + /// Serialized Name: CheckNameAvailabilityOutput + /// public partial class CdnNameAvailabilityResult { /// @@ -51,9 +54,18 @@ internal CdnNameAvailabilityResult() } /// Initializes a new instance of . - /// Indicates whether the name is available. - /// The reason why the name is not available. - /// The detailed error message describing why the name is not available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckNameAvailabilityOutput.nameAvailable + /// + /// + /// The reason why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.reason + /// + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.message + /// /// Keeps track of any properties unknown to the library. internal CdnNameAvailabilityResult(bool? nameAvailable, string reason, string message, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal CdnNameAvailabilityResult(bool? nameAvailable, string reason, string me _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Indicates whether the name is available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckNameAvailabilityOutput.nameAvailable + /// public bool? NameAvailable { get; } - /// The reason why the name is not available. + /// + /// The reason why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.reason + /// public string Reason { get; } - /// The detailed error message describing why the name is not available. + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckNameAvailabilityOutput.message + /// public string Message { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginGroupPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginGroupPatch.cs index e91083844dc4..45eb892f771b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginGroupPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginGroupPatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Origin group properties needed for origin group creation or update. + /// + /// Origin group properties needed for origin group creation or update. + /// Serialized Name: OriginGroupUpdateParameters + /// public partial class CdnOriginGroupPatch { /// @@ -53,10 +56,22 @@ public CdnOriginGroupPatch() } /// Initializes a new instance of . - /// Health probe settings to the origin that is used to determine the health of the origin. - /// The source of the content being delivered via CDN within given origin group. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: OriginGroupUpdateParameters.properties.healthProbeSettings + /// + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: OriginGroupUpdateParameters.properties.origins + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: OriginGroupUpdateParameters.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// Serialized Name: OriginGroupUpdateParameters.properties.responseBasedOriginErrorDetectionSettings + /// /// Keeps track of any properties unknown to the library. internal CdnOriginGroupPatch(HealthProbeSettings healthProbeSettings, IList origins, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes, ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings, IDictionary serializedAdditionalRawData) { @@ -67,13 +82,25 @@ internal CdnOriginGroupPatch(HealthProbeSettings healthProbeSettings, IList Health probe settings to the origin that is used to determine the health of the origin. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: OriginGroupUpdateParameters.properties.healthProbeSettings + /// public HealthProbeSettings HealthProbeSettings { get; set; } - /// The source of the content being delivered via CDN within given origin group. + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: OriginGroupUpdateParameters.properties.origins + /// public IList Origins { get; } - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: OriginGroupUpdateParameters.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } - /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. This property is currently not supported. + /// Serialized Name: OriginGroupUpdateParameters.properties.responseBasedOriginErrorDetectionSettings + /// public ResponseBasedOriginErrorDetectionSettings ResponseBasedOriginErrorDetectionSettings { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginPatch.cs index a3798dd5e2c1..9a941c67d286 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnOriginPatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Origin properties needed for origin update. + /// + /// Origin properties needed for origin update. + /// Serialized Name: OriginUpdateParameters + /// public partial class CdnOriginPatch { /// @@ -52,17 +55,50 @@ public CdnOriginPatch() } /// Initializes a new instance of . - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// Origin is enabled for load balancing or not. - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. - /// A custom message to be included in the approval request to connect to the Private Link. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: OriginUpdateParameters.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: OriginUpdateParameters.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: OriginUpdateParameters.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: OriginUpdateParameters.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: OriginUpdateParameters.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: OriginUpdateParameters.properties.weight + /// + /// + /// Origin is enabled for load balancing or not + /// Serialized Name: OriginUpdateParameters.properties.enabled + /// + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: OriginUpdateParameters.properties.privateLinkAlias + /// + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: OriginUpdateParameters.properties.privateLinkResourceId + /// + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: OriginUpdateParameters.properties.privateLinkLocation + /// + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: OriginUpdateParameters.properties.privateLinkApprovalMessage + /// /// Keeps track of any properties unknown to the library. internal CdnOriginPatch(string hostName, int? httpPort, int? httpsPort, string originHostHeader, int? priority, int? weight, bool? enabled, string privateLinkAlias, ResourceIdentifier privateLinkResourceId, string privateLinkLocation, string privateLinkApprovalMessage, IDictionary serializedAdditionalRawData) { @@ -80,27 +116,60 @@ internal CdnOriginPatch(string hostName, int? httpPort, int? httpsPort, string o _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: OriginUpdateParameters.properties.hostName + /// public string HostName { get; set; } - /// The value of the HTTP port. Must be between 1 and 65535. + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: OriginUpdateParameters.properties.httpPort + /// public int? HttpPort { get; set; } - /// The value of the HTTPS port. Must be between 1 and 65535. + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: OriginUpdateParameters.properties.httpsPort + /// public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: OriginUpdateParameters.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: OriginUpdateParameters.properties.priority + /// public int? Priority { get; set; } - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: OriginUpdateParameters.properties.weight + /// public int? Weight { get; set; } - /// Origin is enabled for load balancing or not. + /// + /// Origin is enabled for load balancing or not + /// Serialized Name: OriginUpdateParameters.properties.enabled + /// public bool? Enabled { get; set; } - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: OriginUpdateParameters.properties.privateLinkAlias + /// public string PrivateLinkAlias { get; set; } - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: OriginUpdateParameters.properties.privateLinkResourceId + /// public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: OriginUpdateParameters.properties.privateLinkLocation + /// public string PrivateLinkLocation { get; set; } - /// A custom message to be included in the approval request to connect to the Private Link. + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: OriginUpdateParameters.properties.privateLinkApprovalMessage + /// public string PrivateLinkApprovalMessage { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnResourceType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnResourceType.cs index 8c29c8dc3cd8..4d010291596a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnResourceType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnResourceType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Type of CDN resource used in CheckNameAvailability. + /// + /// Type of CDN resource used in CheckNameAvailability. + /// Serialized Name: ResourceType + /// public readonly partial struct CdnResourceType : IEquatable { private readonly string _value; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSku.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSku.cs index 97d684fafc66..a9ee3b593867 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSku.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSku.cs @@ -25,6 +25,7 @@ namespace Azure.ResourceManager.Cdn.Models /// StandardPlus_955BandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using 95-5 peak bandwidth billing model. /// StandardPlus_AvgBandWidth_ChinaCdn = The SKU name for a China CDN live-streaming profile using monthly average peak bandwidth billing model. /// + /// Serialized Name: Sku /// public partial class CdnSku { @@ -66,7 +67,10 @@ public CdnSku() } /// Initializes a new instance of . - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// /// Keeps track of any properties unknown to the library. internal CdnSku(CdnSkuName? name, IDictionary serializedAdditionalRawData) { @@ -74,7 +78,10 @@ internal CdnSku(CdnSkuName? name, IDictionary serializedAddi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// public CdnSkuName? Name { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSkuName.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSkuName.cs index 402db883055d..6bef197140e6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSkuName.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnSkuName.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: SkuName + /// public readonly partial struct CdnSkuName : IEquatable { private readonly string _value; @@ -36,31 +39,70 @@ public CdnSkuName(string value) private const string StandardPlus955BandWidthChinaCdnValue = "StandardPlus_955BandWidth_ChinaCdn"; private const string StandardPlusAvgBandWidthChinaCdnValue = "StandardPlus_AvgBandWidth_ChinaCdn"; - /// Standard_Verizon. + /// + /// Standard_Verizon + /// Serialized Name: SkuName.Standard_Verizon + /// public static CdnSkuName StandardVerizon { get; } = new CdnSkuName(StandardVerizonValue); - /// Premium_Verizon. + /// + /// Premium_Verizon + /// Serialized Name: SkuName.Premium_Verizon + /// public static CdnSkuName PremiumVerizon { get; } = new CdnSkuName(PremiumVerizonValue); - /// Custom_Verizon. + /// + /// Custom_Verizon + /// Serialized Name: SkuName.Custom_Verizon + /// public static CdnSkuName CustomVerizon { get; } = new CdnSkuName(CustomVerizonValue); - /// Standard_Akamai. + /// + /// Standard_Akamai + /// Serialized Name: SkuName.Standard_Akamai + /// public static CdnSkuName StandardAkamai { get; } = new CdnSkuName(StandardAkamaiValue); - /// Standard_ChinaCdn. + /// + /// Standard_ChinaCdn + /// Serialized Name: SkuName.Standard_ChinaCdn + /// public static CdnSkuName StandardChinaCdn { get; } = new CdnSkuName(StandardChinaCdnValue); - /// Standard_Microsoft. + /// + /// Standard_Microsoft + /// Serialized Name: SkuName.Standard_Microsoft + /// public static CdnSkuName StandardMicrosoft { get; } = new CdnSkuName(StandardMicrosoftValue); - /// Standard_AzureFrontDoor. + /// + /// Standard_AzureFrontDoor + /// Serialized Name: SkuName.Standard_AzureFrontDoor + /// public static CdnSkuName StandardAzureFrontDoor { get; } = new CdnSkuName(StandardAzureFrontDoorValue); - /// Premium_AzureFrontDoor. + /// + /// Premium_AzureFrontDoor + /// Serialized Name: SkuName.Premium_AzureFrontDoor + /// public static CdnSkuName PremiumAzureFrontDoor { get; } = new CdnSkuName(PremiumAzureFrontDoorValue); - /// Standard_955BandWidth_ChinaCdn. + /// + /// Standard_955BandWidth_ChinaCdn + /// Serialized Name: SkuName.Standard_955BandWidth_ChinaCdn + /// public static CdnSkuName Standard955BandWidthChinaCdn { get; } = new CdnSkuName(Standard955BandWidthChinaCdnValue); - /// Standard_AvgBandWidth_ChinaCdn. + /// + /// Standard_AvgBandWidth_ChinaCdn + /// Serialized Name: SkuName.Standard_AvgBandWidth_ChinaCdn + /// public static CdnSkuName StandardAvgBandWidthChinaCdn { get; } = new CdnSkuName(StandardAvgBandWidthChinaCdnValue); - /// StandardPlus_ChinaCdn. + /// + /// StandardPlus_ChinaCdn + /// Serialized Name: SkuName.StandardPlus_ChinaCdn + /// public static CdnSkuName StandardPlusChinaCdn { get; } = new CdnSkuName(StandardPlusChinaCdnValue); - /// StandardPlus_955BandWidth_ChinaCdn. + /// + /// StandardPlus_955BandWidth_ChinaCdn + /// Serialized Name: SkuName.StandardPlus_955BandWidth_ChinaCdn + /// public static CdnSkuName StandardPlus955BandWidthChinaCdn { get; } = new CdnSkuName(StandardPlus955BandWidthChinaCdnValue); - /// StandardPlus_AvgBandWidth_ChinaCdn. + /// + /// StandardPlus_AvgBandWidth_ChinaCdn + /// Serialized Name: SkuName.StandardPlus_AvgBandWidth_ChinaCdn + /// public static CdnSkuName StandardPlusAvgBandWidthChinaCdn { get; } = new CdnSkuName(StandardPlusAvgBandWidthChinaCdnValue); /// Determines if two values are the same. public static bool operator ==(CdnSkuName left, CdnSkuName right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsage.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsage.cs index 2dfc487f83ad..85f89996323d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsage.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsage.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of check resource usage API. + /// + /// Output of check resource usage API. + /// Serialized Name: ResourceUsage + /// public partial class CdnUsage { /// @@ -51,10 +54,22 @@ internal CdnUsage() } /// Initializes a new instance of . - /// Resource type for which the usage is provided. - /// Unit of the usage. e.g. count. - /// Actual value of usage on the specified resource type. - /// Quota of the specified resource type. + /// + /// Resource type for which the usage is provided. + /// Serialized Name: ResourceUsage.resourceType + /// + /// + /// Unit of the usage. e.g. count. + /// Serialized Name: ResourceUsage.unit + /// + /// + /// Actual value of usage on the specified resource type. + /// Serialized Name: ResourceUsage.currentValue + /// + /// + /// Quota of the specified resource type. + /// Serialized Name: ResourceUsage.limit + /// /// Keeps track of any properties unknown to the library. internal CdnUsage(string resourceType, CdnUsageUnit? unit, int? currentValue, int? limit, IDictionary serializedAdditionalRawData) { @@ -65,13 +80,25 @@ internal CdnUsage(string resourceType, CdnUsageUnit? unit, int? currentValue, in _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource type for which the usage is provided. + /// + /// Resource type for which the usage is provided. + /// Serialized Name: ResourceUsage.resourceType + /// public string ResourceType { get; } - /// Unit of the usage. e.g. count. + /// + /// Unit of the usage. e.g. count. + /// Serialized Name: ResourceUsage.unit + /// public CdnUsageUnit? Unit { get; } - /// Actual value of usage on the specified resource type. + /// + /// Actual value of usage on the specified resource type. + /// Serialized Name: ResourceUsage.currentValue + /// public int? CurrentValue { get; } - /// Quota of the specified resource type. + /// + /// Quota of the specified resource type. + /// Serialized Name: ResourceUsage.limit + /// public int? Limit { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsageUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsageUnit.cs index a28b24c6bceb..569c22551f7f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsageUnit.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnUsageUnit.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Unit of the usage. e.g. count. + /// + /// Unit of the usage. e.g. count. + /// Serialized Name: ResourceUsageUnit + /// public readonly partial struct CdnUsageUnit : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public CdnUsageUnit(string value) private const string CountValue = "count"; - /// count. + /// + /// count + /// Serialized Name: ResourceUsageUnit.count + /// public static CdnUsageUnit Count { get; } = new CdnUsageUnit(CountValue); /// Determines if two values are the same. public static bool operator ==(CdnUsageUnit left, CdnUsageUnit right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyList.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyList.cs index aaf8416afc8d..808762502f02 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyList.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + /// + /// Defines a list of WebApplicationFirewallPolicies for Azure CDN. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + /// Serialized Name: CdnWebApplicationFirewallPolicyList + /// internal partial class CdnWebApplicationFirewallPolicyList { /// @@ -52,8 +55,14 @@ internal CdnWebApplicationFirewallPolicyList() } /// Initializes a new instance of . - /// List of Azure CDN WebApplicationFirewallPolicies within a resource group. - /// URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + /// + /// List of Azure CDN WebApplicationFirewallPolicies within a resource group. + /// Serialized Name: CdnWebApplicationFirewallPolicyList.value + /// + /// + /// URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + /// Serialized Name: CdnWebApplicationFirewallPolicyList.nextLink + /// /// Keeps track of any properties unknown to the library. internal CdnWebApplicationFirewallPolicyList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal CdnWebApplicationFirewallPolicyList(IReadOnlyList List of Azure CDN WebApplicationFirewallPolicies within a resource group. + /// + /// List of Azure CDN WebApplicationFirewallPolicies within a resource group. + /// Serialized Name: CdnWebApplicationFirewallPolicyList.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + /// + /// URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + /// Serialized Name: CdnWebApplicationFirewallPolicyList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyPatch.cs index 8e97a33eec55..3d2aa7ac1106 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CdnWebApplicationFirewallPolicyPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Properties required to update a CdnWebApplicationFirewallPolicy. + /// + /// Properties required to update a CdnWebApplicationFirewallPolicy. + /// Serialized Name: CdnWebApplicationFirewallPolicyPatchParameters + /// public partial class CdnWebApplicationFirewallPolicyPatch { /// @@ -52,7 +55,10 @@ public CdnWebApplicationFirewallPolicyPatch() } /// Initializes a new instance of . - /// CdnWebApplicationFirewallPolicy tags. + /// + /// CdnWebApplicationFirewallPolicy tags + /// Serialized Name: CdnWebApplicationFirewallPolicyPatchParameters.tags + /// /// Keeps track of any properties unknown to the library. internal CdnWebApplicationFirewallPolicyPatch(IDictionary tags, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal CdnWebApplicationFirewallPolicyPatch(IDictionary tags, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// CdnWebApplicationFirewallPolicy tags. + /// + /// CdnWebApplicationFirewallPolicy tags + /// Serialized Name: CdnWebApplicationFirewallPolicyPatchParameters.tags + /// public IDictionary Tags { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateDeleteAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateDeleteAction.cs index 95c8d1ab4645..fde9625d3703 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateDeleteAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateDeleteAction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// Serialized Name: DeleteRule + /// public readonly partial struct CertificateDeleteAction : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public CertificateDeleteAction(string value) private const string NoActionValue = "NoAction"; - /// NoAction. + /// + /// NoAction + /// Serialized Name: DeleteRule.NoAction + /// public static CertificateDeleteAction NoAction { get; } = new CertificateDeleteAction(NoActionValue); /// Determines if two values are the same. public static bool operator ==(CertificateDeleteAction left, CertificateDeleteAction right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSource.cs index 668ffc22a0a8..91bb96aca8cb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSource.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the source of the SSL certificate. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CertificateSource + /// internal readonly partial struct CertificateSource : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CertificateSource(string value) private const string AzureKeyVaultValue = "AzureKeyVault"; private const string CdnValue = "Cdn"; - /// AzureKeyVault. + /// + /// AzureKeyVault + /// Serialized Name: CertificateSource.AzureKeyVault + /// public static CertificateSource AzureKeyVault { get; } = new CertificateSource(AzureKeyVaultValue); - /// Cdn. + /// + /// Cdn + /// Serialized Name: CertificateSource.Cdn + /// public static CertificateSource Cdn { get; } = new CertificateSource(CdnValue); /// Determines if two values are the same. public static bool operator ==(CertificateSource left, CertificateSource right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceParametersType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceParametersType.cs new file mode 100644 index 000000000000..5536cdb8bf0f --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceParametersType.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// The CertificateSourceParametersType. + /// Serialized Name: CertificateSourceParametersType + /// + internal readonly partial struct CertificateSourceParametersType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public CertificateSourceParametersType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CdnCertificateSourceParametersValue = "CdnCertificateSourceParameters"; + private const string KeyVaultCertificateSourceParametersValue = "KeyVaultCertificateSourceParameters"; + + /// + /// CdnCertificateSourceParameters + /// Serialized Name: CertificateSourceParametersType.CdnCertificateSourceParameters + /// + public static CertificateSourceParametersType CdnCertificateSourceParameters { get; } = new CertificateSourceParametersType(CdnCertificateSourceParametersValue); + /// + /// KeyVaultCertificateSourceParameters + /// Serialized Name: CertificateSourceParametersType.KeyVaultCertificateSourceParameters + /// + public static CertificateSourceParametersType KeyVaultCertificateSourceParameters { get; } = new CertificateSourceParametersType(KeyVaultCertificateSourceParametersValue); + /// Determines if two values are the same. + public static bool operator ==(CertificateSourceParametersType left, CertificateSourceParametersType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(CertificateSourceParametersType left, CertificateSourceParametersType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator CertificateSourceParametersType(string value) => new CertificateSourceParametersType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is CertificateSourceParametersType other && Equals(other); + /// + public bool Equals(CertificateSourceParametersType 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.Serialization.cs new file mode 100644 index 000000000000..bd6921fc8da0 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.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.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Cdn.Models +{ + [PersistableModelProxy(typeof(UnknownCertificateSourceParameters))] + public partial class CertificateSourceProperties : 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(CertificateSourceProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName.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 + } + } + } + + CertificateSourceProperties 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(CertificateSourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCertificateSourceProperties(document.RootElement, options); + } + + internal static CertificateSourceProperties DeserializeCertificateSourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("typeName", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "CdnCertificateSourceParameters": return CdnCertificateSource.DeserializeCdnCertificateSource(element, options); + case "KeyVaultCertificateSourceParameters": return KeyVaultCertificateSource.DeserializeKeyVaultCertificateSource(element, options); + } + } + return UnknownCertificateSourceParameters.DeserializeUnknownCertificateSourceParameters(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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(CertificateSourceProperties)} does not support writing '{options.Format}' format."); + } + } + + CertificateSourceProperties 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 DeserializeCertificateSourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CertificateSourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.cs new file mode 100644 index 000000000000..e9a294909e08 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateSourceProperties.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.Cdn.Models +{ + /// + /// Defines the parameters for certificate source + /// Serialized Name: CertificateSourceParameters + /// 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 abstract partial class CertificateSourceProperties + { + /// + /// 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 CertificateSourceProperties() + { + } + + /// Initializes a new instance of . + /// Serialized Name: CertificateSourceParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal CertificateSourceProperties(CertificateSourceParametersType typeName, IDictionary serializedAdditionalRawData) + { + TypeName = typeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Serialized Name: CertificateSourceParameters.typeName. + internal CertificateSourceParametersType TypeName { get; set; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateUpdateAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateUpdateAction.cs index 254b9d0d5bf0..e0742fb519b7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateUpdateAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CertificateUpdateAction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// Serialized Name: UpdateRule + /// public readonly partial struct CertificateUpdateAction : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public CertificateUpdateAction(string value) private const string NoActionValue = "NoAction"; - /// NoAction. + /// + /// NoAction + /// Serialized Name: UpdateRule.NoAction + /// public static CertificateUpdateAction NoAction { get; } = new CertificateUpdateAction(NoActionValue); /// Determines if two values are the same. public static bool operator ==(CertificateUpdateAction left, CertificateUpdateAction right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CidrIPAddress.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CidrIPAddress.cs index 8f21f3ca7d98..baf5791413db 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CidrIPAddress.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CidrIPAddress.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// CIDR Ip address. + /// + /// CIDR Ip address + /// Serialized Name: CidrIpAddress + /// public partial class CidrIPAddress { /// @@ -51,8 +54,14 @@ public CidrIPAddress() } /// Initializes a new instance of . - /// Ip address itself. - /// The length of the prefix of the ip address. + /// + /// Ip address itself. + /// Serialized Name: CidrIpAddress.baseIpAddress + /// + /// + /// The length of the prefix of the ip address. + /// Serialized Name: CidrIpAddress.prefixLength + /// /// Keeps track of any properties unknown to the library. internal CidrIPAddress(string baseIPAddress, int? prefixLength, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal CidrIPAddress(string baseIPAddress, int? prefixLength, IDictionary Ip address itself. + /// + /// Ip address itself. + /// Serialized Name: CidrIpAddress.baseIpAddress + /// public string BaseIPAddress { get; set; } - /// The length of the prefix of the ip address. + /// + /// The length of the prefix of the ip address. + /// Serialized Name: CidrIpAddress.prefixLength + /// public int? PrefixLength { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.Serialization.cs index ba627120bb78..d745278ba4a6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ClientPortMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(ClientPortOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } ClientPortMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static ClientPortMatchCondition DeserializeClientPortMatchCondition(Jso { return null; } - ClientPortMatchConditionType typeName = default; ClientPortOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new ClientPortMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new ClientPortOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static ClientPortMatchCondition DeserializeClientPortMatchCondition(Jso transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static ClientPortMatchCondition DeserializeClientPortMatchCondition(Jso serializedAdditionalRawData = rawDataDictionary; return new ClientPortMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.cs index 7fd06263bb86..4688e0f9f093 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for ClientPort match conditions. - public partial class ClientPortMatchCondition + /// + /// Defines the parameters for ClientPort match conditions + /// Serialized Name: ClientPortMatchConditionParameters + /// + public partial class ClientPortMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public ClientPortMatchCondition(ClientPortMatchConditionType conditionType, ClientPortOperator clientPortOperator) + /// + /// Describes operator to be matched + /// Serialized Name: ClientPortMatchConditionParameters.operator + /// + public ClientPortMatchCondition(ClientPortOperator clientPortOperator) { - ConditionType = conditionType; ClientPortOperator = clientPortOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleClientPortConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal ClientPortMatchCondition(ClientPortMatchConditionType conditionType, ClientPortOperator clientPortOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: ClientPortMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: ClientPortMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: ClientPortMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: ClientPortMatchConditionParameters.transforms + /// + internal ClientPortMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, ClientPortOperator clientPortOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; ClientPortOperator = clientPortOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal ClientPortMatchCondition() { } - /// Gets or sets the condition type. - public ClientPortMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: ClientPortMatchConditionParameters.operator + /// public ClientPortOperator ClientPortOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: ClientPortMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: ClientPortMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: ClientPortMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortOperator.cs index 0125c3ca1107..4b6a23a985b1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ClientPortOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: ClientPortOperator + /// public readonly partial struct ClientPortOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public ClientPortOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: ClientPortOperator.Any + /// public static ClientPortOperator Any { get; } = new ClientPortOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: ClientPortOperator.Equal + /// public static ClientPortOperator Equal { get; } = new ClientPortOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: ClientPortOperator.Contains + /// public static ClientPortOperator Contains { get; } = new ClientPortOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: ClientPortOperator.BeginsWith + /// public static ClientPortOperator BeginsWith { get; } = new ClientPortOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: ClientPortOperator.EndsWith + /// public static ClientPortOperator EndsWith { get; } = new ClientPortOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: ClientPortOperator.LessThan + /// public static ClientPortOperator LessThan { get; } = new ClientPortOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: ClientPortOperator.LessThanOrEqual + /// public static ClientPortOperator LessThanOrEqual { get; } = new ClientPortOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: ClientPortOperator.GreaterThan + /// public static ClientPortOperator GreaterThan { get; } = new ClientPortOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: ClientPortOperator.GreaterThanOrEqual + /// public static ClientPortOperator GreaterThanOrEqual { get; } = new ClientPortOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: ClientPortOperator.RegEx + /// public static ClientPortOperator RegEx { get; } = new ClientPortOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(ClientPortOperator left, ClientPortOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs index 1da636fd9480..6e1f511ef5ca 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + /// The Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems + /// public partial class Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems { /// @@ -51,8 +54,8 @@ internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsProperti } /// Initializes a new instance of . - /// - /// + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. /// Keeps track of any properties unknown to the library. internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems(DateTimeOffset? dateOn, float? value, IDictionary serializedAdditionalRawData) { @@ -61,9 +64,9 @@ internal Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsProperti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date on. + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. public DateTimeOffset? DateOn { get; } - /// Gets the value. + /// Serialized Name: Components18OrqelSchemasWafmetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. public float? Value { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs index 896113c13317..413a2ca18ed9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// + /// The Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems. + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems + /// public partial class Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems { /// @@ -51,8 +54,8 @@ internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesD } /// Initializes a new instance of . - /// - /// + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. /// Keeps track of any properties unknown to the library. internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems(DateTimeOffset? dateOn, float? value, IDictionary serializedAdditionalRawData) { @@ -61,9 +64,9 @@ internal Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesD _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date on. + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.dateTime. public DateTimeOffset? DateOn { get; } - /// Gets the value. + /// Serialized Name: Components1Gs0LlpSchemasMetricsresponsePropertiesSeriesItemsPropertiesDataItems.value. public float? Value { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs index 6f78dbf99436..d45dff4be10a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. + /// + /// The ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems + /// public partial class ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems { /// @@ -51,9 +54,9 @@ internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsProperties } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.metric. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.value. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.percentage. /// Keeps track of any properties unknown to the library. internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems(string metric, long? value, double? percentage, IDictionary serializedAdditionalRawData) { @@ -63,11 +66,11 @@ internal ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsProperties _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the metric. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.metric. public string Metric { get; } - /// Gets the value. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.value. public long? Value { get; } - /// Gets the percentage. + /// Serialized Name: ComponentsKpo1PjSchemasWafrankingsresponsePropertiesDataItemsPropertiesMetricsItems.percentage. public double? Percentage { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponse.cs index 0035ee358fe9..908f9b6610b9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Continents Response. + /// + /// Continents Response + /// Serialized Name: ContinentsResponse + /// public partial class ContinentsResponse { /// @@ -53,8 +56,8 @@ internal ContinentsResponse() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ContinentsResponse.continents. + /// Serialized Name: ContinentsResponse.countryOrRegions. /// Keeps track of any properties unknown to the library. internal ContinentsResponse(IReadOnlyList continents, IReadOnlyList countryOrRegions, IDictionary serializedAdditionalRawData) { @@ -63,9 +66,9 @@ internal ContinentsResponse(IReadOnlyList cont _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the continents. + /// Serialized Name: ContinentsResponse.continents. public IReadOnlyList Continents { get; } - /// Gets the country or regions. + /// Serialized Name: ContinentsResponse.countryOrRegions. public IReadOnlyList CountryOrRegions { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseContinentsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseContinentsItem.cs index 0723ee6ff082..801a3d1f8be2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseContinentsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseContinentsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ContinentsResponseContinentsItem. + /// + /// The ContinentsResponseContinentsItem. + /// Serialized Name: ContinentsResponseContinentsItem + /// public partial class ContinentsResponseContinentsItem { /// @@ -51,7 +54,7 @@ internal ContinentsResponseContinentsItem() } /// Initializes a new instance of . - /// + /// Serialized Name: ContinentsResponseContinentsItem.id. /// Keeps track of any properties unknown to the library. internal ContinentsResponseContinentsItem(string id, IDictionary serializedAdditionalRawData) { @@ -59,7 +62,7 @@ internal ContinentsResponseContinentsItem(string id, IDictionary Gets the id. + /// Serialized Name: ContinentsResponseContinentsItem.id. public string Id { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseCountryOrRegionsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseCountryOrRegionsItem.cs index b3fe49c5b81e..9a57bed51698 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseCountryOrRegionsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ContinentsResponseCountryOrRegionsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ContinentsResponseCountryOrRegionsItem. + /// + /// The ContinentsResponseCountryOrRegionsItem. + /// Serialized Name: ContinentsResponseCountryOrRegionsItem + /// public partial class ContinentsResponseCountryOrRegionsItem { /// @@ -51,8 +54,8 @@ internal ContinentsResponseCountryOrRegionsItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.id. + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.continentId. /// Keeps track of any properties unknown to the library. internal ContinentsResponseCountryOrRegionsItem(string id, string continentId, IDictionary serializedAdditionalRawData) { @@ -61,9 +64,9 @@ internal ContinentsResponseCountryOrRegionsItem(string id, string continentId, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the id. + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.id. public string Id { get; } - /// Gets the continent id. + /// Serialized Name: ContinentsResponseCountryOrRegionsItem.continentId. public string ContinentId { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.Serialization.cs index 15b622b441bc..2d44ef72de38 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CookiesMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Selector)) { writer.WritePropertyName("selector"u8); @@ -68,21 +67,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } CookiesMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -105,21 +89,16 @@ internal static CookiesMatchCondition DeserializeCookiesMatchCondition(JsonEleme { return null; } - CookiesMatchConditionType typeName = default; string selector = default; CookiesOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new CookiesMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("selector"u8)) { selector = property.Value.GetString(); @@ -167,6 +146,11 @@ internal static CookiesMatchCondition DeserializeCookiesMatchCondition(JsonEleme transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,12 +159,12 @@ internal static CookiesMatchCondition DeserializeCookiesMatchCondition(JsonEleme serializedAdditionalRawData = rawDataDictionary; return new CookiesMatchCondition( typeName, + serializedAdditionalRawData, selector, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.cs index 412422181d67..ff22a8234b91 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesMatchCondition.cs @@ -10,69 +10,56 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for Cookies match conditions. - public partial class CookiesMatchCondition + /// + /// Defines the parameters for Cookies match conditions + /// Serialized Name: CookiesMatchConditionParameters + /// + public partial class CookiesMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public CookiesMatchCondition(CookiesMatchConditionType conditionType, CookiesOperator cookiesOperator) + /// + /// Describes operator to be matched + /// Serialized Name: CookiesMatchConditionParameters.operator + /// + public CookiesMatchCondition(CookiesOperator cookiesOperator) { - ConditionType = conditionType; CookiesOperator = cookiesOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleCookiesConditionParameters; } /// Initializes a new instance of . - /// - /// Name of Cookies to be matched. - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal CookiesMatchCondition(CookiesMatchConditionType conditionType, string selector, CookiesOperator cookiesOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Name of Cookies to be matched + /// Serialized Name: CookiesMatchConditionParameters.selector + /// + /// + /// Describes operator to be matched + /// Serialized Name: CookiesMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: CookiesMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: CookiesMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: CookiesMatchConditionParameters.transforms + /// + internal CookiesMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, string selector, CookiesOperator cookiesOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; Selector = selector; CookiesOperator = cookiesOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -80,17 +67,30 @@ internal CookiesMatchCondition() { } - /// Gets or sets the condition type. - public CookiesMatchConditionType ConditionType { get; set; } - /// Name of Cookies to be matched. + /// + /// Name of Cookies to be matched + /// Serialized Name: CookiesMatchConditionParameters.selector + /// public string Selector { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: CookiesMatchConditionParameters.operator + /// public CookiesOperator CookiesOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: CookiesMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: CookiesMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: CookiesMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesOperator.cs index 2299e89fae06..4d9a4646802f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CookiesOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: CookiesOperator + /// public readonly partial struct CookiesOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public CookiesOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: CookiesOperator.Any + /// public static CookiesOperator Any { get; } = new CookiesOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: CookiesOperator.Equal + /// public static CookiesOperator Equal { get; } = new CookiesOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: CookiesOperator.Contains + /// public static CookiesOperator Contains { get; } = new CookiesOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: CookiesOperator.BeginsWith + /// public static CookiesOperator BeginsWith { get; } = new CookiesOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: CookiesOperator.EndsWith + /// public static CookiesOperator EndsWith { get; } = new CookiesOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: CookiesOperator.LessThan + /// public static CookiesOperator LessThan { get; } = new CookiesOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: CookiesOperator.LessThanOrEqual + /// public static CookiesOperator LessThanOrEqual { get; } = new CookiesOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: CookiesOperator.GreaterThan + /// public static CookiesOperator GreaterThan { get; } = new CookiesOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: CookiesOperator.GreaterThanOrEqual + /// public static CookiesOperator GreaterThanOrEqual { get; } = new CookiesOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: CookiesOperator.RegEx + /// public static CookiesOperator RegEx { get; } = new CookiesOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(CookiesOperator left, CookiesOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainHttpsContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainHttpsContent.cs index 4d8f4a977f0d..60a1e802a3db 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainHttpsContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainHttpsContent.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// /// The JSON object that contains the properties to secure a custom domain. + /// Serialized Name: CustomDomainHttpsParameters /// 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 . /// @@ -50,16 +51,28 @@ public abstract partial class CustomDomainHttpsContent private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Defines the TLS extension protocol that is used for secure delivery. + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// protected CustomDomainHttpsContent(SecureDeliveryProtocolType protocolType) { ProtocolType = protocolType; } /// Initializes a new instance of . - /// Defines the source of the SSL certificate. - /// Defines the TLS extension protocol that is used for secure delivery. - /// TLS protocol version that will be used for Https. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CustomDomainHttpsParameters.certificateSource + /// + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// TLS protocol version that will be used for Https + /// Serialized Name: CustomDomainHttpsParameters.minimumTlsVersion + /// /// Keeps track of any properties unknown to the library. internal CustomDomainHttpsContent(CertificateSource certificateSource, SecureDeliveryProtocolType protocolType, CdnMinimumTlsVersion? minimumTlsVersion, IDictionary serializedAdditionalRawData) { @@ -74,11 +87,20 @@ internal CustomDomainHttpsContent() { } - /// Defines the source of the SSL certificate. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CustomDomainHttpsParameters.certificateSource + /// internal CertificateSource CertificateSource { get; set; } - /// Defines the TLS extension protocol that is used for secure delivery. + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// public SecureDeliveryProtocolType ProtocolType { get; set; } - /// TLS protocol version that will be used for Https. + /// + /// TLS protocol version that will be used for Https + /// Serialized Name: CustomDomainHttpsParameters.minimumTlsVersion + /// public CdnMinimumTlsVersion? MinimumTlsVersion { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainListResult.cs index 05aaae4c0f5b..9e274f4496af 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next set of results. + /// + /// Result of the request to list custom domains. It contains a list of custom domain objects and a URL link to get the next set of results. + /// Serialized Name: CustomDomainListResult + /// internal partial class CustomDomainListResult { /// @@ -52,8 +55,14 @@ internal CustomDomainListResult() } /// Initializes a new instance of . - /// List of CDN CustomDomains within an endpoint. - /// URL to get the next set of custom domain objects if there are any. + /// + /// List of CDN CustomDomains within an endpoint. + /// Serialized Name: CustomDomainListResult.value + /// + /// + /// URL to get the next set of custom domain objects if there are any. + /// Serialized Name: CustomDomainListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal CustomDomainListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal CustomDomainListResult(IReadOnlyList value, string _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of CDN CustomDomains within an endpoint. + /// + /// List of CDN CustomDomains within an endpoint. + /// Serialized Name: CustomDomainListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of custom domain objects if there are any. + /// + /// URL to get the next set of custom domain objects if there are any. + /// Serialized Name: CustomDomainListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainResourceState.cs index 3b3ad155da62..6a97b31e9e8c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomDomainResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the custom domain. + /// + /// Resource status of the custom domain. + /// Serialized Name: CustomDomainResourceState + /// public readonly partial struct CustomDomainResourceState : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public CustomDomainResourceState(string value) private const string ActiveValue = "Active"; private const string DeletingValue = "Deleting"; - /// Creating. + /// + /// Creating + /// Serialized Name: CustomDomainResourceState.Creating + /// public static CustomDomainResourceState Creating { get; } = new CustomDomainResourceState(CreatingValue); - /// Active. + /// + /// Active + /// Serialized Name: CustomDomainResourceState.Active + /// public static CustomDomainResourceState Active { get; } = new CustomDomainResourceState(ActiveValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: CustomDomainResourceState.Deleting + /// public static CustomDomainResourceState Deleting { get; } = new CustomDomainResourceState(DeletingValue); /// Determines if two values are the same. public static bool operator ==(CustomDomainResourceState left, CustomDomainResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsAvailabilityState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsAvailabilityState.cs index fba4865c8268..bfe129729874 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsAvailabilityState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsAvailabilityState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. + /// Serialized Name: CustomHttpsProvisioningSubstate + /// public readonly partial struct CustomHttpsAvailabilityState : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public CustomHttpsAvailabilityState(string value) private const string DeletingCertificateValue = "DeletingCertificate"; private const string CertificateDeletedValue = "CertificateDeleted"; - /// SubmittingDomainControlValidationRequest. + /// + /// SubmittingDomainControlValidationRequest + /// Serialized Name: CustomHttpsProvisioningSubstate.SubmittingDomainControlValidationRequest + /// public static CustomHttpsAvailabilityState SubmittingDomainControlValidationRequest { get; } = new CustomHttpsAvailabilityState(SubmittingDomainControlValidationRequestValue); - /// PendingDomainControlValidationREquestApproval. + /// + /// PendingDomainControlValidationREquestApproval + /// Serialized Name: CustomHttpsProvisioningSubstate.PendingDomainControlValidationREquestApproval + /// public static CustomHttpsAvailabilityState PendingDomainControlValidationREquestApproval { get; } = new CustomHttpsAvailabilityState(PendingDomainControlValidationREquestApprovalValue); - /// DomainControlValidationRequestApproved. + /// + /// DomainControlValidationRequestApproved + /// Serialized Name: CustomHttpsProvisioningSubstate.DomainControlValidationRequestApproved + /// public static CustomHttpsAvailabilityState DomainControlValidationRequestApproved { get; } = new CustomHttpsAvailabilityState(DomainControlValidationRequestApprovedValue); - /// DomainControlValidationRequestRejected. + /// + /// DomainControlValidationRequestRejected + /// Serialized Name: CustomHttpsProvisioningSubstate.DomainControlValidationRequestRejected + /// public static CustomHttpsAvailabilityState DomainControlValidationRequestRejected { get; } = new CustomHttpsAvailabilityState(DomainControlValidationRequestRejectedValue); - /// DomainControlValidationRequestTimedOut. + /// + /// DomainControlValidationRequestTimedOut + /// Serialized Name: CustomHttpsProvisioningSubstate.DomainControlValidationRequestTimedOut + /// public static CustomHttpsAvailabilityState DomainControlValidationRequestTimedOut { get; } = new CustomHttpsAvailabilityState(DomainControlValidationRequestTimedOutValue); - /// IssuingCertificate. + /// + /// IssuingCertificate + /// Serialized Name: CustomHttpsProvisioningSubstate.IssuingCertificate + /// public static CustomHttpsAvailabilityState IssuingCertificate { get; } = new CustomHttpsAvailabilityState(IssuingCertificateValue); - /// DeployingCertificate. + /// + /// DeployingCertificate + /// Serialized Name: CustomHttpsProvisioningSubstate.DeployingCertificate + /// public static CustomHttpsAvailabilityState DeployingCertificate { get; } = new CustomHttpsAvailabilityState(DeployingCertificateValue); - /// CertificateDeployed. + /// + /// CertificateDeployed + /// Serialized Name: CustomHttpsProvisioningSubstate.CertificateDeployed + /// public static CustomHttpsAvailabilityState CertificateDeployed { get; } = new CustomHttpsAvailabilityState(CertificateDeployedValue); - /// DeletingCertificate. + /// + /// DeletingCertificate + /// Serialized Name: CustomHttpsProvisioningSubstate.DeletingCertificate + /// public static CustomHttpsAvailabilityState DeletingCertificate { get; } = new CustomHttpsAvailabilityState(DeletingCertificateValue); - /// CertificateDeleted. + /// + /// CertificateDeleted + /// Serialized Name: CustomHttpsProvisioningSubstate.CertificateDeleted + /// public static CustomHttpsAvailabilityState CertificateDeleted { get; } = new CustomHttpsAvailabilityState(CertificateDeletedValue); /// Determines if two values are the same. public static bool operator ==(CustomHttpsAvailabilityState left, CustomHttpsAvailabilityState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsProvisioningState.cs index 8ee8878cc44b..1957802f3e9f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomHttpsProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status of the custom domain. + /// + /// Provisioning status of the custom domain. + /// Serialized Name: CustomHttpsProvisioningState + /// public readonly partial struct CustomHttpsProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public CustomHttpsProvisioningState(string value) private const string DisabledValue = "Disabled"; private const string FailedValue = "Failed"; - /// Enabling. + /// + /// Enabling + /// Serialized Name: CustomHttpsProvisioningState.Enabling + /// public static CustomHttpsProvisioningState Enabling { get; } = new CustomHttpsProvisioningState(EnablingValue); - /// Enabled. + /// + /// Enabled + /// Serialized Name: CustomHttpsProvisioningState.Enabled + /// public static CustomHttpsProvisioningState Enabled { get; } = new CustomHttpsProvisioningState(EnabledValue); - /// Disabling. + /// + /// Disabling + /// Serialized Name: CustomHttpsProvisioningState.Disabling + /// public static CustomHttpsProvisioningState Disabling { get; } = new CustomHttpsProvisioningState(DisablingValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: CustomHttpsProvisioningState.Disabled + /// public static CustomHttpsProvisioningState Disabled { get; } = new CustomHttpsProvisioningState(DisabledValue); - /// Failed. + /// + /// Failed + /// Serialized Name: CustomHttpsProvisioningState.Failed + /// public static CustomHttpsProvisioningState Failed { get; } = new CustomHttpsProvisioningState(FailedValue); /// Determines if two values are the same. public static bool operator ==(CustomHttpsProvisioningState left, CustomHttpsProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRule.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRule.cs index 5945fdea14a9..64045bfd2cd5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRule.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRule.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the common attributes for a custom rule that can be included in a waf policy. + /// + /// Defines the common attributes for a custom rule that can be included in a waf policy + /// Serialized Name: CustomRule + /// public partial class CustomRule { /// @@ -47,10 +50,22 @@ public partial class CustomRule private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Defines the name of the custom rule. - /// Defines in what order this rule be evaluated in the overall list of custom rules. - /// List of match conditions. - /// Describes what action to be applied when rule matches. + /// + /// Defines the name of the custom rule + /// Serialized Name: CustomRule.name + /// + /// + /// Defines in what order this rule be evaluated in the overall list of custom rules + /// Serialized Name: CustomRule.priority + /// + /// + /// List of match conditions. + /// Serialized Name: CustomRule.matchConditions + /// + /// + /// Describes what action to be applied when rule matches + /// Serialized Name: CustomRule.action + /// /// or is null. public CustomRule(string name, int priority, IEnumerable matchConditions, OverrideActionType action) { @@ -64,11 +79,26 @@ public CustomRule(string name, int priority, IEnumerable Initializes a new instance of . - /// Defines the name of the custom rule. - /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - /// Defines in what order this rule be evaluated in the overall list of custom rules. - /// List of match conditions. - /// Describes what action to be applied when rule matches. + /// + /// Defines the name of the custom rule + /// Serialized Name: CustomRule.name + /// + /// + /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// Serialized Name: CustomRule.enabledState + /// + /// + /// Defines in what order this rule be evaluated in the overall list of custom rules + /// Serialized Name: CustomRule.priority + /// + /// + /// List of match conditions. + /// Serialized Name: CustomRule.matchConditions + /// + /// + /// Describes what action to be applied when rule matches + /// Serialized Name: CustomRule.action + /// /// Keeps track of any properties unknown to the library. internal CustomRule(string name, CustomRuleEnabledState? enabledState, int priority, IList matchConditions, OverrideActionType action, IDictionary serializedAdditionalRawData) { @@ -85,15 +115,30 @@ internal CustomRule() { } - /// Defines the name of the custom rule. + /// + /// Defines the name of the custom rule + /// Serialized Name: CustomRule.name + /// public string Name { get; set; } - /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// + /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// Serialized Name: CustomRule.enabledState + /// public CustomRuleEnabledState? EnabledState { get; set; } - /// Defines in what order this rule be evaluated in the overall list of custom rules. + /// + /// Defines in what order this rule be evaluated in the overall list of custom rules + /// Serialized Name: CustomRule.priority + /// public int Priority { get; set; } - /// List of match conditions. + /// + /// List of match conditions. + /// Serialized Name: CustomRule.matchConditions + /// public IList MatchConditions { get; } - /// Describes what action to be applied when rule matches. + /// + /// Describes what action to be applied when rule matches + /// Serialized Name: CustomRule.action + /// public OverrideActionType Action { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleEnabledState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleEnabledState.cs index b906a85f42f3..ceef0469eb2f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleEnabledState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleEnabledState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// + /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// Serialized Name: CustomRuleEnabledState + /// public readonly partial struct CustomRuleEnabledState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public CustomRuleEnabledState(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; - /// Disabled. + /// + /// Disabled + /// Serialized Name: CustomRuleEnabledState.Disabled + /// public static CustomRuleEnabledState Disabled { get; } = new CustomRuleEnabledState(DisabledValue); - /// Enabled. + /// + /// Enabled + /// Serialized Name: CustomRuleEnabledState.Enabled + /// public static CustomRuleEnabledState Enabled { get; } = new CustomRuleEnabledState(EnabledValue); /// Determines if two values are the same. public static bool operator ==(CustomRuleEnabledState left, CustomRuleEnabledState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleList.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleList.cs index 44326d9b9fc0..0064dfd36cc7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleList.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines contents of custom rules. + /// + /// Defines contents of custom rules + /// Serialized Name: CustomRuleList + /// internal partial class CustomRuleList { /// @@ -52,7 +55,10 @@ public CustomRuleList() } /// Initializes a new instance of . - /// List of rules. + /// + /// List of rules + /// Serialized Name: CustomRuleList.rules + /// /// Keeps track of any properties unknown to the library. internal CustomRuleList(IList rules, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal CustomRuleList(IList rules, IDictionary _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of rules. + /// + /// List of rules + /// Serialized Name: CustomRuleList.rules + /// public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleMatchCondition.cs index 503ad219f3d4..4e39a483b6b7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomRuleMatchCondition.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Define match conditions. + /// + /// Define match conditions + /// Serialized Name: MatchCondition + /// public partial class CustomRuleMatchCondition { /// @@ -47,9 +50,18 @@ public partial class CustomRuleMatchCondition private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Match variable to compare against. - /// Describes operator to be matched. - /// List of possible match values. + /// + /// Match variable to compare against. + /// Serialized Name: MatchCondition.matchVariable + /// + /// + /// Describes operator to be matched + /// Serialized Name: MatchCondition.operator + /// + /// + /// List of possible match values. + /// Serialized Name: MatchCondition.matchValue + /// /// is null. public CustomRuleMatchCondition(WafMatchVariable matchVariable, MatchOperator matchOperator, IEnumerable matchValue) { @@ -62,12 +74,30 @@ public CustomRuleMatchCondition(WafMatchVariable matchVariable, MatchOperator ma } /// Initializes a new instance of . - /// Match variable to compare against. - /// Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. - /// Describes operator to be matched. - /// Describes if the result of this condition should be negated. - /// List of possible match values. - /// List of transforms. + /// + /// Match variable to compare against. + /// Serialized Name: MatchCondition.matchVariable + /// + /// + /// Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + /// Serialized Name: MatchCondition.selector + /// + /// + /// Describes operator to be matched + /// Serialized Name: MatchCondition.operator + /// + /// + /// Describes if the result of this condition should be negated. + /// Serialized Name: MatchCondition.negateCondition + /// + /// + /// List of possible match values. + /// Serialized Name: MatchCondition.matchValue + /// + /// + /// List of transforms. + /// Serialized Name: MatchCondition.transforms + /// /// Keeps track of any properties unknown to the library. internal CustomRuleMatchCondition(WafMatchVariable matchVariable, string selector, MatchOperator matchOperator, bool? negateCondition, IList matchValue, IList transforms, IDictionary serializedAdditionalRawData) { @@ -85,17 +115,35 @@ internal CustomRuleMatchCondition() { } - /// Match variable to compare against. + /// + /// Match variable to compare against. + /// Serialized Name: MatchCondition.matchVariable + /// public WafMatchVariable MatchVariable { get; set; } - /// Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + /// + /// Selector can used to match a specific key for QueryString, Cookies, RequestHeader or PostArgs. + /// Serialized Name: MatchCondition.selector + /// public string Selector { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: MatchCondition.operator + /// public MatchOperator MatchOperator { get; set; } - /// Describes if the result of this condition should be negated. + /// + /// Describes if the result of this condition should be negated. + /// Serialized Name: MatchCondition.negateCondition + /// public bool? NegateCondition { get; set; } - /// List of possible match values. + /// + /// List of possible match values. + /// Serialized Name: MatchCondition.matchValue + /// public IList MatchValue { get; } - /// List of transforms. + /// + /// List of transforms. + /// Serialized Name: MatchCondition.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomerCertificateProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomerCertificateProperties.cs index 5028b4c43ead..18d92e6c4efe 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomerCertificateProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/CustomerCertificateProperties.cs @@ -12,11 +12,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Customer Certificate used for https. + /// + /// Customer Certificate used for https + /// Serialized Name: CustomerCertificateParameters + /// public partial class CustomerCertificateProperties : FrontDoorSecretProperties { /// Initializes a new instance of . - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: CustomerCertificateParameters.secretSource + /// /// is null. public CustomerCertificateProperties(WritableSubResource secretSource) { @@ -28,16 +34,43 @@ public CustomerCertificateProperties(WritableSubResource secretSource) } /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Version of the secret to be used. - /// Whether to use the latest version for the certificate. - /// Subject name in the certificate. - /// Certificate expiration date. - /// Certificate issuing authority. - /// The list of SANs. - /// Certificate thumbprint. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: CustomerCertificateParameters.secretSource + /// + /// + /// Version of the secret to be used + /// Serialized Name: CustomerCertificateParameters.secretVersion + /// + /// + /// Whether to use the latest version for the certificate + /// Serialized Name: CustomerCertificateParameters.useLatestVersion + /// + /// + /// Subject name in the certificate. + /// Serialized Name: CustomerCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: CustomerCertificateParameters.expirationDate + /// + /// + /// Certificate issuing authority. + /// Serialized Name: CustomerCertificateParameters.certificateAuthority + /// + /// + /// The list of SANs. + /// Serialized Name: CustomerCertificateParameters.subjectAlternativeNames + /// + /// + /// Certificate thumbprint. + /// Serialized Name: CustomerCertificateParameters.thumbprint + /// internal CustomerCertificateProperties(SecretType secretType, IDictionary serializedAdditionalRawData, WritableSubResource secretSource, string secretVersion, bool? useLatestVersion, string subject, DateTimeOffset? expiresOn, string certificateAuthority, IList subjectAlternativeNames, string thumbprint) : base(secretType, serializedAdditionalRawData) { SecretSource = secretSource; @@ -56,7 +89,10 @@ internal CustomerCertificateProperties() { } - /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// Resource reference to the Azure Key Vault certificate. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{certificateName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: CustomerCertificateParameters.secretSource + /// internal WritableSubResource SecretSource { get; set; } /// Gets or sets Id. public ResourceIdentifier SecretSourceId @@ -70,19 +106,40 @@ public ResourceIdentifier SecretSourceId } } - /// Version of the secret to be used. + /// + /// Version of the secret to be used + /// Serialized Name: CustomerCertificateParameters.secretVersion + /// public string SecretVersion { get; set; } - /// Whether to use the latest version for the certificate. + /// + /// Whether to use the latest version for the certificate + /// Serialized Name: CustomerCertificateParameters.useLatestVersion + /// public bool? UseLatestVersion { get; set; } - /// Subject name in the certificate. + /// + /// Subject name in the certificate. + /// Serialized Name: CustomerCertificateParameters.subject + /// public string Subject { get; } - /// Certificate expiration date. + /// + /// Certificate expiration date. + /// Serialized Name: CustomerCertificateParameters.expirationDate + /// public DateTimeOffset? ExpiresOn { get; } - /// Certificate issuing authority. + /// + /// Certificate issuing authority. + /// Serialized Name: CustomerCertificateParameters.certificateAuthority + /// public string CertificateAuthority { get; } - /// The list of SANs. + /// + /// The list of SANs. + /// Serialized Name: CustomerCertificateParameters.subjectAlternativeNames + /// public IList SubjectAlternativeNames { get; } - /// Certificate thumbprint. + /// + /// Certificate thumbprint. + /// Serialized Name: CustomerCertificateParameters.thumbprint + /// public string Thumbprint { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs index 9e68d89c78bf..396249d89213 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedCustomDomain.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Custom domains created on the CDN endpoint. + /// + /// Custom domains created on the CDN endpoint. + /// Serialized Name: DeepCreatedCustomDomain + /// public partial class DeepCreatedCustomDomain { /// @@ -46,7 +49,10 @@ public partial class DeepCreatedCustomDomain private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Custom domain name. + /// + /// Custom domain name. + /// Serialized Name: DeepCreatedCustomDomain.name + /// /// is null. internal DeepCreatedCustomDomain(string name) { @@ -56,9 +62,18 @@ internal DeepCreatedCustomDomain(string name) } /// Initializes a new instance of . - /// Custom domain name. - /// The host name of the custom domain. Must be a domain name. - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// + /// Custom domain name. + /// Serialized Name: DeepCreatedCustomDomain.name + /// + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: DeepCreatedCustomDomain.properties.hostName + /// + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: DeepCreatedCustomDomain.properties.validationData + /// /// Keeps track of any properties unknown to the library. internal DeepCreatedCustomDomain(string name, string hostName, string validationData, IDictionary serializedAdditionalRawData) { @@ -73,11 +88,20 @@ internal DeepCreatedCustomDomain() { } - /// Custom domain name. + /// + /// Custom domain name. + /// Serialized Name: DeepCreatedCustomDomain.name + /// public string Name { get; } - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: DeepCreatedCustomDomain.properties.hostName + /// public string HostName { get; } - /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// + /// Special validation or data may be required when delivering CDN to some regions due to local compliance reasons. E.g. ICP license number of a custom domain is required to deliver content in China. + /// Serialized Name: DeepCreatedCustomDomain.properties.validationData + /// public string ValidationData { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOrigin.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOrigin.cs index 65d5820c615f..9423d5062807 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOrigin.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOrigin.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The main origin of CDN content which is added when creating a CDN endpoint. + /// + /// The main origin of CDN content which is added when creating a CDN endpoint. + /// Serialized Name: DeepCreatedOrigin + /// public partial class DeepCreatedOrigin { /// @@ -47,7 +50,10 @@ public partial class DeepCreatedOrigin private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Origin name which must be unique within the endpoint. + /// + /// Origin name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOrigin.name + /// /// is null. public DeepCreatedOrigin(string name) { @@ -57,19 +63,58 @@ public DeepCreatedOrigin(string name) } /// Initializes a new instance of . - /// Origin name which must be unique within the endpoint. - /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// Origin is enabled for load balancing or not. By default, origin is always enabled. - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. - /// A custom message to be included in the approval request to connect to the Private Link. - /// The approval status for the connection to the Private Link. + /// + /// Origin name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOrigin.name + /// + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + /// Serialized Name: DeepCreatedOrigin.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: DeepCreatedOrigin.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// Serialized Name: DeepCreatedOrigin.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: DeepCreatedOrigin.properties.weight + /// + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// Serialized Name: DeepCreatedOrigin.properties.enabled + /// + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkAlias + /// + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkResourceId + /// + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkLocation + /// + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkApprovalMessage + /// + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: DeepCreatedOrigin.properties.privateEndpointStatus + /// /// Keeps track of any properties unknown to the library. internal DeepCreatedOrigin(string name, string hostName, int? httpPort, int? httpsPort, string originHostHeader, int? priority, int? weight, bool? enabled, string privateLinkAlias, ResourceIdentifier privateLinkResourceId, string privateLinkLocation, string privateLinkApprovalMessage, PrivateEndpointStatus? privateEndpointStatus, IDictionary serializedAdditionalRawData) { @@ -94,31 +139,70 @@ internal DeepCreatedOrigin() { } - /// Origin name which must be unique within the endpoint. + /// + /// Origin name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOrigin.name + /// public string Name { get; set; } - /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + /// + /// The address of the origin. It can be a domain name, IPv4 address, or IPv6 address. This should be unique across all origins in an endpoint. + /// Serialized Name: DeepCreatedOrigin.properties.hostName + /// public string HostName { get; set; } - /// The value of the HTTP port. Must be between 1 and 65535. + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpPort + /// public int? HttpPort { get; set; } - /// The value of the HTTPS port. Must be between 1 and 65535. + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: DeepCreatedOrigin.properties.httpsPort + /// public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. + /// Serialized Name: DeepCreatedOrigin.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// Serialized Name: DeepCreatedOrigin.properties.priority + /// public int? Priority { get; set; } - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: DeepCreatedOrigin.properties.weight + /// public int? Weight { get; set; } - /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// + /// Origin is enabled for load balancing or not. By default, origin is always enabled. + /// Serialized Name: DeepCreatedOrigin.properties.enabled + /// public bool? Enabled { get; set; } - /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private'. + /// + /// The Alias of the Private Link resource. Populating this optional field indicates that this origin is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkAlias + /// public string PrivateLinkAlias { get; set; } - /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private'. + /// + /// The Resource Id of the Private Link resource. Populating this optional field indicates that this backend is 'Private' + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkResourceId + /// public ResourceIdentifier PrivateLinkResourceId { get; set; } - /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated. + /// + /// The location of the Private Link resource. Required only if 'privateLinkResourceId' is populated + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkLocation + /// public string PrivateLinkLocation { get; set; } - /// A custom message to be included in the approval request to connect to the Private Link. + /// + /// A custom message to be included in the approval request to connect to the Private Link. + /// Serialized Name: DeepCreatedOrigin.properties.privateLinkApprovalMessage + /// public string PrivateLinkApprovalMessage { get; set; } - /// The approval status for the connection to the Private Link. + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: DeepCreatedOrigin.properties.privateEndpointStatus + /// public PrivateEndpointStatus? PrivateEndpointStatus { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOriginGroup.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOriginGroup.cs index 3ff3fbdfc4ae..3a1030b6ae37 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOriginGroup.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeepCreatedOriginGroup.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the origin group based on origin health. + /// + /// The origin group for CDN content which is added when creating a CDN endpoint. Traffic is sent to the origins within the origin group based on origin health. + /// Serialized Name: DeepCreatedOriginGroup + /// public partial class DeepCreatedOriginGroup { /// @@ -47,7 +50,10 @@ public partial class DeepCreatedOriginGroup private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Origin group name which must be unique within the endpoint. + /// + /// Origin group name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOriginGroup.name + /// /// is null. public DeepCreatedOriginGroup(string name) { @@ -58,11 +64,26 @@ public DeepCreatedOriginGroup(string name) } /// Initializes a new instance of . - /// Origin group name which must be unique within the endpoint. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// The source of the content being delivered via CDN within given origin group. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + /// + /// Origin group name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOriginGroup.name + /// + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: DeepCreatedOriginGroup.properties.healthProbeSettings + /// + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: DeepCreatedOriginGroup.properties.origins + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: DeepCreatedOriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + /// Serialized Name: DeepCreatedOriginGroup.properties.responseBasedOriginErrorDetectionSettings + /// /// Keeps track of any properties unknown to the library. internal DeepCreatedOriginGroup(string name, HealthProbeSettings healthProbeSettings, IList origins, int? trafficRestorationTimeToHealedOrNewEndpointsInMinutes, ResponseBasedOriginErrorDetectionSettings responseBasedOriginErrorDetectionSettings, IDictionary serializedAdditionalRawData) { @@ -79,15 +100,30 @@ internal DeepCreatedOriginGroup() { } - /// Origin group name which must be unique within the endpoint. + /// + /// Origin group name which must be unique within the endpoint. + /// Serialized Name: DeepCreatedOriginGroup.name + /// public string Name { get; set; } - /// Health probe settings to the origin that is used to determine the health of the origin. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: DeepCreatedOriginGroup.properties.healthProbeSettings + /// public HealthProbeSettings HealthProbeSettings { get; set; } - /// The source of the content being delivered via CDN within given origin group. + /// + /// The source of the content being delivered via CDN within given origin group. + /// Serialized Name: DeepCreatedOriginGroup.properties.origins + /// public IList Origins { get; } - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: DeepCreatedOriginGroup.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// public int? TrafficRestorationTimeToHealedOrNewEndpointsInMinutes { get; set; } - /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses.This property is currently not supported. + /// Serialized Name: DeepCreatedOriginGroup.properties.responseBasedOriginErrorDetectionSettings + /// public ResponseBasedOriginErrorDetectionSettings ResponseBasedOriginErrorDetectionSettings { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRule.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRule.cs index d1068bcfe642..23b2303c9dd5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRule.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRule.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// A rule that specifies a set of actions and conditions. + /// + /// A rule that specifies a set of actions and conditions + /// Serialized Name: DeliveryRule + /// public partial class DeliveryRule { /// @@ -47,9 +50,13 @@ public partial class DeliveryRule private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: DeliveryRule.order + /// /// /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: DeliveryRule.actions /// 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 . /// @@ -64,15 +71,23 @@ public DeliveryRule(int order, IEnumerable actions) } /// Initializes a new instance of . - /// Name of the rule. - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// Name of the rule + /// Serialized Name: DeliveryRule.name + /// + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: DeliveryRule.order + /// /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: DeliveryRule.conditions /// 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 list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: DeliveryRule.actions /// 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 . /// @@ -91,18 +106,26 @@ internal DeliveryRule() { } - /// Name of the rule. + /// + /// Name of the rule + /// Serialized Name: DeliveryRule.name + /// public string Name { get; set; } - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: DeliveryRule.order + /// public int Order { get; set; } /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: DeliveryRule.conditions /// 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 IList Conditions { get; } /// /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: DeliveryRule.actions /// 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 . /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleAction.cs index 992c55098672..031a095bb931 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleAction.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// /// An action for the delivery rule. + /// Serialized Name: DeliveryRuleAction /// 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 . /// @@ -55,7 +56,10 @@ protected DeliveryRuleAction() } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. internal DeliveryRuleAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData) { @@ -63,7 +67,10 @@ internal DeliveryRuleAction(DeliveryRuleActionType name, IDictionary The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// internal DeliveryRuleActionType Name { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionParametersType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionParametersType.cs new file mode 100644 index 000000000000..15e146981b82 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionParametersType.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// The DeliveryRuleActionParametersType. + /// Serialized Name: DeliveryRuleActionParametersType + /// + internal readonly partial struct DeliveryRuleActionParametersType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeliveryRuleActionParametersType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeliveryRuleUriRedirectActionParametersValue = "DeliveryRuleUrlRedirectActionParameters"; + private const string DeliveryRuleUriSigningActionParametersValue = "DeliveryRuleUrlSigningActionParameters"; + private const string DeliveryRuleOriginGroupOverrideActionParametersValue = "DeliveryRuleOriginGroupOverrideActionParameters"; + private const string DeliveryRuleUriRewriteActionParametersValue = "DeliveryRuleUrlRewriteActionParameters"; + private const string DeliveryRuleHeaderActionParametersValue = "DeliveryRuleHeaderActionParameters"; + private const string DeliveryRuleCacheExpirationActionParametersValue = "DeliveryRuleCacheExpirationActionParameters"; + private const string DeliveryRuleCacheKeyQueryStringBehaviorActionParametersValue = "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters"; + private const string DeliveryRuleRouteConfigurationOverrideActionParametersValue = "DeliveryRuleRouteConfigurationOverrideActionParameters"; + + /// + /// DeliveryRuleUrlRedirectActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleUrlRedirectActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleUriRedirectActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleUriRedirectActionParametersValue); + /// + /// DeliveryRuleUrlSigningActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleUrlSigningActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleUriSigningActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleUriSigningActionParametersValue); + /// + /// DeliveryRuleOriginGroupOverrideActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleOriginGroupOverrideActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleOriginGroupOverrideActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleOriginGroupOverrideActionParametersValue); + /// + /// DeliveryRuleUrlRewriteActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleUrlRewriteActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleUriRewriteActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleUriRewriteActionParametersValue); + /// + /// DeliveryRuleHeaderActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleHeaderActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleHeaderActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleHeaderActionParametersValue); + /// + /// DeliveryRuleCacheExpirationActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleCacheExpirationActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleCacheExpirationActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleCacheExpirationActionParametersValue); + /// + /// DeliveryRuleCacheKeyQueryStringBehaviorActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleCacheKeyQueryStringBehaviorActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleCacheKeyQueryStringBehaviorActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleCacheKeyQueryStringBehaviorActionParametersValue); + /// + /// DeliveryRuleRouteConfigurationOverrideActionParameters + /// Serialized Name: DeliveryRuleActionParametersType.DeliveryRuleRouteConfigurationOverrideActionParameters + /// + public static DeliveryRuleActionParametersType DeliveryRuleRouteConfigurationOverrideActionParameters { get; } = new DeliveryRuleActionParametersType(DeliveryRuleRouteConfigurationOverrideActionParametersValue); + /// Determines if two values are the same. + public static bool operator ==(DeliveryRuleActionParametersType left, DeliveryRuleActionParametersType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeliveryRuleActionParametersType left, DeliveryRuleActionParametersType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DeliveryRuleActionParametersType(string value) => new DeliveryRuleActionParametersType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeliveryRuleActionParametersType other && Equals(other); + /// + public bool Equals(DeliveryRuleActionParametersType 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.Serialization.cs new file mode 100644 index 000000000000..53d25c4898ae --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.Serialization.cs @@ -0,0 +1,124 @@ +// 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.Cdn.Models +{ + [PersistableModelProxy(typeof(UnknownDeliveryRuleActionParameters))] + public partial class DeliveryRuleActionProperties : 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(DeliveryRuleActionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName.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 + } + } + } + + DeliveryRuleActionProperties 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(DeliveryRuleActionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeliveryRuleActionProperties(document.RootElement, options); + } + + internal static DeliveryRuleActionProperties DeserializeDeliveryRuleActionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("typeName", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "DeliveryRuleCacheExpirationActionParameters": return CacheExpirationActionProperties.DeserializeCacheExpirationActionProperties(element, options); + case "DeliveryRuleCacheKeyQueryStringBehaviorActionParameters": return CacheKeyQueryStringActionProperties.DeserializeCacheKeyQueryStringActionProperties(element, options); + case "DeliveryRuleHeaderActionParameters": return HeaderActionProperties.DeserializeHeaderActionProperties(element, options); + case "DeliveryRuleOriginGroupOverrideActionParameters": return OriginGroupOverrideActionProperties.DeserializeOriginGroupOverrideActionProperties(element, options); + case "DeliveryRuleRouteConfigurationOverrideActionParameters": return RouteConfigurationOverrideActionProperties.DeserializeRouteConfigurationOverrideActionProperties(element, options); + case "DeliveryRuleUrlRedirectActionParameters": return UriRedirectActionProperties.DeserializeUriRedirectActionProperties(element, options); + case "DeliveryRuleUrlRewriteActionParameters": return UriRewriteActionProperties.DeserializeUriRewriteActionProperties(element, options); + case "DeliveryRuleUrlSigningActionParameters": return UriSigningActionProperties.DeserializeUriSigningActionProperties(element, options); + } + } + return UnknownDeliveryRuleActionParameters.DeserializeUnknownDeliveryRuleActionParameters(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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(DeliveryRuleActionProperties)} does not support writing '{options.Format}' format."); + } + } + + DeliveryRuleActionProperties 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 DeserializeDeliveryRuleActionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeliveryRuleActionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.cs new file mode 100644 index 000000000000..b3ccda3aa5c4 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionProperties.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.Cdn.Models +{ + /// + /// Defines the parameters for delivery rule actions + /// Serialized Name: DeliveryRuleActionParameters + /// 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 abstract partial class DeliveryRuleActionProperties + { + /// + /// 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 DeliveryRuleActionProperties() + { + } + + /// Initializes a new instance of . + /// Serialized Name: DeliveryRuleActionParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal DeliveryRuleActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData) + { + TypeName = typeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Serialized Name: DeliveryRuleActionParameters.typeName. + internal DeliveryRuleActionParametersType TypeName { get; set; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionType.cs index b744d828dab8..8548212af84e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleActionType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleActionType + /// internal readonly partial struct DeliveryRuleActionType : IEquatable { private readonly string _value; @@ -32,23 +35,50 @@ public DeliveryRuleActionType(string value) private const string OriginGroupOverrideValue = "OriginGroupOverride"; private const string RouteConfigurationOverrideValue = "RouteConfigurationOverride"; - /// CacheExpiration. + /// + /// CacheExpiration + /// Serialized Name: DeliveryRuleActionType.CacheExpiration + /// public static DeliveryRuleActionType CacheExpiration { get; } = new DeliveryRuleActionType(CacheExpirationValue); - /// CacheKeyQueryString. + /// + /// CacheKeyQueryString + /// Serialized Name: DeliveryRuleActionType.CacheKeyQueryString + /// public static DeliveryRuleActionType CacheKeyQueryString { get; } = new DeliveryRuleActionType(CacheKeyQueryStringValue); - /// ModifyRequestHeader. + /// + /// ModifyRequestHeader + /// Serialized Name: DeliveryRuleActionType.ModifyRequestHeader + /// public static DeliveryRuleActionType ModifyRequestHeader { get; } = new DeliveryRuleActionType(ModifyRequestHeaderValue); - /// ModifyResponseHeader. + /// + /// ModifyResponseHeader + /// Serialized Name: DeliveryRuleActionType.ModifyResponseHeader + /// public static DeliveryRuleActionType ModifyResponseHeader { get; } = new DeliveryRuleActionType(ModifyResponseHeaderValue); - /// UrlRedirect. + /// + /// UrlRedirect + /// Serialized Name: DeliveryRuleActionType.UrlRedirect + /// public static DeliveryRuleActionType UriRedirect { get; } = new DeliveryRuleActionType(UriRedirectValue); - /// UrlRewrite. + /// + /// UrlRewrite + /// Serialized Name: DeliveryRuleActionType.UrlRewrite + /// public static DeliveryRuleActionType UriRewrite { get; } = new DeliveryRuleActionType(UriRewriteValue); - /// UrlSigning. + /// + /// UrlSigning + /// Serialized Name: DeliveryRuleActionType.UrlSigning + /// public static DeliveryRuleActionType UriSigning { get; } = new DeliveryRuleActionType(UriSigningValue); - /// OriginGroupOverride. + /// + /// OriginGroupOverride + /// Serialized Name: DeliveryRuleActionType.OriginGroupOverride + /// public static DeliveryRuleActionType OriginGroupOverride { get; } = new DeliveryRuleActionType(OriginGroupOverrideValue); - /// RouteConfigurationOverride. + /// + /// RouteConfigurationOverride + /// Serialized Name: DeliveryRuleActionType.RouteConfigurationOverride + /// public static DeliveryRuleActionType RouteConfigurationOverride { get; } = new DeliveryRuleActionType(RouteConfigurationOverrideValue); /// Determines if two values are the same. public static bool operator ==(DeliveryRuleActionType left, DeliveryRuleActionType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheExpirationAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheExpirationAction.cs index 8df40af7e344..f94cacacc379 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheExpirationAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheExpirationAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the cache expiration action for the delivery rule. + /// + /// Defines the cache expiration action for the delivery rule. + /// Serialized Name: DeliveryRuleCacheExpirationAction + /// public partial class DeliveryRuleCacheExpirationAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheExpirationAction.parameters + /// /// is null. public DeliveryRuleCacheExpirationAction(CacheExpirationActionProperties properties) { @@ -25,9 +31,15 @@ public DeliveryRuleCacheExpirationAction(CacheExpirationActionProperties propert } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheExpirationAction.parameters + /// internal DeliveryRuleCacheExpirationAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, CacheExpirationActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleCacheExpirationAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheExpirationAction.parameters + /// public CacheExpirationActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheKeyQueryStringAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheKeyQueryStringAction.cs index 8f09283eebd3..300034427bb7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheKeyQueryStringAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCacheKeyQueryStringAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the cache-key query string action for the delivery rule. + /// + /// Defines the cache-key query string action for the delivery rule. + /// Serialized Name: DeliveryRuleCacheKeyQueryStringAction + /// public partial class DeliveryRuleCacheKeyQueryStringAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheKeyQueryStringAction.parameters + /// /// is null. public DeliveryRuleCacheKeyQueryStringAction(CacheKeyQueryStringActionProperties properties) { @@ -25,9 +31,15 @@ public DeliveryRuleCacheKeyQueryStringAction(CacheKeyQueryStringActionProperties } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheKeyQueryStringAction.parameters + /// internal DeliveryRuleCacheKeyQueryStringAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, CacheKeyQueryStringActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleCacheKeyQueryStringAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleCacheKeyQueryStringAction.parameters + /// public CacheKeyQueryStringActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleClientPortCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleClientPortCondition.cs index bc0578d87966..bf139e4a6674 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleClientPortCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleClientPortCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the ClientPort condition for the delivery rule. + /// + /// Defines the ClientPort condition for the delivery rule. + /// Serialized Name: DeliveryRuleClientPortCondition + /// public partial class DeliveryRuleClientPortCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleClientPortCondition.parameters + /// /// is null. public DeliveryRuleClientPortCondition(ClientPortMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleClientPortCondition(ClientPortMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleClientPortCondition.parameters + /// internal DeliveryRuleClientPortCondition(MatchVariable name, IDictionary serializedAdditionalRawData, ClientPortMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleClientPortCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleClientPortCondition.parameters + /// public ClientPortMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCondition.cs index 75db2d016557..8c340b8a6de0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCondition.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// /// A condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition /// 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 . /// @@ -55,7 +56,10 @@ protected DeliveryRuleCondition() } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. internal DeliveryRuleCondition(MatchVariable name, IDictionary serializedAdditionalRawData) { @@ -63,7 +67,10 @@ internal DeliveryRuleCondition(MatchVariable name, IDictionary The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// internal MatchVariable Name { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionParametersType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionParametersType.cs new file mode 100644 index 000000000000..1b5cd9f9705b --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionParametersType.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// The DeliveryRuleConditionParametersType. + /// Serialized Name: DeliveryRuleConditionParametersType + /// + internal readonly partial struct DeliveryRuleConditionParametersType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DeliveryRuleConditionParametersType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeliveryRuleRemoteAddressConditionParametersValue = "DeliveryRuleRemoteAddressConditionParameters"; + private const string DeliveryRuleRequestMethodConditionParametersValue = "DeliveryRuleRequestMethodConditionParameters"; + private const string DeliveryRuleQueryStringConditionParametersValue = "DeliveryRuleQueryStringConditionParameters"; + private const string DeliveryRulePostArgsConditionParametersValue = "DeliveryRulePostArgsConditionParameters"; + private const string DeliveryRuleRequestUriConditionParametersValue = "DeliveryRuleRequestUriConditionParameters"; + private const string DeliveryRuleRequestHeaderConditionParametersValue = "DeliveryRuleRequestHeaderConditionParameters"; + private const string DeliveryRuleRequestBodyConditionParametersValue = "DeliveryRuleRequestBodyConditionParameters"; + private const string DeliveryRuleRequestSchemeConditionParametersValue = "DeliveryRuleRequestSchemeConditionParameters"; + private const string DeliveryRuleUriPathMatchConditionParametersValue = "DeliveryRuleUrlPathMatchConditionParameters"; + private const string DeliveryRuleUriFileExtensionMatchConditionParametersValue = "DeliveryRuleUrlFileExtensionMatchConditionParameters"; + private const string DeliveryRuleUriFilenameConditionParametersValue = "DeliveryRuleUrlFilenameConditionParameters"; + private const string DeliveryRuleHttpVersionConditionParametersValue = "DeliveryRuleHttpVersionConditionParameters"; + private const string DeliveryRuleCookiesConditionParametersValue = "DeliveryRuleCookiesConditionParameters"; + private const string DeliveryRuleIsDeviceConditionParametersValue = "DeliveryRuleIsDeviceConditionParameters"; + private const string DeliveryRuleSocketAddrConditionParametersValue = "DeliveryRuleSocketAddrConditionParameters"; + private const string DeliveryRuleClientPortConditionParametersValue = "DeliveryRuleClientPortConditionParameters"; + private const string DeliveryRuleServerPortConditionParametersValue = "DeliveryRuleServerPortConditionParameters"; + private const string DeliveryRuleHostNameConditionParametersValue = "DeliveryRuleHostNameConditionParameters"; + private const string DeliveryRuleSslProtocolConditionParametersValue = "DeliveryRuleSslProtocolConditionParameters"; + + /// + /// DeliveryRuleRemoteAddressConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRemoteAddressConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRemoteAddressConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRemoteAddressConditionParametersValue); + /// + /// DeliveryRuleRequestMethodConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRequestMethodConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRequestMethodConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRequestMethodConditionParametersValue); + /// + /// DeliveryRuleQueryStringConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleQueryStringConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleQueryStringConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleQueryStringConditionParametersValue); + /// + /// DeliveryRulePostArgsConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRulePostArgsConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRulePostArgsConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRulePostArgsConditionParametersValue); + /// + /// DeliveryRuleRequestUriConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRequestUriConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRequestUriConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRequestUriConditionParametersValue); + /// + /// DeliveryRuleRequestHeaderConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRequestHeaderConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRequestHeaderConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRequestHeaderConditionParametersValue); + /// + /// DeliveryRuleRequestBodyConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRequestBodyConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRequestBodyConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRequestBodyConditionParametersValue); + /// + /// DeliveryRuleRequestSchemeConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleRequestSchemeConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleRequestSchemeConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleRequestSchemeConditionParametersValue); + /// + /// DeliveryRuleUrlPathMatchConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleUrlPathMatchConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleUriPathMatchConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleUriPathMatchConditionParametersValue); + /// + /// DeliveryRuleUrlFileExtensionMatchConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleUrlFileExtensionMatchConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleUriFileExtensionMatchConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleUriFileExtensionMatchConditionParametersValue); + /// + /// DeliveryRuleUrlFilenameConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleUrlFilenameConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleUriFilenameConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleUriFilenameConditionParametersValue); + /// + /// DeliveryRuleHttpVersionConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleHttpVersionConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleHttpVersionConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleHttpVersionConditionParametersValue); + /// + /// DeliveryRuleCookiesConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleCookiesConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleCookiesConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleCookiesConditionParametersValue); + /// + /// DeliveryRuleIsDeviceConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleIsDeviceConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleIsDeviceConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleIsDeviceConditionParametersValue); + /// + /// DeliveryRuleSocketAddrConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleSocketAddrConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleSocketAddrConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleSocketAddrConditionParametersValue); + /// + /// DeliveryRuleClientPortConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleClientPortConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleClientPortConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleClientPortConditionParametersValue); + /// + /// DeliveryRuleServerPortConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleServerPortConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleServerPortConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleServerPortConditionParametersValue); + /// + /// DeliveryRuleHostNameConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleHostNameConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleHostNameConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleHostNameConditionParametersValue); + /// + /// DeliveryRuleSslProtocolConditionParameters + /// Serialized Name: DeliveryRuleConditionParametersType.DeliveryRuleSslProtocolConditionParameters + /// + public static DeliveryRuleConditionParametersType DeliveryRuleSslProtocolConditionParameters { get; } = new DeliveryRuleConditionParametersType(DeliveryRuleSslProtocolConditionParametersValue); + /// Determines if two values are the same. + public static bool operator ==(DeliveryRuleConditionParametersType left, DeliveryRuleConditionParametersType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DeliveryRuleConditionParametersType left, DeliveryRuleConditionParametersType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DeliveryRuleConditionParametersType(string value) => new DeliveryRuleConditionParametersType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DeliveryRuleConditionParametersType other && Equals(other); + /// + public bool Equals(DeliveryRuleConditionParametersType 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/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.Serialization.cs new file mode 100644 index 000000000000..8c9341c14b3b --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.Serialization.cs @@ -0,0 +1,135 @@ +// 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.Cdn.Models +{ + [PersistableModelProxy(typeof(UnknownDeliveryRuleConditionParameters))] + public partial class DeliveryRuleConditionProperties : 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(DeliveryRuleConditionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("typeName"u8); + writer.WriteStringValue(TypeName.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 + } + } + } + + DeliveryRuleConditionProperties 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(DeliveryRuleConditionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeliveryRuleConditionProperties(document.RootElement, options); + } + + internal static DeliveryRuleConditionProperties DeserializeDeliveryRuleConditionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("typeName", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "DeliveryRuleClientPortConditionParameters": return ClientPortMatchCondition.DeserializeClientPortMatchCondition(element, options); + case "DeliveryRuleCookiesConditionParameters": return CookiesMatchCondition.DeserializeCookiesMatchCondition(element, options); + case "DeliveryRuleHostNameConditionParameters": return HostNameMatchCondition.DeserializeHostNameMatchCondition(element, options); + case "DeliveryRuleHttpVersionConditionParameters": return HttpVersionMatchCondition.DeserializeHttpVersionMatchCondition(element, options); + case "DeliveryRuleIsDeviceConditionParameters": return IsDeviceMatchCondition.DeserializeIsDeviceMatchCondition(element, options); + case "DeliveryRulePostArgsConditionParameters": return PostArgsMatchCondition.DeserializePostArgsMatchCondition(element, options); + case "DeliveryRuleQueryStringConditionParameters": return QueryStringMatchCondition.DeserializeQueryStringMatchCondition(element, options); + case "DeliveryRuleRemoteAddressConditionParameters": return RemoteAddressMatchCondition.DeserializeRemoteAddressMatchCondition(element, options); + case "DeliveryRuleRequestBodyConditionParameters": return RequestBodyMatchCondition.DeserializeRequestBodyMatchCondition(element, options); + case "DeliveryRuleRequestHeaderConditionParameters": return RequestHeaderMatchCondition.DeserializeRequestHeaderMatchCondition(element, options); + case "DeliveryRuleRequestMethodConditionParameters": return RequestMethodMatchCondition.DeserializeRequestMethodMatchCondition(element, options); + case "DeliveryRuleRequestSchemeConditionParameters": return RequestSchemeMatchCondition.DeserializeRequestSchemeMatchCondition(element, options); + case "DeliveryRuleRequestUriConditionParameters": return RequestUriMatchCondition.DeserializeRequestUriMatchCondition(element, options); + case "DeliveryRuleServerPortConditionParameters": return ServerPortMatchCondition.DeserializeServerPortMatchCondition(element, options); + case "DeliveryRuleSocketAddrConditionParameters": return SocketAddressMatchCondition.DeserializeSocketAddressMatchCondition(element, options); + case "DeliveryRuleSslProtocolConditionParameters": return DeliveryRuleSslProtocolMatchCondition.DeserializeDeliveryRuleSslProtocolMatchCondition(element, options); + case "DeliveryRuleUrlFileExtensionMatchConditionParameters": return UriFileExtensionMatchCondition.DeserializeUriFileExtensionMatchCondition(element, options); + case "DeliveryRuleUrlFilenameConditionParameters": return UriFileNameMatchCondition.DeserializeUriFileNameMatchCondition(element, options); + case "DeliveryRuleUrlPathMatchConditionParameters": return UriPathMatchCondition.DeserializeUriPathMatchCondition(element, options); + } + } + return UnknownDeliveryRuleConditionParameters.DeserializeUnknownDeliveryRuleConditionParameters(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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(DeliveryRuleConditionProperties)} does not support writing '{options.Format}' format."); + } + } + + DeliveryRuleConditionProperties 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 DeserializeDeliveryRuleConditionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeliveryRuleConditionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.cs new file mode 100644 index 000000000000..8ddec14e38ce --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleConditionProperties.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.Cdn.Models +{ + /// + /// Defines the parameters for delivery rule match conditions + /// Serialized Name: DeliveryRuleConditionParameters + /// 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 abstract partial class DeliveryRuleConditionProperties + { + /// + /// 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 DeliveryRuleConditionProperties() + { + } + + /// Initializes a new instance of . + /// Serialized Name: DeliveryRuleConditionParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal DeliveryRuleConditionProperties(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData) + { + TypeName = typeName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Serialized Name: DeliveryRuleConditionParameters.typeName. + internal DeliveryRuleConditionParametersType TypeName { get; set; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCookiesCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCookiesCondition.cs index bbdcff5e92d2..3e584e404c58 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCookiesCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleCookiesCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the Cookies condition for the delivery rule. + /// + /// Defines the Cookies condition for the delivery rule. + /// Serialized Name: DeliveryRuleCookiesCondition + /// public partial class DeliveryRuleCookiesCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleCookiesCondition.parameters + /// /// is null. public DeliveryRuleCookiesCondition(CookiesMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleCookiesCondition(CookiesMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleCookiesCondition.parameters + /// internal DeliveryRuleCookiesCondition(MatchVariable name, IDictionary serializedAdditionalRawData, CookiesMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleCookiesCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleCookiesCondition.parameters + /// public CookiesMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHostNameCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHostNameCondition.cs index 2fb7d3a3c652..5bb16302b521 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHostNameCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHostNameCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the HostName condition for the delivery rule. + /// + /// Defines the HostName condition for the delivery rule. + /// Serialized Name: DeliveryRuleHostNameCondition + /// public partial class DeliveryRuleHostNameCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHostNameCondition.parameters + /// /// is null. public DeliveryRuleHostNameCondition(HostNameMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleHostNameCondition(HostNameMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHostNameCondition.parameters + /// internal DeliveryRuleHostNameCondition(MatchVariable name, IDictionary serializedAdditionalRawData, HostNameMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleHostNameCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHostNameCondition.parameters + /// public HostNameMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHttpVersionCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHttpVersionCondition.cs index 7ff01c168b6f..e1dd499cedae 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHttpVersionCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleHttpVersionCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the HttpVersion condition for the delivery rule. + /// + /// Defines the HttpVersion condition for the delivery rule. + /// Serialized Name: DeliveryRuleHttpVersionCondition + /// public partial class DeliveryRuleHttpVersionCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHttpVersionCondition.parameters + /// /// is null. public DeliveryRuleHttpVersionCondition(HttpVersionMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleHttpVersionCondition(HttpVersionMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHttpVersionCondition.parameters + /// internal DeliveryRuleHttpVersionCondition(MatchVariable name, IDictionary serializedAdditionalRawData, HttpVersionMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleHttpVersionCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleHttpVersionCondition.parameters + /// public HttpVersionMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleIsDeviceCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleIsDeviceCondition.cs index 8b635400f54e..31a0a76f1834 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleIsDeviceCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleIsDeviceCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the IsDevice condition for the delivery rule. + /// + /// Defines the IsDevice condition for the delivery rule. + /// Serialized Name: DeliveryRuleIsDeviceCondition + /// public partial class DeliveryRuleIsDeviceCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleIsDeviceCondition.parameters + /// /// is null. public DeliveryRuleIsDeviceCondition(IsDeviceMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleIsDeviceCondition(IsDeviceMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleIsDeviceCondition.parameters + /// internal DeliveryRuleIsDeviceCondition(MatchVariable name, IDictionary serializedAdditionalRawData, IsDeviceMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleIsDeviceCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleIsDeviceCondition.parameters + /// public IsDeviceMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRulePostArgsCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRulePostArgsCondition.cs index 84ba61101210..476a0c45b1dd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRulePostArgsCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRulePostArgsCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the PostArgs condition for the delivery rule. + /// + /// Defines the PostArgs condition for the delivery rule. + /// Serialized Name: DeliveryRulePostArgsCondition + /// public partial class DeliveryRulePostArgsCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRulePostArgsCondition.parameters + /// /// is null. public DeliveryRulePostArgsCondition(PostArgsMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRulePostArgsCondition(PostArgsMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRulePostArgsCondition.parameters + /// internal DeliveryRulePostArgsCondition(MatchVariable name, IDictionary serializedAdditionalRawData, PostArgsMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRulePostArgsCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRulePostArgsCondition.parameters + /// public PostArgsMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleQueryStringCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleQueryStringCondition.cs index dadf4bf72f38..8fe49f619b9b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleQueryStringCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleQueryStringCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the QueryString condition for the delivery rule. + /// + /// Defines the QueryString condition for the delivery rule. + /// Serialized Name: DeliveryRuleQueryStringCondition + /// public partial class DeliveryRuleQueryStringCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleQueryStringCondition.parameters + /// /// is null. public DeliveryRuleQueryStringCondition(QueryStringMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleQueryStringCondition(QueryStringMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleQueryStringCondition.parameters + /// internal DeliveryRuleQueryStringCondition(MatchVariable name, IDictionary serializedAdditionalRawData, QueryStringMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleQueryStringCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleQueryStringCondition.parameters + /// public QueryStringMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRemoteAddressCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRemoteAddressCondition.cs index d334e02952c3..41764d0fa0e5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRemoteAddressCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRemoteAddressCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RemoteAddress condition for the delivery rule. + /// + /// Defines the RemoteAddress condition for the delivery rule. + /// Serialized Name: DeliveryRuleRemoteAddressCondition + /// public partial class DeliveryRuleRemoteAddressCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRemoteAddressCondition.parameters + /// /// is null. public DeliveryRuleRemoteAddressCondition(RemoteAddressMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRemoteAddressCondition(RemoteAddressMatchCondition properties } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRemoteAddressCondition.parameters + /// internal DeliveryRuleRemoteAddressCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RemoteAddressMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRemoteAddressCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRemoteAddressCondition.parameters + /// public RemoteAddressMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestBodyCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestBodyCondition.cs index 1efd64a78062..6cac749f82be 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestBodyCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestBodyCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RequestBody condition for the delivery rule. + /// + /// Defines the RequestBody condition for the delivery rule. + /// Serialized Name: DeliveryRuleRequestBodyCondition + /// public partial class DeliveryRuleRequestBodyCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestBodyCondition.parameters + /// /// is null. public DeliveryRuleRequestBodyCondition(RequestBodyMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestBodyCondition(RequestBodyMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestBodyCondition.parameters + /// internal DeliveryRuleRequestBodyCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RequestBodyMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestBodyCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestBodyCondition.parameters + /// public RequestBodyMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderAction.cs index c317a44546ab..5281bcea3e2f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the request header action for the delivery rule. + /// + /// Defines the request header action for the delivery rule. + /// Serialized Name: DeliveryRuleRequestHeaderAction + /// public partial class DeliveryRuleRequestHeaderAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRequestHeaderAction.parameters + /// /// is null. public DeliveryRuleRequestHeaderAction(HeaderActionProperties properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestHeaderAction(HeaderActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRequestHeaderAction.parameters + /// internal DeliveryRuleRequestHeaderAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, HeaderActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestHeaderAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRequestHeaderAction.parameters + /// public HeaderActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderCondition.cs index d15223b41498..4fc3311ab54b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestHeaderCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RequestHeader condition for the delivery rule. + /// + /// Defines the RequestHeader condition for the delivery rule. + /// Serialized Name: DeliveryRuleRequestHeaderCondition + /// public partial class DeliveryRuleRequestHeaderCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestHeaderCondition.parameters + /// /// is null. public DeliveryRuleRequestHeaderCondition(RequestHeaderMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestHeaderCondition(RequestHeaderMatchCondition properties } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestHeaderCondition.parameters + /// internal DeliveryRuleRequestHeaderCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RequestHeaderMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestHeaderCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestHeaderCondition.parameters + /// public RequestHeaderMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestMethodCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestMethodCondition.cs index 7df46766ecb6..d38fcc40bb6d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestMethodCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestMethodCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RequestMethod condition for the delivery rule. + /// + /// Defines the RequestMethod condition for the delivery rule. + /// Serialized Name: DeliveryRuleRequestMethodCondition + /// public partial class DeliveryRuleRequestMethodCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestMethodCondition.parameters + /// /// is null. public DeliveryRuleRequestMethodCondition(RequestMethodMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestMethodCondition(RequestMethodMatchCondition properties } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestMethodCondition.parameters + /// internal DeliveryRuleRequestMethodCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RequestMethodMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestMethodCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestMethodCondition.parameters + /// public RequestMethodMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestSchemeCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestSchemeCondition.cs index b0cdb6d8e3b2..1a414fcd5859 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestSchemeCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestSchemeCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RequestScheme condition for the delivery rule. + /// + /// Defines the RequestScheme condition for the delivery rule. + /// Serialized Name: DeliveryRuleRequestSchemeCondition + /// public partial class DeliveryRuleRequestSchemeCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestSchemeCondition.parameters + /// /// is null. public DeliveryRuleRequestSchemeCondition(RequestSchemeMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestSchemeCondition(RequestSchemeMatchCondition properties } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestSchemeCondition.parameters + /// internal DeliveryRuleRequestSchemeCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RequestSchemeMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestSchemeCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestSchemeCondition.parameters + /// public RequestSchemeMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestUriCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestUriCondition.cs index 7aa553fae5a5..4b850b1e1179 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestUriCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRequestUriCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the RequestUri condition for the delivery rule. + /// + /// Defines the RequestUri condition for the delivery rule. + /// Serialized Name: DeliveryRuleRequestUriCondition + /// public partial class DeliveryRuleRequestUriCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestUriCondition.parameters + /// /// is null. public DeliveryRuleRequestUriCondition(RequestUriMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRequestUriCondition(RequestUriMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestUriCondition.parameters + /// internal DeliveryRuleRequestUriCondition(MatchVariable name, IDictionary serializedAdditionalRawData, RequestUriMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRequestUriCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleRequestUriCondition.parameters + /// public RequestUriMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleResponseHeaderAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleResponseHeaderAction.cs index bb2c9e326f68..017fff662489 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleResponseHeaderAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleResponseHeaderAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the response header action for the delivery rule. + /// + /// Defines the response header action for the delivery rule. + /// Serialized Name: DeliveryRuleResponseHeaderAction + /// public partial class DeliveryRuleResponseHeaderAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleResponseHeaderAction.parameters + /// /// is null. public DeliveryRuleResponseHeaderAction(HeaderActionProperties properties) { @@ -25,9 +31,15 @@ public DeliveryRuleResponseHeaderAction(HeaderActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleResponseHeaderAction.parameters + /// internal DeliveryRuleResponseHeaderAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, HeaderActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleResponseHeaderAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleResponseHeaderAction.parameters + /// public HeaderActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRouteConfigurationOverrideAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRouteConfigurationOverrideAction.cs index 155daedfc41a..6bb235445a47 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRouteConfigurationOverrideAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleRouteConfigurationOverrideAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + /// + /// Defines the route configuration override action for the delivery rule. Only applicable to Frontdoor Standard/Premium Profiles. + /// Serialized Name: DeliveryRuleRouteConfigurationOverrideAction + /// public partial class DeliveryRuleRouteConfigurationOverrideAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRouteConfigurationOverrideAction.parameters + /// /// is null. public DeliveryRuleRouteConfigurationOverrideAction(RouteConfigurationOverrideActionProperties properties) { @@ -25,9 +31,15 @@ public DeliveryRuleRouteConfigurationOverrideAction(RouteConfigurationOverrideAc } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRouteConfigurationOverrideAction.parameters + /// internal DeliveryRuleRouteConfigurationOverrideAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, RouteConfigurationOverrideActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleRouteConfigurationOverrideAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: DeliveryRuleRouteConfigurationOverrideAction.parameters + /// public RouteConfigurationOverrideActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleServerPortCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleServerPortCondition.cs index dbb8d8761cc7..2bebbef603aa 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleServerPortCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleServerPortCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the ServerPort condition for the delivery rule. + /// + /// Defines the ServerPort condition for the delivery rule. + /// Serialized Name: DeliveryRuleServerPortCondition + /// public partial class DeliveryRuleServerPortCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleServerPortCondition.parameters + /// /// is null. public DeliveryRuleServerPortCondition(ServerPortMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleServerPortCondition(ServerPortMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleServerPortCondition.parameters + /// internal DeliveryRuleServerPortCondition(MatchVariable name, IDictionary serializedAdditionalRawData, ServerPortMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleServerPortCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleServerPortCondition.parameters + /// public ServerPortMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSocketAddressCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSocketAddressCondition.cs index e1166e25459e..de03974ac4fd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSocketAddressCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSocketAddressCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the SocketAddress condition for the delivery rule. + /// + /// Defines the SocketAddress condition for the delivery rule. + /// Serialized Name: DeliveryRuleSocketAddrCondition + /// public partial class DeliveryRuleSocketAddressCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSocketAddrCondition.parameters + /// /// is null. public DeliveryRuleSocketAddressCondition(SocketAddressMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleSocketAddressCondition(SocketAddressMatchCondition properties } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSocketAddrCondition.parameters + /// internal DeliveryRuleSocketAddressCondition(MatchVariable name, IDictionary serializedAdditionalRawData, SocketAddressMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleSocketAddressCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSocketAddrCondition.parameters + /// public SocketAddressMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocol.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocol.cs index 01fe60e2aa36..c2593aa5f7a6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocol.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocol.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The protocol of an established TLS connection. + /// + /// The protocol of an established TLS connection. + /// Serialized Name: SslProtocol + /// public readonly partial struct DeliveryRuleSslProtocol : IEquatable { private readonly string _value; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolCondition.cs index 87efbcf6a3c0..0bbde44caa5c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the SslProtocol condition for the delivery rule. + /// + /// Defines the SslProtocol condition for the delivery rule. + /// Serialized Name: DeliveryRuleSslProtocolCondition + /// public partial class DeliveryRuleSslProtocolCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSslProtocolCondition.parameters + /// /// is null. public DeliveryRuleSslProtocolCondition(DeliveryRuleSslProtocolMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleSslProtocolCondition(DeliveryRuleSslProtocolMatchCondition pr } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSslProtocolCondition.parameters + /// internal DeliveryRuleSslProtocolCondition(MatchVariable name, IDictionary serializedAdditionalRawData, DeliveryRuleSslProtocolMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleSslProtocolCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleSslProtocolCondition.parameters + /// public DeliveryRuleSslProtocolMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.Serialization.cs index 60666210780c..06c99002d48f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writ /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(DeliveryRuleSslProtocolMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(SslProtocolMatchConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(SslProtocolOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } DeliveryRuleSslProtocolMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static DeliveryRuleSslProtocolMatchCondition DeserializeDeliveryRuleSsl { return null; } - SslProtocolMatchConditionType typeName = default; SslProtocolOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new SslProtocolMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new SslProtocolOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static DeliveryRuleSslProtocolMatchCondition DeserializeDeliveryRuleSsl transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static DeliveryRuleSslProtocolMatchCondition DeserializeDeliveryRuleSsl serializedAdditionalRawData = rawDataDictionary; return new DeliveryRuleSslProtocolMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.cs index 737af1104479..7de972d45aca 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleSslProtocolMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for SslProtocol match conditions. - public partial class DeliveryRuleSslProtocolMatchCondition + /// + /// Defines the parameters for SslProtocol match conditions + /// Serialized Name: SslProtocolMatchConditionParameters + /// + public partial class DeliveryRuleSslProtocolMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public DeliveryRuleSslProtocolMatchCondition(SslProtocolMatchConditionType sslProtocolMatchConditionType, SslProtocolOperator sslProtocolOperator) + /// + /// Describes operator to be matched + /// Serialized Name: SslProtocolMatchConditionParameters.operator + /// + public DeliveryRuleSslProtocolMatchCondition(SslProtocolOperator sslProtocolOperator) { - SslProtocolMatchConditionType = sslProtocolMatchConditionType; SslProtocolOperator = sslProtocolOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleSslProtocolConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal DeliveryRuleSslProtocolMatchCondition(SslProtocolMatchConditionType sslProtocolMatchConditionType, SslProtocolOperator sslProtocolOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: SslProtocolMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: SslProtocolMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: SslProtocolMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: SslProtocolMatchConditionParameters.transforms + /// + internal DeliveryRuleSslProtocolMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, SslProtocolOperator sslProtocolOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - SslProtocolMatchConditionType = sslProtocolMatchConditionType; SslProtocolOperator = sslProtocolOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal DeliveryRuleSslProtocolMatchCondition() { } - /// Gets or sets the ssl protocol match condition type. - public SslProtocolMatchConditionType SslProtocolMatchConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: SslProtocolMatchConditionParameters.operator + /// public SslProtocolOperator SslProtocolOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: SslProtocolMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: SslProtocolMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: SslProtocolMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileExtensionCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileExtensionCondition.cs index 7f623a649932..9c538daf387f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileExtensionCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileExtensionCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the UrlFileExtension condition for the delivery rule. + /// + /// Defines the UrlFileExtension condition for the delivery rule. + /// Serialized Name: DeliveryRuleUrlFileExtensionCondition + /// public partial class DeliveryRuleUriFileExtensionCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileExtensionCondition.parameters + /// /// is null. public DeliveryRuleUriFileExtensionCondition(UriFileExtensionMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleUriFileExtensionCondition(UriFileExtensionMatchCondition prop } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileExtensionCondition.parameters + /// internal DeliveryRuleUriFileExtensionCondition(MatchVariable name, IDictionary serializedAdditionalRawData, UriFileExtensionMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleUriFileExtensionCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileExtensionCondition.parameters + /// public UriFileExtensionMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileNameCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileNameCondition.cs index 5ac8ad118494..4688e1d6573b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileNameCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriFileNameCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the UrlFileName condition for the delivery rule. + /// + /// Defines the UrlFileName condition for the delivery rule. + /// Serialized Name: DeliveryRuleUrlFileNameCondition + /// public partial class DeliveryRuleUriFileNameCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileNameCondition.parameters + /// /// is null. public DeliveryRuleUriFileNameCondition(UriFileNameMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleUriFileNameCondition(UriFileNameMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileNameCondition.parameters + /// internal DeliveryRuleUriFileNameCondition(MatchVariable name, IDictionary serializedAdditionalRawData, UriFileNameMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleUriFileNameCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlFileNameCondition.parameters + /// public UriFileNameMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriPathCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriPathCondition.cs index ada2226c84c9..f631ebd7adea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriPathCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DeliveryRuleUriPathCondition.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the UrlPath condition for the delivery rule. + /// + /// Defines the UrlPath condition for the delivery rule. + /// Serialized Name: DeliveryRuleUrlPathCondition + /// public partial class DeliveryRuleUriPathCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlPathCondition.parameters + /// /// is null. public DeliveryRuleUriPathCondition(UriPathMatchCondition properties) { @@ -25,9 +31,15 @@ public DeliveryRuleUriPathCondition(UriPathMatchCondition properties) } /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlPathCondition.parameters + /// internal DeliveryRuleUriPathCondition(MatchVariable name, IDictionary serializedAdditionalRawData, UriPathMatchCondition properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal DeliveryRuleUriPathCondition() { } - /// Defines the parameters for the condition. + /// + /// Defines the parameters for the condition. + /// Serialized Name: DeliveryRuleUrlPathCondition.parameters + /// public UriPathMatchCondition Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DestinationProtocol.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DestinationProtocol.cs index 33120e89e95d..5ee3a948104a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DestinationProtocol.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DestinationProtocol.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Protocol to use for the redirect. The default value is MatchRequest. + /// + /// Protocol to use for the redirect. The default value is MatchRequest + /// Serialized Name: DestinationProtocol + /// public readonly partial struct DestinationProtocol : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public DestinationProtocol(string value) private const string HttpValue = "Http"; private const string HttpsValue = "Https"; - /// MatchRequest. + /// + /// MatchRequest + /// Serialized Name: DestinationProtocol.MatchRequest + /// public static DestinationProtocol MatchRequest { get; } = new DestinationProtocol(MatchRequestValue); - /// Http. + /// + /// Http + /// Serialized Name: DestinationProtocol.Http + /// public static DestinationProtocol Http { get; } = new DestinationProtocol(HttpValue); - /// Https. + /// + /// Https + /// Serialized Name: DestinationProtocol.Https + /// public static DestinationProtocol Https { get; } = new DestinationProtocol(HttpsValue); /// Determines if two values are the same. public static bool operator ==(DestinationProtocol left, DestinationProtocol right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainNameLabelScope.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainNameLabelScope.cs index 78a69c877988..af3ac7243520 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainNameLabelScope.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainNameLabelScope.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: AutoGeneratedDomainNameLabelScope + /// public readonly partial struct DomainNameLabelScope : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public DomainNameLabelScope(string value) private const string ResourceGroupReuseValue = "ResourceGroupReuse"; private const string NoReuseValue = "NoReuse"; - /// TenantReuse. + /// + /// TenantReuse + /// Serialized Name: AutoGeneratedDomainNameLabelScope.TenantReuse + /// public static DomainNameLabelScope TenantReuse { get; } = new DomainNameLabelScope(TenantReuseValue); - /// SubscriptionReuse. + /// + /// SubscriptionReuse + /// Serialized Name: AutoGeneratedDomainNameLabelScope.SubscriptionReuse + /// public static DomainNameLabelScope SubscriptionReuse { get; } = new DomainNameLabelScope(SubscriptionReuseValue); - /// ResourceGroupReuse. + /// + /// ResourceGroupReuse + /// Serialized Name: AutoGeneratedDomainNameLabelScope.ResourceGroupReuse + /// public static DomainNameLabelScope ResourceGroupReuse { get; } = new DomainNameLabelScope(ResourceGroupReuseValue); - /// NoReuse. + /// + /// NoReuse + /// Serialized Name: AutoGeneratedDomainNameLabelScope.NoReuse + /// public static DomainNameLabelScope NoReuse { get; } = new DomainNameLabelScope(NoReuseValue); /// Determines if two values are the same. public static bool operator ==(DomainNameLabelScope left, DomainNameLabelScope right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationProperties.cs index bab1daad9659..092efa62ca5c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationProperties.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object that contains the properties to validate a domain. + /// + /// The JSON object that contains the properties to validate a domain. + /// Serialized Name: DomainValidationProperties + /// public partial class DomainValidationProperties { /// @@ -51,8 +54,14 @@ internal DomainValidationProperties() } /// Initializes a new instance of . - /// Challenge used for DNS TXT record or file based validation. - /// The date time that the token expires. + /// + /// Challenge used for DNS TXT record or file based validation + /// Serialized Name: DomainValidationProperties.validationToken + /// + /// + /// The date time that the token expires + /// Serialized Name: DomainValidationProperties.expirationDate + /// /// Keeps track of any properties unknown to the library. internal DomainValidationProperties(string validationToken, DateTimeOffset? expiresOn, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal DomainValidationProperties(string validationToken, DateTimeOffset? expi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Challenge used for DNS TXT record or file based validation. + /// + /// Challenge used for DNS TXT record or file based validation + /// Serialized Name: DomainValidationProperties.validationToken + /// public string ValidationToken { get; } - /// The date time that the token expires. + /// + /// The date time that the token expires + /// Serialized Name: DomainValidationProperties.expirationDate + /// public DateTimeOffset? ExpiresOn { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationState.cs index 78ce1cae0caa..e8fa2091d37c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/DomainValidationState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// + /// Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by step. DCV stands for DomainControlValidation. + /// Serialized Name: DomainValidationState + /// public readonly partial struct DomainValidationState : IEquatable { private readonly string _value; @@ -32,23 +35,50 @@ public DomainValidationState(string value) private const string RefreshingValidationTokenValue = "RefreshingValidationToken"; private const string InternalErrorValue = "InternalError"; - /// Unknown. + /// + /// Unknown + /// Serialized Name: DomainValidationState.Unknown + /// public static DomainValidationState Unknown { get; } = new DomainValidationState(UnknownValue); - /// Submitting. + /// + /// Submitting + /// Serialized Name: DomainValidationState.Submitting + /// public static DomainValidationState Submitting { get; } = new DomainValidationState(SubmittingValue); - /// Pending. + /// + /// Pending + /// Serialized Name: DomainValidationState.Pending + /// public static DomainValidationState Pending { get; } = new DomainValidationState(PendingValue); - /// Rejected. + /// + /// Rejected + /// Serialized Name: DomainValidationState.Rejected + /// public static DomainValidationState Rejected { get; } = new DomainValidationState(RejectedValue); - /// TimedOut. + /// + /// TimedOut + /// Serialized Name: DomainValidationState.TimedOut + /// public static DomainValidationState TimedOut { get; } = new DomainValidationState(TimedOutValue); - /// PendingRevalidation. + /// + /// PendingRevalidation + /// Serialized Name: DomainValidationState.PendingRevalidation + /// public static DomainValidationState PendingRevalidation { get; } = new DomainValidationState(PendingRevalidationValue); - /// Approved. + /// + /// Approved + /// Serialized Name: DomainValidationState.Approved + /// public static DomainValidationState Approved { get; } = new DomainValidationState(ApprovedValue); - /// RefreshingValidationToken. + /// + /// RefreshingValidationToken + /// Serialized Name: DomainValidationState.RefreshingValidationToken + /// public static DomainValidationState RefreshingValidationToken { get; } = new DomainValidationState(RefreshingValidationTokenValue); - /// InternalError. + /// + /// InternalError + /// Serialized Name: DomainValidationState.InternalError + /// public static DomainValidationState InternalError { get; } = new DomainValidationState(InternalErrorValue); /// Determines if two values are the same. public static bool operator ==(DomainValidationState left, DomainValidationState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgeNode.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgeNode.cs index d0800b31da02..3f5834fe7b80 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgeNode.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgeNode.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + /// + /// Edgenode is a global Point of Presence (POP) location used to deliver CDN content to end users. + /// Serialized Name: EdgeNode + /// public partial class EdgeNode : ResourceData { /// @@ -58,7 +61,10 @@ public EdgeNode() /// The name. /// The resourceType. /// The systemData. - /// List of ip address groups. + /// + /// List of ip address groups. + /// Serialized Name: EdgeNode.properties.ipAddressGroups + /// /// Keeps track of any properties unknown to the library. internal EdgeNode(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList ipAddressGroups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -66,7 +72,10 @@ internal EdgeNode(ResourceIdentifier id, string name, ResourceType resourceType, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of ip address groups. + /// + /// List of ip address groups. + /// Serialized Name: EdgeNode.properties.ipAddressGroups + /// public IList IPAddressGroups { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgenodeResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgenodeResult.cs index 622ef2547951..bacd465c4db4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgenodeResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EdgenodeResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set of results. + /// + /// Result of the request to list CDN edgenodes. It contains a list of ip address group and a URL link to get the next set of results. + /// Serialized Name: EdgenodeResult + /// internal partial class EdgenodeResult { /// @@ -52,8 +55,14 @@ internal EdgenodeResult() } /// Initializes a new instance of . - /// Edge node of CDN service. - /// URL to get the next set of edgenode list results if there are any. + /// + /// Edge node of CDN service. + /// Serialized Name: EdgenodeResult.value + /// + /// + /// URL to get the next set of edgenode list results if there are any. + /// Serialized Name: EdgenodeResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal EdgenodeResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal EdgenodeResult(IReadOnlyList value, string nextLink, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Edge node of CDN service. + /// + /// Edge node of CDN service. + /// Serialized Name: EdgenodeResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of edgenode list results if there are any. + /// + /// URL to get the next set of edgenode list results if there are any. + /// Serialized Name: EdgenodeResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EnabledState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EnabledState.cs index 6a3f700891dc..1175fa9a3121 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EnabledState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EnabledState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: EnabledState + /// public readonly partial struct EnabledState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public EnabledState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: EnabledState.Enabled + /// public static EnabledState Enabled { get; } = new EnabledState(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: EnabledState.Disabled + /// public static EnabledState Disabled { get; } = new EnabledState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(EnabledState left, EnabledState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointDeliveryPolicy.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointDeliveryPolicy.cs index fd15152624f1..566a3db327f2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointDeliveryPolicy.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointDeliveryPolicy.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// A policy that specifies the delivery rules to be used for an endpoint. + /// + /// A policy that specifies the delivery rules to be used for an endpoint. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy + /// public partial class EndpointDeliveryPolicy { /// @@ -47,7 +50,10 @@ public partial class EndpointDeliveryPolicy private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// A list of the delivery rules. + /// + /// A list of the delivery rules. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy.rules + /// /// is null. public EndpointDeliveryPolicy(IEnumerable rules) { @@ -57,8 +63,14 @@ public EndpointDeliveryPolicy(IEnumerable rules) } /// Initializes a new instance of . - /// User-friendly description of the policy. - /// A list of the delivery rules. + /// + /// User-friendly description of the policy. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy.description + /// + /// + /// A list of the delivery rules. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy.rules + /// /// Keeps track of any properties unknown to the library. internal EndpointDeliveryPolicy(string description, IList rules, IDictionary serializedAdditionalRawData) { @@ -72,9 +84,15 @@ internal EndpointDeliveryPolicy() { } - /// User-friendly description of the policy. + /// + /// User-friendly description of the policy. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy.description + /// public string Description { get; set; } - /// A list of the delivery rules. + /// + /// A list of the delivery rules. + /// Serialized Name: EndpointPropertiesUpdateParametersDeliveryPolicy.rules + /// public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointListResult.cs index 3ff7c29ebe66..2dc65a8d4cbe 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + /// Serialized Name: EndpointListResult + /// internal partial class EndpointListResult { /// @@ -52,8 +55,14 @@ internal EndpointListResult() } /// Initializes a new instance of . - /// List of CDN endpoints within a profile. - /// URL to get the next set of endpoint objects if there is any. + /// + /// List of CDN endpoints within a profile + /// Serialized Name: EndpointListResult.value + /// + /// + /// URL to get the next set of endpoint objects if there is any. + /// Serialized Name: EndpointListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal EndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal EndpointListResult(IReadOnlyList value, string nextLin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of CDN endpoints within a profile. + /// + /// List of CDN endpoints within a profile + /// Serialized Name: EndpointListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of endpoint objects if there is any. + /// + /// URL to get the next set of endpoint objects if there is any. + /// Serialized Name: EndpointListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityContent.cs index 14043d05bbfa..b3e6aa89dc46 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of CheckNameAvailability API. + /// + /// Input of CheckNameAvailability API. + /// Serialized Name: CheckEndpointNameAvailabilityInput + /// public partial class EndpointNameAvailabilityContent { /// @@ -46,8 +49,14 @@ public partial class EndpointNameAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The resource name to validate. - /// The type of the resource whose name is to be validated. + /// + /// The resource name to validate. + /// Serialized Name: CheckEndpointNameAvailabilityInput.name + /// + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckEndpointNameAvailabilityInput.type + /// /// is null. public EndpointNameAvailabilityContent(string name, CdnResourceType resourceType) { @@ -58,9 +67,18 @@ public EndpointNameAvailabilityContent(string name, CdnResourceType resourceType } /// Initializes a new instance of . - /// The resource name to validate. - /// The type of the resource whose name is to be validated. - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// The resource name to validate. + /// Serialized Name: CheckEndpointNameAvailabilityInput.name + /// + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckEndpointNameAvailabilityInput.type + /// + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: CheckEndpointNameAvailabilityInput.autoGeneratedDomainNameLabelScope + /// /// Keeps track of any properties unknown to the library. internal EndpointNameAvailabilityContent(string name, CdnResourceType resourceType, DomainNameLabelScope? autoGeneratedDomainNameLabelScope, IDictionary serializedAdditionalRawData) { @@ -75,11 +93,20 @@ internal EndpointNameAvailabilityContent() { } - /// The resource name to validate. + /// + /// The resource name to validate. + /// Serialized Name: CheckEndpointNameAvailabilityInput.name + /// public string Name { get; } - /// The type of the resource whose name is to be validated. + /// + /// The type of the resource whose name is to be validated. + /// Serialized Name: CheckEndpointNameAvailabilityInput.type + /// public CdnResourceType ResourceType { get; } - /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// + /// Indicates the endpoint name reuse scope. The default value is TenantReuse. + /// Serialized Name: CheckEndpointNameAvailabilityInput.autoGeneratedDomainNameLabelScope + /// public DomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityResult.cs index e1fcdfda99d6..ecae378a8642 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointNameAvailabilityResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of check name availability API. + /// + /// Output of check name availability API. + /// Serialized Name: CheckEndpointNameAvailabilityOutput + /// public partial class EndpointNameAvailabilityResult { /// @@ -51,10 +54,22 @@ internal EndpointNameAvailabilityResult() } /// Initializes a new instance of . - /// Indicates whether the name is available. - /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string. - /// The reason why the name is not available. - /// The detailed error message describing why the name is not available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.nameAvailable + /// + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string + /// Serialized Name: CheckEndpointNameAvailabilityOutput.availableHostname + /// + /// + /// The reason why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.reason + /// + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.message + /// /// Keeps track of any properties unknown to the library. internal EndpointNameAvailabilityResult(bool? nameAvailable, string availableHostname, string reason, string message, IDictionary serializedAdditionalRawData) { @@ -65,13 +80,25 @@ internal EndpointNameAvailabilityResult(bool? nameAvailable, string availableHos _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Indicates whether the name is available. + /// + /// Indicates whether the name is available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.nameAvailable + /// public bool? NameAvailable { get; } - /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string. + /// + /// Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string + /// Serialized Name: CheckEndpointNameAvailabilityOutput.availableHostname + /// public string AvailableHostname { get; } - /// The reason why the name is not available. + /// + /// The reason why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.reason + /// public string Reason { get; } - /// The detailed error message describing why the name is not available. + /// + /// The detailed error message describing why the name is not available. + /// Serialized Name: CheckEndpointNameAvailabilityOutput.message + /// public string Message { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs index a879a8f702f0..4f1dc5057671 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the Web Application Firewall policy for the endpoint (if applicable). + /// + /// Defines the Web Application Firewall policy for the endpoint (if applicable) + /// Serialized Name: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink + /// internal partial class EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink { /// @@ -52,7 +55,10 @@ public EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink() } /// Initializes a new instance of . - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.id + /// /// Keeps track of any properties unknown to the library. internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(ResourceIdentifier id, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink(Reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: EndpointPropertiesUpdateParametersWebApplicationFirewallPolicyLink.id + /// public ResourceIdentifier Id { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointResourceState.cs index 5f7ac82f2a9b..f6457b84f3d4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/EndpointResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the endpoint. + /// + /// Resource status of the endpoint. + /// Serialized Name: EndpointResourceState + /// public readonly partial struct EndpointResourceState : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public EndpointResourceState(string value) private const string StoppedValue = "Stopped"; private const string StoppingValue = "Stopping"; - /// Creating. + /// + /// Creating + /// Serialized Name: EndpointResourceState.Creating + /// public static EndpointResourceState Creating { get; } = new EndpointResourceState(CreatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: EndpointResourceState.Deleting + /// public static EndpointResourceState Deleting { get; } = new EndpointResourceState(DeletingValue); - /// Running. + /// + /// Running + /// Serialized Name: EndpointResourceState.Running + /// public static EndpointResourceState Running { get; } = new EndpointResourceState(RunningValue); - /// Starting. + /// + /// Starting + /// Serialized Name: EndpointResourceState.Starting + /// public static EndpointResourceState Starting { get; } = new EndpointResourceState(StartingValue); - /// Stopped. + /// + /// Stopped + /// Serialized Name: EndpointResourceState.Stopped + /// public static EndpointResourceState Stopped { get; } = new EndpointResourceState(StoppedValue); - /// Stopping. + /// + /// Stopping + /// Serialized Name: EndpointResourceState.Stopping + /// public static EndpointResourceState Stopping { get; } = new EndpointResourceState(StoppingValue); /// Determines if two values are the same. public static bool operator ==(EndpointResourceState left, EndpointResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ForwardingProtocol.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ForwardingProtocol.cs index 95c013e95941..903944876f3d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ForwardingProtocol.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ForwardingProtocol.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Protocol this rule will use when forwarding traffic to backends. + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: ForwardingProtocol + /// public readonly partial struct ForwardingProtocol : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public ForwardingProtocol(string value) private const string HttpsOnlyValue = "HttpsOnly"; private const string MatchRequestValue = "MatchRequest"; - /// HttpOnly. + /// + /// HttpOnly + /// Serialized Name: ForwardingProtocol.HttpOnly + /// public static ForwardingProtocol HttpOnly { get; } = new ForwardingProtocol(HttpOnlyValue); - /// HttpsOnly. + /// + /// HttpsOnly + /// Serialized Name: ForwardingProtocol.HttpsOnly + /// public static ForwardingProtocol HttpsOnly { get; } = new ForwardingProtocol(HttpsOnlyValue); - /// MatchRequest. + /// + /// MatchRequest + /// Serialized Name: ForwardingProtocol.MatchRequest + /// public static ForwardingProtocol MatchRequest { get; } = new ForwardingProtocol(MatchRequestValue); /// Determines if two values are the same. public static bool operator ==(ForwardingProtocol left, ForwardingProtocol right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorActivatedResourceInfo.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorActivatedResourceInfo.cs index 561bfa4df191..0cb2a16de64a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorActivatedResourceInfo.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorActivatedResourceInfo.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Reference to another resource along with its state. + /// + /// Reference to another resource along with its state. + /// Serialized Name: ActivatedResourceReference + /// public partial class FrontDoorActivatedResourceInfo { /// @@ -52,8 +55,14 @@ public FrontDoorActivatedResourceInfo() } /// Initializes a new instance of . - /// Resource ID. - /// Whether the resource is active or inactive. + /// + /// Resource ID. + /// Serialized Name: ActivatedResourceReference.id + /// + /// + /// Whether the resource is active or inactive + /// Serialized Name: ActivatedResourceReference.isActive + /// /// Keeps track of any properties unknown to the library. internal FrontDoorActivatedResourceInfo(ResourceIdentifier id, bool? isActive, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal FrontDoorActivatedResourceInfo(ResourceIdentifier id, bool? isActive, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: ActivatedResourceReference.id + /// public ResourceIdentifier Id { get; set; } - /// Whether the resource is active or inactive. + /// + /// Whether the resource is active or inactive + /// Serialized Name: ActivatedResourceReference.isActive + /// public bool? IsActive { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCertificateType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCertificateType.cs index de2ccfea32de..81ef37aa72e6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCertificateType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCertificateType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the source of the SSL certificate. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: AfdCertificateType + /// public readonly partial struct FrontDoorCertificateType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public FrontDoorCertificateType(string value) private const string ManagedCertificateValue = "ManagedCertificate"; private const string AzureFirstPartyManagedCertificateValue = "AzureFirstPartyManagedCertificate"; - /// CustomerCertificate. + /// + /// CustomerCertificate + /// Serialized Name: AfdCertificateType.CustomerCertificate + /// public static FrontDoorCertificateType CustomerCertificate { get; } = new FrontDoorCertificateType(CustomerCertificateValue); - /// ManagedCertificate. + /// + /// ManagedCertificate + /// Serialized Name: AfdCertificateType.ManagedCertificate + /// public static FrontDoorCertificateType ManagedCertificate { get; } = new FrontDoorCertificateType(ManagedCertificateValue); - /// AzureFirstPartyManagedCertificate. + /// + /// AzureFirstPartyManagedCertificate + /// Serialized Name: AfdCertificateType.AzureFirstPartyManagedCertificate + /// public static FrontDoorCertificateType AzureFirstPartyManagedCertificate { get; } = new FrontDoorCertificateType(AzureFirstPartyManagedCertificateValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorCertificateType left, FrontDoorCertificateType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.Serialization.cs index 90b5f82c3bd5..e0d9506ad8c1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.Serialization.cs @@ -37,11 +37,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("certificateType"u8); writer.WriteStringValue(CertificateType.ToString()); + if (Optional.IsDefined(CipherSuiteSetType)) + { + writer.WritePropertyName("cipherSuiteSetType"u8); + writer.WriteStringValue(CipherSuiteSetType.Value.ToString()); + } if (Optional.IsDefined(MinimumTlsVersion)) { writer.WritePropertyName("minimumTlsVersion"u8); writer.WriteStringValue(MinimumTlsVersion.Value.ToSerialString()); } + if (Optional.IsDefined(CustomizedCipherSuiteSet)) + { + writer.WritePropertyName("customizedCipherSuiteSet"u8); + writer.WriteObjectValue(CustomizedCipherSuiteSet, options); + } if (Optional.IsDefined(Secret)) { writer.WritePropertyName("secret"u8); @@ -85,7 +95,9 @@ internal static FrontDoorCustomDomainHttpsContent DeserializeFrontDoorCustomDoma return null; } FrontDoorCertificateType certificateType = default; + AfdCipherSuiteSetType? cipherSuiteSetType = default; FrontDoorMinimumTlsVersion? minimumTlsVersion = default; + FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet customizedCipherSuiteSet = default; WritableSubResource secret = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -96,6 +108,15 @@ internal static FrontDoorCustomDomainHttpsContent DeserializeFrontDoorCustomDoma certificateType = new FrontDoorCertificateType(property.Value.GetString()); continue; } + if (property.NameEquals("cipherSuiteSetType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cipherSuiteSetType = new AfdCipherSuiteSetType(property.Value.GetString()); + continue; + } if (property.NameEquals("minimumTlsVersion"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -105,6 +126,15 @@ internal static FrontDoorCustomDomainHttpsContent DeserializeFrontDoorCustomDoma minimumTlsVersion = property.Value.GetString().ToFrontDoorMinimumTlsVersion(); continue; } + if (property.NameEquals("customizedCipherSuiteSet"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + customizedCipherSuiteSet = FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.DeserializeFrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(property.Value, options); + continue; + } if (property.NameEquals("secret"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -120,7 +150,13 @@ internal static FrontDoorCustomDomainHttpsContent DeserializeFrontDoorCustomDoma } } serializedAdditionalRawData = rawDataDictionary; - return new FrontDoorCustomDomainHttpsContent(certificateType, minimumTlsVersion, secret, serializedAdditionalRawData); + return new FrontDoorCustomDomainHttpsContent( + certificateType, + cipherSuiteSetType, + minimumTlsVersion, + customizedCipherSuiteSet, + secret, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.cs index 8910ff861153..c255cc8a43ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsContent.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object that contains the properties to secure a domain. + /// + /// The JSON object that contains the properties to secure a domain. + /// Serialized Name: AFDDomainHttpsParameters + /// public partial class FrontDoorCustomDomainHttpsContent { /// @@ -48,21 +51,43 @@ public partial class FrontDoorCustomDomainHttpsContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Defines the source of the SSL certificate. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: AFDDomainHttpsParameters.certificateType + /// public FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType certificateType) { CertificateType = certificateType; } /// Initializes a new instance of . - /// Defines the source of the SSL certificate. - /// TLS protocol version that will be used for Https. - /// Resource reference to the secret. ie. subs/rg/profile/secret. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: AFDDomainHttpsParameters.certificateType + /// + /// + /// cipher suite set type that will be used for Https + /// Serialized Name: AFDDomainHttpsParameters.cipherSuiteSetType + /// + /// + /// TLS protocol version that will be used for Https when cipherSuiteSetType is Customized. + /// Serialized Name: AFDDomainHttpsParameters.minimumTlsVersion + /// + /// + /// Customized cipher suites object that will be used for Https when cipherSuiteSetType is Customized. + /// Serialized Name: AFDDomainHttpsParameters.customizedCipherSuiteSet + /// + /// + /// Resource reference to the secret. ie. subs/rg/profile/secret + /// Serialized Name: AFDDomainHttpsParameters.secret + /// /// Keeps track of any properties unknown to the library. - internal FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType certificateType, FrontDoorMinimumTlsVersion? minimumTlsVersion, WritableSubResource secret, IDictionary serializedAdditionalRawData) + internal FrontDoorCustomDomainHttpsContent(FrontDoorCertificateType certificateType, AfdCipherSuiteSetType? cipherSuiteSetType, FrontDoorMinimumTlsVersion? minimumTlsVersion, FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet customizedCipherSuiteSet, WritableSubResource secret, IDictionary serializedAdditionalRawData) { CertificateType = certificateType; + CipherSuiteSetType = cipherSuiteSetType; MinimumTlsVersion = minimumTlsVersion; + CustomizedCipherSuiteSet = customizedCipherSuiteSet; Secret = secret; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -72,11 +97,30 @@ internal FrontDoorCustomDomainHttpsContent() { } - /// Defines the source of the SSL certificate. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: AFDDomainHttpsParameters.certificateType + /// public FrontDoorCertificateType CertificateType { get; set; } - /// TLS protocol version that will be used for Https. + /// + /// cipher suite set type that will be used for Https + /// Serialized Name: AFDDomainHttpsParameters.cipherSuiteSetType + /// + public AfdCipherSuiteSetType? CipherSuiteSetType { get; set; } + /// + /// TLS protocol version that will be used for Https when cipherSuiteSetType is Customized. + /// Serialized Name: AFDDomainHttpsParameters.minimumTlsVersion + /// public FrontDoorMinimumTlsVersion? MinimumTlsVersion { get; set; } - /// Resource reference to the secret. ie. subs/rg/profile/secret. + /// + /// Customized cipher suites object that will be used for Https when cipherSuiteSetType is Customized. + /// Serialized Name: AFDDomainHttpsParameters.customizedCipherSuiteSet + /// + public FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet CustomizedCipherSuiteSet { get; set; } + /// + /// Resource reference to the secret. ie. subs/rg/profile/secret + /// Serialized Name: AFDDomainHttpsParameters.secret + /// internal WritableSubResource Secret { get; set; } /// Gets or sets Id. public ResourceIdentifier SecretId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.Serialization.cs new file mode 100644 index 000000000000..e3fb66f71d42 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.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.Cdn.Models +{ + public partial class FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet : 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(FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(CipherSuiteSetForTls12)) + { + writer.WritePropertyName("cipherSuiteSetForTls12"u8); + writer.WriteStartArray(); + foreach (var item in CipherSuiteSetForTls12) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(CipherSuiteSetForTls13)) + { + writer.WritePropertyName("cipherSuiteSetForTls13"u8); + writer.WriteStartArray(); + foreach (var item in CipherSuiteSetForTls13) + { + writer.WriteStringValue(item.ToString()); + } + 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 + } + } + } + + FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet 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(FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(document.RootElement, options); + } + + internal static FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet DeserializeFrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList cipherSuiteSetForTls12 = default; + IList cipherSuiteSetForTls13 = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cipherSuiteSetForTls12"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AfdCustomizedCipherSuiteForTls12(item.GetString())); + } + cipherSuiteSetForTls12 = array; + continue; + } + if (property.NameEquals("cipherSuiteSetForTls13"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new AfdCustomizedCipherSuiteForTls13(item.GetString())); + } + cipherSuiteSetForTls13 = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(cipherSuiteSetForTls12 ?? new ChangeTrackingList(), cipherSuiteSetForTls13 ?? 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet)} does not support writing '{options.Format}' format."); + } + } + + FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet 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 DeserializeFrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.cs new file mode 100644 index 000000000000..013a5379f65e --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet.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.Cdn.Models +{ + /// + /// Customized cipher suite set object that will be used for Https when cipherSuiteSetType is Customized. + /// Serialized Name: AFDDomainHttpsCustomizedCipherSuiteSet + /// + public partial class FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet + { + /// + /// 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 FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet() + { + CipherSuiteSetForTls12 = new ChangeTrackingList(); + CipherSuiteSetForTls13 = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion TLS 1.2. + /// Serialized Name: AFDDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls12 + /// + /// + /// Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion TLS 1.2, TLS 1.3. + /// Serialized Name: AFDDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls13 + /// + /// Keeps track of any properties unknown to the library. + internal FrontDoorCustomDomainHttpsCustomizedCipherSuiteSet(IList cipherSuiteSetForTls12, IList cipherSuiteSetForTls13, IDictionary serializedAdditionalRawData) + { + CipherSuiteSetForTls12 = cipherSuiteSetForTls12; + CipherSuiteSetForTls13 = cipherSuiteSetForTls13; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Cipher suites for TLS 1.2. Required at least one in minimumTlsVersion TLS 1.2. + /// Serialized Name: AFDDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls12 + /// + public IList CipherSuiteSetForTls12 { get; } + /// + /// Cipher suites for TLS 1.3. Required at least one in minimumTlsVersion TLS 1.2, TLS 1.3. + /// Serialized Name: AFDDomainHttpsCustomizedCipherSuiteSet.cipherSuiteSetForTls13 + /// + public IList CipherSuiteSetForTls13 { get; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainListResult.cs index 32082fba3780..b82f282c1651 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + /// + /// Result of the request to list domains. It contains a list of domain objects and a URL link to get the next set of results. + /// Serialized Name: AFDDomainListResult + /// internal partial class FrontDoorCustomDomainListResult { /// @@ -52,8 +55,14 @@ internal FrontDoorCustomDomainListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor domains within a profile. - /// URL to get the next set of domain objects if there are any. + /// + /// List of AzureFrontDoor domains within a profile. + /// Serialized Name: AFDDomainListResult.value + /// + /// + /// URL to get the next set of domain objects if there are any. + /// Serialized Name: AFDDomainListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal FrontDoorCustomDomainListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal FrontDoorCustomDomainListResult(IReadOnlyList List of AzureFrontDoor domains within a profile. + /// + /// List of AzureFrontDoor domains within a profile. + /// Serialized Name: AFDDomainListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of domain objects if there are any. + /// + /// URL to get the next set of domain objects if there are any. + /// Serialized Name: AFDDomainListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainPatch.cs index dbd8e8d11c5f..bae6dd1bdda3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorCustomDomainPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The domain JSON object required for domain creation or update. + /// + /// The domain JSON object required for domain creation or update. + /// Serialized Name: AFDDomainUpdateParameters + /// public partial class FrontDoorCustomDomainPatch { /// @@ -53,10 +56,22 @@ public FrontDoorCustomDomainPatch() } /// Initializes a new instance of . - /// The name of the profile which holds the domain. - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. - /// Resource reference to the Azure DNS zone. - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomainUpdateParameters.properties.profileName + /// + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomainUpdateParameters.properties.tlsSettings + /// + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomainUpdateParameters.properties.azureDnsZone + /// + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomainUpdateParameters.properties.preValidatedCustomDomainResourceId + /// /// Keeps track of any properties unknown to the library. internal FrontDoorCustomDomainPatch(string profileName, FrontDoorCustomDomainHttpsContent tlsSettings, WritableSubResource dnsZone, WritableSubResource preValidatedCustomDomainResource, IDictionary serializedAdditionalRawData) { @@ -67,11 +82,20 @@ internal FrontDoorCustomDomainPatch(string profileName, FrontDoorCustomDomainHtt _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the profile which holds the domain. + /// + /// The name of the profile which holds the domain. + /// Serialized Name: AFDDomainUpdateParameters.properties.profileName + /// public string ProfileName { get; } - /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// + /// The configuration specifying how to enable HTTPS for the domain - using AzureFrontDoor managed certificate or user's own certificate. If not specified, enabling ssl uses AzureFrontDoor managed certificate by default. + /// Serialized Name: AFDDomainUpdateParameters.properties.tlsSettings + /// public FrontDoorCustomDomainHttpsContent TlsSettings { get; set; } - /// Resource reference to the Azure DNS zone. + /// + /// Resource reference to the Azure DNS zone + /// Serialized Name: AFDDomainUpdateParameters.properties.azureDnsZone + /// internal WritableSubResource DnsZone { get; set; } /// Gets or sets Id. public ResourceIdentifier DnsZoneId @@ -85,7 +109,10 @@ public ResourceIdentifier DnsZoneId } } - /// Resource reference to the Azure resource where custom domain ownership was prevalidated. + /// + /// Resource reference to the Azure resource where custom domain ownership was prevalidated + /// Serialized Name: AFDDomainUpdateParameters.properties.preValidatedCustomDomainResourceId + /// internal WritableSubResource PreValidatedCustomDomainResource { get; set; } /// Gets or sets Id. public ResourceIdentifier PreValidatedCustomDomainResourceId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorDeploymentStatus.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorDeploymentStatus.cs index 08642dd029d9..9130f56934e7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorDeploymentStatus.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorDeploymentStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The FrontDoorDeploymentStatus. + /// + /// The FrontDoorDeploymentStatus. + /// Serialized Name: DeploymentStatus + /// public readonly partial struct FrontDoorDeploymentStatus : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public FrontDoorDeploymentStatus(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; - /// NotStarted. + /// + /// NotStarted + /// Serialized Name: DeploymentStatus.NotStarted + /// public static FrontDoorDeploymentStatus NotStarted { get; } = new FrontDoorDeploymentStatus(NotStartedValue); - /// InProgress. + /// + /// InProgress + /// Serialized Name: DeploymentStatus.InProgress + /// public static FrontDoorDeploymentStatus InProgress { get; } = new FrontDoorDeploymentStatus(InProgressValue); - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: DeploymentStatus.Succeeded + /// public static FrontDoorDeploymentStatus Succeeded { get; } = new FrontDoorDeploymentStatus(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: DeploymentStatus.Failed + /// public static FrontDoorDeploymentStatus Failed { get; } = new FrontDoorDeploymentStatus(FailedValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorDeploymentStatus left, FrontDoorDeploymentStatus right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointListResult.cs index 87b4cd14b928..f5519e255668 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + /// + /// Result of the request to list endpoints. It contains a list of endpoint objects and a URL link to get the next set of results. + /// Serialized Name: AFDEndpointListResult + /// internal partial class FrontDoorEndpointListResult { /// @@ -52,8 +55,14 @@ internal FrontDoorEndpointListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor endpoints within a profile. - /// URL to get the next set of endpoint objects if there is any. + /// + /// List of AzureFrontDoor endpoints within a profile + /// Serialized Name: AFDEndpointListResult.value + /// + /// + /// URL to get the next set of endpoint objects if there is any. + /// Serialized Name: AFDEndpointListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal FrontDoorEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal FrontDoorEndpointListResult(IReadOnlyList value, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of AzureFrontDoor endpoints within a profile. + /// + /// List of AzureFrontDoor endpoints within a profile + /// Serialized Name: AFDEndpointListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of endpoint objects if there is any. + /// + /// URL to get the next set of endpoint objects if there is any. + /// Serialized Name: AFDEndpointListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointPatch.cs index 764e6d730ebb..0993e38f32c5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Properties required to create or update an endpoint. + /// + /// Properties required to create or update an endpoint. + /// Serialized Name: AFDEndpointUpdateParameters + /// public partial class FrontDoorEndpointPatch { /// @@ -52,9 +55,18 @@ public FrontDoorEndpointPatch() } /// Initializes a new instance of . - /// Endpoint tags. - /// The name of the profile which holds the endpoint. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Endpoint tags. + /// Serialized Name: AFDEndpointUpdateParameters.tags + /// + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpointUpdateParameters.properties.profileName + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpointUpdateParameters.properties.enabledState + /// /// Keeps track of any properties unknown to the library. internal FrontDoorEndpointPatch(IDictionary tags, string profileName, EnabledState? enabledState, IDictionary serializedAdditionalRawData) { @@ -64,11 +76,20 @@ internal FrontDoorEndpointPatch(IDictionary tags, string profile _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Endpoint tags. + /// + /// Endpoint tags. + /// Serialized Name: AFDEndpointUpdateParameters.tags + /// public IDictionary Tags { get; } - /// The name of the profile which holds the endpoint. + /// + /// The name of the profile which holds the endpoint. + /// Serialized Name: AFDEndpointUpdateParameters.properties.profileName + /// public string ProfileName { get; } - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: AFDEndpointUpdateParameters.properties.enabledState + /// public EnabledState? EnabledState { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointProtocol.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointProtocol.cs index 1c121a2dfe5b..b710590b2ad9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointProtocol.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorEndpointProtocol.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Supported protocols for the customer's endpoint. + /// + /// Supported protocols for the customer's endpoint. + /// Serialized Name: AFDEndpointProtocols + /// public readonly partial struct FrontDoorEndpointProtocol : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public FrontDoorEndpointProtocol(string value) private const string HttpValue = "Http"; private const string HttpsValue = "Https"; - /// Http. + /// + /// Http + /// Serialized Name: AFDEndpointProtocols.Http + /// public static FrontDoorEndpointProtocol Http { get; } = new FrontDoorEndpointProtocol(HttpValue); - /// Https. + /// + /// Https + /// Serialized Name: AFDEndpointProtocols.Https + /// public static FrontDoorEndpointProtocol Https { get; } = new FrontDoorEndpointProtocol(HttpsValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorEndpointProtocol left, FrontDoorEndpointProtocol right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorMinimumTlsVersion.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorMinimumTlsVersion.Serialization.cs index 1c42b53c24c7..b59c5469238a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorMinimumTlsVersion.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorMinimumTlsVersion.Serialization.cs @@ -15,6 +15,7 @@ internal static partial class FrontDoorMinimumTlsVersionExtensions { FrontDoorMinimumTlsVersion.Tls1_0 => "TLS10", FrontDoorMinimumTlsVersion.Tls1_2 => "TLS12", + FrontDoorMinimumTlsVersion.Tls1_3 => "TLS13", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FrontDoorMinimumTlsVersion value.") }; @@ -22,6 +23,7 @@ public static FrontDoorMinimumTlsVersion ToFrontDoorMinimumTlsVersion(this strin { if (StringComparer.OrdinalIgnoreCase.Equals(value, "TLS10")) return FrontDoorMinimumTlsVersion.Tls1_0; if (StringComparer.OrdinalIgnoreCase.Equals(value, "TLS12")) return FrontDoorMinimumTlsVersion.Tls1_2; + if (StringComparer.OrdinalIgnoreCase.Equals(value, "TLS13")) return FrontDoorMinimumTlsVersion.Tls1_3; throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown FrontDoorMinimumTlsVersion value."); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs index 49532d9e3cf8..ce5a3972154a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results. + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results. + /// Serialized Name: AFDOriginGroupListResult + /// internal partial class FrontDoorOriginGroupListResult { /// @@ -52,8 +55,14 @@ internal FrontDoorOriginGroupListResult() } /// Initializes a new instance of . - /// List of Azure Front Door origin groups within an Azure Front Door endpoint. - /// URL to get the next set of origin objects if there are any. + /// + /// List of Azure Front Door origin groups within an Azure Front Door endpoint + /// Serialized Name: AFDOriginGroupListResult.value + /// + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: AFDOriginGroupListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal FrontDoorOriginGroupListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal FrontDoorOriginGroupListResult(IReadOnlyList _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Azure Front Door origin groups within an Azure Front Door endpoint. + /// + /// List of Azure Front Door origin groups within an Azure Front Door endpoint + /// Serialized Name: AFDOriginGroupListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of origin objects if there are any. + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: AFDOriginGroupListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupPatch.cs index 65f091a021c1..ed4756a01bc4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginGroupPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// AFDOrigin group properties needed for origin group creation or update. + /// + /// AFDOrigin group properties needed for origin group creation or update. + /// Serialized Name: AFDOriginGroupUpdateParameters + /// public partial class FrontDoorOriginGroupPatch { /// @@ -51,11 +54,26 @@ public FrontDoorOriginGroupPatch() } /// Initializes a new instance of . - /// The name of the profile which holds the origin group. - /// Load balancing settings for a backend pool. - /// Health probe settings to the origin that is used to determine the health of the origin. - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.profileName + /// + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.loadBalancingSettings + /// + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.healthProbeSettings + /// + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.sessionAffinityState + /// /// Keeps track of any properties unknown to the library. internal FrontDoorOriginGroupPatch(string profileName, LoadBalancingSettings loadBalancingSettings, HealthProbeSettings healthProbeSettings, int? trafficRestorationTimeInMinutes, EnabledState? sessionAffinityState, IDictionary serializedAdditionalRawData) { @@ -67,15 +85,30 @@ internal FrontDoorOriginGroupPatch(string profileName, LoadBalancingSettings loa _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the profile which holds the origin group. + /// + /// The name of the profile which holds the origin group. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.profileName + /// public string ProfileName { get; } - /// Load balancing settings for a backend pool. + /// + /// Load balancing settings for a backend pool + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.loadBalancingSettings + /// public LoadBalancingSettings LoadBalancingSettings { get; set; } - /// Health probe settings to the origin that is used to determine the health of the origin. + /// + /// Health probe settings to the origin that is used to determine the health of the origin. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.healthProbeSettings + /// public HealthProbeSettings HealthProbeSettings { get; set; } - /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// + /// Time in minutes to shift the traffic to the endpoint gradually when an unhealthy endpoint comes healthy or a new endpoint is added. Default is 10 mins. This property is currently not supported. + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.trafficRestorationTimeToHealedOrNewEndpointsInMinutes + /// public int? TrafficRestorationTimeInMinutes { get; set; } - /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + /// + /// Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled' + /// Serialized Name: AFDOriginGroupUpdateParameters.properties.sessionAffinityState + /// public EnabledState? SessionAffinityState { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs index c28c520bccb7..54f56384e25c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// Serialized Name: AFDOriginListResult + /// internal partial class FrontDoorOriginListResult { /// @@ -52,8 +55,14 @@ internal FrontDoorOriginListResult() } /// Initializes a new instance of . - /// List of Azure Front Door origins within an Azure Front Door endpoint. - /// URL to get the next set of origin objects if there are any. + /// + /// List of Azure Front Door origins within an Azure Front Door endpoint + /// Serialized Name: AFDOriginListResult.value + /// + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: AFDOriginListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal FrontDoorOriginListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal FrontDoorOriginListResult(IReadOnlyList value, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Azure Front Door origins within an Azure Front Door endpoint. + /// + /// List of Azure Front Door origins within an Azure Front Door endpoint + /// Serialized Name: AFDOriginListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of origin objects if there are any. + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: AFDOriginListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs index 4cc02e9b47dc..78181ccf0a08 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorOriginPatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// AFDOrigin properties needed for origin update. + /// + /// AFDOrigin properties needed for origin update. + /// Serialized Name: AFDOriginUpdateParameters + /// public partial class FrontDoorOriginPatch { /// @@ -53,17 +56,50 @@ public FrontDoorOriginPatch() } /// Initializes a new instance of . - /// The name of the origin group which contains this origin. - /// Resource reference to the Azure origin resource. - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. - /// The value of the HTTP port. Must be between 1 and 65535. - /// The value of the HTTPS port. Must be between 1 and 65535. - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. - /// The properties of the private link resource for private origin. - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. - /// Whether to enable certificate name check at origin level. + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.originGroupName + /// + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOriginUpdateParameters.properties.azureOrigin + /// + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOriginUpdateParameters.properties.hostName + /// + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpPort + /// + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpsPort + /// + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOriginUpdateParameters.properties.originHostHeader + /// + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOriginUpdateParameters.properties.priority + /// + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOriginUpdateParameters.properties.weight + /// + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.sharedPrivateLinkResource + /// + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOriginUpdateParameters.properties.enabledState + /// + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOriginUpdateParameters.properties.enforceCertificateNameCheck + /// /// Keeps track of any properties unknown to the library. internal FrontDoorOriginPatch(string originGroupName, WritableSubResource origin, string hostName, int? httpPort, int? httpsPort, string originHostHeader, int? priority, int? weight, SharedPrivateLinkResourceProperties sharedPrivateLinkResource, EnabledState? enabledState, bool? enforceCertificateNameCheck, IDictionary serializedAdditionalRawData) { @@ -81,9 +117,15 @@ internal FrontDoorOriginPatch(string originGroupName, WritableSubResource origin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The name of the origin group which contains this origin. + /// + /// The name of the origin group which contains this origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.originGroupName + /// public string OriginGroupName { get; } - /// Resource reference to the Azure origin resource. + /// + /// Resource reference to the Azure origin resource. + /// Serialized Name: AFDOriginUpdateParameters.properties.azureOrigin + /// internal WritableSubResource Origin { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginId @@ -97,23 +139,50 @@ public ResourceIdentifier OriginId } } - /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// + /// The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.This should be unique across all origins in an endpoint. + /// Serialized Name: AFDOriginUpdateParameters.properties.hostName + /// public string HostName { get; set; } - /// The value of the HTTP port. Must be between 1 and 65535. + /// + /// The value of the HTTP port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpPort + /// public int? HttpPort { get; set; } - /// The value of the HTTPS port. Must be between 1 and 65535. + /// + /// The value of the HTTPS port. Must be between 1 and 65535. + /// Serialized Name: AFDOriginUpdateParameters.properties.httpsPort + /// public int? HttpsPort { get; set; } - /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint. + /// + /// The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure Front Door origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default. This overrides the host header defined at Endpoint + /// Serialized Name: AFDOriginUpdateParameters.properties.originHostHeader + /// public string OriginHostHeader { get; set; } - /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5. + /// + /// Priority of origin in given origin group for load balancing. Higher priorities will not be used for load balancing if any lower priority origin is healthy.Must be between 1 and 5 + /// Serialized Name: AFDOriginUpdateParameters.properties.priority + /// public int? Priority { get; set; } - /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000. + /// + /// Weight of the origin in given origin group for load balancing. Must be between 1 and 1000 + /// Serialized Name: AFDOriginUpdateParameters.properties.weight + /// public int? Weight { get; set; } - /// The properties of the private link resource for private origin. + /// + /// The properties of the private link resource for private origin. + /// Serialized Name: AFDOriginUpdateParameters.properties.sharedPrivateLinkResource + /// public SharedPrivateLinkResourceProperties SharedPrivateLinkResource { get; set; } - /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// + /// Whether to enable health probes to be made against backends defined under backendPools. Health probes can only be disabled if there is a single enabled backend in single enabled backend pool. + /// Serialized Name: AFDOriginUpdateParameters.properties.enabledState + /// public EnabledState? EnabledState { get; set; } - /// Whether to enable certificate name check at origin level. + /// + /// Whether to enable certificate name check at origin level + /// Serialized Name: AFDOriginUpdateParameters.properties.enforceCertificateNameCheck + /// public bool? EnforceCertificateNameCheck { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorProvisioningState.cs index 14bd1e83e0fa..7228d03bc539 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status. + /// + /// Provisioning status + /// Serialized Name: AfdProvisioningState + /// public readonly partial struct FrontDoorProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public FrontDoorProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string CreatingValue = "Creating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: AfdProvisioningState.Succeeded + /// public static FrontDoorProvisioningState Succeeded { get; } = new FrontDoorProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: AfdProvisioningState.Failed + /// public static FrontDoorProvisioningState Failed { get; } = new FrontDoorProvisioningState(FailedValue); - /// Updating. + /// + /// Updating + /// Serialized Name: AfdProvisioningState.Updating + /// public static FrontDoorProvisioningState Updating { get; } = new FrontDoorProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: AfdProvisioningState.Deleting + /// public static FrontDoorProvisioningState Deleting { get; } = new FrontDoorProvisioningState(DeletingValue); - /// Creating. + /// + /// Creating + /// Serialized Name: AfdProvisioningState.Creating + /// public static FrontDoorProvisioningState Creating { get; } = new FrontDoorProvisioningState(CreatingValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorProvisioningState left, FrontDoorProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorPurgeContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorPurgeContent.cs index 7e22cfc58bc2..dbf90a4d5f74 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorPurgeContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorPurgeContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Parameters required for content purge. + /// + /// Parameters required for content purge. + /// Serialized Name: AfdPurgeParameters + /// public partial class FrontDoorPurgeContent { /// @@ -47,7 +50,10 @@ public partial class FrontDoorPurgeContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: AfdPurgeParameters.contentPaths + /// /// is null. public FrontDoorPurgeContent(IEnumerable contentPaths) { @@ -58,8 +64,14 @@ public FrontDoorPurgeContent(IEnumerable contentPaths) } /// Initializes a new instance of . - /// The path to the content to be purged. Can describe a file path or a wild card directory. - /// List of domains. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: AfdPurgeParameters.contentPaths + /// + /// + /// List of domains. + /// Serialized Name: AfdPurgeParameters.domains + /// /// Keeps track of any properties unknown to the library. internal FrontDoorPurgeContent(IList contentPaths, IList domains, IDictionary serializedAdditionalRawData) { @@ -73,9 +85,15 @@ internal FrontDoorPurgeContent() { } - /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: AfdPurgeParameters.contentPaths + /// public IList ContentPaths { get; } - /// List of domains. + /// + /// List of domains. + /// Serialized Name: AfdPurgeParameters.domains + /// public IList Domains { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorQueryStringCachingBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorQueryStringCachingBehavior.cs index b5789b5269da..7a558abd9e9c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorQueryStringCachingBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorQueryStringCachingBehavior.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: AfdQueryStringCachingBehavior + /// public readonly partial struct FrontDoorQueryStringCachingBehavior : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public FrontDoorQueryStringCachingBehavior(string value) private const string IgnoreSpecifiedQueryStringsValue = "IgnoreSpecifiedQueryStrings"; private const string IncludeSpecifiedQueryStringsValue = "IncludeSpecifiedQueryStrings"; - /// IgnoreQueryString. + /// + /// IgnoreQueryString + /// Serialized Name: AfdQueryStringCachingBehavior.IgnoreQueryString + /// public static FrontDoorQueryStringCachingBehavior IgnoreQueryString { get; } = new FrontDoorQueryStringCachingBehavior(IgnoreQueryStringValue); - /// UseQueryString. + /// + /// UseQueryString + /// Serialized Name: AfdQueryStringCachingBehavior.UseQueryString + /// public static FrontDoorQueryStringCachingBehavior UseQueryString { get; } = new FrontDoorQueryStringCachingBehavior(UseQueryStringValue); - /// IgnoreSpecifiedQueryStrings. + /// + /// IgnoreSpecifiedQueryStrings + /// Serialized Name: AfdQueryStringCachingBehavior.IgnoreSpecifiedQueryStrings + /// public static FrontDoorQueryStringCachingBehavior IgnoreSpecifiedQueryStrings { get; } = new FrontDoorQueryStringCachingBehavior(IgnoreSpecifiedQueryStringsValue); - /// IncludeSpecifiedQueryStrings. + /// + /// IncludeSpecifiedQueryStrings + /// Serialized Name: AfdQueryStringCachingBehavior.IncludeSpecifiedQueryStrings + /// public static FrontDoorQueryStringCachingBehavior IncludeSpecifiedQueryStrings { get; } = new FrontDoorQueryStringCachingBehavior(IncludeSpecifiedQueryStringsValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorQueryStringCachingBehavior left, FrontDoorQueryStringCachingBehavior right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRouteCacheConfiguration.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRouteCacheConfiguration.cs index a5f9ac0e34b4..1a2450269956 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRouteCacheConfiguration.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRouteCacheConfiguration.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// + /// Caching settings for a caching-type route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: AfdRouteCacheConfiguration + /// public partial class FrontDoorRouteCacheConfiguration { /// @@ -51,9 +54,18 @@ public FrontDoorRouteCacheConfiguration() } /// Initializes a new instance of . - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. - /// query parameters to include or exclude (comma separated). - /// compression settings. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: AfdRouteCacheConfiguration.queryStringCachingBehavior + /// + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: AfdRouteCacheConfiguration.queryParameters + /// + /// + /// compression settings. + /// Serialized Name: AfdRouteCacheConfiguration.compressionSettings + /// /// Keeps track of any properties unknown to the library. internal FrontDoorRouteCacheConfiguration(FrontDoorQueryStringCachingBehavior? queryStringCachingBehavior, string queryParameters, RouteCacheCompressionSettings compressionSettings, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal FrontDoorRouteCacheConfiguration(FrontDoorQueryStringCachingBehavior? q _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: AfdRouteCacheConfiguration.queryStringCachingBehavior + /// public FrontDoorQueryStringCachingBehavior? QueryStringCachingBehavior { get; set; } - /// query parameters to include or exclude (comma separated). + /// + /// query parameters to include or exclude (comma separated). + /// Serialized Name: AfdRouteCacheConfiguration.queryParameters + /// public string QueryParameters { get; set; } - /// compression settings. + /// + /// compression settings. + /// Serialized Name: AfdRouteCacheConfiguration.compressionSettings + /// public RouteCacheCompressionSettings CompressionSettings { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRoutePatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRoutePatch.cs index d99413b0cbec..cdf154c0cf75 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRoutePatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRoutePatch.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The domain JSON object required for domain creation or update. + /// + /// The domain JSON object required for domain creation or update. + /// Serialized Name: RouteUpdateParameters + /// public partial class FrontDoorRoutePatch { /// @@ -57,18 +60,54 @@ public FrontDoorRoutePatch() } /// Initializes a new instance of . - /// The name of the endpoint which holds the route. - /// Domains referenced by this endpoint. - /// A reference to the origin group. - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. - /// rule sets referenced by this endpoint. - /// List of supported protocols for this route. - /// The route patterns of the rule. - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. - /// Protocol this rule will use when forwarding traffic to backends. - /// whether this route will be linked to the default endpoint domain. - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: RouteUpdateParameters.properties.endpointName + /// + /// + /// Domains referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.customDomains + /// + /// + /// A reference to the origin group. + /// Serialized Name: RouteUpdateParameters.properties.originGroup + /// + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: RouteUpdateParameters.properties.originPath + /// + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.ruleSets + /// + /// + /// List of supported protocols for this route. + /// Serialized Name: RouteUpdateParameters.properties.supportedProtocols + /// + /// + /// The route patterns of the rule. + /// Serialized Name: RouteUpdateParameters.properties.patternsToMatch + /// + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: RouteUpdateParameters.properties.cacheConfiguration + /// + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: RouteUpdateParameters.properties.forwardingProtocol + /// + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: RouteUpdateParameters.properties.linkToDefaultDomain + /// + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: RouteUpdateParameters.properties.httpsRedirect + /// + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: RouteUpdateParameters.properties.enabledState + /// /// Keeps track of any properties unknown to the library. internal FrontDoorRoutePatch(string endpointName, IList customDomains, WritableSubResource originGroup, string originPath, IList ruleSets, IList supportedProtocols, IList patternsToMatch, FrontDoorRouteCacheConfiguration cacheConfiguration, ForwardingProtocol? forwardingProtocol, LinkToDefaultDomain? linkToDefaultDomain, HttpsRedirect? httpsRedirect, EnabledState? enabledState, IDictionary serializedAdditionalRawData) { @@ -87,11 +126,20 @@ internal FrontDoorRoutePatch(string endpointName, IList The name of the endpoint which holds the route. + /// + /// The name of the endpoint which holds the route. + /// Serialized Name: RouteUpdateParameters.properties.endpointName + /// public string EndpointName { get; } - /// Domains referenced by this endpoint. + /// + /// Domains referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.customDomains + /// public IList CustomDomains { get; } - /// A reference to the origin group. + /// + /// A reference to the origin group. + /// Serialized Name: RouteUpdateParameters.properties.originGroup + /// internal WritableSubResource OriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginGroupId @@ -105,23 +153,50 @@ public ResourceIdentifier OriginGroupId } } - /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// + /// A directory path on the origin that AzureFrontDoor can use to retrieve content from, e.g. contoso.cloudapp.net/originpath. + /// Serialized Name: RouteUpdateParameters.properties.originPath + /// public string OriginPath { get; set; } - /// rule sets referenced by this endpoint. + /// + /// rule sets referenced by this endpoint. + /// Serialized Name: RouteUpdateParameters.properties.ruleSets + /// public IList RuleSets { get; } - /// List of supported protocols for this route. + /// + /// List of supported protocols for this route. + /// Serialized Name: RouteUpdateParameters.properties.supportedProtocols + /// public IList SupportedProtocols { get; } - /// The route patterns of the rule. + /// + /// The route patterns of the rule. + /// Serialized Name: RouteUpdateParameters.properties.patternsToMatch + /// public IList PatternsToMatch { get; } - /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// + /// The caching configuration for this route. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: RouteUpdateParameters.properties.cacheConfiguration + /// public FrontDoorRouteCacheConfiguration CacheConfiguration { get; set; } - /// Protocol this rule will use when forwarding traffic to backends. + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: RouteUpdateParameters.properties.forwardingProtocol + /// public ForwardingProtocol? ForwardingProtocol { get; set; } - /// whether this route will be linked to the default endpoint domain. + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: RouteUpdateParameters.properties.linkToDefaultDomain + /// public LinkToDefaultDomain? LinkToDefaultDomain { get; set; } - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: RouteUpdateParameters.properties.httpsRedirect + /// public HttpsRedirect? HttpsRedirect { get; set; } - /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. + /// + /// Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled' + /// Serialized Name: RouteUpdateParameters.properties.enabledState + /// public EnabledState? EnabledState { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRulePatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRulePatch.cs index 80bbdbd0a18b..05d76bc4a809 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRulePatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorRulePatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The domain JSON object required for domain creation or update. + /// + /// The domain JSON object required for domain creation or update. + /// Serialized Name: RuleUpdateParameters + /// public partial class FrontDoorRulePatch { /// @@ -53,19 +56,30 @@ public FrontDoorRulePatch() } /// Initializes a new instance of . - /// The name of the rule set containing the rule. - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: RuleUpdateParameters.properties.ruleSetName + /// + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: RuleUpdateParameters.properties.order + /// /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: RuleUpdateParameters.properties.conditions /// 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 list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: RuleUpdateParameters.properties.actions /// 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 . /// - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: RuleUpdateParameters.properties.matchProcessingBehavior + /// /// Keeps track of any properties unknown to the library. internal FrontDoorRulePatch(string ruleSetName, int? order, IList conditions, IList actions, MatchProcessingBehavior? matchProcessingBehavior, IDictionary serializedAdditionalRawData) { @@ -77,23 +91,34 @@ internal FrontDoorRulePatch(string ruleSetName, int? order, IList The name of the rule set containing the rule. + /// + /// The name of the rule set containing the rule. + /// Serialized Name: RuleUpdateParameters.properties.ruleSetName + /// public string RuleSetName { get; } - /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// + /// The order in which the rules are applied for the endpoint. Possible values {0,1,2,3,………}. A rule with a lesser order will be applied before a rule with a greater order. Rule with order 0 is a special rule. It does not require any condition and actions listed in it will always be applied. + /// Serialized Name: RuleUpdateParameters.properties.order + /// public int? Order { get; set; } /// /// A list of conditions that must be matched for the actions to be executed + /// Serialized Name: RuleUpdateParameters.properties.conditions /// 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 IList Conditions { get; } /// /// A list of actions that are executed when all the conditions of a rule are satisfied. + /// Serialized Name: RuleUpdateParameters.properties.actions /// 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 IList Actions { get; } - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: RuleUpdateParameters.properties.matchProcessingBehavior + /// public MatchProcessingBehavior? MatchProcessingBehavior { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecretProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecretProperties.cs index 50dcff78c882..dc3f7bf2f350 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecretProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecretProperties.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// /// The json object containing secret parameters + /// Serialized Name: SecretParameters /// 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 . /// @@ -55,7 +56,10 @@ protected FrontDoorSecretProperties() } /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. internal FrontDoorSecretProperties(SecretType secretType, IDictionary serializedAdditionalRawData) { @@ -63,7 +67,10 @@ internal FrontDoorSecretProperties(SecretType secretType, IDictionary The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// internal SecretType SecretType { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecurityPolicyPatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecurityPolicyPatch.cs index 084685cc35ae..389970a1e5ad 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecurityPolicyPatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorSecurityPolicyPatch.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object containing security policy update parameters. + /// + /// The JSON object containing security policy update parameters. + /// Serialized Name: SecurityPolicyUpdateParameters + /// public partial class FrontDoorSecurityPolicyPatch { /// @@ -53,6 +56,7 @@ public FrontDoorSecurityPolicyPatch() /// Initializes a new instance of . /// /// object which contains security policy parameters + /// Serialized Name: SecurityPolicyUpdateParameters.properties.parameters /// 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 . /// @@ -65,6 +69,7 @@ internal FrontDoorSecurityPolicyPatch(SecurityPolicyProperties properties, IDict /// /// object which contains security policy parameters + /// Serialized Name: SecurityPolicyUpdateParameters.properties.parameters /// 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 . /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsage.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsage.cs index 29f7647ea5a1..a9a63afc028d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsage.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsage.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes resource usage. + /// + /// Describes resource usage. + /// Serialized Name: Usage + /// public partial class FrontDoorUsage { /// @@ -47,10 +50,22 @@ public partial class FrontDoorUsage private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// An enum describing the unit of measurement. - /// The current value of the usage. - /// The limit of usage. - /// The name of the type of usage. + /// + /// An enum describing the unit of measurement. + /// Serialized Name: Usage.unit + /// + /// + /// The current value of the usage. + /// Serialized Name: Usage.currentValue + /// + /// + /// The limit of usage. + /// Serialized Name: Usage.limit + /// + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// /// is null. internal FrontDoorUsage(FrontDoorUsageUnit unit, long currentValue, long limit, FrontDoorUsageResourceName name) { @@ -63,11 +78,26 @@ internal FrontDoorUsage(FrontDoorUsageUnit unit, long currentValue, long limit, } /// Initializes a new instance of . - /// Resource identifier. - /// An enum describing the unit of measurement. - /// The current value of the usage. - /// The limit of usage. - /// The name of the type of usage. + /// + /// Resource identifier. + /// Serialized Name: Usage.id + /// + /// + /// An enum describing the unit of measurement. + /// Serialized Name: Usage.unit + /// + /// + /// The current value of the usage. + /// Serialized Name: Usage.currentValue + /// + /// + /// The limit of usage. + /// Serialized Name: Usage.limit + /// + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// /// Keeps track of any properties unknown to the library. internal FrontDoorUsage(ResourceIdentifier id, FrontDoorUsageUnit unit, long currentValue, long limit, FrontDoorUsageResourceName name, IDictionary serializedAdditionalRawData) { @@ -84,15 +114,30 @@ internal FrontDoorUsage() { } - /// Resource identifier. + /// + /// Resource identifier. + /// Serialized Name: Usage.id + /// public ResourceIdentifier Id { get; } - /// An enum describing the unit of measurement. + /// + /// An enum describing the unit of measurement. + /// Serialized Name: Usage.unit + /// public FrontDoorUsageUnit Unit { get; } - /// The current value of the usage. + /// + /// The current value of the usage. + /// Serialized Name: Usage.currentValue + /// public long CurrentValue { get; } - /// The limit of usage. + /// + /// The limit of usage. + /// Serialized Name: Usage.limit + /// public long Limit { get; } - /// The name of the type of usage. + /// + /// The name of the type of usage. + /// Serialized Name: Usage.name + /// public FrontDoorUsageResourceName Name { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageResourceName.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageResourceName.cs index f17ed9c2360b..b4de9afaeb9f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageResourceName.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageResourceName.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The usage names. + /// + /// The usage names. + /// Serialized Name: UsageName + /// public partial class FrontDoorUsageResourceName { /// @@ -51,8 +54,14 @@ internal FrontDoorUsageResourceName() } /// Initializes a new instance of . - /// A string describing the resource name. - /// A localized string describing the resource name. + /// + /// A string describing the resource name. + /// Serialized Name: UsageName.value + /// + /// + /// A localized string describing the resource name. + /// Serialized Name: UsageName.localizedValue + /// /// Keeps track of any properties unknown to the library. internal FrontDoorUsageResourceName(string value, string localizedValue, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal FrontDoorUsageResourceName(string value, string localizedValue, IDictio _serializedAdditionalRawData = serializedAdditionalRawData; } - /// A string describing the resource name. + /// + /// A string describing the resource name. + /// Serialized Name: UsageName.value + /// public string Value { get; } - /// A localized string describing the resource name. + /// + /// A localized string describing the resource name. + /// Serialized Name: UsageName.localizedValue + /// public string LocalizedValue { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageUnit.cs index d7ccf84d7d20..c642ac295738 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageUnit.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/FrontDoorUsageUnit.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// An enum describing the unit of measurement. + /// + /// An enum describing the unit of measurement. + /// Serialized Name: UsageUnit + /// public readonly partial struct FrontDoorUsageUnit : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public FrontDoorUsageUnit(string value) private const string CountValue = "Count"; - /// Count. + /// + /// Count + /// Serialized Name: UsageUnit.Count + /// public static FrontDoorUsageUnit Count { get; } = new FrontDoorUsageUnit(CountValue); /// Determines if two values are the same. public static bool operator ==(FrontDoorUsageUnit left, FrontDoorUsageUnit right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilter.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilter.cs index 1f77eae8bddc..bed07ed6b21e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilter.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilter.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Rules defining user's geo access within a CDN endpoint. + /// + /// Rules defining user's geo access within a CDN endpoint. + /// Serialized Name: GeoFilter + /// public partial class GeoFilter { /// @@ -47,9 +50,18 @@ public partial class GeoFilter private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.). - /// Action of the geo filter, i.e. allow or block access. - /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// Serialized Name: GeoFilter.relativePath + /// + /// + /// Action of the geo filter, i.e. allow or block access. + /// Serialized Name: GeoFilter.action + /// + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// Serialized Name: GeoFilter.countryCodes + /// /// or is null. public GeoFilter(string relativePath, GeoFilterAction action, IEnumerable countryCodes) { @@ -62,9 +74,18 @@ public GeoFilter(string relativePath, GeoFilterAction action, IEnumerable Initializes a new instance of . - /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.). - /// Action of the geo filter, i.e. allow or block access. - /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// Serialized Name: GeoFilter.relativePath + /// + /// + /// Action of the geo filter, i.e. allow or block access. + /// Serialized Name: GeoFilter.action + /// + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// Serialized Name: GeoFilter.countryCodes + /// /// Keeps track of any properties unknown to the library. internal GeoFilter(string relativePath, GeoFilterAction action, IList countryCodes, IDictionary serializedAdditionalRawData) { @@ -79,11 +100,20 @@ internal GeoFilter() { } - /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.). + /// + /// Relative path applicable to geo filter. (e.g. '/mypictures', '/mypicture/kitty.jpg', and etc.) + /// Serialized Name: GeoFilter.relativePath + /// public string RelativePath { get; set; } - /// Action of the geo filter, i.e. allow or block access. + /// + /// Action of the geo filter, i.e. allow or block access. + /// Serialized Name: GeoFilter.action + /// public GeoFilterAction Action { get; set; } - /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// + /// Two letter country or region codes defining user country or region access in a geo filter, e.g. AU, MX, US. + /// Serialized Name: GeoFilter.countryCodes + /// public IList CountryCodes { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilterAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilterAction.cs index e35ad6b95957..2a173323d949 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilterAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/GeoFilterAction.cs @@ -7,12 +7,21 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Action of the geo filter, i.e. allow or block access. + /// + /// Action of the geo filter, i.e. allow or block access. + /// Serialized Name: GeoFilterActions + /// public enum GeoFilterAction { - /// Block. + /// + /// Block + /// Serialized Name: GeoFilterActions.Block + /// Block, - /// Allow. + /// + /// Allow + /// Serialized Name: GeoFilterActions.Allow + /// Allow } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderAction.cs index 9e081dca1766..8364cb708826 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderAction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Action to perform. + /// + /// Action to perform + /// Serialized Name: HeaderAction + /// public readonly partial struct HeaderAction : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public HeaderAction(string value) private const string OverwriteValue = "Overwrite"; private const string DeleteValue = "Delete"; - /// Append. + /// + /// Append + /// Serialized Name: HeaderAction.Append + /// public static HeaderAction Append { get; } = new HeaderAction(AppendValue); - /// Overwrite. + /// + /// Overwrite + /// Serialized Name: HeaderAction.Overwrite + /// public static HeaderAction Overwrite { get; } = new HeaderAction(OverwriteValue); - /// Delete. + /// + /// Delete + /// Serialized Name: HeaderAction.Delete + /// public static HeaderAction Delete { get; } = new HeaderAction(DeleteValue); /// Determines if two values are the same. public static bool operator ==(HeaderAction left, HeaderAction right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.Serialization.cs index ec75e2f0a9ba..acdc4ea260ad 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HeaderActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("headerAction"u8); writer.WriteStringValue(HeaderAction.ToString()); writer.WritePropertyName("headerName"u8); @@ -45,21 +44,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("value"u8); writer.WriteStringValue(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 - } - } } HeaderActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -82,19 +66,14 @@ internal static HeaderActionProperties DeserializeHeaderActionProperties(JsonEle { return null; } - HeaderActionType typeName = default; HeaderAction headerAction = default; string headerName = default; string value = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new HeaderActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("headerAction"u8)) { headerAction = new HeaderAction(property.Value.GetString()); @@ -110,13 +89,18 @@ internal static HeaderActionProperties DeserializeHeaderActionProperties(JsonEle value = property.Value.GetString(); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new HeaderActionProperties(typeName, headerAction, headerName, value, serializedAdditionalRawData); + return new HeaderActionProperties(typeName, serializedAdditionalRawData, headerAction, headerName, value); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.cs index 04372b07eb19..b8364a158d9d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HeaderActionProperties.cs @@ -10,68 +10,52 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the request header action. - public partial class HeaderActionProperties + /// + /// Defines the parameters for the request header action. + /// Serialized Name: HeaderActionParameters + /// + public partial class HeaderActionProperties : DeliveryRuleActionProperties { - /// - /// 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 . - /// - /// Action to perform. - /// Name of the header to modify. + /// + /// Action to perform + /// Serialized Name: HeaderActionParameters.headerAction + /// + /// + /// Name of the header to modify + /// Serialized Name: HeaderActionParameters.headerName + /// /// is null. - public HeaderActionProperties(HeaderActionType actionType, HeaderAction headerAction, string headerName) + public HeaderActionProperties(HeaderAction headerAction, string headerName) { Argument.AssertNotNull(headerName, nameof(headerName)); - ActionType = actionType; HeaderAction = headerAction; HeaderName = headerName; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleHeaderActionParameters; } /// Initializes a new instance of . - /// - /// Action to perform. - /// Name of the header to modify. - /// Value for the specified action. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal HeaderActionProperties(HeaderActionType actionType, HeaderAction headerAction, string headerName, string value, IDictionary serializedAdditionalRawData) + /// + /// Action to perform + /// Serialized Name: HeaderActionParameters.headerAction + /// + /// + /// Name of the header to modify + /// Serialized Name: HeaderActionParameters.headerName + /// + /// + /// Value for the specified action + /// Serialized Name: HeaderActionParameters.value + /// + internal HeaderActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, HeaderAction headerAction, string headerName, string value) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; HeaderAction = headerAction; HeaderName = headerName; Value = value; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -79,13 +63,20 @@ internal HeaderActionProperties() { } - /// Gets or sets the action type. - public HeaderActionType ActionType { get; set; } - /// Action to perform. + /// + /// Action to perform + /// Serialized Name: HeaderActionParameters.headerAction + /// public HeaderAction HeaderAction { get; set; } - /// Name of the header to modify. + /// + /// Name of the header to modify + /// Serialized Name: HeaderActionParameters.headerName + /// public string HeaderName { get; set; } - /// Value for the specified action. + /// + /// Value for the specified action + /// Serialized Name: HeaderActionParameters.value + /// public string Value { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeProtocol.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeProtocol.cs index 1a1131442426..07079ef3cd85 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeProtocol.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeProtocol.cs @@ -7,14 +7,26 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Protocol to use for health probe. + /// + /// Protocol to use for health probe. + /// Serialized Name: ProbeProtocol + /// public enum HealthProbeProtocol { - /// NotSet. + /// + /// NotSet + /// Serialized Name: ProbeProtocol.NotSet + /// NotSet, - /// Http. + /// + /// Http + /// Serialized Name: ProbeProtocol.Http + /// Http, - /// Https. + /// + /// Https + /// Serialized Name: ProbeProtocol.Https + /// Https } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeRequestType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeRequestType.cs index 2083679ab475..02730f514db8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeRequestType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeRequestType.cs @@ -7,14 +7,26 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The type of health probe request that is made. + /// + /// The type of health probe request that is made. + /// Serialized Name: HealthProbeRequestType + /// public enum HealthProbeRequestType { - /// NotSet. + /// + /// NotSet + /// Serialized Name: HealthProbeRequestType.NotSet + /// NotSet, - /// GET. + /// + /// GET + /// Serialized Name: HealthProbeRequestType.GET + /// Get, - /// HEAD. + /// + /// HEAD + /// Serialized Name: HealthProbeRequestType.HEAD + /// Head } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeSettings.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeSettings.cs index 8616586b0c4f..f93e8dd37790 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeSettings.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HealthProbeSettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object that contains the properties to send health probes to origin. + /// + /// The JSON object that contains the properties to send health probes to origin. + /// Serialized Name: HealthProbeParameters + /// public partial class HealthProbeSettings { /// @@ -51,10 +54,22 @@ public HealthProbeSettings() } /// Initializes a new instance of . - /// The path relative to the origin that is used to determine the health of the origin. - /// The type of health probe request that is made. - /// Protocol to use for health probe. - /// The number of seconds between health probes.Default is 240sec. + /// + /// The path relative to the origin that is used to determine the health of the origin. + /// Serialized Name: HealthProbeParameters.probePath + /// + /// + /// The type of health probe request that is made. + /// Serialized Name: HealthProbeParameters.probeRequestType + /// + /// + /// Protocol to use for health probe. + /// Serialized Name: HealthProbeParameters.probeProtocol + /// + /// + /// The number of seconds between health probes.Default is 240sec. + /// Serialized Name: HealthProbeParameters.probeIntervalInSeconds + /// /// Keeps track of any properties unknown to the library. internal HealthProbeSettings(string probePath, HealthProbeRequestType? probeRequestType, HealthProbeProtocol? probeProtocol, int? probeIntervalInSeconds, IDictionary serializedAdditionalRawData) { @@ -65,13 +80,25 @@ internal HealthProbeSettings(string probePath, HealthProbeRequestType? probeRequ _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The path relative to the origin that is used to determine the health of the origin. + /// + /// The path relative to the origin that is used to determine the health of the origin. + /// Serialized Name: HealthProbeParameters.probePath + /// public string ProbePath { get; set; } - /// The type of health probe request that is made. + /// + /// The type of health probe request that is made. + /// Serialized Name: HealthProbeParameters.probeRequestType + /// public HealthProbeRequestType? ProbeRequestType { get; set; } - /// Protocol to use for health probe. + /// + /// Protocol to use for health probe. + /// Serialized Name: HealthProbeParameters.probeProtocol + /// public HealthProbeProtocol? ProbeProtocol { get; set; } - /// The number of seconds between health probes.Default is 240sec. + /// + /// The number of seconds between health probes.Default is 240sec. + /// Serialized Name: HealthProbeParameters.probeIntervalInSeconds + /// public int? ProbeIntervalInSeconds { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameAvailabilityContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameAvailabilityContent.cs index 1fec2a716090..633415e60d42 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameAvailabilityContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameAvailabilityContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of CheckHostNameAvailability API. + /// + /// Input of CheckHostNameAvailability API. + /// Serialized Name: CheckHostNameAvailabilityInput + /// public partial class HostNameAvailabilityContent { /// @@ -46,7 +49,10 @@ public partial class HostNameAvailabilityContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The host name to validate. + /// + /// The host name to validate. + /// Serialized Name: CheckHostNameAvailabilityInput.hostName + /// /// is null. public HostNameAvailabilityContent(string hostName) { @@ -56,7 +62,10 @@ public HostNameAvailabilityContent(string hostName) } /// Initializes a new instance of . - /// The host name to validate. + /// + /// The host name to validate. + /// Serialized Name: CheckHostNameAvailabilityInput.hostName + /// /// Keeps track of any properties unknown to the library. internal HostNameAvailabilityContent(string hostName, IDictionary serializedAdditionalRawData) { @@ -69,7 +78,10 @@ internal HostNameAvailabilityContent() { } - /// The host name to validate. + /// + /// The host name to validate. + /// Serialized Name: CheckHostNameAvailabilityInput.hostName + /// public string HostName { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.Serialization.cs index 95e287f59ec6..cac25cf8a46f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HostNameMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(HostNameOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } HostNameMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static HostNameMatchCondition DeserializeHostNameMatchCondition(JsonEle { return null; } - HostNameMatchConditionType typeName = default; HostNameOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new HostNameMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new HostNameOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static HostNameMatchCondition DeserializeHostNameMatchCondition(JsonEle transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static HostNameMatchCondition DeserializeHostNameMatchCondition(JsonEle serializedAdditionalRawData = rawDataDictionary; return new HostNameMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.cs index e2224e3760b1..212bf72c251b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for HostName match conditions. - public partial class HostNameMatchCondition + /// + /// Defines the parameters for HostName match conditions + /// Serialized Name: HostNameMatchConditionParameters + /// + public partial class HostNameMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public HostNameMatchCondition(HostNameMatchConditionType conditionType, HostNameOperator hostNameOperator) + /// + /// Describes operator to be matched + /// Serialized Name: HostNameMatchConditionParameters.operator + /// + public HostNameMatchCondition(HostNameOperator hostNameOperator) { - ConditionType = conditionType; HostNameOperator = hostNameOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleHostNameConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal HostNameMatchCondition(HostNameMatchConditionType conditionType, HostNameOperator hostNameOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: HostNameMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: HostNameMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: HostNameMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: HostNameMatchConditionParameters.transforms + /// + internal HostNameMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, HostNameOperator hostNameOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; HostNameOperator = hostNameOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal HostNameMatchCondition() { } - /// Gets or sets the condition type. - public HostNameMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: HostNameMatchConditionParameters.operator + /// public HostNameOperator HostNameOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: HostNameMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: HostNameMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: HostNameMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameOperator.cs index 178537443027..0b62677445e7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HostNameOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: HostNameOperator + /// public readonly partial struct HostNameOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public HostNameOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: HostNameOperator.Any + /// public static HostNameOperator Any { get; } = new HostNameOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: HostNameOperator.Equal + /// public static HostNameOperator Equal { get; } = new HostNameOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: HostNameOperator.Contains + /// public static HostNameOperator Contains { get; } = new HostNameOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: HostNameOperator.BeginsWith + /// public static HostNameOperator BeginsWith { get; } = new HostNameOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: HostNameOperator.EndsWith + /// public static HostNameOperator EndsWith { get; } = new HostNameOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: HostNameOperator.LessThan + /// public static HostNameOperator LessThan { get; } = new HostNameOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: HostNameOperator.LessThanOrEqual + /// public static HostNameOperator LessThanOrEqual { get; } = new HostNameOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: HostNameOperator.GreaterThan + /// public static HostNameOperator GreaterThan { get; } = new HostNameOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: HostNameOperator.GreaterThanOrEqual + /// public static HostNameOperator GreaterThanOrEqual { get; } = new HostNameOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: HostNameOperator.RegEx + /// public static HostNameOperator RegEx { get; } = new HostNameOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(HostNameOperator left, HostNameOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpErrorRange.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpErrorRange.cs index 6653c5fa5103..f639cc8d738a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpErrorRange.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpErrorRange.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object that represents the range for http status codes. + /// + /// The JSON object that represents the range for http status codes + /// Serialized Name: HttpErrorRangeParameters + /// public partial class HttpErrorRange { /// @@ -51,8 +54,14 @@ public HttpErrorRange() } /// Initializes a new instance of . - /// The inclusive start of the http status code range. - /// The inclusive end of the http status code range. + /// + /// The inclusive start of the http status code range. + /// Serialized Name: HttpErrorRangeParameters.begin + /// + /// + /// The inclusive end of the http status code range. + /// Serialized Name: HttpErrorRangeParameters.end + /// /// Keeps track of any properties unknown to the library. internal HttpErrorRange(int? begin, int? end, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal HttpErrorRange(int? begin, int? end, IDictionary se _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The inclusive start of the http status code range. + /// + /// The inclusive start of the http status code range. + /// Serialized Name: HttpErrorRangeParameters.begin + /// public int? Begin { get; set; } - /// The inclusive end of the http status code range. + /// + /// The inclusive end of the http status code range. + /// Serialized Name: HttpErrorRangeParameters.end + /// public int? End { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.Serialization.cs index d4c3b9d4da59..eb219053eeed 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(HttpVersionMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(HttpVersionOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } HttpVersionMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static HttpVersionMatchCondition DeserializeHttpVersionMatchCondition(J { return null; } - HttpVersionMatchConditionType typeName = default; HttpVersionOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new HttpVersionMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new HttpVersionOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static HttpVersionMatchCondition DeserializeHttpVersionMatchCondition(J transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static HttpVersionMatchCondition DeserializeHttpVersionMatchCondition(J serializedAdditionalRawData = rawDataDictionary; return new HttpVersionMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.cs index e2686d22d71a..6cdc055e2164 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for HttpVersion match conditions. - public partial class HttpVersionMatchCondition + /// + /// Defines the parameters for HttpVersion match conditions + /// Serialized Name: HttpVersionMatchConditionParameters + /// + public partial class HttpVersionMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public HttpVersionMatchCondition(HttpVersionMatchConditionType conditionType, HttpVersionOperator httpVersionOperator) + /// + /// Describes operator to be matched + /// Serialized Name: HttpVersionMatchConditionParameters.operator + /// + public HttpVersionMatchCondition(HttpVersionOperator httpVersionOperator) { - ConditionType = conditionType; HttpVersionOperator = httpVersionOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleHttpVersionConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal HttpVersionMatchCondition(HttpVersionMatchConditionType conditionType, HttpVersionOperator httpVersionOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: HttpVersionMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: HttpVersionMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: HttpVersionMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: HttpVersionMatchConditionParameters.transforms + /// + internal HttpVersionMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, HttpVersionOperator httpVersionOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; HttpVersionOperator = httpVersionOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal HttpVersionMatchCondition() { } - /// Gets or sets the condition type. - public HttpVersionMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: HttpVersionMatchConditionParameters.operator + /// public HttpVersionOperator HttpVersionOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: HttpVersionMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: HttpVersionMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: HttpVersionMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionOperator.cs index 958698ba692f..3deab3671433 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpVersionOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: HttpVersionOperator + /// public readonly partial struct HttpVersionOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public HttpVersionOperator(string value) private const string EqualValue = "Equal"; - /// Equal. + /// + /// Equal + /// Serialized Name: HttpVersionOperator.Equal + /// public static HttpVersionOperator Equal { get; } = new HttpVersionOperator(EqualValue); /// Determines if two values are the same. public static bool operator ==(HttpVersionOperator left, HttpVersionOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpsRedirect.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpsRedirect.cs index e18600f73be7..c78979a35d11 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpsRedirect.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/HttpsRedirect.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// + /// Whether to automatically redirect HTTP traffic to HTTPS traffic. Note that this is a easy way to set up this rule and it will be the first rule that gets executed. + /// Serialized Name: HttpsRedirect + /// public readonly partial struct HttpsRedirect : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public HttpsRedirect(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: HttpsRedirect.Enabled + /// public static HttpsRedirect Enabled { get; } = new HttpsRedirect(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: HttpsRedirect.Disabled + /// public static HttpsRedirect Disabled { get; } = new HttpsRedirect(DisabledValue); /// Determines if two values are the same. public static bool operator ==(HttpsRedirect left, HttpsRedirect right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IPAddressGroup.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IPAddressGroup.cs index 0f444d7b60a6..e070cce5044f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IPAddressGroup.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IPAddressGroup.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// CDN Ip address group. + /// + /// CDN Ip address group + /// Serialized Name: IpAddressGroup + /// public partial class IPAddressGroup { /// @@ -53,9 +56,18 @@ public IPAddressGroup() } /// Initializes a new instance of . - /// The delivery region of the ip address group. - /// The list of ip v4 addresses. - /// The list of ip v6 addresses. + /// + /// The delivery region of the ip address group + /// Serialized Name: IpAddressGroup.deliveryRegion + /// + /// + /// The list of ip v4 addresses. + /// Serialized Name: IpAddressGroup.ipv4Addresses + /// + /// + /// The list of ip v6 addresses. + /// Serialized Name: IpAddressGroup.ipv6Addresses + /// /// Keeps track of any properties unknown to the library. internal IPAddressGroup(string deliveryRegion, IList ipv4Addresses, IList ipv6Addresses, IDictionary serializedAdditionalRawData) { @@ -65,11 +77,20 @@ internal IPAddressGroup(string deliveryRegion, IList ipv4Addresse _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The delivery region of the ip address group. + /// + /// The delivery region of the ip address group + /// Serialized Name: IpAddressGroup.deliveryRegion + /// public string DeliveryRegion { get; set; } - /// The list of ip v4 addresses. + /// + /// The list of ip v4 addresses. + /// Serialized Name: IpAddressGroup.ipv4Addresses + /// public IList IPv4Addresses { get; } - /// The list of ip v6 addresses. + /// + /// The list of ip v6 addresses. + /// Serialized Name: IpAddressGroup.ipv6Addresses + /// public IList IPv6Addresses { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.Serialization.cs index d1d0040975b0..0839ed93d3af 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(IsDeviceMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(IsDeviceOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } IsDeviceMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static IsDeviceMatchCondition DeserializeIsDeviceMatchCondition(JsonEle { return null; } - IsDeviceMatchConditionType typeName = default; IsDeviceOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new IsDeviceMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new IsDeviceOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static IsDeviceMatchCondition DeserializeIsDeviceMatchCondition(JsonEle transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static IsDeviceMatchCondition DeserializeIsDeviceMatchCondition(JsonEle serializedAdditionalRawData = rawDataDictionary; return new IsDeviceMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.cs index 787a71000892..66460cd4425b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for IsDevice match conditions. - public partial class IsDeviceMatchCondition + /// + /// Defines the parameters for IsDevice match conditions + /// Serialized Name: IsDeviceMatchConditionParameters + /// + public partial class IsDeviceMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public IsDeviceMatchCondition(IsDeviceMatchConditionType conditionType, IsDeviceOperator isDeviceOperator) + /// + /// Describes operator to be matched + /// Serialized Name: IsDeviceMatchConditionParameters.operator + /// + public IsDeviceMatchCondition(IsDeviceOperator isDeviceOperator) { - ConditionType = conditionType; IsDeviceOperator = isDeviceOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleIsDeviceConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal IsDeviceMatchCondition(IsDeviceMatchConditionType conditionType, IsDeviceOperator isDeviceOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: IsDeviceMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: IsDeviceMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: IsDeviceMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: IsDeviceMatchConditionParameters.transforms + /// + internal IsDeviceMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, IsDeviceOperator isDeviceOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; IsDeviceOperator = isDeviceOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal IsDeviceMatchCondition() { } - /// Gets or sets the condition type. - public IsDeviceMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: IsDeviceMatchConditionParameters.operator + /// public IsDeviceOperator IsDeviceOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: IsDeviceMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: IsDeviceMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: IsDeviceMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionMatchValue.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionMatchValue.cs index 971b8880e322..43bf61d6ad06 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionMatchValue.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceMatchConditionMatchValue.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The IsDeviceMatchConditionMatchValue. + /// + /// The IsDeviceMatchConditionMatchValue. + /// Serialized Name: IsDeviceMatchValue + /// public readonly partial struct IsDeviceMatchConditionMatchValue : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public IsDeviceMatchConditionMatchValue(string value) private const string MobileValue = "Mobile"; private const string DesktopValue = "Desktop"; - /// Mobile. + /// + /// Mobile + /// Serialized Name: IsDeviceMatchValue.Mobile + /// public static IsDeviceMatchConditionMatchValue Mobile { get; } = new IsDeviceMatchConditionMatchValue(MobileValue); - /// Desktop. + /// + /// Desktop + /// Serialized Name: IsDeviceMatchValue.Desktop + /// public static IsDeviceMatchConditionMatchValue Desktop { get; } = new IsDeviceMatchConditionMatchValue(DesktopValue); /// Determines if two values are the same. public static bool operator ==(IsDeviceMatchConditionMatchValue left, IsDeviceMatchConditionMatchValue right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceOperator.cs index 69d08007c12b..5101f27a0b30 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/IsDeviceOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: IsDeviceOperator + /// public readonly partial struct IsDeviceOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public IsDeviceOperator(string value) private const string EqualValue = "Equal"; - /// Equal. + /// + /// Equal + /// Serialized Name: IsDeviceOperator.Equal + /// public static IsDeviceOperator Equal { get; } = new IsDeviceOperator(EqualValue); /// Determines if two values are the same. public static bool operator ==(IsDeviceOperator left, IsDeviceOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.Serialization.cs index 4f3bd3244fd2..02df78a065c0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(KeyVaultCertificateSource)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(SourceType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("subscriptionId"u8); writer.WriteStringValue(SubscriptionId); writer.WritePropertyName("resourceGroupName"u8); @@ -53,21 +52,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(UpdateRule.ToString()); writer.WritePropertyName("deleteRule"u8); writer.WriteStringValue(DeleteRule.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 - } - } } KeyVaultCertificateSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -90,7 +74,6 @@ internal static KeyVaultCertificateSource DeserializeKeyVaultCertificateSource(J { return null; } - KeyVaultCertificateSourceType typeName = default; string subscriptionId = default; string resourceGroupName = default; string vaultName = default; @@ -98,15 +81,11 @@ internal static KeyVaultCertificateSource DeserializeKeyVaultCertificateSource(J string secretVersion = default; CertificateUpdateAction updateRule = default; CertificateDeleteAction deleteRule = default; + CertificateSourceParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new KeyVaultCertificateSourceType(property.Value.GetString()); - continue; - } if (property.NameEquals("subscriptionId"u8)) { subscriptionId = property.Value.GetString(); @@ -142,6 +121,11 @@ internal static KeyVaultCertificateSource DeserializeKeyVaultCertificateSource(J deleteRule = new CertificateDeleteAction(property.Value.GetString()); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new CertificateSourceParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -150,14 +134,14 @@ internal static KeyVaultCertificateSource DeserializeKeyVaultCertificateSource(J serializedAdditionalRawData = rawDataDictionary; return new KeyVaultCertificateSource( typeName, + serializedAdditionalRawData, subscriptionId, resourceGroupName, vaultName, secretName, secretVersion, updateRule, - deleteRule, - serializedAdditionalRawData); + deleteRule); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.cs index 5b6c56f6ccc6..7840c7b6b251 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultCertificateSource.cs @@ -10,79 +10,87 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. - public partial class KeyVaultCertificateSource + /// + /// Describes the parameters for using a user's KeyVault certificate for securing custom domain. + /// Serialized Name: KeyVaultCertificateSourceParameters + /// + public partial class KeyVaultCertificateSource : CertificateSourceProperties { - /// - /// 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 . - /// - /// Subscription Id of the user's Key Vault containing the SSL certificate. - /// Resource group of the user's Key Vault containing the SSL certificate. - /// The name of the user's Key Vault containing the SSL certificate. - /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. - /// Describes the action that shall be taken when the certificate is updated in Key Vault. - /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + /// Subscription Id of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.subscriptionId + /// + /// + /// Resource group of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.resourceGroupName + /// + /// + /// The name of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.vaultName + /// + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.secretName + /// + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.updateRule + /// + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.deleteRule + /// /// , , or is null. - public KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule) + public KeyVaultCertificateSource(string subscriptionId, string resourceGroupName, string vaultName, string secretName, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule) { Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNull(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNull(vaultName, nameof(vaultName)); Argument.AssertNotNull(secretName, nameof(secretName)); - SourceType = sourceType; SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; VaultName = vaultName; SecretName = secretName; UpdateRule = updateRule; DeleteRule = deleteRule; + TypeName = CertificateSourceParametersType.KeyVaultCertificateSourceParameters; } /// Initializes a new instance of . - /// - /// Subscription Id of the user's Key Vault containing the SSL certificate. - /// Resource group of the user's Key Vault containing the SSL certificate. - /// The name of the user's Key Vault containing the SSL certificate. - /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. - /// The version(GUID) of Key Vault Secret in Key Vault. - /// Describes the action that shall be taken when the certificate is updated in Key Vault. - /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// Serialized Name: CertificateSourceParameters.typeName. /// Keeps track of any properties unknown to the library. - internal KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule, IDictionary serializedAdditionalRawData) + /// + /// Subscription Id of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.subscriptionId + /// + /// + /// Resource group of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.resourceGroupName + /// + /// + /// The name of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.vaultName + /// + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.secretName + /// + /// + /// The version(GUID) of Key Vault Secret in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.secretVersion + /// + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.updateRule + /// + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.deleteRule + /// + internal KeyVaultCertificateSource(CertificateSourceParametersType typeName, IDictionary serializedAdditionalRawData, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule) : base(typeName, serializedAdditionalRawData) { - SourceType = sourceType; SubscriptionId = subscriptionId; ResourceGroupName = resourceGroupName; VaultName = vaultName; @@ -90,7 +98,7 @@ internal KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, str SecretVersion = secretVersion; UpdateRule = updateRule; DeleteRule = deleteRule; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -98,21 +106,40 @@ internal KeyVaultCertificateSource() { } - /// Gets or sets the source type. - public KeyVaultCertificateSourceType SourceType { get; set; } - /// Subscription Id of the user's Key Vault containing the SSL certificate. + /// + /// Subscription Id of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.subscriptionId + /// public string SubscriptionId { get; set; } - /// Resource group of the user's Key Vault containing the SSL certificate. + /// + /// Resource group of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.resourceGroupName + /// public string ResourceGroupName { get; set; } - /// The name of the user's Key Vault containing the SSL certificate. + /// + /// The name of the user's Key Vault containing the SSL certificate + /// Serialized Name: KeyVaultCertificateSourceParameters.vaultName + /// public string VaultName { get; set; } - /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// + /// The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.secretName + /// public string SecretName { get; set; } - /// The version(GUID) of Key Vault Secret in Key Vault. + /// + /// The version(GUID) of Key Vault Secret in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.secretVersion + /// public string SecretVersion { get; set; } - /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// + /// Describes the action that shall be taken when the certificate is updated in Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.updateRule + /// public CertificateUpdateAction UpdateRule { get; set; } - /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// + /// Describes the action that shall be taken when the certificate is removed from Key Vault. + /// Serialized Name: KeyVaultCertificateSourceParameters.deleteRule + /// public CertificateDeleteAction DeleteRule { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKey.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKey.cs index 5e300968c20c..12ca6e3949b9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKey.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKey.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes the parameters for using a user's KeyVault for URL Signing Key. + /// + /// Describes the parameters for using a user's KeyVault for URL Signing Key. + /// Serialized Name: KeyVaultSigningKeyParameters + /// public partial class KeyVaultSigningKey { /// @@ -46,12 +49,27 @@ public partial class KeyVaultSigningKey private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// - /// Subscription Id of the user's Key Vault containing the secret. - /// Resource group of the user's Key Vault containing the secret. - /// The name of the user's Key Vault containing the secret. - /// The name of secret in Key Vault. - /// The version(GUID) of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.typeName. + /// + /// Subscription Id of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.subscriptionId + /// + /// + /// Resource group of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.resourceGroupName + /// + /// + /// The name of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.vaultName + /// + /// + /// The name of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretName + /// + /// + /// The version(GUID) of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretVersion + /// /// , , , or is null. public KeyVaultSigningKey(KeyVaultSigningKeyType keyType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion) { @@ -70,12 +88,27 @@ public KeyVaultSigningKey(KeyVaultSigningKeyType keyType, string subscriptionId, } /// Initializes a new instance of . - /// - /// Subscription Id of the user's Key Vault containing the secret. - /// Resource group of the user's Key Vault containing the secret. - /// The name of the user's Key Vault containing the secret. - /// The name of secret in Key Vault. - /// The version(GUID) of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.typeName. + /// + /// Subscription Id of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.subscriptionId + /// + /// + /// Resource group of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.resourceGroupName + /// + /// + /// The name of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.vaultName + /// + /// + /// The name of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretName + /// + /// + /// The version(GUID) of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretVersion + /// /// Keeps track of any properties unknown to the library. internal KeyVaultSigningKey(KeyVaultSigningKeyType keyType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion, IDictionary serializedAdditionalRawData) { @@ -93,17 +126,32 @@ internal KeyVaultSigningKey() { } - /// Gets or sets the key type. + /// Serialized Name: KeyVaultSigningKeyParameters.typeName. public KeyVaultSigningKeyType KeyType { get; set; } - /// Subscription Id of the user's Key Vault containing the secret. + /// + /// Subscription Id of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.subscriptionId + /// public string SubscriptionId { get; set; } - /// Resource group of the user's Key Vault containing the secret. + /// + /// Resource group of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.resourceGroupName + /// public string ResourceGroupName { get; set; } - /// The name of the user's Key Vault containing the secret. + /// + /// The name of the user's Key Vault containing the secret + /// Serialized Name: KeyVaultSigningKeyParameters.vaultName + /// public string VaultName { get; set; } - /// The name of secret in Key Vault. + /// + /// The name of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretName + /// public string SecretName { get; set; } - /// The version(GUID) of secret in Key Vault. + /// + /// The version(GUID) of secret in Key Vault. + /// Serialized Name: KeyVaultSigningKeyParameters.secretVersion + /// public string SecretVersion { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKeyType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKeyType.cs index 19b6c3800789..b972496f273f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKeyType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/KeyVaultSigningKeyType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The KeyVaultSigningKeyType. + /// + /// The KeyVaultSigningKeyType. + /// Serialized Name: KeyVaultSigningKeyParametersType + /// public readonly partial struct KeyVaultSigningKeyType : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public KeyVaultSigningKeyType(string value) private const string KeyVaultSigningKeyValue = "KeyVaultSigningKeyParameters"; - /// KeyVaultSigningKeyParameters. + /// + /// KeyVaultSigningKeyParameters + /// Serialized Name: KeyVaultSigningKeyParametersType.KeyVaultSigningKeyParameters + /// public static KeyVaultSigningKeyType KeyVaultSigningKey { get; } = new KeyVaultSigningKeyType(KeyVaultSigningKeyValue); /// Determines if two values are the same. public static bool operator ==(KeyVaultSigningKeyType left, KeyVaultSigningKeyType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LinkToDefaultDomain.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LinkToDefaultDomain.cs index 49c4fe84f548..83cae2eb2b6c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LinkToDefaultDomain.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LinkToDefaultDomain.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// whether this route will be linked to the default endpoint domain. + /// + /// whether this route will be linked to the default endpoint domain. + /// Serialized Name: LinkToDefaultDomain + /// public readonly partial struct LinkToDefaultDomain : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public LinkToDefaultDomain(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: LinkToDefaultDomain.Enabled + /// public static LinkToDefaultDomain Enabled { get; } = new LinkToDefaultDomain(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: LinkToDefaultDomain.Disabled + /// public static LinkToDefaultDomain Disabled { get; } = new LinkToDefaultDomain(DisabledValue); /// Determines if two values are the same. public static bool operator ==(LinkToDefaultDomain left, LinkToDefaultDomain right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadBalancingSettings.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadBalancingSettings.cs index fcc6ab244cdd..ea9147f9a657 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadBalancingSettings.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadBalancingSettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Round-Robin load balancing settings for a backend pool. + /// + /// Round-Robin load balancing settings for a backend pool + /// Serialized Name: LoadBalancingSettingsParameters + /// public partial class LoadBalancingSettings { /// @@ -51,9 +54,18 @@ public LoadBalancingSettings() } /// Initializes a new instance of . - /// The number of samples to consider for load balancing decisions. - /// The number of samples within the sample period that must succeed. - /// The additional latency in milliseconds for probes to fall into the lowest latency bucket. + /// + /// The number of samples to consider for load balancing decisions + /// Serialized Name: LoadBalancingSettingsParameters.sampleSize + /// + /// + /// The number of samples within the sample period that must succeed + /// Serialized Name: LoadBalancingSettingsParameters.successfulSamplesRequired + /// + /// + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket + /// Serialized Name: LoadBalancingSettingsParameters.additionalLatencyInMilliseconds + /// /// Keeps track of any properties unknown to the library. internal LoadBalancingSettings(int? sampleSize, int? successfulSamplesRequired, int? additionalLatencyInMilliseconds, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal LoadBalancingSettings(int? sampleSize, int? successfulSamplesRequired, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The number of samples to consider for load balancing decisions. + /// + /// The number of samples to consider for load balancing decisions + /// Serialized Name: LoadBalancingSettingsParameters.sampleSize + /// public int? SampleSize { get; set; } - /// The number of samples within the sample period that must succeed. + /// + /// The number of samples within the sample period that must succeed + /// Serialized Name: LoadBalancingSettingsParameters.successfulSamplesRequired + /// public int? SuccessfulSamplesRequired { get; set; } - /// The additional latency in milliseconds for probes to fall into the lowest latency bucket. + /// + /// The additional latency in milliseconds for probes to fall into the lowest latency bucket + /// Serialized Name: LoadBalancingSettingsParameters.additionalLatencyInMilliseconds + /// public int? AdditionalLatencyInMilliseconds { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadContent.cs index 1cf496c0f619..f9676230e158 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LoadContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Parameters required for content load. + /// + /// Parameters required for content load. + /// Serialized Name: LoadParameters + /// public partial class LoadContent { /// @@ -47,7 +50,10 @@ public partial class LoadContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// Serialized Name: LoadParameters.contentPaths + /// /// is null. public LoadContent(IEnumerable contentPaths) { @@ -57,7 +63,10 @@ public LoadContent(IEnumerable contentPaths) } /// Initializes a new instance of . - /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// Serialized Name: LoadParameters.contentPaths + /// /// Keeps track of any properties unknown to the library. internal LoadContent(IList contentPaths, IDictionary serializedAdditionalRawData) { @@ -70,7 +79,10 @@ internal LoadContent() { } - /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// + /// The path to the content to be loaded. Path should be a relative file URL of the origin. + /// Serialized Name: LoadParameters.contentPaths + /// public IList ContentPaths { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetric.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetric.cs index e2c48bb9c14b..1c64ad0b7500 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetric.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The LogMetric. + /// + /// The LogMetric. + /// Serialized Name: LogMetric + /// public readonly partial struct LogMetric : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public LogMetric(string value) private const string OriginRequestBandwidthValue = "originRequestBandwidth"; private const string TotalLatencyValue = "totalLatency"; - /// clientRequestCount. + /// + /// clientRequestCount + /// Serialized Name: LogMetric.clientRequestCount + /// public static LogMetric ClientRequestCount { get; } = new LogMetric(ClientRequestCountValue); - /// clientRequestTraffic. + /// + /// clientRequestTraffic + /// Serialized Name: LogMetric.clientRequestTraffic + /// public static LogMetric ClientRequestTraffic { get; } = new LogMetric(ClientRequestTrafficValue); - /// clientRequestBandwidth. + /// + /// clientRequestBandwidth + /// Serialized Name: LogMetric.clientRequestBandwidth + /// public static LogMetric ClientRequestBandwidth { get; } = new LogMetric(ClientRequestBandwidthValue); - /// originRequestTraffic. + /// + /// originRequestTraffic + /// Serialized Name: LogMetric.originRequestTraffic + /// public static LogMetric OriginRequestTraffic { get; } = new LogMetric(OriginRequestTrafficValue); - /// originRequestBandwidth. + /// + /// originRequestBandwidth + /// Serialized Name: LogMetric.originRequestBandwidth + /// public static LogMetric OriginRequestBandwidth { get; } = new LogMetric(OriginRequestBandwidthValue); - /// totalLatency. + /// + /// totalLatency + /// Serialized Name: LogMetric.totalLatency + /// public static LogMetric TotalLatency { get; } = new LogMetric(TotalLatencyValue); /// Determines if two values are the same. public static bool operator ==(LogMetric left, LogMetric right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGranularity.cs index cb88c6cf2ae2..b4898631e169 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGranularity.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGranularity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The LogMetricsGranularity. + /// + /// The LogMetricsGranularity. + /// Serialized Name: LogMetricsGranularity + /// public readonly partial struct LogMetricsGranularity : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public LogMetricsGranularity(string value) private const string PT1HValue = "PT1H"; private const string P1DValue = "P1D"; - /// PT5M. + /// + /// PT5M + /// Serialized Name: LogMetricsGranularity.PT5M + /// public static LogMetricsGranularity PT5M { get; } = new LogMetricsGranularity(PT5MValue); - /// PT1H. + /// + /// PT1H + /// Serialized Name: LogMetricsGranularity.PT1H + /// public static LogMetricsGranularity PT1H { get; } = new LogMetricsGranularity(PT1HValue); - /// P1D. + /// + /// P1D + /// Serialized Name: LogMetricsGranularity.P1D + /// public static LogMetricsGranularity P1D { get; } = new LogMetricsGranularity(P1DValue); /// Determines if two values are the same. public static bool operator ==(LogMetricsGranularity left, LogMetricsGranularity right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGroupBy.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGroupBy.cs index 0a4ff7d7bf74..2f2b037d3bad 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGroupBy.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogMetricsGroupBy.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The LogMetricsGroupBy. + /// + /// The LogMetricsGroupBy. + /// Serialized Name: LogMetricsGroupBy + /// public readonly partial struct LogMetricsGroupBy : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public LogMetricsGroupBy(string value) private const string CountryOrRegionValue = "countryOrRegion"; private const string CustomDomainValue = "customDomain"; - /// httpStatusCode. + /// + /// httpStatusCode + /// Serialized Name: LogMetricsGroupBy.httpStatusCode + /// public static LogMetricsGroupBy HttpStatusCode { get; } = new LogMetricsGroupBy(HttpStatusCodeValue); - /// protocol. + /// + /// protocol + /// Serialized Name: LogMetricsGroupBy.protocol + /// public static LogMetricsGroupBy Protocol { get; } = new LogMetricsGroupBy(ProtocolValue); - /// cacheStatus. + /// + /// cacheStatus + /// Serialized Name: LogMetricsGroupBy.cacheStatus + /// public static LogMetricsGroupBy CacheStatus { get; } = new LogMetricsGroupBy(CacheStatusValue); - /// countryOrRegion. + /// + /// countryOrRegion + /// Serialized Name: LogMetricsGroupBy.countryOrRegion + /// public static LogMetricsGroupBy CountryOrRegion { get; } = new LogMetricsGroupBy(CountryOrRegionValue); - /// customDomain. + /// + /// customDomain + /// Serialized Name: LogMetricsGroupBy.customDomain + /// public static LogMetricsGroupBy CustomDomain { get; } = new LogMetricsGroupBy(CustomDomainValue); /// Determines if two values are the same. public static bool operator ==(LogMetricsGroupBy left, LogMetricsGroupBy right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRanking.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRanking.cs index b72db0bb0f0c..c2229f4a5524 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRanking.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRanking.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The LogRanking. + /// + /// The LogRanking. + /// Serialized Name: LogRanking + /// public readonly partial struct LogRanking : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public LogRanking(string value) private const string UserAgentValue = "userAgent"; private const string CountryOrRegionValue = "countryOrRegion"; - /// url. + /// + /// url + /// Serialized Name: LogRanking.url + /// public static LogRanking Uri { get; } = new LogRanking(UriValue); - /// referrer. + /// + /// referrer + /// Serialized Name: LogRanking.referrer + /// public static LogRanking Referrer { get; } = new LogRanking(ReferrerValue); - /// browser. + /// + /// browser + /// Serialized Name: LogRanking.browser + /// public static LogRanking Browser { get; } = new LogRanking(BrowserValue); - /// userAgent. + /// + /// userAgent + /// Serialized Name: LogRanking.userAgent + /// public static LogRanking UserAgent { get; } = new LogRanking(UserAgentValue); - /// countryOrRegion. + /// + /// countryOrRegion + /// Serialized Name: LogRanking.countryOrRegion + /// public static LogRanking CountryOrRegion { get; } = new LogRanking(CountryOrRegionValue); /// Determines if two values are the same. public static bool operator ==(LogRanking left, LogRanking right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRankingMetric.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRankingMetric.cs index 14b31b5e6b01..6a797878394c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRankingMetric.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/LogRankingMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The LogRankingMetric. + /// + /// The LogRankingMetric. + /// Serialized Name: LogRankingMetric + /// public readonly partial struct LogRankingMetric : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public LogRankingMetric(string value) private const string UserErrorCountValue = "userErrorCount"; private const string ErrorCountValue = "errorCount"; - /// clientRequestCount. + /// + /// clientRequestCount + /// Serialized Name: LogRankingMetric.clientRequestCount + /// public static LogRankingMetric ClientRequestCount { get; } = new LogRankingMetric(ClientRequestCountValue); - /// clientRequestTraffic. + /// + /// clientRequestTraffic + /// Serialized Name: LogRankingMetric.clientRequestTraffic + /// public static LogRankingMetric ClientRequestTraffic { get; } = new LogRankingMetric(ClientRequestTrafficValue); - /// hitCount. + /// + /// hitCount + /// Serialized Name: LogRankingMetric.hitCount + /// public static LogRankingMetric HitCount { get; } = new LogRankingMetric(HitCountValue); - /// missCount. + /// + /// missCount + /// Serialized Name: LogRankingMetric.missCount + /// public static LogRankingMetric MissCount { get; } = new LogRankingMetric(MissCountValue); - /// userErrorCount. + /// + /// userErrorCount + /// Serialized Name: LogRankingMetric.userErrorCount + /// public static LogRankingMetric UserErrorCount { get; } = new LogRankingMetric(UserErrorCountValue); - /// errorCount. + /// + /// errorCount + /// Serialized Name: LogRankingMetric.errorCount + /// public static LogRankingMetric ErrorCount { get; } = new LogRankingMetric(ErrorCountValue); /// Determines if two values are the same. public static bool operator ==(LogRankingMetric left, LogRankingMetric right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedCertificateProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedCertificateProperties.cs index a19726419422..3951937296e5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedCertificateProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedCertificateProperties.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Managed Certificate used for https. + /// + /// Managed Certificate used for https + /// Serialized Name: ManagedCertificateParameters + /// public partial class ManagedCertificateProperties : FrontDoorSecretProperties { /// Initializes a new instance of . @@ -20,10 +23,19 @@ public ManagedCertificateProperties() } /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. - /// Subject name in the certificate. - /// Certificate expiration date. + /// + /// Subject name in the certificate. + /// Serialized Name: ManagedCertificateParameters.subject + /// + /// + /// Certificate expiration date. + /// Serialized Name: ManagedCertificateParameters.expirationDate + /// internal ManagedCertificateProperties(SecretType secretType, IDictionary serializedAdditionalRawData, string subject, DateTimeOffset? expiresOn) : base(secretType, serializedAdditionalRawData) { Subject = subject; @@ -31,9 +43,15 @@ internal ManagedCertificateProperties(SecretType secretType, IDictionary Subject name in the certificate. + /// + /// Subject name in the certificate. + /// Serialized Name: ManagedCertificateParameters.subject + /// public string Subject { get; } - /// Certificate expiration date. + /// + /// Certificate expiration date. + /// Serialized Name: ManagedCertificateParameters.expirationDate + /// public DateTimeOffset? ExpiresOn { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleDefinition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleDefinition.cs index 40841e4e0a15..351c123182c2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleDefinition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleDefinition.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes a managed rule definition. + /// + /// Describes a managed rule definition. + /// Serialized Name: ManagedRuleDefinition + /// public partial class ManagedRuleDefinition { /// @@ -51,8 +54,14 @@ internal ManagedRuleDefinition() } /// Initializes a new instance of . - /// Identifier for the managed rule. - /// Describes the functionality of the managed rule. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleDefinition.ruleId + /// + /// + /// Describes the functionality of the managed rule. + /// Serialized Name: ManagedRuleDefinition.description + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleDefinition(string ruleId, string description, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal ManagedRuleDefinition(string ruleId, string description, IDictionary Identifier for the managed rule. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleDefinition.ruleId + /// public string RuleId { get; } - /// Describes the functionality of the managed rule. + /// + /// Describes the functionality of the managed rule. + /// Serialized Name: ManagedRuleDefinition.description + /// public string Description { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupDefinition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupDefinition.cs index 93076e9e1a03..46ad93295930 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupDefinition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupDefinition.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes a managed rule group. + /// + /// Describes a managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition + /// public partial class ManagedRuleGroupDefinition { /// @@ -52,9 +55,18 @@ internal ManagedRuleGroupDefinition() } /// Initializes a new instance of . - /// Name of the managed rule group. - /// Description of the managed rule group. - /// List of rules within the managed rule group. + /// + /// Name of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.ruleGroupName + /// + /// + /// Description of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.description + /// + /// + /// List of rules within the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.rules + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleGroupDefinition(string ruleGroupName, string description, IReadOnlyList rules, IDictionary serializedAdditionalRawData) { @@ -64,11 +76,20 @@ internal ManagedRuleGroupDefinition(string ruleGroupName, string description, IR _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Name of the managed rule group. + /// + /// Name of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.ruleGroupName + /// public string RuleGroupName { get; } - /// Description of the managed rule group. + /// + /// Description of the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.description + /// public string Description { get; } - /// List of rules within the managed rule group. + /// + /// List of rules within the managed rule group. + /// Serialized Name: ManagedRuleGroupDefinition.rules + /// public IReadOnlyList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs index 291423db652b..fb50a6529f36 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleGroupOverrideSetting.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines a managed rule group override setting. + /// + /// Defines a managed rule group override setting. + /// Serialized Name: ManagedRuleGroupOverride + /// public partial class ManagedRuleGroupOverrideSetting { /// @@ -46,7 +49,10 @@ public partial class ManagedRuleGroupOverrideSetting private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Describes the managed rule group within the rule set to override. + /// + /// Describes the managed rule group within the rule set to override + /// Serialized Name: ManagedRuleGroupOverride.ruleGroupName + /// /// is null. public ManagedRuleGroupOverrideSetting(string ruleGroupName) { @@ -57,8 +63,14 @@ public ManagedRuleGroupOverrideSetting(string ruleGroupName) } /// Initializes a new instance of . - /// Describes the managed rule group within the rule set to override. - /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. + /// + /// Describes the managed rule group within the rule set to override + /// Serialized Name: ManagedRuleGroupOverride.ruleGroupName + /// + /// + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. + /// Serialized Name: ManagedRuleGroupOverride.rules + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleGroupOverrideSetting(string ruleGroupName, IList rules, IDictionary serializedAdditionalRawData) { @@ -72,9 +84,15 @@ internal ManagedRuleGroupOverrideSetting() { } - /// Describes the managed rule group within the rule set to override. + /// + /// Describes the managed rule group within the rule set to override + /// Serialized Name: ManagedRuleGroupOverride.ruleGroupName + /// public string RuleGroupName { get; set; } - /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. + /// + /// List of rules that will be enabled. If none specified, all rules in the group will be disabled. + /// Serialized Name: ManagedRuleGroupOverride.rules + /// public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleOverrideSetting.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleOverrideSetting.cs index dd6983ff2562..93ecc069930f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleOverrideSetting.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleOverrideSetting.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines a managed rule group override setting. + /// + /// Defines a managed rule group override setting. + /// Serialized Name: ManagedRuleOverride + /// public partial class ManagedRuleOverrideSetting { /// @@ -46,7 +49,10 @@ public partial class ManagedRuleOverrideSetting private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Identifier for the managed rule. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleOverride.ruleId + /// /// is null. public ManagedRuleOverrideSetting(string ruleId) { @@ -56,9 +62,18 @@ public ManagedRuleOverrideSetting(string ruleId) } /// Initializes a new instance of . - /// Identifier for the managed rule. - /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. - /// Describes the override action to be applied when rule matches. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleOverride.ruleId + /// + /// + /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + /// Serialized Name: ManagedRuleOverride.enabledState + /// + /// + /// Describes the override action to be applied when rule matches. + /// Serialized Name: ManagedRuleOverride.action + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleOverrideSetting(string ruleId, ManagedRuleSetupState? enabledState, OverrideActionType? action, IDictionary serializedAdditionalRawData) { @@ -73,11 +88,20 @@ internal ManagedRuleOverrideSetting() { } - /// Identifier for the managed rule. + /// + /// Identifier for the managed rule. + /// Serialized Name: ManagedRuleOverride.ruleId + /// public string RuleId { get; set; } - /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + /// + /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + /// Serialized Name: ManagedRuleOverride.enabledState + /// public ManagedRuleSetupState? EnabledState { get; set; } - /// Describes the override action to be applied when rule matches. + /// + /// Describes the override action to be applied when rule matches. + /// Serialized Name: ManagedRuleOverride.action + /// public OverrideActionType? Action { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinition.cs index 5b3438495e81..c2506e0e15ba 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinition.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes a managed rule set definition. + /// + /// Describes a managed rule set definition. + /// Serialized Name: ManagedRuleSetDefinition + /// public partial class ManagedRuleSetDefinition : ResourceData { /// @@ -58,11 +61,26 @@ public ManagedRuleSetDefinition() /// The name. /// The resourceType. /// The systemData. - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. - /// Provisioning state of the managed rule set. - /// Type of the managed rule set. - /// Version of the managed rule set type. - /// Rule groups of the managed rule set. + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: ManagedRuleSetDefinition.sku + /// + /// + /// Provisioning state of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.provisioningState + /// + /// + /// Type of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetType + /// + /// + /// Version of the managed rule set type. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetVersion + /// + /// + /// Rule groups of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleGroups + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleSetDefinition(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, CdnSku sku, string provisioningState, string ruleSetType, string ruleSetVersion, IReadOnlyList ruleGroups, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -74,9 +92,15 @@ internal ManagedRuleSetDefinition(ResourceIdentifier id, string name, ResourceTy _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// + /// The pricing tier (defines a CDN provider, feature list and rate) of the CdnWebApplicationFirewallPolicy. + /// Serialized Name: ManagedRuleSetDefinition.sku + /// internal CdnSku Sku { get; set; } - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// public CdnSkuName? SkuName { get => Sku is null ? default : Sku.Name; @@ -88,13 +112,25 @@ public CdnSkuName? SkuName } } - /// Provisioning state of the managed rule set. + /// + /// Provisioning state of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.provisioningState + /// public string ProvisioningState { get; } - /// Type of the managed rule set. + /// + /// Type of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetType + /// public string RuleSetType { get; } - /// Version of the managed rule set type. + /// + /// Version of the managed rule set type. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleSetVersion + /// public string RuleSetVersion { get; } - /// Rule groups of the managed rule set. + /// + /// Rule groups of the managed rule set. + /// Serialized Name: ManagedRuleSetDefinition.properties.ruleGroups + /// public IReadOnlyList RuleGroups { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinitionList.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinitionList.cs index 004888beb960..48bde1fde6f1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinitionList.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetDefinitionList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// List of managed rule set definitions available for use in a policy. + /// + /// List of managed rule set definitions available for use in a policy. + /// Serialized Name: ManagedRuleSetDefinitionList + /// internal partial class ManagedRuleSetDefinitionList { /// @@ -52,8 +55,14 @@ internal ManagedRuleSetDefinitionList() } /// Initializes a new instance of . - /// List of managed rule set definitions. - /// URL to retrieve next set of managed rule set definitions. + /// + /// List of managed rule set definitions. + /// Serialized Name: ManagedRuleSetDefinitionList.value + /// + /// + /// URL to retrieve next set of managed rule set definitions. + /// Serialized Name: ManagedRuleSetDefinitionList.nextLink + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleSetDefinitionList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal ManagedRuleSetDefinitionList(IReadOnlyList va _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of managed rule set definitions. + /// + /// List of managed rule set definitions. + /// Serialized Name: ManagedRuleSetDefinitionList.value + /// public IReadOnlyList Value { get; } - /// URL to retrieve next set of managed rule set definitions. + /// + /// URL to retrieve next set of managed rule set definitions. + /// Serialized Name: ManagedRuleSetDefinitionList.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetList.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetList.cs index 9d81aaf94ea1..c122e0d99a0f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetList.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the list of managed rule sets for the policy. + /// + /// Defines the list of managed rule sets for the policy. + /// Serialized Name: ManagedRuleSetList + /// internal partial class ManagedRuleSetList { /// @@ -52,7 +55,10 @@ public ManagedRuleSetList() } /// Initializes a new instance of . - /// List of rule sets. + /// + /// List of rule sets. + /// Serialized Name: ManagedRuleSetList.managedRuleSets + /// /// Keeps track of any properties unknown to the library. internal ManagedRuleSetList(IList managedRuleSets, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal ManagedRuleSetList(IList managedRuleSets, IDic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of rule sets. + /// + /// List of rule sets. + /// Serialized Name: ManagedRuleSetList.managedRuleSets + /// public IList ManagedRuleSets { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetupState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetupState.cs index b07fe6389eaf..e876c7621fe5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetupState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ManagedRuleSetupState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + /// + /// Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not specified. + /// Serialized Name: ManagedRuleEnabledState + /// public readonly partial struct ManagedRuleSetupState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ManagedRuleSetupState(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; - /// Disabled. + /// + /// Disabled + /// Serialized Name: ManagedRuleEnabledState.Disabled + /// public static ManagedRuleSetupState Disabled { get; } = new ManagedRuleSetupState(DisabledValue); - /// Enabled. + /// + /// Enabled + /// Serialized Name: ManagedRuleEnabledState.Enabled + /// public static ManagedRuleSetupState Enabled { get; } = new ManagedRuleSetupState(EnabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedRuleSetupState left, ManagedRuleSetupState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchOperator.cs index f15b26d23f54..a9906274eaa9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: Operator + /// public readonly partial struct MatchOperator : IEquatable { private readonly string _value; @@ -35,29 +38,65 @@ public MatchOperator(string value) private const string EndsWithValue = "EndsWith"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: Operator.Any + /// public static MatchOperator Any { get; } = new MatchOperator(AnyValue); - /// IPMatch. + /// + /// IPMatch + /// Serialized Name: Operator.IPMatch + /// public static MatchOperator IPMatch { get; } = new MatchOperator(IPMatchValue); - /// GeoMatch. + /// + /// GeoMatch + /// Serialized Name: Operator.GeoMatch + /// public static MatchOperator GeoMatch { get; } = new MatchOperator(GeoMatchValue); - /// Equal. + /// + /// Equal + /// Serialized Name: Operator.Equal + /// public static MatchOperator Equal { get; } = new MatchOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: Operator.Contains + /// public static MatchOperator Contains { get; } = new MatchOperator(ContainsValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: Operator.LessThan + /// public static MatchOperator LessThan { get; } = new MatchOperator(LessThanValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: Operator.GreaterThan + /// public static MatchOperator GreaterThan { get; } = new MatchOperator(GreaterThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: Operator.LessThanOrEqual + /// public static MatchOperator LessThanOrEqual { get; } = new MatchOperator(LessThanOrEqualValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: Operator.GreaterThanOrEqual + /// public static MatchOperator GreaterThanOrEqual { get; } = new MatchOperator(GreaterThanOrEqualValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: Operator.BeginsWith + /// public static MatchOperator BeginsWith { get; } = new MatchOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: Operator.EndsWith + /// public static MatchOperator EndsWith { get; } = new MatchOperator(EndsWithValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: Operator.RegEx + /// public static MatchOperator RegEx { get; } = new MatchOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(MatchOperator left, MatchOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchProcessingBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchProcessingBehavior.cs index 4be6080f615b..f3adbd1f4d73 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchProcessingBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchProcessingBehavior.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// + /// If this rule is a match should the rules engine continue running the remaining rules or stop. If not present, defaults to Continue. + /// Serialized Name: MatchProcessingBehavior + /// public readonly partial struct MatchProcessingBehavior : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public MatchProcessingBehavior(string value) private const string ContinueValue = "Continue"; private const string StopValue = "Stop"; - /// Continue. + /// + /// Continue + /// Serialized Name: MatchProcessingBehavior.Continue + /// public static MatchProcessingBehavior Continue { get; } = new MatchProcessingBehavior(ContinueValue); - /// Stop. + /// + /// Stop + /// Serialized Name: MatchProcessingBehavior.Stop + /// public static MatchProcessingBehavior Stop { get; } = new MatchProcessingBehavior(StopValue); /// Determines if two values are the same. public static bool operator ==(MatchProcessingBehavior left, MatchProcessingBehavior right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchVariable.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchVariable.cs index 1ccc4966193a..b7d9fcab30ff 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchVariable.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MatchVariable.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: MatchVariable + /// internal readonly partial struct MatchVariable : IEquatable { private readonly string _value; @@ -42,43 +45,100 @@ public MatchVariable(string value) private const string HostNameValue = "HostName"; private const string SslProtocolValue = "SslProtocol"; - /// RemoteAddress. + /// + /// RemoteAddress + /// Serialized Name: MatchVariable.RemoteAddress + /// public static MatchVariable RemoteAddress { get; } = new MatchVariable(RemoteAddressValue); - /// RequestMethod. + /// + /// RequestMethod + /// Serialized Name: MatchVariable.RequestMethod + /// public static MatchVariable RequestMethod { get; } = new MatchVariable(RequestMethodValue); - /// QueryString. + /// + /// QueryString + /// Serialized Name: MatchVariable.QueryString + /// public static MatchVariable QueryString { get; } = new MatchVariable(QueryStringValue); - /// PostArgs. + /// + /// PostArgs + /// Serialized Name: MatchVariable.PostArgs + /// public static MatchVariable PostArgs { get; } = new MatchVariable(PostArgsValue); - /// RequestUri. + /// + /// RequestUri + /// Serialized Name: MatchVariable.RequestUri + /// public static MatchVariable RequestUri { get; } = new MatchVariable(RequestUriValue); - /// RequestHeader. + /// + /// RequestHeader + /// Serialized Name: MatchVariable.RequestHeader + /// public static MatchVariable RequestHeader { get; } = new MatchVariable(RequestHeaderValue); - /// RequestBody. + /// + /// RequestBody + /// Serialized Name: MatchVariable.RequestBody + /// public static MatchVariable RequestBody { get; } = new MatchVariable(RequestBodyValue); - /// RequestScheme. + /// + /// RequestScheme + /// Serialized Name: MatchVariable.RequestScheme + /// public static MatchVariable RequestScheme { get; } = new MatchVariable(RequestSchemeValue); - /// UrlPath. + /// + /// UrlPath + /// Serialized Name: MatchVariable.UrlPath + /// public static MatchVariable UriPath { get; } = new MatchVariable(UriPathValue); - /// UrlFileExtension. + /// + /// UrlFileExtension + /// Serialized Name: MatchVariable.UrlFileExtension + /// public static MatchVariable UriFileExtension { get; } = new MatchVariable(UriFileExtensionValue); - /// UrlFileName. + /// + /// UrlFileName + /// Serialized Name: MatchVariable.UrlFileName + /// public static MatchVariable UriFileName { get; } = new MatchVariable(UriFileNameValue); - /// HttpVersion. + /// + /// HttpVersion + /// Serialized Name: MatchVariable.HttpVersion + /// public static MatchVariable HttpVersion { get; } = new MatchVariable(HttpVersionValue); - /// Cookies. + /// + /// Cookies + /// Serialized Name: MatchVariable.Cookies + /// public static MatchVariable Cookies { get; } = new MatchVariable(CookiesValue); - /// IsDevice. + /// + /// IsDevice + /// Serialized Name: MatchVariable.IsDevice + /// public static MatchVariable IsDevice { get; } = new MatchVariable(IsDeviceValue); - /// SocketAddr. + /// + /// SocketAddr + /// Serialized Name: MatchVariable.SocketAddr + /// public static MatchVariable SocketAddr { get; } = new MatchVariable(SocketAddrValue); - /// ClientPort. + /// + /// ClientPort + /// Serialized Name: MatchVariable.ClientPort + /// public static MatchVariable ClientPort { get; } = new MatchVariable(ClientPortValue); - /// ServerPort. + /// + /// ServerPort + /// Serialized Name: MatchVariable.ServerPort + /// public static MatchVariable ServerPort { get; } = new MatchVariable(ServerPortValue); - /// HostName. + /// + /// HostName + /// Serialized Name: MatchVariable.HostName + /// public static MatchVariable HostName { get; } = new MatchVariable(HostNameValue); - /// SslProtocol. + /// + /// SslProtocol + /// Serialized Name: MatchVariable.SslProtocol + /// public static MatchVariable SslProtocol { get; } = new MatchVariable(SslProtocolValue); /// Determines if two values are the same. public static bool operator ==(MatchVariable left, MatchVariable right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs index f90de6595b7d..976e145e8286 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Metrics Response. + /// + /// Metrics Response + /// Serialized Name: MetricsResponse + /// public partial class MetricsResponse { /// @@ -52,10 +55,10 @@ internal MetricsResponse() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: MetricsResponse.dateTimeBegin. + /// Serialized Name: MetricsResponse.dateTimeEnd. + /// Serialized Name: MetricsResponse.granularity. + /// Serialized Name: MetricsResponse.series. /// Keeps track of any properties unknown to the library. internal MetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, MetricsResponseGranularity? granularity, IReadOnlyList series, IDictionary serializedAdditionalRawData) { @@ -66,13 +69,13 @@ internal MetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTime _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date time begin. + /// Serialized Name: MetricsResponse.dateTimeBegin. public DateTimeOffset? DateTimeBegin { get; } - /// Gets the date time end. + /// Serialized Name: MetricsResponse.dateTimeEnd. public DateTimeOffset? DateTimeEnd { get; } - /// Gets the granularity. + /// Serialized Name: MetricsResponse.granularity. public MetricsResponseGranularity? Granularity { get; } - /// Gets the series. + /// Serialized Name: MetricsResponse.series. public IReadOnlyList Series { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs index 6f170620651d..a886ebd8d6cd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseGranularity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The MetricsResponseGranularity. + /// + /// The MetricsResponseGranularity. + /// Serialized Name: MetricsGranularity + /// public readonly partial struct MetricsResponseGranularity : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public MetricsResponseGranularity(string value) private const string PT1HValue = "PT1H"; private const string P1DValue = "P1D"; - /// PT5M. + /// + /// PT5M + /// Serialized Name: MetricsGranularity.PT5M + /// public static MetricsResponseGranularity PT5M { get; } = new MetricsResponseGranularity(PT5MValue); - /// PT1H. + /// + /// PT1H + /// Serialized Name: MetricsGranularity.PT1H + /// public static MetricsResponseGranularity PT1H { get; } = new MetricsResponseGranularity(PT1HValue); - /// P1D. + /// + /// P1D + /// Serialized Name: MetricsGranularity.P1D + /// public static MetricsResponseGranularity P1D { get; } = new MetricsResponseGranularity(P1DValue); /// Determines if two values are the same. public static bool operator ==(MetricsResponseGranularity left, MetricsResponseGranularity right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs index e853c2243ce4..89eb82499217 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The MetricsResponseSeriesItem. + /// + /// The MetricsResponseSeriesItem. + /// Serialized Name: MetricsResponseSeriesItem + /// public partial class MetricsResponseSeriesItem { /// @@ -53,10 +56,10 @@ internal MetricsResponseSeriesItem() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: MetricsResponseSeriesItem.metric. + /// Serialized Name: MetricsResponseSeriesItem.unit. + /// Serialized Name: MetricsResponseSeriesItem.groups. + /// Serialized Name: MetricsResponseSeriesItem.data. /// Keeps track of any properties unknown to the library. internal MetricsResponseSeriesItem(string metric, MetricsResponseSeriesItemUnit? unit, IReadOnlyList groups, IReadOnlyList data, IDictionary serializedAdditionalRawData) { @@ -67,13 +70,13 @@ internal MetricsResponseSeriesItem(string metric, MetricsResponseSeriesItemUnit? _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the metric. + /// Serialized Name: MetricsResponseSeriesItem.metric. public string Metric { get; } - /// Gets the unit. + /// Serialized Name: MetricsResponseSeriesItem.unit. public MetricsResponseSeriesItemUnit? Unit { get; } - /// Gets the groups. + /// Serialized Name: MetricsResponseSeriesItem.groups. public IReadOnlyList Groups { get; } - /// Gets the data. + /// Serialized Name: MetricsResponseSeriesItem.data. public IReadOnlyList Data { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs index 4cb0d87b519e..eb0ee480e065 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesItemUnit.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The MetricsResponseSeriesItemUnit. + /// + /// The MetricsResponseSeriesItemUnit. + /// Serialized Name: MetricsSeriesUnit + /// public readonly partial struct MetricsResponseSeriesItemUnit : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public MetricsResponseSeriesItemUnit(string value) private const string BitsPerSecondValue = "bitsPerSecond"; private const string MilliSecondsValue = "milliSeconds"; - /// count. + /// + /// count + /// Serialized Name: MetricsSeriesUnit.count + /// public static MetricsResponseSeriesItemUnit Count { get; } = new MetricsResponseSeriesItemUnit(CountValue); - /// bytes. + /// + /// bytes + /// Serialized Name: MetricsSeriesUnit.bytes + /// public static MetricsResponseSeriesItemUnit Bytes { get; } = new MetricsResponseSeriesItemUnit(BytesValue); - /// bitsPerSecond. + /// + /// bitsPerSecond + /// Serialized Name: MetricsSeriesUnit.bitsPerSecond + /// public static MetricsResponseSeriesItemUnit BitsPerSecond { get; } = new MetricsResponseSeriesItemUnit(BitsPerSecondValue); - /// milliSeconds. + /// + /// milliSeconds + /// Serialized Name: MetricsSeriesUnit.milliSeconds + /// public static MetricsResponseSeriesItemUnit MilliSeconds { get; } = new MetricsResponseSeriesItemUnit(MilliSecondsValue); /// Determines if two values are the same. public static bool operator ==(MetricsResponseSeriesItemUnit left, MetricsResponseSeriesItemUnit right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesPropertiesItemsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesPropertiesItemsItem.cs index e617a89f2e91..78f0f0241455 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesPropertiesItemsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MetricsResponseSeriesPropertiesItemsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The MetricsResponseSeriesPropertiesItemsItem. + /// + /// The MetricsResponseSeriesPropertiesItemsItem. + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem + /// public partial class MetricsResponseSeriesPropertiesItemsItem { /// @@ -51,8 +54,8 @@ internal MetricsResponseSeriesPropertiesItemsItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.name. + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.value. /// Keeps track of any properties unknown to the library. internal MetricsResponseSeriesPropertiesItemsItem(string name, string value, IDictionary serializedAdditionalRawData) { @@ -61,9 +64,9 @@ internal MetricsResponseSeriesPropertiesItemsItem(string name, string value, IDi _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the name. + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.name. public string Name { get; } - /// Gets the value. + /// Serialized Name: MetricsResponseSeriesPropertiesItemsItem.value. public string Value { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs index acf7effb0f62..ed97f7324938 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.Serialization.cs @@ -35,10 +35,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MigrateResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(Id)) + if (options.Format != "W" && Optional.IsDefined(ResourceId)) { writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); + writer.WriteStringValue(ResourceId); } if (options.Format != "W" && Optional.IsDefined(MigrateResultType)) { @@ -90,7 +90,7 @@ internal static MigrateResult DeserializeMigrateResult(JsonElement element, Mode { return null; } - string id = default; + ResourceIdentifier id = default; string type = default; WritableSubResource migratedProfileResourceId = default; IDictionary serializedAdditionalRawData = default; @@ -99,7 +99,11 @@ internal static MigrateResult DeserializeMigrateResult(JsonElement element, Mode { if (property.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("type"u8)) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs index 14944d15a0c7..12de858cac9b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrateResult.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result for migrate operation. + /// + /// Result for migrate operation. + /// Serialized Name: MigrateResult + /// public partial class MigrateResult { /// @@ -53,23 +56,41 @@ internal MigrateResult() } /// Initializes a new instance of . - /// Resource ID. - /// Resource type. - /// Arm resource id of the migrated profile. + /// + /// Resource ID. + /// Serialized Name: MigrateResult.id + /// + /// + /// Resource type. + /// Serialized Name: MigrateResult.type + /// + /// + /// Arm resource id of the migrated profile + /// Serialized Name: MigrateResult.properties.migratedProfileResourceId + /// /// Keeps track of any properties unknown to the library. - internal MigrateResult(string id, string migrateResultType, WritableSubResource migratedProfileResourceId, IDictionary serializedAdditionalRawData) + internal MigrateResult(ResourceIdentifier resourceId, string migrateResultType, WritableSubResource migratedProfileResourceId, IDictionary serializedAdditionalRawData) { - Id = id; + ResourceId = resourceId; MigrateResultType = migrateResultType; MigratedProfileResourceId = migratedProfileResourceId; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Resource ID. - public string Id { get; } - /// Resource type. + /// + /// Resource ID. + /// Serialized Name: MigrateResult.id + /// + public ResourceIdentifier ResourceId { get; } + /// + /// Resource type. + /// Serialized Name: MigrateResult.type + /// public string MigrateResultType { get; } - /// Arm resource id of the migrated profile. + /// + /// Arm resource id of the migrated profile + /// Serialized Name: MigrateResult.properties.migratedProfileResourceId + /// internal WritableSubResource MigratedProfileResourceId { get; } /// Gets or sets Id. public ResourceIdentifier MigratedProfileResourceIdId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs index c2e9e6591b59..4348e6ba314b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationContent.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Request body for Migrate operation. + /// + /// Request body for Migrate operation. + /// Serialized Name: MigrationParameters + /// public partial class MigrationContent { /// @@ -48,9 +51,18 @@ public partial class MigrationContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Sku for the migration. - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. - /// Name of the new profile that need to be created. + /// + /// Sku for the migration + /// Serialized Name: MigrationParameters.sku + /// + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: MigrationParameters.classicResourceReference + /// + /// + /// Name of the new profile that need to be created. + /// Serialized Name: MigrationParameters.profileName + /// /// , or is null. public MigrationContent(CdnSku sku, WritableSubResource classicResourceReference, string profileName) { @@ -65,10 +77,22 @@ public MigrationContent(CdnSku sku, WritableSubResource classicResourceReference } /// Initializes a new instance of . - /// Sku for the migration. - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. - /// Name of the new profile that need to be created. - /// Waf mapping for the migrated profile. + /// + /// Sku for the migration + /// Serialized Name: MigrationParameters.sku + /// + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: MigrationParameters.classicResourceReference + /// + /// + /// Name of the new profile that need to be created. + /// Serialized Name: MigrationParameters.profileName + /// + /// + /// Waf mapping for the migrated profile + /// Serialized Name: MigrationParameters.migrationWebApplicationFirewallMappings + /// /// Keeps track of any properties unknown to the library. internal MigrationContent(CdnSku sku, WritableSubResource classicResourceReference, string profileName, IList migrationWebApplicationFirewallMappings, IDictionary serializedAdditionalRawData) { @@ -84,15 +108,24 @@ internal MigrationContent() { } - /// Sku for the migration. + /// + /// Sku for the migration + /// Serialized Name: MigrationParameters.sku + /// internal CdnSku Sku { get; } - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// public CdnSkuName? SkuName { get => Sku?.Name; } - /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// + /// Resource reference of the classic cdn profile or classic frontdoor that need to be migrated. + /// Serialized Name: MigrationParameters.classicResourceReference + /// internal WritableSubResource ClassicResourceReference { get; } /// Gets or sets Id. public ResourceIdentifier ClassicResourceReferenceId @@ -100,9 +133,15 @@ public ResourceIdentifier ClassicResourceReferenceId get => ClassicResourceReference?.Id; } - /// Name of the new profile that need to be created. + /// + /// Name of the new profile that need to be created. + /// Serialized Name: MigrationParameters.profileName + /// public string ProfileName { get; } - /// Waf mapping for the migrated profile. + /// + /// Waf mapping for the migrated profile + /// Serialized Name: MigrationParameters.migrationWebApplicationFirewallMappings + /// public IList MigrationWebApplicationFirewallMappings { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.Serialization.cs new file mode 100644 index 000000000000..1881bf0b59af --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.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.Cdn.Models +{ + public partial class MigrationEndpointMapping : 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(MigrationEndpointMapping)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MigratedFrom)) + { + writer.WritePropertyName("migratedFrom"u8); + writer.WriteStringValue(MigratedFrom); + } + if (Optional.IsDefined(MigratedTo)) + { + writer.WritePropertyName("migratedTo"u8); + writer.WriteStringValue(MigratedTo); + } + 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 + } + } + } + + MigrationEndpointMapping 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(MigrationEndpointMapping)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMigrationEndpointMapping(document.RootElement, options); + } + + internal static MigrationEndpointMapping DeserializeMigrationEndpointMapping(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string migratedFrom = default; + string migratedTo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("migratedFrom"u8)) + { + migratedFrom = property.Value.GetString(); + continue; + } + if (property.NameEquals("migratedTo"u8)) + { + migratedTo = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MigrationEndpointMapping(migratedFrom, migratedTo, 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(MigrationEndpointMapping)} does not support writing '{options.Format}' format."); + } + } + + MigrationEndpointMapping 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 DeserializeMigrationEndpointMapping(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MigrationEndpointMapping)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.cs new file mode 100644 index 000000000000..15109f5c8a7a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationEndpointMapping.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; + +namespace Azure.ResourceManager.Cdn.Models +{ + /// + /// CDN Endpoint Mapping. + /// Serialized Name: MigrationEndpointMapping + /// + public partial class MigrationEndpointMapping + { + /// + /// 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 MigrationEndpointMapping() + { + } + + /// Initializes a new instance of . + /// + /// Name of the classic CDN profile endpoint. + /// Serialized Name: MigrationEndpointMapping.migratedFrom + /// + /// + /// Name of the newly created migrated Azure Frontdoor Standard/Premium profile endpoint. This name will replace the name of the classic CDN endpoint resource. + /// Serialized Name: MigrationEndpointMapping.migratedTo + /// + /// Keeps track of any properties unknown to the library. + internal MigrationEndpointMapping(string migratedFrom, string migratedTo, IDictionary serializedAdditionalRawData) + { + MigratedFrom = migratedFrom; + MigratedTo = migratedTo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Name of the classic CDN profile endpoint. + /// Serialized Name: MigrationEndpointMapping.migratedFrom + /// + public string MigratedFrom { get; set; } + /// + /// Name of the newly created migrated Azure Frontdoor Standard/Premium profile endpoint. This name will replace the name of the classic CDN endpoint resource. + /// Serialized Name: MigrationEndpointMapping.migratedTo + /// + public string MigratedTo { get; set; } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs index 98ed51ade5d0..d89a4ebefeb7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationErrorType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. + /// + /// Error response indicates CDN service is not able to process the incoming request. The reason is provided in the error message. + /// Serialized Name: MigrationErrorType + /// public partial class MigrationErrorType { /// @@ -51,10 +54,22 @@ internal MigrationErrorType() } /// Initializes a new instance of . - /// Error code. - /// Resource which has the problem. - /// Error message indicating why the operation failed. - /// Describes what needs to be done to fix the problem. + /// + /// Error code. + /// Serialized Name: MigrationErrorType.code + /// + /// + /// Resource which has the problem. + /// Serialized Name: MigrationErrorType.resourceName + /// + /// + /// Error message indicating why the operation failed. + /// Serialized Name: MigrationErrorType.errorMessage + /// + /// + /// Describes what needs to be done to fix the problem + /// Serialized Name: MigrationErrorType.nextSteps + /// /// Keeps track of any properties unknown to the library. internal MigrationErrorType(string code, string resourceName, string errorMessage, string nextSteps, IDictionary serializedAdditionalRawData) { @@ -65,13 +80,25 @@ internal MigrationErrorType(string code, string resourceName, string errorMessag _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Error code. + /// + /// Error code. + /// Serialized Name: MigrationErrorType.code + /// public string Code { get; } - /// Resource which has the problem. + /// + /// Resource which has the problem. + /// Serialized Name: MigrationErrorType.resourceName + /// public string ResourceName { get; } - /// Error message indicating why the operation failed. + /// + /// Error message indicating why the operation failed. + /// Serialized Name: MigrationErrorType.errorMessage + /// public string ErrorMessage { get; } - /// Describes what needs to be done to fix the problem. + /// + /// Describes what needs to be done to fix the problem + /// Serialized Name: MigrationErrorType.nextSteps + /// public string NextSteps { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs index 492a5cb68a18..7981da8d1abe 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/MigrationWebApplicationFirewallMapping.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Web Application Firewall Mapping. + /// + /// Web Application Firewall Mapping + /// Serialized Name: MigrationWebApplicationFirewallMapping + /// public partial class MigrationWebApplicationFirewallMapping { /// @@ -53,8 +56,14 @@ public MigrationWebApplicationFirewallMapping() } /// Initializes a new instance of . - /// Migration From Waf policy. - /// Migration to Waf policy. + /// + /// Migration From Waf policy + /// Serialized Name: MigrationWebApplicationFirewallMapping.migratedFrom + /// + /// + /// Migration to Waf policy + /// Serialized Name: MigrationWebApplicationFirewallMapping.migratedTo + /// /// Keeps track of any properties unknown to the library. internal MigrationWebApplicationFirewallMapping(WritableSubResource migratedFrom, WritableSubResource migratedTo, IDictionary serializedAdditionalRawData) { @@ -63,7 +72,10 @@ internal MigrationWebApplicationFirewallMapping(WritableSubResource migratedFrom _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Migration From Waf policy. + /// + /// Migration From Waf policy + /// Serialized Name: MigrationWebApplicationFirewallMapping.migratedFrom + /// internal WritableSubResource MigratedFrom { get; set; } /// Gets or sets Id. public ResourceIdentifier MigratedFromId @@ -77,7 +89,10 @@ public ResourceIdentifier MigratedFromId } } - /// Migration to Waf policy. + /// + /// Migration to Waf policy + /// Serialized Name: MigrationWebApplicationFirewallMapping.migratedTo + /// internal WritableSubResource MigratedTo { get; set; } /// Gets or sets Id. public ResourceIdentifier MigratedToId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OptimizationType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OptimizationType.cs index 54dda7e61de2..55e669848457 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OptimizationType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OptimizationType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information we can apply scenario driven optimization. + /// + /// Specifies what scenario the customer wants this CDN endpoint to optimize, e.g. Download, Media services. With this information we can apply scenario driven optimization. + /// Serialized Name: OptimizationType + /// public readonly partial struct OptimizationType : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public OptimizationType(string value) private const string LargeFileDownloadValue = "LargeFileDownload"; private const string DynamicSiteAccelerationValue = "DynamicSiteAcceleration"; - /// GeneralWebDelivery. + /// + /// GeneralWebDelivery + /// Serialized Name: OptimizationType.GeneralWebDelivery + /// public static OptimizationType GeneralWebDelivery { get; } = new OptimizationType(GeneralWebDeliveryValue); - /// GeneralMediaStreaming. + /// + /// GeneralMediaStreaming + /// Serialized Name: OptimizationType.GeneralMediaStreaming + /// public static OptimizationType GeneralMediaStreaming { get; } = new OptimizationType(GeneralMediaStreamingValue); - /// VideoOnDemandMediaStreaming. + /// + /// VideoOnDemandMediaStreaming + /// Serialized Name: OptimizationType.VideoOnDemandMediaStreaming + /// public static OptimizationType VideoOnDemandMediaStreaming { get; } = new OptimizationType(VideoOnDemandMediaStreamingValue); - /// LargeFileDownload. + /// + /// LargeFileDownload + /// Serialized Name: OptimizationType.LargeFileDownload + /// public static OptimizationType LargeFileDownload { get; } = new OptimizationType(LargeFileDownloadValue); - /// DynamicSiteAcceleration. + /// + /// DynamicSiteAcceleration + /// Serialized Name: OptimizationType.DynamicSiteAcceleration + /// public static OptimizationType DynamicSiteAcceleration { get; } = new OptimizationType(DynamicSiteAccelerationValue); /// Determines if two values are the same. public static bool operator ==(OptimizationType left, OptimizationType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupListResult.cs index f8139dc07953..04d12c941ce2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results. + /// + /// Result of the request to list origin groups. It contains a list of origin groups objects and a URL link to get the next set of results. + /// Serialized Name: OriginGroupListResult + /// internal partial class OriginGroupListResult { /// @@ -52,8 +55,14 @@ internal OriginGroupListResult() } /// Initializes a new instance of . - /// List of CDN origin groups within an endpoint. - /// URL to get the next set of origin objects if there are any. + /// + /// List of CDN origin groups within an endpoint + /// Serialized Name: OriginGroupListResult.value + /// + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: OriginGroupListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal OriginGroupListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal OriginGroupListResult(IReadOnlyList value, string n _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of CDN origin groups within an endpoint. + /// + /// List of CDN origin groups within an endpoint + /// Serialized Name: OriginGroupListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of origin objects if there are any. + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: OriginGroupListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverride.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverride.cs index 6ffd4ace31a0..00409f698f7d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverride.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverride.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the origin group override configuration. + /// + /// Defines the parameters for the origin group override configuration. + /// Serialized Name: OriginGroupOverride + /// public partial class OriginGroupOverride { /// @@ -53,8 +56,14 @@ public OriginGroupOverride() } /// Initializes a new instance of . - /// defines the OriginGroup that would override the DefaultOriginGroup on route. - /// Protocol this rule will use when forwarding traffic to backends. + /// + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + /// Serialized Name: OriginGroupOverride.originGroup + /// + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: OriginGroupOverride.forwardingProtocol + /// /// Keeps track of any properties unknown to the library. internal OriginGroupOverride(WritableSubResource originGroup, ForwardingProtocol? forwardingProtocol, IDictionary serializedAdditionalRawData) { @@ -63,7 +72,10 @@ internal OriginGroupOverride(WritableSubResource originGroup, ForwardingProtocol _serializedAdditionalRawData = serializedAdditionalRawData; } - /// defines the OriginGroup that would override the DefaultOriginGroup on route. + /// + /// defines the OriginGroup that would override the DefaultOriginGroup on route. + /// Serialized Name: OriginGroupOverride.originGroup + /// internal WritableSubResource OriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginGroupId @@ -77,7 +89,10 @@ public ResourceIdentifier OriginGroupId } } - /// Protocol this rule will use when forwarding traffic to backends. + /// + /// Protocol this rule will use when forwarding traffic to backends. + /// Serialized Name: OriginGroupOverride.forwardingProtocol + /// public ForwardingProtocol? ForwardingProtocol { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideAction.cs index f159f88f990a..b05b168e14b8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the origin group override action for the delivery rule. + /// + /// Defines the origin group override action for the delivery rule. + /// Serialized Name: OriginGroupOverrideAction + /// public partial class OriginGroupOverrideAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: OriginGroupOverrideAction.parameters + /// /// is null. public OriginGroupOverrideAction(OriginGroupOverrideActionProperties properties) { @@ -25,9 +31,15 @@ public OriginGroupOverrideAction(OriginGroupOverrideActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: OriginGroupOverrideAction.parameters + /// internal OriginGroupOverrideAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, OriginGroupOverrideActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal OriginGroupOverrideAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: OriginGroupOverrideAction.parameters + /// public OriginGroupOverrideActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.Serialization.cs index 54143282e755..08f5c23aa9f3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.Serialization.cs @@ -27,7 +27,7 @@ void IJsonModel.Write(Utf8JsonWriter writer /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -35,25 +35,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OriginGroupOverrideActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("originGroup"u8); JsonSerializer.Serialize(writer, OriginGroup); - 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 - } - } } OriginGroupOverrideActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -76,20 +60,20 @@ internal static OriginGroupOverrideActionProperties DeserializeOriginGroupOverri { return null; } - OriginGroupOverrideActionType typeName = default; WritableSubResource originGroup = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) + if (property.NameEquals("originGroup"u8)) { - typeName = new OriginGroupOverrideActionType(property.Value.GetString()); + originGroup = JsonSerializer.Deserialize(property.Value.GetRawText()); continue; } - if (property.NameEquals("originGroup"u8)) + if (property.NameEquals("typeName"u8)) { - originGroup = JsonSerializer.Deserialize(property.Value.GetRawText()); + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); continue; } if (options.Format != "W") @@ -98,7 +82,7 @@ internal static OriginGroupOverrideActionProperties DeserializeOriginGroupOverri } } serializedAdditionalRawData = rawDataDictionary; - return new OriginGroupOverrideActionProperties(typeName, originGroup, serializedAdditionalRawData); + return new OriginGroupOverrideActionProperties(typeName, serializedAdditionalRawData, originGroup); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.cs index b0bf282bdbaa..2d66fc875f08 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupOverrideActionProperties.cs @@ -12,62 +12,37 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the origin group override action. - public partial class OriginGroupOverrideActionProperties + /// + /// Defines the parameters for the origin group override action. + /// Serialized Name: OriginGroupOverrideActionParameters + /// + public partial class OriginGroupOverrideActionProperties : DeliveryRuleActionProperties { - /// - /// 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 . - /// - /// defines the OriginGroup that would override the DefaultOriginGroup. + /// + /// defines the OriginGroup that would override the DefaultOriginGroup. + /// Serialized Name: OriginGroupOverrideActionParameters.originGroup + /// /// is null. - public OriginGroupOverrideActionProperties(OriginGroupOverrideActionType actionType, WritableSubResource originGroup) + public OriginGroupOverrideActionProperties(WritableSubResource originGroup) { Argument.AssertNotNull(originGroup, nameof(originGroup)); - ActionType = actionType; OriginGroup = originGroup; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleOriginGroupOverrideActionParameters; } /// Initializes a new instance of . - /// - /// defines the OriginGroup that would override the DefaultOriginGroup. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal OriginGroupOverrideActionProperties(OriginGroupOverrideActionType actionType, WritableSubResource originGroup, IDictionary serializedAdditionalRawData) + /// + /// defines the OriginGroup that would override the DefaultOriginGroup. + /// Serialized Name: OriginGroupOverrideActionParameters.originGroup + /// + internal OriginGroupOverrideActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, WritableSubResource originGroup) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; OriginGroup = originGroup; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -75,9 +50,10 @@ internal OriginGroupOverrideActionProperties() { } - /// Gets or sets the action type. - public OriginGroupOverrideActionType ActionType { get; set; } - /// defines the OriginGroup that would override the DefaultOriginGroup. + /// + /// defines the OriginGroup that would override the DefaultOriginGroup. + /// Serialized Name: OriginGroupOverrideActionParameters.originGroup + /// internal WritableSubResource OriginGroup { get; set; } /// Gets or sets Id. public ResourceIdentifier OriginGroupId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupProvisioningState.cs index 6db2eb44a4ba..c0eb08492ac1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status of the origin group. + /// + /// Provisioning status of the origin group. + /// Serialized Name: OriginGroupProvisioningState + /// public readonly partial struct OriginGroupProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public OriginGroupProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string CreatingValue = "Creating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: OriginGroupProvisioningState.Succeeded + /// public static OriginGroupProvisioningState Succeeded { get; } = new OriginGroupProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: OriginGroupProvisioningState.Failed + /// public static OriginGroupProvisioningState Failed { get; } = new OriginGroupProvisioningState(FailedValue); - /// Updating. + /// + /// Updating + /// Serialized Name: OriginGroupProvisioningState.Updating + /// public static OriginGroupProvisioningState Updating { get; } = new OriginGroupProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: OriginGroupProvisioningState.Deleting + /// public static OriginGroupProvisioningState Deleting { get; } = new OriginGroupProvisioningState(DeletingValue); - /// Creating. + /// + /// Creating + /// Serialized Name: OriginGroupProvisioningState.Creating + /// public static OriginGroupProvisioningState Creating { get; } = new OriginGroupProvisioningState(CreatingValue); /// Determines if two values are the same. public static bool operator ==(OriginGroupProvisioningState left, OriginGroupProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupResourceState.cs index 901b080bce85..0cf5b1d73ba7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginGroupResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the origin group. + /// + /// Resource status of the origin group. + /// Serialized Name: OriginGroupResourceState + /// public readonly partial struct OriginGroupResourceState : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public OriginGroupResourceState(string value) private const string ActiveValue = "Active"; private const string DeletingValue = "Deleting"; - /// Creating. + /// + /// Creating + /// Serialized Name: OriginGroupResourceState.Creating + /// public static OriginGroupResourceState Creating { get; } = new OriginGroupResourceState(CreatingValue); - /// Active. + /// + /// Active + /// Serialized Name: OriginGroupResourceState.Active + /// public static OriginGroupResourceState Active { get; } = new OriginGroupResourceState(ActiveValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: OriginGroupResourceState.Deleting + /// public static OriginGroupResourceState Deleting { get; } = new OriginGroupResourceState(DeletingValue); /// Determines if two values are the same. public static bool operator ==(OriginGroupResourceState left, OriginGroupResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginListResult.cs index c021b300aee5..1c9072930081 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// + /// Result of the request to list origins. It contains a list of origin objects and a URL link to get the next set of results. + /// Serialized Name: OriginListResult + /// internal partial class OriginListResult { /// @@ -52,8 +55,14 @@ internal OriginListResult() } /// Initializes a new instance of . - /// List of CDN origins within an endpoint. - /// URL to get the next set of origin objects if there are any. + /// + /// List of CDN origins within an endpoint + /// Serialized Name: OriginListResult.value + /// + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: OriginListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal OriginListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal OriginListResult(IReadOnlyList value, string nextLink, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of CDN origins within an endpoint. + /// + /// List of CDN origins within an endpoint + /// Serialized Name: OriginListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of origin objects if there are any. + /// + /// URL to get the next set of origin objects if there are any. + /// Serialized Name: OriginListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginProvisioningState.cs index bbbc46d0bd01..92c8b780c358 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status of the origin. + /// + /// Provisioning status of the origin. + /// Serialized Name: OriginProvisioningState + /// public readonly partial struct OriginProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public OriginProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string CreatingValue = "Creating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: OriginProvisioningState.Succeeded + /// public static OriginProvisioningState Succeeded { get; } = new OriginProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: OriginProvisioningState.Failed + /// public static OriginProvisioningState Failed { get; } = new OriginProvisioningState(FailedValue); - /// Updating. + /// + /// Updating + /// Serialized Name: OriginProvisioningState.Updating + /// public static OriginProvisioningState Updating { get; } = new OriginProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: OriginProvisioningState.Deleting + /// public static OriginProvisioningState Deleting { get; } = new OriginProvisioningState(DeletingValue); - /// Creating. + /// + /// Creating + /// Serialized Name: OriginProvisioningState.Creating + /// public static OriginProvisioningState Creating { get; } = new OriginProvisioningState(CreatingValue); /// Determines if two values are the same. public static bool operator ==(OriginProvisioningState left, OriginProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginResourceState.cs index 09b817e6e862..5f533c3e56d1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OriginResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the origin. + /// + /// Resource status of the origin. + /// Serialized Name: OriginResourceState + /// public readonly partial struct OriginResourceState : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public OriginResourceState(string value) private const string ActiveValue = "Active"; private const string DeletingValue = "Deleting"; - /// Creating. + /// + /// Creating + /// Serialized Name: OriginResourceState.Creating + /// public static OriginResourceState Creating { get; } = new OriginResourceState(CreatingValue); - /// Active. + /// + /// Active + /// Serialized Name: OriginResourceState.Active + /// public static OriginResourceState Active { get; } = new OriginResourceState(ActiveValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: OriginResourceState.Deleting + /// public static OriginResourceState Deleting { get; } = new OriginResourceState(DeletingValue); /// Determines if two values are the same. public static bool operator ==(OriginResourceState left, OriginResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OverrideActionType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OverrideActionType.cs index 9731577a36c0..f10266426437 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OverrideActionType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/OverrideActionType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the action to take on rule match. + /// + /// Defines the action to take on rule match. + /// Serialized Name: ActionType + /// public readonly partial struct OverrideActionType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public OverrideActionType(string value) private const string LogValue = "Log"; private const string RedirectValue = "Redirect"; - /// Allow. + /// + /// Allow + /// Serialized Name: ActionType.Allow + /// public static OverrideActionType Allow { get; } = new OverrideActionType(AllowValue); - /// Block. + /// + /// Block + /// Serialized Name: ActionType.Block + /// public static OverrideActionType Block { get; } = new OverrideActionType(BlockValue); - /// Log. + /// + /// Log + /// Serialized Name: ActionType.Log + /// public static OverrideActionType Log { get; } = new OverrideActionType(LogValue); - /// Redirect. + /// + /// Redirect + /// Serialized Name: ActionType.Redirect + /// public static OverrideActionType Redirect { get; } = new OverrideActionType(RedirectValue); /// Determines if two values are the same. public static bool operator ==(OverrideActionType left, OverrideActionType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ParamIndicator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ParamIndicator.cs index 1829b65eb22a..80de74f7982b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ParamIndicator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ParamIndicator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Indicates the purpose of the parameter. + /// + /// Indicates the purpose of the parameter + /// Serialized Name: ParamIndicator + /// public readonly partial struct ParamIndicator : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public ParamIndicator(string value) private const string KeyIdValue = "KeyId"; private const string SignatureValue = "Signature"; - /// Expires. + /// + /// Expires + /// Serialized Name: ParamIndicator.Expires + /// public static ParamIndicator Expires { get; } = new ParamIndicator(ExpiresValue); - /// KeyId. + /// + /// KeyId + /// Serialized Name: ParamIndicator.KeyId + /// public static ParamIndicator KeyId { get; } = new ParamIndicator(KeyIdValue); - /// Signature. + /// + /// Signature + /// Serialized Name: ParamIndicator.Signature + /// public static ParamIndicator Signature { get; } = new ParamIndicator(SignatureValue); /// Determines if two values are the same. public static bool operator ==(ParamIndicator left, ParamIndicator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyEnabledState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyEnabledState.cs index 0c15d62657b4..c9d0f5dafab1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyEnabledState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyEnabledState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// describes if the policy is in enabled state or disabled state. + /// + /// describes if the policy is in enabled state or disabled state + /// Serialized Name: PolicyEnabledState + /// public readonly partial struct PolicyEnabledState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public PolicyEnabledState(string value) private const string DisabledValue = "Disabled"; private const string EnabledValue = "Enabled"; - /// Disabled. + /// + /// Disabled + /// Serialized Name: PolicyEnabledState.Disabled + /// public static PolicyEnabledState Disabled { get; } = new PolicyEnabledState(DisabledValue); - /// Enabled. + /// + /// Enabled + /// Serialized Name: PolicyEnabledState.Enabled + /// public static PolicyEnabledState Enabled { get; } = new PolicyEnabledState(EnabledValue); /// Determines if two values are the same. public static bool operator ==(PolicyEnabledState left, PolicyEnabledState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyMode.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyMode.cs index 811d3110ddda..af5a015a7017 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyMode.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyMode.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes if it is in detection mode or prevention mode at policy level. + /// + /// Describes if it is in detection mode or prevention mode at policy level. + /// Serialized Name: PolicyMode + /// public readonly partial struct PolicyMode : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public PolicyMode(string value) private const string PreventionValue = "Prevention"; private const string DetectionValue = "Detection"; - /// Prevention. + /// + /// Prevention + /// Serialized Name: PolicyMode.Prevention + /// public static PolicyMode Prevention { get; } = new PolicyMode(PreventionValue); - /// Detection. + /// + /// Detection + /// Serialized Name: PolicyMode.Detection + /// public static PolicyMode Detection { get; } = new PolicyMode(DetectionValue); /// Determines if two values are the same. public static bool operator ==(PolicyMode left, PolicyMode right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyResourceState.cs index cc148b1c731e..48d779f49b3c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicyResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the policy. + /// + /// Resource status of the policy. + /// Serialized Name: PolicyResourceState + /// public readonly partial struct PolicyResourceState : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public PolicyResourceState(string value) private const string DisabledValue = "Disabled"; private const string DeletingValue = "Deleting"; - /// Creating. + /// + /// Creating + /// Serialized Name: PolicyResourceState.Creating + /// public static PolicyResourceState Creating { get; } = new PolicyResourceState(CreatingValue); - /// Enabling. + /// + /// Enabling + /// Serialized Name: PolicyResourceState.Enabling + /// public static PolicyResourceState Enabling { get; } = new PolicyResourceState(EnablingValue); - /// Enabled. + /// + /// Enabled + /// Serialized Name: PolicyResourceState.Enabled + /// public static PolicyResourceState Enabled { get; } = new PolicyResourceState(EnabledValue); - /// Disabling. + /// + /// Disabling + /// Serialized Name: PolicyResourceState.Disabling + /// public static PolicyResourceState Disabling { get; } = new PolicyResourceState(DisablingValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: PolicyResourceState.Disabled + /// public static PolicyResourceState Disabled { get; } = new PolicyResourceState(DisabledValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: PolicyResourceState.Deleting + /// public static PolicyResourceState Deleting { get; } = new PolicyResourceState(DeletingValue); /// Determines if two values are the same. public static bool operator ==(PolicyResourceState left, PolicyResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicySettingsDefaultCustomBlockResponseStatusCode.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicySettingsDefaultCustomBlockResponseStatusCode.cs index 8a326a0eeab9..cbf776b9a577 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicySettingsDefaultCustomBlockResponseStatusCode.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PolicySettingsDefaultCustomBlockResponseStatusCode.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// If the action type is block, this field defines the default customer overridable http response status code. + /// + /// If the action type is block, this field defines the default customer overridable http response status code. + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode + /// public readonly partial struct PolicySettingsDefaultCustomBlockResponseStatusCode : IEquatable { private readonly int _value; @@ -28,15 +31,30 @@ public PolicySettingsDefaultCustomBlockResponseStatusCode(int value) private const int FourHundredSixValue = 406; private const int FourHundredTwentyNineValue = 429; - /// 200. + /// + /// 200 + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode.200 + /// public static PolicySettingsDefaultCustomBlockResponseStatusCode TwoHundred { get; } = new PolicySettingsDefaultCustomBlockResponseStatusCode(TwoHundredValue); - /// 403. + /// + /// 403 + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode.403 + /// public static PolicySettingsDefaultCustomBlockResponseStatusCode FourHundredThree { get; } = new PolicySettingsDefaultCustomBlockResponseStatusCode(FourHundredThreeValue); - /// 405. + /// + /// 405 + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode.405 + /// public static PolicySettingsDefaultCustomBlockResponseStatusCode FourHundredFive { get; } = new PolicySettingsDefaultCustomBlockResponseStatusCode(FourHundredFiveValue); - /// 406. + /// + /// 406 + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode.406 + /// public static PolicySettingsDefaultCustomBlockResponseStatusCode FourHundredSix { get; } = new PolicySettingsDefaultCustomBlockResponseStatusCode(FourHundredSixValue); - /// 429. + /// + /// 429 + /// Serialized Name: PolicySettingsDefaultCustomBlockResponseStatusCode.429 + /// public static PolicySettingsDefaultCustomBlockResponseStatusCode FourHundredTwentyNine { get; } = new PolicySettingsDefaultCustomBlockResponseStatusCode(FourHundredTwentyNineValue); internal int ToSerialInt32() => _value; diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.Serialization.cs index 1590edeba37f..34fff4b18f7d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReader /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(PostArgsMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Selector)) { writer.WritePropertyName("selector"u8); @@ -68,21 +67,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } PostArgsMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -105,21 +89,16 @@ internal static PostArgsMatchCondition DeserializePostArgsMatchCondition(JsonEle { return null; } - PostArgsMatchConditionType typeName = default; string selector = default; PostArgsOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new PostArgsMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("selector"u8)) { selector = property.Value.GetString(); @@ -167,6 +146,11 @@ internal static PostArgsMatchCondition DeserializePostArgsMatchCondition(JsonEle transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,12 +159,12 @@ internal static PostArgsMatchCondition DeserializePostArgsMatchCondition(JsonEle serializedAdditionalRawData = rawDataDictionary; return new PostArgsMatchCondition( typeName, + serializedAdditionalRawData, selector, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.cs index bca76207c859..aa0c70129f00 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsMatchCondition.cs @@ -10,69 +10,56 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for PostArgs match conditions. - public partial class PostArgsMatchCondition + /// + /// Defines the parameters for PostArgs match conditions + /// Serialized Name: PostArgsMatchConditionParameters + /// + public partial class PostArgsMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public PostArgsMatchCondition(PostArgsMatchConditionType conditionType, PostArgsOperator postArgsOperator) + /// + /// Describes operator to be matched + /// Serialized Name: PostArgsMatchConditionParameters.operator + /// + public PostArgsMatchCondition(PostArgsOperator postArgsOperator) { - ConditionType = conditionType; PostArgsOperator = postArgsOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRulePostArgsConditionParameters; } /// Initializes a new instance of . - /// - /// Name of PostArg to be matched. - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal PostArgsMatchCondition(PostArgsMatchConditionType conditionType, string selector, PostArgsOperator postArgsOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Name of PostArg to be matched + /// Serialized Name: PostArgsMatchConditionParameters.selector + /// + /// + /// Describes operator to be matched + /// Serialized Name: PostArgsMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: PostArgsMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: PostArgsMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: PostArgsMatchConditionParameters.transforms + /// + internal PostArgsMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, string selector, PostArgsOperator postArgsOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; Selector = selector; PostArgsOperator = postArgsOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -80,17 +67,30 @@ internal PostArgsMatchCondition() { } - /// Gets or sets the condition type. - public PostArgsMatchConditionType ConditionType { get; set; } - /// Name of PostArg to be matched. + /// + /// Name of PostArg to be matched + /// Serialized Name: PostArgsMatchConditionParameters.selector + /// public string Selector { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: PostArgsMatchConditionParameters.operator + /// public PostArgsOperator PostArgsOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: PostArgsMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: PostArgsMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: PostArgsMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsOperator.cs index c8945777535a..f18c77a21b56 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PostArgsOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: PostArgsOperator + /// public readonly partial struct PostArgsOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public PostArgsOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: PostArgsOperator.Any + /// public static PostArgsOperator Any { get; } = new PostArgsOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: PostArgsOperator.Equal + /// public static PostArgsOperator Equal { get; } = new PostArgsOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: PostArgsOperator.Contains + /// public static PostArgsOperator Contains { get; } = new PostArgsOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: PostArgsOperator.BeginsWith + /// public static PostArgsOperator BeginsWith { get; } = new PostArgsOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: PostArgsOperator.EndsWith + /// public static PostArgsOperator EndsWith { get; } = new PostArgsOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: PostArgsOperator.LessThan + /// public static PostArgsOperator LessThan { get; } = new PostArgsOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: PostArgsOperator.LessThanOrEqual + /// public static PostArgsOperator LessThanOrEqual { get; } = new PostArgsOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: PostArgsOperator.GreaterThan + /// public static PostArgsOperator GreaterThan { get; } = new PostArgsOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: PostArgsOperator.GreaterThanOrEqual + /// public static PostArgsOperator GreaterThanOrEqual { get; } = new PostArgsOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: PostArgsOperator.RegEx + /// public static PostArgsOperator RegEx { get; } = new PostArgsOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(PostArgsOperator left, PostArgsOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PreTransformCategory.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PreTransformCategory.cs index f42884d4fc5c..064e00298dea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PreTransformCategory.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PreTransformCategory.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes what transforms are applied before matching. + /// + /// Describes what transforms are applied before matching + /// Serialized Name: Transform + /// public readonly partial struct PreTransformCategory : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public PreTransformCategory(string value) private const string UriEncodeValue = "UrlEncode"; private const string RemoveNullsValue = "RemoveNulls"; - /// Lowercase. + /// + /// Lowercase + /// Serialized Name: Transform.Lowercase + /// public static PreTransformCategory Lowercase { get; } = new PreTransformCategory(LowercaseValue); - /// Uppercase. + /// + /// Uppercase + /// Serialized Name: Transform.Uppercase + /// public static PreTransformCategory Uppercase { get; } = new PreTransformCategory(UppercaseValue); - /// Trim. + /// + /// Trim + /// Serialized Name: Transform.Trim + /// public static PreTransformCategory Trim { get; } = new PreTransformCategory(TrimValue); - /// UrlDecode. + /// + /// UrlDecode + /// Serialized Name: Transform.UrlDecode + /// public static PreTransformCategory UriDecode { get; } = new PreTransformCategory(UriDecodeValue); - /// UrlEncode. + /// + /// UrlEncode + /// Serialized Name: Transform.UrlEncode + /// public static PreTransformCategory UriEncode { get; } = new PreTransformCategory(UriEncodeValue); - /// RemoveNulls. + /// + /// RemoveNulls + /// Serialized Name: Transform.RemoveNulls + /// public static PreTransformCategory RemoveNulls { get; } = new PreTransformCategory(RemoveNullsValue); /// Determines if two values are the same. public static bool operator ==(PreTransformCategory left, PreTransformCategory right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PrivateEndpointStatus.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PrivateEndpointStatus.cs index 961f87aaee97..67080702fdef 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PrivateEndpointStatus.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PrivateEndpointStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The approval status for the connection to the Private Link. + /// + /// The approval status for the connection to the Private Link + /// Serialized Name: PrivateEndpointStatus + /// public readonly partial struct PrivateEndpointStatus : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public PrivateEndpointStatus(string value) private const string DisconnectedValue = "Disconnected"; private const string TimeoutValue = "Timeout"; - /// Pending. + /// + /// Pending + /// Serialized Name: PrivateEndpointStatus.Pending + /// public static PrivateEndpointStatus Pending { get; } = new PrivateEndpointStatus(PendingValue); - /// Approved. + /// + /// Approved + /// Serialized Name: PrivateEndpointStatus.Approved + /// public static PrivateEndpointStatus Approved { get; } = new PrivateEndpointStatus(ApprovedValue); - /// Rejected. + /// + /// Rejected + /// Serialized Name: PrivateEndpointStatus.Rejected + /// public static PrivateEndpointStatus Rejected { get; } = new PrivateEndpointStatus(RejectedValue); - /// Disconnected. + /// + /// Disconnected + /// Serialized Name: PrivateEndpointStatus.Disconnected + /// public static PrivateEndpointStatus Disconnected { get; } = new PrivateEndpointStatus(DisconnectedValue); - /// Timeout. + /// + /// Timeout + /// Serialized Name: PrivateEndpointStatus.Timeout + /// public static PrivateEndpointStatus Timeout { get; } = new PrivateEndpointStatus(TimeoutValue); /// Determines if two values are the same. public static bool operator ==(PrivateEndpointStatus left, PrivateEndpointStatus right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs index be3faeb1b532..e8a9c94e8a43 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileChangeSkuWafMapping.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Parameters required for profile upgrade. + /// + /// Parameters required for profile upgrade. + /// Serialized Name: ProfileChangeSkuWafMapping + /// public partial class ProfileChangeSkuWafMapping { /// @@ -48,8 +51,14 @@ public partial class ProfileChangeSkuWafMapping private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The security policy name. - /// The new waf resource for the security policy to use. + /// + /// The security policy name. + /// Serialized Name: ProfileChangeSkuWafMapping.securityPolicyName + /// + /// + /// The new waf resource for the security policy to use. + /// Serialized Name: ProfileChangeSkuWafMapping.changeToWafPolicy + /// /// or is null. public ProfileChangeSkuWafMapping(string securityPolicyName, WritableSubResource changeToWafPolicy) { @@ -61,8 +70,14 @@ public ProfileChangeSkuWafMapping(string securityPolicyName, WritableSubResource } /// Initializes a new instance of . - /// The security policy name. - /// The new waf resource for the security policy to use. + /// + /// The security policy name. + /// Serialized Name: ProfileChangeSkuWafMapping.securityPolicyName + /// + /// + /// The new waf resource for the security policy to use. + /// Serialized Name: ProfileChangeSkuWafMapping.changeToWafPolicy + /// /// Keeps track of any properties unknown to the library. internal ProfileChangeSkuWafMapping(string securityPolicyName, WritableSubResource changeToWafPolicy, IDictionary serializedAdditionalRawData) { @@ -76,9 +91,15 @@ internal ProfileChangeSkuWafMapping() { } - /// The security policy name. + /// + /// The security policy name. + /// Serialized Name: ProfileChangeSkuWafMapping.securityPolicyName + /// public string SecurityPolicyName { get; } - /// The new waf resource for the security policy to use. + /// + /// The new waf resource for the security policy to use. + /// Serialized Name: ProfileChangeSkuWafMapping.changeToWafPolicy + /// internal WritableSubResource ChangeToWafPolicy { get; } /// Gets or sets Id. public ResourceIdentifier ChangeToWafPolicyId diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileListResult.cs index 66cb76486e59..4a16848ac0b5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + /// + /// Result of the request to list profiles. It contains a list of profile objects and a URL link to get the next set of results. + /// Serialized Name: ProfileListResult + /// internal partial class ProfileListResult { /// @@ -52,8 +55,14 @@ internal ProfileListResult() } /// Initializes a new instance of . - /// List of CDN profiles within a resource group. - /// URL to get the next set of profile objects if there are any. + /// + /// List of CDN profiles within a resource group. + /// Serialized Name: ProfileListResult.value + /// + /// + /// URL to get the next set of profile objects if there are any. + /// Serialized Name: ProfileListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal ProfileListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal ProfileListResult(IReadOnlyList value, string nextLink, ID _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of CDN profiles within a resource group. + /// + /// List of CDN profiles within a resource group. + /// Serialized Name: ProfileListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of profile objects if there are any. + /// + /// URL to get the next set of profile objects if there are any. + /// Serialized Name: ProfileListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileLogScrubbing.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileLogScrubbing.cs index 2557d8f6999e..9f492af3e235 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileLogScrubbing.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileLogScrubbing.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// + /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// Serialized Name: ProfileLogScrubbing + /// public partial class ProfileLogScrubbing { /// @@ -52,8 +55,14 @@ public ProfileLogScrubbing() } /// Initializes a new instance of . - /// State of the log scrubbing config. Default value is Enabled. - /// List of log scrubbing rules applied to the Azure Front Door profile logs. + /// + /// State of the log scrubbing config. Default value is Enabled. + /// Serialized Name: ProfileLogScrubbing.state + /// + /// + /// List of log scrubbing rules applied to the Azure Front Door profile logs. + /// Serialized Name: ProfileLogScrubbing.scrubbingRules + /// /// Keeps track of any properties unknown to the library. internal ProfileLogScrubbing(ProfileScrubbingState? state, IList scrubbingRules, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal ProfileLogScrubbing(ProfileScrubbingState? state, IList State of the log scrubbing config. Default value is Enabled. + /// + /// State of the log scrubbing config. Default value is Enabled. + /// Serialized Name: ProfileLogScrubbing.state + /// public ProfileScrubbingState? State { get; set; } - /// List of log scrubbing rules applied to the Azure Front Door profile logs. + /// + /// List of log scrubbing rules applied to the Azure Front Door profile logs. + /// Serialized Name: ProfileLogScrubbing.scrubbingRules + /// public IList ScrubbingRules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs index 644e36632218..e39ab55d5f46 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfilePatch.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Properties required to update a profile. + /// + /// Properties required to update a profile. + /// Serialized Name: ProfileUpdateParameters + /// public partial class ProfilePatch { /// @@ -53,10 +56,22 @@ public ProfilePatch() } /// Initializes a new instance of . - /// Profile tags. - /// Managed service identity (system assigned and/or user assigned identities). - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - /// Defines rules to scrub sensitive fields in logs. + /// + /// Profile tags + /// Serialized Name: ProfileUpdateParameters.tags + /// + /// + /// Managed service identity (system assigned and/or user assigned identities). + /// Serialized Name: ProfileUpdateParameters.identity + /// + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// Serialized Name: ProfileUpdateParameters.properties.originResponseTimeoutSeconds + /// + /// + /// Defines rules to scrub sensitive fields in logs + /// Serialized Name: ProfileUpdateParameters.properties.logScrubbing + /// /// Keeps track of any properties unknown to the library. internal ProfilePatch(IDictionary tags, ManagedServiceIdentity identity, int? originResponseTimeoutSeconds, ProfileLogScrubbing logScrubbing, IDictionary serializedAdditionalRawData) { @@ -67,13 +82,25 @@ internal ProfilePatch(IDictionary tags, ManagedServiceIdentity i _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Profile tags. + /// + /// Profile tags + /// Serialized Name: ProfileUpdateParameters.tags + /// public IDictionary Tags { get; } - /// Managed service identity (system assigned and/or user assigned identities). + /// + /// Managed service identity (system assigned and/or user assigned identities). + /// Serialized Name: ProfileUpdateParameters.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// Serialized Name: ProfileUpdateParameters.properties.originResponseTimeoutSeconds + /// public int? OriginResponseTimeoutSeconds { get; set; } - /// Defines rules to scrub sensitive fields in logs. + /// + /// Defines rules to scrub sensitive fields in logs + /// Serialized Name: ProfileUpdateParameters.properties.logScrubbing + /// public ProfileLogScrubbing LogScrubbing { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileProvisioningState.cs index 4eeb0b870b03..c267d05068ce 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning status of the profile. + /// + /// Provisioning status of the profile. + /// Serialized Name: ProfileProvisioningState + /// public readonly partial struct ProfileProvisioningState : IEquatable { private readonly string _value; @@ -28,15 +31,30 @@ public ProfileProvisioningState(string value) private const string DeletingValue = "Deleting"; private const string CreatingValue = "Creating"; - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: ProfileProvisioningState.Succeeded + /// public static ProfileProvisioningState Succeeded { get; } = new ProfileProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: ProfileProvisioningState.Failed + /// public static ProfileProvisioningState Failed { get; } = new ProfileProvisioningState(FailedValue); - /// Updating. + /// + /// Updating + /// Serialized Name: ProfileProvisioningState.Updating + /// public static ProfileProvisioningState Updating { get; } = new ProfileProvisioningState(UpdatingValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: ProfileProvisioningState.Deleting + /// public static ProfileProvisioningState Deleting { get; } = new ProfileProvisioningState(DeletingValue); - /// Creating. + /// + /// Creating + /// Serialized Name: ProfileProvisioningState.Creating + /// public static ProfileProvisioningState Creating { get; } = new ProfileProvisioningState(CreatingValue); /// Determines if two values are the same. public static bool operator ==(ProfileProvisioningState left, ProfileProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs index a1ccb3ef282c..cf292b5ac751 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileResourceState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resource status of the profile. + /// + /// Resource status of the profile. + /// Serialized Name: ProfileResourceState + /// public readonly partial struct ProfileResourceState : IEquatable { private readonly string _value; @@ -32,23 +35,50 @@ public ProfileResourceState(string value) private const string CommittingMigrationValue = "CommittingMigration"; private const string AbortingMigrationValue = "AbortingMigration"; - /// Creating. + /// + /// Creating + /// Serialized Name: ProfileResourceState.Creating + /// public static ProfileResourceState Creating { get; } = new ProfileResourceState(CreatingValue); - /// Active. + /// + /// Active + /// Serialized Name: ProfileResourceState.Active + /// public static ProfileResourceState Active { get; } = new ProfileResourceState(ActiveValue); - /// Deleting. + /// + /// Deleting + /// Serialized Name: ProfileResourceState.Deleting + /// public static ProfileResourceState Deleting { get; } = new ProfileResourceState(DeletingValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: ProfileResourceState.Disabled + /// public static ProfileResourceState Disabled { get; } = new ProfileResourceState(DisabledValue); - /// Migrating. + /// + /// Migrating + /// Serialized Name: ProfileResourceState.Migrating + /// public static ProfileResourceState Migrating { get; } = new ProfileResourceState(MigratingValue); - /// Migrated. + /// + /// Migrated + /// Serialized Name: ProfileResourceState.Migrated + /// public static ProfileResourceState Migrated { get; } = new ProfileResourceState(MigratedValue); - /// PendingMigrationCommit. + /// + /// PendingMigrationCommit + /// Serialized Name: ProfileResourceState.PendingMigrationCommit + /// public static ProfileResourceState PendingMigrationCommit { get; } = new ProfileResourceState(PendingMigrationCommitValue); - /// CommittingMigration. + /// + /// CommittingMigration + /// Serialized Name: ProfileResourceState.CommittingMigration + /// public static ProfileResourceState CommittingMigration { get; } = new ProfileResourceState(CommittingMigrationValue); - /// AbortingMigration. + /// + /// AbortingMigration + /// Serialized Name: ProfileResourceState.AbortingMigration + /// public static ProfileResourceState AbortingMigration { get; } = new ProfileResourceState(AbortingMigrationValue); /// Determines if two values are the same. public static bool operator ==(ProfileResourceState left, ProfileResourceState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingRules.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingRules.cs index 866b9ee3da28..2f5475c7eed2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingRules.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingRules.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the contents of the log scrubbing rules. + /// + /// Defines the contents of the log scrubbing rules. + /// Serialized Name: ProfileScrubbingRules + /// public partial class ProfileScrubbingRules { /// @@ -46,8 +49,14 @@ public partial class ProfileScrubbingRules private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The variable to be scrubbed from the logs. - /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// + /// The variable to be scrubbed from the logs. + /// Serialized Name: ProfileScrubbingRules.matchVariable + /// + /// + /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// Serialized Name: ProfileScrubbingRules.selectorMatchOperator + /// public ProfileScrubbingRules(ScrubbingRuleEntryMatchVariable matchVariable, ScrubbingRuleEntryMatchOperator selectorMatchOperator) { MatchVariable = matchVariable; @@ -55,10 +64,22 @@ public ProfileScrubbingRules(ScrubbingRuleEntryMatchVariable matchVariable, Scru } /// Initializes a new instance of . - /// The variable to be scrubbed from the logs. - /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. - /// When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. - /// Defines the state of a log scrubbing rule. Default value is enabled. + /// + /// The variable to be scrubbed from the logs. + /// Serialized Name: ProfileScrubbingRules.matchVariable + /// + /// + /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// Serialized Name: ProfileScrubbingRules.selectorMatchOperator + /// + /// + /// When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + /// Serialized Name: ProfileScrubbingRules.selector + /// + /// + /// Defines the state of a log scrubbing rule. Default value is enabled. + /// Serialized Name: ProfileScrubbingRules.state + /// /// Keeps track of any properties unknown to the library. internal ProfileScrubbingRules(ScrubbingRuleEntryMatchVariable matchVariable, ScrubbingRuleEntryMatchOperator selectorMatchOperator, string selector, ScrubbingRuleEntryState? state, IDictionary serializedAdditionalRawData) { @@ -74,13 +95,25 @@ internal ProfileScrubbingRules() { } - /// The variable to be scrubbed from the logs. + /// + /// The variable to be scrubbed from the logs. + /// Serialized Name: ProfileScrubbingRules.matchVariable + /// public ScrubbingRuleEntryMatchVariable MatchVariable { get; set; } - /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// + /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// Serialized Name: ProfileScrubbingRules.selectorMatchOperator + /// public ScrubbingRuleEntryMatchOperator SelectorMatchOperator { get; set; } - /// When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + /// + /// When matchVariable is a collection, operator used to specify which elements in the collection this rule applies to. + /// Serialized Name: ProfileScrubbingRules.selector + /// public string Selector { get; set; } - /// Defines the state of a log scrubbing rule. Default value is enabled. + /// + /// Defines the state of a log scrubbing rule. Default value is enabled. + /// Serialized Name: ProfileScrubbingRules.state + /// public ScrubbingRuleEntryState? State { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingState.cs index ea8688930b93..1450305b3812 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileScrubbingState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// State of the log scrubbing config. Default value is Enabled. + /// + /// State of the log scrubbing config. Default value is Enabled. + /// Serialized Name: ProfileScrubbingState + /// public readonly partial struct ProfileScrubbingState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ProfileScrubbingState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: ProfileScrubbingState.Enabled + /// public static ProfileScrubbingState Enabled { get; } = new ProfileScrubbingState(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: ProfileScrubbingState.Disabled + /// public static ProfileScrubbingState Disabled { get; } = new ProfileScrubbingState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ProfileScrubbingState left, ProfileScrubbingState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs index c6bb6113dda2..8ecc38789da3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ProfileUpgradeContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Parameters required for profile upgrade. + /// + /// Parameters required for profile upgrade. + /// Serialized Name: ProfileUpgradeParameters + /// public partial class ProfileUpgradeContent { /// @@ -47,7 +50,10 @@ public partial class ProfileUpgradeContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade. + /// + /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade + /// Serialized Name: ProfileUpgradeParameters.wafMappingList + /// /// is null. public ProfileUpgradeContent(IEnumerable wafMappingList) { @@ -57,7 +63,10 @@ public ProfileUpgradeContent(IEnumerable wafMappingL } /// Initializes a new instance of . - /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade. + /// + /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade + /// Serialized Name: ProfileUpgradeParameters.wafMappingList + /// /// Keeps track of any properties unknown to the library. internal ProfileUpgradeContent(IList wafMappingList, IDictionary serializedAdditionalRawData) { @@ -70,7 +79,10 @@ internal ProfileUpgradeContent() { } - /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade. + /// + /// Web Application Firewall (WAF) and security policy mapping for the profile upgrade + /// Serialized Name: ProfileUpgradeParameters.wafMappingList + /// public IList WafMappingList { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PurgeContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PurgeContent.cs index f875c2d2123b..3e424ffd874d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PurgeContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/PurgeContent.cs @@ -11,7 +11,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Parameters required for content purge. + /// + /// Parameters required for content purge. + /// Serialized Name: PurgeParameters + /// public partial class PurgeContent { /// @@ -47,7 +50,10 @@ public partial class PurgeContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: PurgeParameters.contentPaths + /// /// is null. public PurgeContent(IEnumerable contentPaths) { @@ -57,7 +63,10 @@ public PurgeContent(IEnumerable contentPaths) } /// Initializes a new instance of . - /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: PurgeParameters.contentPaths + /// /// Keeps track of any properties unknown to the library. internal PurgeContent(IList contentPaths, IDictionary serializedAdditionalRawData) { @@ -70,7 +79,10 @@ internal PurgeContent() { } - /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// + /// The path to the content to be purged. Can describe a file path or a wild card directory. + /// Serialized Name: PurgeParameters.contentPaths + /// public IList ContentPaths { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringBehavior.cs index 31385cfd6484..da91b5feee78 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringBehavior.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: QueryStringBehavior + /// public readonly partial struct QueryStringBehavior : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public QueryStringBehavior(string value) private const string ExcludeValue = "Exclude"; private const string ExcludeAllValue = "ExcludeAll"; - /// Include. + /// + /// Include + /// Serialized Name: QueryStringBehavior.Include + /// public static QueryStringBehavior Include { get; } = new QueryStringBehavior(IncludeValue); - /// IncludeAll. + /// + /// IncludeAll + /// Serialized Name: QueryStringBehavior.IncludeAll + /// public static QueryStringBehavior IncludeAll { get; } = new QueryStringBehavior(IncludeAllValue); - /// Exclude. + /// + /// Exclude + /// Serialized Name: QueryStringBehavior.Exclude + /// public static QueryStringBehavior Exclude { get; } = new QueryStringBehavior(ExcludeValue); - /// ExcludeAll. + /// + /// ExcludeAll + /// Serialized Name: QueryStringBehavior.ExcludeAll + /// public static QueryStringBehavior ExcludeAll { get; } = new QueryStringBehavior(ExcludeAllValue); /// Determines if two values are the same. public static bool operator ==(QueryStringBehavior left, QueryStringBehavior right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringCachingBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringCachingBehavior.cs index 21fbcd94a38c..507dad4bc3c4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringCachingBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringCachingBehavior.cs @@ -7,16 +7,31 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// + /// Defines how CDN caches requests that include query strings. You can ignore any query strings when caching, bypass caching to prevent requests that contain query strings from being cached, or cache every request with a unique URL. + /// Serialized Name: QueryStringCachingBehavior + /// public enum QueryStringCachingBehavior { - /// NotSet. + /// + /// NotSet + /// Serialized Name: QueryStringCachingBehavior.NotSet + /// NotSet, - /// IgnoreQueryString. + /// + /// IgnoreQueryString + /// Serialized Name: QueryStringCachingBehavior.IgnoreQueryString + /// IgnoreQueryString, - /// BypassCaching. + /// + /// BypassCaching + /// Serialized Name: QueryStringCachingBehavior.BypassCaching + /// BypassCaching, - /// UseQueryString. + /// + /// UseQueryString + /// Serialized Name: QueryStringCachingBehavior.UseQueryString + /// UseQueryString } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.Serialization.cs index 9fd8f0dee482..85edac639a29 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(QueryStringMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(QueryStringOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } QueryStringMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static QueryStringMatchCondition DeserializeQueryStringMatchCondition(J { return null; } - QueryStringMatchConditionType typeName = default; QueryStringOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new QueryStringMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new QueryStringOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static QueryStringMatchCondition DeserializeQueryStringMatchCondition(J transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static QueryStringMatchCondition DeserializeQueryStringMatchCondition(J serializedAdditionalRawData = rawDataDictionary; return new QueryStringMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.cs index f20aa072e801..cb2f33b62521 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for QueryString match conditions. - public partial class QueryStringMatchCondition + /// + /// Defines the parameters for QueryString match conditions + /// Serialized Name: QueryStringMatchConditionParameters + /// + public partial class QueryStringMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public QueryStringMatchCondition(QueryStringMatchConditionType conditionType, QueryStringOperator queryStringOperator) + /// + /// Describes operator to be matched + /// Serialized Name: QueryStringMatchConditionParameters.operator + /// + public QueryStringMatchCondition(QueryStringOperator queryStringOperator) { - ConditionType = conditionType; QueryStringOperator = queryStringOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleQueryStringConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal QueryStringMatchCondition(QueryStringMatchConditionType conditionType, QueryStringOperator queryStringOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: QueryStringMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: QueryStringMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: QueryStringMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: QueryStringMatchConditionParameters.transforms + /// + internal QueryStringMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, QueryStringOperator queryStringOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; QueryStringOperator = queryStringOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal QueryStringMatchCondition() { } - /// Gets or sets the condition type. - public QueryStringMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: QueryStringMatchConditionParameters.operator + /// public QueryStringOperator QueryStringOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: QueryStringMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: QueryStringMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: QueryStringMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringOperator.cs index 1ad1585c1957..46e4b62b7adb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/QueryStringOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: QueryStringOperator + /// public readonly partial struct QueryStringOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public QueryStringOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: QueryStringOperator.Any + /// public static QueryStringOperator Any { get; } = new QueryStringOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: QueryStringOperator.Equal + /// public static QueryStringOperator Equal { get; } = new QueryStringOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: QueryStringOperator.Contains + /// public static QueryStringOperator Contains { get; } = new QueryStringOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: QueryStringOperator.BeginsWith + /// public static QueryStringOperator BeginsWith { get; } = new QueryStringOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: QueryStringOperator.EndsWith + /// public static QueryStringOperator EndsWith { get; } = new QueryStringOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: QueryStringOperator.LessThan + /// public static QueryStringOperator LessThan { get; } = new QueryStringOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: QueryStringOperator.LessThanOrEqual + /// public static QueryStringOperator LessThanOrEqual { get; } = new QueryStringOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: QueryStringOperator.GreaterThan + /// public static QueryStringOperator GreaterThan { get; } = new QueryStringOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: QueryStringOperator.GreaterThanOrEqual + /// public static QueryStringOperator GreaterThanOrEqual { get; } = new QueryStringOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: QueryStringOperator.RegEx + /// public static QueryStringOperator RegEx { get; } = new QueryStringOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(QueryStringOperator left, QueryStringOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponse.cs index d26913273e3d..6641877a7962 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Rankings Response. + /// + /// Rankings Response + /// Serialized Name: RankingsResponse + /// public partial class RankingsResponse { /// @@ -52,9 +55,9 @@ internal RankingsResponse() } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: RankingsResponse.dateTimeBegin. + /// Serialized Name: RankingsResponse.dateTimeEnd. + /// Serialized Name: RankingsResponse.tables. /// Keeps track of any properties unknown to the library. internal RankingsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, IReadOnlyList tables, IDictionary serializedAdditionalRawData) { @@ -64,11 +67,11 @@ internal RankingsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTim _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date time begin. + /// Serialized Name: RankingsResponse.dateTimeBegin. public DateTimeOffset? DateTimeBegin { get; } - /// Gets the date time end. + /// Serialized Name: RankingsResponse.dateTimeEnd. public DateTimeOffset? DateTimeEnd { get; } - /// Gets the tables. + /// Serialized Name: RankingsResponse.tables. public IReadOnlyList Tables { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesItem.cs index 84f1de62707e..3abe54ae3f6b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The RankingsResponseTablesItem. + /// + /// The RankingsResponseTablesItem. + /// Serialized Name: RankingsResponseTablesItem + /// public partial class RankingsResponseTablesItem { /// @@ -52,8 +55,8 @@ internal RankingsResponseTablesItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: RankingsResponseTablesItem.ranking. + /// Serialized Name: RankingsResponseTablesItem.data. /// Keeps track of any properties unknown to the library. internal RankingsResponseTablesItem(string ranking, IReadOnlyList data, IDictionary serializedAdditionalRawData) { @@ -62,9 +65,9 @@ internal RankingsResponseTablesItem(string ranking, IReadOnlyList Gets the ranking. + /// Serialized Name: RankingsResponseTablesItem.ranking. public string Ranking { get; } - /// Gets the data. + /// Serialized Name: RankingsResponseTablesItem.data. public IReadOnlyList Data { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsItem.cs index b8e684fcb985..0dc4657bef85 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The RankingsResponseTablesPropertiesItemsItem. + /// + /// The RankingsResponseTablesPropertiesItemsItem. + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem + /// public partial class RankingsResponseTablesPropertiesItemsItem { /// @@ -52,8 +55,8 @@ internal RankingsResponseTablesPropertiesItemsItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.name. + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.metrics. /// Keeps track of any properties unknown to the library. internal RankingsResponseTablesPropertiesItemsItem(string name, IReadOnlyList metrics, IDictionary serializedAdditionalRawData) { @@ -62,9 +65,9 @@ internal RankingsResponseTablesPropertiesItemsItem(string name, IReadOnlyList Gets the name. + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.name. public string Name { get; } - /// Gets the metrics. + /// Serialized Name: RankingsResponseTablesPropertiesItemsItem.metrics. public IReadOnlyList Metrics { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsMetricsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsMetricsItem.cs index 8dcf9aecae00..3245204eb8bd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsMetricsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RankingsResponseTablesPropertiesItemsMetricsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The RankingsResponseTablesPropertiesItemsMetricsItem. + /// + /// The RankingsResponseTablesPropertiesItemsMetricsItem. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem + /// public partial class RankingsResponseTablesPropertiesItemsMetricsItem { /// @@ -51,9 +54,9 @@ internal RankingsResponseTablesPropertiesItemsMetricsItem() } /// Initializes a new instance of . - /// - /// - /// + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.metric. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.value. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.percentage. /// Keeps track of any properties unknown to the library. internal RankingsResponseTablesPropertiesItemsMetricsItem(string metric, long? value, float? percentage, IDictionary serializedAdditionalRawData) { @@ -63,11 +66,11 @@ internal RankingsResponseTablesPropertiesItemsMetricsItem(string metric, long? v _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the metric. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.metric. public string Metric { get; } - /// Gets the value. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.value. public long? Value { get; } - /// Gets the percentage. + /// Serialized Name: RankingsResponseTablesPropertiesItemsMetricsItem.percentage. public float? Percentage { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRule.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRule.cs index dcdbff4239dc..7183f0d063a4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRule.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRule.cs @@ -10,16 +10,37 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines a rate limiting rule that can be included in a waf policy. + /// + /// Defines a rate limiting rule that can be included in a waf policy + /// Serialized Name: RateLimitRule + /// public partial class RateLimitRule : CustomRule { /// Initializes a new instance of . - /// Defines the name of the custom rule. - /// Defines in what order this rule be evaluated in the overall list of custom rules. - /// List of match conditions. - /// Describes what action to be applied when rule matches. - /// Defines rate limit threshold. - /// Defines rate limit duration. Default is 1 minute. + /// + /// Defines the name of the custom rule + /// Serialized Name: CustomRule.name + /// + /// + /// Defines in what order this rule be evaluated in the overall list of custom rules + /// Serialized Name: CustomRule.priority + /// + /// + /// List of match conditions. + /// Serialized Name: CustomRule.matchConditions + /// + /// + /// Describes what action to be applied when rule matches + /// Serialized Name: CustomRule.action + /// + /// + /// Defines rate limit threshold. + /// Serialized Name: RateLimitRule.rateLimitThreshold + /// + /// + /// Defines rate limit duration. Default is 1 minute. + /// Serialized Name: RateLimitRule.rateLimitDurationInMinutes + /// /// or is null. public RateLimitRule(string name, int priority, IEnumerable matchConditions, OverrideActionType action, int rateLimitThreshold, int rateLimitDurationInMinutes) : base(name, priority, matchConditions, action) { @@ -31,14 +52,35 @@ public RateLimitRule(string name, int priority, IEnumerable Initializes a new instance of . - /// Defines the name of the custom rule. - /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. - /// Defines in what order this rule be evaluated in the overall list of custom rules. - /// List of match conditions. - /// Describes what action to be applied when rule matches. + /// + /// Defines the name of the custom rule + /// Serialized Name: CustomRule.name + /// + /// + /// Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified. + /// Serialized Name: CustomRule.enabledState + /// + /// + /// Defines in what order this rule be evaluated in the overall list of custom rules + /// Serialized Name: CustomRule.priority + /// + /// + /// List of match conditions. + /// Serialized Name: CustomRule.matchConditions + /// + /// + /// Describes what action to be applied when rule matches + /// Serialized Name: CustomRule.action + /// /// Keeps track of any properties unknown to the library. - /// Defines rate limit threshold. - /// Defines rate limit duration. Default is 1 minute. + /// + /// Defines rate limit threshold. + /// Serialized Name: RateLimitRule.rateLimitThreshold + /// + /// + /// Defines rate limit duration. Default is 1 minute. + /// Serialized Name: RateLimitRule.rateLimitDurationInMinutes + /// internal RateLimitRule(string name, CustomRuleEnabledState? enabledState, int priority, IList matchConditions, OverrideActionType action, IDictionary serializedAdditionalRawData, int rateLimitThreshold, int rateLimitDurationInMinutes) : base(name, enabledState, priority, matchConditions, action, serializedAdditionalRawData) { RateLimitThreshold = rateLimitThreshold; @@ -50,9 +92,15 @@ internal RateLimitRule() { } - /// Defines rate limit threshold. + /// + /// Defines rate limit threshold. + /// Serialized Name: RateLimitRule.rateLimitThreshold + /// public int RateLimitThreshold { get; set; } - /// Defines rate limit duration. Default is 1 minute. + /// + /// Defines rate limit duration. Default is 1 minute. + /// Serialized Name: RateLimitRule.rateLimitDurationInMinutes + /// public int RateLimitDurationInMinutes { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRuleList.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRuleList.cs index 7ddc5b434942..7fd3e8016f2c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRuleList.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RateLimitRuleList.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines contents of rate limit rules. + /// + /// Defines contents of rate limit rules + /// Serialized Name: RateLimitRuleList + /// internal partial class RateLimitRuleList { /// @@ -52,7 +55,10 @@ public RateLimitRuleList() } /// Initializes a new instance of . - /// List of rules. + /// + /// List of rules + /// Serialized Name: RateLimitRuleList.rules + /// /// Keeps track of any properties unknown to the library. internal RateLimitRuleList(IList rules, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal RateLimitRuleList(IList rules, IDictionary List of rules. + /// + /// List of rules + /// Serialized Name: RateLimitRuleList.rules + /// public IList Rules { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RedirectType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RedirectType.cs index 8ca7fea97eb0..2a1250d02f2f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RedirectType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RedirectType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The redirect type the rule will use when redirecting traffic. + /// + /// The redirect type the rule will use when redirecting traffic. + /// Serialized Name: RedirectType + /// public readonly partial struct RedirectType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public RedirectType(string value) private const string TemporaryRedirectValue = "TemporaryRedirect"; private const string PermanentRedirectValue = "PermanentRedirect"; - /// Moved. + /// + /// Moved + /// Serialized Name: RedirectType.Moved + /// public static RedirectType Moved { get; } = new RedirectType(MovedValue); - /// Found. + /// + /// Found + /// Serialized Name: RedirectType.Found + /// public static RedirectType Found { get; } = new RedirectType(FoundValue); - /// TemporaryRedirect. + /// + /// TemporaryRedirect + /// Serialized Name: RedirectType.TemporaryRedirect + /// public static RedirectType TemporaryRedirect { get; } = new RedirectType(TemporaryRedirectValue); - /// PermanentRedirect. + /// + /// PermanentRedirect + /// Serialized Name: RedirectType.PermanentRedirect + /// public static RedirectType PermanentRedirect { get; } = new RedirectType(PermanentRedirectValue); /// Determines if two values are the same. public static bool operator ==(RedirectType left, RedirectType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.Serialization.cs index fd8208c01d09..8cf7e663380a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RemoteAddressMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(RemoteAddressOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RemoteAddressMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static RemoteAddressMatchCondition DeserializeRemoteAddressMatchConditi { return null; } - RemoteAddressMatchConditionType typeName = default; RemoteAddressOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RemoteAddressMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new RemoteAddressOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static RemoteAddressMatchCondition DeserializeRemoteAddressMatchConditi transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static RemoteAddressMatchCondition DeserializeRemoteAddressMatchConditi serializedAdditionalRawData = rawDataDictionary; return new RemoteAddressMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.cs index 9cf937881b61..f32a9106be6c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RemoteAddress match conditions. - public partial class RemoteAddressMatchCondition + /// + /// Defines the parameters for RemoteAddress match conditions + /// Serialized Name: RemoteAddressMatchConditionParameters + /// + public partial class RemoteAddressMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RemoteAddressMatchCondition(RemoteAddressMatchConditionType conditionType, RemoteAddressOperator remoteAddressOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RemoteAddressMatchConditionParameters.operator + /// + public RemoteAddressMatchCondition(RemoteAddressOperator remoteAddressOperator) { - ConditionType = conditionType; RemoteAddressOperator = remoteAddressOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRemoteAddressConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RemoteAddressMatchCondition(RemoteAddressMatchConditionType conditionType, RemoteAddressOperator remoteAddressOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: RemoteAddressMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RemoteAddressMatchConditionParameters.negateCondition + /// + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. + /// Serialized Name: RemoteAddressMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: RemoteAddressMatchConditionParameters.transforms + /// + internal RemoteAddressMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, RemoteAddressOperator remoteAddressOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; RemoteAddressOperator = remoteAddressOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal RemoteAddressMatchCondition() { } - /// Gets or sets the condition type. - public RemoteAddressMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RemoteAddressMatchConditionParameters.operator + /// public RemoteAddressOperator RemoteAddressOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RemoteAddressMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. + /// + /// Match values to match against. The operator will apply to each value in here with OR semantics. If any of them match the variable with the given operator this match condition is considered a match. + /// Serialized Name: RemoteAddressMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RemoteAddressMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressOperator.cs index 3e4689be0a9a..ef38bbbf60dd 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RemoteAddressOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RemoteAddressOperator + /// public readonly partial struct RemoteAddressOperator : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public RemoteAddressOperator(string value) private const string IPMatchValue = "IPMatch"; private const string GeoMatchValue = "GeoMatch"; - /// Any. + /// + /// Any + /// Serialized Name: RemoteAddressOperator.Any + /// public static RemoteAddressOperator Any { get; } = new RemoteAddressOperator(AnyValue); - /// IPMatch. + /// + /// IPMatch + /// Serialized Name: RemoteAddressOperator.IPMatch + /// public static RemoteAddressOperator IPMatch { get; } = new RemoteAddressOperator(IPMatchValue); - /// GeoMatch. + /// + /// GeoMatch + /// Serialized Name: RemoteAddressOperator.GeoMatch + /// public static RemoteAddressOperator GeoMatch { get; } = new RemoteAddressOperator(GeoMatchValue); /// Determines if two values are the same. public static bool operator ==(RemoteAddressOperator left, RemoteAddressOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.Serialization.cs index 3df0740e0b8d..f2e66842f880 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestBodyMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(RequestBodyOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RequestBodyMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static RequestBodyMatchCondition DeserializeRequestBodyMatchCondition(J { return null; } - RequestBodyMatchConditionType typeName = default; RequestBodyOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RequestBodyMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new RequestBodyOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static RequestBodyMatchCondition DeserializeRequestBodyMatchCondition(J transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static RequestBodyMatchCondition DeserializeRequestBodyMatchCondition(J serializedAdditionalRawData = rawDataDictionary; return new RequestBodyMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.cs index 8748f6a52215..8243654f04c7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RequestBody match conditions. - public partial class RequestBodyMatchCondition + /// + /// Defines the parameters for RequestBody match conditions + /// Serialized Name: RequestBodyMatchConditionParameters + /// + public partial class RequestBodyMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RequestBodyMatchCondition(RequestBodyMatchConditionType conditionType, RequestBodyOperator requestBodyOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RequestBodyMatchConditionParameters.operator + /// + public RequestBodyMatchCondition(RequestBodyOperator requestBodyOperator) { - ConditionType = conditionType; RequestBodyOperator = requestBodyOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRequestBodyConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RequestBodyMatchCondition(RequestBodyMatchConditionType conditionType, RequestBodyOperator requestBodyOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: RequestBodyMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestBodyMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestBodyMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: RequestBodyMatchConditionParameters.transforms + /// + internal RequestBodyMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, RequestBodyOperator requestBodyOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; RequestBodyOperator = requestBodyOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal RequestBodyMatchCondition() { } - /// Gets or sets the condition type. - public RequestBodyMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestBodyMatchConditionParameters.operator + /// public RequestBodyOperator RequestBodyOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestBodyMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestBodyMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RequestBodyMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyOperator.cs index a4e562e198e0..7119edc28085 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestBodyOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestBodyOperator + /// public readonly partial struct RequestBodyOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public RequestBodyOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: RequestBodyOperator.Any + /// public static RequestBodyOperator Any { get; } = new RequestBodyOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: RequestBodyOperator.Equal + /// public static RequestBodyOperator Equal { get; } = new RequestBodyOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: RequestBodyOperator.Contains + /// public static RequestBodyOperator Contains { get; } = new RequestBodyOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: RequestBodyOperator.BeginsWith + /// public static RequestBodyOperator BeginsWith { get; } = new RequestBodyOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: RequestBodyOperator.EndsWith + /// public static RequestBodyOperator EndsWith { get; } = new RequestBodyOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: RequestBodyOperator.LessThan + /// public static RequestBodyOperator LessThan { get; } = new RequestBodyOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: RequestBodyOperator.LessThanOrEqual + /// public static RequestBodyOperator LessThanOrEqual { get; } = new RequestBodyOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: RequestBodyOperator.GreaterThan + /// public static RequestBodyOperator GreaterThan { get; } = new RequestBodyOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: RequestBodyOperator.GreaterThanOrEqual + /// public static RequestBodyOperator GreaterThanOrEqual { get; } = new RequestBodyOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: RequestBodyOperator.RegEx + /// public static RequestBodyOperator RegEx { get; } = new RequestBodyOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(RequestBodyOperator left, RequestBodyOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.Serialization.cs index e3020b95c984..8db2b78e9e0e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestHeaderMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Selector)) { writer.WritePropertyName("selector"u8); @@ -68,21 +67,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RequestHeaderMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -105,21 +89,16 @@ internal static RequestHeaderMatchCondition DeserializeRequestHeaderMatchConditi { return null; } - RequestHeaderMatchConditionType typeName = default; string selector = default; RequestHeaderOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RequestHeaderMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("selector"u8)) { selector = property.Value.GetString(); @@ -167,6 +146,11 @@ internal static RequestHeaderMatchCondition DeserializeRequestHeaderMatchConditi transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -175,12 +159,12 @@ internal static RequestHeaderMatchCondition DeserializeRequestHeaderMatchConditi serializedAdditionalRawData = rawDataDictionary; return new RequestHeaderMatchCondition( typeName, + serializedAdditionalRawData, selector, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.cs index dd9d7263ff6a..e331a101c36f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderMatchCondition.cs @@ -10,69 +10,56 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RequestHeader match conditions. - public partial class RequestHeaderMatchCondition + /// + /// Defines the parameters for RequestHeader match conditions + /// Serialized Name: RequestHeaderMatchConditionParameters + /// + public partial class RequestHeaderMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RequestHeaderMatchCondition(RequestHeaderMatchConditionType conditionType, RequestHeaderOperator requestHeaderOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RequestHeaderMatchConditionParameters.operator + /// + public RequestHeaderMatchCondition(RequestHeaderOperator requestHeaderOperator) { - ConditionType = conditionType; RequestHeaderOperator = requestHeaderOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRequestHeaderConditionParameters; } /// Initializes a new instance of . - /// - /// Name of Header to be matched. - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RequestHeaderMatchCondition(RequestHeaderMatchConditionType conditionType, string selector, RequestHeaderOperator requestHeaderOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Name of Header to be matched + /// Serialized Name: RequestHeaderMatchConditionParameters.selector + /// + /// + /// Describes operator to be matched + /// Serialized Name: RequestHeaderMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestHeaderMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestHeaderMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: RequestHeaderMatchConditionParameters.transforms + /// + internal RequestHeaderMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, string selector, RequestHeaderOperator requestHeaderOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; Selector = selector; RequestHeaderOperator = requestHeaderOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -80,17 +67,30 @@ internal RequestHeaderMatchCondition() { } - /// Gets or sets the condition type. - public RequestHeaderMatchConditionType ConditionType { get; set; } - /// Name of Header to be matched. + /// + /// Name of Header to be matched + /// Serialized Name: RequestHeaderMatchConditionParameters.selector + /// public string Selector { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestHeaderMatchConditionParameters.operator + /// public RequestHeaderOperator RequestHeaderOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestHeaderMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestHeaderMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RequestHeaderMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderOperator.cs index 64cf960775ee..3f5a16a3bbe5 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestHeaderOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestHeaderOperator + /// public readonly partial struct RequestHeaderOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public RequestHeaderOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: RequestHeaderOperator.Any + /// public static RequestHeaderOperator Any { get; } = new RequestHeaderOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: RequestHeaderOperator.Equal + /// public static RequestHeaderOperator Equal { get; } = new RequestHeaderOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: RequestHeaderOperator.Contains + /// public static RequestHeaderOperator Contains { get; } = new RequestHeaderOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: RequestHeaderOperator.BeginsWith + /// public static RequestHeaderOperator BeginsWith { get; } = new RequestHeaderOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: RequestHeaderOperator.EndsWith + /// public static RequestHeaderOperator EndsWith { get; } = new RequestHeaderOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: RequestHeaderOperator.LessThan + /// public static RequestHeaderOperator LessThan { get; } = new RequestHeaderOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: RequestHeaderOperator.LessThanOrEqual + /// public static RequestHeaderOperator LessThanOrEqual { get; } = new RequestHeaderOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: RequestHeaderOperator.GreaterThan + /// public static RequestHeaderOperator GreaterThan { get; } = new RequestHeaderOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: RequestHeaderOperator.GreaterThanOrEqual + /// public static RequestHeaderOperator GreaterThanOrEqual { get; } = new RequestHeaderOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: RequestHeaderOperator.RegEx + /// public static RequestHeaderOperator RegEx { get; } = new RequestHeaderOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(RequestHeaderOperator left, RequestHeaderOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.Serialization.cs index 02a502424f33..4f8de807419b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestMethodMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(RequestMethodOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RequestMethodMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static RequestMethodMatchCondition DeserializeRequestMethodMatchConditi { return null; } - RequestMethodMatchConditionType typeName = default; RequestMethodOperator @operator = default; bool? negateCondition = default; IList transforms = default; IList matchValues = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RequestMethodMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new RequestMethodOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static RequestMethodMatchCondition DeserializeRequestMethodMatchConditi matchValues = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static RequestMethodMatchCondition DeserializeRequestMethodMatchConditi serializedAdditionalRawData = rawDataDictionary; return new RequestMethodMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, transforms ?? new ChangeTrackingList(), - matchValues ?? new ChangeTrackingList(), - serializedAdditionalRawData); + matchValues ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.cs index 61529b33fe9b..2ed79bdc861e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RequestMethod match conditions. - public partial class RequestMethodMatchCondition + /// + /// Defines the parameters for RequestMethod match conditions + /// Serialized Name: RequestMethodMatchConditionParameters + /// + public partial class RequestMethodMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RequestMethodMatchCondition(RequestMethodMatchConditionType conditionType, RequestMethodOperator requestMethodOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RequestMethodMatchConditionParameters.operator + /// + public RequestMethodMatchCondition(RequestMethodOperator requestMethodOperator) { - ConditionType = conditionType; RequestMethodOperator = requestMethodOperator; Transforms = new ChangeTrackingList(); MatchValues = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRequestMethodConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// List of transforms. - /// The match value for the condition of the delivery rule. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RequestMethodMatchCondition(RequestMethodMatchConditionType conditionType, RequestMethodOperator requestMethodOperator, bool? negateCondition, IList transforms, IList matchValues, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: RequestMethodMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestMethodMatchConditionParameters.negateCondition + /// + /// + /// List of transforms + /// Serialized Name: RequestMethodMatchConditionParameters.transforms + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestMethodMatchConditionParameters.matchValues + /// + internal RequestMethodMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, RequestMethodOperator requestMethodOperator, bool? negateCondition, IList transforms, IList matchValues) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; RequestMethodOperator = requestMethodOperator; NegateCondition = negateCondition; Transforms = transforms; MatchValues = matchValues; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal RequestMethodMatchCondition() { } - /// Gets or sets the condition type. - public RequestMethodMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestMethodMatchConditionParameters.operator + /// public RequestMethodOperator RequestMethodOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestMethodMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RequestMethodMatchConditionParameters.transforms + /// public IList Transforms { get; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestMethodMatchConditionParameters.matchValues + /// public IList MatchValues { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionMatchValue.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionMatchValue.cs index e42d2cfbe434..99f897d2f4b9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionMatchValue.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodMatchConditionMatchValue.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The RequestMethodMatchConditionMatchValue. + /// + /// The RequestMethodMatchConditionMatchValue. + /// Serialized Name: RequestMethodMatchValue + /// public readonly partial struct RequestMethodMatchConditionMatchValue : IEquatable { private readonly string _value; @@ -30,19 +33,40 @@ public RequestMethodMatchConditionMatchValue(string value) private const string OptionsValue = "OPTIONS"; private const string TraceValue = "TRACE"; - /// GET. + /// + /// GET + /// Serialized Name: RequestMethodMatchValue.GET + /// public static RequestMethodMatchConditionMatchValue Get { get; } = new RequestMethodMatchConditionMatchValue(GetValue); - /// HEAD. + /// + /// HEAD + /// Serialized Name: RequestMethodMatchValue.HEAD + /// public static RequestMethodMatchConditionMatchValue Head { get; } = new RequestMethodMatchConditionMatchValue(HeadValue); - /// POST. + /// + /// POST + /// Serialized Name: RequestMethodMatchValue.POST + /// public static RequestMethodMatchConditionMatchValue Post { get; } = new RequestMethodMatchConditionMatchValue(PostValue); - /// PUT. + /// + /// PUT + /// Serialized Name: RequestMethodMatchValue.PUT + /// public static RequestMethodMatchConditionMatchValue Put { get; } = new RequestMethodMatchConditionMatchValue(PutValue); - /// DELETE. + /// + /// DELETE + /// Serialized Name: RequestMethodMatchValue.DELETE + /// public static RequestMethodMatchConditionMatchValue Delete { get; } = new RequestMethodMatchConditionMatchValue(DeleteValue); - /// OPTIONS. + /// + /// OPTIONS + /// Serialized Name: RequestMethodMatchValue.OPTIONS + /// public static RequestMethodMatchConditionMatchValue Options { get; } = new RequestMethodMatchConditionMatchValue(OptionsValue); - /// TRACE. + /// + /// TRACE + /// Serialized Name: RequestMethodMatchValue.TRACE + /// public static RequestMethodMatchConditionMatchValue Trace { get; } = new RequestMethodMatchConditionMatchValue(TraceValue); /// Determines if two values are the same. public static bool operator ==(RequestMethodMatchConditionMatchValue left, RequestMethodMatchConditionMatchValue right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodOperator.cs index bdf6e38c155c..90d09d31c738 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestMethodOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestMethodOperator + /// public readonly partial struct RequestMethodOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public RequestMethodOperator(string value) private const string EqualValue = "Equal"; - /// Equal. + /// + /// Equal + /// Serialized Name: RequestMethodOperator.Equal + /// public static RequestMethodOperator Equal { get; } = new RequestMethodOperator(EqualValue); /// Determines if two values are the same. public static bool operator ==(RequestMethodOperator left, RequestMethodOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.Serialization.cs index 08f95f66f618..2ce4200ca134 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestSchemeMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(RequestSchemeOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RequestSchemeMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static RequestSchemeMatchCondition DeserializeRequestSchemeMatchConditi { return null; } - RequestSchemeMatchConditionType typeName = default; RequestSchemeOperator @operator = default; bool? negateCondition = default; IList transforms = default; IList matchValues = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RequestSchemeMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new RequestSchemeOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static RequestSchemeMatchCondition DeserializeRequestSchemeMatchConditi matchValues = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static RequestSchemeMatchCondition DeserializeRequestSchemeMatchConditi serializedAdditionalRawData = rawDataDictionary; return new RequestSchemeMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, transforms ?? new ChangeTrackingList(), - matchValues ?? new ChangeTrackingList(), - serializedAdditionalRawData); + matchValues ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.cs index c166430cc7b4..66d79f5396d2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RequestScheme match conditions. - public partial class RequestSchemeMatchCondition + /// + /// Defines the parameters for RequestScheme match conditions + /// Serialized Name: RequestSchemeMatchConditionParameters + /// + public partial class RequestSchemeMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RequestSchemeMatchCondition(RequestSchemeMatchConditionType conditionType, RequestSchemeOperator requestSchemeOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RequestSchemeMatchConditionParameters.operator + /// + public RequestSchemeMatchCondition(RequestSchemeOperator requestSchemeOperator) { - ConditionType = conditionType; RequestSchemeOperator = requestSchemeOperator; Transforms = new ChangeTrackingList(); MatchValues = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRequestSchemeConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// List of transforms. - /// The match value for the condition of the delivery rule. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RequestSchemeMatchCondition(RequestSchemeMatchConditionType conditionType, RequestSchemeOperator requestSchemeOperator, bool? negateCondition, IList transforms, IList matchValues, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: RequestSchemeMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestSchemeMatchConditionParameters.negateCondition + /// + /// + /// List of transforms + /// Serialized Name: RequestSchemeMatchConditionParameters.transforms + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestSchemeMatchConditionParameters.matchValues + /// + internal RequestSchemeMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, RequestSchemeOperator requestSchemeOperator, bool? negateCondition, IList transforms, IList matchValues) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; RequestSchemeOperator = requestSchemeOperator; NegateCondition = negateCondition; Transforms = transforms; MatchValues = matchValues; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal RequestSchemeMatchCondition() { } - /// Gets or sets the condition type. - public RequestSchemeMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestSchemeMatchConditionParameters.operator + /// public RequestSchemeOperator RequestSchemeOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestSchemeMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RequestSchemeMatchConditionParameters.transforms + /// public IList Transforms { get; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestSchemeMatchConditionParameters.matchValues + /// public IList MatchValues { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionMatchValue.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionMatchValue.cs index a01031d35c21..b3e67b7da93a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionMatchValue.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeMatchConditionMatchValue.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The RequestSchemeMatchConditionMatchValue. + /// + /// The RequestSchemeMatchConditionMatchValue. + /// Serialized Name: RequestSchemeMatchValue + /// public readonly partial struct RequestSchemeMatchConditionMatchValue : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public RequestSchemeMatchConditionMatchValue(string value) private const string HttpValue = "HTTP"; private const string HttpsValue = "HTTPS"; - /// HTTP. + /// + /// HTTP + /// Serialized Name: RequestSchemeMatchValue.HTTP + /// public static RequestSchemeMatchConditionMatchValue Http { get; } = new RequestSchemeMatchConditionMatchValue(HttpValue); - /// HTTPS. + /// + /// HTTPS + /// Serialized Name: RequestSchemeMatchValue.HTTPS + /// public static RequestSchemeMatchConditionMatchValue Https { get; } = new RequestSchemeMatchConditionMatchValue(HttpsValue); /// Determines if two values are the same. public static bool operator ==(RequestSchemeMatchConditionMatchValue left, RequestSchemeMatchConditionMatchValue right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeOperator.cs index f1403f6278c6..bea2679cfcb0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestSchemeOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestSchemeOperator + /// public readonly partial struct RequestSchemeOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public RequestSchemeOperator(string value) private const string EqualValue = "Equal"; - /// Equal. + /// + /// Equal + /// Serialized Name: RequestSchemeOperator.Equal + /// public static RequestSchemeOperator Equal { get; } = new RequestSchemeOperator(EqualValue); /// Determines if two values are the same. public static bool operator ==(RequestSchemeOperator left, RequestSchemeOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.Serialization.cs index 886a1524b22a..4efb4115a5f3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RequestUriMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(RequestUriOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } RequestUriMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static RequestUriMatchCondition DeserializeRequestUriMatchCondition(Jso { return null; } - RequestUriMatchConditionType typeName = default; RequestUriOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RequestUriMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new RequestUriOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static RequestUriMatchCondition DeserializeRequestUriMatchCondition(Jso transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static RequestUriMatchCondition DeserializeRequestUriMatchCondition(Jso serializedAdditionalRawData = rawDataDictionary; return new RequestUriMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.cs index dd24164734b7..7d53fb73b2d1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for RequestUri match conditions. - public partial class RequestUriMatchCondition + /// + /// Defines the parameters for RequestUri match conditions + /// Serialized Name: RequestUriMatchConditionParameters + /// + public partial class RequestUriMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public RequestUriMatchCondition(RequestUriMatchConditionType conditionType, RequestUriOperator requestUriOperator) + /// + /// Describes operator to be matched + /// Serialized Name: RequestUriMatchConditionParameters.operator + /// + public RequestUriMatchCondition(RequestUriOperator requestUriOperator) { - ConditionType = conditionType; RequestUriOperator = requestUriOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleRequestUriConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RequestUriMatchCondition(RequestUriMatchConditionType conditionType, RequestUriOperator requestUriOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: RequestUriMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestUriMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestUriMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: RequestUriMatchConditionParameters.transforms + /// + internal RequestUriMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, RequestUriOperator requestUriOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; RequestUriOperator = requestUriOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal RequestUriMatchCondition() { } - /// Gets or sets the condition type. - public RequestUriMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestUriMatchConditionParameters.operator + /// public RequestUriOperator RequestUriOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: RequestUriMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: RequestUriMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: RequestUriMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriOperator.cs index 9f2c18a2dcc0..4bbfd5a6819b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RequestUriOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: RequestUriOperator + /// public readonly partial struct RequestUriOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public RequestUriOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: RequestUriOperator.Any + /// public static RequestUriOperator Any { get; } = new RequestUriOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: RequestUriOperator.Equal + /// public static RequestUriOperator Equal { get; } = new RequestUriOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: RequestUriOperator.Contains + /// public static RequestUriOperator Contains { get; } = new RequestUriOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: RequestUriOperator.BeginsWith + /// public static RequestUriOperator BeginsWith { get; } = new RequestUriOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: RequestUriOperator.EndsWith + /// public static RequestUriOperator EndsWith { get; } = new RequestUriOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: RequestUriOperator.LessThan + /// public static RequestUriOperator LessThan { get; } = new RequestUriOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: RequestUriOperator.LessThanOrEqual + /// public static RequestUriOperator LessThanOrEqual { get; } = new RequestUriOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: RequestUriOperator.GreaterThan + /// public static RequestUriOperator GreaterThan { get; } = new RequestUriOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: RequestUriOperator.GreaterThanOrEqual + /// public static RequestUriOperator GreaterThanOrEqual { get; } = new RequestUriOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: RequestUriOperator.RegEx + /// public static RequestUriOperator RegEx { get; } = new RequestUriOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(RequestUriOperator left, RequestUriOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourceUsageListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourceUsageListResult.cs index 79e513920c65..130729cacbae 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourceUsageListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourceUsageListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of check resource usage API. + /// + /// Output of check resource usage API. + /// Serialized Name: ResourceUsageListResult + /// internal partial class ResourceUsageListResult { /// @@ -52,8 +55,14 @@ internal ResourceUsageListResult() } /// Initializes a new instance of . - /// List of resource usages. - /// URL to get the next set of custom domain objects if there are any. + /// + /// List of resource usages. + /// Serialized Name: ResourceUsageListResult.value + /// + /// + /// URL to get the next set of custom domain objects if there are any. + /// Serialized Name: ResourceUsageListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal ResourceUsageListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal ResourceUsageListResult(IReadOnlyList value, string nextLink, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of resource usages. + /// + /// List of resource usages. + /// Serialized Name: ResourceUsageListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of custom domain objects if there are any. + /// + /// URL to get the next set of custom domain objects if there are any. + /// Serialized Name: ResourceUsageListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponse.cs index ed4e66533b9a..844ab8fe975e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Resources Response. + /// + /// Resources Response + /// Serialized Name: ResourcesResponse + /// public partial class ResourcesResponse { /// @@ -53,8 +56,8 @@ internal ResourcesResponse() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: ResourcesResponse.endpoints. + /// Serialized Name: ResourcesResponse.customDomains. /// Keeps track of any properties unknown to the library. internal ResourcesResponse(IReadOnlyList endpoints, IReadOnlyList customDomains, IDictionary serializedAdditionalRawData) { @@ -63,9 +66,9 @@ internal ResourcesResponse(IReadOnlyList endpoin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the endpoints. + /// Serialized Name: ResourcesResponse.endpoints. public IReadOnlyList Endpoints { get; } - /// Gets the custom domains. + /// Serialized Name: ResourcesResponse.customDomains. public IReadOnlyList CustomDomains { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseCustomDomainsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseCustomDomainsItem.cs index 2c6e930326fd..0c9c8881dc37 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseCustomDomainsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseCustomDomainsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ResourcesResponseCustomDomainsItem. + /// + /// The ResourcesResponseCustomDomainsItem. + /// Serialized Name: ResourcesResponseCustomDomainsItem + /// public partial class ResourcesResponseCustomDomainsItem { /// @@ -51,10 +54,10 @@ internal ResourcesResponseCustomDomainsItem() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseCustomDomainsItem.id. + /// Serialized Name: ResourcesResponseCustomDomainsItem.name. + /// Serialized Name: ResourcesResponseCustomDomainsItem.endpointId. + /// Serialized Name: ResourcesResponseCustomDomainsItem.history. /// Keeps track of any properties unknown to the library. internal ResourcesResponseCustomDomainsItem(string id, string name, string endpointId, bool? history, IDictionary serializedAdditionalRawData) { @@ -65,13 +68,13 @@ internal ResourcesResponseCustomDomainsItem(string id, string name, string endpo _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the id. + /// Serialized Name: ResourcesResponseCustomDomainsItem.id. public string Id { get; } - /// Gets the name. + /// Serialized Name: ResourcesResponseCustomDomainsItem.name. public string Name { get; } - /// Gets the endpoint id. + /// Serialized Name: ResourcesResponseCustomDomainsItem.endpointId. public string EndpointId { get; } - /// Gets the history. + /// Serialized Name: ResourcesResponseCustomDomainsItem.history. public bool? History { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsItem.cs index 8a75f7812e53..6d34b1ba5257 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ResourcesResponseEndpointsItem. + /// + /// The ResourcesResponseEndpointsItem. + /// Serialized Name: ResourcesResponseEndpointsItem + /// public partial class ResourcesResponseEndpointsItem { /// @@ -52,10 +55,10 @@ internal ResourcesResponseEndpointsItem() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseEndpointsItem.id. + /// Serialized Name: ResourcesResponseEndpointsItem.name. + /// Serialized Name: ResourcesResponseEndpointsItem.history. + /// Serialized Name: ResourcesResponseEndpointsItem.customDomains. /// Keeps track of any properties unknown to the library. internal ResourcesResponseEndpointsItem(string id, string name, bool? history, IReadOnlyList customDomains, IDictionary serializedAdditionalRawData) { @@ -66,13 +69,13 @@ internal ResourcesResponseEndpointsItem(string id, string name, bool? history, I _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the id. + /// Serialized Name: ResourcesResponseEndpointsItem.id. public string Id { get; } - /// Gets the name. + /// Serialized Name: ResourcesResponseEndpointsItem.name. public string Name { get; } - /// Gets the history. + /// Serialized Name: ResourcesResponseEndpointsItem.history. public bool? History { get; } - /// Gets the custom domains. + /// Serialized Name: ResourcesResponseEndpointsItem.customDomains. public IReadOnlyList CustomDomains { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsPropertiesItemsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsPropertiesItemsItem.cs index e50983bfb1cd..8e0d4eedcfeb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsPropertiesItemsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResourcesResponseEndpointsPropertiesItemsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The ResourcesResponseEndpointsPropertiesItemsItem. + /// + /// The ResourcesResponseEndpointsPropertiesItemsItem. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem + /// public partial class ResourcesResponseEndpointsPropertiesItemsItem { /// @@ -51,10 +54,10 @@ internal ResourcesResponseEndpointsPropertiesItemsItem() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.id. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.name. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.endpointId. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.history. /// Keeps track of any properties unknown to the library. internal ResourcesResponseEndpointsPropertiesItemsItem(string id, string name, string endpointId, bool? history, IDictionary serializedAdditionalRawData) { @@ -65,13 +68,13 @@ internal ResourcesResponseEndpointsPropertiesItemsItem(string id, string name, s _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the id. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.id. public string Id { get; } - /// Gets the name. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.name. public string Name { get; } - /// Gets the endpoint id. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.endpointId. public string EndpointId { get; } - /// Gets the history. + /// Serialized Name: ResourcesResponseEndpointsPropertiesItemsItem.history. public bool? History { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedDetectedErrorType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedDetectedErrorType.cs index 2e4215255aca..462de1c11dfc 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedDetectedErrorType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedDetectedErrorType.cs @@ -7,14 +7,26 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Type of response errors for real user requests for which origin will be deemed unhealthy. + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// Serialized Name: ResponseBasedDetectedErrorTypes + /// public enum ResponseBasedDetectedErrorType { - /// None. + /// + /// None + /// Serialized Name: ResponseBasedDetectedErrorTypes.None + /// None, - /// TcpErrorsOnly. + /// + /// TcpErrorsOnly + /// Serialized Name: ResponseBasedDetectedErrorTypes.TcpErrorsOnly + /// TcpErrorsOnly, - /// TcpAndHttpErrors. + /// + /// TcpAndHttpErrors + /// Serialized Name: ResponseBasedDetectedErrorTypes.TcpAndHttpErrors + /// TcpAndHttpErrors } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedOriginErrorDetectionSettings.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedOriginErrorDetectionSettings.cs index 483f3c05887f..f5849feda8a2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedOriginErrorDetectionSettings.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ResponseBasedOriginErrorDetectionSettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The JSON object that contains the properties to determine origin health using real requests/responses. + /// + /// The JSON object that contains the properties to determine origin health using real requests/responses. + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters + /// public partial class ResponseBasedOriginErrorDetectionSettings { /// @@ -52,9 +55,18 @@ public ResponseBasedOriginErrorDetectionSettings() } /// Initializes a new instance of . - /// Type of response errors for real user requests for which origin will be deemed unhealthy. - /// The percentage of failed requests in the sample where failover should trigger. - /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.responseBasedDetectedErrorTypes + /// + /// + /// The percentage of failed requests in the sample where failover should trigger. + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.responseBasedFailoverThresholdPercentage + /// + /// + /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.httpErrorRanges + /// /// Keeps track of any properties unknown to the library. internal ResponseBasedOriginErrorDetectionSettings(ResponseBasedDetectedErrorType? responseBasedDetectedErrorType, int? responseBasedFailoverThresholdPercentage, IList httpErrorRanges, IDictionary serializedAdditionalRawData) { @@ -64,11 +76,20 @@ internal ResponseBasedOriginErrorDetectionSettings(ResponseBasedDetectedErrorTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Type of response errors for real user requests for which origin will be deemed unhealthy. + /// + /// Type of response errors for real user requests for which origin will be deemed unhealthy + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.responseBasedDetectedErrorTypes + /// public ResponseBasedDetectedErrorType? ResponseBasedDetectedErrorType { get; set; } - /// The percentage of failed requests in the sample where failover should trigger. + /// + /// The percentage of failed requests in the sample where failover should trigger. + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.responseBasedFailoverThresholdPercentage + /// public int? ResponseBasedFailoverThresholdPercentage { get; set; } - /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// + /// The list of Http status code ranges that are considered as server errors for origin and it is marked as unhealthy. + /// Serialized Name: ResponseBasedOriginErrorDetectionParameters.httpErrorRanges + /// public IList HttpErrorRanges { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteCacheCompressionSettings.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteCacheCompressionSettings.cs index 7825dd55a22b..663e41998d92 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteCacheCompressionSettings.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteCacheCompressionSettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// settings for compression. + /// + /// settings for compression. + /// Serialized Name: CompressionSettings + /// public partial class RouteCacheCompressionSettings { /// @@ -52,8 +55,14 @@ public RouteCacheCompressionSettings() } /// Initializes a new instance of . - /// List of content types on which compression applies. The value should be a valid MIME type. - /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: CompressionSettings.contentTypesToCompress + /// + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: CompressionSettings.isCompressionEnabled + /// /// Keeps track of any properties unknown to the library. internal RouteCacheCompressionSettings(IList contentTypesToCompress, bool? isCompressionEnabled, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal RouteCacheCompressionSettings(IList contentTypesToCompress, boo _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of content types on which compression applies. The value should be a valid MIME type. + /// + /// List of content types on which compression applies. The value should be a valid MIME type. + /// Serialized Name: CompressionSettings.contentTypesToCompress + /// public IList ContentTypesToCompress { get; } - /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// Indicates whether content compression is enabled on AzureFrontDoor. Default value is false. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: CompressionSettings.isCompressionEnabled + /// public bool? IsCompressionEnabled { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.Serialization.cs index e2016662823f..91797b86d164 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(RouteConfigurationOverrideActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(OriginGroupOverride)) { if (OriginGroupOverride != null) @@ -53,21 +52,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("cacheConfiguration"u8); writer.WriteObjectValue(CacheConfiguration, 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 - } - } } RouteConfigurationOverrideActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -90,18 +74,13 @@ internal static RouteConfigurationOverrideActionProperties DeserializeRouteConfi { return null; } - RouteConfigurationOverrideActionType typeName = default; OriginGroupOverride originGroupOverride = default; CacheConfiguration cacheConfiguration = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new RouteConfigurationOverrideActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("originGroupOverride"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -121,13 +100,18 @@ internal static RouteConfigurationOverrideActionProperties DeserializeRouteConfi cacheConfiguration = CacheConfiguration.DeserializeCacheConfiguration(property.Value, options); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new RouteConfigurationOverrideActionProperties(typeName, originGroupOverride, cacheConfiguration, serializedAdditionalRawData); + return new RouteConfigurationOverrideActionProperties(typeName, serializedAdditionalRawData, originGroupOverride, cacheConfiguration); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.cs index 105368eac6fb..3b288141d1ff 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteConfigurationOverrideActionProperties.cs @@ -10,71 +10,45 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the route configuration override action. - public partial class RouteConfigurationOverrideActionProperties + /// + /// Defines the parameters for the route configuration override action. + /// Serialized Name: RouteConfigurationOverrideActionParameters + /// + public partial class RouteConfigurationOverrideActionProperties : DeliveryRuleActionProperties { - /// - /// 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 RouteConfigurationOverrideActionProperties(RouteConfigurationOverrideActionType actionType) + public RouteConfigurationOverrideActionProperties() { - ActionType = actionType; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleRouteConfigurationOverrideActionParameters; } /// Initializes a new instance of . - /// - /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. - /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal RouteConfigurationOverrideActionProperties(RouteConfigurationOverrideActionType actionType, OriginGroupOverride originGroupOverride, CacheConfiguration cacheConfiguration, IDictionary serializedAdditionalRawData) + /// + /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// Serialized Name: RouteConfigurationOverrideActionParameters.originGroupOverride + /// + /// + /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: RouteConfigurationOverrideActionParameters.cacheConfiguration + /// + internal RouteConfigurationOverrideActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, OriginGroupOverride originGroupOverride, CacheConfiguration cacheConfiguration) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; OriginGroupOverride = originGroupOverride; CacheConfiguration = cacheConfiguration; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal RouteConfigurationOverrideActionProperties() - { + TypeName = typeName; } - /// Gets or sets the action type. - public RouteConfigurationOverrideActionType ActionType { get; set; } - /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// + /// A reference to the origin group override configuration. Leave empty to use the default origin group on route. + /// Serialized Name: RouteConfigurationOverrideActionParameters.originGroupOverride + /// public OriginGroupOverride OriginGroupOverride { get; set; } - /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// + /// The caching configuration associated with this rule. To disable caching, do not provide a cacheConfiguration object. + /// Serialized Name: RouteConfigurationOverrideActionParameters.cacheConfiguration + /// public CacheConfiguration CacheConfiguration { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteListResult.cs index 61ec4208db7b..c817bf8ae2b4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RouteListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + /// + /// Result of the request to list routes. It contains a list of route objects and a URL link to get the next set of results. + /// Serialized Name: RouteListResult + /// internal partial class RouteListResult { /// @@ -52,8 +55,14 @@ internal RouteListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor routes within a profile. - /// URL to get the next set of route objects if there are any. + /// + /// List of AzureFrontDoor routes within a profile. + /// Serialized Name: RouteListResult.value + /// + /// + /// URL to get the next set of route objects if there are any. + /// Serialized Name: RouteListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal RouteListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal RouteListResult(IReadOnlyList value, string nextLin _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of AzureFrontDoor routes within a profile. + /// + /// List of AzureFrontDoor routes within a profile. + /// Serialized Name: RouteListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of route objects if there are any. + /// + /// URL to get the next set of route objects if there are any. + /// Serialized Name: RouteListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleCacheBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleCacheBehavior.cs index 68d99da5b0bf..a4f4b415e723 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleCacheBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleCacheBehavior.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Caching behavior for the requests. + /// + /// Caching behavior for the requests + /// Serialized Name: RuleCacheBehavior + /// public readonly partial struct RuleCacheBehavior : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public RuleCacheBehavior(string value) private const string OverrideAlwaysValue = "OverrideAlways"; private const string OverrideIfOriginMissingValue = "OverrideIfOriginMissing"; - /// HonorOrigin. + /// + /// HonorOrigin + /// Serialized Name: RuleCacheBehavior.HonorOrigin + /// public static RuleCacheBehavior HonorOrigin { get; } = new RuleCacheBehavior(HonorOriginValue); - /// OverrideAlways. + /// + /// OverrideAlways + /// Serialized Name: RuleCacheBehavior.OverrideAlways + /// public static RuleCacheBehavior OverrideAlways { get; } = new RuleCacheBehavior(OverrideAlwaysValue); - /// OverrideIfOriginMissing. + /// + /// OverrideIfOriginMissing + /// Serialized Name: RuleCacheBehavior.OverrideIfOriginMissing + /// public static RuleCacheBehavior OverrideIfOriginMissing { get; } = new RuleCacheBehavior(OverrideIfOriginMissingValue); /// Determines if two values are the same. public static bool operator ==(RuleCacheBehavior left, RuleCacheBehavior right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleIsCompressionEnabled.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleIsCompressionEnabled.cs index 14b65ec5d68a..f5c68aaf3105 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleIsCompressionEnabled.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleIsCompressionEnabled.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// + /// Indicates whether content compression is enabled. If compression is enabled, content will be served as compressed if user requests for a compressed version. Content won't be compressed on AzureFrontDoor when requested content is smaller than 1 byte or larger than 1 MB. + /// Serialized Name: RuleIsCompressionEnabled + /// public readonly partial struct RuleIsCompressionEnabled : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public RuleIsCompressionEnabled(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: RuleIsCompressionEnabled.Enabled + /// public static RuleIsCompressionEnabled Enabled { get; } = new RuleIsCompressionEnabled(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: RuleIsCompressionEnabled.Disabled + /// public static RuleIsCompressionEnabled Disabled { get; } = new RuleIsCompressionEnabled(DisabledValue); /// Determines if two values are the same. public static bool operator ==(RuleIsCompressionEnabled left, RuleIsCompressionEnabled right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleListResult.cs index 250e2e8f5694..54abf42770d6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + /// + /// Result of the request to list rules. It contains a list of rule objects and a URL link to get the next set of results. + /// Serialized Name: RuleListResult + /// internal partial class RuleListResult { /// @@ -52,8 +55,14 @@ internal RuleListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor rules within a rule set. - /// URL to get the next set of rule objects if there are any. + /// + /// List of AzureFrontDoor rules within a rule set. + /// Serialized Name: RuleListResult.value + /// + /// + /// URL to get the next set of rule objects if there are any. + /// Serialized Name: RuleListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal RuleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal RuleListResult(IReadOnlyList value, string nextLink, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of AzureFrontDoor rules within a rule set. + /// + /// List of AzureFrontDoor rules within a rule set. + /// Serialized Name: RuleListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of rule objects if there are any. + /// + /// URL to get the next set of rule objects if there are any. + /// Serialized Name: RuleListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleQueryStringCachingBehavior.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleQueryStringCachingBehavior.cs index 22bf7d3dab7f..5c9e2f8758a6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleQueryStringCachingBehavior.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleQueryStringCachingBehavior.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// + /// Defines how Frontdoor caches requests that include query strings. You can ignore any query strings when caching, ignore specific query strings, cache every request with a unique URL, or cache specific query strings. + /// Serialized Name: RuleQueryStringCachingBehavior + /// public readonly partial struct RuleQueryStringCachingBehavior : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public RuleQueryStringCachingBehavior(string value) private const string IgnoreSpecifiedQueryStringsValue = "IgnoreSpecifiedQueryStrings"; private const string IncludeSpecifiedQueryStringsValue = "IncludeSpecifiedQueryStrings"; - /// IgnoreQueryString. + /// + /// IgnoreQueryString + /// Serialized Name: RuleQueryStringCachingBehavior.IgnoreQueryString + /// public static RuleQueryStringCachingBehavior IgnoreQueryString { get; } = new RuleQueryStringCachingBehavior(IgnoreQueryStringValue); - /// UseQueryString. + /// + /// UseQueryString + /// Serialized Name: RuleQueryStringCachingBehavior.UseQueryString + /// public static RuleQueryStringCachingBehavior UseQueryString { get; } = new RuleQueryStringCachingBehavior(UseQueryStringValue); - /// IgnoreSpecifiedQueryStrings. + /// + /// IgnoreSpecifiedQueryStrings + /// Serialized Name: RuleQueryStringCachingBehavior.IgnoreSpecifiedQueryStrings + /// public static RuleQueryStringCachingBehavior IgnoreSpecifiedQueryStrings { get; } = new RuleQueryStringCachingBehavior(IgnoreSpecifiedQueryStringsValue); - /// IncludeSpecifiedQueryStrings. + /// + /// IncludeSpecifiedQueryStrings + /// Serialized Name: RuleQueryStringCachingBehavior.IncludeSpecifiedQueryStrings + /// public static RuleQueryStringCachingBehavior IncludeSpecifiedQueryStrings { get; } = new RuleQueryStringCachingBehavior(IncludeSpecifiedQueryStringsValue); /// Determines if two values are the same. public static bool operator ==(RuleQueryStringCachingBehavior left, RuleQueryStringCachingBehavior right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleSetListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleSetListResult.cs index a223da25c6bb..0ceebbe443c2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleSetListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/RuleSetListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of results. + /// + /// Result of the request to list rule sets. It contains a list of rule set objects and a URL link to get the next set of results. + /// Serialized Name: RuleSetListResult + /// internal partial class RuleSetListResult { /// @@ -52,8 +55,14 @@ internal RuleSetListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor rule sets within a profile. - /// URL to get the next set of rule set objects if there are any. + /// + /// List of AzureFrontDoor rule sets within a profile. + /// Serialized Name: RuleSetListResult.value + /// + /// + /// URL to get the next set of rule set objects if there are any. + /// Serialized Name: RuleSetListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal RuleSetListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal RuleSetListResult(IReadOnlyList value, string nex _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of AzureFrontDoor rule sets within a profile. + /// + /// List of AzureFrontDoor rule sets within a profile. + /// Serialized Name: RuleSetListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of rule set objects if there are any. + /// + /// URL to get the next set of rule set objects if there are any. + /// Serialized Name: RuleSetListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchOperator.cs index 197ae0116dcc..74e94c709ade 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// + /// When matchVariable is a collection, operate on the selector to specify which elements in the collection this rule applies to. + /// Serialized Name: ScrubbingRuleEntryMatchOperator + /// public readonly partial struct ScrubbingRuleEntryMatchOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public ScrubbingRuleEntryMatchOperator(string value) private const string EqualsAnyValue = "EqualsAny"; - /// EqualsAny. + /// + /// EqualsAny + /// Serialized Name: ScrubbingRuleEntryMatchOperator.EqualsAny + /// public static ScrubbingRuleEntryMatchOperator EqualsAny { get; } = new ScrubbingRuleEntryMatchOperator(EqualsAnyValue); /// Determines if two values are the same. public static bool operator ==(ScrubbingRuleEntryMatchOperator left, ScrubbingRuleEntryMatchOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchVariable.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchVariable.cs index 38978604a58b..b324ec218f72 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchVariable.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryMatchVariable.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The variable to be scrubbed from the logs. + /// + /// The variable to be scrubbed from the logs. + /// Serialized Name: ScrubbingRuleEntryMatchVariable + /// public readonly partial struct ScrubbingRuleEntryMatchVariable : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public ScrubbingRuleEntryMatchVariable(string value) private const string RequestUriValue = "RequestUri"; private const string QueryStringArgNamesValue = "QueryStringArgNames"; - /// RequestIPAddress. + /// + /// RequestIPAddress + /// Serialized Name: ScrubbingRuleEntryMatchVariable.RequestIPAddress + /// public static ScrubbingRuleEntryMatchVariable RequestIPAddress { get; } = new ScrubbingRuleEntryMatchVariable(RequestIPAddressValue); - /// RequestUri. + /// + /// RequestUri + /// Serialized Name: ScrubbingRuleEntryMatchVariable.RequestUri + /// public static ScrubbingRuleEntryMatchVariable RequestUri { get; } = new ScrubbingRuleEntryMatchVariable(RequestUriValue); - /// QueryStringArgNames. + /// + /// QueryStringArgNames + /// Serialized Name: ScrubbingRuleEntryMatchVariable.QueryStringArgNames + /// public static ScrubbingRuleEntryMatchVariable QueryStringArgNames { get; } = new ScrubbingRuleEntryMatchVariable(QueryStringArgNamesValue); /// Determines if two values are the same. public static bool operator ==(ScrubbingRuleEntryMatchVariable left, ScrubbingRuleEntryMatchVariable right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryState.cs index 63ccefbed736..5e13af81f72f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ScrubbingRuleEntryState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the state of a log scrubbing rule. Default value is enabled. + /// + /// Defines the state of a log scrubbing rule. Default value is enabled. + /// Serialized Name: ScrubbingRuleEntryState + /// public readonly partial struct ScrubbingRuleEntryState : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public ScrubbingRuleEntryState(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; - /// Enabled. + /// + /// Enabled + /// Serialized Name: ScrubbingRuleEntryState.Enabled + /// public static ScrubbingRuleEntryState Enabled { get; } = new ScrubbingRuleEntryState(EnabledValue); - /// Disabled. + /// + /// Disabled + /// Serialized Name: ScrubbingRuleEntryState.Disabled + /// public static ScrubbingRuleEntryState Disabled { get; } = new ScrubbingRuleEntryState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ScrubbingRuleEntryState left, ScrubbingRuleEntryState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretListResult.cs index e058676baec1..ee239fc433b7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + /// + /// Result of the request to list secrets. It contains a list of Secret objects and a URL link to get the next set of results. + /// Serialized Name: SecretListResult + /// internal partial class SecretListResult { /// @@ -52,8 +55,14 @@ internal SecretListResult() } /// Initializes a new instance of . - /// List of AzureFrontDoor secrets within a profile. - /// URL to get the next set of Secret objects if there are any. + /// + /// List of AzureFrontDoor secrets within a profile. + /// Serialized Name: SecretListResult.value + /// + /// + /// URL to get the next set of Secret objects if there are any. + /// Serialized Name: SecretListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal SecretListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal SecretListResult(IReadOnlyList value, string nextL _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of AzureFrontDoor secrets within a profile. + /// + /// List of AzureFrontDoor secrets within a profile. + /// Serialized Name: SecretListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of Secret objects if there are any. + /// + /// URL to get the next set of Secret objects if there are any. + /// Serialized Name: SecretListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs index c23baf0bfbc4..d83d613bbd4c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecretType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretType + /// public readonly partial struct SecretType : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public SecretType(string value) private const string ManagedCertificateValue = "ManagedCertificate"; private const string AzureFirstPartyManagedCertificateValue = "AzureFirstPartyManagedCertificate"; - /// UrlSigningKey. + /// + /// UrlSigningKey + /// Serialized Name: SecretType.UrlSigningKey + /// public static SecretType UriSigningKey { get; } = new SecretType(UriSigningKeyValue); - /// CustomerCertificate. + /// + /// CustomerCertificate + /// Serialized Name: SecretType.CustomerCertificate + /// public static SecretType CustomerCertificate { get; } = new SecretType(CustomerCertificateValue); - /// ManagedCertificate. + /// + /// ManagedCertificate + /// Serialized Name: SecretType.ManagedCertificate + /// public static SecretType ManagedCertificate { get; } = new SecretType(ManagedCertificateValue); - /// AzureFirstPartyManagedCertificate. + /// + /// AzureFirstPartyManagedCertificate + /// Serialized Name: SecretType.AzureFirstPartyManagedCertificate + /// public static SecretType AzureFirstPartyManagedCertificate { get; } = new SecretType(AzureFirstPartyManagedCertificateValue); /// Determines if two values are the same. public static bool operator ==(SecretType left, SecretType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecureDeliveryProtocolType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecureDeliveryProtocolType.cs index 8f5ac7ecbd67..d5a25cc56859 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecureDeliveryProtocolType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecureDeliveryProtocolType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the TLS extension protocol that is used for secure delivery. + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: ProtocolType + /// public readonly partial struct SecureDeliveryProtocolType : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public SecureDeliveryProtocolType(string value) private const string ServerNameIndicationValue = "ServerNameIndication"; private const string IPBasedValue = "IPBased"; - /// ServerNameIndication. + /// + /// ServerNameIndication + /// Serialized Name: ProtocolType.ServerNameIndication + /// public static SecureDeliveryProtocolType ServerNameIndication { get; } = new SecureDeliveryProtocolType(ServerNameIndicationValue); - /// IPBased. + /// + /// IPBased + /// Serialized Name: ProtocolType.IPBased + /// public static SecureDeliveryProtocolType IPBased { get; } = new SecureDeliveryProtocolType(IPBasedValue); /// Determines if two values are the same. public static bool operator ==(SecureDeliveryProtocolType left, SecureDeliveryProtocolType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyListResult.cs index 328ea15aaf5e..e4bec8984aa4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the next set of results. + /// + /// Result of the request to list security policies. It contains a list of security policy objects and a URL link to get the next set of results. + /// Serialized Name: SecurityPolicyListResult + /// internal partial class SecurityPolicyListResult { /// @@ -52,8 +55,14 @@ internal SecurityPolicyListResult() } /// Initializes a new instance of . - /// List of Security policies within a profile. - /// URL to get the next set of security policy objects if there is any. + /// + /// List of Security policies within a profile + /// Serialized Name: SecurityPolicyListResult.value + /// + /// + /// URL to get the next set of security policy objects if there is any. + /// Serialized Name: SecurityPolicyListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal SecurityPolicyListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal SecurityPolicyListResult(IReadOnlyList val _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Security policies within a profile. + /// + /// List of Security policies within a profile + /// Serialized Name: SecurityPolicyListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of security policy objects if there is any. + /// + /// URL to get the next set of security policy objects if there is any. + /// Serialized Name: SecurityPolicyListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyProperties.cs index 54cf0ce9ce29..5bef590c5278 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyProperties.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.Cdn.Models { /// /// The json object containing security policy parameters + /// Serialized Name: SecurityPolicyPropertiesParameters /// 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 . /// @@ -55,7 +56,10 @@ protected SecurityPolicyProperties() } /// Initializes a new instance of . - /// The type of the Security policy to create. + /// + /// The type of the Security policy to create. + /// Serialized Name: SecurityPolicyPropertiesParameters.type + /// /// Keeps track of any properties unknown to the library. internal SecurityPolicyProperties(SecurityPolicyType policyType, IDictionary serializedAdditionalRawData) { @@ -63,7 +67,10 @@ internal SecurityPolicyProperties(SecurityPolicyType policyType, IDictionary The type of the Security policy to create. + /// + /// The type of the Security policy to create. + /// Serialized Name: SecurityPolicyPropertiesParameters.type + /// internal SecurityPolicyType PolicyType { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyType.cs index 33d80a765b7f..3b5a8ac284ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The type of the Security policy to create. + /// + /// The type of the Security policy to create. + /// Serialized Name: SecurityPolicyType + /// internal readonly partial struct SecurityPolicyType : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public SecurityPolicyType(string value) private const string WebApplicationFirewallValue = "WebApplicationFirewall"; - /// WebApplicationFirewall. + /// + /// WebApplicationFirewall + /// Serialized Name: SecurityPolicyType.WebApplicationFirewall + /// public static SecurityPolicyType WebApplicationFirewall { get; } = new SecurityPolicyType(WebApplicationFirewallValue); /// Determines if two values are the same. public static bool operator ==(SecurityPolicyType left, SecurityPolicyType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewall.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewall.cs index bbf7232ad622..d825e87f603b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewall.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewall.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The json object containing security policy waf parameters. + /// + /// The json object containing security policy waf parameters + /// Serialized Name: SecurityPolicyWebApplicationFirewallParameters + /// public partial class SecurityPolicyWebApplicationFirewall : SecurityPolicyProperties { /// Initializes a new instance of . @@ -23,10 +26,19 @@ public SecurityPolicyWebApplicationFirewall() } /// Initializes a new instance of . - /// The type of the Security policy to create. + /// + /// The type of the Security policy to create. + /// Serialized Name: SecurityPolicyPropertiesParameters.type + /// /// Keeps track of any properties unknown to the library. - /// Resource ID. - /// Waf associations. + /// + /// Resource ID. + /// Serialized Name: SecurityPolicyWebApplicationFirewallParameters.wafPolicy + /// + /// + /// Waf associations + /// Serialized Name: SecurityPolicyWebApplicationFirewallParameters.associations + /// internal SecurityPolicyWebApplicationFirewall(SecurityPolicyType policyType, IDictionary serializedAdditionalRawData, WritableSubResource wafPolicy, IList associations) : base(policyType, serializedAdditionalRawData) { WafPolicy = wafPolicy; @@ -34,7 +46,10 @@ internal SecurityPolicyWebApplicationFirewall(SecurityPolicyType policyType, IDi PolicyType = policyType; } - /// Resource ID. + /// + /// Resource ID. + /// Serialized Name: SecurityPolicyWebApplicationFirewallParameters.wafPolicy + /// internal WritableSubResource WafPolicy { get; set; } /// Gets or sets Id. public ResourceIdentifier WafPolicyId @@ -48,7 +63,10 @@ public ResourceIdentifier WafPolicyId } } - /// Waf associations. + /// + /// Waf associations + /// Serialized Name: SecurityPolicyWebApplicationFirewallParameters.associations + /// public IList Associations { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewallAssociation.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewallAssociation.cs index 6090858823a9..1f3114a7a940 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewallAssociation.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SecurityPolicyWebApplicationFirewallAssociation.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// settings for security policy patterns to match. + /// + /// settings for security policy patterns to match + /// Serialized Name: SecurityPolicyWebApplicationFirewallAssociation + /// public partial class SecurityPolicyWebApplicationFirewallAssociation { /// @@ -53,8 +56,14 @@ public SecurityPolicyWebApplicationFirewallAssociation() } /// Initializes a new instance of . - /// List of domains. - /// List of paths. + /// + /// List of domains. + /// Serialized Name: SecurityPolicyWebApplicationFirewallAssociation.domains + /// + /// + /// List of paths + /// Serialized Name: SecurityPolicyWebApplicationFirewallAssociation.patternsToMatch + /// /// Keeps track of any properties unknown to the library. internal SecurityPolicyWebApplicationFirewallAssociation(IList domains, IList patternsToMatch, IDictionary serializedAdditionalRawData) { @@ -63,9 +72,15 @@ internal SecurityPolicyWebApplicationFirewallAssociation(IList List of domains. + /// + /// List of domains. + /// Serialized Name: SecurityPolicyWebApplicationFirewallAssociation.domains + /// public IList Domains { get; } - /// List of paths. + /// + /// List of paths + /// Serialized Name: SecurityPolicyWebApplicationFirewallAssociation.patternsToMatch + /// public IList PatternsToMatch { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.Serialization.cs index 6885fe90da2c..b69e6eb8bcf2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRead /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServerPortMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(ServerPortOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } ServerPortMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static ServerPortMatchCondition DeserializeServerPortMatchCondition(Jso { return null; } - ServerPortMatchConditionType typeName = default; ServerPortOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new ServerPortMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new ServerPortOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static ServerPortMatchCondition DeserializeServerPortMatchCondition(Jso transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static ServerPortMatchCondition DeserializeServerPortMatchCondition(Jso serializedAdditionalRawData = rawDataDictionary; return new ServerPortMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.cs index fa8a163e55f2..bd8de5dc1756 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for ServerPort match conditions. - public partial class ServerPortMatchCondition + /// + /// Defines the parameters for ServerPort match conditions + /// Serialized Name: ServerPortMatchConditionParameters + /// + public partial class ServerPortMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public ServerPortMatchCondition(ServerPortMatchConditionType conditionType, ServerPortOperator serverPortOperator) + /// + /// Describes operator to be matched + /// Serialized Name: ServerPortMatchConditionParameters.operator + /// + public ServerPortMatchCondition(ServerPortOperator serverPortOperator) { - ConditionType = conditionType; ServerPortOperator = serverPortOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleServerPortConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal ServerPortMatchCondition(ServerPortMatchConditionType conditionType, ServerPortOperator serverPortOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: ServerPortMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: ServerPortMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: ServerPortMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: ServerPortMatchConditionParameters.transforms + /// + internal ServerPortMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, ServerPortOperator serverPortOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; ServerPortOperator = serverPortOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal ServerPortMatchCondition() { } - /// Gets or sets the condition type. - public ServerPortMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: ServerPortMatchConditionParameters.operator + /// public ServerPortOperator ServerPortOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: ServerPortMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: ServerPortMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: ServerPortMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortOperator.cs index 678acb4052d0..cebb39c04bc4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ServerPortOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: ServerPortOperator + /// public readonly partial struct ServerPortOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public ServerPortOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: ServerPortOperator.Any + /// public static ServerPortOperator Any { get; } = new ServerPortOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: ServerPortOperator.Equal + /// public static ServerPortOperator Equal { get; } = new ServerPortOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: ServerPortOperator.Contains + /// public static ServerPortOperator Contains { get; } = new ServerPortOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: ServerPortOperator.BeginsWith + /// public static ServerPortOperator BeginsWith { get; } = new ServerPortOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: ServerPortOperator.EndsWith + /// public static ServerPortOperator EndsWith { get; } = new ServerPortOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: ServerPortOperator.LessThan + /// public static ServerPortOperator LessThan { get; } = new ServerPortOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: ServerPortOperator.LessThanOrEqual + /// public static ServerPortOperator LessThanOrEqual { get; } = new ServerPortOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: ServerPortOperator.GreaterThan + /// public static ServerPortOperator GreaterThan { get; } = new ServerPortOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: ServerPortOperator.GreaterThanOrEqual + /// public static ServerPortOperator GreaterThanOrEqual { get; } = new ServerPortOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: ServerPortOperator.RegEx + /// public static ServerPortOperator RegEx { get; } = new ServerPortOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(ServerPortOperator left, ServerPortOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceProperties.cs index 969e400f488d..8267c086e62a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceProperties.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + /// + /// Describes the properties of an existing Shared Private Link Resource to use when connecting to a private origin. + /// Serialized Name: SharedPrivateLinkResourceProperties + /// public partial class SharedPrivateLinkResourceProperties { /// @@ -53,11 +56,26 @@ public SharedPrivateLinkResourceProperties() } /// Initializes a new instance of . - /// The resource id of the resource the shared private link resource is for. - /// The location of the shared private link resource. - /// The group id from the provider of resource the shared private link resource is for. - /// The request message for requesting approval of the shared private link resource. - /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + /// The resource id of the resource the shared private link resource is for. + /// Serialized Name: SharedPrivateLinkResourceProperties.privateLink + /// + /// + /// The location of the shared private link resource + /// Serialized Name: SharedPrivateLinkResourceProperties.privateLinkLocation + /// + /// + /// The group id from the provider of resource the shared private link resource is for. + /// Serialized Name: SharedPrivateLinkResourceProperties.groupId + /// + /// + /// The request message for requesting approval of the shared private link resource. + /// Serialized Name: SharedPrivateLinkResourceProperties.requestMessage + /// + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// Serialized Name: SharedPrivateLinkResourceProperties.status + /// /// Keeps track of any properties unknown to the library. internal SharedPrivateLinkResourceProperties(WritableSubResource privateLink, string privateLinkLocation, string groupId, string requestMessage, SharedPrivateLinkResourceStatus? status, IDictionary serializedAdditionalRawData) { @@ -69,7 +87,10 @@ internal SharedPrivateLinkResourceProperties(WritableSubResource privateLink, st _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The resource id of the resource the shared private link resource is for. + /// + /// The resource id of the resource the shared private link resource is for. + /// Serialized Name: SharedPrivateLinkResourceProperties.privateLink + /// internal WritableSubResource PrivateLink { get; set; } /// Gets or sets Id. public ResourceIdentifier PrivateLinkId @@ -83,13 +104,25 @@ public ResourceIdentifier PrivateLinkId } } - /// The location of the shared private link resource. + /// + /// The location of the shared private link resource + /// Serialized Name: SharedPrivateLinkResourceProperties.privateLinkLocation + /// public string PrivateLinkLocation { get; set; } - /// The group id from the provider of resource the shared private link resource is for. + /// + /// The group id from the provider of resource the shared private link resource is for. + /// Serialized Name: SharedPrivateLinkResourceProperties.groupId + /// public string GroupId { get; set; } - /// The request message for requesting approval of the shared private link resource. + /// + /// The request message for requesting approval of the shared private link resource. + /// Serialized Name: SharedPrivateLinkResourceProperties.requestMessage + /// public string RequestMessage { get; set; } - /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// Serialized Name: SharedPrivateLinkResourceProperties.status + /// public SharedPrivateLinkResourceStatus? Status { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceStatus.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceStatus.cs index 4af35a3297fe..c044603d5a78 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceStatus.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SharedPrivateLinkResourceStatus.cs @@ -7,18 +7,36 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// + /// Status of the shared private link resource. Can be Pending, Approved, Rejected, Disconnected, or Timeout. + /// Serialized Name: SharedPrivateLinkResourceStatus + /// public enum SharedPrivateLinkResourceStatus { - /// Pending. + /// + /// Pending + /// Serialized Name: SharedPrivateLinkResourceStatus.Pending + /// Pending, - /// Approved. + /// + /// Approved + /// Serialized Name: SharedPrivateLinkResourceStatus.Approved + /// Approved, - /// Rejected. + /// + /// Rejected + /// Serialized Name: SharedPrivateLinkResourceStatus.Rejected + /// Rejected, - /// Disconnected. + /// + /// Disconnected + /// Serialized Name: SharedPrivateLinkResourceStatus.Disconnected + /// Disconnected, - /// Timeout. + /// + /// Timeout + /// Serialized Name: SharedPrivateLinkResourceStatus.Timeout + /// Timeout } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.Serialization.cs index a7441872cf6e..7eaed2512947 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(SocketAddressMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(SocketAddressOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } SocketAddressMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static SocketAddressMatchCondition DeserializeSocketAddressMatchConditi { return null; } - SocketAddressMatchConditionType typeName = default; SocketAddressOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new SocketAddressMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new SocketAddressOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static SocketAddressMatchCondition DeserializeSocketAddressMatchConditi transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static SocketAddressMatchCondition DeserializeSocketAddressMatchConditi serializedAdditionalRawData = rawDataDictionary; return new SocketAddressMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.cs index 4a3956d3225c..1d602bfb264d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for SocketAddress match conditions. - public partial class SocketAddressMatchCondition + /// + /// Defines the parameters for SocketAddress match conditions + /// Serialized Name: SocketAddrMatchConditionParameters + /// + public partial class SocketAddressMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public SocketAddressMatchCondition(SocketAddressMatchConditionType conditionType, SocketAddressOperator socketAddressOperator) + /// + /// Describes operator to be matched + /// Serialized Name: SocketAddrMatchConditionParameters.operator + /// + public SocketAddressMatchCondition(SocketAddressOperator socketAddressOperator) { - ConditionType = conditionType; SocketAddressOperator = socketAddressOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleSocketAddrConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal SocketAddressMatchCondition(SocketAddressMatchConditionType conditionType, SocketAddressOperator socketAddressOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: SocketAddrMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: SocketAddrMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: SocketAddrMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: SocketAddrMatchConditionParameters.transforms + /// + internal SocketAddressMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, SocketAddressOperator socketAddressOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; SocketAddressOperator = socketAddressOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal SocketAddressMatchCondition() { } - /// Gets or sets the condition type. - public SocketAddressMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: SocketAddrMatchConditionParameters.operator + /// public SocketAddressOperator SocketAddressOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: SocketAddrMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: SocketAddrMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: SocketAddrMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressOperator.cs index fb2124d39f18..b4241b39ca03 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SocketAddressOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: SocketAddrOperator + /// public readonly partial struct SocketAddressOperator : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public SocketAddressOperator(string value) private const string AnyValue = "Any"; private const string IPMatchValue = "IPMatch"; - /// Any. + /// + /// Any + /// Serialized Name: SocketAddrOperator.Any + /// public static SocketAddressOperator Any { get; } = new SocketAddressOperator(AnyValue); - /// IPMatch. + /// + /// IPMatch + /// Serialized Name: SocketAddrOperator.IPMatch + /// public static SocketAddressOperator IPMatch { get; } = new SocketAddressOperator(IPMatchValue); /// Determines if two values are the same. public static bool operator ==(SocketAddressOperator left, SocketAddressOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolOperator.cs index 4dea4543c2c6..58efbf9661d4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SslProtocolOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: SslProtocolOperator + /// public readonly partial struct SslProtocolOperator : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public SslProtocolOperator(string value) private const string EqualValue = "Equal"; - /// Equal. + /// + /// Equal + /// Serialized Name: SslProtocolOperator.Equal + /// public static SslProtocolOperator Equal { get; } = new SslProtocolOperator(EqualValue); /// Determines if two values are the same. public static bool operator ==(SslProtocolOperator left, SslProtocolOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SsoUri.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SsoUri.cs index 293230228d36..50b10728d865 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SsoUri.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SsoUri.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The URI required to login to the supplemental portal from the Azure portal. + /// + /// The URI required to login to the supplemental portal from the Azure portal. + /// Serialized Name: SsoUri + /// public partial class SsoUri { /// @@ -51,7 +54,10 @@ internal SsoUri() } /// Initializes a new instance of . - /// The URI used to login to the supplemental portal. + /// + /// The URI used to login to the supplemental portal. + /// Serialized Name: SsoUri.ssoUriValue + /// /// Keeps track of any properties unknown to the library. internal SsoUri(Uri availableSsoUri, IDictionary serializedAdditionalRawData) { @@ -59,7 +65,10 @@ internal SsoUri(Uri availableSsoUri, IDictionary serializedA _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The URI used to login to the supplemental portal. + /// + /// The URI used to login to the supplemental portal. + /// Serialized Name: SsoUri.ssoUriValue + /// public Uri AvailableSsoUri { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SupportedOptimizationTypesListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SupportedOptimizationTypesListResult.cs index 33e73013fe27..549add785db0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SupportedOptimizationTypesListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/SupportedOptimizationTypesListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The result of the GetSupportedOptimizationTypes API. + /// + /// The result of the GetSupportedOptimizationTypes API + /// Serialized Name: SupportedOptimizationTypesListResult + /// public partial class SupportedOptimizationTypesListResult { /// @@ -52,7 +55,10 @@ internal SupportedOptimizationTypesListResult() } /// Initializes a new instance of . - /// Supported optimization types for a profile. + /// + /// Supported optimization types for a profile. + /// Serialized Name: SupportedOptimizationTypesListResult.supportedOptimizationTypes + /// /// Keeps track of any properties unknown to the library. internal SupportedOptimizationTypesListResult(IReadOnlyList supportedOptimizationTypes, IDictionary serializedAdditionalRawData) { @@ -60,7 +66,10 @@ internal SupportedOptimizationTypesListResult(IReadOnlyList su _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Supported optimization types for a profile. + /// + /// Supported optimization types for a profile. + /// Serialized Name: SupportedOptimizationTypesListResult.supportedOptimizationTypes + /// public IReadOnlyList SupportedOptimizationTypes { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/TransformType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/TransformType.cs index 5b01f5bb790e..a40456a658ba 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/TransformType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/TransformType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes what transforms were applied before matching. + /// + /// Describes what transforms were applied before matching. + /// Serialized Name: TransformType + /// public readonly partial struct TransformType : IEquatable { private readonly string _value; @@ -29,17 +32,35 @@ public TransformType(string value) private const string UriEncodeValue = "UrlEncode"; private const string RemoveNullsValue = "RemoveNulls"; - /// Lowercase. + /// + /// Lowercase + /// Serialized Name: TransformType.Lowercase + /// public static TransformType Lowercase { get; } = new TransformType(LowercaseValue); - /// Uppercase. + /// + /// Uppercase + /// Serialized Name: TransformType.Uppercase + /// public static TransformType Uppercase { get; } = new TransformType(UppercaseValue); - /// Trim. + /// + /// Trim + /// Serialized Name: TransformType.Trim + /// public static TransformType Trim { get; } = new TransformType(TrimValue); - /// UrlDecode. + /// + /// UrlDecode + /// Serialized Name: TransformType.UrlDecode + /// public static TransformType UriDecode { get; } = new TransformType(UriDecodeValue); - /// UrlEncode. + /// + /// UrlEncode + /// Serialized Name: TransformType.UrlEncode + /// public static TransformType UriEncode { get; } = new TransformType(UriEncodeValue); - /// RemoveNulls. + /// + /// RemoveNulls + /// Serialized Name: TransformType.RemoveNulls + /// public static TransformType RemoveNulls { get; } = new TransformType(RemoveNullsValue); /// Determines if two values are the same. public static bool operator ==(TransformType left, TransformType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.Serialization.cs new file mode 100644 index 000000000000..dc10bf051374 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.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.Cdn.Models +{ + internal partial class UnknownCertificateSourceParameters : 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(CertificateSourceProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + CertificateSourceProperties 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(CertificateSourceProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCertificateSourceProperties(document.RootElement, options); + } + + internal static UnknownCertificateSourceParameters DeserializeUnknownCertificateSourceParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CertificateSourceParametersType typeName = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeName"u8)) + { + typeName = new CertificateSourceParametersType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownCertificateSourceParameters(typeName, 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(CertificateSourceProperties)} does not support writing '{options.Format}' format."); + } + } + + CertificateSourceProperties 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 DeserializeCertificateSourceProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CertificateSourceProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.cs new file mode 100644 index 000000000000..d85778c67b7d --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCertificateSourceParameters.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.Cdn.Models +{ + /// Unknown version of CertificateSourceParameters. + internal partial class UnknownCertificateSourceParameters : CertificateSourceProperties + { + /// Initializes a new instance of . + /// Serialized Name: CertificateSourceParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal UnknownCertificateSourceParameters(CertificateSourceParametersType typeName, IDictionary serializedAdditionalRawData) : base(typeName, serializedAdditionalRawData) + { + TypeName = typeName; + } + + /// Initializes a new instance of for deserialization. + internal UnknownCertificateSourceParameters() + { + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCustomDomainHttpsParameters.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCustomDomainHttpsParameters.cs index 304a916d4864..4a0806d0047e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCustomDomainHttpsParameters.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownCustomDomainHttpsParameters.cs @@ -14,9 +14,18 @@ namespace Azure.ResourceManager.Cdn.Models internal partial class UnknownCustomDomainHttpsParameters : CustomDomainHttpsContent { /// Initializes a new instance of . - /// Defines the source of the SSL certificate. - /// Defines the TLS extension protocol that is used for secure delivery. - /// TLS protocol version that will be used for Https. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CustomDomainHttpsParameters.certificateSource + /// + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// TLS protocol version that will be used for Https + /// Serialized Name: CustomDomainHttpsParameters.minimumTlsVersion + /// /// Keeps track of any properties unknown to the library. internal UnknownCustomDomainHttpsParameters(CertificateSource certificateSource, SecureDeliveryProtocolType protocolType, CdnMinimumTlsVersion? minimumTlsVersion, IDictionary serializedAdditionalRawData) : base(certificateSource, protocolType, minimumTlsVersion, serializedAdditionalRawData) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleAction.cs index 1849533f3c46..4919782b82c4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleAction.cs @@ -14,7 +14,10 @@ namespace Azure.ResourceManager.Cdn.Models internal partial class UnknownDeliveryRuleAction : DeliveryRuleAction { /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. internal UnknownDeliveryRuleAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData) : base(name, serializedAdditionalRawData) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.Serialization.cs new file mode 100644 index 000000000000..faa4c6f22892 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.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.Cdn.Models +{ + internal partial class UnknownDeliveryRuleActionParameters : 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(DeliveryRuleActionProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DeliveryRuleActionProperties 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(DeliveryRuleActionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeliveryRuleActionProperties(document.RootElement, options); + } + + internal static UnknownDeliveryRuleActionParameters DeserializeUnknownDeliveryRuleActionParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeliveryRuleActionParametersType typeName = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDeliveryRuleActionParameters(typeName, 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(DeliveryRuleActionProperties)} does not support writing '{options.Format}' format."); + } + } + + DeliveryRuleActionProperties 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 DeserializeDeliveryRuleActionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeliveryRuleActionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.cs new file mode 100644 index 000000000000..6cea27713f01 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleActionParameters.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.Cdn.Models +{ + /// Unknown version of DeliveryRuleActionParameters. + internal partial class UnknownDeliveryRuleActionParameters : DeliveryRuleActionProperties + { + /// Initializes a new instance of . + /// Serialized Name: DeliveryRuleActionParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal UnknownDeliveryRuleActionParameters(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData) : base(typeName, serializedAdditionalRawData) + { + TypeName = typeName; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDeliveryRuleActionParameters() + { + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleCondition.cs index 77485c5d23ed..7a1cb0274e40 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleCondition.cs @@ -14,7 +14,10 @@ namespace Azure.ResourceManager.Cdn.Models internal partial class UnknownDeliveryRuleCondition : DeliveryRuleCondition { /// Initializes a new instance of . - /// The name of the condition for the delivery rule. + /// + /// The name of the condition for the delivery rule. + /// Serialized Name: DeliveryRuleCondition.name + /// /// Keeps track of any properties unknown to the library. internal UnknownDeliveryRuleCondition(MatchVariable name, IDictionary serializedAdditionalRawData) : base(name, serializedAdditionalRawData) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.Serialization.cs new file mode 100644 index 000000000000..acd313b24247 --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.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.Cdn.Models +{ + internal partial class UnknownDeliveryRuleConditionParameters : 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(DeliveryRuleConditionProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DeliveryRuleConditionProperties 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(DeliveryRuleConditionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDeliveryRuleConditionProperties(document.RootElement, options); + } + + internal static UnknownDeliveryRuleConditionParameters DeserializeUnknownDeliveryRuleConditionParameters(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DeliveryRuleConditionParametersType typeName = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDeliveryRuleConditionParameters(typeName, 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, AzureResourceManagerCdnContext.Default); + default: + throw new FormatException($"The model {nameof(DeliveryRuleConditionProperties)} does not support writing '{options.Format}' format."); + } + } + + DeliveryRuleConditionProperties 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 DeserializeDeliveryRuleConditionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DeliveryRuleConditionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.cs new file mode 100644 index 000000000000..a1d617057f0a --- /dev/null +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownDeliveryRuleConditionParameters.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.Cdn.Models +{ + /// Unknown version of DeliveryRuleConditionParameters. + internal partial class UnknownDeliveryRuleConditionParameters : DeliveryRuleConditionProperties + { + /// Initializes a new instance of . + /// Serialized Name: DeliveryRuleConditionParameters.typeName. + /// Keeps track of any properties unknown to the library. + internal UnknownDeliveryRuleConditionParameters(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData) : base(typeName, serializedAdditionalRawData) + { + TypeName = typeName; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDeliveryRuleConditionParameters() + { + } + } +} diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecretProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecretProperties.cs index ab3314278455..9c353207c943 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecretProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecretProperties.cs @@ -14,7 +14,10 @@ namespace Azure.ResourceManager.Cdn.Models internal partial class UnknownSecretProperties : FrontDoorSecretProperties { /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. internal UnknownSecretProperties(SecretType secretType, IDictionary serializedAdditionalRawData) : base(secretType, serializedAdditionalRawData) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecurityPolicyProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecurityPolicyProperties.cs index 391b96e506da..9766135227f6 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecurityPolicyProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UnknownSecurityPolicyProperties.cs @@ -14,7 +14,10 @@ namespace Azure.ResourceManager.Cdn.Models internal partial class UnknownSecurityPolicyProperties : SecurityPolicyProperties { /// Initializes a new instance of . - /// The type of the Security policy to create. + /// + /// The type of the Security policy to create. + /// Serialized Name: SecurityPolicyPropertiesParameters.type + /// /// Keeps track of any properties unknown to the library. internal UnknownSecurityPolicyProperties(SecurityPolicyType policyType, IDictionary serializedAdditionalRawData) : base(policyType, serializedAdditionalRawData) { diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.Serialization.cs index de1d26b1fd97..8365b8470c26 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriFileExtensionMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(UriFileExtensionOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } UriFileExtensionMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static UriFileExtensionMatchCondition DeserializeUriFileExtensionMatchC { return null; } - UriFileExtensionMatchConditionType typeName = default; UriFileExtensionOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriFileExtensionMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new UriFileExtensionOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static UriFileExtensionMatchCondition DeserializeUriFileExtensionMatchC transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static UriFileExtensionMatchCondition DeserializeUriFileExtensionMatchC serializedAdditionalRawData = rawDataDictionary; return new UriFileExtensionMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.cs index 795c9cc0d72e..35e08ce69e9b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for UrlFileExtension match conditions. - public partial class UriFileExtensionMatchCondition + /// + /// Defines the parameters for UrlFileExtension match conditions + /// Serialized Name: UrlFileExtensionMatchConditionParameters + /// + public partial class UriFileExtensionMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public UriFileExtensionMatchCondition(UriFileExtensionMatchConditionType conditionType, UriFileExtensionOperator uriFileExtensionOperator) + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileExtensionMatchConditionParameters.operator + /// + public UriFileExtensionMatchCondition(UriFileExtensionOperator uriFileExtensionOperator) { - ConditionType = conditionType; UriFileExtensionOperator = uriFileExtensionOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleUriFileExtensionMatchConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriFileExtensionMatchCondition(UriFileExtensionMatchConditionType conditionType, UriFileExtensionOperator uriFileExtensionOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileExtensionMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlFileExtensionMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlFileExtensionMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: UrlFileExtensionMatchConditionParameters.transforms + /// + internal UriFileExtensionMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, UriFileExtensionOperator uriFileExtensionOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; UriFileExtensionOperator = uriFileExtensionOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal UriFileExtensionMatchCondition() { } - /// Gets or sets the condition type. - public UriFileExtensionMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileExtensionMatchConditionParameters.operator + /// public UriFileExtensionOperator UriFileExtensionOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlFileExtensionMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlFileExtensionMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: UrlFileExtensionMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionOperator.cs index 4d9bba056b02..d86d420c993d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileExtensionOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileExtensionOperator + /// public readonly partial struct UriFileExtensionOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public UriFileExtensionOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: UrlFileExtensionOperator.Any + /// public static UriFileExtensionOperator Any { get; } = new UriFileExtensionOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: UrlFileExtensionOperator.Equal + /// public static UriFileExtensionOperator Equal { get; } = new UriFileExtensionOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: UrlFileExtensionOperator.Contains + /// public static UriFileExtensionOperator Contains { get; } = new UriFileExtensionOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: UrlFileExtensionOperator.BeginsWith + /// public static UriFileExtensionOperator BeginsWith { get; } = new UriFileExtensionOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: UrlFileExtensionOperator.EndsWith + /// public static UriFileExtensionOperator EndsWith { get; } = new UriFileExtensionOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: UrlFileExtensionOperator.LessThan + /// public static UriFileExtensionOperator LessThan { get; } = new UriFileExtensionOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: UrlFileExtensionOperator.LessThanOrEqual + /// public static UriFileExtensionOperator LessThanOrEqual { get; } = new UriFileExtensionOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: UrlFileExtensionOperator.GreaterThan + /// public static UriFileExtensionOperator GreaterThan { get; } = new UriFileExtensionOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: UrlFileExtensionOperator.GreaterThanOrEqual + /// public static UriFileExtensionOperator GreaterThanOrEqual { get; } = new UriFileExtensionOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: UrlFileExtensionOperator.RegEx + /// public static UriFileExtensionOperator RegEx { get; } = new UriFileExtensionOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(UriFileExtensionOperator left, UriFileExtensionOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.Serialization.cs index 465175e61299..9632b11bd7b3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriFileNameMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(UriFileNameOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } UriFileNameMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static UriFileNameMatchCondition DeserializeUriFileNameMatchCondition(J { return null; } - UriFileNameMatchConditionType typeName = default; UriFileNameOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriFileNameMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new UriFileNameOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static UriFileNameMatchCondition DeserializeUriFileNameMatchCondition(J transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static UriFileNameMatchCondition DeserializeUriFileNameMatchCondition(J serializedAdditionalRawData = rawDataDictionary; return new UriFileNameMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.cs index 7b9a7b5f8196..3e03cc983bf9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for UrlFilename match conditions. - public partial class UriFileNameMatchCondition + /// + /// Defines the parameters for UrlFilename match conditions + /// Serialized Name: UrlFileNameMatchConditionParameters + /// + public partial class UriFileNameMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public UriFileNameMatchCondition(UriFileNameMatchConditionType conditionType, UriFileNameOperator uriFileNameOperator) + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileNameMatchConditionParameters.operator + /// + public UriFileNameMatchCondition(UriFileNameOperator uriFileNameOperator) { - ConditionType = conditionType; UriFileNameOperator = uriFileNameOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleUriFilenameConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriFileNameMatchCondition(UriFileNameMatchConditionType conditionType, UriFileNameOperator uriFileNameOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileNameMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlFileNameMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlFileNameMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: UrlFileNameMatchConditionParameters.transforms + /// + internal UriFileNameMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, UriFileNameOperator uriFileNameOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; UriFileNameOperator = uriFileNameOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal UriFileNameMatchCondition() { } - /// Gets or sets the condition type. - public UriFileNameMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileNameMatchConditionParameters.operator + /// public UriFileNameOperator UriFileNameOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlFileNameMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlFileNameMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: UrlFileNameMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameOperator.cs index 5530ef22147a..015d8e181030 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriFileNameOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlFileNameOperator + /// public readonly partial struct UriFileNameOperator : IEquatable { private readonly string _value; @@ -33,25 +36,55 @@ public UriFileNameOperator(string value) private const string GreaterThanOrEqualValue = "GreaterThanOrEqual"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: UrlFileNameOperator.Any + /// public static UriFileNameOperator Any { get; } = new UriFileNameOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: UrlFileNameOperator.Equal + /// public static UriFileNameOperator Equal { get; } = new UriFileNameOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: UrlFileNameOperator.Contains + /// public static UriFileNameOperator Contains { get; } = new UriFileNameOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: UrlFileNameOperator.BeginsWith + /// public static UriFileNameOperator BeginsWith { get; } = new UriFileNameOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: UrlFileNameOperator.EndsWith + /// public static UriFileNameOperator EndsWith { get; } = new UriFileNameOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: UrlFileNameOperator.LessThan + /// public static UriFileNameOperator LessThan { get; } = new UriFileNameOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: UrlFileNameOperator.LessThanOrEqual + /// public static UriFileNameOperator LessThanOrEqual { get; } = new UriFileNameOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: UrlFileNameOperator.GreaterThan + /// public static UriFileNameOperator GreaterThan { get; } = new UriFileNameOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: UrlFileNameOperator.GreaterThanOrEqual + /// public static UriFileNameOperator GreaterThanOrEqual { get; } = new UriFileNameOperator(GreaterThanOrEqualValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: UrlFileNameOperator.RegEx + /// public static UriFileNameOperator RegEx { get; } = new UriFileNameOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(UriFileNameOperator left, UriFileNameOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.Serialization.cs index 34a55d198126..b5e9b4baf05f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriPathMatchCondition)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ConditionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("operator"u8); writer.WriteStringValue(UriPathOperator.ToString()); if (Optional.IsDefined(NegateCondition)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } UriPathMatchCondition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,20 +84,15 @@ internal static UriPathMatchCondition DeserializeUriPathMatchCondition(JsonEleme { return null; } - UriPathMatchConditionType typeName = default; UriPathOperator @operator = default; bool? negateCondition = default; IList matchValues = default; IList transforms = default; + DeliveryRuleConditionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriPathMatchConditionType(property.Value.GetString()); - continue; - } if (property.NameEquals("operator"u8)) { @operator = new UriPathOperator(property.Value.GetString()); @@ -156,6 +135,11 @@ internal static UriPathMatchCondition DeserializeUriPathMatchCondition(JsonEleme transforms = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleConditionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -164,11 +148,11 @@ internal static UriPathMatchCondition DeserializeUriPathMatchCondition(JsonEleme serializedAdditionalRawData = rawDataDictionary; return new UriPathMatchCondition( typeName, + serializedAdditionalRawData, @operator, negateCondition, matchValues ?? new ChangeTrackingList(), - transforms ?? new ChangeTrackingList(), - serializedAdditionalRawData); + transforms ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.cs index 5a43137974d3..2e1a8e030faa 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathMatchCondition.cs @@ -10,67 +10,51 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for UrlPath match conditions. - public partial class UriPathMatchCondition + /// + /// Defines the parameters for UrlPath match conditions + /// Serialized Name: UrlPathMatchConditionParameters + /// + public partial class UriPathMatchCondition : DeliveryRuleConditionProperties { - /// - /// 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 . - /// - /// Describes operator to be matched. - public UriPathMatchCondition(UriPathMatchConditionType conditionType, UriPathOperator uriPathOperator) + /// + /// Describes operator to be matched + /// Serialized Name: UrlPathMatchConditionParameters.operator + /// + public UriPathMatchCondition(UriPathOperator uriPathOperator) { - ConditionType = conditionType; UriPathOperator = uriPathOperator; MatchValues = new ChangeTrackingList(); Transforms = new ChangeTrackingList(); + TypeName = DeliveryRuleConditionParametersType.DeliveryRuleUriPathMatchConditionParameters; } /// Initializes a new instance of . - /// - /// Describes operator to be matched. - /// Describes if this is negate condition or not. - /// The match value for the condition of the delivery rule. - /// List of transforms. + /// Serialized Name: DeliveryRuleConditionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriPathMatchCondition(UriPathMatchConditionType conditionType, UriPathOperator uriPathOperator, bool? negateCondition, IList matchValues, IList transforms, IDictionary serializedAdditionalRawData) + /// + /// Describes operator to be matched + /// Serialized Name: UrlPathMatchConditionParameters.operator + /// + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlPathMatchConditionParameters.negateCondition + /// + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlPathMatchConditionParameters.matchValues + /// + /// + /// List of transforms + /// Serialized Name: UrlPathMatchConditionParameters.transforms + /// + internal UriPathMatchCondition(DeliveryRuleConditionParametersType typeName, IDictionary serializedAdditionalRawData, UriPathOperator uriPathOperator, bool? negateCondition, IList matchValues, IList transforms) : base(typeName, serializedAdditionalRawData) { - ConditionType = conditionType; UriPathOperator = uriPathOperator; NegateCondition = negateCondition; MatchValues = matchValues; Transforms = transforms; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -78,15 +62,25 @@ internal UriPathMatchCondition() { } - /// Gets or sets the condition type. - public UriPathMatchConditionType ConditionType { get; set; } - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlPathMatchConditionParameters.operator + /// public UriPathOperator UriPathOperator { get; set; } - /// Describes if this is negate condition or not. + /// + /// Describes if this is negate condition or not + /// Serialized Name: UrlPathMatchConditionParameters.negateCondition + /// public bool? NegateCondition { get; set; } - /// The match value for the condition of the delivery rule. + /// + /// The match value for the condition of the delivery rule + /// Serialized Name: UrlPathMatchConditionParameters.matchValues + /// public IList MatchValues { get; } - /// List of transforms. + /// + /// List of transforms + /// Serialized Name: UrlPathMatchConditionParameters.transforms + /// public IList Transforms { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathOperator.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathOperator.cs index 084d11493aa2..3d051dc45512 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathOperator.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriPathOperator.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Describes operator to be matched. + /// + /// Describes operator to be matched + /// Serialized Name: UrlPathOperator + /// public readonly partial struct UriPathOperator : IEquatable { private readonly string _value; @@ -34,27 +37,60 @@ public UriPathOperator(string value) private const string WildcardValue = "Wildcard"; private const string RegExValue = "RegEx"; - /// Any. + /// + /// Any + /// Serialized Name: UrlPathOperator.Any + /// public static UriPathOperator Any { get; } = new UriPathOperator(AnyValue); - /// Equal. + /// + /// Equal + /// Serialized Name: UrlPathOperator.Equal + /// public static UriPathOperator Equal { get; } = new UriPathOperator(EqualValue); - /// Contains. + /// + /// Contains + /// Serialized Name: UrlPathOperator.Contains + /// public static UriPathOperator Contains { get; } = new UriPathOperator(ContainsValue); - /// BeginsWith. + /// + /// BeginsWith + /// Serialized Name: UrlPathOperator.BeginsWith + /// public static UriPathOperator BeginsWith { get; } = new UriPathOperator(BeginsWithValue); - /// EndsWith. + /// + /// EndsWith + /// Serialized Name: UrlPathOperator.EndsWith + /// public static UriPathOperator EndsWith { get; } = new UriPathOperator(EndsWithValue); - /// LessThan. + /// + /// LessThan + /// Serialized Name: UrlPathOperator.LessThan + /// public static UriPathOperator LessThan { get; } = new UriPathOperator(LessThanValue); - /// LessThanOrEqual. + /// + /// LessThanOrEqual + /// Serialized Name: UrlPathOperator.LessThanOrEqual + /// public static UriPathOperator LessThanOrEqual { get; } = new UriPathOperator(LessThanOrEqualValue); - /// GreaterThan. + /// + /// GreaterThan + /// Serialized Name: UrlPathOperator.GreaterThan + /// public static UriPathOperator GreaterThan { get; } = new UriPathOperator(GreaterThanValue); - /// GreaterThanOrEqual. + /// + /// GreaterThanOrEqual + /// Serialized Name: UrlPathOperator.GreaterThanOrEqual + /// public static UriPathOperator GreaterThanOrEqual { get; } = new UriPathOperator(GreaterThanOrEqualValue); - /// Wildcard. + /// + /// Wildcard + /// Serialized Name: UrlPathOperator.Wildcard + /// public static UriPathOperator Wildcard { get; } = new UriPathOperator(WildcardValue); - /// RegEx. + /// + /// RegEx + /// Serialized Name: UrlPathOperator.RegEx + /// public static UriPathOperator RegEx { get; } = new UriPathOperator(RegExValue); /// Determines if two values are the same. public static bool operator ==(UriPathOperator left, UriPathOperator right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectAction.cs index 9bdaed0431e9..ae5192ea2158 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the url redirect action for the delivery rule. + /// + /// Defines the url redirect action for the delivery rule. + /// Serialized Name: UrlRedirectAction + /// public partial class UriRedirectAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRedirectAction.parameters + /// /// is null. public UriRedirectAction(UriRedirectActionProperties properties) { @@ -25,9 +31,15 @@ public UriRedirectAction(UriRedirectActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRedirectAction.parameters + /// internal UriRedirectAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, UriRedirectActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal UriRedirectAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRedirectAction.parameters + /// public UriRedirectActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.Serialization.cs index 9613ded3effb..765c574734ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriRedirectActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("redirectType"u8); writer.WriteStringValue(RedirectType.ToString()); if (Optional.IsDefined(DestinationProtocol)) @@ -63,21 +62,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("customFragment"u8); writer.WriteStringValue(CustomFragment); } - 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 - } - } } UriRedirectActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -100,22 +84,17 @@ internal static UriRedirectActionProperties DeserializeUriRedirectActionProperti { return null; } - UriRedirectActionType typeName = default; RedirectType redirectType = default; DestinationProtocol? destinationProtocol = default; string customPath = default; string customHostname = default; string customQueryString = default; string customFragment = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriRedirectActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("redirectType"u8)) { redirectType = new RedirectType(property.Value.GetString()); @@ -150,6 +129,11 @@ internal static UriRedirectActionProperties DeserializeUriRedirectActionProperti customFragment = property.Value.GetString(); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -158,13 +142,13 @@ internal static UriRedirectActionProperties DeserializeUriRedirectActionProperti serializedAdditionalRawData = rawDataDictionary; return new UriRedirectActionProperties( typeName, + serializedAdditionalRawData, redirectType, destinationProtocol, customPath, customHostname, customQueryString, - customFragment, - serializedAdditionalRawData); + customFragment); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.cs index 0ff8ef4bafcb..f7bf7b041a62 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRedirectActionProperties.cs @@ -10,69 +10,59 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the url redirect action. - public partial class UriRedirectActionProperties + /// + /// Defines the parameters for the url redirect action. + /// Serialized Name: UrlRedirectActionParameters + /// + public partial class UriRedirectActionProperties : DeliveryRuleActionProperties { - /// - /// 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 redirect type the rule will use when redirecting traffic. - public UriRedirectActionProperties(UriRedirectActionType actionType, RedirectType redirectType) + /// + /// The redirect type the rule will use when redirecting traffic. + /// Serialized Name: UrlRedirectActionParameters.redirectType + /// + public UriRedirectActionProperties(RedirectType redirectType) { - ActionType = actionType; RedirectType = redirectType; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleUriRedirectActionParameters; } /// Initializes a new instance of . - /// - /// The redirect type the rule will use when redirecting traffic. - /// Protocol to use for the redirect. The default value is MatchRequest. - /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. - /// Host to redirect. Leave empty to use the incoming host as the destination host. - /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them. - /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriRedirectActionProperties(UriRedirectActionType actionType, RedirectType redirectType, DestinationProtocol? destinationProtocol, string customPath, string customHostname, string customQueryString, string customFragment, IDictionary serializedAdditionalRawData) + /// + /// The redirect type the rule will use when redirecting traffic. + /// Serialized Name: UrlRedirectActionParameters.redirectType + /// + /// + /// Protocol to use for the redirect. The default value is MatchRequest + /// Serialized Name: UrlRedirectActionParameters.destinationProtocol + /// + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. + /// Serialized Name: UrlRedirectActionParameters.customPath + /// + /// + /// Host to redirect. Leave empty to use the incoming host as the destination host. + /// Serialized Name: UrlRedirectActionParameters.customHostname + /// + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them. + /// Serialized Name: UrlRedirectActionParameters.customQueryString + /// + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// Serialized Name: UrlRedirectActionParameters.customFragment + /// + internal UriRedirectActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, RedirectType redirectType, DestinationProtocol? destinationProtocol, string customPath, string customHostname, string customQueryString, string customFragment) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; RedirectType = redirectType; DestinationProtocol = destinationProtocol; CustomPath = customPath; CustomHostname = customHostname; CustomQueryString = customQueryString; CustomFragment = customFragment; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -80,19 +70,35 @@ internal UriRedirectActionProperties() { } - /// Gets or sets the action type. - public UriRedirectActionType ActionType { get; set; } - /// The redirect type the rule will use when redirecting traffic. + /// + /// The redirect type the rule will use when redirecting traffic. + /// Serialized Name: UrlRedirectActionParameters.redirectType + /// public RedirectType RedirectType { get; set; } - /// Protocol to use for the redirect. The default value is MatchRequest. + /// + /// Protocol to use for the redirect. The default value is MatchRequest + /// Serialized Name: UrlRedirectActionParameters.destinationProtocol + /// public DestinationProtocol? DestinationProtocol { get; set; } - /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. + /// + /// The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the incoming path as destination path. + /// Serialized Name: UrlRedirectActionParameters.customPath + /// public string CustomPath { get; set; } - /// Host to redirect. Leave empty to use the incoming host as the destination host. + /// + /// Host to redirect. Leave empty to use the incoming host as the destination host. + /// Serialized Name: UrlRedirectActionParameters.customHostname + /// public string CustomHostname { get; set; } - /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them. + /// + /// The set of query strings to be placed in the redirect URL. Setting this value would replace any existing query string; leave empty to preserve the incoming query string. Query string must be in <key>=<value> format. ? and & will be added automatically so do not include them. + /// Serialized Name: UrlRedirectActionParameters.customQueryString + /// public string CustomQueryString { get; set; } - /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// + /// Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do not include the #. + /// Serialized Name: UrlRedirectActionParameters.customFragment + /// public string CustomFragment { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteAction.cs index 4fa5016d8d5e..878261183679 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the url rewrite action for the delivery rule. + /// + /// Defines the url rewrite action for the delivery rule. + /// Serialized Name: UrlRewriteAction + /// public partial class UriRewriteAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRewriteAction.parameters + /// /// is null. public UriRewriteAction(UriRewriteActionProperties properties) { @@ -25,9 +31,15 @@ public UriRewriteAction(UriRewriteActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRewriteAction.parameters + /// internal UriRewriteAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, UriRewriteActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal UriRewriteAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlRewriteAction.parameters + /// public UriRewriteActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.Serialization.cs index 65f280a5f760..7305fd9e8077 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriRewriteActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); writer.WritePropertyName("sourcePattern"u8); writer.WriteStringValue(SourcePattern); writer.WritePropertyName("destination"u8); @@ -45,21 +44,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("preserveUnmatchedPath"u8); writer.WriteBooleanValue(PreserveUnmatchedPath.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 - } - } } UriRewriteActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -82,19 +66,14 @@ internal static UriRewriteActionProperties DeserializeUriRewriteActionProperties { return null; } - UriRewriteActionType typeName = default; string sourcePattern = default; string destination = default; bool? preserveUnmatchedPath = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriRewriteActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("sourcePattern"u8)) { sourcePattern = property.Value.GetString(); @@ -114,13 +93,18 @@ internal static UriRewriteActionProperties DeserializeUriRewriteActionProperties preserveUnmatchedPath = property.Value.GetBoolean(); continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UriRewriteActionProperties(typeName, sourcePattern, destination, preserveUnmatchedPath, serializedAdditionalRawData); + return new UriRewriteActionProperties(typeName, serializedAdditionalRawData, sourcePattern, destination, preserveUnmatchedPath); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.cs index 34ebdf152a6e..2df4c760f8be 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriRewriteActionProperties.cs @@ -10,69 +10,53 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the url rewrite action. - public partial class UriRewriteActionProperties + /// + /// Defines the parameters for the url rewrite action. + /// Serialized Name: UrlRewriteActionParameters + /// + public partial class UriRewriteActionProperties : DeliveryRuleActionProperties { - /// - /// 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 . - /// - /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. - /// Define the relative URL to which the above requests will be rewritten by. + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. + /// Serialized Name: UrlRewriteActionParameters.sourcePattern + /// + /// + /// Define the relative URL to which the above requests will be rewritten by. + /// Serialized Name: UrlRewriteActionParameters.destination + /// /// or is null. - public UriRewriteActionProperties(UriRewriteActionType actionType, string sourcePattern, string destination) + public UriRewriteActionProperties(string sourcePattern, string destination) { Argument.AssertNotNull(sourcePattern, nameof(sourcePattern)); Argument.AssertNotNull(destination, nameof(destination)); - ActionType = actionType; SourcePattern = sourcePattern; Destination = destination; + TypeName = DeliveryRuleActionParametersType.DeliveryRuleUriRewriteActionParameters; } /// Initializes a new instance of . - /// - /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. - /// Define the relative URL to which the above requests will be rewritten by. - /// Whether to preserve unmatched path. Default value is true. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriRewriteActionProperties(UriRewriteActionType actionType, string sourcePattern, string destination, bool? preserveUnmatchedPath, IDictionary serializedAdditionalRawData) + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. + /// Serialized Name: UrlRewriteActionParameters.sourcePattern + /// + /// + /// Define the relative URL to which the above requests will be rewritten by. + /// Serialized Name: UrlRewriteActionParameters.destination + /// + /// + /// Whether to preserve unmatched path. Default value is true. + /// Serialized Name: UrlRewriteActionParameters.preserveUnmatchedPath + /// + internal UriRewriteActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, string sourcePattern, string destination, bool? preserveUnmatchedPath) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; SourcePattern = sourcePattern; Destination = destination; PreserveUnmatchedPath = preserveUnmatchedPath; - _serializedAdditionalRawData = serializedAdditionalRawData; + TypeName = typeName; } /// Initializes a new instance of for deserialization. @@ -80,13 +64,20 @@ internal UriRewriteActionProperties() { } - /// Gets or sets the action type. - public UriRewriteActionType ActionType { get; set; } - /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. + /// + /// define a request URI pattern that identifies the type of requests that may be rewritten. If value is blank, all strings are matched. + /// Serialized Name: UrlRewriteActionParameters.sourcePattern + /// public string SourcePattern { get; set; } - /// Define the relative URL to which the above requests will be rewritten by. + /// + /// Define the relative URL to which the above requests will be rewritten by. + /// Serialized Name: UrlRewriteActionParameters.destination + /// public string Destination { get; set; } - /// Whether to preserve unmatched path. Default value is true. + /// + /// Whether to preserve unmatched path. Default value is true. + /// Serialized Name: UrlRewriteActionParameters.preserveUnmatchedPath + /// public bool? PreserveUnmatchedPath { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAction.cs index 15a34fc5e299..f6fd40a90e29 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAction.cs @@ -10,11 +10,17 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the url signing action for the delivery rule. + /// + /// Defines the url signing action for the delivery rule. + /// Serialized Name: UrlSigningAction + /// public partial class UriSigningAction : DeliveryRuleAction { /// Initializes a new instance of . - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlSigningAction.parameters + /// /// is null. public UriSigningAction(UriSigningActionProperties properties) { @@ -25,9 +31,15 @@ public UriSigningAction(UriSigningActionProperties properties) } /// Initializes a new instance of . - /// The name of the action for the delivery rule. + /// + /// The name of the action for the delivery rule. + /// Serialized Name: DeliveryRuleAction.name + /// /// Keeps track of any properties unknown to the library. - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlSigningAction.parameters + /// internal UriSigningAction(DeliveryRuleActionType name, IDictionary serializedAdditionalRawData, UriSigningActionProperties properties) : base(name, serializedAdditionalRawData) { Properties = properties; @@ -39,7 +51,10 @@ internal UriSigningAction() { } - /// Defines the parameters for the action. + /// + /// Defines the parameters for the action. + /// Serialized Name: UrlSigningAction.parameters + /// public UriSigningActionProperties Properties { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.Serialization.cs index 338f10f67a4f..da854cfcddaa 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.Serialization.cs @@ -26,7 +26,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRe /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,8 +34,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(UriSigningActionProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("typeName"u8); - writer.WriteStringValue(ActionType.ToString()); + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Algorithm)) { writer.WritePropertyName("algorithm"u8); @@ -51,21 +50,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } 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 - } - } } UriSigningActionProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -88,18 +72,13 @@ internal static UriSigningActionProperties DeserializeUriSigningActionProperties { return null; } - UriSigningActionType typeName = default; UriSigningAlgorithm? algorithm = default; IList parameterNameOverride = default; + DeliveryRuleActionParametersType typeName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("typeName"u8)) - { - typeName = new UriSigningActionType(property.Value.GetString()); - continue; - } if (property.NameEquals("algorithm"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -123,13 +102,18 @@ internal static UriSigningActionProperties DeserializeUriSigningActionProperties parameterNameOverride = array; continue; } + if (property.NameEquals("typeName"u8)) + { + typeName = new DeliveryRuleActionParametersType(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new UriSigningActionProperties(typeName, algorithm, parameterNameOverride ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new UriSigningActionProperties(typeName, serializedAdditionalRawData, algorithm, parameterNameOverride ?? new ChangeTrackingList()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.cs index 9888161353b9..ce8921e2a1ac 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningActionProperties.cs @@ -10,72 +10,46 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the parameters for the Url Signing action. - public partial class UriSigningActionProperties + /// + /// Defines the parameters for the Url Signing action. + /// Serialized Name: UrlSigningActionParameters + /// + public partial class UriSigningActionProperties : DeliveryRuleActionProperties { - /// - /// 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 UriSigningActionProperties(UriSigningActionType actionType) + public UriSigningActionProperties() { - ActionType = actionType; ParameterNameOverride = new ChangeTrackingList(); + TypeName = DeliveryRuleActionParametersType.DeliveryRuleUriSigningActionParameters; } /// Initializes a new instance of . - /// - /// Algorithm to use for URL signing. - /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// Serialized Name: DeliveryRuleActionParameters.typeName. /// Keeps track of any properties unknown to the library. - internal UriSigningActionProperties(UriSigningActionType actionType, UriSigningAlgorithm? algorithm, IList parameterNameOverride, IDictionary serializedAdditionalRawData) + /// + /// Algorithm to use for URL signing + /// Serialized Name: UrlSigningActionParameters.algorithm + /// + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// Serialized Name: UrlSigningActionParameters.parameterNameOverride + /// + internal UriSigningActionProperties(DeliveryRuleActionParametersType typeName, IDictionary serializedAdditionalRawData, UriSigningAlgorithm? algorithm, IList parameterNameOverride) : base(typeName, serializedAdditionalRawData) { - ActionType = actionType; Algorithm = algorithm; ParameterNameOverride = parameterNameOverride; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal UriSigningActionProperties() - { + TypeName = typeName; } - /// Gets or sets the action type. - public UriSigningActionType ActionType { get; set; } - /// Algorithm to use for URL signing. + /// + /// Algorithm to use for URL signing + /// Serialized Name: UrlSigningActionParameters.algorithm + /// public UriSigningAlgorithm? Algorithm { get; set; } - /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// + /// Defines which query string parameters in the url to be considered for expires, key id etc. + /// Serialized Name: UrlSigningActionParameters.parameterNameOverride + /// public IList ParameterNameOverride { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAlgorithm.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAlgorithm.cs index 3b65846d3554..680b7ce3f665 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAlgorithm.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningAlgorithm.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Algorithm to use for URL signing. + /// + /// Algorithm to use for URL signing + /// Serialized Name: Algorithm + /// public readonly partial struct UriSigningAlgorithm : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public UriSigningAlgorithm(string value) private const string Sha256Value = "SHA256"; - /// SHA256. + /// + /// SHA256 + /// Serialized Name: Algorithm.SHA256 + /// public static UriSigningAlgorithm Sha256 { get; } = new UriSigningAlgorithm(Sha256Value); /// Determines if two values are the same. public static bool operator ==(UriSigningAlgorithm left, UriSigningAlgorithm right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKey.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKey.cs index e1356f752ed4..64bb8b94731d 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKey.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKey.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Url signing key. + /// + /// Url signing key + /// Serialized Name: UrlSigningKey + /// public partial class UriSigningKey { /// @@ -46,8 +49,14 @@ public partial class UriSigningKey private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. - /// Defines the parameters for using customer key vault for Url Signing Key. + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKey.keyId + /// + /// + /// Defines the parameters for using customer key vault for Url Signing Key. + /// Serialized Name: UrlSigningKey.keySourceParameters + /// /// or is null. public UriSigningKey(string keyId, KeyVaultSigningKey keySourceParameters) { @@ -59,8 +68,14 @@ public UriSigningKey(string keyId, KeyVaultSigningKey keySourceParameters) } /// Initializes a new instance of . - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. - /// Defines the parameters for using customer key vault for Url Signing Key. + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKey.keyId + /// + /// + /// Defines the parameters for using customer key vault for Url Signing Key. + /// Serialized Name: UrlSigningKey.keySourceParameters + /// /// Keeps track of any properties unknown to the library. internal UriSigningKey(string keyId, KeyVaultSigningKey keySourceParameters, IDictionary serializedAdditionalRawData) { @@ -74,9 +89,15 @@ internal UriSigningKey() { } - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKey.keyId + /// public string KeyId { get; set; } - /// Defines the parameters for using customer key vault for Url Signing Key. + /// + /// Defines the parameters for using customer key vault for Url Signing Key. + /// Serialized Name: UrlSigningKey.keySourceParameters + /// public KeyVaultSigningKey KeySourceParameters { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.Serialization.cs index b3949889ed95..cb2a8992ba85 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.Serialization.cs @@ -40,11 +40,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(KeyId); writer.WritePropertyName("secretSource"u8); JsonSerializer.Serialize(writer, SecretSource); - if (Optional.IsDefined(SecretVersion)) - { - writer.WritePropertyName("secretVersion"u8); - writer.WriteStringValue(SecretVersion); - } + writer.WritePropertyName("secretVersion"u8); + writer.WriteStringValue(SecretVersion); } UriSigningKeyProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.cs index b83ed7d42d94..73bfb6a0f490 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningKeyProperties.cs @@ -12,29 +12,56 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Url signing key parameters. + /// + /// Url signing key parameters + /// Serialized Name: UrlSigningKeyParameters + /// public partial class UriSigningKeyProperties : FrontDoorSecretProperties { /// Initializes a new instance of . - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// or is null. - public UriSigningKeyProperties(string keyId, WritableSubResource secretSource) + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKeyParameters.keyId + /// + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: UrlSigningKeyParameters.secretSource + /// + /// + /// Version of the secret to be used + /// Serialized Name: UrlSigningKeyParameters.secretVersion + /// + /// , or is null. + public UriSigningKeyProperties(string keyId, WritableSubResource secretSource, string secretVersion) { Argument.AssertNotNull(keyId, nameof(keyId)); Argument.AssertNotNull(secretSource, nameof(secretSource)); + Argument.AssertNotNull(secretVersion, nameof(secretVersion)); KeyId = keyId; SecretSource = secretSource; + SecretVersion = secretVersion; SecretType = SecretType.UriSigningKey; } /// Initializes a new instance of . - /// The type of the secret resource. + /// + /// The type of the secret resource. + /// Serialized Name: SecretParameters.type + /// /// Keeps track of any properties unknown to the library. - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Version of the secret to be used. + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKeyParameters.keyId + /// + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: UrlSigningKeyParameters.secretSource + /// + /// + /// Version of the secret to be used + /// Serialized Name: UrlSigningKeyParameters.secretVersion + /// internal UriSigningKeyProperties(SecretType secretType, IDictionary serializedAdditionalRawData, string keyId, WritableSubResource secretSource, string secretVersion) : base(secretType, serializedAdditionalRawData) { KeyId = keyId; @@ -48,9 +75,15 @@ internal UriSigningKeyProperties() { } - /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// + /// Defines the customer defined key Id. This id will exist in the incoming request to indicate the key used to form the hash. + /// Serialized Name: UrlSigningKeyParameters.keyId + /// public string KeyId { get; set; } - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: UrlSigningKeyParameters.secretSource + /// internal WritableSubResource SecretSource { get; set; } /// Gets or sets Id. public ResourceIdentifier SecretSourceId @@ -64,7 +97,10 @@ public ResourceIdentifier SecretSourceId } } - /// Version of the secret to be used. + /// + /// Version of the secret to be used + /// Serialized Name: UrlSigningKeyParameters.secretVersion + /// public string SecretVersion { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningParamIdentifier.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningParamIdentifier.cs index 2e01a8f10b92..6787ffb32f47 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningParamIdentifier.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UriSigningParamIdentifier.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines how to identify a parameter for a specific purpose e.g. expires. + /// + /// Defines how to identify a parameter for a specific purpose e.g. expires + /// Serialized Name: UrlSigningParamIdentifier + /// public partial class UriSigningParamIdentifier { /// @@ -46,8 +49,14 @@ public partial class UriSigningParamIdentifier private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Indicates the purpose of the parameter. - /// Parameter name. + /// + /// Indicates the purpose of the parameter + /// Serialized Name: UrlSigningParamIdentifier.paramIndicator + /// + /// + /// Parameter name + /// Serialized Name: UrlSigningParamIdentifier.paramName + /// /// is null. public UriSigningParamIdentifier(ParamIndicator paramIndicator, string paramName) { @@ -58,8 +67,14 @@ public UriSigningParamIdentifier(ParamIndicator paramIndicator, string paramName } /// Initializes a new instance of . - /// Indicates the purpose of the parameter. - /// Parameter name. + /// + /// Indicates the purpose of the parameter + /// Serialized Name: UrlSigningParamIdentifier.paramIndicator + /// + /// + /// Parameter name + /// Serialized Name: UrlSigningParamIdentifier.paramName + /// /// Keeps track of any properties unknown to the library. internal UriSigningParamIdentifier(ParamIndicator paramIndicator, string paramName, IDictionary serializedAdditionalRawData) { @@ -73,9 +88,15 @@ internal UriSigningParamIdentifier() { } - /// Indicates the purpose of the parameter. + /// + /// Indicates the purpose of the parameter + /// Serialized Name: UrlSigningParamIdentifier.paramIndicator + /// public ParamIndicator ParamIndicator { get; set; } - /// Parameter name. + /// + /// Parameter name + /// Serialized Name: UrlSigningParamIdentifier.paramName + /// public string ParamName { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UsagesListResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UsagesListResult.cs index b8d083d9c487..adf785b7e7f0 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UsagesListResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UsagesListResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The list usages operation response. + /// + /// The list usages operation response. + /// Serialized Name: UsagesListResult + /// internal partial class UsagesListResult { /// @@ -52,8 +55,14 @@ internal UsagesListResult() } /// Initializes a new instance of . - /// The list of resource usages. - /// URL to get the next set of results. + /// + /// The list of resource usages. + /// Serialized Name: UsagesListResult.value + /// + /// + /// URL to get the next set of results. + /// Serialized Name: UsagesListResult.nextLink + /// /// Keeps track of any properties unknown to the library. internal UsagesListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) { @@ -62,9 +71,15 @@ internal UsagesListResult(IReadOnlyList value, string nextLink, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of resource usages. + /// + /// The list of resource usages. + /// Serialized Name: UsagesListResult.value + /// public IReadOnlyList Value { get; } - /// URL to get the next set of results. + /// + /// URL to get the next set of results. + /// Serialized Name: UsagesListResult.nextLink + /// public string NextLink { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UserManagedHttpsContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UserManagedHttpsContent.cs index 4d54a6f6b81e..4acd431394c1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UserManagedHttpsContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/UserManagedHttpsContent.cs @@ -10,12 +10,21 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// Serialized Name: UserManagedHttpsParameters + /// public partial class UserManagedHttpsContent : CustomDomainHttpsContent { /// Initializes a new instance of . - /// Defines the TLS extension protocol that is used for secure delivery. - /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// Serialized Name: UserManagedHttpsParameters.certificateSourceParameters + /// /// is null. public UserManagedHttpsContent(SecureDeliveryProtocolType protocolType, KeyVaultCertificateSource certificateSourceParameters) : base(protocolType) { @@ -26,11 +35,23 @@ public UserManagedHttpsContent(SecureDeliveryProtocolType protocolType, KeyVault } /// Initializes a new instance of . - /// Defines the source of the SSL certificate. - /// Defines the TLS extension protocol that is used for secure delivery. - /// TLS protocol version that will be used for Https. + /// + /// Defines the source of the SSL certificate. + /// Serialized Name: CustomDomainHttpsParameters.certificateSource + /// + /// + /// Defines the TLS extension protocol that is used for secure delivery. + /// Serialized Name: CustomDomainHttpsParameters.protocolType + /// + /// + /// TLS protocol version that will be used for Https + /// Serialized Name: CustomDomainHttpsParameters.minimumTlsVersion + /// /// Keeps track of any properties unknown to the library. - /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// Serialized Name: UserManagedHttpsParameters.certificateSourceParameters + /// internal UserManagedHttpsContent(CertificateSource certificateSource, SecureDeliveryProtocolType protocolType, CdnMinimumTlsVersion? minimumTlsVersion, IDictionary serializedAdditionalRawData, KeyVaultCertificateSource certificateSourceParameters) : base(certificateSource, protocolType, minimumTlsVersion, serializedAdditionalRawData) { CertificateSourceParameters = certificateSourceParameters; @@ -42,7 +63,10 @@ internal UserManagedHttpsContent() { } - /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// + /// Defines the certificate source parameters using user's keyvault certificate for enabling SSL. + /// Serialized Name: UserManagedHttpsParameters.certificateSourceParameters + /// public KeyVaultCertificateSource CertificateSourceParameters { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainContent.cs index d819930a34ae..5b6b360937ea 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of the custom domain to be validated for DNS mapping. + /// + /// Input of the custom domain to be validated for DNS mapping. + /// Serialized Name: ValidateCustomDomainInput + /// public partial class ValidateCustomDomainContent { /// @@ -46,7 +49,10 @@ public partial class ValidateCustomDomainContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: ValidateCustomDomainInput.hostName + /// /// is null. public ValidateCustomDomainContent(string hostName) { @@ -56,7 +62,10 @@ public ValidateCustomDomainContent(string hostName) } /// Initializes a new instance of . - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: ValidateCustomDomainInput.hostName + /// /// Keeps track of any properties unknown to the library. internal ValidateCustomDomainContent(string hostName, IDictionary serializedAdditionalRawData) { @@ -69,7 +78,10 @@ internal ValidateCustomDomainContent() { } - /// The host name of the custom domain. Must be a domain name. + /// + /// The host name of the custom domain. Must be a domain name. + /// Serialized Name: ValidateCustomDomainInput.hostName + /// public string HostName { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainResult.cs index 7cd1179c45ff..406a1603b39a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateCustomDomainResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of custom domain validation. + /// + /// Output of custom domain validation. + /// Serialized Name: ValidateCustomDomainOutput + /// public partial class ValidateCustomDomainResult { /// @@ -51,9 +54,18 @@ internal ValidateCustomDomainResult() } /// Initializes a new instance of . - /// Indicates whether the custom domain is valid or not. - /// The reason why the custom domain is not valid. - /// Error message describing why the custom domain is not valid. + /// + /// Indicates whether the custom domain is valid or not. + /// Serialized Name: ValidateCustomDomainOutput.customDomainValidated + /// + /// + /// The reason why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.reason + /// + /// + /// Error message describing why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.message + /// /// Keeps track of any properties unknown to the library. internal ValidateCustomDomainResult(bool? isCustomDomainValid, string reason, string message, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal ValidateCustomDomainResult(bool? isCustomDomainValid, string reason, st _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Indicates whether the custom domain is valid or not. + /// + /// Indicates whether the custom domain is valid or not. + /// Serialized Name: ValidateCustomDomainOutput.customDomainValidated + /// public bool? IsCustomDomainValid { get; } - /// The reason why the custom domain is not valid. + /// + /// The reason why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.reason + /// public string Reason { get; } - /// Error message describing why the custom domain is not valid. + /// + /// Error message describing why the custom domain is not valid. + /// Serialized Name: ValidateCustomDomainOutput.message + /// public string Message { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeContent.cs index b426b8e8e4f7..b407c7256429 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeContent.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of the validate probe API. + /// + /// Input of the validate probe API. + /// Serialized Name: ValidateProbeInput + /// public partial class ValidateProbeContent { /// @@ -46,7 +49,10 @@ public partial class ValidateProbeContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The probe URL to validate. + /// + /// The probe URL to validate. + /// Serialized Name: ValidateProbeInput.probeURL + /// /// is null. public ValidateProbeContent(Uri probeUri) { @@ -56,7 +62,10 @@ public ValidateProbeContent(Uri probeUri) } /// Initializes a new instance of . - /// The probe URL to validate. + /// + /// The probe URL to validate. + /// Serialized Name: ValidateProbeInput.probeURL + /// /// Keeps track of any properties unknown to the library. internal ValidateProbeContent(Uri probeUri, IDictionary serializedAdditionalRawData) { @@ -69,7 +78,10 @@ internal ValidateProbeContent() { } - /// The probe URL to validate. + /// + /// The probe URL to validate. + /// Serialized Name: ValidateProbeInput.probeURL + /// public Uri ProbeUri { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeResult.cs index 0b7b8cac8930..f6a92f838932 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateProbeResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of the validate probe API. + /// + /// Output of the validate probe API. + /// Serialized Name: ValidateProbeOutput + /// public partial class ValidateProbeResult { /// @@ -51,9 +54,18 @@ internal ValidateProbeResult() } /// Initializes a new instance of . - /// Indicates whether the probe URL is accepted or not. - /// Specifies the error code when the probe url is not accepted. - /// The detailed error message describing why the probe URL is not accepted. + /// + /// Indicates whether the probe URL is accepted or not. + /// Serialized Name: ValidateProbeOutput.isValid + /// + /// + /// Specifies the error code when the probe url is not accepted. + /// Serialized Name: ValidateProbeOutput.errorCode + /// + /// + /// The detailed error message describing why the probe URL is not accepted. + /// Serialized Name: ValidateProbeOutput.message + /// /// Keeps track of any properties unknown to the library. internal ValidateProbeResult(bool? isValid, string errorCode, string message, IDictionary serializedAdditionalRawData) { @@ -63,11 +75,20 @@ internal ValidateProbeResult(bool? isValid, string errorCode, string message, ID _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Indicates whether the probe URL is accepted or not. + /// + /// Indicates whether the probe URL is accepted or not. + /// Serialized Name: ValidateProbeOutput.isValid + /// public bool? IsValid { get; } - /// Specifies the error code when the probe url is not accepted. + /// + /// Specifies the error code when the probe url is not accepted. + /// Serialized Name: ValidateProbeOutput.errorCode + /// public string ErrorCode { get; } - /// The detailed error message describing why the probe URL is not accepted. + /// + /// The detailed error message describing why the probe URL is not accepted. + /// Serialized Name: ValidateProbeOutput.message + /// public string Message { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs index c4939cff0794..c3cf92631b0a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretContent.cs @@ -12,7 +12,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Input of the secret to be validated. + /// + /// Input of the secret to be validated. + /// Serialized Name: ValidateSecretInput + /// public partial class ValidateSecretContent { /// @@ -48,8 +51,14 @@ public partial class ValidateSecretContent private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The secret type. - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// The secret type. + /// Serialized Name: ValidateSecretInput.secretType + /// + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: ValidateSecretInput.secretSource + /// /// is null. public ValidateSecretContent(SecretType secretType, WritableSubResource secretSource) { @@ -60,9 +69,18 @@ public ValidateSecretContent(SecretType secretType, WritableSubResource secretSo } /// Initializes a new instance of . - /// The secret type. - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. - /// Secret version, if customer is using a specific version. + /// + /// The secret type. + /// Serialized Name: ValidateSecretInput.secretType + /// + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: ValidateSecretInput.secretSource + /// + /// + /// Secret version, if customer is using a specific version. + /// Serialized Name: ValidateSecretInput.secretVersion + /// /// Keeps track of any properties unknown to the library. internal ValidateSecretContent(SecretType secretType, WritableSubResource secretSource, string secretVersion, IDictionary serializedAdditionalRawData) { @@ -77,9 +95,15 @@ internal ValidateSecretContent() { } - /// The secret type. + /// + /// The secret type. + /// Serialized Name: ValidateSecretInput.secretType + /// public SecretType SecretType { get; } - /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​. + /// + /// Resource reference to the Azure Key Vault secret. Expected to be in format of /subscriptions/{​​​​​​​​​subscriptionId}​​​​​​​​​/resourceGroups/{​​​​​​​​​resourceGroupName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/providers/Microsoft.KeyVault/vaults/{vaultName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​/secrets/{secretName}​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ + /// Serialized Name: ValidateSecretInput.secretSource + /// internal WritableSubResource SecretSource { get; } /// Gets or sets Id. public ResourceIdentifier SecretSourceId @@ -87,7 +111,10 @@ public ResourceIdentifier SecretSourceId get => SecretSource?.Id; } - /// Secret version, if customer is using a specific version. + /// + /// Secret version, if customer is using a specific version. + /// Serialized Name: ValidateSecretInput.secretVersion + /// public string SecretVersion { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs index 54534b2b1005..8021659a017a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidateSecretResult.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Output of the validated secret. + /// + /// Output of the validated secret. + /// Serialized Name: ValidateSecretOutput + /// public partial class ValidateSecretResult { /// @@ -51,8 +54,14 @@ internal ValidateSecretResult() } /// Initializes a new instance of . - /// The validation status. - /// Detailed error message. + /// + /// The validation status. + /// Serialized Name: ValidateSecretOutput.status + /// + /// + /// Detailed error message + /// Serialized Name: ValidateSecretOutput.message + /// /// Keeps track of any properties unknown to the library. internal ValidateSecretResult(ValidationStatus? status, string message, IDictionary serializedAdditionalRawData) { @@ -61,9 +70,15 @@ internal ValidateSecretResult(ValidationStatus? status, string message, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The validation status. + /// + /// The validation status. + /// Serialized Name: ValidateSecretOutput.status + /// public ValidationStatus? Status { get; } - /// Detailed error message. + /// + /// Detailed error message + /// Serialized Name: ValidateSecretOutput.message + /// public string Message { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs index c887cf8024e0..a1b85780e5d8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/ValidationStatus.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The validation status. + /// + /// The validation status. + /// Serialized Name: Status + /// public readonly partial struct ValidationStatus : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public ValidationStatus(string value) private const string AccessDeniedValue = "AccessDenied"; private const string CertificateExpiredValue = "CertificateExpired"; - /// Valid. + /// + /// Valid + /// Serialized Name: Status.Valid + /// public static ValidationStatus Valid { get; } = new ValidationStatus(ValidValue); - /// Invalid. + /// + /// Invalid + /// Serialized Name: Status.Invalid + /// public static ValidationStatus Invalid { get; } = new ValidationStatus(InvalidValue); - /// AccessDenied. + /// + /// AccessDenied + /// Serialized Name: Status.AccessDenied + /// public static ValidationStatus AccessDenied { get; } = new ValidationStatus(AccessDeniedValue); - /// CertificateExpired. + /// + /// CertificateExpired + /// Serialized Name: Status.CertificateExpired + /// public static ValidationStatus CertificateExpired { get; } = new ValidationStatus(CertificateExpiredValue); /// Determines if two values are the same. public static bool operator ==(ValidationStatus left, ValidationStatus right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafAction.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafAction.cs index 1e87c1bf7914..418c09a48af2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafAction.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafAction.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafAction. + /// + /// The WafAction. + /// Serialized Name: WafAction + /// public readonly partial struct WafAction : IEquatable { private readonly string _value; @@ -27,13 +30,25 @@ public WafAction(string value) private const string LogValue = "log"; private const string RedirectValue = "redirect"; - /// allow. + /// + /// allow + /// Serialized Name: WafAction.allow + /// public static WafAction Allow { get; } = new WafAction(AllowValue); - /// block. + /// + /// block + /// Serialized Name: WafAction.block + /// public static WafAction Block { get; } = new WafAction(BlockValue); - /// log. + /// + /// log + /// Serialized Name: WafAction.log + /// public static WafAction Log { get; } = new WafAction(LogValue); - /// redirect. + /// + /// redirect + /// Serialized Name: WafAction.redirect + /// public static WafAction Redirect { get; } = new WafAction(RedirectValue); /// Determines if two values are the same. public static bool operator ==(WafAction left, WafAction right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafGranularity.cs index 23aa00fb3e65..7980c0fa166e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafGranularity.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafGranularity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafGranularity. + /// + /// The WafGranularity. + /// Serialized Name: WafGranularity + /// public readonly partial struct WafGranularity : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public WafGranularity(string value) private const string PT1HValue = "PT1H"; private const string P1DValue = "P1D"; - /// PT5M. + /// + /// PT5M + /// Serialized Name: WafGranularity.PT5M + /// public static WafGranularity PT5M { get; } = new WafGranularity(PT5MValue); - /// PT1H. + /// + /// PT1H + /// Serialized Name: WafGranularity.PT1H + /// public static WafGranularity PT1H { get; } = new WafGranularity(PT1HValue); - /// P1D. + /// + /// P1D + /// Serialized Name: WafGranularity.P1D + /// public static WafGranularity P1D { get; } = new WafGranularity(P1DValue); /// Determines if two values are the same. public static bool operator ==(WafGranularity left, WafGranularity right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMatchVariable.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMatchVariable.cs index 004872cc6e6f..f1f3d24fae12 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMatchVariable.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMatchVariable.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Match variable to compare against. + /// + /// Match variable to compare against. + /// Serialized Name: WafMatchVariable + /// public readonly partial struct WafMatchVariable : IEquatable { private readonly string _value; @@ -32,23 +35,50 @@ public WafMatchVariable(string value) private const string CookiesValue = "Cookies"; private const string PostArgsValue = "PostArgs"; - /// RemoteAddr. + /// + /// RemoteAddr + /// Serialized Name: WafMatchVariable.RemoteAddr + /// public static WafMatchVariable RemoteAddr { get; } = new WafMatchVariable(RemoteAddrValue); - /// SocketAddr. + /// + /// SocketAddr + /// Serialized Name: WafMatchVariable.SocketAddr + /// public static WafMatchVariable SocketAddr { get; } = new WafMatchVariable(SocketAddrValue); - /// RequestMethod. + /// + /// RequestMethod + /// Serialized Name: WafMatchVariable.RequestMethod + /// public static WafMatchVariable RequestMethod { get; } = new WafMatchVariable(RequestMethodValue); - /// RequestHeader. + /// + /// RequestHeader + /// Serialized Name: WafMatchVariable.RequestHeader + /// public static WafMatchVariable RequestHeader { get; } = new WafMatchVariable(RequestHeaderValue); - /// RequestUri. + /// + /// RequestUri + /// Serialized Name: WafMatchVariable.RequestUri + /// public static WafMatchVariable RequestUri { get; } = new WafMatchVariable(RequestUriValue); - /// QueryString. + /// + /// QueryString + /// Serialized Name: WafMatchVariable.QueryString + /// public static WafMatchVariable QueryString { get; } = new WafMatchVariable(QueryStringValue); - /// RequestBody. + /// + /// RequestBody + /// Serialized Name: WafMatchVariable.RequestBody + /// public static WafMatchVariable RequestBody { get; } = new WafMatchVariable(RequestBodyValue); - /// Cookies. + /// + /// Cookies + /// Serialized Name: WafMatchVariable.Cookies + /// public static WafMatchVariable Cookies { get; } = new WafMatchVariable(CookiesValue); - /// PostArgs. + /// + /// PostArgs + /// Serialized Name: WafMatchVariable.PostArgs + /// public static WafMatchVariable PostArgs { get; } = new WafMatchVariable(PostArgsValue); /// Determines if two values are the same. public static bool operator ==(WafMatchVariable left, WafMatchVariable right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetric.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetric.cs index 18b39e47646b..ab6d1c4605a1 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetric.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetric.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafMetric. + /// + /// The WafMetric. + /// Serialized Name: WafMetric + /// public readonly partial struct WafMetric : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public WafMetric(string value) private const string ClientRequestCountValue = "clientRequestCount"; - /// clientRequestCount. + /// + /// clientRequestCount + /// Serialized Name: WafMetric.clientRequestCount + /// public static WafMetric ClientRequestCount { get; } = new WafMetric(ClientRequestCountValue); /// Determines if two values are the same. public static bool operator ==(WafMetric left, WafMetric right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs index 255343725989..cea351656f10 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Waf Metrics Response. + /// + /// Waf Metrics Response + /// Serialized Name: WafMetricsResponse + /// public partial class WafMetricsResponse { /// @@ -52,10 +55,10 @@ internal WafMetricsResponse() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafMetricsResponse.dateTimeBegin. + /// Serialized Name: WafMetricsResponse.dateTimeEnd. + /// Serialized Name: WafMetricsResponse.granularity. + /// Serialized Name: WafMetricsResponse.series. /// Keeps track of any properties unknown to the library. internal WafMetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, WafMetricsResponseGranularity? granularity, IReadOnlyList series, IDictionary serializedAdditionalRawData) { @@ -66,13 +69,13 @@ internal WafMetricsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateT _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date time begin. + /// Serialized Name: WafMetricsResponse.dateTimeBegin. public DateTimeOffset? DateTimeBegin { get; } - /// Gets the date time end. + /// Serialized Name: WafMetricsResponse.dateTimeEnd. public DateTimeOffset? DateTimeEnd { get; } - /// Gets the granularity. + /// Serialized Name: WafMetricsResponse.granularity. public WafMetricsResponseGranularity? Granularity { get; } - /// Gets the series. + /// Serialized Name: WafMetricsResponse.series. public IReadOnlyList Series { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs index f45ac43c952a..1b241a34e644 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseGranularity.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafMetricsResponseGranularity. + /// + /// The WafMetricsResponseGranularity. + /// Serialized Name: WafMetricsGranularity + /// public readonly partial struct WafMetricsResponseGranularity : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public WafMetricsResponseGranularity(string value) private const string PT1HValue = "PT1H"; private const string P1DValue = "P1D"; - /// PT5M. + /// + /// PT5M + /// Serialized Name: WafMetricsGranularity.PT5M + /// public static WafMetricsResponseGranularity PT5M { get; } = new WafMetricsResponseGranularity(PT5MValue); - /// PT1H. + /// + /// PT1H + /// Serialized Name: WafMetricsGranularity.PT1H + /// public static WafMetricsResponseGranularity PT1H { get; } = new WafMetricsResponseGranularity(PT1HValue); - /// P1D. + /// + /// P1D + /// Serialized Name: WafMetricsGranularity.P1D + /// public static WafMetricsResponseGranularity P1D { get; } = new WafMetricsResponseGranularity(P1DValue); /// Determines if two values are the same. public static bool operator ==(WafMetricsResponseGranularity left, WafMetricsResponseGranularity right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs index ba2fcb968196..905778185037 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafMetricsResponseSeriesItem. + /// + /// The WafMetricsResponseSeriesItem. + /// Serialized Name: WafMetricsResponseSeriesItem + /// public partial class WafMetricsResponseSeriesItem { /// @@ -53,10 +56,10 @@ internal WafMetricsResponseSeriesItem() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafMetricsResponseSeriesItem.metric. + /// Serialized Name: WafMetricsResponseSeriesItem.unit. + /// Serialized Name: WafMetricsResponseSeriesItem.groups. + /// Serialized Name: WafMetricsResponseSeriesItem.data. /// Keeps track of any properties unknown to the library. internal WafMetricsResponseSeriesItem(string metric, WafMetricsResponseSeriesItemUnit? unit, IReadOnlyList groups, IReadOnlyList data, IDictionary serializedAdditionalRawData) { @@ -67,13 +70,13 @@ internal WafMetricsResponseSeriesItem(string metric, WafMetricsResponseSeriesIte _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the metric. + /// Serialized Name: WafMetricsResponseSeriesItem.metric. public string Metric { get; } - /// Gets the unit. + /// Serialized Name: WafMetricsResponseSeriesItem.unit. public WafMetricsResponseSeriesItemUnit? Unit { get; } - /// Gets the groups. + /// Serialized Name: WafMetricsResponseSeriesItem.groups. public IReadOnlyList Groups { get; } - /// Gets the data. + /// Serialized Name: WafMetricsResponseSeriesItem.data. public IReadOnlyList Data { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs index 9e00a8ea3633..9e8d1a311b4b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesItemUnit.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafMetricsResponseSeriesItemUnit. + /// + /// The WafMetricsResponseSeriesItemUnit. + /// Serialized Name: WafMetricsSeriesUnit + /// public readonly partial struct WafMetricsResponseSeriesItemUnit : IEquatable { private readonly string _value; @@ -24,7 +27,10 @@ public WafMetricsResponseSeriesItemUnit(string value) private const string CountValue = "count"; - /// count. + /// + /// count + /// Serialized Name: WafMetricsSeriesUnit.count + /// public static WafMetricsResponseSeriesItemUnit Count { get; } = new WafMetricsResponseSeriesItemUnit(CountValue); /// Determines if two values are the same. public static bool operator ==(WafMetricsResponseSeriesItemUnit left, WafMetricsResponseSeriesItemUnit right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesPropertiesItemsItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesPropertiesItemsItem.cs index d5bd60e3aece..0d1af229b14c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesPropertiesItemsItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafMetricsResponseSeriesPropertiesItemsItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafMetricsResponseSeriesPropertiesItemsItem. + /// + /// The WafMetricsResponseSeriesPropertiesItemsItem. + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem + /// public partial class WafMetricsResponseSeriesPropertiesItemsItem { /// @@ -51,8 +54,8 @@ internal WafMetricsResponseSeriesPropertiesItemsItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.name. + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.value. /// Keeps track of any properties unknown to the library. internal WafMetricsResponseSeriesPropertiesItemsItem(string name, string value, IDictionary serializedAdditionalRawData) { @@ -61,9 +64,9 @@ internal WafMetricsResponseSeriesPropertiesItemsItem(string name, string value, _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the name. + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.name. public string Name { get; } - /// Gets the value. + /// Serialized Name: WafMetricsResponseSeriesPropertiesItemsItem.value. public string Value { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicyManagedRuleSet.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicyManagedRuleSet.cs index 57f75584788c..d76a2e6c68fa 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicyManagedRuleSet.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicyManagedRuleSet.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines a managed rule set. + /// + /// Defines a managed rule set. + /// Serialized Name: ManagedRuleSet + /// public partial class WafPolicyManagedRuleSet { /// @@ -46,8 +49,14 @@ public partial class WafPolicyManagedRuleSet private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Defines the rule set type to use. - /// Defines the version of the rule set to use. + /// + /// Defines the rule set type to use. + /// Serialized Name: ManagedRuleSet.ruleSetType + /// + /// + /// Defines the version of the rule set to use. + /// Serialized Name: ManagedRuleSet.ruleSetVersion + /// /// or is null. public WafPolicyManagedRuleSet(string ruleSetType, string ruleSetVersion) { @@ -60,10 +69,22 @@ public WafPolicyManagedRuleSet(string ruleSetType, string ruleSetVersion) } /// Initializes a new instance of . - /// Defines the rule set type to use. - /// Defines the version of the rule set to use. - /// Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. - /// Defines the rule overrides to apply to the rule set. + /// + /// Defines the rule set type to use. + /// Serialized Name: ManagedRuleSet.ruleSetType + /// + /// + /// Defines the version of the rule set to use. + /// Serialized Name: ManagedRuleSet.ruleSetVersion + /// + /// + /// Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. + /// Serialized Name: ManagedRuleSet.anomalyScore + /// + /// + /// Defines the rule overrides to apply to the rule set. + /// Serialized Name: ManagedRuleSet.ruleGroupOverrides + /// /// Keeps track of any properties unknown to the library. internal WafPolicyManagedRuleSet(string ruleSetType, string ruleSetVersion, int? anomalyScore, IList ruleGroupOverrides, IDictionary serializedAdditionalRawData) { @@ -79,13 +100,25 @@ internal WafPolicyManagedRuleSet() { } - /// Defines the rule set type to use. + /// + /// Defines the rule set type to use. + /// Serialized Name: ManagedRuleSet.ruleSetType + /// public string RuleSetType { get; set; } - /// Defines the version of the rule set to use. + /// + /// Defines the version of the rule set to use. + /// Serialized Name: ManagedRuleSet.ruleSetVersion + /// public string RuleSetVersion { get; set; } - /// Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. + /// + /// Verizon only : If the rule set supports anomaly detection mode, this describes the threshold for blocking requests. + /// Serialized Name: ManagedRuleSet.anomalyScore + /// public int? AnomalyScore { get; set; } - /// Defines the rule overrides to apply to the rule set. + /// + /// Defines the rule overrides to apply to the rule set. + /// Serialized Name: ManagedRuleSet.ruleGroupOverrides + /// public IList RuleGroupOverrides { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicySettings.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicySettings.cs index 0b2bfea80643..fb1a8b1e0f5f 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicySettings.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafPolicySettings.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Defines contents of a web application firewall global configuration. + /// + /// Defines contents of a web application firewall global configuration + /// Serialized Name: PolicySettings + /// public partial class WafPolicySettings { /// @@ -51,11 +54,26 @@ public WafPolicySettings() } /// Initializes a new instance of . - /// describes if the policy is in enabled state or disabled state. - /// Describes if it is in detection mode or prevention mode at policy level. - /// If action type is redirect, this field represents the default redirect URL for the client. - /// If the action type is block, this field defines the default customer overridable http response status code. - /// If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + /// + /// describes if the policy is in enabled state or disabled state + /// Serialized Name: PolicySettings.enabledState + /// + /// + /// Describes if it is in detection mode or prevention mode at policy level. + /// Serialized Name: PolicySettings.mode + /// + /// + /// If action type is redirect, this field represents the default redirect URL for the client. + /// Serialized Name: PolicySettings.defaultRedirectUrl + /// + /// + /// If the action type is block, this field defines the default customer overridable http response status code. + /// Serialized Name: PolicySettings.defaultCustomBlockResponseStatusCode + /// + /// + /// If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + /// Serialized Name: PolicySettings.defaultCustomBlockResponseBody + /// /// Keeps track of any properties unknown to the library. internal WafPolicySettings(PolicyEnabledState? enabledState, PolicyMode? mode, Uri defaultRedirectUri, PolicySettingsDefaultCustomBlockResponseStatusCode? defaultCustomBlockResponseStatusCode, BinaryData defaultCustomBlockResponseBody, IDictionary serializedAdditionalRawData) { @@ -67,16 +85,29 @@ internal WafPolicySettings(PolicyEnabledState? enabledState, PolicyMode? mode, U _serializedAdditionalRawData = serializedAdditionalRawData; } - /// describes if the policy is in enabled state or disabled state. + /// + /// describes if the policy is in enabled state or disabled state + /// Serialized Name: PolicySettings.enabledState + /// public PolicyEnabledState? EnabledState { get; set; } - /// Describes if it is in detection mode or prevention mode at policy level. + /// + /// Describes if it is in detection mode or prevention mode at policy level. + /// Serialized Name: PolicySettings.mode + /// public PolicyMode? Mode { get; set; } - /// If action type is redirect, this field represents the default redirect URL for the client. + /// + /// If action type is redirect, this field represents the default redirect URL for the client. + /// Serialized Name: PolicySettings.defaultRedirectUrl + /// public Uri DefaultRedirectUri { get; set; } - /// If the action type is block, this field defines the default customer overridable http response status code. + /// + /// If the action type is block, this field defines the default customer overridable http response status code. + /// Serialized Name: PolicySettings.defaultCustomBlockResponseStatusCode + /// public PolicySettingsDefaultCustomBlockResponseStatusCode? DefaultCustomBlockResponseStatusCode { get; set; } /// /// If the action type is block, customer can override the response body. The body must be specified in base64 encoding. + /// Serialized Name: PolicySettings.defaultCustomBlockResponseBody /// /// To assign an object to this property use . /// diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingGroupBy.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingGroupBy.cs index bea4c5ef80f1..7e1ba375e513 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingGroupBy.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingGroupBy.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafRankingGroupBy. + /// + /// The WafRankingGroupBy. + /// Serialized Name: WafRankingGroupBy + /// public readonly partial struct WafRankingGroupBy : IEquatable { private readonly string _value; @@ -25,9 +28,15 @@ public WafRankingGroupBy(string value) private const string HttpStatusCodeValue = "httpStatusCode"; private const string CustomDomainValue = "customDomain"; - /// httpStatusCode. + /// + /// httpStatusCode + /// Serialized Name: WafRankingGroupBy.httpStatusCode + /// public static WafRankingGroupBy HttpStatusCode { get; } = new WafRankingGroupBy(HttpStatusCodeValue); - /// customDomain. + /// + /// customDomain + /// Serialized Name: WafRankingGroupBy.customDomain + /// public static WafRankingGroupBy CustomDomain { get; } = new WafRankingGroupBy(CustomDomainValue); /// Determines if two values are the same. public static bool operator ==(WafRankingGroupBy left, WafRankingGroupBy right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingType.cs index ce2f238e67c8..1a9d598bf022 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafRankingType. + /// + /// The WafRankingType. + /// Serialized Name: WafRankingType + /// public readonly partial struct WafRankingType : IEquatable { private readonly string _value; @@ -31,21 +34,45 @@ public WafRankingType(string value) private const string CountryOrRegionValue = "countryOrRegion"; private const string RuleTypeValue = "ruleType"; - /// action. + /// + /// action + /// Serialized Name: WafRankingType.action + /// public static WafRankingType Action { get; } = new WafRankingType(ActionValue); - /// ruleGroup. + /// + /// ruleGroup + /// Serialized Name: WafRankingType.ruleGroup + /// public static WafRankingType RuleGroup { get; } = new WafRankingType(RuleGroupValue); - /// ruleId. + /// + /// ruleId + /// Serialized Name: WafRankingType.ruleId + /// public static WafRankingType RuleId { get; } = new WafRankingType(RuleIdValue); - /// userAgent. + /// + /// userAgent + /// Serialized Name: WafRankingType.userAgent + /// public static WafRankingType UserAgent { get; } = new WafRankingType(UserAgentValue); - /// clientIp. + /// + /// clientIp + /// Serialized Name: WafRankingType.clientIp + /// public static WafRankingType ClientIP { get; } = new WafRankingType(ClientIPValue); - /// url. + /// + /// url + /// Serialized Name: WafRankingType.url + /// public static WafRankingType Uri { get; } = new WafRankingType(UriValue); - /// countryOrRegion. + /// + /// countryOrRegion + /// Serialized Name: WafRankingType.countryOrRegion + /// public static WafRankingType CountryOrRegion { get; } = new WafRankingType(CountryOrRegionValue); - /// ruleType. + /// + /// ruleType + /// Serialized Name: WafRankingType.ruleType + /// public static WafRankingType RuleType { get; } = new WafRankingType(RuleTypeValue); /// Determines if two values are the same. public static bool operator ==(WafRankingType left, WafRankingType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponse.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponse.cs index 19e1af5a298f..0324c050c146 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponse.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponse.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Waf Rankings Response. + /// + /// Waf Rankings Response + /// Serialized Name: WafRankingsResponse + /// public partial class WafRankingsResponse { /// @@ -53,10 +56,10 @@ internal WafRankingsResponse() } /// Initializes a new instance of . - /// - /// - /// - /// + /// Serialized Name: WafRankingsResponse.dateTimeBegin. + /// Serialized Name: WafRankingsResponse.dateTimeEnd. + /// Serialized Name: WafRankingsResponse.groups. + /// Serialized Name: WafRankingsResponse.data. /// Keeps track of any properties unknown to the library. internal WafRankingsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? dateTimeEnd, IReadOnlyList groups, IReadOnlyList data, IDictionary serializedAdditionalRawData) { @@ -67,13 +70,13 @@ internal WafRankingsResponse(DateTimeOffset? dateTimeBegin, DateTimeOffset? date _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the date time begin. + /// Serialized Name: WafRankingsResponse.dateTimeBegin. public DateTimeOffset? DateTimeBegin { get; } - /// Gets the date time end. + /// Serialized Name: WafRankingsResponse.dateTimeEnd. public DateTimeOffset? DateTimeEnd { get; } - /// Gets the groups. + /// Serialized Name: WafRankingsResponse.groups. public IReadOnlyList Groups { get; } - /// Gets the data. + /// Serialized Name: WafRankingsResponse.data. public IReadOnlyList Data { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponseDataItem.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponseDataItem.cs index ba4a981c51ca..29ecd141a6d8 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponseDataItem.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRankingsResponseDataItem.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafRankingsResponseDataItem. + /// + /// The WafRankingsResponseDataItem. + /// Serialized Name: WafRankingsResponseDataItem + /// public partial class WafRankingsResponseDataItem { /// @@ -53,8 +56,8 @@ internal WafRankingsResponseDataItem() } /// Initializes a new instance of . - /// - /// + /// Serialized Name: WafRankingsResponseDataItem.groupValues. + /// Serialized Name: WafRankingsResponseDataItem.metrics. /// Keeps track of any properties unknown to the library. internal WafRankingsResponseDataItem(IReadOnlyList groupValues, IReadOnlyList metrics, IDictionary serializedAdditionalRawData) { @@ -63,9 +66,9 @@ internal WafRankingsResponseDataItem(IReadOnlyList groupValues, IReadOnl _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the group values. + /// Serialized Name: WafRankingsResponseDataItem.groupValues. public IReadOnlyList GroupValues { get; } - /// Gets the metrics. + /// Serialized Name: WafRankingsResponseDataItem.metrics. public IReadOnlyList Metrics { get; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRuleType.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRuleType.cs index 5748c6c71795..a76947346d18 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRuleType.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WafRuleType.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// The WafRuleType. + /// + /// The WafRuleType. + /// Serialized Name: WafRuleType + /// public readonly partial struct WafRuleType : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public WafRuleType(string value) private const string CustomValue = "custom"; private const string BotValue = "bot"; - /// managed. + /// + /// managed + /// Serialized Name: WafRuleType.managed + /// public static WafRuleType Managed { get; } = new WafRuleType(ManagedValue); - /// custom. + /// + /// custom + /// Serialized Name: WafRuleType.custom + /// public static WafRuleType Custom { get; } = new WafRuleType(CustomValue); - /// bot. + /// + /// bot + /// Serialized Name: WafRuleType.bot + /// public static WafRuleType Bot { get; } = new WafRuleType(BotValue); /// Determines if two values are the same. public static bool operator ==(WafRuleType left, WafRuleType right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WebApplicationFirewallPolicyProvisioningState.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WebApplicationFirewallPolicyProvisioningState.cs index 2aa9e48d417d..636f21ca7ccf 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WebApplicationFirewallPolicyProvisioningState.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/Models/WebApplicationFirewallPolicyProvisioningState.cs @@ -10,7 +10,10 @@ namespace Azure.ResourceManager.Cdn.Models { - /// Provisioning state of the WebApplicationFirewallPolicy. + /// + /// Provisioning state of the WebApplicationFirewallPolicy. + /// Serialized Name: ProvisioningState + /// public readonly partial struct WebApplicationFirewallPolicyProvisioningState : IEquatable { private readonly string _value; @@ -26,11 +29,20 @@ public WebApplicationFirewallPolicyProvisioningState(string value) private const string SucceededValue = "Succeeded"; private const string FailedValue = "Failed"; - /// Creating. + /// + /// Creating + /// Serialized Name: ProvisioningState.Creating + /// public static WebApplicationFirewallPolicyProvisioningState Creating { get; } = new WebApplicationFirewallPolicyProvisioningState(CreatingValue); - /// Succeeded. + /// + /// Succeeded + /// Serialized Name: ProvisioningState.Succeeded + /// public static WebApplicationFirewallPolicyProvisioningState Succeeded { get; } = new WebApplicationFirewallPolicyProvisioningState(SucceededValue); - /// Failed. + /// + /// Failed + /// Serialized Name: ProvisioningState.Failed + /// public static WebApplicationFirewallPolicyProvisioningState Failed { get; } = new WebApplicationFirewallPolicyProvisioningState(FailedValue); /// Determines if two values are the same. public static bool operator ==(WebApplicationFirewallPolicyProvisioningState left, WebApplicationFirewallPolicyProvisioningState right) => left.Equals(right); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileCollection.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileCollection.cs index 469d12c9ab2b..44943c0eedd2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileCollection.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(Wai /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string profileName /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string profileName, CancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken canc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string profileName, Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string profileName, CancellationToken cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsync(st /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs index dfa9ee757bb0..74797adf525e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileData.cs @@ -16,6 +16,7 @@ namespace Azure.ResourceManager.Cdn /// /// A class representing the Profile data model. /// A profile is a logical grouping of endpoints that share the same settings. + /// Serialized Name: Profile /// public partial class ProfileData : TrackedResourceData { @@ -53,7 +54,10 @@ public partial class ProfileData : TrackedResourceData /// Initializes a new instance of . /// The location. - /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// Serialized Name: Profile.sku + /// /// is null. public ProfileData(AzureLocation location, CdnSku sku) : base(location) { @@ -70,15 +74,42 @@ public ProfileData(AzureLocation location, CdnSku sku) : base(location) /// The systemData. /// The tags. /// The location. - /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. - /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. - /// Managed service identity (system assigned and/or user assigned identities). - /// Resource status of the profile. - /// Provisioning status of the profile. - /// Key-Value pair representing additional properties for profiles. - /// The Id of the frontdoor. - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. - /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// Serialized Name: Profile.sku + /// + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// Serialized Name: Profile.kind + /// + /// + /// Managed service identity (system assigned and/or user assigned identities). + /// Serialized Name: Profile.identity + /// + /// + /// Resource status of the profile. + /// Serialized Name: Profile.properties.resourceState + /// + /// + /// Provisioning status of the profile. + /// Serialized Name: Profile.properties.provisioningState + /// + /// + /// Key-Value pair representing additional properties for profiles. + /// Serialized Name: Profile.properties.extendedProperties + /// + /// + /// The Id of the frontdoor. + /// Serialized Name: Profile.properties.frontDoorId + /// + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// Serialized Name: Profile.properties.originResponseTimeoutSeconds + /// + /// + /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// Serialized Name: Profile.properties.logScrubbing + /// /// Keeps track of any properties unknown to the library. internal ProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, CdnSku sku, string kind, ManagedServiceIdentity identity, ProfileResourceState? resourceState, ProfileProvisioningState? provisioningState, IReadOnlyDictionary extendedProperties, Guid? frontDoorId, int? originResponseTimeoutSeconds, ProfileLogScrubbing logScrubbing, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { @@ -99,9 +130,15 @@ internal ProfileData() { } - /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// + /// The pricing tier (defines Azure Front Door Standard or Premium or a CDN provider, feature list and rate) of the profile. + /// Serialized Name: Profile.sku + /// internal CdnSku Sku { get; set; } - /// Name of the pricing tier. + /// + /// Name of the pricing tier. + /// Serialized Name: Sku.name + /// public CdnSkuName? SkuName { get => Sku is null ? default : Sku.Name; @@ -113,21 +150,45 @@ public CdnSkuName? SkuName } } - /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// + /// Kind of the profile. Used by portal to differentiate traditional CDN profile and new AFD profile. + /// Serialized Name: Profile.kind + /// public string Kind { get; } - /// Managed service identity (system assigned and/or user assigned identities). + /// + /// Managed service identity (system assigned and/or user assigned identities). + /// Serialized Name: Profile.identity + /// public ManagedServiceIdentity Identity { get; set; } - /// Resource status of the profile. + /// + /// Resource status of the profile. + /// Serialized Name: Profile.properties.resourceState + /// public ProfileResourceState? ResourceState { get; } - /// Provisioning status of the profile. + /// + /// Provisioning status of the profile. + /// Serialized Name: Profile.properties.provisioningState + /// public ProfileProvisioningState? ProvisioningState { get; } - /// Key-Value pair representing additional properties for profiles. + /// + /// Key-Value pair representing additional properties for profiles. + /// Serialized Name: Profile.properties.extendedProperties + /// public IReadOnlyDictionary ExtendedProperties { get; } - /// The Id of the frontdoor. + /// + /// The Id of the frontdoor. + /// Serialized Name: Profile.properties.frontDoorId + /// public Guid? FrontDoorId { get; } - /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// + /// Send and receive timeout on forwarding request to the origin. When timeout is reached, the request fails and returns. + /// Serialized Name: Profile.properties.originResponseTimeoutSeconds + /// public int? OriginResponseTimeoutSeconds { get; set; } - /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// + /// Defines rules that scrub sensitive fields in the Azure Front Door profile logs. + /// Serialized Name: Profile.properties.logScrubbing + /// public ProfileLogScrubbing LogScrubbing { get; set; } } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.Serialization.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.Serialization.cs index da639d6288ff..d3f2719f45c9 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.Serialization.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Cdn { public partial class ProfileResource : IJsonModel { + private static ProfileData s_dataDeserializationInstance; + private static ProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCdnContext.Default); ProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCdnContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs index dabf83b89418..e45b04cd858c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/ProfileResource.cs @@ -119,7 +119,7 @@ public virtual FrontDoorCustomDomainCollection GetFrontDoorCustomDomains() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -150,7 +150,7 @@ public virtual async Task> GetFrontDoorC /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -188,7 +188,7 @@ public virtual FrontDoorEndpointCollection GetFrontDoorEndpoints() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetFrontDoorEndpo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual FrontDoorOriginGroupCollection GetFrontDoorOriginGroups() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> GetFrontDoorOr /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -326,7 +326,7 @@ public virtual FrontDoorRuleSetCollection GetFrontDoorRuleSets() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> GetFrontDoorRuleSe /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -395,7 +395,7 @@ public virtual FrontDoorSecurityPolicyCollection GetFrontDoorSecurityPolicies() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task> GetFrontDoo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -464,7 +464,7 @@ public virtual FrontDoorSecretCollection GetFrontDoorSecrets() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -495,7 +495,7 @@ public virtual async Task> GetFrontDoorSecretA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -533,7 +533,7 @@ public virtual CdnEndpointCollection GetCdnEndpoints() /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -564,7 +564,7 @@ public virtual async Task> GetCdnEndpointAsync(str /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -595,7 +595,7 @@ public virtual Response GetCdnEndpoint(string endpointName, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -635,7 +635,7 @@ public virtual async Task> GetAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -675,7 +675,7 @@ public virtual Response Get(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -717,7 +717,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -759,7 +759,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -805,7 +805,7 @@ public virtual async Task> UpdateAsync(WaitUntil w /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -851,7 +851,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Profile /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -889,7 +889,7 @@ public virtual async Task> CheckEndpoin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -927,7 +927,7 @@ public virtual Response CheckEndpointNameAvailab /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -953,7 +953,7 @@ public virtual AsyncPageable GetFrontDoorProfileResourceUsagesAs /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -979,7 +979,7 @@ public virtual Pageable GetFrontDoorProfileResourceUsages(Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1017,7 +1017,7 @@ public virtual async Task> CheckFrontDoorPro /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1055,7 +1055,7 @@ public virtual Response CheckFrontDoorProfileHostName /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1093,7 +1093,7 @@ public virtual async Task> ValidateSecretFrontDoo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1131,7 +1131,7 @@ public virtual Response ValidateSecretFrontDoorProfile(Val /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1173,7 +1173,7 @@ public virtual async Task> UpgradeFrontDoorProfile /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1215,7 +1215,7 @@ public virtual ArmOperation UpgradeFrontDoorProfile(WaitUntil w /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1253,7 +1253,7 @@ public virtual async Task> GetLogAnalyticsMetricsAsync /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1291,7 +1291,7 @@ public virtual Response GetLogAnalyticsMetrics(ProfileResourceG /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1329,7 +1329,7 @@ public virtual async Task> GetLogAnalyticsRankingsAsy /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1367,7 +1367,7 @@ public virtual Response GetLogAnalyticsRankings(ProfileResourc /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1401,7 +1401,7 @@ public virtual async Task> GetLogAnalyticsLocations /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1435,7 +1435,7 @@ public virtual Response GetLogAnalyticsLocations(Cancellatio /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1469,7 +1469,7 @@ public virtual async Task> GetLogAnalyticsResourcesA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1503,7 +1503,7 @@ public virtual Response GetLogAnalyticsResources(Cancellation /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1541,7 +1541,7 @@ public virtual async Task> GetWafLogAnalyticsMetric /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1579,7 +1579,7 @@ public virtual Response GetWafLogAnalyticsMetrics(ProfileRes /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1617,7 +1617,7 @@ public virtual async Task> GetWafLogAnalyticsRanki /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// @@ -1655,7 +1655,7 @@ public virtual Response GetWafLogAnalyticsRankings(ProfileR /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1697,7 +1697,7 @@ public virtual async Task MigrationCommitAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1739,7 +1739,7 @@ public virtual ArmOperation MigrationCommit(WaitUntil waitUntil, CancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1777,7 +1777,7 @@ public virtual async Task> GenerateSsoUriAsync(CancellationToke /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1815,7 +1815,7 @@ public virtual Response GenerateSsoUri(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1853,7 +1853,7 @@ public virtual async Task> GetSup /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1891,7 +1891,7 @@ public virtual Response GetSupportedOptimi /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1921,7 +1921,7 @@ public virtual AsyncPageable GetResourceUsagesAsync(CancellationToken /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -1938,6 +1938,266 @@ public virtual Pageable GetResourceUsages(CancellationToken cancellati return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => CdnUsage.DeserializeCdnUsage(e), _profileClientDiagnostics, Pipeline, "ProfileResource.GetResourceUsages", "value", "nextLink", cancellationToken); } + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd + /// + /// + /// Operation Id + /// Profiles_CdnCanMigrateToAfd + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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> CheckCdnMigrationCompatibilityAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.CheckCdnMigrationCompatibility"); + scope.Start(); + try + { + var response = await _profileRestClient.CdnCanMigrateToAfdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(new CanMigrateResultOperationSource(), _profileClientDiagnostics, Pipeline, _profileRestClient.CreateCdnCanMigrateToAfdRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnCanMigrateToAfd + /// + /// + /// Operation Id + /// Profiles_CdnCanMigrateToAfd + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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 CheckCdnMigrationCompatibility(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.CheckCdnMigrationCompatibility"); + scope.Start(); + try + { + var response = _profileRestClient.CdnCanMigrateToAfd(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CdnArmOperation(new CanMigrateResultOperationSource(), _profileClientDiagnostics, Pipeline, _profileRestClient.CreateCdnCanMigrateToAfdRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for migration and will be followed by Commit to finalize the migration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd + /// + /// + /// Operation Id + /// Profiles_CdnMigrateToAfd + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// is null. + public virtual async Task> MigrateCdnToAfdAsync(WaitUntil waitUntil, CdnMigrationToAfdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.MigrateCdnToAfd"); + scope.Start(); + try + { + var response = await _profileRestClient.CdnMigrateToAfdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(new MigrateResultOperationSource(), _profileClientDiagnostics, Pipeline, _profileRestClient.CreateCdnMigrateToAfdRequest(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; + } + } + + /// + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for migration and will be followed by Commit to finalize the migration. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/cdnMigrateToAfd + /// + /// + /// Operation Id + /// Profiles_CdnMigrateToAfd + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation MigrateCdnToAfd(WaitUntil waitUntil, CdnMigrationToAfdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.MigrateCdnToAfd"); + scope.Start(); + try + { + var response = _profileRestClient.CdnMigrateToAfd(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new CdnArmOperation(new MigrateResultOperationSource(), _profileClientDiagnostics, Pipeline, _profileRestClient.CreateCdnMigrateToAfdRequest(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; + } + } + + /// + /// Abort the migration to Azure Frontdoor Premium/Standard. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort + /// + /// + /// Operation Id + /// Profiles_MigrationAbort + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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 AbortMigrationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.AbortMigration"); + scope.Start(); + try + { + var response = await _profileRestClient.MigrationAbortAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new CdnArmOperation(_profileClientDiagnostics, Pipeline, _profileRestClient.CreateMigrationAbortRequest(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; + } + } + + /// + /// Abort the migration to Azure Frontdoor Premium/Standard. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/migrationAbort + /// + /// + /// Operation Id + /// Profiles_MigrationAbort + /// + /// + /// Default Api Version + /// 2025-04-15 + /// + /// + /// 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 AbortMigration(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _profileClientDiagnostics.CreateScope("ProfileResource.AbortMigration"); + scope.Start(); + try + { + var response = _profileRestClient.MigrationAbort(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new CdnArmOperation(_profileClientDiagnostics, Pipeline, _profileRestClient.CreateMigrationAbortRequest(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; + } + } + /// /// Add a tag to the current resource. /// @@ -1951,7 +2211,7 @@ public virtual Pageable GetResourceUsages(CancellationToken cancellati /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -2013,7 +2273,7 @@ public virtual async Task> AddTagAsync(string key, str /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -2075,7 +2335,7 @@ public virtual Response AddTag(string key, string value, Cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -2132,7 +2392,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -2189,7 +2449,7 @@ public virtual Response SetTags(IDictionary tag /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource @@ -2249,7 +2509,7 @@ public virtual async Task> RemoveTagAsync(string key, /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-04-15 /// /// /// Resource diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs index a49ac7708d7c..81fbcc86e71c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnCustomDomainsRestOperations.cs @@ -32,7 +32,7 @@ public CdnCustomDomainsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs index d60de8d40354..ae2ae93efe60 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public CdnEndpointsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs index 6d7ce13643e6..00b19840d1da 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnManagementRestOperations.cs @@ -32,7 +32,7 @@ public CdnManagementRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs index 38c018b2b8be..bc2794816066 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginGroupsRestOperations.cs @@ -32,7 +32,7 @@ public CdnOriginGroupsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs index 67892ad8d9e2..447d33e80438 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/CdnOriginsRestOperations.cs @@ -32,7 +32,7 @@ public CdnOriginsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs index 92d29c25bedc..2f5412f084c3 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/EdgeNodesRestOperations.cs @@ -32,7 +32,7 @@ public EdgeNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs index 36492bbd6595..dde8182a452a 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorCustomDomainsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorCustomDomainsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists existing AzureFrontDoor domains. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync( /// Lists existing AzureFrontDoor domains. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscript /// Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -279,7 +279,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new domain within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// Domain properties. /// The cancellation token to use. @@ -309,7 +309,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new domain within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// Domain properties. /// The cancellation token to use. @@ -381,7 +381,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing domain within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// Domain properties. /// The cancellation token to use. @@ -410,7 +410,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing domain within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// Domain properties. /// The cancellation token to use. @@ -477,7 +477,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -505,7 +505,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -573,7 +573,7 @@ internal HttpMessage CreateRefreshValidationTokenRequest(string subscriptionId, /// Updates the domain validation token. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -600,7 +600,7 @@ public async Task RefreshValidationTokenAsync(string subscriptionId, s /// Updates the domain validation token. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the domain under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -650,7 +650,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -681,7 +681,7 @@ public async Task> ListByProfileNextPa /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs index e29da002820f..cd2f553d1bae 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorEndpointsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorEndpointsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists existing AzureFrontDoor endpoints. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync(stri /// Lists existing AzureFrontDoor endpoints. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscriptionI /// Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -279,7 +279,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Endpoint properties. /// The cancellation token to use. @@ -309,7 +309,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Endpoint properties. /// The cancellation token to use. @@ -381,7 +381,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Endpoint update properties. /// The cancellation token to use. @@ -410,7 +410,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. Only tags can be updated after creating an endpoint. To update origins, use the Update Origin operation. To update origin groups, use the Update Origin group operation. To update domains, use the Update Custom Domain operation. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Endpoint update properties. /// The cancellation token to use. @@ -477,7 +477,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -505,7 +505,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -577,7 +577,7 @@ internal HttpMessage CreatePurgeContentRequest(string subscriptionId, string res /// Removes a content from AzureFrontDoor. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The list of paths to the content and the list of linked domains to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. /// The cancellation token to use. @@ -606,7 +606,7 @@ public async Task PurgeContentAsync(string subscriptionId, string reso /// Removes a content from AzureFrontDoor. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The list of paths to the content and the list of linked domains to be purged. Path can be a full URL, e.g. '/pictures/city.png' which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders and files in the directory. /// The cancellation token to use. @@ -675,7 +675,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -706,7 +706,7 @@ public async Task> ListResourceUsageAsync(string subs /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -781,7 +781,7 @@ internal HttpMessage CreateValidateCustomDomainRequest(string subscriptionId, st /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Custom domain to be validated. /// The cancellation token to use. @@ -814,7 +814,7 @@ public async Task> ValidateCustomDomainAsyn /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Custom domain to be validated. /// The cancellation token to use. @@ -870,7 +870,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -901,7 +901,7 @@ public async Task> ListByProfileNextPageAs /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -954,7 +954,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. @@ -987,7 +987,7 @@ public async Task> ListResourceUsageNextPageAsync(str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs index 0384e2ca1873..8989d5ef2793 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginGroupsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorOriginGroupsRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists all of the existing origin groups within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync(s /// Lists all of the existing origin groups within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscripti /// Gets an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , or is null. @@ -279,7 +279,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new origin group within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// Origin group properties. /// The cancellation token to use. @@ -309,7 +309,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new origin group within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// Origin group properties. /// The cancellation token to use. @@ -381,7 +381,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Origin group properties. /// The cancellation token to use. @@ -410,7 +410,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Origin group properties. /// The cancellation token to use. @@ -477,7 +477,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , or is null. @@ -505,7 +505,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing origin group within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , or is null. @@ -573,7 +573,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , or is null. @@ -604,7 +604,7 @@ public async Task> ListResourceUsageAsync(string subs /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , or is null. @@ -658,7 +658,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -689,7 +689,7 @@ public async Task> ListByProfileNextPag /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -742,7 +742,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , , or is null. @@ -775,7 +775,7 @@ public async Task> ListResourceUsageNextPageAsync(str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the endpoint. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs index 89700d346b3c..12cb45f0bc8e 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorOriginsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorOriginsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,7 +79,7 @@ internal HttpMessage CreateListByOriginGroupRequest(string subscriptionId, strin /// Lists all of the existing origins within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , or is null. @@ -110,7 +110,7 @@ public async Task> ListByOriginGroupAsync(st /// Lists all of the existing origins within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , or is null. @@ -183,7 +183,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// The cancellation token to use. @@ -218,7 +218,7 @@ public async Task> GetAsync(string subscriptionId, /// Gets an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// The cancellation token to use. @@ -299,7 +299,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new origin within the specified origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin that is unique within the profile. /// Origin properties. @@ -331,7 +331,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new origin within the specified origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin that is unique within the profile. /// Origin properties. @@ -409,7 +409,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// Origin properties. @@ -440,7 +440,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// Origin properties. @@ -513,7 +513,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// The cancellation token to use. @@ -543,7 +543,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing origin within an origin group. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// Name of the origin which is unique within the profile. /// The cancellation token to use. @@ -596,7 +596,7 @@ internal HttpMessage CreateListByOriginGroupNextPageRequest(string nextLink, str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , , or is null. @@ -629,7 +629,7 @@ public async Task> ListByOriginGroupNextPage /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the origin group which is unique within the profile. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs index 02c2cf44b412..80b119eb6629 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorProfilesRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorProfilesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -177,7 +177,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -206,7 +206,7 @@ public async Task> ListResourceUsageAsync(string subs /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -275,7 +275,7 @@ internal HttpMessage CreateCheckHostNameAvailabilityRequest(string subscriptionI /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Custom domain to be validated. /// The cancellation token to use. /// , , or is null. @@ -306,7 +306,7 @@ public async Task> CheckHostNameAvailability /// Validates the custom domain mapping to ensure it maps to the correct Azure Front Door endpoint in DNS. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Custom domain to be validated. /// The cancellation token to use. /// , , or is null. @@ -556,7 +556,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -587,7 +587,7 @@ public async Task> ListResourceUsageNextPageAsync(str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs index 486b355be9a2..1dd5069861f4 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRoutesRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorRoutesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,7 +79,7 @@ internal HttpMessage CreateListByEndpointRequest(string subscriptionId, string r /// Lists all of the existing origins within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -110,7 +110,7 @@ public async Task> ListByEndpointAsync(string subscrip /// Lists all of the existing origins within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -183,7 +183,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// The cancellation token to use. @@ -218,7 +218,7 @@ public async Task> GetAsync(string subscriptionId, /// Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// The cancellation token to use. @@ -299,7 +299,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// Route properties. @@ -331,7 +331,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// Route properties. @@ -409,7 +409,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// Route update properties. @@ -440,7 +440,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// Route update properties. @@ -513,7 +513,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// The cancellation token to use. @@ -543,7 +543,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// Name of the routing rule. /// The cancellation token to use. @@ -596,7 +596,7 @@ internal HttpMessage CreateListByEndpointNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. @@ -629,7 +629,7 @@ public async Task> ListByEndpointNextPageAsync(string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the endpoint under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs index 86321e8edb1d..23d353da4abb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRuleSetsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorRuleSetsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists existing AzureFrontDoor rule sets within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync(string subscri /// Lists existing AzureFrontDoor rule sets within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscriptionId /// Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -275,7 +275,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new rule set within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -307,7 +307,7 @@ public async Task> CreateAsync(string subscriptio /// Creates a new rule set within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -377,7 +377,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -405,7 +405,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -473,7 +473,7 @@ internal HttpMessage CreateListResourceUsageRequest(string subscriptionId, strin /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -504,7 +504,7 @@ public async Task> ListResourceUsageAsync(string subs /// Checks the quota and actual usage of endpoints under the given Azure Front Door profile.. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , or is null. @@ -558,7 +558,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -589,7 +589,7 @@ public async Task> ListByProfileNextPageAsync(string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -642,7 +642,7 @@ internal HttpMessage CreateListResourceUsageNextPageRequest(string nextLink, str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. @@ -675,7 +675,7 @@ public async Task> ListResourceUsageNextPageAsync(str /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile which is unique globally. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs index 23b155f7c305..361718d4b48c 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorRulesRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -79,7 +79,7 @@ internal HttpMessage CreateListByRuleSetRequest(string subscriptionId, string re /// Lists all of the existing delivery rules within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// The cancellation token to use. /// , , or is null. @@ -110,7 +110,7 @@ public async Task> ListByRuleSetAsync(string subscripti /// Lists all of the existing delivery rules within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// The cancellation token to use. /// , , or is null. @@ -183,7 +183,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The cancellation token to use. @@ -218,7 +218,7 @@ public async Task> GetAsync(string subscriptionId, s /// Gets an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The cancellation token to use. @@ -299,7 +299,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new delivery rule within the specified rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The delivery rule properties. @@ -331,7 +331,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new delivery rule within the specified rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The delivery rule properties. @@ -409,7 +409,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// Delivery rule properties. @@ -440,7 +440,7 @@ public async Task UpdateAsync(string subscriptionId, string resourceGr /// Updates an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// Delivery rule properties. @@ -513,7 +513,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The cancellation token to use. @@ -543,7 +543,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing delivery rule within a rule set. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// Name of the delivery rule which is unique within the endpoint. /// The cancellation token to use. @@ -596,7 +596,7 @@ internal HttpMessage CreateListByRuleSetNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// The cancellation token to use. /// , , , or is null. @@ -629,7 +629,7 @@ public async Task> ListByRuleSetNextPageAsync(string ne /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the rule set under the profile. /// The cancellation token to use. /// , , , or is null. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs index 33bf4532e3ec..ddaca81850fb 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecretsRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorSecretsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists existing AzureFrontDoor secrets. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync(string subscrip /// Lists existing AzureFrontDoor secrets. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing Secret within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscriptionId, /// Gets an existing Secret within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The cancellation token to use. /// , , or is null. @@ -279,7 +279,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new Secret within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The Secret properties. /// The cancellation token to use. @@ -309,7 +309,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new Secret within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The Secret properties. /// The cancellation token to use. @@ -377,7 +377,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing Secret within profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The cancellation token to use. /// , , or is null. @@ -405,7 +405,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing Secret within profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the Secret under the profile. /// The cancellation token to use. /// , , or is null. @@ -456,7 +456,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -487,7 +487,7 @@ public async Task> ListByProfileNextPageAsync(string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs index d8fa473852bd..e66967eba470 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/FrontDoorSecurityPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public FrontDoorSecurityPoliciesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -75,7 +75,7 @@ internal HttpMessage CreateListByProfileRequest(string subscriptionId, string re /// Lists security policies associated with the profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -104,7 +104,7 @@ public async Task> ListByProfileAsync(string /// Lists security policies associated with the profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -171,7 +171,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Gets an existing security policy within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The cancellation token to use. /// , , or is null. @@ -204,7 +204,7 @@ public async Task> GetAsync(string subscri /// Gets an existing security policy within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The cancellation token to use. /// , , or is null. @@ -279,7 +279,7 @@ internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceG /// Creates a new security policy within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The security policy properties. /// The cancellation token to use. @@ -309,7 +309,7 @@ public async Task CreateAsync(string subscriptionId, string resourceGr /// Creates a new security policy within the specified profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The security policy properties. /// The cancellation token to use. @@ -381,7 +381,7 @@ internal HttpMessage CreatePatchRequest(string subscriptionId, string resourceGr /// Updates an existing security policy within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// Security policy update properties. /// The cancellation token to use. @@ -410,7 +410,7 @@ public async Task PatchAsync(string subscriptionId, string resourceGro /// Updates an existing security policy within a profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// Security policy update properties. /// The cancellation token to use. @@ -477,7 +477,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Deletes an existing security policy within profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The cancellation token to use. /// , , or is null. @@ -505,7 +505,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Deletes an existing security policy within profile. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// Name of the security policy under the profile. /// The cancellation token to use. /// , , or is null. @@ -556,7 +556,7 @@ internal HttpMessage CreateListByProfileNextPageRequest(string nextLink, string /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -587,7 +587,7 @@ public async Task> ListByProfileNextPageAsync /// The URL to the next page of results. /// Azure Subscription ID. /// Name of the Resource group within the Azure subscription. - /// Name of the Azure Front Door Standard or Azure Front Door Premium profile which is unique within the resource group. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs index e9bc709fbcc5..1c6e0799a5bf 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/LogAnalyticsRestOperations.cs @@ -33,7 +33,7 @@ public LogAnalyticsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs index 3debcce3414a..b23b95dcdb7b 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedRuleSetsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs index 4ed05f06f0ba..7a36606a79c7 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/PoliciesRestOperations.cs @@ -32,7 +32,7 @@ public PoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs index fb1894784908..3629debeb604 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ProfilesRestOperations.cs @@ -32,7 +32,7 @@ public ProfilesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1108,6 +1108,270 @@ public Response ListResourceUsage(string subscriptionId } } + internal RequestUriBuilder CreateCdnCanMigrateToAfdRequestUri(string subscriptionId, string resourceGroupName, string profileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/cdnCanMigrateToAfd", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCdnCanMigrateToAfdRequest(string subscriptionId, string resourceGroupName, string profileName) + { + 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.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/cdnCanMigrateToAfd", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CdnCanMigrateToAfdAsync(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateCdnCanMigrateToAfdRequest(subscriptionId, resourceGroupName, profileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Checks if CDN profile can be migrated to Azure Frontdoor(Standard/Premium) profile. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CdnCanMigrateToAfd(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateCdnCanMigrateToAfdRequest(subscriptionId, resourceGroupName, profileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCdnMigrateToAfdRequestUri(string subscriptionId, string resourceGroupName, string profileName, CdnMigrationToAfdContent 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.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/cdnMigrateToAfd", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCdnMigrateToAfdRequest(string subscriptionId, string resourceGroupName, string profileName, CdnMigrationToAfdContent 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.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/cdnMigrateToAfd", 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; + } + + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for migration and will be followed by Commit to finalize the migration. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task CdnMigrateToAfdAsync(string subscriptionId, string resourceGroupName, string profileName, CdnMigrationToAfdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCdnMigrateToAfdRequest(subscriptionId, resourceGroupName, profileName, 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); + } + } + + /// Migrate the CDN profile to Azure Frontdoor(Standard/Premium) profile. This step prepares the profile for migration and will be followed by Commit to finalize the migration. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// Properties needed to migrate the profile. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response CdnMigrateToAfd(string subscriptionId, string resourceGroupName, string profileName, CdnMigrationToAfdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateCdnMigrateToAfdRequest(subscriptionId, resourceGroupName, profileName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateMigrationAbortRequestUri(string subscriptionId, string resourceGroupName, string profileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/migrationAbort", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateMigrationAbortRequest(string subscriptionId, string resourceGroupName, string profileName) + { + 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.Cdn/profiles/", false); + uri.AppendPath(profileName, true); + uri.AppendPath("/migrationAbort", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Abort the migration to Azure Frontdoor Premium/Standard. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task MigrationAbortAsync(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateMigrationAbortRequest(subscriptionId, resourceGroupName, profileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Abort the migration to Azure Frontdoor Premium/Standard. + /// Azure Subscription ID. + /// The name of the resource group. The name is case insensitive. + /// Name of the Azure Front Door Standard or Azure Front Door Premium which is unique within the resource group. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response MigrationAbort(string subscriptionId, string resourceGroupName, string profileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(profileName, nameof(profileName)); + + using var message = CreateMigrationAbortRequest(subscriptionId, resourceGroupName, profileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs index cbf3e0b3516a..88d17665e058 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/Generated/RestOperations/ResourceUsageRestOperations.cs @@ -32,7 +32,7 @@ public ResourceUsageRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-04-15"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md index 733a9e588626..92f99eeb35f2 100644 --- a/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md +++ b/sdk/cdn/Azure.ResourceManager.Cdn/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true library-name: Cdn namespace: Azure.ResourceManager.Cdn title: CdnManagementClient -require: https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/cdn/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/0cdef1ef00cf9020967dc099a67366d5a2c51d29/specification/cdn/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: @@ -19,11 +19,12 @@ sample-gen: skip-csproj: true modelerfour: flatten-payloads: false + lenient-model-deduplication: true use-model-reader-writer: true deserialize-null-collection-as-null-value: true -# mgmt-debug: -# show-serialized-names: true +mgmt-debug: + show-serialized-names: true operation-id-mappings: CdnEndpoint: @@ -94,6 +95,9 @@ override-operation-name: FrontDoorEndpoints_ListResourceUsage: GetResourceUsages FrontDoorOriginGroups_ListResourceUsage: GetResourceUsages FrontDoorRuleSets_ListResourceUsage: GetResourceUsages + Profiles_CdnCanMigrateToAfd: CheckCdnMigrationCompatibility + Profiles_CdnMigrateToAfd: MigrateCdnToAfd + Profiles_MigrationAbort: AbortMigration rename-mapping: CacheType: CdnCacheLevel @@ -347,6 +351,16 @@ rename-mapping: AFDDomainUpdateParameters.properties.preValidatedCustomDomainResourceId: PreValidatedCustomDomainResource UsageUnit: FrontDoorUsageUnit Status: ValidationStatus + DeliveryRuleActionParameters: DeliveryRuleActionProperties + DeliveryRuleConditionParameters: DeliveryRuleConditionProperties + CertificateSourceParameters: CertificateSourceProperties + CanMigrateResult.id: ResourceId + MigrateResult.id: ResourceId + IsDeviceMatchValue: IsDeviceMatchConditionMatchValue + KeyVaultSigningKeyParametersType: KeyVaultSigningKeyType + RequestMethodMatchValue: RequestMethodMatchConditionMatchValue + RequestSchemeMatchValue: RequestSchemeMatchConditionMatchValue + KeyVaultSigningKeyParametersType.KeyVaultSigningKeyParameters: KeyVaultSigningKey directive: - from: swagger-document diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/CHANGELOG.md b/sdk/chaos/Azure.ResourceManager.Chaos/CHANGELOG.md index c64d646497e2..bb93ee280743 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/CHANGELOG.md +++ b/sdk/chaos/Azure.ResourceManager.Chaos/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.4 (Unreleased) +## 1.2.0-beta.1 (Unreleased) ### Features Added @@ -10,11 +10,17 @@ ### Other Changes +## 1.1.0 (2025-05-22) + +### Features Added + + - Update API version to 2025-01-01. + ## 1.1.0-beta.3 (2025-05-01) ### Features Added -- Exposed new property in Capability Type resource: "requiredAzureRoleDefinitionIds" +- Exposed new property in Capability Type resource: "requiredAzureRoleDefinitionIds". ## 1.1.0-beta.2 (2025-03-11) @@ -26,8 +32,8 @@ ### Features Added - - Update API version to 2024-01-01 - - Add Tags Support for Experiment resource + - Update API version to 2024-01-01. + - Add Tags Support for Experiment resource. ## 1.0.0 (2024-01-17) @@ -35,7 +41,7 @@ This is the first stable release of Chaos client library. ### Features Added -- Update API version to 2023-11-01 +- Update API version to 2023-11-01. - Enable the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. ### Other Changes diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Azure.ResourceManager.Chaos.csproj b/sdk/chaos/Azure.ResourceManager.Chaos/src/Azure.ResourceManager.Chaos.csproj index 3fee61af198d..7d1c19cd3c7c 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Azure.ResourceManager.Chaos.csproj +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Azure.ResourceManager.Chaos.csproj @@ -1,8 +1,8 @@ - 1.1.0-beta.4 + 1.2.0-beta.1 - 1.0.0 + 1.1.0 Azure.ResourceManager.Chaos Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Chaos. azure;management;arm;resource manager;chaos diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs index 0ce8924e5b52..2f4531f685e9 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ArmChaosModelFactory.cs @@ -16,96 +16,6 @@ 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. @@ -269,6 +179,96 @@ 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/ChaosCapabilityMetadataResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityMetadataResource.Serialization.cs index 3854d9e27578..4edfb1f3c336 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityMetadataResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosCapabilityMetadataResource : IJsonModel { + private static ChaosCapabilityMetadataData s_dataDeserializationInstance; + private static ChaosCapabilityMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosCapabilityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosCapabilityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosCapabilityMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityResource.Serialization.cs index e8511124d1ca..56c03ad97563 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosCapabilityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosCapabilityResource : IJsonModel { + private static ChaosCapabilityData s_dataDeserializationInstance; + private static ChaosCapabilityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosCapabilityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentExecutionResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentExecutionResource.Serialization.cs index 5a1641789770..9b996bcec790 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentExecutionResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentExecutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosExperimentExecutionResource : IJsonModel { + private static ChaosExperimentExecutionData s_dataDeserializationInstance; + private static ChaosExperimentExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosExperimentExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosExperimentExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosExperimentExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentResource.Serialization.cs index 0c4dadbd8769..313d798953c7 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosExperimentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosExperimentResource : IJsonModel { + private static ChaosExperimentData s_dataDeserializationInstance; + private static ChaosExperimentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosExperimentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosExperimentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosExperimentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetMetadataResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetMetadataResource.Serialization.cs index 1ca08914fef2..16c03af06593 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetMetadataResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosTargetMetadataResource : IJsonModel { + private static ChaosTargetMetadataData s_dataDeserializationInstance; + private static ChaosTargetMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosTargetMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosTargetMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosTargetMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetResource.Serialization.cs b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetResource.Serialization.cs index 31ddede20e3a..37bcaa880ca7 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetResource.Serialization.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/ChaosTargetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Chaos { public partial class ChaosTargetResource : IJsonModel { + private static ChaosTargetData s_dataDeserializationInstance; + private static ChaosTargetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChaosTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChaosTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerChaosContext.Default); ChaosTargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerChaosContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } 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 bde87645dcfa..65035cd09983 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 ChaosCapabilityResource GetChaosCapabilityResource(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).GetChaosCapabilityResource(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); } /// - /// 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 ChaosCapabilityResource GetChaosCapabilityResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableChaosArmClient(client).GetChaosCapabilityMetadataResource(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 ChaosExperimentResource GetChaosExperimentResource(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).GetChaosExperimentResource(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 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); } /// @@ -147,36 +147,32 @@ public static ChaosTargetMetadataResource GetChaosTargetMetadataResource(this Ar } /// - /// 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 @@ -184,40 +180,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 @@ -225,57 +218,58 @@ 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); } /// - /// 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 @@ -283,37 +277,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 @@ -321,25 +318,28 @@ 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); } /// 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 6322b0fa68f5..345f0e6e0fd3 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosArmClient.cs @@ -35,63 +35,63 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// 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 ChaosCapabilityResource GetChaosCapabilityResource(ResourceIdentifier id) + /// Returns a object. + public virtual ChaosExperimentResource GetChaosExperimentResource(ResourceIdentifier id) { - ChaosCapabilityResource.ValidateResourceId(id); - return new ChaosCapabilityResource(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. + /// 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 ChaosExperimentExecutionResource GetChaosExperimentExecutionResource(ResourceIdentifier id) { - ChaosTargetResource.ValidateResourceId(id); - return new ChaosTargetResource(Client, 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. + /// 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 ChaosCapabilityMetadataResource GetChaosCapabilityMetadataResource(ResourceIdentifier id) + /// Returns a object. + public virtual ChaosCapabilityResource GetChaosCapabilityResource(ResourceIdentifier id) { - ChaosCapabilityMetadataResource.ValidateResourceId(id); - return new ChaosCapabilityMetadataResource(Client, id); + ChaosCapabilityResource.ValidateResourceId(id); + 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. + /// 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) + /// Returns a object. + public virtual ChaosCapabilityMetadataResource GetChaosCapabilityMetadataResource(ResourceIdentifier id) { - ChaosExperimentResource.ValidateResourceId(id); - return new ChaosExperimentResource(Client, id); + ChaosCapabilityMetadataResource.ValidateResourceId(id); + return new ChaosCapabilityMetadataResource(Client, id); } /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// 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) + /// Returns a object. + public virtual ChaosTargetResource GetChaosTargetResource(ResourceIdentifier id) { - ChaosExperimentExecutionResource.ValidateResourceId(id); - return new ChaosExperimentExecutionResource(Client, id); + ChaosTargetResource.ValidateResourceId(id); + return new ChaosTargetResource(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 17138759e7c2..65b3a4e48793 100644 --- a/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs +++ b/sdk/chaos/Azure.ResourceManager.Chaos/src/Generated/Extensions/MockableChaosResourceGroupResource.cs @@ -33,28 +33,23 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } - /// 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 @@ -62,33 +57,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 @@ -96,40 +88,42 @@ 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); } - /// 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 @@ -137,30 +131,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 @@ -168,18 +165,21 @@ 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); } } } diff --git a/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml b/sdk/chaos/Azure.ResourceManager.Chaos/tsp-location.yaml index 19889a1420ee..e6814d5ec895 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: fe26b288981160b839d6d50464f12757f5487721 +commit: b15e6baad78142745642047f29e7391ea37ab155 repo: Azure/azure-rest-api-specs \ No newline at end of file diff --git a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/DataGenerationConnectionInfoKind.cs b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/DataGenerationConnectionInfoKind.cs index e8d9d818b174..4a3f838b1704 100644 --- a/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/DataGenerationConnectionInfoKind.cs +++ b/sdk/cognitivelanguage/Azure.AI.Language.Text.Authoring/src/Generated/DataGenerationConnectionInfoKind.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Language.Text.Authoring { - /// The DataGenerationConnectionInfo_kind. + /// The DataGenerationConnectionInfoKind. public readonly partial struct DataGenerationConnectionInfoKind : IEquatable { private readonly string _value; diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountDeploymentResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountDeploymentResource.Serialization.cs index 09c2f59ea407..6be17ab6736a 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountDeploymentResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesAccountDeploymentResource : IJsonModel { + private static CognitiveServicesAccountDeploymentData s_dataDeserializationInstance; + private static CognitiveServicesAccountDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CognitiveServicesAccountDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CognitiveServicesAccountDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CognitiveServicesAccountDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountResource.Serialization.cs index 532d11c5af02..df08aee60f34 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesAccountResource : IJsonModel { + private static CognitiveServicesAccountData s_dataDeserializationInstance; + private static CognitiveServicesAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CognitiveServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CognitiveServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CognitiveServicesAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlanResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlanResource.Serialization.cs index 8a2d759fcd47..c3f6bd0e30bb 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlanResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesCommitmentPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesCommitmentPlanResource : IJsonModel { + private static CommitmentPlanData s_dataDeserializationInstance; + private static CommitmentPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommitmentPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommitmentPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CommitmentPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesDeletedAccountResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesDeletedAccountResource.Serialization.cs index 2e931be3faa8..c2c28852bac1 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesDeletedAccountResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesDeletedAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesDeletedAccountResource : IJsonModel { + private static CognitiveServicesAccountData s_dataDeserializationInstance; + private static CognitiveServicesAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CognitiveServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CognitiveServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CognitiveServicesAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesEncryptionScopeResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesEncryptionScopeResource.Serialization.cs index 8f6a43a952d1..c0861b029c74 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesEncryptionScopeResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesEncryptionScopeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesEncryptionScopeResource : IJsonModel { + private static CognitiveServicesEncryptionScopeData s_dataDeserializationInstance; + private static CognitiveServicesEncryptionScopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CognitiveServicesEncryptionScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CognitiveServicesEncryptionScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CognitiveServicesEncryptionScopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.Serialization.cs index 6c650cba4675..ad3ff24bb5c8 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CognitiveServicesPrivateEndpointConnectionResource : IJsonModel { + private static CognitiveServicesPrivateEndpointConnectionData s_dataDeserializationInstance; + private static CognitiveServicesPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CognitiveServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CognitiveServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CognitiveServicesPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanAccountAssociationResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanAccountAssociationResource.Serialization.cs index dc61d8d0be48..03f58dd9da49 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanAccountAssociationResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanAccountAssociationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CommitmentPlanAccountAssociationResource : IJsonModel { + private static CommitmentPlanAccountAssociationData s_dataDeserializationInstance; + private static CommitmentPlanAccountAssociationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommitmentPlanAccountAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommitmentPlanAccountAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CommitmentPlanAccountAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanResource.Serialization.cs index 93acdee76076..a2cf7eecc766 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CommitmentPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class CommitmentPlanResource : IJsonModel { + private static CommitmentPlanData s_dataDeserializationInstance; + private static CommitmentPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommitmentPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommitmentPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); CommitmentPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/DefenderForAISettingResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/DefenderForAISettingResource.Serialization.cs index d97a5f12c90a..721617715a95 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/DefenderForAISettingResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/DefenderForAISettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class DefenderForAISettingResource : IJsonModel { + private static DefenderForAISettingData s_dataDeserializationInstance; + private static DefenderForAISettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DefenderForAISettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DefenderForAISettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); DefenderForAISettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index 5cf8b401f36f..a3662fdac933 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistItemResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistItemResource.Serialization.cs index 2f0fd044b000..803c2cb6ce2e 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistItemResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class RaiBlocklistItemResource : IJsonModel { + private static RaiBlocklistItemData s_dataDeserializationInstance; + private static RaiBlocklistItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RaiBlocklistItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RaiBlocklistItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); RaiBlocklistItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistResource.Serialization.cs index b038217b5cd7..2272d9d430da 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiBlocklistResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class RaiBlocklistResource : IJsonModel { + private static RaiBlocklistData s_dataDeserializationInstance; + private static RaiBlocklistData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RaiBlocklistData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RaiBlocklistData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); RaiBlocklistData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiContentFilterResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiContentFilterResource.Serialization.cs index fc6556989fc4..279e853f656f 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiContentFilterResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiContentFilterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class RaiContentFilterResource : IJsonModel { + private static RaiContentFilterData s_dataDeserializationInstance; + private static RaiContentFilterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RaiContentFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RaiContentFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); RaiContentFilterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiPolicyResource.Serialization.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiPolicyResource.Serialization.cs index 02dc12978b40..78acf7c73d0c 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiPolicyResource.Serialization.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RaiPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CognitiveServices { public partial class RaiPolicyResource : IJsonModel { + private static RaiPolicyData s_dataDeserializationInstance; + private static RaiPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RaiPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RaiPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCognitiveServicesContext.Default); RaiPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCognitiveServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.net8.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.net8.0.cs index 81b21552acf8..62b23a95b172 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.net8.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.net8.0.cs @@ -823,10 +823,12 @@ public partial class CustomCallingContext { internal CustomCallingContext() { } public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } } + public Azure.Communication.CallAutomation.TeamsPhoneCallDetails TeamsPhoneCallDetails { get { throw null; } } public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } } public void AddSipUui(string value) { } public void AddSipX(string key, string value, Azure.Communication.CallAutomation.CustomCallingContext.SipHeaderPrefix prefix = Azure.Communication.CallAutomation.CustomCallingContext.SipHeaderPrefix.XMSCustom) { } public void AddVoip(string key, string value) { } + public void SetTeamsPhoneCallDetails(Azure.Communication.CallAutomation.TeamsPhoneCallDetails teamsPhoneCallDetails) { } public enum SipHeaderPrefix { XMSCustom = 0, @@ -1411,8 +1413,12 @@ public PlayToAllOptions(System.Collections.Generic.IEnumerable AdditionalCallerInformation { get { throw null; } } + public bool? IsAuthenticated { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string RecordId { get { throw null; } set { } } + public string ScreenPopUrl { get { throw null; } set { } } + public bool AddAdditionalCallerInformation(string key, string value) { throw null; } + } + public partial class TeamsPhoneSourceDetails + { + public TeamsPhoneSourceDetails(Azure.Communication.CommunicationIdentifier source, string language, string status) { } + public System.Collections.Generic.IDictionary IntendedTargets { get { throw null; } } + public string Language { get { throw null; } set { } } + public Azure.Communication.CommunicationIdentifier Source { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + public bool AddIntendedTargets(string key, Azure.Communication.CommunicationIdentifier target) { throw null; } + } public enum TextFormat { Display = 0, diff --git a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs index e80b952cf082..c36190d5985d 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/api/Azure.Communication.CallAutomation.netstandard2.0.cs @@ -822,10 +822,12 @@ public partial class CustomCallingContext { internal CustomCallingContext() { } public System.Collections.Generic.IDictionary SipHeaders { get { throw null; } } + public Azure.Communication.CallAutomation.TeamsPhoneCallDetails TeamsPhoneCallDetails { get { throw null; } } public System.Collections.Generic.IDictionary VoipHeaders { get { throw null; } } public void AddSipUui(string value) { } public void AddSipX(string key, string value, Azure.Communication.CallAutomation.CustomCallingContext.SipHeaderPrefix prefix = Azure.Communication.CallAutomation.CustomCallingContext.SipHeaderPrefix.XMSCustom) { } public void AddVoip(string key, string value) { } + public void SetTeamsPhoneCallDetails(Azure.Communication.CallAutomation.TeamsPhoneCallDetails teamsPhoneCallDetails) { } public enum SipHeaderPrefix { XMSCustom = 0, @@ -1410,8 +1412,12 @@ public PlayToAllOptions(System.Collections.Generic.IEnumerable AdditionalCallerInformation { get { throw null; } } + public bool? IsAuthenticated { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string RecordId { get { throw null; } set { } } + public string ScreenPopUrl { get { throw null; } set { } } + public bool AddAdditionalCallerInformation(string key, string value) { throw null; } + } + public partial class TeamsPhoneSourceDetails + { + public TeamsPhoneSourceDetails(Azure.Communication.CommunicationIdentifier source, string language, string status) { } + public System.Collections.Generic.IDictionary IntendedTargets { get { throw null; } } + public string Language { get { throw null; } set { } } + public Azure.Communication.CommunicationIdentifier Source { get { throw null; } set { } } + public string Status { get { throw null; } set { } } + public bool AddIntendedTargets(string key, Azure.Communication.CommunicationIdentifier target) { throw null; } + } public enum TextFormat { Display = 0, diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs index dc4a22c14b0d..fa0c73a956e6 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallAutomationClient.cs @@ -259,7 +259,8 @@ private AnswerCallRequestInternal CreateAnswerCallRequest(AnswerCallOptions opti request.OperationContext = options.OperationContext; request.CustomCallingContext = new CustomCallingContextInternal( options.CustomCallingContext?.VoipHeaders ?? new ChangeTrackingDictionary(), - options.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary()); + options.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary(), + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CustomCallingContext?.TeamsPhoneCallDetails)); return request; } @@ -295,8 +296,9 @@ public virtual async Task RedirectCallAsync(RedirectCallOptions option RedirectCallRequestInternal request = new RedirectCallRequestInternal(options.IncomingCallContext, CommunicationIdentifierSerializer.Serialize(options.CallInvite.Target)); request.CustomCallingContext = new CustomCallingContextInternal( - options.CallInvite.CustomCallingContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.VoipHeaders, - options.CallInvite.CustomCallingContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.SipHeaders); + options.CallInvite?.CustomCallingContext?.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite?.CustomCallingContext?.VoipHeaders, + options.CallInvite?.CustomCallingContext?.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite?.CustomCallingContext?.SipHeaders, + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CallInvite?.CustomCallingContext?.TeamsPhoneCallDetails)); return await AzureCommunicationServicesRestClient.RedirectCallAsync(request, cancellationToken).ConfigureAwait(false); } @@ -338,8 +340,9 @@ public virtual Response RedirectCall(RedirectCallOptions options, CancellationTo RedirectCallRequestInternal request = new RedirectCallRequestInternal(options.IncomingCallContext, CommunicationIdentifierSerializer.Serialize(options.CallInvite.Target)); request.CustomCallingContext = new CustomCallingContextInternal( - options.CallInvite.CustomCallingContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.VoipHeaders, - options.CallInvite.CustomCallingContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.SipHeaders); + options.CallInvite?.CustomCallingContext?.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.VoipHeaders, + options.CallInvite?.CustomCallingContext?.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.SipHeaders, + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CallInvite?.CustomCallingContext?.TeamsPhoneCallDetails)); return AzureCommunicationServicesRestClient.RedirectCall(request, cancellationToken); } @@ -729,8 +732,9 @@ private CreateCallRequestInternal CreateCallRequest(CreateCallOptions options) }; request.CustomCallingContext = new CustomCallingContextInternal( - options.CallInvite.CustomCallingContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.VoipHeaders, - options.CallInvite.CustomCallingContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.SipHeaders); + options.CallInvite?.CustomCallingContext?.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite?.CustomCallingContext?.VoipHeaders, + options.CallInvite?.CustomCallingContext?.SipHeaders == null ? new ChangeTrackingDictionary() : options.CallInvite.CustomCallingContext.SipHeaders, + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CallInvite?.CustomCallingContext?.TeamsPhoneCallDetails)); // Add CallIntelligenceOptions such as custom cognitive service domain name string cognitiveServicesEndpoint = options.CallIntelligenceOptions?.CognitiveServicesEndpoint?.AbsoluteUri; @@ -766,8 +770,9 @@ private CreateCallRequestInternal CreateCallRequest(CreateGroupCallOptions optio }; request.CustomCallingContext = new CustomCallingContextInternal( - options.CustomCallingContext.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CustomCallingContext.VoipHeaders, - options.CustomCallingContext.SipHeaders == null ? new ChangeTrackingDictionary() : options.CustomCallingContext.SipHeaders); + options.CustomCallingContext?.VoipHeaders == null ? new ChangeTrackingDictionary() : options.CustomCallingContext?.VoipHeaders, + options.CustomCallingContext?.SipHeaders == null ? new ChangeTrackingDictionary() : options.CustomCallingContext?.SipHeaders, + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CustomCallingContext?.TeamsPhoneCallDetails)); // Add CallIntelligenceOptions such as custom cognitive service domain name string cognitiveServicesEndpoint = options.CallIntelligenceOptions?.CognitiveServicesEndpoint?.AbsoluteUri; diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs index a412e2074cc9..a4ed1f21acc6 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CallConnection.cs @@ -284,7 +284,8 @@ private static TransferToParticipantRequestInternal CreateTransferToParticipantR { CustomCallingContext = new CustomCallingContextInternal( options.CustomCallingContext?.VoipHeaders ?? new ChangeTrackingDictionary(), - options.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary()), + options.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary(), + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.CustomCallingContext?.TeamsPhoneCallDetails)), OperationContext = options.OperationContext == default ? Guid.NewGuid().ToString() : options.OperationContext, Transferee = options.Transferee == default ? null : CommunicationIdentifierSerializer.Serialize(options.Transferee), OperationCallbackUri = options.OperationCallbackUri?.AbsoluteUri, @@ -387,8 +388,8 @@ private static AddParticipantRequestInternal CreateAddParticipantRequest(AddPart { CustomCallingContext = new CustomCallingContextInternal( options.ParticipantToAdd.CustomCallingContext?.VoipHeaders ?? new ChangeTrackingDictionary(), - options.ParticipantToAdd.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary() - ), + options.ParticipantToAdd.CustomCallingContext?.SipHeaders ?? new ChangeTrackingDictionary(), + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(options.ParticipantToAdd.CustomCallingContext?.TeamsPhoneCallDetails)), SourceCallerIdNumber = options.ParticipantToAdd.SourceCallerIdNumber == null ? null : new PhoneNumberIdentifierModel(options.ParticipantToAdd.SourceCallerIdNumber.PhoneNumber), diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/CustomCallContextHelpers.cs b/sdk/communication/Azure.Communication.CallAutomation/src/CustomCallContextHelpers.cs new file mode 100644 index 000000000000..0ed86641ac9f --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/CustomCallContextHelpers.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Linq; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + internal static class CustomCallContextHelpers + { + /// + /// Converts a public TeamsPhoneCallDetails instance to an internal TeamsPhoneCallDetailsInternal instance. + /// + /// The public TeamsPhoneCallDetails instance to convert. + /// + /// A new TeamsPhoneCallDetailsInternal instance containing the converted data, or null if the input is null. + /// + internal static TeamsPhoneCallDetailsInternal CreateTeamsPhoneCallDetailsInternal(TeamsPhoneCallDetails teamsPhoneCallDetails) + { + if (teamsPhoneCallDetails == null) + { + return null; + } + + return new TeamsPhoneCallDetailsInternal( + CreateTeamsPhoneCallerDetailsInternal(teamsPhoneCallDetails.TeamsPhoneCallerDetails), + CreateTeamsPhoneSourceDetailsInternal(teamsPhoneCallDetails.TeamsPhoneSourceDetails), + teamsPhoneCallDetails.SessionId, + teamsPhoneCallDetails.Intent, + teamsPhoneCallDetails.CallTopic, + teamsPhoneCallDetails.CallContext, + teamsPhoneCallDetails.TranscriptUrl, + teamsPhoneCallDetails.CallSentiment, + teamsPhoneCallDetails.SuggestedActions); + } + + /// + /// Converts a public TeamsPhoneCallerDetails instance to an internal TeamsPhoneCallerDetailsInternal instance. + /// + /// The public TeamsPhoneCallerDetails instance to convert. + /// + /// A new TeamsPhoneCallerDetailsInternal instance containing the converted data, or null if the input is null. + /// + internal static TeamsPhoneCallerDetailsInternal CreateTeamsPhoneCallerDetailsInternal(TeamsPhoneCallerDetails teamsPhoneCallerDetails) + { + if (teamsPhoneCallerDetails == null) + { + return null; + } + + return new TeamsPhoneCallerDetailsInternal( + CommunicationIdentifierSerializer.Serialize(teamsPhoneCallerDetails.Caller), + teamsPhoneCallerDetails.Name, + teamsPhoneCallerDetails.PhoneNumber, + teamsPhoneCallerDetails.RecordId, + teamsPhoneCallerDetails.ScreenPopUrl, + teamsPhoneCallerDetails.IsAuthenticated, + teamsPhoneCallerDetails.AdditionalCallerInformation); + } + + /// + /// Converts a public TeamsPhoneSourceDetails instance to an internal TeamsPhoneSourceDetailsInternal instance. + /// + /// The public TeamsPhoneSourceDetails instance to convert. + /// + /// A new TeamsPhoneSourceDetailsInternal instance containing the converted data, or null if the input is null. + /// + internal static TeamsPhoneSourceDetailsInternal CreateTeamsPhoneSourceDetailsInternal(TeamsPhoneSourceDetails teamsPhoneSourceDetails) + { + if (teamsPhoneSourceDetails == null) + { + return null; + } + + return new TeamsPhoneSourceDetailsInternal( + CommunicationIdentifierSerializer.Serialize(teamsPhoneSourceDetails.Source), + teamsPhoneSourceDetails.Language, + teamsPhoneSourceDetails.Status, + teamsPhoneSourceDetails.IntendedTargets?.ToDictionary( + pair => pair.Key, + pair => CommunicationIdentifierSerializer.Serialize(pair.Value)) + ); + } + + internal static TeamsPhoneCallDetails CreateTeamsPhoneCallDetails(TeamsPhoneCallDetailsInternal internalTeamsPhoneCallDetails) + { + if (internalTeamsPhoneCallDetails == null) + { + return null; + } + return new TeamsPhoneCallDetails( + CreateTeamsPhoneCallerDetails(internalTeamsPhoneCallDetails.TeamsPhoneCallerDetails), + CreateTeamsPhoneSourceDetails(internalTeamsPhoneCallDetails.TeamsPhoneSourceDetails), + internalTeamsPhoneCallDetails.SessionId, + internalTeamsPhoneCallDetails.Intent, + internalTeamsPhoneCallDetails.CallTopic, + internalTeamsPhoneCallDetails.CallContext, + internalTeamsPhoneCallDetails.TranscriptUrl, + internalTeamsPhoneCallDetails.CallSentiment, + internalTeamsPhoneCallDetails.SuggestedActions); + } + internal static TeamsPhoneCallerDetails CreateTeamsPhoneCallerDetails(TeamsPhoneCallerDetailsInternal internalTeamsPhoneCallerDetails) + { + if (internalTeamsPhoneCallerDetails == null) + { + return null; + } + return new TeamsPhoneCallerDetails( + CommunicationIdentifierSerializer.Deserialize(internalTeamsPhoneCallerDetails.Caller), + internalTeamsPhoneCallerDetails.Name, + internalTeamsPhoneCallerDetails.PhoneNumber, + internalTeamsPhoneCallerDetails.RecordId, + internalTeamsPhoneCallerDetails.ScreenPopUrl, + internalTeamsPhoneCallerDetails.IsAuthenticated, + internalTeamsPhoneCallerDetails.AdditionalCallerInformation + ); + } + internal static TeamsPhoneSourceDetails CreateTeamsPhoneSourceDetails(TeamsPhoneSourceDetailsInternal internalTeamsPhoneSourceDetails) + { + if (internalTeamsPhoneSourceDetails == null) + { + return null; + } + return new TeamsPhoneSourceDetails( + CommunicationIdentifierSerializer.Deserialize(internalTeamsPhoneSourceDetails.Source), + internalTeamsPhoneSourceDetails.Language, + internalTeamsPhoneSourceDetails.Status, + internalTeamsPhoneSourceDetails.IntendedTargets?.ToDictionary( + pair => pair.Key, + pair => CommunicationIdentifierSerializer.Deserialize(pair.Value)) + ); + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.Serialization.cs index 06372adb427b..35a869a51450 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.Serialization.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.Serialization.cs @@ -38,6 +38,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) } writer.WriteEndObject(); } + if (Optional.IsDefined(TeamsPhoneCallDetails)) + { + writer.WritePropertyName("teamsPhoneCallDetails"u8); + writer.WriteObjectValue(TeamsPhoneCallDetails); + } writer.WriteEndObject(); } @@ -49,6 +54,7 @@ internal static CustomCallingContextInternal DeserializeCustomCallingContextInte } IDictionary voipHeaders = default; IDictionary sipHeaders = default; + TeamsPhoneCallDetailsInternal teamsPhoneCallDetails = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("voipHeaders"u8)) @@ -79,8 +85,17 @@ internal static CustomCallingContextInternal DeserializeCustomCallingContextInte sipHeaders = dictionary; continue; } + if (property.NameEquals("teamsPhoneCallDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + teamsPhoneCallDetails = TeamsPhoneCallDetailsInternal.DeserializeTeamsPhoneCallDetailsInternal(property.Value); + continue; + } } - return new CustomCallingContextInternal(voipHeaders ?? new ChangeTrackingDictionary(), sipHeaders ?? new ChangeTrackingDictionary()); + return new CustomCallingContextInternal(voipHeaders ?? new ChangeTrackingDictionary(), sipHeaders ?? new ChangeTrackingDictionary(), teamsPhoneCallDetails); } /// Deserializes the model from a raw response. diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.cs index 9f7727dddbd1..bb8952514758 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/CustomCallingContextInternal.cs @@ -19,9 +19,22 @@ public CustomCallingContextInternal() SipHeaders = new ChangeTrackingDictionary(); } + /// Initializes a new instance of . + /// Custom calling context VoiP headers. + /// Custom calling context SIP headers. + /// Custom calling context TeamsPhoneCallDetails. + internal CustomCallingContextInternal(IDictionary voipHeaders, IDictionary sipHeaders, TeamsPhoneCallDetailsInternal teamsPhoneCallDetails) + { + VoipHeaders = voipHeaders; + SipHeaders = sipHeaders; + TeamsPhoneCallDetails = teamsPhoneCallDetails; + } + /// Custom calling context VoiP headers. public IDictionary VoipHeaders { get; } /// Custom calling context SIP headers. public IDictionary SipHeaders { get; } + /// Custom calling context TeamsPhoneCallDetails. + public TeamsPhoneCallDetailsInternal TeamsPhoneCallDetails { get; set; } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.Serialization.cs index 72d99042185b..1a0b40fe2b59 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.Serialization.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.Serialization.cs @@ -21,11 +21,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(CognitiveServicesEndpoint); } writer.WritePropertyName("transcription"u8); - writer.WriteObjectValue(Transcription); + writer.WriteObjectValue(Transcription); if (Optional.IsDefined(Summarization)) { writer.WritePropertyName("summarization"u8); - writer.WriteObjectValue(Summarization); + writer.WriteObjectValue(Summarization); } writer.WriteEndObject(); } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.cs index 5e0be51fd171..75356ba0c741 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/PostProcessingOptions.cs @@ -35,5 +35,9 @@ internal PostProcessingOptions(string cognitiveServicesEndpoint, TranscriptionSe Transcription = transcription; Summarization = summarization; } + /// Define options of the transcription for the post recording processing. + public TranscriptionSettings Transcription { get; } + /// Define options of the summarization for the post recording processing. + public SummarizationSettings Summarization { get; set; } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.Serialization.cs new file mode 100644 index 000000000000..05e3edf28191 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.Serialization.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + internal partial class TeamsPhoneCallDetailsInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(TeamsPhoneCallerDetails)) + { + writer.WritePropertyName("teamsPhoneCallerDetails"u8); + writer.WriteObjectValue(TeamsPhoneCallerDetails); + } + if (Optional.IsDefined(TeamsPhoneSourceDetails)) + { + writer.WritePropertyName("teamsPhoneSourceDetails"u8); + writer.WriteObjectValue(TeamsPhoneSourceDetails); + } + if (Optional.IsDefined(SessionId)) + { + writer.WritePropertyName("sessionId"u8); + writer.WriteStringValue(SessionId); + } + if (Optional.IsDefined(Intent)) + { + writer.WritePropertyName("intent"u8); + writer.WriteStringValue(Intent); + } + if (Optional.IsDefined(CallTopic)) + { + writer.WritePropertyName("callTopic"u8); + writer.WriteStringValue(CallTopic); + } + if (Optional.IsDefined(CallContext)) + { + writer.WritePropertyName("callContext"u8); + writer.WriteStringValue(CallContext); + } + if (Optional.IsDefined(TranscriptUrl)) + { + writer.WritePropertyName("transcriptUrl"u8); + writer.WriteStringValue(TranscriptUrl); + } + if (Optional.IsDefined(CallSentiment)) + { + writer.WritePropertyName("callSentiment"u8); + writer.WriteStringValue(CallSentiment); + } + if (Optional.IsDefined(SuggestedActions)) + { + writer.WritePropertyName("suggestedActions"u8); + writer.WriteStringValue(SuggestedActions); + } + writer.WriteEndObject(); + } + + internal static TeamsPhoneCallDetailsInternal DeserializeTeamsPhoneCallDetailsInternal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + TeamsPhoneCallerDetailsInternal teamsPhoneCallerDetails = default; + TeamsPhoneSourceDetailsInternal teamsPhoneSourceDetails = default; + string sessionId = default; + string intent = default; + string callTopic = default; + string callContext = default; + string transcriptUrl = default; + string callSentiment = default; + string suggestedActions = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("teamsPhoneCallerDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + teamsPhoneCallerDetails = TeamsPhoneCallerDetailsInternal.DeserializeTeamsPhoneCallerDetailsInternal(property.Value); + continue; + } + if (property.NameEquals("teamsPhoneSourceDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + teamsPhoneSourceDetails = TeamsPhoneSourceDetailsInternal.DeserializeTeamsPhoneSourceDetailsInternal(property.Value); + continue; + } + if (property.NameEquals("sessionId"u8)) + { + sessionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("intent"u8)) + { + intent = property.Value.GetString(); + continue; + } + if (property.NameEquals("callTopic"u8)) + { + callTopic = property.Value.GetString(); + continue; + } + if (property.NameEquals("callContext"u8)) + { + callContext = property.Value.GetString(); + continue; + } + if (property.NameEquals("transcriptUrl"u8)) + { + transcriptUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("callSentiment"u8)) + { + callSentiment = property.Value.GetString(); + continue; + } + if (property.NameEquals("suggestedActions"u8)) + { + suggestedActions = property.Value.GetString(); + continue; + } + } + return new TeamsPhoneCallDetailsInternal( + teamsPhoneCallerDetails, + teamsPhoneSourceDetails, + sessionId, + intent, + callTopic, + callContext, + transcriptUrl, + callSentiment, + suggestedActions); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TeamsPhoneCallDetailsInternal FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTeamsPhoneCallDetailsInternal(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.cs new file mode 100644 index 000000000000..949624a647e3 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallDetailsInternal.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Communication.CallAutomation +{ + /// The call details which will be sent to the target. + internal partial class TeamsPhoneCallDetailsInternal + { + /// Initializes a new instance of . + public TeamsPhoneCallDetailsInternal() + { + } + + /// Initializes a new instance of . + /// Container for details relating to the original caller of the call. + /// Container for details relating to the entity responsible for the creation of these call details. + /// Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. + /// The intent of the call. + /// A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification. + /// A summary of the call thus far. It will be displayed on a side panel in the Teams UI. + /// Url for fetching the transcript of the call. + /// Sentiment of the call thus far. + /// Recommendations for resolving the issue based on the customer’s intent and interaction history. + internal TeamsPhoneCallDetailsInternal(TeamsPhoneCallerDetailsInternal teamsPhoneCallerDetails, TeamsPhoneSourceDetailsInternal teamsPhoneSourceDetails, string sessionId, string intent, string callTopic, string callContext, string transcriptUrl, string callSentiment, string suggestedActions) + { + TeamsPhoneCallerDetails = teamsPhoneCallerDetails; + TeamsPhoneSourceDetails = teamsPhoneSourceDetails; + SessionId = sessionId; + Intent = intent; + CallTopic = callTopic; + CallContext = callContext; + TranscriptUrl = transcriptUrl; + CallSentiment = callSentiment; + SuggestedActions = suggestedActions; + } + + /// Container for details relating to the original caller of the call. + public TeamsPhoneCallerDetailsInternal TeamsPhoneCallerDetails { get; set; } + /// Container for details relating to the entity responsible for the creation of these call details. + public TeamsPhoneSourceDetailsInternal TeamsPhoneSourceDetails { get; set; } + /// Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. + public string SessionId { get; set; } + /// The intent of the call. + public string Intent { get; set; } + /// A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification. + public string CallTopic { get; set; } + /// A summary of the call thus far. It will be displayed on a side panel in the Teams UI. + public string CallContext { get; set; } + /// Url for fetching the transcript of the call. + public string TranscriptUrl { get; set; } + /// Sentiment of the call thus far. + public string CallSentiment { get; set; } + /// Recommendations for resolving the issue based on the customer’s intent and interaction history. + public string SuggestedActions { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.Serialization.cs new file mode 100644 index 000000000000..3c4bd34dc19a --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + internal partial class TeamsPhoneCallerDetailsInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("caller"u8); + writer.WriteObjectValue(Caller); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + if (Optional.IsDefined(RecordId)) + { + writer.WritePropertyName("recordId"u8); + writer.WriteStringValue(RecordId); + } + if (Optional.IsDefined(ScreenPopUrl)) + { + writer.WritePropertyName("screenPopUrl"u8); + writer.WriteStringValue(ScreenPopUrl); + } + if (Optional.IsDefined(IsAuthenticated)) + { + writer.WritePropertyName("isAuthenticated"u8); + writer.WriteBooleanValue(IsAuthenticated.Value); + } + if (Optional.IsCollectionDefined(AdditionalCallerInformation)) + { + writer.WritePropertyName("additionalCallerInformation"u8); + writer.WriteStartObject(); + foreach (var item in AdditionalCallerInformation) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static TeamsPhoneCallerDetailsInternal DeserializeTeamsPhoneCallerDetailsInternal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel caller = default; + string name = default; + string phoneNumber = default; + string recordId = default; + string screenPopUrl = default; + bool? isAuthenticated = default; + IDictionary additionalCallerInformation = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("caller"u8)) + { + caller = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("recordId"u8)) + { + recordId = property.Value.GetString(); + continue; + } + if (property.NameEquals("screenPopUrl"u8)) + { + screenPopUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAuthenticated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAuthenticated = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("additionalCallerInformation"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()); + } + additionalCallerInformation = dictionary; + continue; + } + } + return new TeamsPhoneCallerDetailsInternal( + caller, + name, + phoneNumber, + recordId, + screenPopUrl, + isAuthenticated, + additionalCallerInformation ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TeamsPhoneCallerDetailsInternal FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTeamsPhoneCallerDetailsInternal(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.cs new file mode 100644 index 000000000000..6b23c9190c58 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneCallerDetailsInternal.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.Communication.CallAutomation +{ + /// Container for details relating to the original caller of the call. + internal partial class TeamsPhoneCallerDetailsInternal + { + /// Initializes a new instance of . + /// Caller's ID. + /// Caller's name. + /// Caller's phone number. + /// , or is null. + public TeamsPhoneCallerDetailsInternal(CommunicationIdentifierModel caller, string name, string phoneNumber) + { + Argument.AssertNotNull(caller, nameof(caller)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(phoneNumber, nameof(phoneNumber)); + + Caller = caller; + Name = name; + PhoneNumber = phoneNumber; + AdditionalCallerInformation = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Caller's ID. + /// Caller's name. + /// Caller's phone number. + /// Caller's record ID (ex in CRM). + /// Caller's screen pop URL. + /// Flag indicating whether the caller was authenticated. + /// A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to the Teams Client for display to the agent. + internal TeamsPhoneCallerDetailsInternal(CommunicationIdentifierModel caller, string name, string phoneNumber, string recordId, string screenPopUrl, bool? isAuthenticated, IDictionary additionalCallerInformation) + { + Caller = caller; + Name = name; + PhoneNumber = phoneNumber; + RecordId = recordId; + ScreenPopUrl = screenPopUrl; + IsAuthenticated = isAuthenticated; + AdditionalCallerInformation = additionalCallerInformation; + } + + /// Caller's ID. + public CommunicationIdentifierModel Caller { get; set; } + /// Caller's name. + public string Name { get; set; } + /// Caller's phone number. + public string PhoneNumber { get; set; } + /// Caller's record ID (ex in CRM). + public string RecordId { get; set; } + /// Caller's screen pop URL. + public string ScreenPopUrl { get; set; } + /// Flag indicating whether the caller was authenticated. + public bool? IsAuthenticated { get; set; } + /// A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to the Teams Client for display to the agent. + public IDictionary AdditionalCallerInformation { get; } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.Serialization.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.Serialization.cs new file mode 100644 index 000000000000..4282c0e96934 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + internal partial class TeamsPhoneSourceDetailsInternal : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("source"u8); + writer.WriteObjectValue(Source); + writer.WritePropertyName("language"u8); + writer.WriteStringValue(Language); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsCollectionDefined(IntendedTargets)) + { + writer.WritePropertyName("intendedTargets"u8); + writer.WriteStartObject(); + foreach (var item in IntendedTargets) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WriteEndObject(); + } + + internal static TeamsPhoneSourceDetailsInternal DeserializeTeamsPhoneSourceDetailsInternal(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel source = default; + string language = default; + string status = default; + IDictionary intendedTargets = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("language"u8)) + { + language = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("intendedTargets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property0.Value)); + } + intendedTargets = dictionary; + continue; + } + } + return new TeamsPhoneSourceDetailsInternal(source, language, status, intendedTargets ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static TeamsPhoneSourceDetailsInternal FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeTeamsPhoneSourceDetailsInternal(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.cs new file mode 100644 index 000000000000..bee6af0e134d --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Generated/Models/TeamsPhoneSourceDetailsInternal.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; + +namespace Azure.Communication.CallAutomation +{ + /// Container for details relating to the entity responsible for the creation of these call details. + internal partial class TeamsPhoneSourceDetailsInternal + { + /// Initializes a new instance of . + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + /// Status of the source entity passing along the call details. + /// , or is null. + public TeamsPhoneSourceDetailsInternal(CommunicationIdentifierModel source, string language, string status) + { + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(status, nameof(status)); + + Source = source; + Language = language; + Status = status; + IntendedTargets = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + /// Status of the source entity passing along the call details. + /// Intended targets of the source entity passing along the call details. + internal TeamsPhoneSourceDetailsInternal(CommunicationIdentifierModel source, string language, string status, IDictionary intendedTargets) + { + Source = source; + Language = language; + Status = status; + IntendedTargets = intendedTargets; + } + + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + public CommunicationIdentifierModel Source { get; set; } + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + public string Language { get; set; } + /// Status of the source entity passing along the call details. + public string Status { get; set; } + /// Intended targets of the source entity passing along the call details. + public IDictionary IntendedTargets { get; } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/AnswerCallOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/AnswerCallOptions.cs index 27c926dcf821..f94bb9801213 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/AnswerCallOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/AnswerCallOptions.cs @@ -20,7 +20,7 @@ public AnswerCallOptions(string incomingCallContext, Uri callbackUri) { IncomingCallContext = incomingCallContext; CallbackUri = callbackUri; - CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallAutomationModelFactory.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallAutomationModelFactory.cs index 456abdacb3f3..e0aa2c9dc943 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallAutomationModelFactory.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallAutomationModelFactory.cs @@ -655,7 +655,10 @@ public static IncomingCall IncomingCall(CommunicationIdentifier to = null, Commu @from == null ? null : CommunicationIdentifierSerializer.Serialize(@from), callerDisplayName, serverCallId, - customContext == null ? null : new CustomCallingContextInternal(customContext.VoipHeaders, customContext.SipHeaders), + customContext == null ? null : new CustomCallingContextInternal( + customContext.VoipHeaders, + customContext.SipHeaders, + CustomCallContextHelpers.CreateTeamsPhoneCallDetailsInternal(customContext.TeamsPhoneCallDetails)), incomingCallContext, onBehalfOfCallee == null ? null : CommunicationIdentifierSerializer.Serialize(onBehalfOfCallee), correlationId diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs index 47164e9ef3e2..a806023df2f8 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CallInvite.cs @@ -21,7 +21,7 @@ public CallInvite(PhoneNumberIdentifier targetPhoneNumberIdentity, PhoneNumberId { Target = targetPhoneNumberIdentity; SourceCallerIdNumber = callerIdNumber; - CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: null); + CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: null, teamsPhoneCallDetails:null); } /// @@ -32,7 +32,7 @@ public CallInvite(PhoneNumberIdentifier targetPhoneNumberIdentity, PhoneNumberId public CallInvite(CommunicationUserIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// @@ -43,7 +43,7 @@ public CallInvite(CommunicationUserIdentifier targetIdentity) public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// @@ -54,7 +54,7 @@ public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity) public CallInvite(MicrosoftTeamsAppIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs index edf4aa3a8934..0687c85def70 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CreateGroupCallOptions.cs @@ -18,7 +18,7 @@ public CreateGroupCallOptions(IEnumerable targets, Uri { Targets = targets; CallbackUri = callbackUri; - CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContext.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContext.cs index 216035bec8be..29b4539324f3 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContext.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContext.cs @@ -17,13 +17,17 @@ public class CustomCallingContext /// Dictionary of SIP headers. public IDictionary SipHeaders { get; } + /// Teams Phone Call Details. + public TeamsPhoneCallDetails TeamsPhoneCallDetails { get; internal set; } + /// /// Creates a new CustomCallingContext. /// - internal CustomCallingContext(IDictionary voipHeaders, IDictionary sipHeaders) + internal CustomCallingContext(IDictionary voipHeaders, IDictionary sipHeaders, TeamsPhoneCallDetails teamsPhoneCallDetails = null) { SipHeaders = sipHeaders ?? new ChangeTrackingDictionary(); VoipHeaders = voipHeaders ?? new ChangeTrackingDictionary(); + TeamsPhoneCallDetails = teamsPhoneCallDetails; } /// @@ -75,6 +79,17 @@ public void AddVoip(string key, string value) VoipHeaders.Add(key, value); } + /// + /// Sets Teams Phone Call Details for the custom calling context. + /// + /// Teams Phone Call Details to set. + /// is null. + public void SetTeamsPhoneCallDetails(TeamsPhoneCallDetails teamsPhoneCallDetails) + { + Argument.AssertNotNull(teamsPhoneCallDetails, nameof(teamsPhoneCallDetails)); + TeamsPhoneCallDetails = teamsPhoneCallDetails; + } + /// /// Enum representing the prefix to be used for SIP X headers. /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContextInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContextInternal.cs index 1e54cfc33e26..6b401034614d 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContextInternal.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/CustomCallingContextInternal.cs @@ -10,10 +10,5 @@ namespace Azure.Communication.CallAutomation [CodeGenModel("CustomCallingContext", Usage = new string[] { "output" }, Formats = new string[] { "json" })] internal partial class CustomCallingContextInternal { - public CustomCallingContextInternal(IDictionary voipHeaders, IDictionary sipHeaders) - { - SipHeaders = sipHeaders; - VoipHeaders = voipHeaders; - } } } diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/IncomingCall.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/IncomingCall.cs index 8ef413319eff..2726ec73ae0f 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/IncomingCall.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/Events/IncomingCall.cs @@ -23,7 +23,8 @@ internal IncomingCall(IncomingCallInternal internalEvent) From = CommunicationIdentifierSerializer.Deserialize(internalEvent.From); ServerCallId = internalEvent.ServerCallId; CallerDisplayName = internalEvent.CallerDisplayName; - CustomContext = new CustomCallingContext(internalEvent.CustomContext.VoipHeaders, internalEvent.CustomContext.SipHeaders); + CustomContext = new CustomCallingContext(internalEvent.CustomContext?.VoipHeaders, internalEvent.CustomContext?.SipHeaders, CustomCallContextHelpers.CreateTeamsPhoneCallDetails(internalEvent.CustomContext?.TeamsPhoneCallDetails)); + IncomingCallContext = internalEvent.IncomingCallContext; if (internalEvent.OnBehalfOfCallee != null) diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/PostProcessingOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/PostProcessingOptions.cs index d4086c52f550..4c680e12272a 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/PostProcessingOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/PostProcessingOptions.cs @@ -16,13 +16,13 @@ public partial class PostProcessingOptions /// Initializes a new instance of the class. /// public PostProcessingOptions( - string cognitiveServicesEndpoint, - SummarizationSettings summarization = null, - TranscriptionSettings transcription = null) + TranscriptionSettings transcriptionSettings, + SummarizationSettings summarizationSettings = null, + string cognitiveServicesEndpoint = null) { this.CognitiveServicesEndpoint = cognitiveServicesEndpoint; - this.Summarization = summarization; - this.Transcription = transcription; + this.SummarizationSettings = summarizationSettings; + this.TranscriptionSettings = transcriptionSettings; } /// @@ -31,9 +31,9 @@ public PostProcessingOptions( /// public string CognitiveServicesEndpoint { get; set; } /// Define options of the transcription for the post recording processing. - internal TranscriptionSettings Transcription { get; private set;} + public TranscriptionSettings TranscriptionSettings { get; set;} /// Define options of the summarization for the post recording processing. - internal SummarizationSettings Summarization { get; private set; } + public SummarizationSettings SummarizationSettings { get; set; } /// /// Set the transcription settings for the post recording processing. @@ -41,7 +41,7 @@ public PostProcessingOptions( /// public void setTranscriptionSettings(bool enableTranscription) { - this.Transcription = new TranscriptionSettings(enableTranscription); + this.TranscriptionSettings = new TranscriptionSettings(enableTranscription); } /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetails.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetails.cs new file mode 100644 index 000000000000..b2777dd735b6 --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetails.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + /// + /// TeamsPhoneCallDetails. + /// + public class TeamsPhoneCallDetails + { + /// Initializes a new instance of . + public TeamsPhoneCallDetails() + { + } + + /// Initializes a new instance of . + /// Container for details relating to the original caller of the call. + /// Container for details relating to the entity responsible for the creation of these call details. + /// Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. + /// The intent of the call. + /// A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification. + /// A summary of the call thus far. It will be displayed on a side panel in the Teams UI. + /// Url for fetching the transcript of the call. + /// Sentiment of the call thus far. + /// Recommendations for resolving the issue based on the customer�s intent and interaction history. + internal TeamsPhoneCallDetails(TeamsPhoneCallerDetails teamsPhoneCallerDetails, TeamsPhoneSourceDetails teamsPhoneSourceDetails, string sessionId, string intent, string callTopic, string callContext, string transcriptUrl, string callSentiment, string suggestedActions) + { + TeamsPhoneCallerDetails = teamsPhoneCallerDetails; + TeamsPhoneSourceDetails = teamsPhoneSourceDetails; + SessionId = sessionId; + Intent = intent; + CallTopic = callTopic; + CallContext = callContext; + TranscriptUrl = transcriptUrl; + CallSentiment = callSentiment; + SuggestedActions = suggestedActions; + } + + /// Container for details relating to the original caller of the call. + public TeamsPhoneCallerDetails TeamsPhoneCallerDetails { get; set; } + /// Container for details relating to the entity responsible for the creation of these call details. + public TeamsPhoneSourceDetails TeamsPhoneSourceDetails { get; set; } + /// Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. + public string SessionId { get; set; } + /// The intent of the call. + public string Intent { get; set; } + /// A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification. + public string CallTopic { get; set; } + /// A summary of the call thus far. It will be displayed on a side panel in the Teams UI. + public string CallContext { get; set; } + /// Url for fetching the transcript of the call. + public string TranscriptUrl { get; set; } + /// Sentiment of the call thus far. + public string CallSentiment { get; set; } + /// Recommendations for resolving the issue based on the customer�s intent and interaction history. + public string SuggestedActions { get; set; } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetailsInternal.cs new file mode 100644 index 000000000000..66f3fe34a1fd --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallDetailsInternal.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + [CodeGenModel("TeamsPhoneCallDetails", Usage = new string[] { "output" }, Formats = new string[] { "json" })] + internal partial class TeamsPhoneCallDetailsInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetails.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetails.cs new file mode 100644 index 000000000000..91146778a9da --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetails.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections; +using System.Collections.Generic; +using Azure.Core; +using Azure.Communication; + +namespace Azure.Communication.CallAutomation +{ + /// + /// TeamsPhoneCallerDetails. + /// + public class TeamsPhoneCallerDetails + { + /// Initializes a new instance of . + /// Caller's ID. + /// Caller's name. + /// Caller's phone number. + /// , or is null. + public TeamsPhoneCallerDetails(CommunicationIdentifier caller, string name, string phoneNumber) + { + Argument.AssertNotNull(caller, nameof(caller)); + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(phoneNumber, nameof(phoneNumber)); + Caller = caller; + Name = name; + PhoneNumber = phoneNumber; + AdditionalCallerInformation = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Caller's ID. + /// Caller's name. + /// Caller's phone number. + /// Caller's record ID (ex in CRM). + /// Caller's screen pop URL. + /// Flag indicating whether the caller was authenticated. + /// A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to the Teams Client for display to the agent. + internal TeamsPhoneCallerDetails(CommunicationIdentifier caller, string name, string phoneNumber, string recordId, string screenPopUrl, bool? isAuthenticated, IDictionary additionalCallerInformation) + { + Caller = caller; + Name = name; + PhoneNumber = phoneNumber; + RecordId = recordId; + ScreenPopUrl = screenPopUrl; + IsAuthenticated = isAuthenticated; + AdditionalCallerInformation = additionalCallerInformation; + } + + /// Caller's ID. + internal CommunicationIdentifier Caller { get; set; } + /// Caller's name. + public string Name { get; set; } + /// Caller's phone number. + public string PhoneNumber { get; set; } + /// Caller's record ID (ex in CRM). + public string RecordId { get; set; } + /// Caller's screen pop URL. + public string ScreenPopUrl { get; set; } + /// Flag indicating whether the caller was authenticated. + public bool? IsAuthenticated { get; set; } + /// A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to the Teams Client for display to the agent. + public IDictionary AdditionalCallerInformation { get; } + + /// + /// Adds a key-value pair to the AdditionalCallerInformation dictionary. + /// Will not add entries beyond the maximum limit of 10 items. + /// + /// The key for the caller information. + /// The value for the caller information. + /// True if the item was added, false if the dictionary already contains 10 items. + public bool AddAdditionalCallerInformation(string key, string value) + { + if (AdditionalCallerInformation.Count >= 10) + { + return false; + } + + AdditionalCallerInformation[key] = value; + return true; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetailsInternal.cs new file mode 100644 index 000000000000..820786250a2f --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneCallerDetailsInternal.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + [CodeGenModel("TeamsPhoneCallerDetails", Usage = new string[] { "output" }, Formats = new string[] { "json" })] + internal partial class TeamsPhoneCallerDetailsInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetails.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetails.cs new file mode 100644 index 000000000000..8e009adc0b2b --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetails.cs @@ -0,0 +1,73 @@ +// 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.Core; + +namespace Azure.Communication.CallAutomation +{ + /// + /// TeamsPhoneSourceDetails. + /// + public class TeamsPhoneSourceDetails + { + /// Initializes a new instance of . + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + /// Status of the source entity passing along the call details. + /// , or is null. + public TeamsPhoneSourceDetails(CommunicationIdentifier source, string language, string status) + { + Argument.AssertNotNull(source, nameof(source)); + Argument.AssertNotNull(language, nameof(language)); + Argument.AssertNotNull(status, nameof(status)); + Source = source; + Language = language; + Status = status; + IntendedTargets = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + /// Status of the source entity passing along the call details. + /// Intended targets of the source entity passing along the call details. + internal TeamsPhoneSourceDetails(CommunicationIdentifier source, string language, string status, IDictionary intendedTargets) + { + Source = source; + Language = language; + Status = status; + IntendedTargets = intendedTargets; + } + + /// ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA). + public CommunicationIdentifier Source { get; set; } + /// Language of the source entity passing along the call details, passed in the ISO-639 standard. + public string Language { get; set; } + /// Status of the source entity passing along the call details. + public string Status { get; set; } + /// Intended targets of the source entity passing along the call details. + public IDictionary IntendedTargets { get; } + + /// + /// Adds a key-value pair to the IntendedTargets dictionary. + /// Will not add entries beyond the maximum limit of 10 items. + /// + /// The key for the intended target. + /// The communication identifier for the intended target. + /// True if the item was added, false if the dictionary already contains 10 items. + public bool AddIntendedTargets(string key, CommunicationIdentifier target) + { + if (IntendedTargets.Count >= 10) + { + return false; + } + + IntendedTargets[key] = target; + return true; + } + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetailsInternal.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetailsInternal.cs new file mode 100644 index 000000000000..d25593858a2c --- /dev/null +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TeamsPhoneSourceDetailsInternal.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Communication.CallAutomation +{ + [CodeGenModel("TeamsPhoneSourceDetails", Usage = new string[] { "output" }, Formats = new string[] { "json" })] + internal partial class TeamsPhoneSourceDetailsInternal + { + } +} diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs index c753375ba453..7a7d6e26202a 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/src/Models/TransferToParticipantOptions.cs @@ -18,7 +18,7 @@ public class TransferToParticipantOptions public TransferToParticipantOptions(PhoneNumberIdentifier targetPhoneNumberIdentity) { Target = targetPhoneNumberIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: null); + CustomCallingContext = new CustomCallingContext(sipHeaders: new Dictionary(), voipHeaders: null, teamsPhoneCallDetails: null); } /// @@ -28,7 +28,7 @@ public TransferToParticipantOptions(PhoneNumberIdentifier targetPhoneNumberIdent public TransferToParticipantOptions(CommunicationUserIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// @@ -38,7 +38,7 @@ public TransferToParticipantOptions(CommunicationUserIdentifier targetIdentity) public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// @@ -48,7 +48,7 @@ public TransferToParticipantOptions(MicrosoftTeamsUserIdentifier targetIdentity) public TransferToParticipantOptions(MicrosoftTeamsAppIdentifier targetIdentity) { Target = targetIdentity; - CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary()); + CustomCallingContext = new CustomCallingContext(sipHeaders: null, voipHeaders: new Dictionary(), teamsPhoneCallDetails: null); } /// diff --git a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md index b3ad4b40df3a..4c1a26f62e4b 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md +++ b/sdk/communication/Azure.Communication.CallAutomation/src/autorest.md @@ -10,7 +10,7 @@ model-namespace: false tag: package-2024-09-01-preview require: - - https://github.com/Azure/azure-rest-api-specs/blob/7671cc026fbb52e2b0115c16e8fe7d4eaf717a42/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/1a08384511e96c42aaf18edd646baf01e5e5fc84/specification/communication/data-plane/CallAutomation/readme.md title: Azure Communication Services diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs index 7f013cdf2d5b..2fef1b1094cf 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallConnections/CallConnectionTests.cs @@ -213,6 +213,15 @@ public void TransferCallToParticipantWithTransferee_202Accepted(CallInvite callI verifyOperationContext(response); } + [TestCaseSource(nameof(TestData_TransferCallToParticipant_MicrosoftTeamsAppTarget_TeamsCallContext))] + public async Task TransferCallToParticipantAsync_simpleMethod_MicrosoftTeamsAppAsTarget_WithTeamsCallDetails_202Accepted(CallInvite callInvite) + { + var callConnection = CreateMockCallConnection(202, OperationContextPayload); + + var response = await callConnection.TransferCallToParticipantAsync(callInvite.Target).ConfigureAwait(false); + Assert.AreEqual((int)HttpStatusCode.Accepted, response.GetRawResponse().Status); + verifyOperationContext(response); + } [TestCaseSource(nameof(TestData_TransferCallToParticipant))] public void TransferCallToParticipantAsync_404NotFound(CallInvite callInvite) { @@ -595,6 +604,44 @@ private CallConnection CreateMockCallConnection(int responseCode, string? respon }; } + private static IEnumerable TestData_TransferCallToParticipant_MicrosoftTeamsAppTarget_TeamsCallContext() + { + var callInvite = new CallInvite(new MicrosoftTeamsAppIdentifier("teamsAppId123")); + callInvite.CustomCallingContext.AddVoip("teamsKey", "teamsValue"); + + // Create TeamsPhoneCallerDetails + var teamsPhoneCallerDetails = new TeamsPhoneCallerDetails((new MicrosoftTeamsAppIdentifier("teamsAppId123")), name: "John Doe", phoneNumber: "+14255551234"); + teamsPhoneCallerDetails.AdditionalCallerInformation.Add("Department", "Sales"); + teamsPhoneCallerDetails.AdditionalCallerInformation.Add("Priority", "High"); + + // Create TeamsPhoneSourceDetails + var teamsPhoneSourceDetails = new TeamsPhoneSourceDetails((new MicrosoftTeamsAppIdentifier("teamsAppId123")), language: "en-US", status: "Active"); + + // Create TeamsPhoneCallDetails + var teamsPhoneCallDetails = new TeamsPhoneCallDetails() + { + TeamsPhoneCallerDetails = teamsPhoneCallerDetails, + TeamsPhoneSourceDetails = teamsPhoneSourceDetails, + SessionId = "session-123-abc", + Intent = "Sales Inquiry", + CallTopic = "New Product Information", + CallContext = "Customer is interested in our latest product line", + TranscriptUrl = "https://transcripts.example.com/call/123", + CallSentiment = "Positive", + SuggestedActions = "Offer product demo, Schedule follow-up" + }; + + callInvite.CustomCallingContext.SetTeamsPhoneCallDetails(teamsPhoneCallDetails); + + return new[] + { + new object?[] + { + callInvite + }, + }; + } + private static IEnumerable TestData_TransferCallToParticipant_PhoneNumberIdentifier_MS() { var callInvite = new CallInvite(new PhoneNumberIdentifier(PhoneNumber), new PhoneNumberIdentifier("+17654321")); diff --git a/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs b/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs index 1ffa5019075c..a99c397d7af1 100644 --- a/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs +++ b/sdk/communication/Azure.Communication.CallAutomation/tests/CallRecordings/CallRecordingTests.cs @@ -263,9 +263,9 @@ private CallRecording getMockCallRecording(int statusCode, string? responseConte ChannelAffinity = testChannelAffinities, PauseOnStart = false, PostProcessingOptions = new PostProcessingOptions( - "https://somecognitiveurl", - new SummarizationSettings(true), - new TranscriptionSettings(true) + new TranscriptionSettings(true), + new SummarizationSettings(true), + "https://somecognitiveurl" ) }) }, @@ -310,9 +310,9 @@ private CallRecording getMockCallRecording(int statusCode, string? responseConte ChannelAffinity = testChannelAffinities, PauseOnStart = false, PostProcessingOptions = new PostProcessingOptions( - "https://somecognitiveurl", - new SummarizationSettings(true), - new TranscriptionSettings(true) + new TranscriptionSettings(true), + new SummarizationSettings(true), + "https://somecognitiveurl" ), AudioChannelParticipantOrdering = { new CommunicationUserIdentifier("test"),} }).ConfigureAwait(false), diff --git a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json index 7bf1951b519d..9c9a2e2c1384 100644 --- a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json @@ -1258,7 +1258,9 @@ "doc": "Message notification type is text.", "type": { "$id": "139", - "kind": "constant", + "kind": "enumvalue", + "name": "text", + "value": "text", "valueType": { "$id": "140", "kind": "string", @@ -1266,7 +1268,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "text", + "enumType": { + "$ref": "2" + }, + "doc": "Text message type.", "decorators": [] }, "optional": false, @@ -1335,7 +1340,9 @@ "doc": "Message notification type is image.", "type": { "$id": "149", - "kind": "constant", + "kind": "enumvalue", + "name": "image_v0", + "value": "image_v0", "valueType": { "$id": "150", "kind": "string", @@ -1343,7 +1350,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "image_v0", + "enumType": { + "$ref": "2" + }, + "doc": "Image message type. Legacy image type for `MediaNotificationContent` which is being deprecated", "decorators": [] }, "optional": false, @@ -1438,7 +1448,9 @@ "doc": "Message notification type is image.", "type": { "$id": "163", - "kind": "constant", + "kind": "enumvalue", + "name": "image", + "value": "image", "valueType": { "$id": "164", "kind": "string", @@ -1446,7 +1458,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "image", + "enumType": { + "$ref": "2" + }, + "doc": "Image message type.", "decorators": [] }, "optional": false, @@ -1541,7 +1556,9 @@ "doc": "Message notification type is document.", "type": { "$id": "177", - "kind": "constant", + "kind": "enumvalue", + "name": "document", + "value": "document", "valueType": { "$id": "178", "kind": "string", @@ -1549,7 +1566,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "document", + "enumType": { + "$ref": "2" + }, + "doc": "Document message type.", "decorators": [] }, "optional": false, @@ -1671,7 +1691,9 @@ "doc": "Message notification type is video.", "type": { "$id": "195", - "kind": "constant", + "kind": "enumvalue", + "name": "video", + "value": "video", "valueType": { "$id": "196", "kind": "string", @@ -1679,7 +1701,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "video", + "enumType": { + "$ref": "2" + }, + "doc": "Video message type.", "decorators": [] }, "optional": false, @@ -1774,7 +1799,9 @@ "doc": "Message notification type is audio.", "type": { "$id": "209", - "kind": "constant", + "kind": "enumvalue", + "name": "audio", + "value": "audio", "valueType": { "$id": "210", "kind": "string", @@ -1782,7 +1809,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "audio", + "enumType": { + "$ref": "2" + }, + "doc": "Audio message type.", "decorators": [] }, "optional": false, @@ -1850,7 +1880,9 @@ "doc": "Message notification type is reaction.", "type": { "$id": "219", - "kind": "constant", + "kind": "enumvalue", + "name": "reaction", + "value": "reaction", "valueType": { "$id": "220", "kind": "string", @@ -1858,7 +1890,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "reaction", + "enumType": { + "$ref": "2" + }, + "doc": "Reaction message type.", "decorators": [] }, "optional": false, @@ -1953,7 +1988,9 @@ "doc": "Message notification type is sticker.", "type": { "$id": "233", - "kind": "constant", + "kind": "enumvalue", + "name": "sticker", + "value": "sticker", "valueType": { "$id": "234", "kind": "string", @@ -1961,7 +1998,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "sticker", + "enumType": { + "$ref": "2" + }, + "doc": "Sticker message type.", "decorators": [] }, "optional": false, @@ -2029,7 +2069,9 @@ "doc": "Message notification type is Interactive.", "type": { "$id": "243", - "kind": "constant", + "kind": "enumvalue", + "name": "interactive", + "value": "interactive", "valueType": { "$id": "244", "kind": "string", @@ -2037,7 +2079,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "interactive", + "enumType": { + "$ref": "2" + }, + "doc": "Interactive Actionable message type.", "decorators": [] }, "optional": false, @@ -2137,7 +2182,9 @@ "doc": "Message content kind is text.", "type": { "$id": "257", - "kind": "constant", + "kind": "enumvalue", + "name": "text", + "value": "text", "valueType": { "$id": "258", "kind": "string", @@ -2145,7 +2192,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "text", + "enumType": { + "$ref": "24" + }, + "doc": "The text content type.", "decorators": [] }, "optional": false, @@ -2213,7 +2263,9 @@ "doc": "Message content kind is document.", "type": { "$id": "267", - "kind": "constant", + "kind": "enumvalue", + "name": "document", + "value": "document", "valueType": { "$id": "268", "kind": "string", @@ -2221,7 +2273,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "document", + "enumType": { + "$ref": "24" + }, + "doc": "The document content type.", "decorators": [] }, "optional": false, @@ -2289,7 +2344,9 @@ "doc": "Message content kind is image.", "type": { "$id": "277", - "kind": "constant", + "kind": "enumvalue", + "name": "image", + "value": "image", "valueType": { "$id": "278", "kind": "string", @@ -2297,7 +2354,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "image", + "enumType": { + "$ref": "24" + }, + "doc": "The image content type.", "decorators": [] }, "optional": false, @@ -2365,7 +2425,9 @@ "doc": "Message content kind is video.", "type": { "$id": "287", - "kind": "constant", + "kind": "enumvalue", + "name": "video", + "value": "video", "valueType": { "$id": "288", "kind": "string", @@ -2373,7 +2435,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "video", + "enumType": { + "$ref": "24" + }, + "doc": "The video content type.", "decorators": [] }, "optional": false, @@ -2441,7 +2506,9 @@ "doc": "Message content kind is Button.", "type": { "$id": "297", - "kind": "constant", + "kind": "enumvalue", + "name": "buttonSet", + "value": "buttonSet", "valueType": { "$id": "298", "kind": "string", @@ -2449,7 +2516,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "buttonSet", + "enumType": { + "$ref": "24" + }, + "doc": "The ButtonSet content type.", "decorators": [] }, "optional": false, @@ -2583,7 +2653,9 @@ "doc": "Message content kind is url.", "type": { "$id": "316", - "kind": "constant", + "kind": "enumvalue", + "name": "url", + "value": "url", "valueType": { "$id": "317", "kind": "string", @@ -2591,7 +2663,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "url", + "enumType": { + "$ref": "24" + }, + "doc": "The Url content type.", "decorators": [] }, "optional": false, @@ -2686,7 +2761,9 @@ "doc": "Message content kind is actionGroup.", "type": { "$id": "330", - "kind": "constant", + "kind": "enumvalue", + "name": "group", + "value": "group", "valueType": { "$id": "331", "kind": "string", @@ -2694,7 +2771,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "group", + "enumType": { + "$ref": "24" + }, + "doc": "The ActionSet content type.", "decorators": [] }, "optional": false, @@ -3055,7 +3135,9 @@ "doc": "Message action binding type is WhatsAppListAction.", "type": { "$id": "380", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsAppListAction", + "value": "whatsAppListAction", "valueType": { "$id": "381", "kind": "string", @@ -3063,7 +3145,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsAppListAction", + "enumType": { + "$ref": "40" + }, + "doc": "The WhatsApp List action binding kind.", "decorators": [] }, "optional": false, @@ -3127,7 +3212,9 @@ "doc": "Message action binding type is WhatsAppButtonAction.", "type": { "$id": "389", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsAppButtonAction", + "value": "whatsAppButtonAction", "valueType": { "$id": "390", "kind": "string", @@ -3135,7 +3222,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsAppButtonAction", + "enumType": { + "$ref": "40" + }, + "doc": "The WhatsApp Button action binding kind.", "decorators": [] }, "optional": false, @@ -3199,7 +3289,9 @@ "doc": "Message action binding type is WhatsAppUrlAction.", "type": { "$id": "398", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsAppUrlAction", + "value": "whatsAppUrlAction", "valueType": { "$id": "399", "kind": "string", @@ -3207,7 +3299,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsAppUrlAction", + "enumType": { + "$ref": "40" + }, + "doc": "The WhatsApp Url action binding kind.", "decorators": [] }, "optional": false, @@ -3305,7 +3400,9 @@ "doc": "Message notification type is template.", "type": { "$id": "411", - "kind": "constant", + "kind": "enumvalue", + "name": "template", + "value": "template", "valueType": { "$id": "412", "kind": "string", @@ -3313,7 +3410,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "template", + "enumType": { + "$ref": "2" + }, + "doc": "Template message type.", "decorators": [] }, "optional": false, @@ -3498,7 +3598,9 @@ "doc": "Message parameter type is text.", "type": { "$id": "438", - "kind": "constant", + "kind": "enumvalue", + "name": "text", + "value": "text", "valueType": { "$id": "439", "kind": "string", @@ -3506,7 +3608,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "text", + "enumType": { + "$ref": "48" + }, + "doc": "The text template parameter type.", "decorators": [] }, "optional": false, @@ -3574,7 +3679,9 @@ "doc": "Message parameter type is image.", "type": { "$id": "448", - "kind": "constant", + "kind": "enumvalue", + "name": "image", + "value": "image", "valueType": { "$id": "449", "kind": "string", @@ -3582,7 +3689,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "image", + "enumType": { + "$ref": "48" + }, + "doc": "The image template parameter type.", "decorators": [] }, "optional": false, @@ -3704,7 +3814,9 @@ "doc": "Message parameter type is document.", "type": { "$id": "466", - "kind": "constant", + "kind": "enumvalue", + "name": "document", + "value": "document", "valueType": { "$id": "467", "kind": "string", @@ -3712,7 +3824,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "document", + "enumType": { + "$ref": "48" + }, + "doc": "The document template parameter type.", "decorators": [] }, "optional": false, @@ -3834,7 +3949,9 @@ "doc": "Message parameter type is video.", "type": { "$id": "484", - "kind": "constant", + "kind": "enumvalue", + "name": "video", + "value": "video", "valueType": { "$id": "485", "kind": "string", @@ -3842,7 +3959,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "video", + "enumType": { + "$ref": "48" + }, + "doc": "The video template parameter type.", "decorators": [] }, "optional": false, @@ -3964,7 +4084,9 @@ "doc": "Message parameter type is location.", "type": { "$id": "502", - "kind": "constant", + "kind": "enumvalue", + "name": "location", + "value": "location", "valueType": { "$id": "503", "kind": "string", @@ -3972,7 +4094,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "location", + "enumType": { + "$ref": "48" + }, + "doc": "The location template parameter type.", "decorators": [] }, "optional": false, @@ -4121,7 +4246,9 @@ "doc": "Message parameter type is quick action.", "type": { "$id": "524", - "kind": "constant", + "kind": "enumvalue", + "name": "quickAction", + "value": "quickAction", "valueType": { "$id": "525", "kind": "string", @@ -4129,7 +4256,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "quickAction", + "enumType": { + "$ref": "48" + }, + "doc": "The quick action template parameter type.", "decorators": [] }, "optional": false, @@ -4288,7 +4418,9 @@ "doc": "MessageTemplateBindings is whatsApp", "type": { "$id": "546", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsApp", + "value": "whatsApp", "valueType": { "$id": "547", "kind": "string", @@ -4296,7 +4428,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsApp", + "enumType": { + "$ref": "62" + }, + "doc": "The WhatsApp template type.", "decorators": [] }, "optional": false, @@ -4953,7 +5088,9 @@ "doc": "Message template response type is whatsApp.", "type": { "$id": "619", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsApp", + "value": "whatsApp", "valueType": { "$id": "620", "kind": "string", @@ -4961,7 +5098,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsApp", + "enumType": { + "$ref": "92" + }, + "doc": "The WhatsApp communication messages channel type.", "decorators": [] }, "optional": false, @@ -5231,7 +5371,9 @@ "doc": "Participant type is internal.", "type": { "$id": "657", - "kind": "constant", + "kind": "enumvalue", + "name": "internal", + "value": "internal", "valueType": { "$id": "658", "kind": "string", @@ -5239,7 +5381,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "internal", + "enumType": { + "$ref": "102" + }, + "doc": "A participant internal to Azure Communication Services.", "decorators": [] }, "optional": false, @@ -5350,7 +5495,9 @@ "doc": "Contact type is communication.", "type": { "$id": "673", - "kind": "constant", + "kind": "enumvalue", + "name": "communication", + "value": "communication", "valueType": { "$id": "674", "kind": "string", @@ -5358,7 +5505,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "communication", + "enumType": { + "$ref": "108" + }, + "doc": "Azure Communication platform.", "decorators": [] }, "optional": false, @@ -5399,7 +5549,9 @@ "doc": "Contact type is bot.", "type": { "$id": "679", - "kind": "constant", + "kind": "enumvalue", + "name": "bot", + "value": "bot", "valueType": { "$id": "680", "kind": "string", @@ -5407,7 +5559,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "bot", + "enumType": { + "$ref": "108" + }, + "doc": "Bot platform.", "decorators": [] }, "optional": false, @@ -5475,7 +5630,9 @@ "doc": "Contact type is whatsApp.", "type": { "$id": "689", - "kind": "constant", + "kind": "enumvalue", + "name": "whatsApp", + "value": "whatsApp", "valueType": { "$id": "690", "kind": "string", @@ -5483,7 +5640,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "whatsApp", + "enumType": { + "$ref": "108" + }, + "doc": "WhatsApp platform.", "decorators": [] }, "optional": false, @@ -5542,7 +5702,9 @@ "doc": "Participant type is external.", "type": { "$id": "697", - "kind": "constant", + "kind": "enumvalue", + "name": "external", + "value": "external", "valueType": { "$id": "698", "kind": "string", @@ -5550,7 +5712,10 @@ "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, - "value": "external", + "enumType": { + "$ref": "102" + }, + "doc": "A participant on other platforms", "decorators": [] }, "optional": false, @@ -7150,8 +7315,7 @@ "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.clientRequestId", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] } ] }, @@ -7253,8 +7417,7 @@ "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.clientRequestId", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] } ] }, @@ -7356,8 +7519,7 @@ "readOnly": false, "decorators": [], "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.clientRequestId", - "discriminator": false, - "flatten": false + "correspondingMethodParams": [] } ] } @@ -7509,6 +7671,9 @@ "type": { "$id": "941", "kind": "constant", + "name": "sendContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "942", "kind": "string", @@ -7536,6 +7701,9 @@ "type": { "$id": "944", "kind": "constant", + "name": "sendContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "945", "kind": "string", @@ -7889,6 +8057,9 @@ "type": { "$id": "976", "kind": "constant", + "name": "downloadMediaContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "977", "kind": "string", @@ -7952,6 +8123,9 @@ "type": { "$id": "984", "kind": "constant", + "name": "MessageDataStreamContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "985", "kind": "string", @@ -8292,6 +8466,9 @@ "type": { "$id": "1018", "kind": "constant", + "name": "listTemplatesContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1019", "kind": "string", @@ -8586,6 +8763,9 @@ "type": { "$id": "1047", "kind": "constant", + "name": "createConversationContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1048", "kind": "string", @@ -8613,6 +8793,9 @@ "type": { "$id": "1050", "kind": "constant", + "name": "createConversationContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1051", "kind": "string", @@ -8869,6 +9052,9 @@ "type": { "$id": "1071", "kind": "constant", + "name": "getConversationContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1072", "kind": "string", @@ -9175,6 +9361,9 @@ "type": { "$id": "1101", "kind": "constant", + "name": "deleteConversationContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1102", "kind": "string", @@ -9533,6 +9722,9 @@ "type": { "$id": "1137", "kind": "constant", + "name": "terminateConversationContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1138", "kind": "string", @@ -9890,6 +10082,9 @@ "type": { "$id": "1173", "kind": "constant", + "name": "listConversationsContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1174", "kind": "string", @@ -10773,6 +10968,9 @@ "type": { "$id": "1283", "kind": "constant", + "name": "listMessagesContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1284", "kind": "string", @@ -11366,6 +11564,9 @@ "type": { "$id": "1351", "kind": "constant", + "name": "addParticipantsContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1352", "kind": "string", @@ -11393,6 +11594,9 @@ "type": { "$id": "1354", "kind": "constant", + "name": "addParticipantsContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1355", "kind": "string", @@ -12022,6 +12226,9 @@ "type": { "$id": "1423", "kind": "constant", + "name": "removeParticipantsContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1424", "kind": "string", @@ -12049,6 +12256,9 @@ "type": { "$id": "1426", "kind": "constant", + "name": "removeParticipantsContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1427", "kind": "string", @@ -12572,6 +12782,9 @@ "type": { "$id": "1479", "kind": "constant", + "name": "analyzeConversationContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1480", "kind": "string", @@ -13041,6 +13254,9 @@ "type": { "$id": "1527", "kind": "constant", + "name": "addParticipantsContentType2", + "namespace": "", + "usage": "None", "valueType": { "$id": "1528", "kind": "string", @@ -13068,6 +13284,9 @@ "type": { "$id": "1530", "kind": "constant", + "name": "addParticipantsContentType3", + "namespace": "", + "usage": "None", "valueType": { "$id": "1531", "kind": "string", @@ -13493,6 +13712,9 @@ "type": { "$id": "1569", "kind": "constant", + "name": "removeParticipantsContentType2", + "namespace": "", + "usage": "None", "valueType": { "$id": "1570", "kind": "string", @@ -13520,6 +13742,9 @@ "type": { "$id": "1572", "kind": "constant", + "name": "removeParticipantsContentType3", + "namespace": "", + "usage": "None", "valueType": { "$id": "1573", "kind": "string", @@ -13943,6 +14168,9 @@ "type": { "$id": "1611", "kind": "constant", + "name": "listConversationsContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1612", "kind": "string", @@ -14315,6 +14543,9 @@ "type": { "$id": "1648", "kind": "constant", + "name": "listMessagesContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1649", "kind": "string", @@ -14689,6 +14920,9 @@ "type": { "$id": "1685", "kind": "constant", + "name": "sendMessageContentType", + "namespace": "", + "usage": "None", "valueType": { "$id": "1686", "kind": "string", @@ -14716,6 +14950,9 @@ "type": { "$id": "1688", "kind": "constant", + "name": "sendMessageContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1689", "kind": "string", @@ -15140,6 +15377,9 @@ "type": { "$id": "1727", "kind": "constant", + "name": "analyzeConversationContentType1", + "namespace": "", + "usage": "None", "valueType": { "$id": "1728", "kind": "string", diff --git a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationDomainResource.Serialization.cs b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationDomainResource.Serialization.cs index 6c285ab56220..54d017f26242 100644 --- a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationDomainResource.Serialization.cs +++ b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Communication { public partial class CommunicationDomainResource : IJsonModel { + private static CommunicationDomainResourceData s_dataDeserializationInstance; + private static CommunicationDomainResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommunicationDomainResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommunicationDomainResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCommunicationContext.Default); CommunicationDomainResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCommunicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationServiceResource.Serialization.cs b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationServiceResource.Serialization.cs index 0a4fb730dcab..60e0b964602b 100644 --- a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationServiceResource.Serialization.cs +++ b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/CommunicationServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Communication { public partial class CommunicationServiceResource : IJsonModel { + private static CommunicationServiceResourceData s_dataDeserializationInstance; + private static CommunicationServiceResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommunicationServiceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommunicationServiceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCommunicationContext.Default); CommunicationServiceResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCommunicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/EmailServiceResource.Serialization.cs b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/EmailServiceResource.Serialization.cs index 9141fe00651b..cf302e4dab1a 100644 --- a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/EmailServiceResource.Serialization.cs +++ b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/EmailServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Communication { public partial class EmailServiceResource : IJsonModel { + private static EmailServiceResourceData s_dataDeserializationInstance; + private static EmailServiceResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EmailServiceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EmailServiceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCommunicationContext.Default); EmailServiceResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCommunicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/SenderUsernameResource.Serialization.cs b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/SenderUsernameResource.Serialization.cs index 7a43766f4cfd..d8233c3224d9 100644 --- a/sdk/communication/Azure.ResourceManager.Communication/src/Generated/SenderUsernameResource.Serialization.cs +++ b/sdk/communication/Azure.ResourceManager.Communication/src/Generated/SenderUsernameResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Communication { public partial class SenderUsernameResource : IJsonModel { + private static SenderUsernameResourceData s_dataDeserializationInstance; + private static SenderUsernameResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SenderUsernameResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SenderUsernameResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCommunicationContext.Default); SenderUsernameResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCommunicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetResource.Serialization.cs index 2c72f7f64268..eb1ae74fee89 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/AvailabilitySetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class AvailabilitySetResource : IJsonModel { + private static AvailabilitySetData s_dataDeserializationInstance; + private static AvailabilitySetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvailabilitySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvailabilitySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); AvailabilitySetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupResource.Serialization.cs index deb73ff054b8..39d78e926178 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CapacityReservationGroupResource : IJsonModel { + private static CapacityReservationGroupData s_dataDeserializationInstance; + private static CapacityReservationGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CapacityReservationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CapacityReservationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CapacityReservationGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationResource.Serialization.cs index 9bf867780abe..c2e033e5df5b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CapacityReservationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CapacityReservationResource : IJsonModel { + private static CapacityReservationData s_dataDeserializationInstance; + private static CapacityReservationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CapacityReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CapacityReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CapacityReservationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyResource.Serialization.cs index 7220023e10ce..51fad502b083 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSFamilyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CloudServiceOSFamilyResource : IJsonModel { + private static CloudServiceOSFamilyData s_dataDeserializationInstance; + private static CloudServiceOSFamilyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceOSFamilyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceOSFamilyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CloudServiceOSFamilyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionResource.Serialization.cs index 04515375182f..52291880bee0 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceOSVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CloudServiceOSVersionResource : IJsonModel { + private static CloudServiceOSVersionData s_dataDeserializationInstance; + private static CloudServiceOSVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceOSVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceOSVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CloudServiceOSVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceResource.Serialization.cs index 9ae7ee163358..9d7cee69a1f7 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CloudServiceResource : IJsonModel { + private static CloudServiceData s_dataDeserializationInstance; + private static CloudServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CloudServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceResource.Serialization.cs index 2920cfa2dfa0..239f495931ee 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CloudServiceRoleInstanceResource : IJsonModel { + private static CloudServiceRoleInstanceData s_dataDeserializationInstance; + private static CloudServiceRoleInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceRoleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceRoleInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CloudServiceRoleInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleResource.Serialization.cs index f8586042a9f4..e4bfc15d4cfd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CloudServiceRoleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CloudServiceRoleResource : IJsonModel { + private static CloudServiceRoleData s_dataDeserializationInstance; + private static CloudServiceRoleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CloudServiceRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.Serialization.cs index 2839884365eb..52a0448cbbd3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CommunityGalleryImageResource : IJsonModel { + private static CommunityGalleryImageData s_dataDeserializationInstance; + private static CommunityGalleryImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommunityGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommunityGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CommunityGalleryImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.Serialization.cs index e870121ae7bb..50de32b7447a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryImageVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CommunityGalleryImageVersionResource : IJsonModel { + private static CommunityGalleryImageVersionData s_dataDeserializationInstance; + private static CommunityGalleryImageVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommunityGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommunityGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CommunityGalleryImageVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.Serialization.cs index bbb7a131d28e..d184a240060c 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/CommunityGalleryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class CommunityGalleryResource : IJsonModel { + private static CommunityGalleryData s_dataDeserializationInstance; + private static CommunityGalleryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CommunityGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CommunityGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); CommunityGalleryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionResource.Serialization.cs index df6041536adc..1b3480e93180 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ComputePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class ComputePrivateEndpointConnectionResource : IJsonModel { + private static ComputePrivateEndpointConnectionData s_dataDeserializationInstance; + private static ComputePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ComputePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ComputePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); ComputePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupResource.Serialization.cs index 1a67765dbd96..c038a00de244 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DedicatedHostGroupResource : IJsonModel { + private static DedicatedHostGroupData s_dataDeserializationInstance; + private static DedicatedHostGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DedicatedHostGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DedicatedHostGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DedicatedHostGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.Serialization.cs index afb3497aa865..c326e97adb85 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DedicatedHostResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DedicatedHostResource : IJsonModel { + private static DedicatedHostData s_dataDeserializationInstance; + private static DedicatedHostData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DedicatedHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DedicatedHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DedicatedHostData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessResource.Serialization.cs index 2cfacb5a71ed..5f1aa3d66d62 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskAccessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DiskAccessResource : IJsonModel { + private static DiskAccessData s_dataDeserializationInstance; + private static DiskAccessData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DiskAccessData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetResource.Serialization.cs index 80f81e62b02f..60d08a95603a 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskEncryptionSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DiskEncryptionSetResource : IJsonModel { + private static DiskEncryptionSetData s_dataDeserializationInstance; + private static DiskEncryptionSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskEncryptionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskEncryptionSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DiskEncryptionSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageResource.Serialization.cs index a81beda14422..d98f42714f3e 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DiskImageResource : IJsonModel { + private static DiskImageData s_dataDeserializationInstance; + private static DiskImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DiskImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointResource.Serialization.cs index b86c2cbb8e64..acdb24876b7f 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/DiskRestorePointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class DiskRestorePointResource : IJsonModel { + private static DiskRestorePointData s_dataDeserializationInstance; + private static DiskRestorePointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); DiskRestorePointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.Serialization.cs index 81769cfea62b..ce9bae8c7a19 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryApplicationResource : IJsonModel { + private static GalleryApplicationData s_dataDeserializationInstance; + private static GalleryApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.Serialization.cs index a7defcebd6bc..0eeef549bd01 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryApplicationVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryApplicationVersionResource : IJsonModel { + private static GalleryApplicationVersionData s_dataDeserializationInstance; + private static GalleryApplicationVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryApplicationVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryApplicationVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryApplicationVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.Serialization.cs index 8b6538a750b4..8bb1bcdad9f1 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryImageResource : IJsonModel { + private static GalleryImageData s_dataDeserializationInstance; + private static GalleryImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.Serialization.cs index 45af23fa1aa3..f921b28cbefd 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryImageVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryImageVersionResource : IJsonModel { + private static GalleryImageVersionData s_dataDeserializationInstance; + private static GalleryImageVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryImageVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs index 2c1b0e16497b..94324844c088 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryInVmAccessControlProfileResource : IJsonModel { + private static GalleryInVmAccessControlProfileData s_dataDeserializationInstance; + private static GalleryInVmAccessControlProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryInVmAccessControlProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryInVmAccessControlProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryInVmAccessControlProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs index 869e88c39a34..879d000cd984 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryInVmAccessControlProfileVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryInVmAccessControlProfileVersionResource : IJsonModel { + private static GalleryInVmAccessControlProfileVersionData s_dataDeserializationInstance; + private static GalleryInVmAccessControlProfileVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryInVmAccessControlProfileVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryInVmAccessControlProfileVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryInVmAccessControlProfileVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.Serialization.cs index e783845c3379..0ab37675a442 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/GalleryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class GalleryResource : IJsonModel { + private static GalleryData s_dataDeserializationInstance; + private static GalleryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); GalleryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskResource.Serialization.cs index b97b289b2632..6e790c6c1aab 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ManagedDiskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class ManagedDiskResource : IJsonModel { + private static ManagedDiskData s_dataDeserializationInstance; + private static ManagedDiskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); ManagedDiskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupResource.Serialization.cs index c1bd420587e1..f700a896a2a3 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/ProximityPlacementGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class ProximityPlacementGroupResource : IJsonModel { + private static ProximityPlacementGroupData s_dataDeserializationInstance; + private static ProximityPlacementGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProximityPlacementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProximityPlacementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); ProximityPlacementGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupResource.Serialization.cs index 8442f1419a31..28ffad95f401 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class RestorePointGroupResource : IJsonModel { + private static RestorePointGroupData s_dataDeserializationInstance; + private static RestorePointGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RestorePointGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RestorePointGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); RestorePointGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointResource.Serialization.cs index d529c651d55b..fd4a9ec28743 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/RestorePointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class RestorePointResource : IJsonModel { + private static RestorePointData s_dataDeserializationInstance; + private static RestorePointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); RestorePointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.Serialization.cs index 10fcfd5765d6..87ea8aec712d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class SharedGalleryImageResource : IJsonModel { + private static SharedGalleryImageData s_dataDeserializationInstance; + private static SharedGalleryImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SharedGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SharedGalleryImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); SharedGalleryImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.Serialization.cs index b4e76e4f95d6..80fa461f62cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryImageVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class SharedGalleryImageVersionResource : IJsonModel { + private static SharedGalleryImageVersionData s_dataDeserializationInstance; + private static SharedGalleryImageVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SharedGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SharedGalleryImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); SharedGalleryImageVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.Serialization.cs index 1d1fc4192118..fbfa94bc6061 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SharedGalleryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class SharedGalleryResource : IJsonModel { + private static SharedGalleryData s_dataDeserializationInstance; + private static SharedGalleryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SharedGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SharedGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); SharedGalleryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotResource.Serialization.cs index 116125b9c119..7897a5052aeb 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class SnapshotResource : IJsonModel { + private static SnapshotData s_dataDeserializationInstance; + private static SnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); SnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyResource.Serialization.cs index 31fa5f72872b..64353bb91b9b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/SshPublicKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class SshPublicKeyResource : IJsonModel { + private static SshPublicKeyData s_dataDeserializationInstance; + private static SshPublicKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SshPublicKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SshPublicKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); SshPublicKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageResource.Serialization.cs index 5f731e3b4d53..172a0e002fe5 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineExtensionImageResource : IJsonModel { + private static VirtualMachineExtensionImageData s_dataDeserializationInstance; + private static VirtualMachineExtensionImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineExtensionImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineExtensionImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineExtensionImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionResource.Serialization.cs index 94ec9aa8afaf..5ced98c6d72d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineExtensionResource : IJsonModel { + private static VirtualMachineExtensionData s_dataDeserializationInstance; + private static VirtualMachineExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.Serialization.cs index 8deaef0c2490..673bb4630f3b 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineResource : IJsonModel { + private static VirtualMachineData s_dataDeserializationInstance; + private static VirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandResource.Serialization.cs index bccad5bbe5a4..98ea64afca3d 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineRunCommandResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineRunCommandResource : IJsonModel { + private static VirtualMachineRunCommandData s_dataDeserializationInstance; + private static VirtualMachineRunCommandData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineRunCommandData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionResource.Serialization.cs index d2d3f321aa75..cfe383f9ef31 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetExtensionResource : IJsonModel { + private static VirtualMachineScaleSetExtensionData s_dataDeserializationInstance; + private static VirtualMachineScaleSetExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineScaleSetExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineScaleSetExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineScaleSetExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.Serialization.cs index bba6490ae14f..424cabb437ee 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetResource : IJsonModel { + private static VirtualMachineScaleSetData s_dataDeserializationInstance; + private static VirtualMachineScaleSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineScaleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineScaleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineScaleSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeResource.Serialization.cs index 2bf074905ed8..8f61fb752557 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetRollingUpgradeResource : IJsonModel { + private static VirtualMachineScaleSetRollingUpgradeData s_dataDeserializationInstance; + private static VirtualMachineScaleSetRollingUpgradeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineScaleSetRollingUpgradeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineScaleSetRollingUpgradeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineScaleSetRollingUpgradeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionResource.Serialization.cs index 854e70e5881f..b0b7cb0e63cf 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetVmExtensionResource : IJsonModel { + private static VirtualMachineScaleSetVmExtensionData s_dataDeserializationInstance; + private static VirtualMachineScaleSetVmExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineScaleSetVmExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineScaleSetVmExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineScaleSetVmExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.Serialization.cs index cff567724471..3494c2416219 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetVmResource : IJsonModel { + private static VirtualMachineScaleSetVmData s_dataDeserializationInstance; + private static VirtualMachineScaleSetVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineScaleSetVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineScaleSetVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineScaleSetVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmRunCommandResource.Serialization.cs b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmRunCommandResource.Serialization.cs index fdd87544029f..291e26b72951 100644 --- a/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmRunCommandResource.Serialization.cs +++ b/sdk/compute/Azure.ResourceManager.Compute/src/Generated/VirtualMachineScaleSetVmRunCommandResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Compute { public partial class VirtualMachineScaleSetVmRunCommandResource : IJsonModel { + private static VirtualMachineRunCommandData s_dataDeserializationInstance; + private static VirtualMachineRunCommandData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualMachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualMachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeContext.Default); VirtualMachineRunCommandData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.Serialization.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.Serialization.cs index c8b9f28f56c0..001862efe300 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.Serialization.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/ComputeFleetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ComputeFleet { public partial class ComputeFleetResource : IJsonModel { + private static ComputeFleetData s_dataDeserializationInstance; + private static ComputeFleetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ComputeFleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ComputeFleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerComputeFleetContext.Default); ComputeFleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerComputeFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationComponentName.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationComponentName.cs index 8a83a2ee963e..bee367318b38 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationComponentName.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationComponentName.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ComputeFleet.Models { - /// The WindowsSetupAdditionalInformation_componentName. + /// The WindowsSetupAdditionalInformationComponentName. public readonly partial struct WindowsSetupAdditionalInformationComponentName : IEquatable { private readonly string _value; diff --git a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationPassName.cs b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationPassName.cs index 6a7917cd9312..4e6e6e2cd506 100644 --- a/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationPassName.cs +++ b/sdk/computefleet/Azure.ResourceManager.ComputeFleet/src/Generated/Models/WindowsSetupAdditionalInformationPassName.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ComputeFleet.Models { - /// The WindowsSetupAdditionalInformation_passName. + /// The WindowsSetupAdditionalInformationPassName. public readonly partial struct WindowsSetupAdditionalInformationPassName : IEquatable { private readonly string _value; diff --git a/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ConfidentialLedgerResource.Serialization.cs b/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ConfidentialLedgerResource.Serialization.cs index b87e30e2b473..f13e9c5d58c5 100644 --- a/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ConfidentialLedgerResource.Serialization.cs +++ b/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ConfidentialLedgerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConfidentialLedger { public partial class ConfidentialLedgerResource : IJsonModel { + private static ConfidentialLedgerData s_dataDeserializationInstance; + private static ConfidentialLedgerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConfidentialLedgerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConfidentialLedgerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConfidentialLedgerContext.Default); ConfidentialLedgerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConfidentialLedgerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ManagedCcfResource.Serialization.cs b/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ManagedCcfResource.Serialization.cs index 4ca5980a4039..3b983719107b 100644 --- a/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ManagedCcfResource.Serialization.cs +++ b/sdk/confidentialledger/Azure.ResourceManager.ConfidentialLedger/src/Generated/ManagedCcfResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConfidentialLedger { public partial class ManagedCcfResource : IJsonModel { + private static ManagedCcfData s_dataDeserializationInstance; + private static ManagedCcfData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedCcfData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedCcfData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConfidentialLedgerContext.Default); ManagedCcfData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConfidentialLedgerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.Serialization.cs b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.Serialization.cs index 30433d003b9e..0a6516515bcd 100644 --- a/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.Serialization.cs +++ b/sdk/confluent/Azure.ResourceManager.Confluent/src/Generated/ConfluentOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Confluent { public partial class ConfluentOrganizationResource : IJsonModel { + private static ConfluentOrganizationData s_dataDeserializationInstance; + private static ConfluentOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConfluentOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConfluentOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConfluentContext.Default); ConfluentOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConfluentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VCenterInventoryItemResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VCenterInventoryItemResource.Serialization.cs index c320c862ee70..13ab88d9bef8 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VCenterInventoryItemResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VCenterInventoryItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VCenterInventoryItemResource : IJsonModel { + private static VCenterInventoryItemData s_dataDeserializationInstance; + private static VCenterInventoryItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VCenterInventoryItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VCenterInventoryItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VCenterInventoryItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareClusterResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareClusterResource.Serialization.cs index 0f287c0798b1..dcaa713620f7 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareClusterResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareClusterResource : IJsonModel { + private static VMwareClusterData s_dataDeserializationInstance; + private static VMwareClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareDatastoreResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareDatastoreResource.Serialization.cs index b1c5abb87db8..d392a4e82761 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareDatastoreResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareDatastoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareDatastoreResource : IJsonModel { + private static VMwareDatastoreData s_dataDeserializationInstance; + private static VMwareDatastoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareDatastoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareHostResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareHostResource.Serialization.cs index a510d463b923..68d0c1735a50 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareHostResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareHostResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareHostResource : IJsonModel { + private static VMwareHostData s_dataDeserializationInstance; + private static VMwareHostData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareHostData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareResourcePoolResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareResourcePoolResource.Serialization.cs index e84683a7c700..4393fee9e85d 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareResourcePoolResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareResourcePoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareResourcePoolResource : IJsonModel { + private static VMwareResourcePoolData s_dataDeserializationInstance; + private static VMwareResourcePoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareResourcePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareResourcePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareResourcePoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVCenterResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVCenterResource.Serialization.cs index a19faa12a5a1..6782add941f5 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVCenterResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVCenterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareVCenterResource : IJsonModel { + private static VMwareVCenterData s_dataDeserializationInstance; + private static VMwareVCenterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareVCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareVCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareVCenterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVirtualNetworkResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVirtualNetworkResource.Serialization.cs index aae7e4d3eedf..f663ceadc222 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVirtualNetworkResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareVirtualNetworkResource : IJsonModel { + private static VMwareVirtualNetworkData s_dataDeserializationInstance; + private static VMwareVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmInstanceResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmInstanceResource.Serialization.cs index eade49feae40..a3bef52dafe9 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmInstanceResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareVmInstanceResource : IJsonModel { + private static VMwareVmInstanceData s_dataDeserializationInstance; + private static VMwareVmInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareVmInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareVmInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareVmInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmTemplateResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmTemplateResource.Serialization.cs index 7de26f4fa8b8..efa2ebb1282d 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmTemplateResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VMwareVmTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VMwareVmTemplateResource : IJsonModel { + private static VMwareVmTemplateData s_dataDeserializationInstance; + private static VMwareVmTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VMwareVmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VMwareVmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VMwareVmTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceGuestAgentResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceGuestAgentResource.Serialization.cs index 34b8662f9a46..0c5001c6d965 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceGuestAgentResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceGuestAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VmInstanceGuestAgentResource : IJsonModel { + private static VmInstanceGuestAgentData s_dataDeserializationInstance; + private static VmInstanceGuestAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VmInstanceGuestAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VmInstanceGuestAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VmInstanceGuestAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceHybridIdentityMetadataResource.Serialization.cs b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceHybridIdentityMetadataResource.Serialization.cs index 1733f94aa687..8141757e9d98 100644 --- a/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceHybridIdentityMetadataResource.Serialization.cs +++ b/sdk/connectedvmwarevsphere/Azure.ResourceManager.ConnectedVMwarevSphere/src/Generated/VmInstanceHybridIdentityMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ConnectedVMwarevSphere { public partial class VmInstanceHybridIdentityMetadataResource : IJsonModel { + private static VmInstanceHybridIdentityMetadataData s_dataDeserializationInstance; + private static VmInstanceHybridIdentityMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VmInstanceHybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VmInstanceHybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); VmInstanceHybridIdentityMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConnectedVMwarevSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetResource.Serialization.cs b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetResource.Serialization.cs index 58b704ca93cf..637705aa1e67 100644 --- a/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetResource.Serialization.cs +++ b/sdk/consumption/Azure.ResourceManager.Consumption/src/Generated/ConsumptionBudgetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Consumption { public partial class ConsumptionBudgetResource : IJsonModel { + private static ConsumptionBudgetData s_dataDeserializationInstance; + private static ConsumptionBudgetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConsumptionBudgetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConsumptionBudgetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerConsumptionContext.Default); ConsumptionBudgetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerConsumptionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md index 207c8ec9cdf4..b4b6883df1ae 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.0-beta.2 (Unreleased) +## 1.5.0-beta.1 (Unreleased) ### Features Added @@ -10,10 +10,17 @@ ### Other Changes +## 1.4.0 (2025-05-22) + +### Features Added + +Stable release of api-version tag 'package-2025-01-01'. + ## 1.4.0-beta.1 (2025-04-01) ### Features Added -- Add api version 2025-01-01 + +- Upgraded api-version tag 'package-2024-03' to 'package-2025-01-01'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/24b224b17e698746d3c34e32f84dab7de5e4f2a8/specification/app/resource-manager/readme.md. - Support keda scaler auth using MSI - Support RunningStatus for ContainerApp - Support Java Components @@ -36,7 +43,7 @@ ### Features Added -- Upgraded api-version tag from 'package-2023-05' to 'package-2024-03'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/07f22664203dc215a564e00329b81a8a94cc11ee/specification/app/resource-manager/readme.md +- Upgraded api-version tag from 'package-2023-05' to 'package-2024-03'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/07f22664203dc215a564e00329b81a8a94cc11ee/specification/app/resource-manager/readme.md. - Enabled the new model serialization by using the System.ClientModel, refer this [document](https://aka.ms/azsdk/net/mrw) for more details. - Added `ArmOperation.Rehydrate` and `ArmOperation.Rehydrate` static methods to rehydrate a long-running operation. diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Azure.ResourceManager.AppContainers.csproj b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Azure.ResourceManager.AppContainers.csproj index 2cf3fcdece43..eb1cb454b4b1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Azure.ResourceManager.AppContainers.csproj +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Azure.ResourceManager.AppContainers.csproj @@ -1,8 +1,8 @@ - 1.4.0-beta.2 + 1.5.0-beta.1 - 1.3.0 + 1.4.0 Azure.ResourceManager.AppContainers Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.App。 azure;management;arm;resource manager;appcontainers diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.Serialization.cs index 558471a6a956..d16bf3b173d1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppAuthConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppAuthConfigResource : IJsonModel { + private static ContainerAppAuthConfigData s_dataDeserializationInstance; + private static ContainerAppAuthConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppAuthConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppAuthConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppAuthConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.Serialization.cs index 703dcd5e9117..22a2252e4a9d 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppConnectedEnvironmentCertificateResource : IJsonModel { + private static ContainerAppCertificateData s_dataDeserializationInstance; + private static ContainerAppCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs index 180b1552f666..889d0d188cd2 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentDaprComponentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppConnectedEnvironmentDaprComponentResource : IJsonModel { + private static ContainerAppDaprComponentData s_dataDeserializationInstance; + private static ContainerAppDaprComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppDaprComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.Serialization.cs index 0f5c660a780c..67cac5f1fb4f 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppConnectedEnvironmentResource : IJsonModel { + private static ContainerAppConnectedEnvironmentData s_dataDeserializationInstance; + private static ContainerAppConnectedEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppConnectedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppConnectedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppConnectedEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.Serialization.cs index c20d2ff93376..d62133b15541 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppConnectedEnvironmentStorageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppConnectedEnvironmentStorageResource : IJsonModel { + private static ContainerAppConnectedEnvironmentStorageData s_dataDeserializationInstance; + private static ContainerAppConnectedEnvironmentStorageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppConnectedEnvironmentStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppConnectedEnvironmentStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppConnectedEnvironmentStorageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.Serialization.cs index bae5afc0bc6f..b42ecf4e8912 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppDetectorPropertyResource : IJsonModel { + private static ContainerAppData s_dataDeserializationInstance; + private static ContainerAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.Serialization.cs index 6cd02ec3a3b7..2d73d32fd028 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorPropertyRevisionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppDetectorPropertyRevisionResource : IJsonModel { + private static ContainerAppRevisionData s_dataDeserializationInstance; + private static ContainerAppRevisionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppRevisionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.Serialization.cs index 5399ea203a7d..b2e57a82eae6 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppDetectorResource : IJsonModel { + private static ContainerAppDiagnosticData s_dataDeserializationInstance; + private static ContainerAppDiagnosticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.Serialization.cs index 7cde93fefd65..3536a0f70902 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorPropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppJobDetectorPropertyResource : IJsonModel { + private static ContainerAppJobData s_dataDeserializationInstance; + private static ContainerAppJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.Serialization.cs index 700336a0a302..927f7e4d5f46 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppJobDetectorResource : IJsonModel { + private static ContainerAppDiagnosticData s_dataDeserializationInstance; + private static ContainerAppDiagnosticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.Serialization.cs index 9a38e5ad973f..3f5f0c708344 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobExecutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppJobExecutionResource : IJsonModel { + private static ContainerAppJobExecutionData s_dataDeserializationInstance; + private static ContainerAppJobExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppJobExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.Serialization.cs index f3d0663791b4..f6c2c05e1fb1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppJobResource : IJsonModel { + private static ContainerAppJobData s_dataDeserializationInstance; + private static ContainerAppJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.Serialization.cs index 440c9b7f6f6b..cc0184070e09 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedCertificateResource : IJsonModel { + private static ContainerAppManagedCertificateData s_dataDeserializationInstance; + private static ContainerAppManagedCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppManagedCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppManagedCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppManagedCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.Serialization.cs index 183fa721bbca..43f4a07ee856 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentCertificateResource : IJsonModel { + private static ContainerAppCertificateData s_dataDeserializationInstance; + private static ContainerAppCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.Serialization.cs index d132cd90712f..877c73f0fe09 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDaprComponentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentDaprComponentResource : IJsonModel { + private static ContainerAppDaprComponentData s_dataDeserializationInstance; + private static ContainerAppDaprComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppDaprComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppDaprComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.Serialization.cs index c11ddb37633d..3e2739b50202 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentDetectorResource : IJsonModel { + private static ContainerAppDiagnosticData s_dataDeserializationInstance; + private static ContainerAppDiagnosticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.Serialization.cs index 4032cc245e9f..ad604f285ec9 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentDetectorResourcePropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentDetectorResourcePropertyResource : IJsonModel { + private static ContainerAppManagedEnvironmentData s_dataDeserializationInstance; + private static ContainerAppManagedEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppManagedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppManagedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppManagedEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.Serialization.cs index 00c9510af282..d52a8bf49800 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentResource : IJsonModel { + private static ContainerAppManagedEnvironmentData s_dataDeserializationInstance; + private static ContainerAppManagedEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppManagedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppManagedEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppManagedEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.Serialization.cs index c44dc5537d2e..9fdbcc3c7c5b 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppManagedEnvironmentStorageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppManagedEnvironmentStorageResource : IJsonModel { + private static ContainerAppManagedEnvironmentStorageData s_dataDeserializationInstance; + private static ContainerAppManagedEnvironmentStorageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppManagedEnvironmentStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppManagedEnvironmentStorageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppManagedEnvironmentStorageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.Serialization.cs index 1c2ef50cc223..8cbec76cc9bd 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppReplicaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppReplicaResource : IJsonModel { + private static ContainerAppReplicaData s_dataDeserializationInstance; + private static ContainerAppReplicaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppReplicaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppReplicaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppReplicaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.Serialization.cs index b7f603de8069..17ea2406594c 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppResource : IJsonModel { + private static ContainerAppData s_dataDeserializationInstance; + private static ContainerAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.Serialization.cs index 8f2eac488c85..d9d7097ed759 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppRevisionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppRevisionResource : IJsonModel { + private static ContainerAppRevisionData s_dataDeserializationInstance; + private static ContainerAppRevisionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppRevisionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppRevisionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.Serialization.cs index b59024263f1a..cfed137ba1e1 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/ContainerAppSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class ContainerAppSourceControlResource : IJsonModel { + private static ContainerAppSourceControlData s_dataDeserializationInstance; + private static ContainerAppSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerAppSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerAppSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); ContainerAppSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.Serialization.cs index 17fb0a5da4a6..6f568f56b7b8 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/JavaComponentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class JavaComponentResource : IJsonModel { + private static JavaComponentData s_dataDeserializationInstance; + private static JavaComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - JavaComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + JavaComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); JavaComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.Serialization.cs b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.Serialization.cs index 6da51ca6dd61..91e7c185b759 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.Serialization.cs +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/Generated/SessionPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppContainers { public partial class SessionPoolResource : IJsonModel { + private static SessionPoolData s_dataDeserializationInstance; + private static SessionPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SessionPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SessionPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppContainersContext.Default); SessionPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md index a1202cc79f35..897d098de1ee 100644 --- a/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md +++ b/sdk/containerapps/Azure.ResourceManager.AppContainers/src/autorest.md @@ -8,7 +8,7 @@ csharp: true library-name: AppContainers namespace: Azure.ResourceManager.AppContainers require: https://github.com/Azure/azure-rest-api-specs/blob/24b224b17e698746d3c34e32f84dab7de5e4f2a8/specification/app/resource-manager/readme.md -tag: package-2025-01-01 +#tag: package-2025-01-01 output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.Serialization.cs index 61ab15928534..4bcbb4e8f47e 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerInstance { public partial class ContainerGroupProfileResource : IJsonModel { + private static ContainerGroupProfileData s_dataDeserializationInstance; + private static ContainerGroupProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerGroupProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerGroupProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerInstanceContext.Default); ContainerGroupProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileRevisionResource.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileRevisionResource.Serialization.cs index d71bce768dc1..e462607f7cb8 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileRevisionResource.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupProfileRevisionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerInstance { public partial class ContainerGroupProfileRevisionResource : IJsonModel { + private static ContainerGroupProfileData s_dataDeserializationInstance; + private static ContainerGroupProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerGroupProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerGroupProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerInstanceContext.Default); ContainerGroupProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupResource.Serialization.cs b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupResource.Serialization.cs index f67de4b862c8..1bfbcc0f2975 100644 --- a/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupResource.Serialization.cs +++ b/sdk/containerinstance/Azure.ResourceManager.ContainerInstance/src/Generated/ContainerGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerInstance { public partial class ContainerGroupResource : IJsonModel { + private static ContainerGroupData s_dataDeserializationInstance; + private static ContainerGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerInstanceContext.Default); ContainerGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs index 321a0c1d7ac7..c6310e613cb0 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterBgpPeerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerOrchestratorRuntime { public partial class ConnectedClusterBgpPeerResource : IJsonModel { + private static ConnectedClusterBgpPeerData s_dataDeserializationInstance; + private static ConnectedClusterBgpPeerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedClusterBgpPeerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedClusterBgpPeerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); ConnectedClusterBgpPeerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs index 5f08d162aca9..cd24c6ef7215 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterLoadBalancerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerOrchestratorRuntime { public partial class ConnectedClusterLoadBalancerResource : IJsonModel { + private static ConnectedClusterLoadBalancerData s_dataDeserializationInstance; + private static ConnectedClusterLoadBalancerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedClusterLoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedClusterLoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); ConnectedClusterLoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs index 82ab84892a7f..fbfa18167ce1 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerOrchestratorRuntime { public partial class ConnectedClusterServiceResource : IJsonModel { + private static ConnectedClusterServiceData s_dataDeserializationInstance; + private static ConnectedClusterServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedClusterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedClusterServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); ConnectedClusterServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs index 61a701b082bc..27f69b291c4a 100644 --- a/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs +++ b/sdk/containerorchestratorruntime/Azure.ResourceManager.ContainerOrchestratorRuntime/src/Generated/ConnectedClusterStorageClassResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerOrchestratorRuntime { public partial class ConnectedClusterStorageClassResource : IJsonModel { + private static ConnectedClusterStorageClassData s_dataDeserializationInstance; + private static ConnectedClusterStorageClassData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedClusterStorageClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedClusterStorageClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); ConnectedClusterStorageClassData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerOrchestratorRuntimeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.Serialization.cs index 5c27a9934dbc..0e9c92388403 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ConnectedRegistryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ConnectedRegistryResource : IJsonModel { + private static ConnectedRegistryData s_dataDeserializationInstance; + private static ConnectedRegistryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ConnectedRegistryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.Serialization.cs index 2e6774cdc9f5..70e0112a89c9 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryAgentPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryAgentPoolResource : IJsonModel { + private static ContainerRegistryAgentPoolData s_dataDeserializationInstance; + private static ContainerRegistryAgentPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryAgentPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.Serialization.cs index 845ef0ffd401..a41f165a587a 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCacheRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryCacheRuleResource : IJsonModel { + private static ContainerRegistryCacheRuleData s_dataDeserializationInstance; + private static ContainerRegistryCacheRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryCacheRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryCacheRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryCacheRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.Serialization.cs index 41959d49c0b7..4e089c5ab332 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryCredentialSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryCredentialSetResource : IJsonModel { + private static ContainerRegistryCredentialSetData s_dataDeserializationInstance; + private static ContainerRegistryCredentialSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryCredentialSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryCredentialSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryCredentialSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.Serialization.cs index 2b710178ae88..bb2ee3582d1b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryPrivateEndpointConnectionResource : IJsonModel { + private static ContainerRegistryPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ContainerRegistryPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.Serialization.cs index 30d30e6b3218..cb9541a41953 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryPrivateLinkResource : IJsonModel { + private static ContainerRegistryPrivateLinkResourceData s_dataDeserializationInstance; + private static ContainerRegistryPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.Serialization.cs index 309538e127ca..5293721f5e30 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryReplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryReplicationResource : IJsonModel { + private static ContainerRegistryReplicationData s_dataDeserializationInstance; + private static ContainerRegistryReplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryReplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryReplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryReplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.Serialization.cs index 60c7ca3f8bb0..e86199611417 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryResource : IJsonModel { + private static ContainerRegistryData s_dataDeserializationInstance; + private static ContainerRegistryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.Serialization.cs index 6b482e18939d..2c8962769a2b 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryRunResource : IJsonModel { + private static ContainerRegistryRunData s_dataDeserializationInstance; + private static ContainerRegistryRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.Serialization.cs index 53ddb5bd86d0..b863f17942b8 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryTaskResource : IJsonModel { + private static ContainerRegistryTaskData s_dataDeserializationInstance; + private static ContainerRegistryTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.Serialization.cs index 621642501d47..c9a2aeb663fc 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTaskRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryTaskRunResource : IJsonModel { + private static ContainerRegistryTaskRunData s_dataDeserializationInstance; + private static ContainerRegistryTaskRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryTaskRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryTaskRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryTaskRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.Serialization.cs index 673b3faa59d2..a49f5ddc4f08 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryTokenResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryTokenResource : IJsonModel { + private static ContainerRegistryTokenData s_dataDeserializationInstance; + private static ContainerRegistryTokenData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryTokenData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryTokenData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryTokenData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.Serialization.cs index b523511de117..42bc01f5a086 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ContainerRegistryWebhookResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ContainerRegistryWebhookResource : IJsonModel { + private static ContainerRegistryWebhookData s_dataDeserializationInstance; + private static ContainerRegistryWebhookData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerRegistryWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerRegistryWebhookData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ContainerRegistryWebhookData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.Serialization.cs b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.Serialization.cs index 45d4bc494115..037072a7cb19 100644 --- a/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.Serialization.cs +++ b/sdk/containerregistry/Azure.ResourceManager.ContainerRegistry/src/Generated/ScopeMapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerRegistry { public partial class ScopeMapResource : IJsonModel { + private static ScopeMapData s_dataDeserializationInstance; + private static ScopeMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScopeMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScopeMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerRegistryContext.Default); ScopeMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.Serialization.cs index 437c23f2bdc3..f36b23cd9cbf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class AgentPoolSnapshotResource : IJsonModel { + private static AgentPoolSnapshotData s_dataDeserializationInstance; + private static AgentPoolSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AgentPoolSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AgentPoolSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); AgentPoolSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.Serialization.cs index d12e2d3fe544..ae7f5235df12 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class AgentPoolUpgradeProfileResource : IJsonModel { + private static AgentPoolUpgradeProfileData s_dataDeserializationInstance; + private static AgentPoolUpgradeProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AgentPoolUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AgentPoolUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); AgentPoolUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.Serialization.cs index cab5d70d5dc6..099cbdb3f6d4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ContainerServiceAgentPoolResource : IJsonModel { + private static ContainerServiceAgentPoolData s_dataDeserializationInstance; + private static ContainerServiceAgentPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ContainerServiceAgentPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.Serialization.cs index d0ecc504ca88..7f7535261b21 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ContainerServiceMaintenanceConfigurationResource : IJsonModel { + private static ContainerServiceMaintenanceConfigurationData s_dataDeserializationInstance; + private static ContainerServiceMaintenanceConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceMaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceMaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ContainerServiceMaintenanceConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.Serialization.cs index 33d650ee4af4..9a0f20535686 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ContainerServiceManagedClusterResource : IJsonModel { + private static ContainerServiceManagedClusterData s_dataDeserializationInstance; + private static ContainerServiceManagedClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ContainerServiceManagedClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.Serialization.cs index 088dc2b06517..a7b9c0c8368c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ContainerServicePrivateEndpointConnectionResource : IJsonModel { + private static ContainerServicePrivateEndpointConnectionData s_dataDeserializationInstance; + private static ContainerServicePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServicePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServicePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ContainerServicePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.Serialization.cs index 4683086f3a6f..2b4d92b0b5c0 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ContainerServiceTrustedAccessRoleBindingResource : IJsonModel { + private static ContainerServiceTrustedAccessRoleBindingData s_dataDeserializationInstance; + private static ContainerServiceTrustedAccessRoleBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceTrustedAccessRoleBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceTrustedAccessRoleBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ContainerServiceTrustedAccessRoleBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.Serialization.cs index f75a241a1ff4..b190b9681586 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class ManagedClusterUpgradeProfileResource : IJsonModel { + private static ManagedClusterUpgradeProfileData s_dataDeserializationInstance; + private static ManagedClusterUpgradeProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedClusterUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedClusterUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); ManagedClusterUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.Serialization.cs index caa6fff2b5b8..9a93b471cd96 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class MeshRevisionProfileResource : IJsonModel { + private static MeshRevisionProfileData s_dataDeserializationInstance; + private static MeshRevisionProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MeshRevisionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MeshRevisionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); MeshRevisionProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.Serialization.cs index 53d8f5b8f4fc..9b7ac557747e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class MeshUpgradeProfileResource : IJsonModel { + private static MeshUpgradeProfileData s_dataDeserializationInstance; + private static MeshUpgradeProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MeshUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MeshUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); MeshUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileResource.Serialization.cs index c659a3d0bc65..8a9e762eba45 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileResource.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/OSOptionProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerService { public partial class OSOptionProfileResource : IJsonModel { + private static OSOptionProfileData s_dataDeserializationInstance; + private static OSOptionProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OSOptionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OSOptionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceContext.Default); OSOptionProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net462.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net462.cs index 9988e24a13d6..1708bc408c13 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net462.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net462.cs @@ -126,15 +126,15 @@ public abstract partial class AuthenticationTokenProvider { protected AuthenticationTokenProvider() { } public abstract System.ClientModel.Primitives.GetTokenOptions? CreateTokenOptions(System.Collections.Generic.IReadOnlyDictionary properties); - public abstract System.ClientModel.Primitives.AccessToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); - public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.ClientModel.Primitives.AuthenticationToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); } } namespace System.ClientModel.Primitives { - public partial class AccessToken + public partial class AuthenticationToken { - public AccessToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } + public AuthenticationToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } public System.DateTimeOffset ExpiresOn { get { throw null; } } public System.DateTimeOffset? RefreshOn { get { throw null; } } public string TokenType { get { throw null; } } diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs index 9988e24a13d6..1708bc408c13 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net6.0.cs @@ -126,15 +126,15 @@ public abstract partial class AuthenticationTokenProvider { protected AuthenticationTokenProvider() { } public abstract System.ClientModel.Primitives.GetTokenOptions? CreateTokenOptions(System.Collections.Generic.IReadOnlyDictionary properties); - public abstract System.ClientModel.Primitives.AccessToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); - public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.ClientModel.Primitives.AuthenticationToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); } } namespace System.ClientModel.Primitives { - public partial class AccessToken + public partial class AuthenticationToken { - public AccessToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } + public AuthenticationToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } public System.DateTimeOffset ExpiresOn { get { throw null; } } public System.DateTimeOffset? RefreshOn { get { throw null; } } public string TokenType { get { throw null; } } diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net8.0.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net8.0.cs index 9988e24a13d6..1708bc408c13 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net8.0.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.net8.0.cs @@ -126,15 +126,15 @@ public abstract partial class AuthenticationTokenProvider { protected AuthenticationTokenProvider() { } public abstract System.ClientModel.Primitives.GetTokenOptions? CreateTokenOptions(System.Collections.Generic.IReadOnlyDictionary properties); - public abstract System.ClientModel.Primitives.AccessToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); - public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.ClientModel.Primitives.AuthenticationToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); } } namespace System.ClientModel.Primitives { - public partial class AccessToken + public partial class AuthenticationToken { - public AccessToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } + public AuthenticationToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } public System.DateTimeOffset ExpiresOn { get { throw null; } } public System.DateTimeOffset? RefreshOn { get { throw null; } } public string TokenType { get { throw null; } } diff --git a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs index 9988e24a13d6..1708bc408c13 100644 --- a/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs +++ b/sdk/core/Azure.Core.Experimental/api/Azure.Core.Experimental.netstandard2.0.cs @@ -126,15 +126,15 @@ public abstract partial class AuthenticationTokenProvider { protected AuthenticationTokenProvider() { } public abstract System.ClientModel.Primitives.GetTokenOptions? CreateTokenOptions(System.Collections.Generic.IReadOnlyDictionary properties); - public abstract System.ClientModel.Primitives.AccessToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); - public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.ClientModel.Primitives.AuthenticationToken GetToken(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); + public abstract System.Threading.Tasks.ValueTask GetTokenAsync(System.ClientModel.Primitives.GetTokenOptions properties, System.Threading.CancellationToken cancellationToken); } } namespace System.ClientModel.Primitives { - public partial class AccessToken + public partial class AuthenticationToken { - public AccessToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } + public AuthenticationToken(string tokenValue, string tokenType, System.DateTimeOffset expiresOn, System.DateTimeOffset? refreshOn = default(System.DateTimeOffset?)) { } public System.DateTimeOffset ExpiresOn { get { throw null; } } public System.DateTimeOffset? RefreshOn { get { throw null; } } public string TokenType { get { throw null; } } diff --git a/sdk/core/Azure.Core.Experimental/src/Auth/AccessToken.cs b/sdk/core/Azure.Core.Experimental/src/Auth/AccessToken.cs index 9faceb0f2881..b849386ea80d 100644 --- a/sdk/core/Azure.Core.Experimental/src/Auth/AccessToken.cs +++ b/sdk/core/Azure.Core.Experimental/src/Auth/AccessToken.cs @@ -10,17 +10,17 @@ namespace System.ClientModel.Primitives; /// /// Represents an OAuth token and its metadata. /// -public class AccessToken +public class AuthenticationToken { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// /// The access token value. /// The type of the access token (e.g., "Bearer"). /// The date and time when the token expires. /// Optional. The date and time when the token should be refreshed. Default is null. /// Thrown when is null or empty. - public AccessToken(string tokenValue, string tokenType, DateTimeOffset expiresOn, DateTimeOffset? refreshOn = null) + public AuthenticationToken(string tokenValue, string tokenType, DateTimeOffset expiresOn, DateTimeOffset? refreshOn = null) { Argument.AssertNotNullOrEmpty(tokenValue, nameof(tokenValue)); diff --git a/sdk/core/Azure.Core.Experimental/src/Auth/AuthenticationTokenProvider.cs b/sdk/core/Azure.Core.Experimental/src/Auth/AuthenticationTokenProvider.cs index 1c5989e3e1b2..7cbcb560ed14 100644 --- a/sdk/core/Azure.Core.Experimental/src/Auth/AuthenticationTokenProvider.cs +++ b/sdk/core/Azure.Core.Experimental/src/Auth/AuthenticationTokenProvider.cs @@ -26,7 +26,7 @@ public abstract class AuthenticationTokenProvider /// The options used by the to make a token request. /// A controlling the request lifetime. /// - public abstract AccessToken GetToken(GetTokenOptions properties, CancellationToken cancellationToken); + public abstract AuthenticationToken GetToken(GetTokenOptions properties, CancellationToken cancellationToken); /// /// Gets the token. @@ -34,5 +34,5 @@ public abstract class AuthenticationTokenProvider /// The options used by the to make a token request. /// A controlling the request lifetime. /// - public abstract ValueTask GetTokenAsync(GetTokenOptions properties, CancellationToken cancellationToken); + public abstract ValueTask GetTokenAsync(GetTokenOptions properties, CancellationToken cancellationToken); } diff --git a/sdk/core/Azure.Core.Experimental/src/Auth/OAuth2BearerTokenAuthenticationPolicy.cs b/sdk/core/Azure.Core.Experimental/src/Auth/OAuth2BearerTokenAuthenticationPolicy.cs index f3fe67021f3b..1c10b5ffd9c8 100644 --- a/sdk/core/Azure.Core.Experimental/src/Auth/OAuth2BearerTokenAuthenticationPolicy.cs +++ b/sdk/core/Azure.Core.Experimental/src/Auth/OAuth2BearerTokenAuthenticationPolicy.cs @@ -42,7 +42,7 @@ private async ValueTask ProcessAsync(PipelineMessage message, IReadOnlyList GetTokenAsync(GetTokenOptions properties, CancellationToken cancellationToken) + public override async ValueTask GetTokenAsync(GetTokenOptions properties, CancellationToken cancellationToken) { return await GetAccessTokenInternal(true, properties, cancellationToken).ConfigureAwait(false); } @@ -157,7 +157,7 @@ public override GetTokenOptions CreateTokenOptions(IReadOnlyDictionary GetAccessTokenInternal(bool async, GetTokenOptions properties, CancellationToken cancellationToken) + internal async ValueTask GetAccessTokenInternal(bool async, GetTokenOptions properties, CancellationToken cancellationToken) { if (!properties.Properties.TryGetValue("tokenUrl", out var tokenUri) || tokenUri is not string tokenUriValue) { @@ -199,11 +199,11 @@ await _client.SendAsync(request) : DateTimeOffset expiresOn = now.AddSeconds(expiresIn); DateTimeOffset refreshOn = now.AddSeconds(expiresIn * 0.85); - return new AccessToken(accessToken, tokenType, expiresOn, refreshOn); + return new AuthenticationToken(accessToken, tokenType, expiresOn, refreshOn); } } - public class ClientCredentialToken : AccessToken + public class ClientCredentialToken : AuthenticationToken { private AuthenticationTokenProvider _provider; private GetTokenOptions properties; diff --git a/sdk/core/Azure.Core/tests/compatibility/ExpectedAotWarnings.txt b/sdk/core/Azure.Core/tests/compatibility/ExpectedAotWarnings.txt index 915a5ee86153..8c6835c5e3ae 100644 --- a/sdk/core/Azure.Core/tests/compatibility/ExpectedAotWarnings.txt +++ b/sdk/core/Azure.Core/tests/compatibility/ExpectedAotWarnings.txt @@ -8,6 +8,4 @@ ILC : AOT analysis warning IL3050: Azure\.Core\.Json\.MutableJsonDocument: Using .*Azure\.Core.src.DynamicData.DynamicData\.ObjectEnumerator\.cs\(\d*\): AOT analysis warning IL3050: Azure\.Core\.Serialization\.DynamicData\.ObjectEnumerator\.Current\.get: Using member 'Azure\.Core\.Serialization\.DynamicData\.DynamicData\(MutableJsonElement,DynamicDataOptions\)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling\. This class utilizes reflection-based JSON serialization and deserialization which is not compatible with trimming .*Azure\.Core.src.DynamicData.DynamicDataProperty\.cs\(\d*\): Trim analysis warning IL2026: Azure\.Core\.Serialization\.DynamicDataProperty\.System\.Dynamic\.IDynamicMetaObjectProvider\.GetMetaObject\(Expression\): Using member 'Azure\.Core\.Serialization\.DynamicDataProperty\.MetaObject\.MetaObject\(Expression,IDynamicMetaObjectProvider\)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code ILC : Trim analysis warning IL2026: Azure\.Messaging\.CloudEvent: Using member 'Azure\.Messaging\.CloudEventConverter\.CloudEventConverter\(\)' which has 'RequiresUnreferencedCodeAttribute' can break functionality when trimming application code\. This utilizes reflection-based JSON serialization and deserialization which is not compatible with trimming -ILC : AOT analysis warning IL3050: Azure\.Messaging\.CloudEvent: Using member 'Azure\.Messaging\.CloudEventConverter\.CloudEventConverter\(\)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling\. This utilizes reflection-based JSON serialization and deserialization which is not compatible with trimming -ILC : AOT analysis warning IL3050: System\.BinaryData\.BinaryData\(Object,JsonSerializerOptions,Type\): Using member 'System\.Text\.Json\.JsonSerializer\.SerializeToUtf8Bytes\(Object,Type,JsonSerializerOptions\)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling\. JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation\. Use System\.Text\.Json source generation for native AOT applications -ILC : AOT analysis warning IL3050: System\.BinaryData\.ToObjectFromJson\(JsonSerializerOptions\): Using member 'System\.Text\.Json\.JsonSerializer\.Deserialize\(ReadOnlySpan`1,JsonSerializerOptions\)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling\. JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation\. Use System\.Text\.Json source generation for native AOT applications \ No newline at end of file +ILC : AOT analysis warning IL3050: Azure\.Messaging\.CloudEvent: Using member 'Azure\.Messaging\.CloudEventConverter\.CloudEventConverter\(\)' which has 'RequiresDynamicCodeAttribute' can break functionality when AOT compiling\. This utilizes reflection-based JSON serialization and deserialization which is not compatible with trimming \ No newline at end of file diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.Serialization.cs index 450a945da429..71ca3095d06a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraClusterResource : IJsonModel { + private static CassandraClusterData s_dataDeserializationInstance; + private static CassandraClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CassandraClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CassandraClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CassandraClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterResource.Serialization.cs index 0332e6c8ecd0..10bc5c81820a 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraDataCenterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraDataCenterResource : IJsonModel { + private static CassandraDataCenterData s_dataDeserializationInstance; + private static CassandraDataCenterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CassandraDataCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CassandraDataCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CassandraDataCenterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.Serialization.cs index 5f7caad5e9d7..4e9dec95d330 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraKeyspaceResource : IJsonModel { + private static CassandraKeyspaceData s_dataDeserializationInstance; + private static CassandraKeyspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CassandraKeyspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CassandraKeyspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CassandraKeyspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceThroughputSettingResource.Serialization.cs index 1810f58421b0..177e383286d1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraKeyspaceThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraKeyspaceThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableResource.Serialization.cs index 5d3e3fddaa62..3f14e8a55976 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraTableResource : IJsonModel { + private static CassandraTableData s_dataDeserializationInstance; + private static CassandraTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CassandraTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CassandraTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CassandraTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableThroughputSettingResource.Serialization.cs index 173ded730e4c..a32b174b28b0 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraTableThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraTableThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.Serialization.cs index 320a2d792be5..2ad5f8861003 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewGetResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraViewGetResultResource : IJsonModel { + private static CassandraViewGetResultData s_dataDeserializationInstance; + private static CassandraViewGetResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CassandraViewGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CassandraViewGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CassandraViewGetResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.Serialization.cs index 4f7bbf312c1b..ca8c2c1fa7a2 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CassandraViewThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CassandraViewThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.Serialization.cs index 8ced16026a85..914991c0c318 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBAccountResource : IJsonModel { + private static CosmosDBAccountData s_dataDeserializationInstance; + private static CosmosDBAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBChaosFaultResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBChaosFaultResource.Serialization.cs index 863b6ab9d30e..142722b15779 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBChaosFaultResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBChaosFaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBChaosFaultResource : IJsonModel { + private static CosmosDBChaosFaultResourceData s_dataDeserializationInstance; + private static CosmosDBChaosFaultResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBChaosFaultResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBChaosFaultResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBChaosFaultResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.Serialization.cs index 476df3cf09ba..8dc200a4a927 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBLocationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBLocationResource : IJsonModel { + private static CosmosDBLocationData s_dataDeserializationInstance; + private static CosmosDBLocationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBLocationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionResource.Serialization.cs index efc9fc35326c..df048ecdca61 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBPrivateEndpointConnectionResource : IJsonModel { + private static CosmosDBPrivateEndpointConnectionData s_dataDeserializationInstance; + private static CosmosDBPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResource.Serialization.cs index d58e4b1af83b..182b7289ce7f 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBPrivateLinkResource : IJsonModel { + private static CosmosDBPrivateLinkResourceData s_dataDeserializationInstance; + private static CosmosDBPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceResource.Serialization.cs index aa680db809da..787155d33987 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBServiceResource : IJsonModel { + private static CosmosDBServiceData s_dataDeserializationInstance; + private static CosmosDBServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyResource.Serialization.cs index 7b7bd23619d8..8043bf13d168 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlClientEncryptionKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlClientEncryptionKeyResource : IJsonModel { + private static CosmosDBSqlClientEncryptionKeyData s_dataDeserializationInstance; + private static CosmosDBSqlClientEncryptionKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlClientEncryptionKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlClientEncryptionKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlClientEncryptionKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.Serialization.cs index 927eaeca1963..d76c8e1ebe86 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlContainerResource : IJsonModel { + private static CosmosDBSqlContainerData s_dataDeserializationInstance; + private static CosmosDBSqlContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.Serialization.cs index dcc585605e97..61be475aefb6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlContainerThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlContainerThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.Serialization.cs index c475d25d0c27..f46f5521b2e1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlDatabaseResource : IJsonModel { + private static CosmosDBSqlDatabaseData s_dataDeserializationInstance; + private static CosmosDBSqlDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.Serialization.cs index 70f3bda500d8..109b00c2effb 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlDatabaseThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlDatabaseThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentResource.Serialization.cs index f89e173d5b27..c9d2c8a7ef77 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlRoleAssignmentResource : IJsonModel { + private static CosmosDBSqlRoleAssignmentData s_dataDeserializationInstance; + private static CosmosDBSqlRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionResource.Serialization.cs index 47903d603b80..b67321a6cbd8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlRoleDefinitionResource : IJsonModel { + private static CosmosDBSqlRoleDefinitionData s_dataDeserializationInstance; + private static CosmosDBSqlRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureResource.Serialization.cs index 1934e48666c4..87d62f2634f7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlStoredProcedureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlStoredProcedureResource : IJsonModel { + private static CosmosDBSqlStoredProcedureData s_dataDeserializationInstance; + private static CosmosDBSqlStoredProcedureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlStoredProcedureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlStoredProcedureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlStoredProcedureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerResource.Serialization.cs index c7361bc18d75..25fcaa0d7641 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlTriggerResource : IJsonModel { + private static CosmosDBSqlTriggerData s_dataDeserializationInstance; + private static CosmosDBSqlTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionResource.Serialization.cs index c9862034f041..efa848f009b4 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBSqlUserDefinedFunctionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBSqlUserDefinedFunctionResource : IJsonModel { + private static CosmosDBSqlUserDefinedFunctionData s_dataDeserializationInstance; + private static CosmosDBSqlUserDefinedFunctionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBSqlUserDefinedFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBSqlUserDefinedFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBSqlUserDefinedFunctionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableResource.Serialization.cs index 20c72b27c66d..2b4a8bbe5cfe 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBTableResource : IJsonModel { + private static CosmosDBTableData s_dataDeserializationInstance; + private static CosmosDBTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleAssignmentResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleAssignmentResource.Serialization.cs index d938674b2782..88bff0b3fd0c 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleAssignmentResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBTableRoleAssignmentResource : IJsonModel { + private static CosmosDBTableRoleAssignmentData s_dataDeserializationInstance; + private static CosmosDBTableRoleAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBTableRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBTableRoleAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBTableRoleAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleDefinitionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleDefinitionResource.Serialization.cs index f6b02c00fc92..6c501deca0e3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleDefinitionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBTableRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBTableRoleDefinitionResource : IJsonModel { + private static CosmosDBTableRoleDefinitionData s_dataDeserializationInstance; + private static CosmosDBTableRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBTableRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBTableRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBTableRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountResource.Serialization.cs index 3f5055acf8a9..53ad28fe4605 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBThroughputPoolAccountResource : IJsonModel { + private static CosmosDBThroughputPoolAccountData s_dataDeserializationInstance; + private static CosmosDBThroughputPoolAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBThroughputPoolAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBThroughputPoolAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBThroughputPoolAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolResource.Serialization.cs index 4e4a667d144a..417e587176ca 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosDBThroughputPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosDBThroughputPoolResource : IJsonModel { + private static CosmosDBThroughputPoolData s_dataDeserializationInstance; + private static CosmosDBThroughputPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBThroughputPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBThroughputPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); CosmosDBThroughputPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosTableThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosTableThroughputSettingResource.Serialization.cs index 58c3011d89ac..06f037fd14da 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosTableThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/CosmosTableThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class CosmosTableThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.Serialization.cs index a30d78305cb6..5bb8eb0e6da8 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/DataTransferJobGetResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class DataTransferJobGetResultResource : IJsonModel { + private static DataTransferJobGetResultData s_dataDeserializationInstance; + private static DataTransferJobGetResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataTransferJobGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataTransferJobGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); DataTransferJobGetResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.Serialization.cs index c93677b04c9a..d7640367e438 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GraphResourceGetResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class GraphResourceGetResultResource : IJsonModel { + private static GraphResourceGetResultData s_dataDeserializationInstance; + private static GraphResourceGetResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GraphResourceGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GraphResourceGetResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); GraphResourceGetResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseResource.Serialization.cs index 32855e4aeb2c..083ff2ebe8ec 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class GremlinDatabaseResource : IJsonModel { + private static GremlinDatabaseData s_dataDeserializationInstance; + private static GremlinDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GremlinDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GremlinDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); GremlinDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseThroughputSettingResource.Serialization.cs index c811da7a94be..67d658874549 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinDatabaseThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class GremlinDatabaseThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphResource.Serialization.cs index ba6adfef7f70..48382e155fd6 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class GremlinGraphResource : IJsonModel { + private static GremlinGraphData s_dataDeserializationInstance; + private static GremlinGraphData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GremlinGraphData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GremlinGraphData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); GremlinGraphData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphThroughputSettingResource.Serialization.cs index e68ef7d31ada..388c26dc7666 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/GremlinGraphThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class GremlinGraphThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.Serialization.cs index 59f058e6d5a3..325699fc3248 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBCollectionResource : IJsonModel { + private static MongoDBCollectionData s_dataDeserializationInstance; + private static MongoDBCollectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoDBCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoDBCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); MongoDBCollectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.Serialization.cs index 84f2244ef931..fa2876a66b5e 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBCollectionThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBCollectionThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.Serialization.cs index 4ba6fdaec4ef..10c10d1fffd9 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBDatabaseResource : IJsonModel { + private static MongoDBDatabaseData s_dataDeserializationInstance; + private static MongoDBDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoDBDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoDBDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); MongoDBDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.Serialization.cs index 752a618d487f..ca5d143d3396 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBDatabaseThroughputSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBDatabaseThroughputSettingResource : IJsonModel { + private static ThroughputSettingData s_dataDeserializationInstance; + private static ThroughputSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ThroughputSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); ThroughputSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionResource.Serialization.cs index af72a0727dca..c9d271cefac3 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBRoleDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBRoleDefinitionResource : IJsonModel { + private static MongoDBRoleDefinitionData s_dataDeserializationInstance; + private static MongoDBRoleDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoDBRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoDBRoleDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); MongoDBRoleDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionResource.Serialization.cs index fa60d11695b7..c4ce11945c60 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/MongoDBUserDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class MongoDBUserDefinitionResource : IJsonModel { + private static MongoDBUserDefinitionData s_dataDeserializationInstance; + private static MongoDBUserDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoDBUserDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoDBUserDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); MongoDBUserDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index 3b33f4bebaad..824fb7fb61b7 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountResource.Serialization.cs b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountResource.Serialization.cs index f8876a05471e..f37cb3ed50b1 100644 --- a/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountResource.Serialization.cs +++ b/sdk/cosmosdb/Azure.ResourceManager.CosmosDB/src/Generated/RestorableCosmosDBAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDB { public partial class RestorableCosmosDBAccountResource : IJsonModel { + private static RestorableCosmosDBAccountData s_dataDeserializationInstance; + private static RestorableCosmosDBAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RestorableCosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RestorableCosmosDBAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBContext.Default); RestorableCosmosDBAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterResource.Serialization.cs index d8ac9a703439..0f99ab04f8e9 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlClusterResource : IJsonModel { + private static CosmosDBForPostgreSqlClusterData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterServerResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterServerResource.Serialization.cs index 87bc2ec2bf48..f06336679d40 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterServerResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlClusterServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlClusterServerResource : IJsonModel { + private static CosmosDBForPostgreSqlClusterServerData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlClusterServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlClusterServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlClusterServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlClusterServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlConfigurationResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlConfigurationResource.Serialization.cs index 6a3a23bf9d5f..94c23229e8b7 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlConfigurationResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlConfigurationResource : IJsonModel { + private static CosmosDBForPostgreSqlConfigurationData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlCoordinatorConfigurationResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlCoordinatorConfigurationResource.Serialization.cs index c849e836dee1..5e201f67659c 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlCoordinatorConfigurationResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlCoordinatorConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlCoordinatorConfigurationResource : IJsonModel { + private static CosmosDBForPostgreSqlServerConfigurationData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlServerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlServerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlFirewallRuleResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlFirewallRuleResource.Serialization.cs index f70c520dc899..799b9eec142a 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlFirewallRuleResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlFirewallRuleResource : IJsonModel { + private static CosmosDBForPostgreSqlFirewallRuleData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlNodeConfigurationResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlNodeConfigurationResource.Serialization.cs index e70915f78c08..3579e509976d 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlNodeConfigurationResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlNodeConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlNodeConfigurationResource : IJsonModel { + private static CosmosDBForPostgreSqlServerConfigurationData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlServerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlServerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateEndpointConnectionResource.Serialization.cs index 38c69299aeb7..91186d605be4 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlPrivateEndpointConnectionResource : IJsonModel { + private static CosmosDBForPostgreSqlPrivateEndpointConnectionData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateLinkResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateLinkResource.Serialization.cs index 305bc363a308..ca6cfaef2c2b 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateLinkResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlPrivateLinkResource : IJsonModel { + private static CosmosDBForPostgreSqlPrivateLinkResourceData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlRoleResource.Serialization.cs b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlRoleResource.Serialization.cs index c45b859c4c91..8832bd4a5dd3 100644 --- a/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlRoleResource.Serialization.cs +++ b/sdk/cosmosdbforpostgresql/Azure.ResourceManager.CosmosDBForPostgreSql/src/Generated/CosmosDBForPostgreSqlRoleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CosmosDBForPostgreSql { public partial class CosmosDBForPostgreSqlRoleResource : IJsonModel { + private static CosmosDBForPostgreSqlRoleData s_dataDeserializationInstance; + private static CosmosDBForPostgreSqlRoleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CosmosDBForPostgreSqlRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CosmosDBForPostgreSqlRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); CosmosDBForPostgreSqlRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCosmosDBForPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.Serialization.cs index edc7e250446b..0d191763db46 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { public partial class CostManagementAlertResource : IJsonModel { + private static CostManagementAlertData s_dataDeserializationInstance; + private static CostManagementAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CostManagementAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CostManagementAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); CostManagementAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.Serialization.cs index e3273a40c499..e8e8fa4b39a4 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementExportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { public partial class CostManagementExportResource : IJsonModel { + private static CostManagementExportData s_dataDeserializationInstance; + private static CostManagementExportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CostManagementExportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CostManagementExportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); CostManagementExportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.Serialization.cs index bdb384d56cfd..d5231ced5158 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/CostManagementViewsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { public partial class CostManagementViewsResource : IJsonModel { + private static CostManagementViewData s_dataDeserializationInstance; + private static CostManagementViewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CostManagementViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CostManagementViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); CostManagementViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ScheduledActionResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ScheduledActionResource.Serialization.cs index b66984b862ca..03a2bfca62ad 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ScheduledActionResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/ScheduledActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { 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)Data).Create(ref reader, options); + ScheduledActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); ScheduledActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantScheduledActionResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantScheduledActionResource.Serialization.cs index a8273f64f9ba..8f4e5cea3da3 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantScheduledActionResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantScheduledActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { public partial class TenantScheduledActionResource : 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)Data).Create(ref reader, options); + ScheduledActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); ScheduledActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantsCostManagementViewsResource.Serialization.cs b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantsCostManagementViewsResource.Serialization.cs index 12b6d06aa6ac..1c665d266459 100644 --- a/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantsCostManagementViewsResource.Serialization.cs +++ b/sdk/costmanagement/Azure.ResourceManager.CostManagement/src/Generated/TenantsCostManagementViewsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CostManagement { public partial class TenantsCostManagementViewsResource : IJsonModel { + private static CostManagementViewData s_dataDeserializationInstance; + private static CostManagementViewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CostManagementViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CostManagementViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCostManagementContext.Default); CostManagementViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCostManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/AuthorizationPolicyResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/AuthorizationPolicyResourceFormatResource.Serialization.cs index 26669f91ba62..2038642504c9 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/AuthorizationPolicyResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/AuthorizationPolicyResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class AuthorizationPolicyResourceFormatResource : IJsonModel { + private static AuthorizationPolicyResourceFormatData s_dataDeserializationInstance; + private static AuthorizationPolicyResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AuthorizationPolicyResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AuthorizationPolicyResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); AuthorizationPolicyResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorMappingResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorMappingResourceFormatResource.Serialization.cs index 3bee367ff712..4544b4b89d49 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorMappingResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorMappingResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class ConnectorMappingResourceFormatResource : IJsonModel { + private static ConnectorMappingResourceFormatData s_dataDeserializationInstance; + private static ConnectorMappingResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectorMappingResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectorMappingResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); ConnectorMappingResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorResourceFormatResource.Serialization.cs index 329103a08dd6..a76ca479265d 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ConnectorResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class ConnectorResourceFormatResource : IJsonModel { + private static ConnectorResourceFormatData s_dataDeserializationInstance; + private static ConnectorResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectorResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectorResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); ConnectorResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/HubResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/HubResource.Serialization.cs index 9975c37e48c8..03e75bce3ae2 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/HubResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/HubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class HubResource : IJsonModel { + private static HubData s_dataDeserializationInstance; + private static HubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); HubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/InteractionResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/InteractionResourceFormatResource.Serialization.cs index 81a45e94e5aa..9ddc27647e7c 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/InteractionResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/InteractionResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class InteractionResourceFormatResource : IJsonModel { + private static InteractionResourceFormatData s_dataDeserializationInstance; + private static InteractionResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InteractionResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InteractionResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); InteractionResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/KpiResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/KpiResourceFormatResource.Serialization.cs index 4192f473d6a1..69bda58af298 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/KpiResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/KpiResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class KpiResourceFormatResource : IJsonModel { + private static KpiResourceFormatData s_dataDeserializationInstance; + private static KpiResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KpiResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KpiResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); KpiResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/LinkResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/LinkResourceFormatResource.Serialization.cs index 04149a9bc167..cd049bad2896 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/LinkResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/LinkResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class LinkResourceFormatResource : IJsonModel { + private static LinkResourceFormatData s_dataDeserializationInstance; + private static LinkResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LinkResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LinkResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); LinkResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/PredictionResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/PredictionResourceFormatResource.Serialization.cs index f49f7f7e878a..13d8648ee29d 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/PredictionResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/PredictionResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class PredictionResourceFormatResource : IJsonModel { + private static PredictionResourceFormatData s_dataDeserializationInstance; + private static PredictionResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PredictionResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PredictionResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); PredictionResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ProfileResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ProfileResourceFormatResource.Serialization.cs index 422a6543cfd6..ff6de0334921 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ProfileResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ProfileResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class ProfileResourceFormatResource : IJsonModel { + private static ProfileResourceFormatData s_dataDeserializationInstance; + private static ProfileResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProfileResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProfileResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); ProfileResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipLinkResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipLinkResourceFormatResource.Serialization.cs index 401d6c33dfe9..86eb7b914385 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipLinkResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipLinkResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class RelationshipLinkResourceFormatResource : IJsonModel { + private static RelationshipLinkResourceFormatData s_dataDeserializationInstance; + private static RelationshipLinkResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelationshipLinkResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelationshipLinkResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); RelationshipLinkResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipResourceFormatResource.Serialization.cs index a7814af7be73..d72f0c8fd5e8 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RelationshipResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class RelationshipResourceFormatResource : IJsonModel { + private static RelationshipResourceFormatData s_dataDeserializationInstance; + private static RelationshipResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelationshipResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelationshipResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); RelationshipResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RoleAssignmentResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RoleAssignmentResourceFormatResource.Serialization.cs index cab9aa6067c2..e1bcd0bce4fc 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RoleAssignmentResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/RoleAssignmentResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class RoleAssignmentResourceFormatResource : IJsonModel { + private static RoleAssignmentResourceFormatData s_dataDeserializationInstance; + private static RoleAssignmentResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoleAssignmentResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoleAssignmentResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); RoleAssignmentResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ViewResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ViewResourceFormatResource.Serialization.cs index 1932742e87d2..10f3e15a3847 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ViewResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/ViewResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class ViewResourceFormatResource : IJsonModel { + private static ViewResourceFormatData s_dataDeserializationInstance; + private static ViewResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ViewResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ViewResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); ViewResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/WidgetTypeResourceFormatResource.Serialization.cs b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/WidgetTypeResourceFormatResource.Serialization.cs index 78b7e1479bf9..ac5cbcf5ff9f 100644 --- a/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/WidgetTypeResourceFormatResource.Serialization.cs +++ b/sdk/customer-insights/Azure.ResourceManager.CustomerInsights/src/Generated/WidgetTypeResourceFormatResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.CustomerInsights { public partial class WidgetTypeResourceFormatResource : IJsonModel { + private static WidgetTypeResourceFormatData s_dataDeserializationInstance; + private static WidgetTypeResourceFormatData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WidgetTypeResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WidgetTypeResourceFormatData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerCustomerInsightsContext.Default); WidgetTypeResourceFormatData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerCustomerInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherAlertRuleResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherAlertRuleResource.Serialization.cs index 0a207ebfc762..7e42f9b4938f 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherAlertRuleResource.Serialization.cs +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherAlertRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DatabaseWatcher { public partial class DatabaseWatcherAlertRuleResource : IJsonModel { + private static DatabaseWatcherAlertRuleData s_dataDeserializationInstance; + private static DatabaseWatcherAlertRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseWatcherAlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseWatcherAlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatabaseWatcherContext.Default); DatabaseWatcherAlertRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatabaseWatcherContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherHealthValidationResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherHealthValidationResource.Serialization.cs index e0c4f4149ac2..1efe506db8c9 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherHealthValidationResource.Serialization.cs +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherHealthValidationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DatabaseWatcher { public partial class DatabaseWatcherHealthValidationResource : IJsonModel { + private static DatabaseWatcherHealthValidationData s_dataDeserializationInstance; + private static DatabaseWatcherHealthValidationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseWatcherHealthValidationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseWatcherHealthValidationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatabaseWatcherContext.Default); DatabaseWatcherHealthValidationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatabaseWatcherContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherResource.Serialization.cs index 66693b3f2cbe..53cd386afc1d 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherResource.Serialization.cs +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DatabaseWatcher { public partial class DatabaseWatcherResource : IJsonModel { + private static DatabaseWatcherData s_dataDeserializationInstance; + private static DatabaseWatcherData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatabaseWatcherContext.Default); DatabaseWatcherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatabaseWatcherContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherSharedPrivateLinkResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherSharedPrivateLinkResource.Serialization.cs index fc6cf8a2d03d..eb54c734db15 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherSharedPrivateLinkResource.Serialization.cs +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherSharedPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DatabaseWatcher { public partial class DatabaseWatcherSharedPrivateLinkResource : IJsonModel { + private static DatabaseWatcherSharedPrivateLinkResourceData s_dataDeserializationInstance; + private static DatabaseWatcherSharedPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseWatcherSharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseWatcherSharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatabaseWatcherContext.Default); DatabaseWatcherSharedPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatabaseWatcherContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherTargetResource.Serialization.cs b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherTargetResource.Serialization.cs index 1a5ea4821d03..2d44a5f92710 100644 --- a/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherTargetResource.Serialization.cs +++ b/sdk/databasewatcher/Azure.ResourceManager.DatabaseWatcher/src/Generated/DatabaseWatcherTargetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DatabaseWatcher { public partial class DatabaseWatcherTargetResource : IJsonModel { + private static DatabaseWatcherTargetData s_dataDeserializationInstance; + private static DatabaseWatcherTargetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseWatcherTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseWatcherTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatabaseWatcherContext.Default); DatabaseWatcherTargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatabaseWatcherContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.Serialization.cs b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.Serialization.cs index 36392e74a814..b7570bab2bca 100644 --- a/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.Serialization.cs +++ b/sdk/databox/Azure.ResourceManager.DataBox/src/Generated/DataBoxJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBox { public partial class DataBoxJobResource : IJsonModel { + private static DataBoxJobData s_dataDeserializationInstance; + private static DataBoxJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxContext.Default); DataBoxJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/BandwidthScheduleResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/BandwidthScheduleResource.Serialization.cs index 5573f7529902..4bff5ac6b95b 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/BandwidthScheduleResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/BandwidthScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class BandwidthScheduleResource : IJsonModel { + private static BandwidthScheduleData s_dataDeserializationInstance; + private static BandwidthScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BandwidthScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BandwidthScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); BandwidthScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeAlertResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeAlertResource.Serialization.cs index 5017062539cf..6fd554c3756d 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeAlertResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeAlertResource : IJsonModel { + private static DataBoxEdgeAlertData s_dataDeserializationInstance; + private static DataBoxEdgeAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeDeviceResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeDeviceResource.Serialization.cs index 7af0e6783b90..f05465811e91 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeDeviceResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeDeviceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeDeviceResource : IJsonModel { + private static DataBoxEdgeDeviceData s_dataDeserializationInstance; + private static DataBoxEdgeDeviceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeDeviceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeJobResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeJobResource.Serialization.cs index fb13ad407ff5..a6bfe006949a 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeJobResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeJobResource : IJsonModel { + private static DataBoxEdgeJobData s_dataDeserializationInstance; + private static DataBoxEdgeJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeOrderResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeOrderResource.Serialization.cs index 9efbc8b6f74a..c1a54d8506f6 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeOrderResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeOrderResource : IJsonModel { + private static DataBoxEdgeOrderData s_dataDeserializationInstance; + private static DataBoxEdgeOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleAddonResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleAddonResource.Serialization.cs index 9cb9cc2e217b..463747641271 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleAddonResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleAddonResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeRoleAddonResource : IJsonModel { + private static DataBoxEdgeRoleAddonData s_dataDeserializationInstance; + private static DataBoxEdgeRoleAddonData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeRoleAddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeRoleAddonData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeRoleAddonData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleResource.Serialization.cs index d852b5342ded..555c33994727 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeRoleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeRoleResource : IJsonModel { + private static DataBoxEdgeRoleData s_dataDeserializationInstance; + private static DataBoxEdgeRoleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeRoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeRoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeShareResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeShareResource.Serialization.cs index f7c189cec3b0..17193274df91 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeShareResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeShareResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeShareResource : IJsonModel { + private static DataBoxEdgeShareData s_dataDeserializationInstance; + private static DataBoxEdgeShareData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeShareData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountCredentialResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountCredentialResource.Serialization.cs index 7cbb27fe7f58..36574a0a689c 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountCredentialResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountCredentialResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeStorageAccountCredentialResource : IJsonModel { + private static DataBoxEdgeStorageAccountCredentialData s_dataDeserializationInstance; + private static DataBoxEdgeStorageAccountCredentialData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeStorageAccountCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeStorageAccountCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeStorageAccountCredentialData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountResource.Serialization.cs index 8d106de18e7e..41507c8fe40a 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeStorageAccountResource : IJsonModel { + private static DataBoxEdgeStorageAccountData s_dataDeserializationInstance; + private static DataBoxEdgeStorageAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeStorageAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeStorageAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeStorageAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageContainerResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageContainerResource.Serialization.cs index 12f26d9ca456..0ab9c4c62d77 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageContainerResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeStorageContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeStorageContainerResource : IJsonModel { + private static DataBoxEdgeStorageContainerData s_dataDeserializationInstance; + private static DataBoxEdgeStorageContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeStorageContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeTriggerResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeTriggerResource.Serialization.cs index c4651e483db0..dca24f7bea2c 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeTriggerResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeTriggerResource : IJsonModel { + private static DataBoxEdgeTriggerData s_dataDeserializationInstance; + private static DataBoxEdgeTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeUserResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeUserResource.Serialization.cs index e99a13eb1e8c..e5a7e36a67bb 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeUserResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DataBoxEdgeUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DataBoxEdgeUserResource : IJsonModel { + private static DataBoxEdgeUserData s_dataDeserializationInstance; + private static DataBoxEdgeUserData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoxEdgeUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoxEdgeUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DataBoxEdgeUserData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticProactiveLogCollectionSettingResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticProactiveLogCollectionSettingResource.Serialization.cs index 0da40a539fbc..ba570e1ddbc8 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticProactiveLogCollectionSettingResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticProactiveLogCollectionSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DiagnosticProactiveLogCollectionSettingResource : IJsonModel { + private static DiagnosticProactiveLogCollectionSettingData s_dataDeserializationInstance; + private static DiagnosticProactiveLogCollectionSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticProactiveLogCollectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticProactiveLogCollectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DiagnosticProactiveLogCollectionSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticRemoteSupportSettingResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticRemoteSupportSettingResource.Serialization.cs index a6d9e28ae8c3..271281c4bd85 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticRemoteSupportSettingResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/DiagnosticRemoteSupportSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class DiagnosticRemoteSupportSettingResource : IJsonModel { + private static DiagnosticRemoteSupportSettingData s_dataDeserializationInstance; + private static DiagnosticRemoteSupportSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticRemoteSupportSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticRemoteSupportSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); DiagnosticRemoteSupportSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/MonitoringMetricConfigurationResource.Serialization.cs b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/MonitoringMetricConfigurationResource.Serialization.cs index ef9d1ababa2d..07cdecc7fca0 100644 --- a/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/MonitoringMetricConfigurationResource.Serialization.cs +++ b/sdk/databoxedge/Azure.ResourceManager.DataBoxEdge/src/Generated/MonitoringMetricConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataBoxEdge { public partial class MonitoringMetricConfigurationResource : IJsonModel { + private static MonitoringMetricConfigurationData s_dataDeserializationInstance; + private static MonitoringMetricConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitoringMetricConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitoringMetricConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataBoxEdgeContext.Default); MonitoringMetricConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataBoxEdgeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs index 871acfa14515..bef449b503de 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Datadog { public partial class DatadogMonitorResource : IJsonModel { + private static DatadogMonitorResourceData s_dataDeserializationInstance; + private static DatadogMonitorResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatadogMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatadogMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); DatadogMonitorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs index 17d2395f67f6..1063f82f5d67 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/DatadogSingleSignOnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Datadog { public partial class DatadogSingleSignOnResource : IJsonModel { + private static DatadogSingleSignOnResourceData s_dataDeserializationInstance; + private static DatadogSingleSignOnResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatadogSingleSignOnResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatadogSingleSignOnResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); DatadogSingleSignOnResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs index f3f4691d23cb..0802fe4adb19 100644 --- a/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs +++ b/sdk/datadog/Azure.ResourceManager.Datadog/src/Generated/MonitoringTagRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Datadog { public partial class MonitoringTagRuleResource : IJsonModel { + private static MonitoringTagRuleData s_dataDeserializationInstance; + private static MonitoringTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitoringTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDatadogContext.Default); MonitoringTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDatadogContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/assets.json b/sdk/datafactory/Azure.ResourceManager.DataFactory/assets.json index 06ea465bad4e..5b541eeec564 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/assets.json +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/datafactory/Azure.ResourceManager.DataFactory", - "Tag": "net/datafactory/Azure.ResourceManager.DataFactory_65d430c953" + "Tag": "net/datafactory/Azure.ResourceManager.DataFactory_f07fd1b8d0" } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryChangeDataCaptureResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryChangeDataCaptureResource.Serialization.cs index 1be38bd1919d..b8f1c106a90f 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryChangeDataCaptureResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryChangeDataCaptureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryChangeDataCaptureResource : IJsonModel { + private static DataFactoryChangeDataCaptureData s_dataDeserializationInstance; + private static DataFactoryChangeDataCaptureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryChangeDataCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryChangeDataCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryChangeDataCaptureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDataFlowResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDataFlowResource.Serialization.cs index 1c1f737be40d..7b3668752ee3 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDataFlowResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDataFlowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryDataFlowResource : IJsonModel { + private static DataFactoryDataFlowData s_dataDeserializationInstance; + private static DataFactoryDataFlowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryDataFlowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryDataFlowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryDataFlowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDatasetResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDatasetResource.Serialization.cs index bd48fa72285a..3ecaa3bef4fa 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDatasetResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryDatasetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryDatasetResource : IJsonModel { + private static DataFactoryDatasetData s_dataDeserializationInstance; + private static DataFactoryDatasetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryDatasetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryDatasetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryDatasetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryGlobalParameterResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryGlobalParameterResource.Serialization.cs index e84616e17901..5e19034d5a66 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryGlobalParameterResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryGlobalParameterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryGlobalParameterResource : IJsonModel { + private static DataFactoryGlobalParameterData s_dataDeserializationInstance; + private static DataFactoryGlobalParameterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryGlobalParameterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryGlobalParameterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryGlobalParameterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryIntegrationRuntimeResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryIntegrationRuntimeResource.Serialization.cs index 3805ff606605..b3b28793be41 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryIntegrationRuntimeResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryIntegrationRuntimeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryIntegrationRuntimeResource : IJsonModel { + private static DataFactoryIntegrationRuntimeData s_dataDeserializationInstance; + private static DataFactoryIntegrationRuntimeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryIntegrationRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryIntegrationRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryIntegrationRuntimeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryLinkedServiceResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryLinkedServiceResource.Serialization.cs index 9895b12f8eed..6a55bc4a1e24 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryLinkedServiceResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryLinkedServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryLinkedServiceResource : IJsonModel { + private static DataFactoryLinkedServiceData s_dataDeserializationInstance; + private static DataFactoryLinkedServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryLinkedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryLinkedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryLinkedServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryManagedVirtualNetworkResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryManagedVirtualNetworkResource.Serialization.cs index f80efc298012..42bdf5d72ed4 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryManagedVirtualNetworkResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryManagedVirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryManagedVirtualNetworkResource : IJsonModel { + private static DataFactoryManagedVirtualNetworkData s_dataDeserializationInstance; + private static DataFactoryManagedVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryManagedVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryManagedVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryManagedVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPipelineResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPipelineResource.Serialization.cs index d7dc3df076e4..50faccd1d487 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPipelineResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPipelineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryPipelineResource : IJsonModel { + private static DataFactoryPipelineData s_dataDeserializationInstance; + private static DataFactoryPipelineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryPipelineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryPipelineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryPipelineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointConnectionResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointConnectionResource.Serialization.cs index 3d66d561f109..5d9dfa961492 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryPrivateEndpointConnectionResource : IJsonModel { + private static DataFactoryPrivateEndpointConnectionData s_dataDeserializationInstance; + private static DataFactoryPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointResource.Serialization.cs index 746837fae10d..bdda5089f6b6 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryPrivateEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryPrivateEndpointResource : IJsonModel { + private static DataFactoryPrivateEndpointData s_dataDeserializationInstance; + private static DataFactoryPrivateEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryPrivateEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryResource.Serialization.cs index 6e3637490db6..5d70d97910da 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryResource : IJsonModel { + private static DataFactoryData s_dataDeserializationInstance; + private static DataFactoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryServiceCredentialResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryServiceCredentialResource.Serialization.cs index 1316c416aff4..2dc2223f012a 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryServiceCredentialResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryServiceCredentialResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryServiceCredentialResource : IJsonModel { + private static DataFactoryServiceCredentialData s_dataDeserializationInstance; + private static DataFactoryServiceCredentialData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryServiceCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryServiceCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryServiceCredentialData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryTriggerResource.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryTriggerResource.Serialization.cs index 680b60bda8e8..ad392063653b 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryTriggerResource.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/DataFactoryTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataFactory { public partial class DataFactoryTriggerResource : IJsonModel { + private static DataFactoryTriggerData s_dataDeserializationInstance; + private static DataFactoryTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataFactoryTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataFactoryTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataFactoryContext.Default); DataFactoryTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataFactoryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/tests/Azure.ResourceManager.DataFactory.Tests.csproj b/sdk/datafactory/Azure.ResourceManager.DataFactory/tests/Azure.ResourceManager.DataFactory.Tests.csproj index b22f899e928f..0b17b8df98b7 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/tests/Azure.ResourceManager.DataFactory.Tests.csproj +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/tests/Azure.ResourceManager.DataFactory.Tests.csproj @@ -7,4 +7,9 @@ + + + + + diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsAccountResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsAccountResource.Serialization.cs index 5edaa6b7d665..93e1a78da1a1 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsAccountResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeAnalyticsAccountResource : IJsonModel { + private static DataLakeAnalyticsAccountData s_dataDeserializationInstance; + private static DataLakeAnalyticsAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeAnalyticsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeAnalyticsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeAnalyticsAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsComputePolicyResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsComputePolicyResource.Serialization.cs index 43d492eee067..ecd21cbcebb5 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsComputePolicyResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsComputePolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeAnalyticsComputePolicyResource : IJsonModel { + private static DataLakeAnalyticsComputePolicyData s_dataDeserializationInstance; + private static DataLakeAnalyticsComputePolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeAnalyticsComputePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeAnalyticsComputePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeAnalyticsComputePolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsFirewallRuleResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsFirewallRuleResource.Serialization.cs index d80fbde02c3c..6cea23d19561 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsFirewallRuleResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeAnalyticsFirewallRuleResource : IJsonModel { + private static DataLakeAnalyticsFirewallRuleData s_dataDeserializationInstance; + private static DataLakeAnalyticsFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeAnalyticsFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeAnalyticsFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeAnalyticsFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageAccountInformationResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageAccountInformationResource.Serialization.cs index 3ae4ff357ded..2146a1ac6a1c 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageAccountInformationResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageAccountInformationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeAnalyticsStorageAccountInformationResource : IJsonModel { + private static DataLakeAnalyticsStorageAccountInformationData s_dataDeserializationInstance; + private static DataLakeAnalyticsStorageAccountInformationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeAnalyticsStorageAccountInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeAnalyticsStorageAccountInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeAnalyticsStorageAccountInformationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageContainerResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageContainerResource.Serialization.cs index 190ccfb4d62d..c11005d905f9 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageContainerResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeAnalyticsStorageContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeAnalyticsStorageContainerResource : IJsonModel { + private static DataLakeAnalyticsStorageContainerData s_dataDeserializationInstance; + private static DataLakeAnalyticsStorageContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeAnalyticsStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeAnalyticsStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeAnalyticsStorageContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeStoreAccountInformationResource.Serialization.cs b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeStoreAccountInformationResource.Serialization.cs index a77e6e7a7ec4..f455e3a25279 100644 --- a/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeStoreAccountInformationResource.Serialization.cs +++ b/sdk/datalake-analytics/Azure.ResourceManager.DataLakeAnalytics/src/Generated/DataLakeStoreAccountInformationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeAnalytics { public partial class DataLakeStoreAccountInformationResource : IJsonModel { + private static DataLakeStoreAccountInformationData s_dataDeserializationInstance; + private static DataLakeStoreAccountInformationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeStoreAccountInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeStoreAccountInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); DataLakeStoreAccountInformationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreAccountResource.Serialization.cs b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreAccountResource.Serialization.cs index 63d42a013e66..d997e9e1ecc2 100644 --- a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreAccountResource.Serialization.cs +++ b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeStore { public partial class DataLakeStoreAccountResource : IJsonModel { + private static DataLakeStoreAccountData s_dataDeserializationInstance; + private static DataLakeStoreAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeStoreAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeStoreAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeStoreContext.Default); DataLakeStoreAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeStoreContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreFirewallRuleResource.Serialization.cs b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreFirewallRuleResource.Serialization.cs index 25c85ac2c841..1a67e58a0f9c 100644 --- a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreFirewallRuleResource.Serialization.cs +++ b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeStore { public partial class DataLakeStoreFirewallRuleResource : IJsonModel { + private static DataLakeStoreFirewallRuleData s_dataDeserializationInstance; + private static DataLakeStoreFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeStoreFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeStoreFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeStoreContext.Default); DataLakeStoreFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeStoreContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreTrustedIdProviderResource.Serialization.cs b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreTrustedIdProviderResource.Serialization.cs index d130e6586dab..a0141f827099 100644 --- a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreTrustedIdProviderResource.Serialization.cs +++ b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreTrustedIdProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeStore { public partial class DataLakeStoreTrustedIdProviderResource : IJsonModel { + private static DataLakeStoreTrustedIdProviderData s_dataDeserializationInstance; + private static DataLakeStoreTrustedIdProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeStoreTrustedIdProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeStoreTrustedIdProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeStoreContext.Default); DataLakeStoreTrustedIdProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeStoreContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreVirtualNetworkRuleResource.Serialization.cs b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreVirtualNetworkRuleResource.Serialization.cs index 3137eb9e4144..84a435013a2c 100644 --- a/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreVirtualNetworkRuleResource.Serialization.cs +++ b/sdk/datalake-store/Azure.ResourceManager.DataLakeStore/src/Generated/DataLakeStoreVirtualNetworkRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataLakeStore { public partial class DataLakeStoreVirtualNetworkRuleResource : IJsonModel { + private static DataLakeStoreVirtualNetworkRuleData s_dataDeserializationInstance; + private static DataLakeStoreVirtualNetworkRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataLakeStoreVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataLakeStoreVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataLakeStoreContext.Default); DataLakeStoreVirtualNetworkRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataLakeStoreContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DataMigrationServiceResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DataMigrationServiceResource.Serialization.cs index 6ef6c4aca61b..80b269b00019 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DataMigrationServiceResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DataMigrationServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class DataMigrationServiceResource : IJsonModel { + private static DataMigrationServiceData s_dataDeserializationInstance; + private static DataMigrationServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataMigrationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataMigrationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); DataMigrationServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlDBResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlDBResource.Serialization.cs index 9b294a6a6a42..0952a32b603c 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlDBResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlDBResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class DatabaseMigrationSqlDBResource : IJsonModel { + private static DatabaseMigrationSqlDBData s_dataDeserializationInstance; + private static DatabaseMigrationSqlDBData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseMigrationSqlDBData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseMigrationSqlDBData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); DatabaseMigrationSqlDBData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlMIResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlMIResource.Serialization.cs index d0d023fd3860..c4289a330215 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlMIResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlMIResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class DatabaseMigrationSqlMIResource : IJsonModel { + private static DatabaseMigrationSqlMIData s_dataDeserializationInstance; + private static DatabaseMigrationSqlMIData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseMigrationSqlMIData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseMigrationSqlMIData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); DatabaseMigrationSqlMIData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlVmResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlVmResource.Serialization.cs index 6c25aafb77f0..a061edd26ee8 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlVmResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/DatabaseMigrationSqlVmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class DatabaseMigrationSqlVmResource : IJsonModel { + private static DatabaseMigrationSqlVmData s_dataDeserializationInstance; + private static DatabaseMigrationSqlVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseMigrationSqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseMigrationSqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); DatabaseMigrationSqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectFileResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectFileResource.Serialization.cs index 65f2bfd42cb2..c2c6738dd0c4 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectFileResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectFileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class ProjectFileResource : IJsonModel { + private static ProjectFileData s_dataDeserializationInstance; + private static ProjectFileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProjectFileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProjectFileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); ProjectFileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectResource.Serialization.cs index 8dfa3c1f9cdc..63903efb1304 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class ProjectResource : IJsonModel { + private static ProjectData s_dataDeserializationInstance; + private static ProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); ProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceProjectTaskResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceProjectTaskResource.Serialization.cs index 205e8c47d8e8..b21051ca9fea 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceProjectTaskResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceProjectTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class ServiceProjectTaskResource : IJsonModel { + private static ProjectTaskData s_dataDeserializationInstance; + private static ProjectTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProjectTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProjectTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); ProjectTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceServiceTaskResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceServiceTaskResource.Serialization.cs index ec23302adf26..88bcf64fd403 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceServiceTaskResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/ServiceServiceTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class ServiceServiceTaskResource : IJsonModel { + private static ProjectTaskData s_dataDeserializationInstance; + private static ProjectTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProjectTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProjectTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); ProjectTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/SqlMigrationServiceResource.Serialization.cs b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/SqlMigrationServiceResource.Serialization.cs index e32b39828755..2b76200c152a 100644 --- a/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/SqlMigrationServiceResource.Serialization.cs +++ b/sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/SqlMigrationServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataMigration { public partial class SqlMigrationServiceResource : IJsonModel { + private static SqlMigrationServiceData s_dataDeserializationInstance; + private static SqlMigrationServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlMigrationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlMigrationServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataMigrationContext.Default); SqlMigrationServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataMigrationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupInstanceResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupInstanceResource.Serialization.cs index 01ef565fd70c..bdaf8b1ec4ff 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupInstanceResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DataProtectionBackupInstanceResource : IJsonModel { + private static DataProtectionBackupInstanceData s_dataDeserializationInstance; + private static DataProtectionBackupInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProtectionBackupInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProtectionBackupInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DataProtectionBackupInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupJobResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupJobResource.Serialization.cs index e877c1ed828d..f2b528ce1ad5 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupJobResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DataProtectionBackupJobResource : IJsonModel { + private static DataProtectionBackupJobData s_dataDeserializationInstance; + private static DataProtectionBackupJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProtectionBackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProtectionBackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DataProtectionBackupJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupPolicyResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupPolicyResource.Serialization.cs index 5fbc784b79c4..1c06f840f664 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupPolicyResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DataProtectionBackupPolicyResource : IJsonModel { + private static DataProtectionBackupPolicyData s_dataDeserializationInstance; + private static DataProtectionBackupPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProtectionBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProtectionBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DataProtectionBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupRecoveryPointResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupRecoveryPointResource.Serialization.cs index 7ddab5858495..b3d4f93e3e41 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupRecoveryPointResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DataProtectionBackupRecoveryPointResource : IJsonModel { + private static DataProtectionBackupRecoveryPointData s_dataDeserializationInstance; + private static DataProtectionBackupRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProtectionBackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProtectionBackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DataProtectionBackupRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupVaultResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupVaultResource.Serialization.cs index a4e89a20e411..e1f024e19bae 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupVaultResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DataProtectionBackupVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DataProtectionBackupVaultResource : IJsonModel { + private static DataProtectionBackupVaultData s_dataDeserializationInstance; + private static DataProtectionBackupVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProtectionBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProtectionBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DataProtectionBackupVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DeletedDataProtectionBackupInstanceResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DeletedDataProtectionBackupInstanceResource.Serialization.cs index 3b2b3fa1db1b..bd1c57eb9bef 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DeletedDataProtectionBackupInstanceResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/DeletedDataProtectionBackupInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class DeletedDataProtectionBackupInstanceResource : IJsonModel { + private static DeletedDataProtectionBackupInstanceData s_dataDeserializationInstance; + private static DeletedDataProtectionBackupInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedDataProtectionBackupInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedDataProtectionBackupInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); DeletedDataProtectionBackupInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardProxyBaseResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardProxyBaseResource.Serialization.cs index 29c22a8d07ea..f11941f7bdc1 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardProxyBaseResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardProxyBaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class ResourceGuardProxyBaseResource : IJsonModel { + private static ResourceGuardProxyBaseResourceData s_dataDeserializationInstance; + private static ResourceGuardProxyBaseResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceGuardProxyBaseResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceGuardProxyBaseResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); ResourceGuardProxyBaseResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardResource.Serialization.cs b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardResource.Serialization.cs index 9475688a5d9a..f8e55259d870 100644 --- a/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardResource.Serialization.cs +++ b/sdk/dataprotection/Azure.ResourceManager.DataProtectionBackup/src/Generated/ResourceGuardResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataProtectionBackup { public partial class ResourceGuardResource : IJsonModel { + private static ResourceGuardData s_dataDeserializationInstance; + private static ResourceGuardData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceGuardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceGuardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataProtectionBackupContext.Default); ResourceGuardData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataProtectionBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareAccountResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareAccountResource.Serialization.cs index 3932f22a73c4..5a665e58ae72 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareAccountResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareAccountResource : IJsonModel { + private static DataShareAccountData s_dataDeserializationInstance; + private static DataShareAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareConsumerInvitationResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareConsumerInvitationResource.Serialization.cs index 9a643d58c116..e5ab4ce82d36 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareConsumerInvitationResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareConsumerInvitationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareConsumerInvitationResource : IJsonModel { + private static DataShareConsumerInvitationData s_dataDeserializationInstance; + private static DataShareConsumerInvitationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareConsumerInvitationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareConsumerInvitationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareConsumerInvitationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareInvitationResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareInvitationResource.Serialization.cs index 112cc965f877..6701aeb5b22b 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareInvitationResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareInvitationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareInvitationResource : IJsonModel { + private static DataShareInvitationData s_dataDeserializationInstance; + private static DataShareInvitationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareInvitationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareInvitationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareInvitationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareResource.Serialization.cs index a718b13a29dd..127484cd8027 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareResource : IJsonModel { + private static DataShareData s_dataDeserializationInstance; + private static DataShareData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareSynchronizationSettingResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareSynchronizationSettingResource.Serialization.cs index f991a26f45e9..5b92709a969e 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareSynchronizationSettingResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareSynchronizationSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareSynchronizationSettingResource : IJsonModel { + private static DataShareSynchronizationSettingData s_dataDeserializationInstance; + private static DataShareSynchronizationSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareSynchronizationSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareSynchronizationSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareSynchronizationSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareTriggerResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareTriggerResource.Serialization.cs index 75f2b5051a6a..18d4dabc5344 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareTriggerResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/DataShareTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class DataShareTriggerResource : IJsonModel { + private static DataShareTriggerData s_dataDeserializationInstance; + private static DataShareTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataShareTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataShareTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); DataShareTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ProviderShareSubscriptionResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ProviderShareSubscriptionResource.Serialization.cs index bf3e91ba6bca..e9c25d7be2e8 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ProviderShareSubscriptionResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ProviderShareSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class ProviderShareSubscriptionResource : IJsonModel { + private static ProviderShareSubscriptionData s_dataDeserializationInstance; + private static ProviderShareSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProviderShareSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProviderShareSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); ProviderShareSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetMappingResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetMappingResource.Serialization.cs index b8bbb0075f1a..760ebd3ee3e7 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetMappingResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetMappingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class ShareDataSetMappingResource : IJsonModel { + private static ShareDataSetMappingData s_dataDeserializationInstance; + private static ShareDataSetMappingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ShareDataSetMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ShareDataSetMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); ShareDataSetMappingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetResource.Serialization.cs index 8475abf2dffa..2e7c63ae68d0 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareDataSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class ShareDataSetResource : IJsonModel { + private static ShareDataSetData s_dataDeserializationInstance; + private static ShareDataSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ShareDataSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ShareDataSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); ShareDataSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareSubscriptionResource.Serialization.cs b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareSubscriptionResource.Serialization.cs index 4405a445a23a..1898a3b01e7a 100644 --- a/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareSubscriptionResource.Serialization.cs +++ b/sdk/datashare/Azure.ResourceManager.DataShare/src/Generated/ShareSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DataShare { public partial class ShareSubscriptionResource : IJsonModel { + private static ShareSubscriptionData s_dataDeserializationInstance; + private static ShareSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ShareSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ShareSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDataShareContext.Default); ShareSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDataShareContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmLabelResource.Serialization.cs b/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmLabelResource.Serialization.cs index b8bbd19d1967..9f3740efa3ef 100644 --- a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmLabelResource.Serialization.cs +++ b/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmLabelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DefenderEasm { public partial class EasmLabelResource : IJsonModel { + private static EasmLabelData s_dataDeserializationInstance; + private static EasmLabelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EasmLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EasmLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDefenderEasmContext.Default); EasmLabelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDefenderEasmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmWorkspaceResource.Serialization.cs b/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmWorkspaceResource.Serialization.cs index 5abcf965ae87..151e402274db 100644 --- a/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmWorkspaceResource.Serialization.cs +++ b/sdk/defendereasm/Azure.ResourceManager.DefenderEasm/src/Generated/EasmWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DefenderEasm { public partial class EasmWorkspaceResource : IJsonModel { + private static EasmWorkspaceData s_dataDeserializationInstance; + private static EasmWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EasmWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EasmWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDefenderEasmContext.Default); EasmWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDefenderEasmContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs index 4254cf8bf7c4..afe016a2567e 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapDiscoverySourceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DependencyMap { public partial class DependencyMapDiscoverySourceResource : IJsonModel { + private static DependencyMapDiscoverySourceData s_dataDeserializationInstance; + private static DependencyMapDiscoverySourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DependencyMapDiscoverySourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDependencyMapContext.Default); DependencyMapDiscoverySourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDependencyMapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs index 595495995b3d..a099cf09ae8e 100644 --- a/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs +++ b/sdk/dependencymap/Azure.ResourceManager.DependencyMap/src/Generated/DependencyMapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DependencyMap { public partial class DependencyMapResource : IJsonModel { + private static DependencyMapData s_dataDeserializationInstance; + private static DependencyMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DependencyMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDependencyMapContext.Default); DependencyMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDependencyMapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.Serialization.cs index 20073b789f1a..1144b42e7cbc 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/AppAttachPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class AppAttachPackageResource : IJsonModel { + private static AppAttachPackageData s_dataDeserializationInstance; + private static AppAttachPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppAttachPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppAttachPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); AppAttachPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.Serialization.cs index b9671a9bcdad..4a3c27ad238e 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class HostPoolPrivateEndpointConnectionResource : IJsonModel { + private static DesktopVirtualizationPrivateEndpointConnectionDataData s_dataDeserializationInstance; + private static DesktopVirtualizationPrivateEndpointConnectionDataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DesktopVirtualizationPrivateEndpointConnectionDataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DesktopVirtualizationPrivateEndpointConnectionDataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); DesktopVirtualizationPrivateEndpointConnectionDataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.Serialization.cs index fc5af6229fdd..28cd292ba4ac 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/HostPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class HostPoolResource : IJsonModel { + private static HostPoolData s_dataDeserializationInstance; + private static HostPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HostPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HostPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); HostPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/MsixPackageResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/MsixPackageResource.Serialization.cs index fe682e1e13fb..a146bf6c0290 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/MsixPackageResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/MsixPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class MsixPackageResource : IJsonModel { + private static MsixPackageData s_dataDeserializationInstance; + private static MsixPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MsixPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MsixPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); MsixPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPersonalScheduleResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPersonalScheduleResource.Serialization.cs index 488035479ca1..e9c110c87415 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPersonalScheduleResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPersonalScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class ScalingPlanPersonalScheduleResource : IJsonModel { + private static ScalingPlanPersonalScheduleData s_dataDeserializationInstance; + private static ScalingPlanPersonalScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScalingPlanPersonalScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScalingPlanPersonalScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); ScalingPlanPersonalScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPooledScheduleResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPooledScheduleResource.Serialization.cs index 4767d8cc3977..253600b09469 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPooledScheduleResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanPooledScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class ScalingPlanPooledScheduleResource : IJsonModel { + private static ScalingPlanPooledScheduleData s_dataDeserializationInstance; + private static ScalingPlanPooledScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScalingPlanPooledScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScalingPlanPooledScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); ScalingPlanPooledScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanResource.Serialization.cs index 5a7897e7a4ff..592b57a5859e 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/ScalingPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class ScalingPlanResource : IJsonModel { + private static ScalingPlanData s_dataDeserializationInstance; + private static ScalingPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScalingPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScalingPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); ScalingPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/SessionHostResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/SessionHostResource.Serialization.cs index d36f84c3e6b6..982abfebef8a 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/SessionHostResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/SessionHostResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class SessionHostResource : IJsonModel { + private static SessionHostData s_dataDeserializationInstance; + private static SessionHostData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SessionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SessionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); SessionHostData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/UserSessionResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/UserSessionResource.Serialization.cs index c5bf32fa25cd..380ad0db8e1b 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/UserSessionResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/UserSessionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class UserSessionResource : IJsonModel { + private static UserSessionData s_dataDeserializationInstance; + private static UserSessionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - UserSessionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + UserSessionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); UserSessionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationGroupResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationGroupResource.Serialization.cs index 248ddb0c88c6..5d1d3fdea472 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationGroupResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class VirtualApplicationGroupResource : IJsonModel { + private static VirtualApplicationGroupData s_dataDeserializationInstance; + private static VirtualApplicationGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualApplicationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualApplicationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); VirtualApplicationGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationResource.Serialization.cs index 9a3afae6f33c..7f804b25f4ac 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class VirtualApplicationResource : IJsonModel { + private static VirtualApplicationData s_dataDeserializationInstance; + private static VirtualApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); VirtualApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualDesktopResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualDesktopResource.Serialization.cs index 4f99c67e51a3..42f79ea8f982 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualDesktopResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualDesktopResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class VirtualDesktopResource : IJsonModel { + private static VirtualDesktopData s_dataDeserializationInstance; + private static VirtualDesktopData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualDesktopData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualDesktopData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); VirtualDesktopData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualWorkspaceResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualWorkspaceResource.Serialization.cs index 1c85e6b9cc8b..999fba549d0b 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualWorkspaceResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/VirtualWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class VirtualWorkspaceResource : IJsonModel { + private static VirtualWorkspaceData s_dataDeserializationInstance; + private static VirtualWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); VirtualWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/WorkspacePrivateEndpointConnectionResource.Serialization.cs b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/WorkspacePrivateEndpointConnectionResource.Serialization.cs index 753359af6b37..c19ada8a989f 100644 --- a/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/WorkspacePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/desktopvirtualization/Azure.ResourceManager.DesktopVirtualization/src/Generated/WorkspacePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DesktopVirtualization { public partial class WorkspacePrivateEndpointConnectionResource : IJsonModel { + private static DesktopVirtualizationPrivateEndpointConnectionDataData s_dataDeserializationInstance; + private static DesktopVirtualizationPrivateEndpointConnectionDataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DesktopVirtualizationPrivateEndpointConnectionDataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DesktopVirtualizationPrivateEndpointConnectionDataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDesktopVirtualizationContext.Default); DesktopVirtualizationPrivateEndpointConnectionDataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDesktopVirtualizationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.Serialization.cs index e784c25230af..6322c9df4925 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AllowedEnvironmentTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class AllowedEnvironmentTypeResource : IJsonModel { + private static AllowedEnvironmentTypeData s_dataDeserializationInstance; + private static AllowedEnvironmentTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AllowedEnvironmentTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AllowedEnvironmentTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); AllowedEnvironmentTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.Serialization.cs index e3a236733045..d1bdfa042e5c 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/AttachedNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class AttachedNetworkConnectionResource : IJsonModel { + private static AttachedNetworkConnectionData s_dataDeserializationInstance; + private static AttachedNetworkConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AttachedNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AttachedNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); AttachedNetworkConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.Serialization.cs index bb94d2bcc52c..3235a32ade67 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevBoxDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevBoxDefinitionResource : IJsonModel { + private static DevBoxDefinitionData s_dataDeserializationInstance; + private static DevBoxDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevBoxDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevBoxDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevBoxDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.Serialization.cs index ba81f883b3cd..e8c28841c8c4 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterCatalogResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterCatalogResource : IJsonModel { + private static DevCenterCatalogData s_dataDeserializationInstance; + private static DevCenterCatalogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterCatalogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.Serialization.cs index 815b83b9682c..46fd2f40e7ff 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterEnvironmentTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterEnvironmentTypeResource : IJsonModel { + private static DevCenterEnvironmentTypeData s_dataDeserializationInstance; + private static DevCenterEnvironmentTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterEnvironmentTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterEnvironmentTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterEnvironmentTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.Serialization.cs index 0f1d9f7cc9db..98da3d384d7b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterGalleryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterGalleryResource : IJsonModel { + private static DevCenterGalleryData s_dataDeserializationInstance; + private static DevCenterGalleryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterGalleryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterGalleryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.Serialization.cs index 8bca8f5efcff..66f76a989b7b 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterImageResource : IJsonModel { + private static DevCenterImageData s_dataDeserializationInstance; + private static DevCenterImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.Serialization.cs index 6354c8039701..9b50903c262e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterNetworkConnectionResource : IJsonModel { + private static DevCenterNetworkConnectionData s_dataDeserializationInstance; + private static DevCenterNetworkConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterNetworkConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.Serialization.cs index 912e9ee8b6d2..4ad7da3f76c7 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterPoolResource : IJsonModel { + private static DevCenterPoolData s_dataDeserializationInstance; + private static DevCenterPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.Serialization.cs index 3994b0c32822..70098583c891 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterProjectEnvironmentResource : IJsonModel { + private static DevCenterProjectEnvironmentData s_dataDeserializationInstance; + private static DevCenterProjectEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterProjectEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterProjectEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterProjectEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.Serialization.cs index 034930043181..c0d7f45756d6 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterProjectResource : IJsonModel { + private static DevCenterProjectData s_dataDeserializationInstance; + private static DevCenterProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.Serialization.cs index 340be39e3df7..fc9bb4c9967e 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterResource : IJsonModel { + private static DevCenterData s_dataDeserializationInstance; + private static DevCenterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.Serialization.cs index 1eb6abeff46f..dc3ca482da42 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/DevCenterScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class DevCenterScheduleResource : IJsonModel { + private static DevCenterScheduleData s_dataDeserializationInstance; + private static DevCenterScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevCenterScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevCenterScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevCenterScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.Serialization.cs index 505e6a34e29e..302d25f0189f 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/HealthCheckStatusDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class HealthCheckStatusDetailResource : IJsonModel { + private static HealthCheckStatusDetailData s_dataDeserializationInstance; + private static HealthCheckStatusDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthCheckStatusDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthCheckStatusDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); HealthCheckStatusDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.Serialization.cs index 1d9e54061829..3f51db564dc8 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ImageVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class ImageVersionResource : IJsonModel { + private static ImageVersionData s_dataDeserializationInstance; + private static ImageVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ImageVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); ImageVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.Serialization.cs index 85a615b7b35a..35b8a1999580 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectAttachedNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class ProjectAttachedNetworkConnectionResource : IJsonModel { + private static AttachedNetworkConnectionData s_dataDeserializationInstance; + private static AttachedNetworkConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AttachedNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AttachedNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); AttachedNetworkConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.Serialization.cs b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.Serialization.cs index 9cf41c4f47e7..7196ea0f9507 100644 --- a/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.Serialization.cs +++ b/sdk/devcenter/Azure.ResourceManager.DevCenter/src/Generated/ProjectDevBoxDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevCenter { public partial class ProjectDevBoxDefinitionResource : IJsonModel { + private static DevBoxDefinitionData s_dataDeserializationInstance; + private static DevBoxDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevBoxDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevBoxDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevCenterContext.Default); DevBoxDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServiceResource.Serialization.cs b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServiceResource.Serialization.cs index 484ee8c5dc49..de15ccda9d80 100644 --- a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServiceResource.Serialization.cs +++ b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceProvisioningServices { public partial class DeviceProvisioningServiceResource : IJsonModel { + private static DeviceProvisioningServiceData s_dataDeserializationInstance; + private static DeviceProvisioningServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceProvisioningServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceProvisioningServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); DeviceProvisioningServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesCertificateResource.Serialization.cs b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesCertificateResource.Serialization.cs index 7c1f873b8ae7..6e9dfa4e8d4e 100644 --- a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesCertificateResource.Serialization.cs +++ b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceProvisioningServices { public partial class DeviceProvisioningServicesCertificateResource : IJsonModel { + private static DeviceProvisioningServicesCertificateData s_dataDeserializationInstance; + private static DeviceProvisioningServicesCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceProvisioningServicesCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceProvisioningServicesCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); DeviceProvisioningServicesCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateEndpointConnectionResource.Serialization.cs b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateEndpointConnectionResource.Serialization.cs index 929bf20d5e96..7d101b5472cb 100644 --- a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceProvisioningServices { public partial class DeviceProvisioningServicesPrivateEndpointConnectionResource : IJsonModel { + private static DeviceProvisioningServicesPrivateEndpointConnectionData s_dataDeserializationInstance; + private static DeviceProvisioningServicesPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceProvisioningServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceProvisioningServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); DeviceProvisioningServicesPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateLinkResource.Serialization.cs b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateLinkResource.Serialization.cs index bdaca4e60dfa..13d6c54bf440 100644 --- a/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateLinkResource.Serialization.cs +++ b/sdk/deviceprovisioningservices/Azure.ResourceManager.DeviceProvisioningServices/src/Generated/DeviceProvisioningServicesPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceProvisioningServices { public partial class DeviceProvisioningServicesPrivateLinkResource : IJsonModel { + private static DeviceProvisioningServicesPrivateLinkResourceData s_dataDeserializationInstance; + private static DeviceProvisioningServicesPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceProvisioningServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceProvisioningServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); DeviceProvisioningServicesPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceProvisioningServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.Serialization.cs index b31cf76a59d3..e7c86d262433 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetEndpointProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceRegistry { public partial class DeviceRegistryAssetEndpointProfileResource : IJsonModel { + private static DeviceRegistryAssetEndpointProfileData s_dataDeserializationInstance; + private static DeviceRegistryAssetEndpointProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceRegistryAssetEndpointProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceRegistryAssetEndpointProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceRegistryContext.Default); DeviceRegistryAssetEndpointProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.Serialization.cs index aa20b2efafd8..a11b696ed612 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryAssetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceRegistry { public partial class DeviceRegistryAssetResource : IJsonModel { + private static DeviceRegistryAssetData s_dataDeserializationInstance; + private static DeviceRegistryAssetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceRegistryAssetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceRegistryAssetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceRegistryContext.Default); DeviceRegistryAssetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.Serialization.cs b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.Serialization.cs index 11286b804c98..cf92e3015e52 100644 --- a/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.Serialization.cs +++ b/sdk/deviceregistry/Azure.ResourceManager.DeviceRegistry/src/Generated/DeviceRegistryBillingContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceRegistry { public partial class DeviceRegistryBillingContainerResource : IJsonModel { + private static DeviceRegistryBillingContainerData s_dataDeserializationInstance; + private static DeviceRegistryBillingContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceRegistryBillingContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceRegistryBillingContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceRegistryContext.Default); DeviceRegistryBillingContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceRegistryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateAccountResource.Serialization.cs b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateAccountResource.Serialization.cs index 9179604258d3..3b2606058a65 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateAccountResource.Serialization.cs +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceUpdate { public partial class DeviceUpdateAccountResource : IJsonModel { + private static DeviceUpdateAccountData s_dataDeserializationInstance; + private static DeviceUpdateAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceUpdateAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceUpdateAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceUpdateContext.Default); DeviceUpdateAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceUpdateContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateInstanceResource.Serialization.cs b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateInstanceResource.Serialization.cs index f95d8c5363fa..2a7004d73e81 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateInstanceResource.Serialization.cs +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdateInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceUpdate { public partial class DeviceUpdateInstanceResource : IJsonModel { + private static DeviceUpdateInstanceData s_dataDeserializationInstance; + private static DeviceUpdateInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceUpdateInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceUpdateInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceUpdateContext.Default); DeviceUpdateInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceUpdateContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionProxyResource.Serialization.cs b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionProxyResource.Serialization.cs index 244ddfe5260c..50ac1cb31395 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionProxyResource.Serialization.cs +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionProxyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceUpdate { public partial class DeviceUpdatePrivateEndpointConnectionProxyResource : IJsonModel { + private static DeviceUpdatePrivateEndpointConnectionProxyData s_dataDeserializationInstance; + private static DeviceUpdatePrivateEndpointConnectionProxyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceUpdatePrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceUpdatePrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceUpdateContext.Default); DeviceUpdatePrivateEndpointConnectionProxyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceUpdateContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionResource.Serialization.cs b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionResource.Serialization.cs index 3725c016d174..326d7cdae32a 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceUpdate { public partial class DeviceUpdatePrivateEndpointConnectionResource : IJsonModel { + private static DeviceUpdatePrivateEndpointConnectionData s_dataDeserializationInstance; + private static DeviceUpdatePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceUpdatePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceUpdatePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceUpdateContext.Default); DeviceUpdatePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceUpdateContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateLinkResource.Serialization.cs b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateLinkResource.Serialization.cs index 2f3044273ee8..9bab2c03a539 100644 --- a/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateLinkResource.Serialization.cs +++ b/sdk/deviceupdate/Azure.ResourceManager.DeviceUpdate/src/Generated/DeviceUpdatePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DeviceUpdate { public partial class DeviceUpdatePrivateLinkResource : IJsonModel { + private static DeviceUpdatePrivateLinkData s_dataDeserializationInstance; + private static DeviceUpdatePrivateLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceUpdatePrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceUpdatePrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDeviceUpdateContext.Default); DeviceUpdatePrivateLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDeviceUpdateContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.Serialization.cs b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.Serialization.cs index 1044308a85ac..f88ba3cca32e 100644 --- a/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.Serialization.cs +++ b/sdk/devopsinfrastructure/Azure.ResourceManager.DevOpsInfrastructure/src/Generated/DevOpsPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevOpsInfrastructure { public partial class DevOpsPoolResource : IJsonModel { + private static DevOpsPoolData s_dataDeserializationInstance; + private static DevOpsPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevOpsPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevOpsPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevOpsInfrastructureContext.Default); DevOpsPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevOpsInfrastructureContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ControllerResource.Serialization.cs b/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ControllerResource.Serialization.cs index 9e14e0a55c07..835c17a820f7 100644 --- a/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ControllerResource.Serialization.cs +++ b/sdk/devspaces/Azure.ResourceManager.DevSpaces/src/Generated/ControllerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevSpaces { public partial class ControllerResource : IJsonModel { + private static ControllerData s_dataDeserializationInstance; + private static ControllerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevSpacesContext.Default); ControllerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevSpacesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateResource.Serialization.cs index 4bfba6def3e2..67d57d6d4ebe 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArmTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabArmTemplateResource : IJsonModel { + private static DevTestLabArmTemplateData s_dataDeserializationInstance; + private static DevTestLabArmTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabArmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabArmTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabArmTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactResource.Serialization.cs index b28129778672..c0892f1aab4d 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabArtifactResource : IJsonModel { + private static DevTestLabArtifactData s_dataDeserializationInstance; + private static DevTestLabArtifactData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabArtifactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabArtifactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceResource.Serialization.cs index 34627dacad0b..1f0840c0cf9e 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabArtifactSourceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabArtifactSourceResource : IJsonModel { + private static DevTestLabArtifactSourceData s_dataDeserializationInstance; + private static DevTestLabArtifactSourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabArtifactSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabArtifactSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabArtifactSourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostResource.Serialization.cs index c9a6a2325741..f91f7600fa6b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCostResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabCostResource : IJsonModel { + private static DevTestLabCostData s_dataDeserializationInstance; + private static DevTestLabCostData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabCostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabCostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabCostData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageResource.Serialization.cs index e4aeda7a9c2a..449622c78530 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabCustomImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabCustomImageResource : IJsonModel { + private static DevTestLabCustomImageData s_dataDeserializationInstance; + private static DevTestLabCustomImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabCustomImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskResource.Serialization.cs index 2d201f40a03b..e800febe9b7b 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabDiskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabDiskResource : IJsonModel { + private static DevTestLabDiskData s_dataDeserializationInstance; + private static DevTestLabDiskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabDiskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabDiskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentResource.Serialization.cs index d632b9865f70..424841a9d939 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabEnvironmentResource : IJsonModel { + private static DevTestLabEnvironmentData s_dataDeserializationInstance; + private static DevTestLabEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaResource.Serialization.cs index cf43737a0a16..ffc9a4f831ef 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabFormulaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabFormulaResource : IJsonModel { + private static DevTestLabFormulaData s_dataDeserializationInstance; + private static DevTestLabFormulaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabFormulaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabFormulaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabFormulaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabGlobalScheduleResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabGlobalScheduleResource.Serialization.cs index 945d69b194f1..27e51fc46562 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabGlobalScheduleResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabGlobalScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabGlobalScheduleResource : IJsonModel { + private static DevTestLabScheduleData s_dataDeserializationInstance; + private static DevTestLabScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelResource.Serialization.cs index 14243b2a8fa3..a8a1190f1352 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabNotificationChannelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabNotificationChannelResource : IJsonModel { + private static DevTestLabNotificationChannelData s_dataDeserializationInstance; + private static DevTestLabNotificationChannelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabNotificationChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabNotificationChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabNotificationChannelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyResource.Serialization.cs index 15cb23bb6c1b..b2c28c6dbb37 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabPolicyResource : IJsonModel { + private static DevTestLabPolicyData s_dataDeserializationInstance; + private static DevTestLabPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.Serialization.cs index 7d6772687214..c85a337f7510 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabResource : IJsonModel { + private static DevTestLabData s_dataDeserializationInstance; + private static DevTestLabData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleResource.Serialization.cs index af8e1ebf9ab3..8b98feac1744 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabScheduleResource : IJsonModel { + private static DevTestLabScheduleData s_dataDeserializationInstance; + private static DevTestLabScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretResource.Serialization.cs index 3bb236476bfd..db120b7e0f20 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabSecretResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabSecretResource : IJsonModel { + private static DevTestLabSecretData s_dataDeserializationInstance; + private static DevTestLabSecretData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabSecretData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricResource.Serialization.cs index aae2b1de3184..b95c5c7e13de 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabServiceFabricResource : IJsonModel { + private static DevTestLabServiceFabricData s_dataDeserializationInstance; + private static DevTestLabServiceFabricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabServiceFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabServiceFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabServiceFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricScheduleResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricScheduleResource.Serialization.cs index 539551373f0e..b2e6065c5dce 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricScheduleResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceFabricScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabServiceFabricScheduleResource : IJsonModel { + private static DevTestLabScheduleData s_dataDeserializationInstance; + private static DevTestLabScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerResource.Serialization.cs index 47e36163c696..de4a757fa61a 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabServiceRunnerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabServiceRunnerResource : IJsonModel { + private static DevTestLabServiceRunnerData s_dataDeserializationInstance; + private static DevTestLabServiceRunnerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabServiceRunnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabServiceRunnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabServiceRunnerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserResource.Serialization.cs index 2fccff6efb8b..3dc3549aa831 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabUserResource : IJsonModel { + private static DevTestLabUserData s_dataDeserializationInstance; + private static DevTestLabUserData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabUserData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkResource.Serialization.cs index a132aede1b42..06e3a8476a84 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabVirtualNetworkResource : IJsonModel { + private static DevTestLabVirtualNetworkData s_dataDeserializationInstance; + private static DevTestLabVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmResource.Serialization.cs index a1682dd8cf85..194c34a85999 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabVmResource : IJsonModel { + private static DevTestLabVmData s_dataDeserializationInstance; + private static DevTestLabVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmScheduleResource.Serialization.cs b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmScheduleResource.Serialization.cs index b1267b5f03b8..d2d4c0831fb1 100644 --- a/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmScheduleResource.Serialization.cs +++ b/sdk/devtestlabs/Azure.ResourceManager.DevTestLabs/src/Generated/DevTestLabVmScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DevTestLabs { public partial class DevTestLabVmScheduleResource : IJsonModel { + private static DevTestLabScheduleData s_dataDeserializationInstance; + private static DevTestLabScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevTestLabScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDevTestLabsContext.Default); DevTestLabScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDevTestLabsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsDescriptionResource.Serialization.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsDescriptionResource.Serialization.cs index 187f2e217054..7d494a77dd1b 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsDescriptionResource.Serialization.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsDescriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DigitalTwins { public partial class DigitalTwinsDescriptionResource : IJsonModel { + private static DigitalTwinsDescriptionData s_dataDeserializationInstance; + private static DigitalTwinsDescriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DigitalTwinsDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DigitalTwinsDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDigitalTwinsContext.Default); DigitalTwinsDescriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDigitalTwinsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsEndpointResource.Serialization.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsEndpointResource.Serialization.cs index a44f19f20c9d..21f90173b666 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsEndpointResource.Serialization.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DigitalTwins { public partial class DigitalTwinsEndpointResource : IJsonModel { + private static DigitalTwinsEndpointResourceData s_dataDeserializationInstance; + private static DigitalTwinsEndpointResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DigitalTwinsEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DigitalTwinsEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDigitalTwinsContext.Default); DigitalTwinsEndpointResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDigitalTwinsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateEndpointConnectionResource.Serialization.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateEndpointConnectionResource.Serialization.cs index 0dd3ffcbda37..653ea1e7aa46 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DigitalTwins { public partial class DigitalTwinsPrivateEndpointConnectionResource : IJsonModel { + private static DigitalTwinsPrivateEndpointConnectionData s_dataDeserializationInstance; + private static DigitalTwinsPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DigitalTwinsPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DigitalTwinsPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDigitalTwinsContext.Default); DigitalTwinsPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDigitalTwinsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateLinkResource.Serialization.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateLinkResource.Serialization.cs index b28eeb42fe14..d3e637069fd4 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateLinkResource.Serialization.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/DigitalTwinsPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DigitalTwins { public partial class DigitalTwinsPrivateLinkResource : IJsonModel { + private static DigitalTwinsPrivateLinkResourceData s_dataDeserializationInstance; + private static DigitalTwinsPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DigitalTwinsPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DigitalTwinsPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDigitalTwinsContext.Default); DigitalTwinsPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDigitalTwinsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/TimeSeriesDatabaseConnectionResource.Serialization.cs b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/TimeSeriesDatabaseConnectionResource.Serialization.cs index bfbe1ce77219..d25ac8f09a48 100644 --- a/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/TimeSeriesDatabaseConnectionResource.Serialization.cs +++ b/sdk/digitaltwins/Azure.ResourceManager.DigitalTwins/src/Generated/TimeSeriesDatabaseConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DigitalTwins { public partial class TimeSeriesDatabaseConnectionResource : IJsonModel { + private static TimeSeriesDatabaseConnectionData s_dataDeserializationInstance; + private static TimeSeriesDatabaseConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TimeSeriesDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TimeSeriesDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDigitalTwinsContext.Default); TimeSeriesDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDigitalTwinsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/DnssecConfigResource.Serialization.cs b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/DnssecConfigResource.Serialization.cs index ae9b17af91fc..596247a9f5e6 100644 --- a/sdk/dns/Azure.ResourceManager.Dns/src/Generated/DnssecConfigResource.Serialization.cs +++ b/sdk/dns/Azure.ResourceManager.Dns/src/Generated/DnssecConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Dns { public partial class DnssecConfigResource : IJsonModel { + private static DnssecConfigData s_dataDeserializationInstance; + private static DnssecConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnssecConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnssecConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsContext.Default); DnssecConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.Serialization.cs index 560bc3a002b7..9f9c089b6b76 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsForwardingRuleResource : IJsonModel { + private static DnsForwardingRuleData s_dataDeserializationInstance; + private static DnsForwardingRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsForwardingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsForwardingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsForwardingRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.Serialization.cs index 18b742d92c66..395afee35539 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsForwardingRulesetResource : IJsonModel { + private static DnsForwardingRulesetData s_dataDeserializationInstance; + private static DnsForwardingRulesetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsForwardingRulesetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsForwardingRulesetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsForwardingRulesetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.Serialization.cs index bd84d3c2fdd0..78627267b48b 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsForwardingRulesetVirtualNetworkLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsForwardingRulesetVirtualNetworkLinkResource : IJsonModel { + private static DnsForwardingRulesetVirtualNetworkLinkData s_dataDeserializationInstance; + private static DnsForwardingRulesetVirtualNetworkLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsForwardingRulesetVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsForwardingRulesetVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsForwardingRulesetVirtualNetworkLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs index 9d23ddc1ac54..976b0f3a33b0 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverDomainListResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverDomainListResource : IJsonModel { + private static DnsResolverDomainListData s_dataDeserializationInstance; + private static DnsResolverDomainListData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverDomainListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverDomainListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverDomainListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.Serialization.cs index 05041544ca62..c3c5017aae3f 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverInboundEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverInboundEndpointResource : IJsonModel { + private static DnsResolverInboundEndpointData s_dataDeserializationInstance; + private static DnsResolverInboundEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverInboundEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverInboundEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverInboundEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.Serialization.cs index 61a1e3f0a1b2..b68c9b119c7d 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverOutboundEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverOutboundEndpointResource : IJsonModel { + private static DnsResolverOutboundEndpointData s_dataDeserializationInstance; + private static DnsResolverOutboundEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverOutboundEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverOutboundEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverOutboundEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs index b0ddd77caa4d..563542269d89 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverPolicyResource : IJsonModel { + private static DnsResolverPolicyData s_dataDeserializationInstance; + private static DnsResolverPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs index c8c03e216012..7334d9fc9589 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverPolicyVirtualNetworkLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverPolicyVirtualNetworkLinkResource : IJsonModel { + private static DnsResolverPolicyVirtualNetworkLinkData s_dataDeserializationInstance; + private static DnsResolverPolicyVirtualNetworkLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverPolicyVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverPolicyVirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverPolicyVirtualNetworkLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.Serialization.cs index 72e40c0cd046..64f6f624c8cd 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsResolverResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsResolverResource : IJsonModel { + private static DnsResolverData s_dataDeserializationInstance; + private static DnsResolverData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsResolverData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsResolverData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsResolverData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs index 5843dcd5e11a..ea49ace8ca36 100644 --- a/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs +++ b/sdk/dnsresolver/Azure.ResourceManager.DnsResolver/src/Generated/DnsSecurityRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DnsResolver { public partial class DnsSecurityRuleResource : IJsonModel { + private static DnsSecurityRuleData s_dataDeserializationInstance; + private static DnsSecurityRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DnsSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DnsSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDnsResolverContext.Default); DnsSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDnsResolverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs index 58d9dc9049a7..edac77bb9cf7 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DurableTask { public partial class DurableTaskHubResource : IJsonModel { + private static DurableTaskHubData s_dataDeserializationInstance; + private static DurableTaskHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DurableTaskHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); DurableTaskHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs index cce408cac63c..fcbcb0d3d77b 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DurableTask { public partial class DurableTaskRetentionPolicyResource : IJsonModel { + private static DurableTaskRetentionPolicyData s_dataDeserializationInstance; + private static DurableTaskRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DurableTaskRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); DurableTaskRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs index 047836dafdd7..607be6ddee64 100644 --- a/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs +++ b/sdk/durabletask/Azure.ResourceManager.DurableTask/src/Generated/DurableTaskSchedulerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.DurableTask { public partial class DurableTaskSchedulerResource : IJsonModel { + private static DurableTaskSchedulerData s_dataDeserializationInstance; + private static DurableTaskSchedulerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DurableTaskSchedulerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDurableTaskContext.Default); DurableTaskSchedulerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDurableTaskContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.net8.0.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.net8.0.cs index 0b1792848eae..953666491918 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.net8.0.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.net8.0.cs @@ -46,6 +46,7 @@ public DynatraceMonitorData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Dynatrace.Models.DynatraceBillingPlanInfo PlanData { get { throw null; } set { } } public Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorUserInfo UserInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Dynatrace.DynatraceMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Dynatrace.DynatraceMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -260,6 +261,7 @@ namespace Azure.ResourceManager.Dynatrace.Models public static partial class ArmDynatraceModelFactory { public static Azure.ResourceManager.Dynatrace.Models.DynatraceAccountCredentialsInfo DynatraceAccountCredentialsInfo(string accountId = null, string apiKey = null, string regionId = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.DynatraceMonitorData DynatraceMonitorData(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.Dynatrace.Models.DynatraceMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceMonitoringStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorMarketplaceSubscriptionStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceEnvironmentProperties dynatraceEnvironmentProperties = null, Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorUserInfo userInfo = null, Azure.ResourceManager.Dynatrace.Models.DynatraceBillingPlanInfo planData = null, Azure.ResourceManager.Dynatrace.Models.LiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Dynatrace.Models.LiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? provisioningState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState?)) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitoredResourceDetails DynatraceMonitoredResourceDetails(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus? sendingMetricsStatus = default(Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus?), string reasonForMetricsStatus = null, Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus? sendingLogsStatus = default(Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus?), string reasonForLogsStatus = null) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorVmInfo DynatraceMonitorVmInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentEnabledAppServiceInfo DynatraceOneAgentEnabledAppServiceInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs index 0b1792848eae..953666491918 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/api/Azure.ResourceManager.Dynatrace.netstandard2.0.cs @@ -46,6 +46,7 @@ public DynatraceMonitorData(Azure.Core.AzureLocation location) { } public Azure.ResourceManager.Dynatrace.Models.DynatraceBillingPlanInfo PlanData { get { throw null; } set { } } public Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? ProvisioningState { get { throw null; } } public Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorUserInfo UserInfo { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Dynatrace.DynatraceMonitorData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Dynatrace.DynatraceMonitorData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -260,6 +261,7 @@ namespace Azure.ResourceManager.Dynatrace.Models public static partial class ArmDynatraceModelFactory { public static Azure.ResourceManager.Dynatrace.Models.DynatraceAccountCredentialsInfo DynatraceAccountCredentialsInfo(string accountId = null, string apiKey = null, string regionId = null) { throw null; } + public static Azure.ResourceManager.Dynatrace.DynatraceMonitorData DynatraceMonitorData(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.Dynatrace.Models.DynatraceMonitoringStatus? monitoringStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceMonitoringStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorMarketplaceSubscriptionStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceEnvironmentProperties dynatraceEnvironmentProperties = null, Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorUserInfo userInfo = null, Azure.ResourceManager.Dynatrace.Models.DynatraceBillingPlanInfo planData = null, Azure.ResourceManager.Dynatrace.Models.LiftrResourceCategory? liftrResourceCategory = default(Azure.ResourceManager.Dynatrace.Models.LiftrResourceCategory?), int? liftrResourcePreference = default(int?), Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState? provisioningState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceProvisioningState?)) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitoredResourceDetails DynatraceMonitoredResourceDetails(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus? sendingMetricsStatus = default(Azure.ResourceManager.Dynatrace.Models.MetricsSendingStatus?), string reasonForMetricsStatus = null, Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus? sendingLogsStatus = default(Azure.ResourceManager.Dynatrace.Models.LogsSendingStatus?), string reasonForLogsStatus = null) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceMonitorVmInfo DynatraceMonitorVmInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } public static Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentEnabledAppServiceInfo DynatraceOneAgentEnabledAppServiceInfo(Azure.Core.ResourceIdentifier resourceId = null, string version = null, Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType? monitoringType = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentMonitoringType?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting? autoUpdateSetting = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAutoUpdateSetting?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus? updateStatus = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentUpdateStatus?), Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState? availabilityState = default(Azure.ResourceManager.Dynatrace.Models.DynatraceOneAgentAvailabilityState?), Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState? logModule = default(Azure.ResourceManager.Dynatrace.Models.DynatraceLogModuleState?), string hostGroup = null, string hostName = null) { throw null; } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorData.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorData.cs index 3e1d747604d0..be17517cc323 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorData.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/DynatraceMonitorData.cs @@ -9,97 +9,11 @@ using Azure.ResourceManager.Dynatrace.Models; using Azure.ResourceManager.Models; -[assembly:CodeGenSuppressType("DynatraceMonitorData")] namespace Azure.ResourceManager.Dynatrace { - /// A class representing the DynatraceMonitor data model. public partial class DynatraceMonitorData : 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 . - public DynatraceMonitorData(AzureLocation location) : base(location) - { - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The managed service identities assigned to this resource. Current supported identity types: SystemAssigned, UserAssigned, SystemAndUserAssigned. - /// Status of the monitor. - /// Marketplace subscription status. - /// Properties of the Dynatrace environment. - /// User info. - /// Billing plan information. - /// Liftr Resource category. - /// The priority of the resource. - /// Provisioning state of the resource. - /// Keeps track of any properties unknown to the library. - internal DynatraceMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, ResourceManager.Models.SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, DynatraceMonitoringStatus? monitoringStatus, DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, DynatraceEnvironmentProperties dynatraceEnvironmentProperties, DynatraceMonitorUserInfo userInfo, DynatraceBillingPlanInfo planData, LiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, DynatraceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) - { - Identity = identity; - MonitoringStatus = monitoringStatus; - MarketplaceSubscriptionStatus = marketplaceSubscriptionStatus; - DynatraceEnvironmentProperties = dynatraceEnvironmentProperties; - UserInfo = userInfo; - PlanData = planData; - LiftrResourceCategory = liftrResourceCategory; - LiftrResourcePreference = liftrResourcePreference; - ProvisioningState = provisioningState; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - /// The managed service identities assigned to this resource. Current supported identity types: SystemAssigned, UserAssigned, SystemAndUserAssigned. public ManagedServiceIdentity Identity { get; set; } - /// Status of the monitor. - public DynatraceMonitoringStatus? MonitoringStatus { get; set; } - /// Marketplace subscription status. - public DynatraceMonitorMarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get; set; } - /// Properties of the Dynatrace environment. - public DynatraceEnvironmentProperties DynatraceEnvironmentProperties { get; set; } - /// User info. - public DynatraceMonitorUserInfo UserInfo { get; set; } - /// Billing plan information. - public DynatraceBillingPlanInfo PlanData { get; set; } - /// Liftr Resource category. - public LiftrResourceCategory? LiftrResourceCategory { get; } - /// The priority of the resource. - public int? LiftrResourcePreference { get; } - /// Provisioning state of the resource. - public DynatraceProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/Models/DynatraceMonitorData.Serialization.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/Models/DynatraceMonitorData.Serialization.cs index c831ad971c08..85d7e914f7cc 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/Models/DynatraceMonitorData.Serialization.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Customized/Models/DynatraceMonitorData.Serialization.cs @@ -3,9 +3,7 @@ #nullable disable -using System; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Dynatrace.Models; @@ -13,316 +11,19 @@ namespace Azure.ResourceManager.Dynatrace { - public partial class DynatraceMonitorData : IUtf8JsonSerializable, IJsonModel + [CodeGenSerialization(nameof(Identity), SerializationValueHook = nameof(WriteIdentity), DeserializationValueHook = nameof(ReadIdentity))] + public partial class DynatraceMonitorData { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, new ModelReaderWriterOptions("W")); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + internal void WriteIdentity(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - var serializeOptions = new JsonSerializerOptions { Converters = { new DynatraceManagedServiceIdentityTypeConverter() } }; - JsonSerializer.Serialize(writer, Identity, serializeOptions); - } - 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(); - } - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location); - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(MonitoringStatus)) - { - writer.WritePropertyName("monitoringStatus"u8); - writer.WriteStringValue(MonitoringStatus.Value.ToString()); - } - if (Optional.IsDefined(MarketplaceSubscriptionStatus)) - { - writer.WritePropertyName("marketplaceSubscriptionStatus"u8); - writer.WriteStringValue(MarketplaceSubscriptionStatus.Value.ToString()); - } - if (Optional.IsDefined(DynatraceEnvironmentProperties)) - { - writer.WritePropertyName("dynatraceEnvironmentProperties"u8); - writer.WriteObjectValue(DynatraceEnvironmentProperties); - } - if (Optional.IsDefined(UserInfo)) - { - writer.WritePropertyName("userInfo"u8); - writer.WriteObjectValue(UserInfo); - } - if (Optional.IsDefined(PlanData)) - { - writer.WritePropertyName("planData"u8); - writer.WriteObjectValue(PlanData); - } - 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)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - writer.WriteEndObject(); + var serializeOptions = new JsonSerializerOptions { Converters = { new DynatraceManagedServiceIdentityTypeConverter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); } - DynatraceMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + internal static void ReadIdentity(JsonProperty property, ref ManagedServiceIdentity identity) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(DynatraceMonitorData)} does not support '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeDynatraceMonitorData(document.RootElement, options); - } - - internal static DynatraceMonitorData DeserializeDynatraceMonitorData(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= new ModelReaderWriterOptions("W"); - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ManagedServiceIdentity identity = default; - IDictionary tags = default; - AzureLocation location = default; - ResourceIdentifier id = default; - string name = default; - ResourceType type = default; - ResourceManager.Models.SystemData systemData = default; - DynatraceMonitoringStatus? monitoringStatus = default; - DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default; - DynatraceEnvironmentProperties dynatraceEnvironmentProperties = default; - DynatraceMonitorUserInfo userInfo = default; - DynatraceBillingPlanInfo planData = default; - LiftrResourceCategory? liftrResourceCategory = default; - int? liftrResourcePreference = default; - DynatraceProvisioningState? provisioningState = default; - IDictionary serializedAdditionalRawData = default; - Dictionary additionalPropertiesDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - var serializeOptions = new JsonSerializerOptions { Converters = { new DynatraceManagedServiceIdentityTypeConverter() } }; - identity = JsonSerializer.Deserialize(property.Value.ToString(), serializeOptions); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - 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) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.ToString()); - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("monitoringStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - monitoringStatus = new DynatraceMonitoringStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("marketplaceSubscriptionStatus"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - marketplaceSubscriptionStatus = new DynatraceMonitorMarketplaceSubscriptionStatus(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("dynatraceEnvironmentProperties"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - dynatraceEnvironmentProperties = DynatraceEnvironmentProperties.DeserializeDynatraceEnvironmentProperties(property0.Value); - continue; - } - if (property0.NameEquals("userInfo"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - userInfo = DynatraceMonitorUserInfo.DeserializeDynatraceMonitorUserInfo(property0.Value); - continue; - } - if (property0.NameEquals("planData"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - planData = DynatraceBillingPlanInfo.DeserializeDynatraceBillingPlanInfo(property0.Value); - continue; - } - if (property0.NameEquals("liftrResourceCategory"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - liftrResourceCategory = new LiftrResourceCategory(property0.Value.GetString()); - continue; - } - if (property0.NameEquals("liftrResourcePreference"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - liftrResourcePreference = property0.Value.GetInt32(); - continue; - } - if (property0.NameEquals("provisioningState"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - property0.ThrowNonNullablePropertyIsNull(); - continue; - } - provisioningState = new DynatraceProvisioningState(property0.Value.GetString()); - continue; - } - } - continue; - } - if (options.Format != "W") - { - additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = additionalPropertiesDictionary; - return new DynatraceMonitorData( - id, - name, - type, - systemData, - tags ?? new ChangeTrackingDictionary(), - location, identity, - monitoringStatus, - marketplaceSubscriptionStatus, - dynatraceEnvironmentProperties, - userInfo, - planData, - liftrResourceCategory, - liftrResourcePreference, - 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, AzureResourceManagerDynatraceContext.Default); - default: - throw new FormatException($"The model {nameof(DynatraceMonitorData)} does not support '{options.Format}' format."); - } - } - - DynatraceMonitorData 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); - return DeserializeDynatraceMonitorData(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(DynatraceMonitorData)} does not support '{options.Format}' format."); - } + var serializeOptions = new JsonSerializerOptions { Converters = { new DynatraceManagedServiceIdentityTypeConverter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs index 611824478db0..c77a4a01e4fd 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/ArmDynatraceModelFactory.cs @@ -53,6 +53,46 @@ public static DynatraceVmExtensionPayload DynatraceVmExtensionPayload(string ing return new DynatraceVmExtensionPayload(ingestionKey, environmentId, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Status of the monitor. + /// Marketplace subscription status. + /// Properties of the Dynatrace environment. + /// User info. + /// Billing plan information. + /// Liftr Resource category. + /// The priority of the resource. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static DynatraceMonitorData DynatraceMonitorData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, DynatraceMonitoringStatus? monitoringStatus = null, DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = null, DynatraceEnvironmentProperties dynatraceEnvironmentProperties = null, DynatraceMonitorUserInfo userInfo = null, DynatraceBillingPlanInfo planData = null, LiftrResourceCategory? liftrResourceCategory = null, int? liftrResourcePreference = null, DynatraceProvisioningState? provisioningState = null) + { + tags ??= new Dictionary(); + + return new DynatraceMonitorData( + id, + name, + resourceType, + systemData, + tags, + location, + identity, + monitoringStatus, + marketplaceSubscriptionStatus, + dynatraceEnvironmentProperties, + userInfo, + planData, + liftrResourceCategory, + liftrResourcePreference, + provisioningState, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// State of Single Sign On. /// Version of the Dynatrace agent installed on the VM. diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.Serialization.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.Serialization.cs new file mode 100644 index 000000000000..6aa7ad0cb3f2 --- /dev/null +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.Serialization.cs @@ -0,0 +1,317 @@ +// Copyright (c) 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.Dynatrace.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Dynatrace +{ + public partial class DynatraceMonitorData : 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(DynatraceMonitorData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + WriteIdentity(writer, options); + } + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(MonitoringStatus)) + { + writer.WritePropertyName("monitoringStatus"u8); + writer.WriteStringValue(MonitoringStatus.Value.ToString()); + } + if (Optional.IsDefined(MarketplaceSubscriptionStatus)) + { + writer.WritePropertyName("marketplaceSubscriptionStatus"u8); + writer.WriteStringValue(MarketplaceSubscriptionStatus.Value.ToString()); + } + if (Optional.IsDefined(DynatraceEnvironmentProperties)) + { + writer.WritePropertyName("dynatraceEnvironmentProperties"u8); + writer.WriteObjectValue(DynatraceEnvironmentProperties, options); + } + if (Optional.IsDefined(UserInfo)) + { + writer.WritePropertyName("userInfo"u8); + writer.WriteObjectValue(UserInfo, options); + } + if (Optional.IsDefined(PlanData)) + { + writer.WritePropertyName("planData"u8); + writer.WriteObjectValue(PlanData, options); + } + if (options.Format != "W" && Optional.IsDefined(LiftrResourceCategory)) + { + writer.WritePropertyName("liftrResourceCategory"u8); + writer.WriteStringValue(LiftrResourceCategory.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LiftrResourcePreference)) + { + writer.WritePropertyName("liftrResourcePreference"u8); + writer.WriteNumberValue(LiftrResourcePreference.Value); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WriteEndObject(); + } + + DynatraceMonitorData 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(DynatraceMonitorData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDynatraceMonitorData(document.RootElement, options); + } + + internal static DynatraceMonitorData DeserializeDynatraceMonitorData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + AzureLocation location = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + DynatraceMonitoringStatus? monitoringStatus = default; + DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus = default; + DynatraceEnvironmentProperties dynatraceEnvironmentProperties = default; + DynatraceMonitorUserInfo userInfo = default; + DynatraceBillingPlanInfo planData = default; + LiftrResourceCategory? liftrResourceCategory = default; + int? liftrResourcePreference = default; + DynatraceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + ReadIdentity(property, ref identity); + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("monitoringStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + monitoringStatus = new DynatraceMonitoringStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("marketplaceSubscriptionStatus"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + marketplaceSubscriptionStatus = new DynatraceMonitorMarketplaceSubscriptionStatus(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("dynatraceEnvironmentProperties"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynatraceEnvironmentProperties = DynatraceEnvironmentProperties.DeserializeDynatraceEnvironmentProperties(property0.Value, options); + continue; + } + if (property0.NameEquals("userInfo"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + userInfo = DynatraceMonitorUserInfo.DeserializeDynatraceMonitorUserInfo(property0.Value, options); + continue; + } + if (property0.NameEquals("planData"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + planData = DynatraceBillingPlanInfo.DeserializeDynatraceBillingPlanInfo(property0.Value, options); + continue; + } + if (property0.NameEquals("liftrResourceCategory"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + liftrResourceCategory = new LiftrResourceCategory(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("liftrResourcePreference"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + liftrResourcePreference = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("provisioningState"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new DynatraceProvisioningState(property0.Value.GetString()); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DynatraceMonitorData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + identity, + monitoringStatus, + marketplaceSubscriptionStatus, + dynatraceEnvironmentProperties, + userInfo, + planData, + liftrResourceCategory, + liftrResourcePreference, + 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, AzureResourceManagerDynatraceContext.Default); + default: + throw new FormatException($"The model {nameof(DynatraceMonitorData)} does not support writing '{options.Format}' format."); + } + } + + DynatraceMonitorData 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 DeserializeDynatraceMonitorData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DynatraceMonitorData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.cs new file mode 100644 index 000000000000..fe6f820cc2fb --- /dev/null +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorData.cs @@ -0,0 +1,112 @@ +// 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.Dynatrace.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Dynatrace +{ + /// + /// A class representing the DynatraceMonitor data model. + /// Dynatrace Monitor Resource + /// + public partial class DynatraceMonitorData : 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 DynatraceMonitorData(AzureLocation location) : base(location) + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The managed service identities assigned to this resource. + /// Status of the monitor. + /// Marketplace subscription status. + /// Properties of the Dynatrace environment. + /// User info. + /// Billing plan information. + /// Liftr Resource category. + /// The priority of the resource. + /// Provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal DynatraceMonitorData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, DynatraceMonitoringStatus? monitoringStatus, DynatraceMonitorMarketplaceSubscriptionStatus? marketplaceSubscriptionStatus, DynatraceEnvironmentProperties dynatraceEnvironmentProperties, DynatraceMonitorUserInfo userInfo, DynatraceBillingPlanInfo planData, LiftrResourceCategory? liftrResourceCategory, int? liftrResourcePreference, DynatraceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Identity = identity; + MonitoringStatus = monitoringStatus; + MarketplaceSubscriptionStatus = marketplaceSubscriptionStatus; + DynatraceEnvironmentProperties = dynatraceEnvironmentProperties; + UserInfo = userInfo; + PlanData = planData; + LiftrResourceCategory = liftrResourceCategory; + LiftrResourcePreference = liftrResourcePreference; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DynatraceMonitorData() + { + } + /// Status of the monitor. + public DynatraceMonitoringStatus? MonitoringStatus { get; set; } + /// Marketplace subscription status. + public DynatraceMonitorMarketplaceSubscriptionStatus? MarketplaceSubscriptionStatus { get; set; } + /// Properties of the Dynatrace environment. + public DynatraceEnvironmentProperties DynatraceEnvironmentProperties { get; set; } + /// User info. + public DynatraceMonitorUserInfo UserInfo { get; set; } + /// Billing plan information. + public DynatraceBillingPlanInfo PlanData { get; set; } + /// Liftr Resource category. + public LiftrResourceCategory? LiftrResourceCategory { get; } + /// The priority of the resource. + public int? LiftrResourcePreference { get; } + /// Provisioning state of the resource. + public DynatraceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorResource.Serialization.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorResource.Serialization.cs index 262990cc4520..3f86e7f23a77 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorResource.Serialization.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Dynatrace { public partial class DynatraceMonitorResource : IJsonModel { + private static DynatraceMonitorData s_dataDeserializationInstance; + private static DynatraceMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DynatraceMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DynatraceMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDynatraceContext.Default); DynatraceMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDynatraceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceSingleSignOnResource.Serialization.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceSingleSignOnResource.Serialization.cs index 5b5e3a2fae79..6b7525ca6283 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceSingleSignOnResource.Serialization.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceSingleSignOnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Dynatrace { public partial class DynatraceSingleSignOnResource : IJsonModel { + private static DynatraceSingleSignOnData s_dataDeserializationInstance; + private static DynatraceSingleSignOnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DynatraceSingleSignOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DynatraceSingleSignOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDynatraceContext.Default); DynatraceSingleSignOnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDynatraceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceTagRuleResource.Serialization.cs b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceTagRuleResource.Serialization.cs index ca416c8dd891..18f82d2ad038 100644 --- a/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceTagRuleResource.Serialization.cs +++ b/sdk/dynatrace/Azure.ResourceManager.Dynatrace/src/Generated/DynatraceTagRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Dynatrace { public partial class DynatraceTagRuleResource : IJsonModel { + private static DynatraceTagRuleData s_dataDeserializationInstance; + private static DynatraceTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DynatraceTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DynatraceTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerDynatraceContext.Default); DynatraceTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerDynatraceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.Serialization.cs index 1aeba0a6d0a5..aeff009f4cc2 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderAddressResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EdgeOrder { public partial class EdgeOrderAddressResource : IJsonModel { + private static EdgeOrderAddressData s_dataDeserializationInstance; + private static EdgeOrderAddressData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EdgeOrderAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EdgeOrderAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEdgeOrderContext.Default); EdgeOrderAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEdgeOrderContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.Serialization.cs index 6c2edaa8c752..ceb58eb4ebd3 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EdgeOrder { public partial class EdgeOrderItemResource : IJsonModel { + private static EdgeOrderItemData s_dataDeserializationInstance; + private static EdgeOrderItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EdgeOrderItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EdgeOrderItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEdgeOrderContext.Default); EdgeOrderItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEdgeOrderContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.Serialization.cs b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.Serialization.cs index d6700b262008..518a88c9ad3b 100644 --- a/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.Serialization.cs +++ b/sdk/edgeorder/Azure.ResourceManager.EdgeOrder/src/Generated/EdgeOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EdgeOrder { public partial class EdgeOrderResource : IJsonModel { + private static EdgeOrderData s_dataDeserializationInstance; + private static EdgeOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EdgeOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEdgeOrderContext.Default); EdgeOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEdgeOrderContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/edgezones/Azure.ResourceManager.EdgeZones/src/Generated/ExtendedZoneResource.Serialization.cs b/sdk/edgezones/Azure.ResourceManager.EdgeZones/src/Generated/ExtendedZoneResource.Serialization.cs index 5ad8147c3b83..8420aa1d54f2 100644 --- a/sdk/edgezones/Azure.ResourceManager.EdgeZones/src/Generated/ExtendedZoneResource.Serialization.cs +++ b/sdk/edgezones/Azure.ResourceManager.EdgeZones/src/Generated/ExtendedZoneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EdgeZones { public partial class ExtendedZoneResource : IJsonModel { + private static ExtendedZoneData s_dataDeserializationInstance; + private static ExtendedZoneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtendedZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtendedZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEdgeZonesContext.Default); ExtendedZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEdgeZonesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticMonitorResource.Serialization.cs b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticMonitorResource.Serialization.cs index 89120a246f4b..920946797041 100644 --- a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticMonitorResource.Serialization.cs +++ b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Elastic { public partial class ElasticMonitorResource : IJsonModel { + private static ElasticMonitorData s_dataDeserializationInstance; + private static ElasticMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticContext.Default); ElasticMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticOpenAIIntegrationResource.Serialization.cs b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticOpenAIIntegrationResource.Serialization.cs index 4340d4e2c2ea..1b1693fb0726 100644 --- a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticOpenAIIntegrationResource.Serialization.cs +++ b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticOpenAIIntegrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Elastic { public partial class ElasticOpenAIIntegrationResource : IJsonModel { + private static ElasticOpenAIIntegrationData s_dataDeserializationInstance; + private static ElasticOpenAIIntegrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticOpenAIIntegrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticOpenAIIntegrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticContext.Default); ElasticOpenAIIntegrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticTagRuleResource.Serialization.cs b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticTagRuleResource.Serialization.cs index e54d9f2acf1a..bde4e167574b 100644 --- a/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticTagRuleResource.Serialization.cs +++ b/sdk/elastic/Azure.ResourceManager.Elastic/src/Generated/ElasticTagRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Elastic { public partial class ElasticTagRuleResource : IJsonModel { + private static ElasticTagRuleData s_dataDeserializationInstance; + private static ElasticTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticContext.Default); ElasticTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.Serialization.cs index d5ee24678b8b..bbe2e0ee5418 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ElasticSan { public partial class ElasticSanPrivateEndpointConnectionResource : IJsonModel { + private static ElasticSanPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ElasticSanPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticSanPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticSanPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticSanContext.Default); ElasticSanPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticSanContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.Serialization.cs index fe4ae87cc9e9..d2e0bf216afb 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ElasticSan { public partial class ElasticSanResource : IJsonModel { + private static ElasticSanData s_dataDeserializationInstance; + private static ElasticSanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticSanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticSanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticSanContext.Default); ElasticSanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticSanContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.Serialization.cs index f08c1e0c7b49..b6a257964360 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ElasticSan { public partial class ElasticSanSnapshotResource : IJsonModel { + private static ElasticSanSnapshotData s_dataDeserializationInstance; + private static ElasticSanSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticSanSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticSanSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticSanContext.Default); ElasticSanSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticSanContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.Serialization.cs index 16f38b852ef4..3383824a0776 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ElasticSan { public partial class ElasticSanVolumeGroupResource : IJsonModel { + private static ElasticSanVolumeGroupData s_dataDeserializationInstance; + private static ElasticSanVolumeGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticSanVolumeGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticSanVolumeGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticSanContext.Default); ElasticSanVolumeGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticSanContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.Serialization.cs b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.Serialization.cs index b0231593dca2..5ef8f67990c6 100644 --- a/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.Serialization.cs +++ b/sdk/elasticsan/Azure.ResourceManager.ElasticSan/src/Generated/ElasticSanVolumeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ElasticSan { public partial class ElasticSanVolumeResource : IJsonModel { + private static ElasticSanVolumeData s_dataDeserializationInstance; + private static ElasticSanVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticSanVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticSanVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerElasticSanContext.Default); ElasticSanVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerElasticSanContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContextExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContextExtensions.cs index aa9b79aff79f..f7de1d2ea1f7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContextExtensions.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/RequestContextExtensions.cs @@ -13,14 +13,14 @@ namespace Azure.Messaging.EventGrid.Namespaces { internal static partial class RequestContextExtensions { - /// - public static ValueTuple Parse(this RequestContext requestContext) + /// 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 (requestContext == null) + if (context == null) { return (CancellationToken.None, ErrorOptions.Default); } - return (requestContext.CancellationToken, requestContext.ErrorOptions); + return (context.CancellationToken, context.ErrorOptions); } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/TypeFormatters.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/TypeFormatters.cs index 01914b27eb23..b0005ffdd93d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/TypeFormatters.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.Namespaces/src/Generated/Internal/TypeFormatters.cs @@ -8,7 +8,6 @@ using System; using System.Collections.Generic; using System.Globalization; -using System.Xml; namespace Azure.Messaging.EventGrid.Namespaces { diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/CHANGELOG.md index 9fbdd4d4ca98..5b546e7e1e97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.4 (Unreleased) ### Features Added @@ -10,6 +10,13 @@ ### Other Changes +## 1.0.0-beta.3 (2025-05-19) + +### Features Added +- Added new communication events. +- Added new API management events. +- Add `EdgeSolutionVersionPublishedEventData` Edge event. + ## 1.0.0-beta.2 (2025-02-21) ### Features Added diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs index 92092fa653b1..abe460ad2407 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.net8.0.cs @@ -7,6 +7,191 @@ public static partial class EventGridExtensions } namespace Azure.Messaging.EventGrid.SystemEvents { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind 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.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedEventData() { } + public System.TimeSpan? CallDuration { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndReasonProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallGroupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallingEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantAddedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantEventProperties : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantEventProperties() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? Role { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantRemovedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AcsCallParticipantRoleKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantRoleKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind 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.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallRoomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallStartedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsChatEventBaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatEventBaseProperties() { } @@ -307,6 +492,18 @@ 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 AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsEmailDeliveryReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailDeliveryReportReceivedEventData() { } @@ -1320,6 +1517,52 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary> Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1673,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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1720,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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2338,6 +2628,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 EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2447,6 +2754,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public static partial class EventGridSystemEventsModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind type = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, System.TimeSpan? callDuration = default(System.TimeSpan?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties AcsCallParticipantEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -2470,6 +2789,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string internetMessageId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus?), Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, System.DateTimeOffset? deliveryAttemptTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails AcsEmailDeliveryReportStatusDetails(string statusMessage = null, string recipientMailServerHostName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, System.DateTimeOffset? userActionTimestamp = default(System.DateTimeOffset?), string engagementContext = null, string userAgent = null, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement = default(Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement?)) { throw null; } @@ -2532,6 +2852,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary> rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2542,7 +2866,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2608,6 +2936,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4378,6 +4707,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -4394,6 +4728,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -4433,6 +4768,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4443,6 +4780,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4482,6 +4821,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs index 92092fa653b1..abe460ad2407 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/api/Azure.Messaging.EventGrid.SystemEvents.netstandard2.0.cs @@ -7,6 +7,191 @@ public static partial class EventGridExtensions } namespace Azure.Messaging.EventGrid.SystemEvents { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind 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.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public string Name { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Type { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndedEventData() { } + public System.TimeSpan? CallDuration { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallEndReasonProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallGroupProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallingEventProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantAddedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantEventProperties : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantEventProperties() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? Role { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallParticipantRemovedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 AcsCallParticipantRoleKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantRoleKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind 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.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallRoomProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsCallStartedEventData() { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsChatEventBaseProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsChatEventBaseProperties() { } @@ -307,6 +492,18 @@ 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 AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AcsEmailDeliveryReportReceivedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AcsEmailDeliveryReportReceivedEventData() { } @@ -1320,6 +1517,52 @@ 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 ApiManagementCircuitBreakerClosedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerOpenedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementCircuitBreakerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary> Rules { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementExpiredGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayApiAddedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayApiAddedEventData() { } @@ -1430,6 +1673,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 ApiManagementGatewayProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenExpiredEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties GatewayInfo { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementGatewayUpdatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementGatewayUpdatedEventData() { } @@ -1441,6 +1720,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 ApiManagementNearExpiryGatewayTokenProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ApiManagementNearExpiryGatewayTokenProperties() { } + public System.DateTimeOffset ExpiredAtUtc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ApiManagementProductCreatedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ApiManagementProductCreatedEventData() { } @@ -2338,6 +2628,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 EdgeSolutionVersionPublishedEventData : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EventGridMqttClientCreatedOrUpdatedEventData() { } @@ -2447,6 +2754,18 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write } public static partial class EventGridSystemEventsModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind type = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, System.TimeSpan? callDuration = default(System.TimeSpan?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventProperties AcsCallParticipantEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRoleKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -2470,6 +2789,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender = null, string recipient = null, string internetMessageId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status = default(Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus?), Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails = null, System.DateTimeOffset? deliveryAttemptTimestamp = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails AcsEmailDeliveryReportStatusDetails(string statusMessage = null, string recipientMailServerHostName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailEngagementTrackingReportReceivedEventData AcsEmailEngagementTrackingReportReceivedEventData(string sender = null, string recipient = null, string messageId = null, System.DateTimeOffset? userActionTimestamp = default(System.DateTimeOffset?), string engagementContext = null, string userAgent = null, Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement? engagement = default(Azure.Messaging.EventGrid.SystemEvents.AcsUserEngagement?)) { throw null; } @@ -2532,6 +2852,10 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary> rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -2542,7 +2866,11 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties tokenInfo = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gatewayInfo = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(System.DateTimeOffset expiredAtUtc = default(System.DateTimeOffset)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductUpdatedEventData ApiManagementProductUpdatedEventData(string resourceUri = null) { throw null; } @@ -2608,6 +2936,7 @@ public static partial class EventGridSystemEventsModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -4378,6 +4707,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -4394,6 +4728,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -4433,6 +4768,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -4443,6 +4780,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -4482,6 +4821,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Azure.Messaging.EventGrid.SystemEvents.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Azure.Messaging.EventGrid.SystemEvents.csproj index c3c1959bc5cf..6f5279911e29 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Azure.Messaging.EventGrid.SystemEvents.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Azure.Messaging.EventGrid.SystemEvents.csproj @@ -3,7 +3,7 @@ Azure Event Grid is a publish-subscribe service that allows cloud events to be passed from producers to consumers. This library contains the system event models used by Azure Event Grid. For more information about Event Grid, see https://azure.microsoft.com/services/event-grid. Azure EventGrid System Events client library - 1.0.0-beta.3 + 1.0.0-beta.4 Azure;Event Grid;CloudEvent;$(PackageCommonTags) $(RequiredTargetFrameworks) true diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Customization/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Customization/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..2f740d099cd4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Customization/AcsCallEndedEventData.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedEventData + { + /// Duration of the call. + [CodeGenMember("CallDurationInSeconds")] + public TimeSpan? CallDuration { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..a3d90e809d06 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties : 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(AcsCallEndReasonProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteNumberValue(Code.Value); + } + if (Optional.IsDefined(SubCode)) + { + writer.WritePropertyName("subCode"u8); + writer.WriteNumberValue(SubCode.Value); + } + if (Optional.IsDefined(Phrase)) + { + writer.WritePropertyName("phrase"u8); + writer.WriteStringValue(Phrase); + } + 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 + } + } + } + + AcsCallEndReasonProperties 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(AcsCallEndReasonProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndReasonProperties(document.RootElement, options); + } + + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("phrase"u8)) + { + phrase = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallEndReasonProperties(code, subCode, phrase, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndReasonProperties 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 DeserializeAcsCallEndReasonProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndReasonProperties)} 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 AcsCallEndReasonProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..b0c87d904258 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndReasonProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties + { + /// + /// 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 AcsCallEndReasonProperties() + { + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for the ending the call. + /// Keeps track of any properties unknown to the library. + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase, IDictionary serializedAdditionalRawData) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for the ending the call. + public string Phrase { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..9ddeb05d3059 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByKind.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.Messaging.EventGrid.SystemEvents +{ + /// Call ended participant kind. + public readonly partial struct AcsCallEndedByKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallEndedByKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ParticipantValue = "Participant"; + private const string MicrosoftInternalValue = "MicrosoftInternal"; + + /// Participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// MicrosoftInternal. + public static AcsCallEndedByKind MicrosoftInternal { get; } = new AcsCallEndedByKind(MicrosoftInternalValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallEndedByKind left, AcsCallEndedByKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallEndedByKind left, AcsCallEndedByKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallEndedByKind(string value) => new AcsCallEndedByKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallEndedByKind other && Equals(other); + /// + public bool Equals(AcsCallEndedByKind 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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..de140430957f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties : 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(AcsCallEndedByProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("communicationIdentifier"u8); + writer.WriteObjectValue(CommunicationIdentifier, options); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + 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 + } + } + } + + AcsCallEndedByProperties 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(AcsCallEndedByProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedByProperties(document.RootElement, options); + } + + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind type = default; + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new AcsCallEndedByKind(property.Value.GetString()); + 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 AcsCallEndedByProperties(communicationIdentifier, type, name, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndedByProperties 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 DeserializeAcsCallEndedByProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndedByProperties)} 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 AcsCallEndedByProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..d5f9948a9c95 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedByProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event ended by properties. + public partial class AcsCallEndedByProperties + { + /// + /// 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 communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// or is null. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind type, string name) + { + Argument.AssertNotNull(communicationIdentifier, nameof(communicationIdentifier)); + Argument.AssertNotNull(name, nameof(name)); + + CommunicationIdentifier = communicationIdentifier; + Type = type; + Name = name; + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// Keeps track of any properties unknown to the library. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind type, string name, IDictionary serializedAdditionalRawData) + { + CommunicationIdentifier = communicationIdentifier; + Type = type; + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallEndedByProperties() + { + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of call ended by. + public AcsCallEndedByKind Type { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..62852ca42416 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,234 @@ +// Copyright (c) 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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedEventData : 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(AcsCallEndedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(EndedBy)) + { + writer.WritePropertyName("endedBy"u8); + writer.WriteObjectValue(EndedBy, options); + } + if (Optional.IsDefined(Reason)) + { + writer.WritePropertyName("reason"u8); + writer.WriteObjectValue(Reason, options); + } + if (Optional.IsDefined(CallDuration)) + { + writer.WritePropertyName("callDurationInSeconds"u8); + writer.WriteNumberValue(Convert.ToDouble(CallDuration.Value.ToString("s\\.FFFFFF"))); + } + } + + AcsCallEndedEventData 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(AcsCallEndedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement, options); + } + + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + TimeSpan? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value, options); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value, options); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = TimeSpan.FromSeconds(property.Value.GetDouble()); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + endedBy, + reason, + callDurationInSeconds); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallEndedEventData 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 DeserializeAcsCallEndedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallEndedEventData)} 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 new AcsCallEndedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..35fb4a6c4b90 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallEndedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, TimeSpan? callDuration) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + EndedBy = endedBy; + Reason = reason; + CallDuration = callDuration; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallEndedEventData() + { + } + + /// The communication identifier of the user who was disconnected. + public AcsCallEndedByProperties EndedBy { get; } + /// The reason for ending the call. + public AcsCallEndReasonProperties Reason { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..cccac49b1463 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallGroupProperties : 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(AcsCallGroupProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + 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 + } + } + } + + AcsCallGroupProperties 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(AcsCallGroupProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallGroupProperties(document.RootElement, options); + } + + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallGroupProperties(id, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallGroupProperties 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 DeserializeAcsCallGroupProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallGroupProperties)} 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 AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..801407f9494f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallGroupProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event group properties. + public partial class AcsCallGroupProperties + { + /// + /// 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 AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. + /// Keeps track of any properties unknown to the library. + internal AcsCallGroupProperties(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Group Id. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..4ad08d138168 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.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.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantAddedEventData : 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(AcsCallParticipantAddedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallParticipantAddedEventData 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(AcsCallParticipantAddedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement, options); + } + + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantAddedEventData 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 DeserializeAcsCallParticipantAddedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantAddedEventData)} 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 new AcsCallParticipantAddedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..45ad9970d45b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData, user, displayName, participantId, userAgent) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantAddedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs new file mode 100644 index 000000000000..ccfbbae592d8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.Serialization.cs @@ -0,0 +1,238 @@ +// Copyright (c) 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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantEventProperties : 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(AcsCallParticipantEventProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(User)) + { + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, options); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsDefined(ParticipantId)) + { + writer.WritePropertyName("participantId"u8); + writer.WriteStringValue(ParticipantId); + } + if (Optional.IsDefined(UserAgent)) + { + writer.WritePropertyName("userAgent"u8); + writer.WriteStringValue(UserAgent); + } + } + + AcsCallParticipantEventProperties 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(AcsCallParticipantEventProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventProperties(document.RootElement, options); + } + + internal static AcsCallParticipantEventProperties DeserializeAcsCallParticipantEventProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantEventProperties 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 DeserializeAcsCallParticipantEventProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantEventProperties)} 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 new AcsCallParticipantEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventProperties(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs new file mode 100644 index 000000000000..2eae86d0e430 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantEventProperties.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all participant events. + public partial class AcsCallParticipantEventProperties : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallParticipantEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantEventProperties() + { + } + + /// The user of the call participant. + public AcsCallParticipantProperties User { get; } + /// The display name of the participant. + public string DisplayName { get; } + /// The id of the participant. + public string ParticipantId { get; } + /// The user agent of the participant. + public string UserAgent { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..fe4c37ba7cb6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) 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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties : 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(AcsCallParticipantProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(CommunicationIdentifier)) + { + writer.WritePropertyName("communicationIdentifier"u8); + writer.WriteObjectValue(CommunicationIdentifier, options); + } + if (Optional.IsDefined(Role)) + { + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role.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 + } + } + } + + AcsCallParticipantProperties 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(AcsCallParticipantProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantProperties(document.RootElement, options); + } + + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallParticipantRoleKind? role = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantRoleKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantProperties(communicationIdentifier, role, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantProperties 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 DeserializeAcsCallParticipantProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantProperties)} 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 AcsCallParticipantProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..4bbc8bb0dd82 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all participant event user. + public partial class AcsCallParticipantProperties + { + /// + /// 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 AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the participant user. + /// The role of the participant. + /// Keeps track of any properties unknown to the library. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallParticipantRoleKind? role, IDictionary serializedAdditionalRawData) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The communication identifier of the participant user. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of the participant. + public AcsCallParticipantRoleKind? Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..67b9044dae03 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.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.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantRemovedEventData : 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(AcsCallParticipantRemovedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallParticipantRemovedEventData 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(AcsCallParticipantRemovedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement, options); + } + + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData, + user, + displayName, + participantId, + userAgent); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallParticipantRemovedEventData 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 DeserializeAcsCallParticipantRemovedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallParticipantRemovedEventData)} 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 new AcsCallParticipantRemovedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..cf3bb51128fe --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData, user, displayName, participantId, userAgent) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallParticipantRemovedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRoleKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRoleKind.cs new file mode 100644 index 000000000000..042f6d12491f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallParticipantRoleKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Call participant role kind. + public readonly partial struct AcsCallParticipantRoleKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantRoleKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string OrganizerValue = "Organizer"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + + /// Attendee. + public static AcsCallParticipantRoleKind Attendee { get; } = new AcsCallParticipantRoleKind(AttendeeValue); + /// Presenter. + public static AcsCallParticipantRoleKind Presenter { get; } = new AcsCallParticipantRoleKind(PresenterValue); + /// Organizer. + public static AcsCallParticipantRoleKind Organizer { get; } = new AcsCallParticipantRoleKind(OrganizerValue); + /// Consumer. + public static AcsCallParticipantRoleKind Consumer { get; } = new AcsCallParticipantRoleKind(ConsumerValue); + /// Collaborator. + public static AcsCallParticipantRoleKind Collaborator { get; } = new AcsCallParticipantRoleKind(CollaboratorValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantRoleKind left, AcsCallParticipantRoleKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantRoleKind left, AcsCallParticipantRoleKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantRoleKind(string value) => new AcsCallParticipantRoleKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantRoleKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantRoleKind 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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..29a5accba97f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties : 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(AcsCallRoomProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + 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 + } + } + } + + AcsCallRoomProperties 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(AcsCallRoomProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallRoomProperties(document.RootElement, options); + } + + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = 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 (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallRoomProperties(id, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallRoomProperties 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 DeserializeAcsCallRoomProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallRoomProperties)} 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 AcsCallRoomProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..85fc5ddad67b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallRoomProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event room properties. + public partial class AcsCallRoomProperties + { + /// + /// 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 AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. + /// Keeps track of any properties unknown to the library. + internal AcsCallRoomProperties(string id, IDictionary serializedAdditionalRawData) + { + Id = id; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Room Id. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..ebf62eb5bebc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) 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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallStartedEventData : 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(AcsCallStartedEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AcsCallStartedEventData 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(AcsCallStartedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement, options); + } + + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsCallStartedEventData 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 DeserializeAcsCallStartedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallStartedEventData)} 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 new AcsCallStartedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..084316dc68df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallStartedEventData.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal AcsCallStartedEventData() + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..b08680fc858a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties : 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(AcsCallingEventProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("startedBy"u8); + writer.WriteObjectValue(StartedBy, options); + writer.WritePropertyName("serverCallId"u8); + writer.WriteStringValue(ServerCallId); + if (Optional.IsDefined(Group)) + { + writer.WritePropertyName("group"u8); + writer.WriteObjectValue(Group, options); + } + if (Optional.IsDefined(Room)) + { + writer.WritePropertyName("room"u8); + writer.WriteObjectValue(Room, options); + } + if (Optional.IsDefined(IsTwoParty)) + { + writer.WritePropertyName("isTwoParty"u8); + writer.WriteBooleanValue(IsTwoParty.Value); + } + writer.WritePropertyName("correlationId"u8); + writer.WriteStringValue(CorrelationId); + if (Optional.IsDefined(IsRoomsCall)) + { + writer.WritePropertyName("isRoomsCall"u8); + writer.WriteBooleanValue(IsRoomsCall.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 + } + } + } + + AcsCallingEventProperties 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(AcsCallingEventProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallingEventProperties(document.RootElement, options); + } + + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value, options); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value, options); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value, options); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} does not support writing '{options.Format}' format."); + } + } + + AcsCallingEventProperties 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 DeserializeAcsCallingEventProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsCallingEventProperties)} 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 AcsCallingEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..0c4873031004 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsCallingEventProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// + /// 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 . + /// The call participant who initiated the call. + /// The call id of the server. + /// The correlationId of calling event. + /// , or is null. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + + StartedBy = startedBy; + ServerCallId = serverCallId; + CorrelationId = correlationId; + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// Keeps track of any properties unknown to the library. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, IDictionary serializedAdditionalRawData) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AcsCallingEventProperties() + { + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The call id of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The room metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlationId of calling event. + public string CorrelationId { get; } + /// Is the calling event a room call. + public bool? IsRoomsCall { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..1092b50c80c1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : 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(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + AcsChatAzureBotCommandReceivedInThreadEventData 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(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement, options); + } + + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsChatAzureBotCommandReceivedInThreadEventData 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 DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsChatAzureBotCommandReceivedInThreadEventData)} 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 new AcsChatAzureBotCommandReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..919251bdce5a --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatAzureBotCommandReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread event. + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// Keeps track of any properties unknown to the library. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + MessageBody = messageBody; + Metadata = metadata; + } + + /// Initializes a new instance of for deserialization. + internal AcsChatAzureBotCommandReceivedInThreadEventData() + { + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs index 3365f7470da2..18c1b8e175ba 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.Serialization.cs @@ -41,11 +41,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("transactionId"u8); writer.WriteStringValue(TransactionId); } - if (Optional.IsDefined(ThreadId)) - { - writer.WritePropertyName("threadId"u8); - writer.WriteStringValue(ThreadId); - } + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs index ab0c02f851ba..54f025db262c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventBaseProperties.cs @@ -47,12 +47,15 @@ public partial class AcsChatEventBaseProperties /// Initializes a new instance of . /// The communication identifier of the target user. - /// is null. - internal AcsChatEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier) + /// The chat thread id. + /// or is null. + internal AcsChatEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); RecipientCommunicationIdentifier = recipientCommunicationIdentifier; + ThreadId = threadId; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs index bc048ca4a1d3..9457972cb6c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.Serialization.cs @@ -39,11 +39,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("transactionId"u8); writer.WriteStringValue(TransactionId); } - if (Optional.IsDefined(ThreadId)) - { - writer.WritePropertyName("threadId"u8); - writer.WriteStringValue(ThreadId); - } + writer.WritePropertyName("threadId"u8); + writer.WriteStringValue(ThreadId); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs index a19356f6f111..7648670599d0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatEventInThreadBaseProperties.cs @@ -46,8 +46,13 @@ public partial class AcsChatEventInThreadBaseProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() + /// The chat thread id. + /// is null. + internal AcsChatEventInThreadBaseProperties(string threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); + + ThreadId = threadId; } /// Initializes a new instance of . @@ -61,6 +66,11 @@ internal AcsChatEventInThreadBaseProperties(string transactionId, string threadI _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AcsChatEventInThreadBaseProperties() + { + } + /// The transaction id will be used as co-relation vector. public string TransactionId { get; } /// The chat thread id. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs index 5f6a22502794..ab6faf874410 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedEventData.cs @@ -15,12 +15,18 @@ public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBasePro { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// or is null. - internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs index 36a7b77ba1a3..085d7b6de3b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageDeletedInThreadEventData.cs @@ -14,11 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// is null. - internal AcsChatMessageDeletedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier) : base(senderCommunicationIdentifier) + /// The type of the message. + /// , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs index 989987894be7..64b6c90bc6bd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (Optional.IsDefined(EditTime)) { writer.WritePropertyName("editTime"u8); @@ -98,6 +98,10 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,7 +190,7 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve type, version, messageBody, - metadata, + metadata ?? new ChangeTrackingDictionary(), editTime); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs index b124a0af4025..f8e58f011f23 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedEventData.cs @@ -15,16 +15,23 @@ public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProp { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// , or is null. - internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs index bd019e93220c..a0b8f5ed87b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (Optional.IsDefined(EditTime)) { writer.WritePropertyName("editTime"u8); @@ -97,6 +97,10 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +183,7 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE type, version, messageBody, - metadata, + metadata ?? new ChangeTrackingDictionary(), editTime); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs index 70250f33da52..8d7ba4725066 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEditedInThreadEventData.cs @@ -14,15 +14,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// or is null. - internal AcsChatMessageEditedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs index c3526fdc85b2..75098026e6a7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); writer.WritePropertyName("senderCommunicationIdentifier"u8); writer.WriteObjectValue(SenderCommunicationIdentifier, options); if (Optional.IsDefined(SenderDisplayName)) @@ -52,11 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("composeTime"u8); writer.WriteStringValue(ComposeTime.Value, "O"); } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs index 0d2231a308ce..640ebaac0733 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventBaseProperties.cs @@ -15,14 +15,22 @@ public partial class AcsChatMessageEventBaseProperties : AcsChatEventBasePropert { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// or is null. - internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index f44f356868b0..2921ac52b9b9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); writer.WritePropertyName("senderCommunicationIdentifier"u8); writer.WriteObjectValue(SenderCommunicationIdentifier, options); if (Optional.IsDefined(SenderDisplayName)) @@ -52,11 +49,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("composeTime"u8); writer.WriteStringValue(ComposeTime.Value, "O"); } - if (Optional.IsDefined(Type)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(Type); - } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); if (Optional.IsDefined(Version)) { writer.WritePropertyName("version"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs index 3ae4acc44ddd..a15c487d6853 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageEventInThreadBaseProperties.cs @@ -14,13 +14,21 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// is null. - internal AcsChatMessageEventInThreadBaseProperties(CommunicationIdentifierModel senderCommunicationIdentifier) + /// The type of the message. + /// , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs index 96099ec505ca..fbb27ab2b4ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); } AcsChatMessageReceivedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -92,6 +92,10 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -171,7 +175,7 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive type, version, messageBody, - metadata); + metadata ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs index 1f9a4f91d206..481aac65bc83 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedEventData.cs @@ -15,16 +15,23 @@ public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBasePr { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// , or is null. - internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(recipientCommunicationIdentifier, senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(recipientCommunicationIdentifier, threadId, messageId, senderCommunicationIdentifier, type) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 7400be92201e..3486dc834635 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -35,19 +35,19 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(MessageBody)) + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName("messageBody"u8); - writer.WriteStringValue(MessageBody); - } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); } AcsChatMessageReceivedInThreadEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -91,6 +91,10 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -164,7 +168,7 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag type, version, messageBody, - metadata); + metadata ?? new ChangeTrackingDictionary()); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs index c99363e44298..3e0405cc8453 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatMessageReceivedInThreadEventData.cs @@ -14,15 +14,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. /// The communication identifier of the sender. - /// The chat message metadata. - /// or is null. - internal AcsChatMessageReceivedInThreadEventData(CommunicationIdentifierModel senderCommunicationIdentifier, IReadOnlyDictionary metadata) : base(senderCommunicationIdentifier) + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); - Metadata = metadata; + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs index 5ae69978e278..de246568de34 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadEventData.cs @@ -14,11 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who added the user. /// The details of the user who was added. - /// or is null. - internal AcsChatParticipantAddedToThreadEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) + /// , or is null. + internal AcsChatParticipantAddedToThreadEventData(string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs index 407412eb394b..b0d721b171d2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -15,12 +15,14 @@ public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatT { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who added the user. /// The details of the user who was added. - /// , or is null. - internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); Argument.AssertNotNull(participantAdded, nameof(participantAdded)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs index b3b2328112b9..d3a868a5ed45 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadEventData.cs @@ -14,11 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who removed the user. /// The details of the user who was removed. - /// or is null. - internal AcsChatParticipantRemovedFromThreadEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) + /// , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index d99153a59c67..5704886c204e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -15,12 +15,14 @@ public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsC { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who removed the user. /// The details of the user who was removed. - /// , or is null. - internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs index 284a7cbf116e..c993ef1ff260 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.Serialization.cs @@ -57,21 +57,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri #endif } writer.WriteEndObject(); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -130,6 +136,10 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -190,7 +200,7 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve version, createdByCommunicationIdentifier, properties, - metadata, + metadata ?? new ChangeTrackingDictionary(), participants); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs index dd366f600f08..1b561ad11587 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,22 +14,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who created the thread. /// The thread properties. - /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , or is null. - internal AcsChatThreadCreatedEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) + /// , or is null. + internal AcsChatThreadCreatedEventData(string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); - Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; - Metadata = metadata; - Participants = participants.ToList(); + Metadata = new ChangeTrackingDictionary(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs index 6a4d1d4ce236..5d4bdbbe8238 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -57,21 +57,27 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri #endif } writer.WriteEndObject(); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("participants"u8); - writer.WriteStartArray(); - foreach (var item in Participants) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("participants"u8); + writer.WriteStartArray(); + foreach (var item in Participants) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsChatThreadCreatedWithUserEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -131,6 +137,10 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -197,7 +207,7 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr version, createdByCommunicationIdentifier, properties, - metadata, + metadata ?? new ChangeTrackingDictionary(), participants); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs index 428a332bf9a3..ec49d2bdc311 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadCreatedWithUserEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -16,23 +15,21 @@ public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who created the thread. /// The thread properties. - /// The thread metadata. - /// The list of properties of participants who are part of the thread. - /// , , , or is null. - internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IEnumerable participants) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); - Argument.AssertNotNull(metadata, nameof(metadata)); - Argument.AssertNotNull(participants, nameof(participants)); CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; - Metadata = metadata; - Participants = participants.ToList(); + Metadata = new ChangeTrackingDictionary(); + Participants = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs index 249893e1f9ee..f9e29fda778e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadDeletedEventData.cs @@ -14,10 +14,12 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who deleted the thread. - /// is null. - internal AcsChatThreadDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) + /// or is null. + internal AcsChatThreadDeletedEventData(string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs index 1ead8005f0c1..5739999e6d8d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventBaseProperties.cs @@ -15,10 +15,12 @@ public partial class AcsChatThreadEventBaseProperties : AcsChatEventBaseProperti { /// Initializes a new instance of . /// The communication identifier of the target user. - /// is null. - internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventBaseProperties(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs index 511e7ddeba0e..95741434979f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadEventInThreadBaseProperties.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The chat thread id. + /// is null. + internal AcsChatThreadEventInThreadBaseProperties(string threadId) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -30,6 +33,11 @@ internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string t Version = version; } + /// Initializes a new instance of for deserialization. + internal AcsChatThreadEventInThreadBaseProperties() + { + } + /// The original creation time of the thread. public DateTimeOffset? CreateTime { get; } /// The version of the thread. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs index 4c0db40a2cba..2c1c21d70f17 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.Serialization.cs @@ -41,14 +41,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("participantCommunicationIdentifier"u8); writer.WriteObjectValue(ParticipantCommunicationIdentifier, options); - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -105,6 +108,10 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -119,7 +126,7 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } } serializedAdditionalRawData = rawDataDictionary; - return new AcsChatThreadParticipantProperties(displayName, participantCommunicationIdentifier, metadata, serializedAdditionalRawData); + return new AcsChatThreadParticipantProperties(displayName, participantCommunicationIdentifier, metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs index 5fae54aff8c5..5022f028e4ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadParticipantProperties.cs @@ -47,15 +47,13 @@ public partial class AcsChatThreadParticipantProperties /// Initializes a new instance of . /// The communication identifier of the user. - /// The metadata of the user. - /// or is null. - internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier, IReadOnlyDictionary metadata) + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); ParticipantCommunicationIdentifier = participantCommunicationIdentifier; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs index 748afca8b6d6..148524306cfd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,12 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . + /// The chat thread id. /// The communication identifier of the user who updated the thread properties. /// The updated thread properties. /// The thread metadata. - /// , or is null. - internal AcsChatThreadPropertiesUpdatedEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) + /// , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(threadId) { + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); Argument.AssertNotNull(properties, nameof(properties)); Argument.AssertNotNull(metadata, nameof(metadata)); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 788bb4a1b95f..4e86417e37e5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -42,14 +42,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("editTime"u8); writer.WriteStringValue(EditTime.Value, "O"); } - writer.WritePropertyName("metadata"u8); - writer.WriteStartObject(); - foreach (var item in Metadata) + if (Optional.IsCollectionDefined(Metadata)) { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); } - writer.WriteEndObject(); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); foreach (var item in Properties) @@ -121,6 +124,10 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("metadata"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,7 +201,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha version, editedByCommunicationIdentifier, editTime, - metadata, + metadata ?? new ChangeTrackingDictionary(), properties); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index dc53eadefb4c..9658d8488cba 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -15,19 +15,19 @@ public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThr { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who updated the thread properties. - /// The thread metadata. /// The updated thread properties. - /// , , or is null. - internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary metadata, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier) + /// , , or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); - Argument.AssertNotNull(metadata, nameof(metadata)); Argument.AssertNotNull(properties, nameof(properties)); EditedByCommunicationIdentifier = editedByCommunicationIdentifier; - Metadata = metadata; + Metadata = new ChangeTrackingDictionary(); Properties = properties; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs index d0c52952554e..54c3055e2f19 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatThreadWithUserDeletedEventData.cs @@ -15,11 +15,13 @@ public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventB { /// Initializes a new instance of . /// The communication identifier of the target user. + /// The chat thread id. /// The communication identifier of the user who deleted the thread. - /// or is null. - internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(recipientCommunicationIdentifier) + /// , or is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel recipientCommunicationIdentifier, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(recipientCommunicationIdentifier, threadId) { Argument.AssertNotNull(recipientCommunicationIdentifier, nameof(recipientCommunicationIdentifier)); + Argument.AssertNotNull(threadId, nameof(threadId)); Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..4be3e4d48a3d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.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.Messaging.EventGrid.SystemEvents +{ + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : 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(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("messageBody"u8); + writer.WriteStringValue(MessageBody); + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + AcsChatTypingIndicatorReceivedInThreadEventData 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(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement, options); + } + + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value, options); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} does not support writing '{options.Format}' format."); + } + } + + AcsChatTypingIndicatorReceivedInThreadEventData 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 DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AcsChatTypingIndicatorReceivedInThreadEventData)} 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 new AcsChatTypingIndicatorReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..7fad227103aa --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsChatTypingIndicatorReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread event. + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// Keeps track of any properties unknown to the library. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, IDictionary serializedAdditionalRawData, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, serializedAdditionalRawData, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + MessageBody = messageBody; + Metadata = metadata; + } + + /// Initializes a new instance of for deserialization. + internal AcsChatTypingIndicatorReceivedInThreadEventData() + { + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs index 897ecfa01ddc..245ed8cf9211 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.Serialization.cs @@ -34,13 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsRecordingStorageInfoProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("recordingChunks"u8); - writer.WriteStartArray(); - foreach (var item in RecordingChunks) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("recordingChunks"u8); + writer.WriteStartArray(); + foreach (var item in RecordingChunks) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs index bc7b2ef0b31b..44b951440b82 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRecordingStorageInfoProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,13 +46,9 @@ public partial class AcsRecordingStorageInfoProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// List of details of recording chunks information. - /// is null. - internal AcsRecordingStorageInfoProperties(IEnumerable recordingChunks) + internal AcsRecordingStorageInfoProperties() { - Argument.AssertNotNull(recordingChunks, nameof(recordingChunks)); - - RecordingChunks = recordingChunks.ToList(); + RecordingChunks = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -65,11 +60,6 @@ internal AcsRecordingStorageInfoProperties(IReadOnlyList Initializes a new instance of for deserialization. - internal AcsRecordingStorageInfoProperties() - { - } - /// List of details of recording chunks information. public IReadOnlyList RecordingChunks { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs index 50209bd3bad8..b5474d2dca74 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.Serialization.cs @@ -51,13 +51,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("innererror"u8); writer.WriteObjectValue(Innererror, options); - writer.WritePropertyName("details"u8); - writer.WriteStartArray(); - foreach (var item in Details) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("details"u8); + writer.WriteStartArray(); + foreach (var item in Details) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs index 35ae98ef1222..36135cca5336 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterCommunicationError.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -48,15 +47,13 @@ public partial class AcsRouterCommunicationError /// Initializes a new instance of . /// Router Communication Inner Error. - /// List of Router Communication Errors. - /// or is null. - internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror, IEnumerable details) + /// is null. + internal AcsRouterCommunicationError(AcsRouterCommunicationError innererror) { Argument.AssertNotNull(innererror, nameof(innererror)); - Argument.AssertNotNull(details, nameof(details)); Innererror = innererror; - Details = details.ToList(); + Details = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs index 97119d00ab58..f2c36c0fac29 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -40,13 +40,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("classificationPolicyId"u8); writer.WriteStringValue(ClassificationPolicyId); } - writer.WritePropertyName("errors"u8); - writer.WriteStartArray(); - foreach (var item in Errors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("errors"u8); + writer.WriteStartArray(); + foreach (var item in Errors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassificationFailedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs index 0dde294286a4..abb7f6850287 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassificationFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,15 +16,13 @@ public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Classification Failed Errors. - /// , or is null. - internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable errors) : base(labels, tags) + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(errors, nameof(errors)); - Errors = errors.ToList(); + Errors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs index 875998d46d28..bd7a45acb2a3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.Serialization.cs @@ -47,13 +47,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobClassifiedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs index db2dbdd50165..6c87513cd751 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobClassifiedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -18,17 +17,15 @@ public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData /// Router Job events Labels. /// Router Jobs events Tags. /// Router Job Queue Info. - /// Router Job Attached Worker Selector. - /// , , or is null. - internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails, IEnumerable attachedWorkerSelectors) : base(labels, tags) + /// , or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, AcsRouterQueueDetails queueDetails) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); Argument.AssertNotNull(queueDetails, nameof(queueDetails)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); QueueDetails = queueDetails; - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs index 196abbfdca40..12ae0d33f0ed 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("attachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in AttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("attachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in AttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobQueuedEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs index ac701da4ca38..6d1a918f7236 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobQueuedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Queued Attached Worker Selector. - /// Router Job Queued Requested Worker Selector. - /// , , or is null. - internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable attachedWorkerSelectors, IEnumerable requestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(attachedWorkerSelectors, nameof(attachedWorkerSelectors)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - AttachedWorkerSelectors = attachedWorkerSelectors.ToList(); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + AttachedWorkerSelectors = new ChangeTrackingList(); + RequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs index 1b5fe0c105f1..fa9e7f27c6eb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.Serialization.cs @@ -50,13 +50,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("requestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in RequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("requestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in RequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs index e13d3fb3647b..6df1c998602d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,16 +16,14 @@ public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Received Requested Worker Selectors. /// Unavailable For Matching for Router Job Received. - /// , or is null. - internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable requestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(requestedWorkerSelectors, nameof(requestedWorkerSelectors)); - RequestedWorkerSelectors = requestedWorkerSelectors.ToList(); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs index 6de4ecc90325..a05943021676 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs index 2f38f8a6466d..603602f62c5b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobSchedulingFailedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventDa /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Scheduling Failed Attached Worker Selector Expired. - /// Router Job Scheduling Failed Requested Worker Selector Expired. - /// , , or is null. - internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs index f7dce42e5827..3cc59d45faa7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -40,20 +40,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("priority"u8); writer.WriteNumberValue(Priority.Value); } - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ScheduledOn)) { writer.WritePropertyName("scheduledOn"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs index df1a3085421f..8c6ba6351ed6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWaitingForActivationEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,19 +16,15 @@ public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEve /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Waiting For Activation Worker Selector Expired. - /// Router Job Waiting For Activation Requested Worker Selector Expired. /// Router Job Waiting For Activation Unavailable For Matching. - /// , , or is null. - internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredAttachedWorkerSelectors, IEnumerable expiredRequestedWorkerSelectors, bool unavailableForMatching) : base(labels, tags) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 07e064bc4208..f7da5f2ad1f4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -35,20 +35,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredRequestedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredRequestedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredRequestedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredAttachedWorkerSelectors) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("expiredAttachedWorkerSelectors"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredAttachedWorkerSelectors) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); } AcsRouterJobWorkerSelectorsExpiredEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 28655f6d0119..b9195fb5eec0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -17,18 +16,14 @@ public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobE /// Initializes a new instance of . /// Router Job events Labels. /// Router Jobs events Tags. - /// Router Job Worker Selectors Expired Requested Worker Selectors. - /// Router Job Worker Selectors Expired Attached Worker Selectors. - /// , , or is null. - internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable expiredRequestedWorkerSelectors, IEnumerable expiredAttachedWorkerSelectors) : base(labels, tags) + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(expiredRequestedWorkerSelectors, nameof(expiredRequestedWorkerSelectors)); - Argument.AssertNotNull(expiredAttachedWorkerSelectors, nameof(expiredAttachedWorkerSelectors)); - ExpiredRequestedWorkerSelectors = expiredRequestedWorkerSelectors.ToList(); - ExpiredAttachedWorkerSelectors = expiredAttachedWorkerSelectors.ToList(); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs index 6b870532df9d..b0866f1d12c6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs index e5b8ab2dc682..3f3cc4465551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerRegisteredEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,20 +46,16 @@ public partial class AcsRouterWorkerRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Registered Queue Info. - /// Router Worker Registered Channel Configuration. /// Router Worker Registered Labels. /// Router Worker Registered Tags. - /// , , or is null. - internal AcsRouterWorkerRegisteredEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags) + /// or is null. + internal AcsRouterWorkerRegisteredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs index 16de6d5361a9..e1cd7507173e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.Serialization.cs @@ -39,20 +39,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("workerId"u8); writer.WriteStringValue(WorkerId); } - writer.WritePropertyName("queueAssignments"u8); - writer.WriteStartArray(); - foreach (var item in QueueAssignments) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("queueAssignments"u8); + writer.WriteStartArray(); + foreach (var item in QueueAssignments) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("channelConfigurations"u8); - writer.WriteStartArray(); - foreach (var item in ChannelConfigurations) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("channelConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in ChannelConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(TotalCapacity)) { writer.WritePropertyName("totalCapacity"u8); @@ -74,13 +80,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(item.Value); } writer.WriteEndObject(); - writer.WritePropertyName("updatedWorkerProperties"u8); - writer.WriteStartArray(); - foreach (var item in UpdatedWorkerProperties) + if (options.Format != "W") { - writer.WriteStringValue(item.ToString()); + writer.WritePropertyName("updatedWorkerProperties"u8); + writer.WriteStartArray(); + foreach (var item in UpdatedWorkerProperties) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs index 3d1b2b1ca992..c5ff3fea7cb4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsRouterWorkerUpdatedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,25 +46,19 @@ public partial class AcsRouterWorkerUpdatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Router Worker Updated Queue Info. - /// Router Worker Updated Channel Configuration. /// Router Worker Updated Labels. /// Router Worker Updated Tags. - /// Router Worker Properties Updated. - /// , , , or is null. - internal AcsRouterWorkerUpdatedEventData(IEnumerable queueAssignments, IEnumerable channelConfigurations, IReadOnlyDictionary labels, IReadOnlyDictionary tags, IEnumerable updatedWorkerProperties) + /// or is null. + internal AcsRouterWorkerUpdatedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Argument.AssertNotNull(queueAssignments, nameof(queueAssignments)); - Argument.AssertNotNull(channelConfigurations, nameof(channelConfigurations)); Argument.AssertNotNull(labels, nameof(labels)); Argument.AssertNotNull(tags, nameof(tags)); - Argument.AssertNotNull(updatedWorkerProperties, nameof(updatedWorkerProperties)); - QueueAssignments = queueAssignments.ToList(); - ChannelConfigurations = channelConfigurations.ToList(); + QueueAssignments = new ChangeTrackingList(); + ChannelConfigurations = new ChangeTrackingList(); Labels = labels; Tags = tags; - UpdatedWorkerProperties = updatedWorkerProperties.ToList(); + UpdatedWorkerProperties = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 8dd3525c17ef..73fb26b9841b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -35,23 +35,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(DeliveryStatus)) + writer.WritePropertyName("deliveryStatus"u8); + writer.WriteStringValue(DeliveryStatus); + writer.WritePropertyName("deliveryStatusDetails"u8); + writer.WriteStringValue(DeliveryStatusDetails); + if (options.Format != "W") { - writer.WritePropertyName("deliveryStatus"u8); - writer.WriteStringValue(DeliveryStatus); - } - if (Optional.IsDefined(DeliveryStatusDetails)) - { - writer.WritePropertyName("deliveryStatusDetails"u8); - writer.WriteStringValue(DeliveryStatusDetails); - } - writer.WritePropertyName("deliveryAttempts"u8); - writer.WriteStartArray(); - foreach (var item in DeliveryAttempts) - { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("deliveryAttempts"u8); + writer.WriteStartArray(); + foreach (var item in DeliveryAttempts) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs index 3e3649e9affe..d7db623a9e57 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -15,13 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - /// List of details of delivery attempts made. - /// is null. - internal AcsSmsDeliveryReportReceivedEventData(IEnumerable deliveryAttempts) + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// Status of Delivery. + /// Details about Delivery Status. + /// , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails) : base(messageId, @from, to) { - Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(deliveryStatus, nameof(deliveryStatus)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); - DeliveryAttempts = deliveryAttempts.ToList(); + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = new ChangeTrackingList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs index a03f690ca408..46b7ed110e39 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AcsSmsEventBaseProperties)} does not support writing '{format}' format."); } - if (Optional.IsDefined(MessageId)) - { - writer.WritePropertyName("messageId"u8); - writer.WriteStringValue(MessageId); - } - if (Optional.IsDefined(From)) - { - writer.WritePropertyName("from"u8); - writer.WriteStringValue(From); - } - if (Optional.IsDefined(To)) - { - writer.WritePropertyName("to"u8); - writer.WriteStringValue(To); - } + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + writer.WritePropertyName("from"u8); + writer.WriteStringValue(From); + writer.WritePropertyName("to"u8); + writer.WriteStringValue(To); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs index 4374d09b5603..708a8d6e8af0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsEventBaseProperties.cs @@ -46,8 +46,19 @@ public partial class AcsSmsEventBaseProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// , or is null. + internal AcsSmsEventBaseProperties(string messageId, string @from, string to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + + MessageId = messageId; + From = @from; + To = to; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AcsSmsEventBaseProperties(string messageId, string @from, string to, ID _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AcsSmsEventBaseProperties() + { + } + /// The identity of the SMS message. public string MessageId { get; } /// The identity of SMS message sender. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs index 24df1730c7a8..cff493a26eec 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.Serialization.cs @@ -35,11 +35,8 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Message)) - { - writer.WritePropertyName("message"u8); - writer.WriteStringValue(Message); - } + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); if (Optional.IsDefined(ReceivedTimestamp)) { writer.WritePropertyName("receivedTimestamp"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs index 391986f238e0..04f01461c805 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AcsSmsReceivedEventData.cs @@ -14,9 +14,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// The SMS content. /// Number of segments in the message. - internal AcsSmsReceivedEventData(int segmentCount) + /// , , or is null. + internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; SegmentCount = segmentCount; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..0b9333f55dfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.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; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerClosedEventData : 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(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, 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 + } + } + } + + ApiManagementCircuitBreakerClosedEventData 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(ApiManagementCircuitBreakerClosedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerClosedEventData 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 DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerClosedEventData)} 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 ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..7b883eb64505 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerClosedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// + /// 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 backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..6e5ac8e33bb1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.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; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerOpenedEventData : 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(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("backendName"u8); + writer.WriteStringValue(BackendName); + writer.WritePropertyName("circuitBreaker"u8); + writer.WriteObjectValue(CircuitBreaker, 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 + } + } + } + + ApiManagementCircuitBreakerOpenedEventData 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(ApiManagementCircuitBreakerOpenedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerOpenedEventData 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 DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerOpenedEventData)} 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 ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..d739428a4a42 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerOpenedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// + /// 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 backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// or is null. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + Argument.AssertNotNull(backendName, nameof(backendName)); + Argument.AssertNotNull(circuitBreaker, nameof(circuitBreaker)); + + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker, IDictionary serializedAdditionalRawData) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..919140e39aec --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.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.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties : 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(ApiManagementCircuitBreakerProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("rules"u8); + writer.WriteStartObject(); + foreach (var item in Rules) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item.Value) + { + 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.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 + } + } + } + + ApiManagementCircuitBreakerProperties 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(ApiManagementCircuitBreakerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary> rules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"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 dictionary0 = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary0.Add(property1.Name, null); + } + else + { + dictionary0.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } + } + dictionary.Add(property0.Name, dictionary0); + } + } + rules = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementCircuitBreakerProperties(rules, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementCircuitBreakerProperties 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 DeserializeApiManagementCircuitBreakerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementCircuitBreakerProperties)} 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 ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..a46867dad4e4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementCircuitBreakerProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// + /// 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 . + /// Overview of all configured rules and respective details. + /// is null. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary> rules) + { + Argument.AssertNotNull(rules, nameof(rules)); + + Rules = rules; + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// Keeps track of any properties unknown to the library. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary> rules, IDictionary serializedAdditionalRawData) + { + Rules = rules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementCircuitBreakerProperties() + { + } + + /// + /// Overview of all configured rules and respective details. + /// + /// 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> Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..4e46e58afdac --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.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.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties : 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(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "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 + } + } + } + + ApiManagementExpiredGatewayTokenProperties 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(ApiManagementExpiredGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementExpiredGatewayTokenProperties 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 DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementExpiredGatewayTokenProperties)} 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 ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..dadba25ed570 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that has expired for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// + /// 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 . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// Keeps track of any properties unknown to the library. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..3e1b3550a9cb --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.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; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties : 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(ApiManagementGatewayProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayId"u8); + writer.WriteStringValue(GatewayId); + writer.WritePropertyName("instanceId"u8); + writer.WriteStringValue(InstanceId); + 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 + } + } + } + + ApiManagementGatewayProperties 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(ApiManagementGatewayProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayProperties(gatewayId, instanceId, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayProperties 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 DeserializeApiManagementGatewayProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayProperties)} 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 ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..56075c0a60ee --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayProperties.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.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// + /// 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 . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// or is null. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + Argument.AssertNotNull(gatewayId, nameof(gatewayId)); + Argument.AssertNotNull(instanceId, nameof(instanceId)); + + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId, IDictionary serializedAdditionalRawData) + { + GatewayId = gatewayId; + InstanceId = instanceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayProperties() + { + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..68cef8d2e415 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.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; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenExpiredEventData : 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(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, 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 + } + } + } + + ApiManagementGatewayTokenExpiredEventData 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(ApiManagementGatewayTokenExpiredEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenExpiredEventData 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 DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenExpiredEventData)} 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 ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..a7acbceff381 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenExpiredEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// + /// 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 . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementExpiredGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..14a396df7cc4 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.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; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryEventData : 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(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("gatewayInfo"u8); + writer.WriteObjectValue(GatewayInfo, options); + writer.WritePropertyName("tokenInfo"u8); + writer.WriteObjectValue(TokenInfo, 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 + } + } + } + + ApiManagementGatewayTokenNearExpiryEventData 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(ApiManagementGatewayTokenNearExpiryEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementNearExpiryGatewayTokenProperties tokenInfo = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value, options); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + tokenInfo = ApiManagementNearExpiryGatewayTokenProperties.DeserializeApiManagementNearExpiryGatewayTokenProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementGatewayTokenNearExpiryEventData 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 DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementGatewayTokenNearExpiryEventData)} 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 ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..a66436311c5e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementGatewayTokenNearExpiryEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// + /// 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 . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// or is null. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo) + { + Argument.AssertNotNull(gatewayInfo, nameof(gatewayInfo)); + Argument.AssertNotNull(tokenInfo, nameof(tokenInfo)); + + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// Keeps track of any properties unknown to the library. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo, ApiManagementNearExpiryGatewayTokenProperties tokenInfo, IDictionary serializedAdditionalRawData) + { + GatewayInfo = gatewayInfo; + TokenInfo = tokenInfo; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties GatewayInfo { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementNearExpiryGatewayTokenProperties TokenInfo { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..c903a5b5b374 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.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.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementNearExpiryGatewayTokenProperties : 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(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("expiredAtUtc"u8); + writer.WriteStringValue(ExpiredAtUtc, "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 + } + } + } + + ApiManagementNearExpiryGatewayTokenProperties 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(ApiManagementNearExpiryGatewayTokenProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + + internal static ApiManagementNearExpiryGatewayTokenProperties DeserializeApiManagementNearExpiryGatewayTokenProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset expiredAtUtc = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} does not support writing '{options.Format}' format."); + } + } + + ApiManagementNearExpiryGatewayTokenProperties 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 DeserializeApiManagementNearExpiryGatewayTokenProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ApiManagementNearExpiryGatewayTokenProperties)} 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 ApiManagementNearExpiryGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementNearExpiryGatewayTokenProperties(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs new file mode 100644 index 000000000000..fcc22492a89d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ApiManagementNearExpiryGatewayTokenProperties.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementNearExpiryGatewayTokenProperties + { + /// + /// 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 . + /// Timestamp when the gateway token will expire. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc) + { + ExpiredAtUtc = expiredAtUtc; + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// Keeps track of any properties unknown to the library. + internal ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc, IDictionary serializedAdditionalRawData) + { + ExpiredAtUtc = expiredAtUtc; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ApiManagementNearExpiryGatewayTokenProperties() + { + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset ExpiredAtUtc { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs index b36758c2c2a4..96b5db001551 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.Serialization.cs @@ -34,26 +34,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueDeletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) - { - writer.WritePropertyName("label"u8); - writer.WriteStringValue(Label); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("label"u8); + writer.WriteStringValue(Label); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs index b920a0b33dd2..7a4cf1ce7212 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueDeletedEventData.cs @@ -46,8 +46,22 @@ public partial class AppConfigurationKeyValueDeletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueDeletedEventData() + /// The key used to identify the key-value that was deleted. + /// The label, if any, used to identify the key-value that was deleted. + /// The etag representing the key-value that was deleted. + /// The sync token representing the server state after the event. + /// , , or is null. + internal AppConfigurationKeyValueDeletedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(label, nameof(label)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +79,11 @@ internal AppConfigurationKeyValueDeletedEventData(string key, string label, stri _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueDeletedEventData() + { + } + /// The key used to identify the key-value that was deleted. public string Key { get; } /// The label, if any, used to identify the key-value that was deleted. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs index 4eb183ad7ca7..b7557dd632ae 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.Serialization.cs @@ -34,26 +34,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationKeyValueModifiedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Key)) - { - writer.WritePropertyName("key"u8); - writer.WriteStringValue(Key); - } - if (Optional.IsDefined(Label)) + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + if (Label != null) { writer.WritePropertyName("label"u8); writer.WriteStringValue(Label); } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) + else { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); + writer.WriteNull("label"); } + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -106,6 +101,11 @@ internal static AppConfigurationKeyValueModifiedEventData DeserializeAppConfigur } if (property.NameEquals("label"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + label = null; + continue; + } label = property.Value.GetString(); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs index e03cb8ded63b..1dcc27c11d46 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationKeyValueModifiedEventData.cs @@ -46,8 +46,21 @@ public partial class AppConfigurationKeyValueModifiedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationKeyValueModifiedEventData() + /// The key used to identify the key-value that was modified. + /// The label, if any, used to identify the key-value that was modified. + /// The etag representing the new state of the key-value. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationKeyValueModifiedEventData(string key, string label, string etag, string syncToken) { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Key = key; + Label = label; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -65,6 +78,11 @@ internal AppConfigurationKeyValueModifiedEventData(string key, string label, str _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationKeyValueModifiedEventData() + { + } + /// The key used to identify the key-value that was modified. public string Key { get; } /// The label, if any, used to identify the key-value that was modified. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs index 319beef466ce..d5d7832fa69b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotCreatedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotCreatedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotCreatedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotCreatedEventData() internal AppConfigurationSnapshotCreatedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotCreatedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs index 53796891500b..b7fabd263ca3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AppConfigurationSnapshotEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(Etag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStringValue(Etag); - } - if (Optional.IsDefined(SyncToken)) - { - writer.WritePropertyName("syncToken"u8); - writer.WriteStringValue(SyncToken); - } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("etag"u8); + writer.WriteStringValue(Etag); + writer.WritePropertyName("syncToken"u8); + writer.WriteStringValue(SyncToken); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs index a64d0e66a4fc..43c5283bd828 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotEventData.cs @@ -46,8 +46,19 @@ public partial class AppConfigurationSnapshotEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AppConfigurationSnapshotEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotEventData(string name, string etag, string syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); + + Name = name; + Etag = etag; + SyncToken = syncToken; } /// Initializes a new instance of . @@ -63,6 +74,11 @@ internal AppConfigurationSnapshotEventData(string name, string etag, string sync _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotEventData() + { + } + /// The name of the snapshot. public string Name { get; } /// The etag representing the new state of the snapshot. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs index cd89dfdb11d1..b2164f525aa9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AppConfigurationSnapshotModifiedEventData.cs @@ -14,8 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AppConfigurationSnapshotModifiedEventData : AppConfigurationSnapshotEventData { /// Initializes a new instance of . - internal AppConfigurationSnapshotModifiedEventData() + /// The name of the snapshot. + /// The etag representing the new state of the snapshot. + /// The sync token representing the server state after the event. + /// , or is null. + internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken) : base(name, etag, syncToken) { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(etag, nameof(etag)); + Argument.AssertNotNull(syncToken, nameof(syncToken)); } /// Initializes a new instance of . @@ -26,5 +33,10 @@ internal AppConfigurationSnapshotModifiedEventData() internal AppConfigurationSnapshotModifiedEventData(string name, string etag, string syncToken, IDictionary serializedAdditionalRawData) : base(name, etag, syncToken, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal AppConfigurationSnapshotModifiedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs index f9bfd63be34f..25a7f39e0005 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsClusterEventData.Serialization.cs @@ -36,7 +36,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("operationId"u8); writer.WriteStringValue(OperationId); - if (Optional.IsCollectionDefined(AddedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(AddedHostNames)) { writer.WritePropertyName("addedHostNames"u8); writer.WriteStartArray(); @@ -46,7 +46,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(RemovedHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(RemovedHostNames)) { writer.WritePropertyName("removedHostNames"u8); writer.WriteStartArray(); @@ -56,7 +56,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(InMaintenanceHostNames)) + if (options.Format != "W" && Optional.IsCollectionDefined(InMaintenanceHostNames)) { writer.WritePropertyName("inMaintenanceHostNames"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs index 718d00b5c34a..06bf2a4fa347 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/AvsScriptExecutionEventData.Serialization.cs @@ -38,7 +38,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(OperationId); writer.WritePropertyName("cmdletId"u8); writer.WriteStringValue(CmdletId); - if (Optional.IsCollectionDefined(Output)) + if (options.Format != "W" && Optional.IsCollectionDefined(Output)) { writer.WritePropertyName("output"u8); writer.WriteStartArray(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs index e7339488d619..7fef7f4e04fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.Serialization.cs @@ -39,19 +39,25 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("kind"u8); writer.WriteStringValue(Kind.Value.ToString()); } - if (Optional.IsDefined(RawId)) - { - writer.WritePropertyName("rawId"u8); - writer.WriteStringValue(RawId); - } + writer.WritePropertyName("rawId"u8); + writer.WriteStringValue(RawId); writer.WritePropertyName("communicationUser"u8); writer.WriteObjectValue(CommunicationUser, options); - writer.WritePropertyName("phoneNumber"u8); - writer.WriteObjectValue(PhoneNumber, options); - writer.WritePropertyName("microsoftTeamsUser"u8); - writer.WriteObjectValue(MicrosoftTeamsUser, options); - writer.WritePropertyName("microsoftTeamsApp"u8); - writer.WriteObjectValue(MicrosoftTeamsApp, options); + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteObjectValue(PhoneNumber, options); + } + if (Optional.IsDefined(MicrosoftTeamsUser)) + { + writer.WritePropertyName("microsoftTeamsUser"u8); + writer.WriteObjectValue(MicrosoftTeamsUser, options); + } + if (Optional.IsDefined(MicrosoftTeamsApp)) + { + writer.WritePropertyName("microsoftTeamsApp"u8); + writer.WriteObjectValue(MicrosoftTeamsApp, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -120,16 +126,28 @@ internal static CommunicationIdentifierModel DeserializeCommunicationIdentifierM } if (property.NameEquals("phoneNumber"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } phoneNumber = PhoneNumberIdentifierModel.DeserializePhoneNumberIdentifierModel(property.Value, options); continue; } if (property.NameEquals("microsoftTeamsUser"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } microsoftTeamsUser = MicrosoftTeamsUserIdentifierModel.DeserializeMicrosoftTeamsUserIdentifierModel(property.Value, options); continue; } if (property.NameEquals("microsoftTeamsApp"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } microsoftTeamsApp = MicrosoftTeamsAppIdentifierModel.DeserializeMicrosoftTeamsAppIdentifierModel(property.Value, options); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs index 00e7ea22dcd5..9035b9de1646 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/CommunicationIdentifierModel.cs @@ -46,22 +46,16 @@ public partial class CommunicationIdentifierModel private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// Raw Id of the identifier. Optional in requests, required in responses. /// The communication user. - /// The phone number. - /// The Microsoft Teams user. - /// The Microsoft Teams application. - /// , , or is null. - internal CommunicationIdentifierModel(CommunicationUserIdentifierModel communicationUser, PhoneNumberIdentifierModel phoneNumber, MicrosoftTeamsUserIdentifierModel microsoftTeamsUser, MicrosoftTeamsAppIdentifierModel microsoftTeamsApp) + /// or is null. + internal CommunicationIdentifierModel(string rawId, CommunicationUserIdentifierModel communicationUser) { + Argument.AssertNotNull(rawId, nameof(rawId)); Argument.AssertNotNull(communicationUser, nameof(communicationUser)); - Argument.AssertNotNull(phoneNumber, nameof(phoneNumber)); - Argument.AssertNotNull(microsoftTeamsUser, nameof(microsoftTeamsUser)); - Argument.AssertNotNull(microsoftTeamsApp, nameof(microsoftTeamsApp)); + RawId = rawId; CommunicationUser = communicationUser; - PhoneNumber = phoneNumber; - MicrosoftTeamsUser = microsoftTeamsUser; - MicrosoftTeamsApp = microsoftTeamsApp; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs index 66ed2b8c4b62..ef80f3e0864a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndedEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndedEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndedEventData() internal ContainerServiceClusterSupportEndedEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs index 0a3fa362492c..ea696b7348fe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEndingEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceClusterSupportEndingEventData : ContainerServiceClusterSupportEventData { /// Initializes a new instance of . - internal ContainerServiceClusterSupportEndingEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion) : base(kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceClusterSupportEndingEventData() internal ContainerServiceClusterSupportEndingEventData(string kubernetesVersion, IDictionary serializedAdditionalRawData) : base(kubernetesVersion, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEndingEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs index d0e8d80c8a5c..57ae2aa7b651 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceClusterSupportEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(KubernetesVersion)) - { - writer.WritePropertyName("kubernetesVersion"u8); - writer.WriteStringValue(KubernetesVersion); - } + writer.WritePropertyName("kubernetesVersion"u8); + writer.WriteStringValue(KubernetesVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs index 3ad05c8cb79b..d6720cabcd35 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceClusterSupportEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceClusterSupportEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceClusterSupportEventData() + /// The Kubernetes version of the ManagedCluster resource. + /// is null. + internal ContainerServiceClusterSupportEventData(string kubernetesVersion) { + Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); + + KubernetesVersion = kubernetesVersion; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceClusterSupportEventData(string kubernetesVersion, IDict _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceClusterSupportEventData() + { + } + /// The Kubernetes version of the ManagedCluster resource. public string KubernetesVersion { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs index 3093a83c6dac..4c6132f4f59a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNewKubernetesVersionAvailableEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(LatestSupportedKubernetesVersion)) - { - writer.WritePropertyName("latestSupportedKubernetesVersion"u8); - writer.WriteStringValue(LatestSupportedKubernetesVersion); - } - if (Optional.IsDefined(LatestStableKubernetesVersion)) - { - writer.WritePropertyName("latestStableKubernetesVersion"u8); - writer.WriteStringValue(LatestStableKubernetesVersion); - } - if (Optional.IsDefined(LowestMinorKubernetesVersion)) - { - writer.WritePropertyName("lowestMinorKubernetesVersion"u8); - writer.WriteStringValue(LowestMinorKubernetesVersion); - } + writer.WritePropertyName("latestSupportedKubernetesVersion"u8); + writer.WriteStringValue(LatestSupportedKubernetesVersion); + writer.WritePropertyName("latestStableKubernetesVersion"u8); + writer.WriteStringValue(LatestStableKubernetesVersion); + writer.WritePropertyName("lowestMinorKubernetesVersion"u8); + writer.WriteStringValue(LowestMinorKubernetesVersion); if (Optional.IsDefined(LatestPreviewKubernetesVersion)) { writer.WritePropertyName("latestPreviewKubernetesVersion"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs index a220ba99996e..c27879af09ee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNewKubernetesVersionAvailableEventData.cs @@ -46,8 +46,19 @@ public partial class ContainerServiceNewKubernetesVersionAvailableEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNewKubernetesVersionAvailableEventData() + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. + /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. + /// The highest PATCH Kubernetes version for the lowest applicable MINOR version available for the ManagedCluster resource. + /// , or is null. + internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSupportedKubernetesVersion, string latestStableKubernetesVersion, string lowestMinorKubernetesVersion) { + Argument.AssertNotNull(latestSupportedKubernetesVersion, nameof(latestSupportedKubernetesVersion)); + Argument.AssertNotNull(latestStableKubernetesVersion, nameof(latestStableKubernetesVersion)); + Argument.AssertNotNull(lowestMinorKubernetesVersion, nameof(lowestMinorKubernetesVersion)); + + LatestSupportedKubernetesVersion = latestSupportedKubernetesVersion; + LatestStableKubernetesVersion = latestStableKubernetesVersion; + LowestMinorKubernetesVersion = lowestMinorKubernetesVersion; } /// Initializes a new instance of . @@ -65,6 +76,11 @@ internal ContainerServiceNewKubernetesVersionAvailableEventData(string latestSup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNewKubernetesVersionAvailableEventData() + { + } + /// The highest PATCH Kubernetes version for the highest MINOR version supported by ManagedCluster resource. public string LatestSupportedKubernetesVersion { get; } /// The highest PATCH Kubernetes version for the MINOR version considered stable for the ManagedCluster resource. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs index f38221ed7d47..60f04c71f52f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceNodePoolRollingEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(NodePoolName)) - { - writer.WritePropertyName("nodePoolName"u8); - writer.WriteStringValue(NodePoolName); - } + writer.WritePropertyName("nodePoolName"u8); + writer.WriteStringValue(NodePoolName); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs index 3b5580803572..65ffdb4776f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingEventData.cs @@ -46,8 +46,13 @@ public partial class ContainerServiceNodePoolRollingEventData private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingEventData(string nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); + + NodePoolName = nodePoolName; } /// Initializes a new instance of . @@ -59,6 +64,11 @@ internal ContainerServiceNodePoolRollingEventData(string nodePoolName, IDictiona _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingEventData() + { + } + /// The name of the node pool in the ManagedCluster resource. public string NodePoolName { get; } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs index 0bf9331c72ca..e2889e098f99 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingFailedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingFailedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingFailedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingFailedEventData() internal ContainerServiceNodePoolRollingFailedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingFailedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs index 88958ee63eef..89edc1138e28 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingStartedEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingStartedEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingStartedEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingStartedEventData() internal ContainerServiceNodePoolRollingStartedEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingStartedEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs index 18c9e4ada789..6209fe995bdb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ContainerServiceNodePoolRollingSucceededEventData.cs @@ -14,8 +14,11 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class ContainerServiceNodePoolRollingSucceededEventData : ContainerServiceNodePoolRollingEventData { /// Initializes a new instance of . - internal ContainerServiceNodePoolRollingSucceededEventData() + /// The name of the node pool in the ManagedCluster resource. + /// is null. + internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName) : base(nodePoolName) { + Argument.AssertNotNull(nodePoolName, nameof(nodePoolName)); } /// Initializes a new instance of . @@ -24,5 +27,10 @@ internal ContainerServiceNodePoolRollingSucceededEventData() internal ContainerServiceNodePoolRollingSucceededEventData(string nodePoolName, IDictionary serializedAdditionalRawData) : base(nodePoolName, serializedAdditionalRawData) { } + + /// Initializes a new instance of for deserialization. + internal ContainerServiceNodePoolRollingSucceededEventData() + { + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..8fdc3f48de2b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.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.Text.Json; +using Azure.Core; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class EdgeSolutionVersionPublishedEventData : 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(EdgeSolutionVersionPublishedEventData)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("externalValidationId"u8); + writer.WriteStringValue(ExternalValidationId); + writer.WritePropertyName("targetId"u8); + writer.WriteStringValue(TargetId); + writer.WritePropertyName("solutionTemplateId"u8); + writer.WriteStringValue(SolutionTemplateId); + writer.WritePropertyName("solutionTemplateVersionId"u8); + writer.WriteStringValue(SolutionTemplateVersionId); + writer.WritePropertyName("solutionVersionId"u8); + writer.WriteStringValue(SolutionVersionId); + writer.WritePropertyName("apiVersion"u8); + writer.WriteStringValue(ApiVersion); + writer.WritePropertyName("callbackUrl"u8); + writer.WriteStringValue(CallbackUrl.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 + } + } + } + + EdgeSolutionVersionPublishedEventData 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(EdgeSolutionVersionPublishedEventData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + 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, AzureMessagingEventGridSystemEventsContext.Default); + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} does not support writing '{options.Format}' format."); + } + } + + EdgeSolutionVersionPublishedEventData 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 DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EdgeSolutionVersionPublishedEventData)} 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 EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(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/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..219c36f6fa89 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EdgeSolutionVersionPublishedEventData.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.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// + /// 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 GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// Keeps track of any properties unknown to the library. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl, IDictionary serializedAdditionalRawData) + { + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal EdgeSolutionVersionPublishedEventData() + { + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs index c32e1356b70a..03420476b9ab 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventGridSystemEventsModelFactory.cs @@ -251,6 +251,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary> rules = null) + { + rules ??= new Dictionary>(); + + return new ApiManagementCircuitBreakerProperties(rules, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementNearExpiryGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. Uses the format, `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/gateway/<GatewayName>`. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementNearExpiryGatewayTokenProperties ApiManagementNearExpiryGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementNearExpiryGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gatewayInfo = null, ApiManagementExpiredGatewayTokenProperties tokenInfo = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset expiredAtUtc = default) + { + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The key used to identify the key-value that was modified. /// The label, if any, used to identify the key-value that was modified. @@ -595,6 +666,213 @@ public static AcsUserDisconnectedEventData AcsUserDisconnectedEventData(Communic return new AcsUserDisconnectedEventData(userCommunicationIdentifier, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallingEventProperties AcsCallingEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The communication identifier of the participant user. + /// The role of the participant. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallParticipantRoleKind? role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Group Id. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Room Id. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallStartedEventData AcsCallStartedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + /// A new instance for mocking. + public static AcsCallEndedEventData AcsCallEndedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallEndedByProperties endedBy = null, AcsCallEndReasonProperties reason = null, TimeSpan? callDuration = null) + { + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + endedBy, + reason, + callDuration); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind type = default, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, type, name, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for the ending the call. + /// A new instance for mocking. + public static AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = null, int? subCode = null, string phrase = null) + { + return new AcsCallEndReasonProperties(code, subCode, phrase, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantEventProperties AcsCallParticipantEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The call id of the server. + /// The group metadata. + /// The room metadata. + /// Is two-party in calling event. + /// The correlationId of calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + serializedAdditionalRawData: null, + user, + displayName, + participantId, + userAgent); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -696,6 +974,66 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr version); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// A new instance for mocking. + public static AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + metadata ??= new Dictionary(); + + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData: null, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// A new instance for mocking. + public static AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + serializedAdditionalRawData: null, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. @@ -2474,6 +2812,28 @@ public static DataBoxOrderCompletedEventData DataBoxOrderCompletedEventData(stri return new DataBoxOrderCompletedEventData(serialNumber, stageName, stageTime, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The path to the capture file. /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs index 548d205c8e34..c23d522eba09 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.Serialization.cs @@ -34,21 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(EventHubCaptureFileCreatedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Fileurl)) - { - writer.WritePropertyName("fileUrl"u8); - writer.WriteStringValue(Fileurl); - } - if (Optional.IsDefined(FileType)) - { - writer.WritePropertyName("fileType"u8); - writer.WriteStringValue(FileType); - } - if (Optional.IsDefined(PartitionId)) - { - writer.WritePropertyName("partitionId"u8); - writer.WriteStringValue(PartitionId); - } + writer.WritePropertyName("fileUrl"u8); + writer.WriteStringValue(Fileurl); + writer.WritePropertyName("fileType"u8); + writer.WriteStringValue(FileType); + writer.WritePropertyName("partitionId"u8); + writer.WriteStringValue(PartitionId); if (Optional.IsDefined(SizeInBytes)) { writer.WritePropertyName("sizeInBytes"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs index ff8f7f2a0e35..5f9b01e7d9f9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/EventHubCaptureFileCreatedEventData.cs @@ -46,8 +46,19 @@ public partial class EventHubCaptureFileCreatedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal EventHubCaptureFileCreatedEventData() + /// The path to the capture file. + /// The file type of the capture file. + /// The shard ID. + /// , or is null. + internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, string partitionId) { + Argument.AssertNotNull(fileurl, nameof(fileurl)); + Argument.AssertNotNull(fileType, nameof(fileType)); + Argument.AssertNotNull(partitionId, nameof(partitionId)); + + Fileurl = fileurl; + FileType = fileType; + PartitionId = partitionId; } /// Initializes a new instance of . @@ -75,6 +86,11 @@ internal EventHubCaptureFileCreatedEventData(string fileurl, string fileType, st _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal EventHubCaptureFileCreatedEventData() + { + } + /// The path to the capture file. public string Fileurl { get; } /// The file type of the capture file. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs index e1bd24bd9f31..651a7d10ba06 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.Serialization.cs @@ -34,31 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesDatasetDriftDetectedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(DataDriftId)) - { - writer.WritePropertyName("dataDriftId"u8); - writer.WriteStringValue(DataDriftId); - } - if (Optional.IsDefined(DataDriftName)) - { - writer.WritePropertyName("dataDriftName"u8); - writer.WriteStringValue(DataDriftName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(BaseDatasetId)) - { - writer.WritePropertyName("baseDatasetId"u8); - writer.WriteStringValue(BaseDatasetId); - } - if (Optional.IsDefined(TargetDatasetId)) - { - writer.WritePropertyName("targetDatasetId"u8); - writer.WriteStringValue(TargetDatasetId); - } + writer.WritePropertyName("dataDriftId"u8); + writer.WriteStringValue(DataDriftId); + writer.WritePropertyName("dataDriftName"u8); + writer.WriteStringValue(DataDriftName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("baseDatasetId"u8); + writer.WriteStringValue(BaseDatasetId); + writer.WritePropertyName("targetDatasetId"u8); + writer.WriteStringValue(TargetDatasetId); if (Optional.IsDefined(DriftCoefficient)) { writer.WritePropertyName("driftCoefficient"u8); @@ -66,13 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } if (Optional.IsDefined(StartTime)) { - writer.WritePropertyName("startTime"u8); - writer.WriteStringValue(StartTime.Value, "O"); + if (StartTime != null) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartTime.Value, "O"); + } + else + { + writer.WriteNull("startTime"); + } } if (Optional.IsDefined(EndTime)) { - writer.WritePropertyName("endTime"u8); - writer.WriteStringValue(EndTime.Value, "O"); + if (EndTime != null) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndTime.Value, "O"); + } + else + { + writer.WriteNull("endTime"); + } } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -161,6 +160,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + startTime = null; continue; } startTime = property.Value.GetDateTimeOffset("O"); @@ -170,6 +170,7 @@ internal static MachineLearningServicesDatasetDriftDetectedEventData Deserialize { if (property.Value.ValueKind == JsonValueKind.Null) { + endTime = null; continue; } endTime = property.Value.GetDateTimeOffset("O"); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs index f86f30e006be..66d7e5943085 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesDatasetDriftDetectedEventData.cs @@ -46,8 +46,25 @@ public partial class MachineLearningServicesDatasetDriftDetectedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineLearningServicesDatasetDriftDetectedEventData() + /// The ID of the data drift monitor that triggered the event. + /// The name of the data drift monitor that triggered the event. + /// The ID of the Run that detected data drift. + /// The ID of the base Dataset used to detect drift. + /// The ID of the target Dataset used to detect drift. + /// , , , or is null. + internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId, string dataDriftName, string runId, string baseDatasetId, string targetDatasetId) { + Argument.AssertNotNull(dataDriftId, nameof(dataDriftId)); + Argument.AssertNotNull(dataDriftName, nameof(dataDriftName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(baseDatasetId, nameof(baseDatasetId)); + Argument.AssertNotNull(targetDatasetId, nameof(targetDatasetId)); + + DataDriftId = dataDriftId; + DataDriftName = dataDriftName; + RunId = runId; + BaseDatasetId = baseDatasetId; + TargetDatasetId = targetDatasetId; } /// Initializes a new instance of . @@ -73,6 +90,11 @@ internal MachineLearningServicesDatasetDriftDetectedEventData(string dataDriftId _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineLearningServicesDatasetDriftDetectedEventData() + { + } + /// The ID of the data drift monitor that triggered the event. public string DataDriftId { get; } /// The name of the data drift monitor that triggered the event. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs index 0c60ac11ceab..9bff7d57999d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.Serialization.cs @@ -34,61 +34,58 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelDeployedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ServiceName)) + writer.WritePropertyName("serviceName"u8); + writer.WriteStringValue(ServiceName); + writer.WritePropertyName("serviceComputeType"u8); + writer.WriteStringValue(ServiceComputeType); + writer.WritePropertyName("modelIds"u8); + writer.WriteStringValue(ModelIds); + if (Optional.IsCollectionDefined(ServiceTags)) { - writer.WritePropertyName("serviceName"u8); - writer.WriteStringValue(ServiceName); - } - if (Optional.IsDefined(ServiceComputeType)) - { - writer.WritePropertyName("serviceComputeType"u8); - writer.WriteStringValue(ServiceComputeType); - } - if (Optional.IsDefined(ModelIds)) - { - writer.WritePropertyName("modelIds"u8); - writer.WriteStringValue(ModelIds); - } - writer.WritePropertyName("serviceTags"u8); - writer.WriteStartObject(); - foreach (var item in ServiceTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceTags"u8); + writer.WriteStartObject(); + foreach (var item in ServiceTags) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("serviceProperties"u8); - writer.WriteStartObject(); - foreach (var item in ServiceProperties) + if (Optional.IsCollectionDefined(ServiceProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("serviceProperties"u8); + writer.WriteStartObject(); + foreach (var item in ServiceProperties) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -152,6 +149,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -169,6 +170,10 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine } if (property.NameEquals("serviceProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -194,8 +199,8 @@ internal static MachineLearningServicesModelDeployedEventData DeserializeMachine serviceName, serviceComputeType, modelIds, - serviceTags, - serviceProperties, + serviceTags ?? new ChangeTrackingDictionary(), + serviceProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs index 8d759992c57d..86cce0670b04 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelDeployedEventData.cs @@ -46,16 +46,21 @@ public partial class MachineLearningServicesModelDeployedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the deployed service. - /// The properties of the deployed service. - /// or is null. - internal MachineLearningServicesModelDeployedEventData(IReadOnlyDictionary serviceTags, IReadOnlyDictionary serviceProperties) + /// The name of the deployed service. + /// The compute type (e.g. ACI, AKS) of the deployed service. + /// A common separated list of model IDs. The IDs of the models deployed in the service. + /// , or is null. + internal MachineLearningServicesModelDeployedEventData(string serviceName, string serviceComputeType, string modelIds) { - Argument.AssertNotNull(serviceTags, nameof(serviceTags)); - Argument.AssertNotNull(serviceProperties, nameof(serviceProperties)); + Argument.AssertNotNull(serviceName, nameof(serviceName)); + Argument.AssertNotNull(serviceComputeType, nameof(serviceComputeType)); + Argument.AssertNotNull(modelIds, nameof(modelIds)); - ServiceTags = serviceTags; - ServiceProperties = serviceProperties; + ServiceName = serviceName; + ServiceComputeType = serviceComputeType; + ModelIds = modelIds; + ServiceTags = new ChangeTrackingDictionary(); + ServiceProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs index 3c3b35cff214..b091b63623df 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.Serialization.cs @@ -34,56 +34,56 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesModelRegisteredEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ModelName)) + writer.WritePropertyName("modelName"u8); + writer.WriteStringValue(ModelName); + writer.WritePropertyName("modelVersion"u8); + writer.WriteStringValue(ModelVersion); + if (Optional.IsCollectionDefined(ModelTags)) { - writer.WritePropertyName("modelName"u8); - writer.WriteStringValue(ModelName); - } - if (Optional.IsDefined(ModelVersion)) - { - writer.WritePropertyName("modelVersion"u8); - writer.WriteStringValue(ModelVersion); - } - writer.WritePropertyName("modelTags"u8); - writer.WriteStartObject(); - foreach (var item in ModelTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelTags"u8); + writer.WriteStartObject(); + foreach (var item in ModelTags) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("modelProperties"u8); - writer.WriteStartObject(); - foreach (var item in ModelProperties) + if (Optional.IsCollectionDefined(ModelProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("modelProperties"u8); + writer.WriteStartObject(); + foreach (var item in ModelProperties) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -141,6 +141,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -158,6 +162,10 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } if (property.NameEquals("modelProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -179,7 +187,7 @@ internal static MachineLearningServicesModelRegisteredEventData DeserializeMachi } } serializedAdditionalRawData = rawDataDictionary; - return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags, modelProperties, serializedAdditionalRawData); + return new MachineLearningServicesModelRegisteredEventData(modelName, modelVersion, modelTags ?? new ChangeTrackingDictionary(), modelProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs index 66af5a595773..e844c536e50b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesModelRegisteredEventData.cs @@ -46,16 +46,18 @@ public partial class MachineLearningServicesModelRegisteredEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the model that was registered. - /// The properties of the model that was registered. - /// or is null. - internal MachineLearningServicesModelRegisteredEventData(IReadOnlyDictionary modelTags, IReadOnlyDictionary modelProperties) + /// The name of the model that was registered. + /// The version of the model that was registered. + /// or is null. + internal MachineLearningServicesModelRegisteredEventData(string modelName, string modelVersion) { - Argument.AssertNotNull(modelTags, nameof(modelTags)); - Argument.AssertNotNull(modelProperties, nameof(modelProperties)); + Argument.AssertNotNull(modelName, nameof(modelName)); + Argument.AssertNotNull(modelVersion, nameof(modelVersion)); - ModelTags = modelTags; - ModelProperties = modelProperties; + ModelName = modelName; + ModelVersion = modelVersion; + ModelTags = new ChangeTrackingDictionary(); + ModelProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs index ed5a9e214388..2e679de2678e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.Serialization.cs @@ -34,66 +34,60 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunCompletedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -163,6 +157,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -180,6 +178,10 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -206,8 +208,8 @@ internal static MachineLearningServicesRunCompletedEventData DeserializeMachineL experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs index e8c1fb9d4264..bbfe86bdb3e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunCompletedEventData.cs @@ -46,16 +46,24 @@ public partial class MachineLearningServicesRunCompletedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the completed Run. - /// The properties of the completed Run. - /// or is null. - internal MachineLearningServicesRunCompletedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the run belongs to. + /// The name of the experiment that the run belongs to. + /// The ID of the Run that was completed. + /// The Run Type of the completed Run. + /// , , or is null. + internal MachineLearningServicesRunCompletedEventData(string experimentId, string experimentName, string runId, string runType) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs index c944a9fbf870..178e33f63bb6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.Serialization.cs @@ -34,71 +34,62 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineLearningServicesRunStatusChangedEventData)} does not support writing '{format}' format."); } - if (Optional.IsDefined(ExperimentId)) + writer.WritePropertyName("experimentId"u8); + writer.WriteStringValue(ExperimentId); + writer.WritePropertyName("experimentName"u8); + writer.WriteStringValue(ExperimentName); + writer.WritePropertyName("runId"u8); + writer.WriteStringValue(RunId); + writer.WritePropertyName("runType"u8); + writer.WriteStringValue(RunType); + if (Optional.IsCollectionDefined(RunTags)) { - writer.WritePropertyName("experimentId"u8); - writer.WriteStringValue(ExperimentId); - } - if (Optional.IsDefined(ExperimentName)) - { - writer.WritePropertyName("experimentName"u8); - writer.WriteStringValue(ExperimentName); - } - if (Optional.IsDefined(RunId)) - { - writer.WritePropertyName("runId"u8); - writer.WriteStringValue(RunId); - } - if (Optional.IsDefined(RunType)) - { - writer.WritePropertyName("runType"u8); - writer.WriteStringValue(RunType); - } - writer.WritePropertyName("runTags"u8); - writer.WriteStartObject(); - foreach (var item in RunTags) - { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runTags"u8); + writer.WriteStartObject(); + foreach (var item in RunTags) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - writer.WritePropertyName("runProperties"u8); - writer.WriteStartObject(); - foreach (var item in RunProperties) + if (Optional.IsCollectionDefined(RunProperties)) { - writer.WritePropertyName(item.Key); - if (item.Value == null) + writer.WritePropertyName("runProperties"u8); + writer.WriteStartObject(); + foreach (var item in RunProperties) { - writer.WriteNullValue(); - continue; - } + 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); - } + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } #endif + } + writer.WriteEndObject(); } - writer.WriteEndObject(); - if (Optional.IsDefined(RunStatus)) - { - writer.WritePropertyName("runStatus"u8); - writer.WriteStringValue(RunStatus); - } + writer.WritePropertyName("runStatus"u8); + writer.WriteStringValue(RunStatus); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -169,6 +160,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runTags"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -186,6 +181,10 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach } if (property.NameEquals("runProperties"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -217,8 +216,8 @@ internal static MachineLearningServicesRunStatusChangedEventData DeserializeMach experimentName, runId, runType, - runTags, - runProperties, + runTags ?? new ChangeTrackingDictionary(), + runProperties ?? new ChangeTrackingDictionary(), runStatus, serializedAdditionalRawData); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs index 8af67e302b82..c7c35d6ed14e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MachineLearningServicesRunStatusChangedEventData.cs @@ -46,16 +46,27 @@ public partial class MachineLearningServicesRunStatusChangedEventData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The tags of the Machine Learning Run. - /// The properties of the Machine Learning Run. - /// or is null. - internal MachineLearningServicesRunStatusChangedEventData(IReadOnlyDictionary runTags, IReadOnlyDictionary runProperties) + /// The ID of the experiment that the Machine Learning Run belongs to. + /// The name of the experiment that the Machine Learning Run belongs to. + /// The ID of the Machine Learning Run. + /// The Run Type of the Machine Learning Run. + /// The status of the Machine Learning Run. + /// , , , or is null. + internal MachineLearningServicesRunStatusChangedEventData(string experimentId, string experimentName, string runId, string runType, string runStatus) { - Argument.AssertNotNull(runTags, nameof(runTags)); - Argument.AssertNotNull(runProperties, nameof(runProperties)); + Argument.AssertNotNull(experimentId, nameof(experimentId)); + Argument.AssertNotNull(experimentName, nameof(experimentName)); + Argument.AssertNotNull(runId, nameof(runId)); + Argument.AssertNotNull(runType, nameof(runType)); + Argument.AssertNotNull(runStatus, nameof(runStatus)); - RunTags = runTags; - RunProperties = runProperties; + ExperimentId = experimentId; + ExperimentName = experimentName; + RunId = runId; + RunType = runType; + RunTags = new ChangeTrackingDictionary(); + RunProperties = new ChangeTrackingDictionary(); + RunStatus = runStatus; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs index 51ab73b06dc2..917a81f6db1a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEnteredEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceEnteredEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEnteredEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceEnteredEventData(IEnumerable expiredGeofenceGeometr internal MapsGeofenceEnteredEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEnteredEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs index 47ae53e98be2..0f026d11d234 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.Serialization.cs @@ -34,27 +34,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MapsGeofenceEventProperties)} does not support writing '{format}' format."); } - writer.WritePropertyName("expiredGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in ExpiredGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("expiredGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in ExpiredGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("geometries"u8); - writer.WriteStartArray(); - foreach (var item in Geometries) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("geometries"u8); + writer.WriteStartArray(); + foreach (var item in Geometries) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); - writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); - writer.WriteStartArray(); - foreach (var item in InvalidPeriodGeofenceGeometryId) + if (options.Format != "W") { - writer.WriteStringValue(item); + writer.WritePropertyName("invalidPeriodGeofenceGeometryId"u8); + writer.WriteStartArray(); + foreach (var item in InvalidPeriodGeofenceGeometryId) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); if (Optional.IsDefined(IsEventPublished)) { writer.WritePropertyName("isEventPublished"u8); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs index 291c97afaace..6535b899695a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceEventProperties.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -47,19 +46,11 @@ public partial class MapsGeofenceEventProperties private protected IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceEventProperties(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) + internal MapsGeofenceEventProperties() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); - - ExpiredGeofenceGeometryId = expiredGeofenceGeometryId.ToList(); - Geometries = geometries.ToList(); - InvalidPeriodGeofenceGeometryId = invalidPeriodGeofenceGeometryId.ToList(); + ExpiredGeofenceGeometryId = new ChangeTrackingList(); + Geometries = new ChangeTrackingList(); + InvalidPeriodGeofenceGeometryId = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -77,11 +68,6 @@ internal MapsGeofenceEventProperties(IReadOnlyList expiredGeofenceGeomet _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal MapsGeofenceEventProperties() - { - } - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. public IReadOnlyList ExpiredGeofenceGeometryId { get; } /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs index 29a1bc6813bd..ea1b7a3f4635 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceExitedEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceExitedEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceExitedEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceExitedEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceExitedEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceExitedEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs index ba7fd1dfd496..b8a9abb6001c 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/MapsGeofenceResultEventData.cs @@ -14,15 +14,8 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class MapsGeofenceResultEventData : MapsGeofenceEventProperties { /// Initializes a new instance of . - /// Lists of the geometry ID of the geofence which is expired relative to the user time in the request. - /// Lists the fence geometries that either fully contain the coordinate position or have an overlap with the searchBuffer around the fence. - /// Lists of the geometry ID of the geofence which is in invalid period relative to the user time in the request. - /// , or is null. - internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometryId, IEnumerable geometries, IEnumerable invalidPeriodGeofenceGeometryId) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId) + internal MapsGeofenceResultEventData() { - Argument.AssertNotNull(expiredGeofenceGeometryId, nameof(expiredGeofenceGeometryId)); - Argument.AssertNotNull(geometries, nameof(geometries)); - Argument.AssertNotNull(invalidPeriodGeofenceGeometryId, nameof(invalidPeriodGeofenceGeometryId)); } /// Initializes a new instance of . @@ -34,10 +27,5 @@ internal MapsGeofenceResultEventData(IEnumerable expiredGeofenceGeometry internal MapsGeofenceResultEventData(IReadOnlyList expiredGeofenceGeometryId, IReadOnlyList geometries, IReadOnlyList invalidPeriodGeofenceGeometryId, bool? isEventPublished, IDictionary serializedAdditionalRawData) : base(expiredGeofenceGeometryId, geometries, invalidPeriodGeofenceGeometryId, isEventPublished, serializedAdditionalRawData) { } - - /// Initializes a new instance of for deserialization. - internal MapsGeofenceResultEventData() - { - } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs index 8425b15b75fa..a5214a2e30d8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/src/Generated/ResourceNotificationsContainerServiceEventResourcesScheduledEventData.cs @@ -10,7 +10,7 @@ namespace Azure.Messaging.EventGrid.SystemEvents { - /// Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. + /// Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event.Schema of the Data property of an event grid event for a Microsoft.ResourceNotifications.ContainerServiceEventResources.ScheduledEventEmitted preview event. public partial class ResourceNotificationsContainerServiceEventResourcesScheduledEventData : ResourceNotificationsResourceUpdatedEventData { /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml index f6874a4d67e5..66be2504b1e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml +++ b/sdk/eventgrid/Azure.Messaging.EventGrid.SystemEvents/tsp-location.yaml @@ -1,3 +1,3 @@ repo: Azure/azure-rest-api-specs directory: "specification/eventgrid/Azure.Messaging.EventGrid.SystemEvents" -commit: 5f079f3d5e4ec9d1e10bafbd58844fdb4977e338 +commit: 90041e31d04e686567849f27d8641a5d61110508 diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md index 8cf49929d21f..62dabbc22930 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.31.0-beta.1 (Unreleased) +## 4.32.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,14 @@ ### Other Changes +## 4.31.0 (2025-05-19) + +### Features Added + +- Added new communication events. +- Added new API management events. +- Add `EdgeSolutionVersionPublishedEventData` Edge event. + ## 4.30.0 (2025-02-14) ### Features Added diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/EventGridSourceGenerator.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/EventGridSourceGenerator.cs index 2ef27fcda927..b12f6ebabce3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/EventGridSourceGenerator.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/EventGridSourceGenerator.cs @@ -1,9 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; +using System.Collections.Generic; +using System.Collections.Immutable; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Syntax; using Microsoft.CodeAnalysis.Text; namespace Azure.EventGrid.Messaging.SourceGeneration @@ -13,38 +18,144 @@ namespace Azure.EventGrid.Messaging.SourceGeneration /// from constant values to deserialization method for each system event. /// [Generator] - internal class EventGridSourceGenerator : ISourceGenerator + internal class EventGridSourceGenerator : IIncrementalGenerator { - private SourceVisitor _visitor; - private bool _isSystemEventsLibrary; private const string Indent = " "; - public void Execute(GeneratorExecutionContext context) + // the event name is either 3 or 4 parts, e.g. Microsoft.AppConfiguration.KeyValueDeleted or Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged + private static readonly Regex EventTypeRegex = new("[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+(\\.[a-zA-Z]+)?", RegexOptions.Compiled); + + private static ReadOnlySpan SummaryStartTag => "".AsSpan(); + private static ReadOnlySpan SummaryEndTag => "".AsSpan(); + + public void Initialize(IncrementalGeneratorInitializationContext context) { - _visitor = new SourceVisitor(); - _isSystemEventsLibrary = context.Compilation.AssemblyName == "Azure.Messaging.EventGrid.SystemEvents"; - var root = context.Compilation.GetSymbolsWithName( - "SystemEvents", - SymbolFilter.Namespace) - .Single(); - _visitor.Visit(root); - - context.AddSource("SystemEventNames.cs", SourceText.From(ConstructSystemEventNames(), Encoding.UTF8)); - context.AddSource("SystemEventExtensions.cs", SourceText.From(ConstructSystemEventExtensions(), Encoding.UTF8)); + // Get all class declarations that end with "EventData" + var classDeclarations = context.SyntaxProvider + .CreateSyntaxProvider( + predicate: static (s, _) => s is ClassDeclarationSyntax cds && cds.Identifier.Text.EndsWith("EventData"), + transform: static (ctx, cancellationToken) => + { + var semanticModel = ctx.SemanticModel; + var classDeclaration = (ClassDeclarationSyntax)ctx.Node; + + var declaredSymbol = semanticModel.GetDeclaredSymbol(classDeclaration, cancellationToken); + + return declaredSymbol?.ContainingNamespace is { Name: "SystemEvents" } ? classDeclaration : null; + }) + .Where(static cls => cls != null); + + var compilationAndClasses = context.CompilationProvider.Combine(classDeclarations.Collect()); + + // Generate the source + context.RegisterSourceOutput(compilationAndClasses, + static (SourceProductionContext sourceProductionContext, (Compilation Compilation, ImmutableArray ClassDeclarations) input) => + { + Execute(sourceProductionContext, input.Compilation, input.ClassDeclarations); + }); + } + + private static void Execute(SourceProductionContext context, Compilation compilation, ImmutableArray classes) + { + if (classes.IsDefaultOrEmpty) + { + return; + } + + var systemEventNodes = GetSystemEventNodes(compilation, classes); + if (systemEventNodes.Count <= 0) + { + return; + } + + var isSystemEventsLibrary = compilation.AssemblyName == "Azure.Messaging.EventGrid.SystemEvents"; + + context.AddSource("SystemEventNames.cs", SourceText.From(ConstructSystemEventNames(systemEventNodes, isSystemEventsLibrary), Encoding.UTF8)); + context.AddSource("SystemEventExtensions.cs", SourceText.From(ConstructSystemEventExtensions(systemEventNodes, isSystemEventsLibrary), Encoding.UTF8)); + } + + private static List GetSystemEventNodes(Compilation compilation, ImmutableArray classes) + { + var systemEventNodes = new List(); + var eventTypeSet = new HashSet(StringComparer.OrdinalIgnoreCase); + + foreach (var classDeclaration in classes) + { + var semanticModel = compilation.GetSemanticModel(classDeclaration.SyntaxTree); + if (semanticModel.GetDeclaredSymbol(classDeclaration) is not INamedTypeSymbol classSymbol) + { + continue; + } + + var documentationCommentXml = classSymbol.GetDocumentationCommentXml(); + if (string.IsNullOrEmpty(documentationCommentXml)) + { + continue; + } + + // Extract event type from documentation comments + string eventType = ExtractEventTypeFromDocumentation(documentationCommentXml); + if (string.IsNullOrEmpty(eventType)) + { + // Skip if no event type is found (likely a base type) + continue; + } + + if (!eventTypeSet.Add(eventType)) + { + continue; + } + + // Find the deserialize method + var deserializeMethod = classSymbol.GetMembers() + .OfType() + .FirstOrDefault(m => m.Name.StartsWith("Deserialize", StringComparison.Ordinal))?.Name; + + if (deserializeMethod == null) + { + // Skip if no deserialize method is found + continue; + } + + // Create a SystemEventNode for this event + systemEventNodes.Add(new SystemEventNode(eventName: classSymbol.Name, eventType: $@"""{eventType}""", deserializeMethod: deserializeMethod)); + } + + return systemEventNodes; } - public void Initialize(GeneratorInitializationContext context) + private static string ExtractEventTypeFromDocumentation(string documentationCommentXml) { - // Uncomment to debug - //if (!Debugger.IsAttached) - //{ - // Debugger.Launch(); - //} + if (string.IsNullOrEmpty(documentationCommentXml)) + { + return null; + } + + ReadOnlySpan docSpan = documentationCommentXml.AsSpan(); + + int summaryStartIndex = docSpan.IndexOf(SummaryStartTag); + if (summaryStartIndex < 0) + { + return null; + } + + summaryStartIndex += SummaryStartTag.Length; + + int summaryEndIndex = docSpan.Slice(summaryStartIndex).IndexOf(SummaryEndTag); + if (summaryEndIndex < 0) + { + return null; + } + + var summaryContent = docSpan.Slice(summaryStartIndex, summaryEndIndex); + + var match = EventTypeRegex.Match(summaryContent.ToString()); + return match.Success ? match.Value : null; } - private string ConstructSystemEventNames() + private static string ConstructSystemEventNames(List systemEvents, bool isSystemEventsLibrary) { - string ns = _isSystemEventsLibrary ? "Azure.Messaging.EventGrid.SystemEvents" : "Azure.Messaging.EventGrid"; + string ns = isSystemEventsLibrary ? "Azure.Messaging.EventGrid.SystemEvents" : "Azure.Messaging.EventGrid"; var sourceBuilder = new StringBuilder( $@"// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -62,34 +173,34 @@ namespace {ns} public static class SystemEventNames {{ "); - for (int i = 0; i < _visitor.SystemEvents.Count; i++) + for (int i = 0; i < systemEvents.Count; i++) { if (i > 0) { sourceBuilder.AppendLine(); } - SystemEventNode sysEvent = _visitor.SystemEvents[i]; + SystemEventNode sysEvent = systemEvents[i]; // Add the ref docs for each constant - sourceBuilder.AppendLine($"{Indent}{Indent}/// "); - sourceBuilder.AppendLine( - !_isSystemEventsLibrary - ? $"{Indent}{Indent}/// The value of the Event Type stored in and " - : $"{Indent}{Indent}/// The value of the Event Type stored in "); + sourceBuilder.AppendIndentedLine(2, "/// "); + sourceBuilder.AppendIndentedLine(2, + !isSystemEventsLibrary + ? "/// The value of the Event Type stored in and " + : "/// The value of the Event Type stored in "); - sourceBuilder.AppendLine($"{Indent}{Indent}/// for the system event."); - sourceBuilder.AppendLine($"{Indent}{Indent}/// "); + sourceBuilder.AppendIndentedLine(2, $"/// for the system event."); + sourceBuilder.AppendIndentedLine(2, "/// "); // Add the constant - sourceBuilder.AppendLine($"{Indent}{Indent}public const string {sysEvent.EventConstantName} = {sysEvent.EventType};"); + sourceBuilder.AppendIndentedLine(2, $"public const string {sysEvent.EventConstantName} = {sysEvent.EventType};"); } - sourceBuilder.Append($@"{Indent}}} -}}"); + sourceBuilder.AppendIndentedLine(1, @"} +}"); return sourceBuilder.ToString(); } - private string ConstructSystemEventExtensions() + private static string ConstructSystemEventExtensions(List systemEvents, bool isSystemEventsLibrary) { var sourceBuilder = new StringBuilder( $@"// Copyright (c) Microsoft Corporation. All rights reserved. @@ -101,7 +212,7 @@ private string ConstructSystemEventExtensions() using System.Collections.Generic; using System.Text.Json; using Azure.Messaging.EventGrid.SystemEvents; -{(_isSystemEventsLibrary ? "using System.ClientModel.Primitives;" : string.Empty)} +{(isSystemEventsLibrary ? "using System.ClientModel.Primitives;" : string.Empty)} namespace Azure.Messaging.EventGrid {{ @@ -111,17 +222,17 @@ public static object AsSystemEventData(string eventType, JsonElement data) {{ var eventTypeSpan = eventType.AsSpan(); "); - foreach (SystemEventNode sysEvent in _visitor.SystemEvents) + foreach (SystemEventNode sysEvent in systemEvents) { // Add each an entry for each system event to the dictionary containing a mapping from constant name to deserialization method. - sourceBuilder.AppendLine( - $"{Indent}{Indent}{Indent}if (eventTypeSpan.Equals(SystemEventNames.{sysEvent.EventConstantName}.AsSpan(), StringComparison.OrdinalIgnoreCase))"); - sourceBuilder.AppendLine( - $"{Indent}{Indent}{Indent}{Indent}return {sysEvent.EventName}.{sysEvent.DeserializeMethod}(data{(_isSystemEventsLibrary ? ", null" : string.Empty)});"); + sourceBuilder.AppendIndentedLine(3, + $"if (eventTypeSpan.Equals(SystemEventNames.{sysEvent.EventConstantName}.AsSpan(), StringComparison.OrdinalIgnoreCase))"); + sourceBuilder.AppendIndentedLine(4, + $"return {sysEvent.EventName}.{sysEvent.DeserializeMethod}(data{(isSystemEventsLibrary ? ", null" : string.Empty)});"); } - sourceBuilder.AppendLine($"{Indent}{Indent}{Indent}return null;"); - sourceBuilder.AppendLine($"{Indent}{Indent}}}"); - sourceBuilder.AppendLine($"{Indent}}}"); + sourceBuilder.AppendIndentedLine(3, "return null;"); + sourceBuilder.AppendIndentedLine(2, "}"); + sourceBuilder.AppendIndentedLine(1, "}"); sourceBuilder.AppendLine("}"); return sourceBuilder.ToString(); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs deleted file mode 100644 index ca6ecb4bedfa..000000000000 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SourceVisitor.cs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.Xml; -using Microsoft.CodeAnalysis; - -namespace Azure.EventGrid.Messaging.SourceGeneration -{ - internal class SourceVisitor : SymbolVisitor - { - public List SystemEvents { get; } = new(); - - public override void VisitNamespace(INamespaceSymbol symbol) - { - foreach (var childSymbol in symbol.GetMembers()) - { - childSymbol.Accept(this); - } - } - - public override void VisitNamedType(INamedTypeSymbol symbol) - { - if (symbol.Name.EndsWith("EventData")) - { - string type = null; - XmlDocument xmlDoc = new(); - xmlDoc.LoadXml(symbol.GetDocumentationCommentXml()); - var xmlNode = xmlDoc.SelectSingleNode("member/summary"); - // the event name is either 3 or 4 parts, e.g. Microsoft.AppConfiguration.KeyValueDeleted or Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged - var match = Regex.Match(xmlNode.InnerText, "[a-zA-Z]+\\.[a-zA-Z]+\\.[a-zA-Z]+(\\.[a-zA-Z]+)?"); - if (!match.Success) - { - // We expect some EventData to not have event types if they are base types, - // e.g. ContainerRegistryEventData - return; - } - - type = $@"""{match.Value}"""; - SystemEvents.Add( - new SystemEventNode() - { - EventName = symbol.Name, - EventType = type, - DeserializeMethod = symbol.MemberNames.Single(m => m.StartsWith("Deserialize")) - }); - } - } - } -} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/StringBuilderExtensions.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/StringBuilderExtensions.cs new file mode 100644 index 000000000000..8d33f1c5ce82 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/StringBuilderExtensions.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Text; + +namespace Azure.EventGrid.Messaging.SourceGeneration +{ + internal static class StringBuilderExtensions + { + public static void AppendIndentedLine(this StringBuilder sb, int indentLevel, string text) + { + sb.Append(' ', indentLevel * 4); + sb.AppendLine(text); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SystemEventNode.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SystemEventNode.cs index 1896a4544b37..cfac1dd9f297 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SystemEventNode.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/EventGridSourceGenerator/src/SystemEventNode.cs @@ -3,27 +3,34 @@ namespace Azure.EventGrid.Messaging.SourceGeneration { - internal class SystemEventNode + internal sealed class SystemEventNode { - public string EventName { get; set; } + public SystemEventNode(string eventName, string eventType, string deserializeMethod) + { + EventName = eventName; + EventType = eventType; + DeserializeMethod = deserializeMethod; + EventConstantName = Convert(EventName); + } - public string EventConstantName + private static string Convert(string eventName) { - get + // special case a few events that don't follow the pattern + return eventName switch { - // special case a few events that don't follow the pattern - return EventName switch - { - "ServiceBusDeadletterMessagesAvailableWithNoListenersEventData" => "ServiceBusDeadletterMessagesAvailableWithNoListener", - "SubscriptionDeletedEventData" => "EventGridSubscriptionDeleted", - "SubscriptionValidationEventData" => "EventGridSubscriptionValidation", - _ => EventName?.Replace("EventData", ""), - }; - } + "ServiceBusDeadletterMessagesAvailableWithNoListenersEventData" => "ServiceBusDeadletterMessagesAvailableWithNoListener", + "SubscriptionDeletedEventData" => "EventGridSubscriptionDeleted", + "SubscriptionValidationEventData" => "EventGridSubscriptionValidation", + _ => eventName?.Replace("EventData", ""), + }; } - public string EventType { get; set; } + public string EventName { get; } + + public string EventConstantName { get; } + + public string EventType { get; } - public string DeserializeMethod { get; set; } + public string DeserializeMethod { get; } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs index 411fa9fac51b..bd278233ad85 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -27,6 +27,17 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +83,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +168,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +182,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +258,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +468,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +489,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +529,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +541,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +582,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -802,6 +834,119 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind 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.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public System.TimeSpan? CallDuration { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind 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.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1109,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1835,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1907,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2416,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 411fa9fac51b..bd278233ad85 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -27,6 +27,17 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +83,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +168,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +182,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +258,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +468,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +489,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +529,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +541,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +582,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -802,6 +834,119 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind 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.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public System.TimeSpan? CallDuration { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind 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.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind left, Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1109,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1835,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1907,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2416,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj index ea9b155ff620..dce1d38d7a53 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Azure.Messaging.EventGrid.csproj @@ -2,9 +2,9 @@ This library can be used to publish events to Azure Event Grid and to consume events delivered by EventGrid. It also defines the event schemas for the events published to EventGrid by various Azure services. Microsoft Azure.Messaging.EventGrid client library - 4.31.0-beta.1 + 4.32.0-beta.1 - 4.30.0 + 4.31.0 Microsoft Azure EventGrid;Event Grid;Event Grid Publishing; true $(RequiredTargetFrameworks) diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..c56a81fa2b6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Customization/AcsCallEndedEventData.cs @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData + { + /// Duration of the call. + public TimeSpan? CallDuration => CallDurationInSeconds.HasValue + ? TimeSpan.FromSeconds(CallDurationInSeconds.Value) + : null; + + internal float? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index fdc005e4a49a..434beb166fd7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -2833,6 +2833,180 @@ public static AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(st updatedWorkerProperties?.ToList()); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantEventData AcsCallParticipantEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallParticipantKind? role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallingEventProperties AcsCallingEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id); + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallStartedEventData AcsCallStartedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind? kind = null, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, kind, name); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + /// A new instance for mocking. + public static AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = null, int? subCode = null, string phrase = null) + { + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -2899,7 +3073,7 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio return new AcsChatEventBaseProperties(recipientCommunicationIdentifier, transactionId, threadId); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. /// The chat message id. @@ -2910,12 +3084,21 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio /// The version of the message. /// The body of the chat message. /// The chat message metadata. - /// A new instance for mocking. - public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + /// or is null. + /// A new instance for mocking. + public static AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); - return new AcsChatMessageReceivedInThreadEventData( + return new AcsChatAzureBotCommandReceivedInThreadEventData( transactionId, threadId, messageId, @@ -2937,9 +3120,19 @@ public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInTh /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageEventInThreadBaseProperties( transactionId, threadId, @@ -2954,12 +3147,98 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. /// A new instance for mocking. public static AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatEventInThreadBaseProperties(transactionId, threadId); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatMessageReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -3005,9 +3284,18 @@ public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(Commun /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset? editTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); return new AcsChatMessageEditedInThreadEventData( @@ -3061,9 +3349,19 @@ public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Comm /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. /// A new instance for mocking. public static AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageDeletedInThreadEventData( transactionId, threadId, @@ -3138,9 +3436,18 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); participants ??= new List(); @@ -3161,9 +3468,19 @@ public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadEventInThreadBaseProperties(transactionId, threadId, createTime, version); } @@ -3195,9 +3512,19 @@ public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeleted /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadDeletedEventData( transactionId, threadId, @@ -3244,9 +3571,18 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadProper /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. /// A new instance for mocking. public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset? editTime = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -3314,9 +3650,19 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatPartic /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantAddedToThreadEventData( transactionId, threadId, @@ -3333,9 +3679,19 @@ public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedTo /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantRemovedFromThreadEventData( transactionId, threadId, @@ -3354,9 +3710,22 @@ public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRem /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. /// A new instance for mocking. public static AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string @from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, IEnumerable deliveryAttempts = null, DateTimeOffset? receivedTimestamp = null, string tag = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } deliveryAttempts ??= new List(); return new AcsSmsDeliveryReportReceivedEventData( @@ -3384,9 +3753,23 @@ public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(Da /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. /// A new instance for mocking. public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string messageId = null, string @from = null, string to = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsEventBaseProperties(messageId, @from, to); } @@ -3397,9 +3780,23 @@ public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string message /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. /// A new instance for mocking. public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset? receivedTimestamp = null, int segmentCount = default) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsReceivedEventData( messageId, @from, @@ -3916,6 +4313,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway = null, ApiManagementGatewayTokenNearExpiryProperties token = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementGatewayTokenNearExpiryProperties(expiresOn); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway = null, ApiManagementExpiredGatewayTokenProperties token = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementExpiredGatewayTokenProperties(expiresOn); + } + /// Initializes a new instance of . /// Type of HL7 FHIR resource. /// Domain name of FHIR account for this resource. @@ -4319,5 +4787,56 @@ public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdat { return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification); } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + if (externalValidationId == null) + { + throw new ArgumentNullException(nameof(externalValidationId)); + } + if (targetId == null) + { + throw new ArgumentNullException(nameof(targetId)); + } + if (solutionTemplateId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateId)); + } + if (solutionTemplateVersionId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateVersionId)); + } + if (solutionVersionId == null) + { + throw new ArgumentNullException(nameof(solutionVersionId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + if (callbackUrl == null) + { + throw new ArgumentNullException(nameof(callbackUrl)); + } + + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..2ba1317a9b30 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties + { + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("phrase"u8)) + { + phrase = property.Value.GetString(); + continue; + } + } + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndReasonProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..92cb79be81e5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties + { + /// Initializes a new instance of . + internal AcsCallEndReasonProperties() + { + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + } + + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for ending the call. + public string Phrase { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..e4ee53d0c71b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.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.Messaging.EventGrid.SystemEvents +{ + /// The type of the call ended by. + public readonly partial struct AcsCallEndedByKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallEndedByKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ParticipantValue = "Participant"; + private const string MicrosoftInternalValue = "MicrosoftInternal"; + + /// Call end initiator is a participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// Call end initiator is the local participant. + public static AcsCallEndedByKind MicrosoftInternal { get; } = new AcsCallEndedByKind(MicrosoftInternalValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallEndedByKind left, AcsCallEndedByKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallEndedByKind left, AcsCallEndedByKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallEndedByKind(string value) => new AcsCallEndedByKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallEndedByKind other && Equals(other); + /// + public bool Equals(AcsCallEndedByKind 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/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..b0be970f6d3e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties + { + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind? type = default; + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AcsCallEndedByKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new AcsCallEndedByProperties(communicationIdentifier, type, name); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndedByProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..be6082ebe4f7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event endedby properties. + public partial class AcsCallEndedByProperties + { + /// Initializes a new instance of . + internal AcsCallEndedByProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind? kind, string name) + { + CommunicationIdentifier = communicationIdentifier; + Kind = kind; + Name = name; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of the call ended by. + public AcsCallEndedByKind? Kind { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..b6d5e1c0fcbc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallEndedEventDataConverter))] + public partial class AcsCallEndedEventData + { + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + float? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallEndedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + + internal partial class AcsCallEndedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallEndedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallEndedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..10f4290eaead --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, float? callDurationInSeconds) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + EndedBy = endedBy; + Reason = reason; + CallDurationInSeconds = callDurationInSeconds; + } + + /// The communication identifier of the user who was disconnected. + public AcsCallEndedByProperties EndedBy { get; } + /// The reason for ending the call. + public AcsCallEndReasonProperties Reason { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..edf7179ecb8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallGroupProperties + { + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallGroupProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..9390502bb868 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event group properties. + public partial class AcsCallGroupProperties + { + /// Initializes a new instance of . + internal AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + internal AcsCallGroupProperties(string id) + { + Id = id; + } + + /// Group Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..f3589e20c13e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantAddedEventDataConverter))] + public partial class AcsCallParticipantAddedEventData + { + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantAddedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantAddedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantAddedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantAddedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..9e6c019ea273 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs new file mode 100644 index 000000000000..71fb453c9ec5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantEventDataConverter))] + public partial class AcsCallParticipantEventData + { + internal static AcsCallParticipantEventData DeserializeAcsCallParticipantEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + + internal partial class AcsCallParticipantEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs new file mode 100644 index 000000000000..94f2021011f1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of participant events. + public partial class AcsCallParticipantEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// The user of the call participant. + public AcsCallParticipantProperties User { get; } + /// The display name of the participant. + public string DisplayName { get; } + /// The Id of the participant. + public string ParticipantId { get; } + /// The user agent of the participant. + public string UserAgent { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs new file mode 100644 index 000000000000..485fae58ee27 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// The role of participant user. + public readonly partial struct AcsCallParticipantKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + private const string OrganizerValue = "Organizer"; + + /// Call participant role is an attendee. + public static AcsCallParticipantKind Attendee { get; } = new AcsCallParticipantKind(AttendeeValue); + /// Call participant role is presenter. + public static AcsCallParticipantKind Presenter { get; } = new AcsCallParticipantKind(PresenterValue); + /// Call participant role is consumer. + public static AcsCallParticipantKind Consumer { get; } = new AcsCallParticipantKind(ConsumerValue); + /// Call participant role is collaborator. + public static AcsCallParticipantKind Collaborator { get; } = new AcsCallParticipantKind(CollaboratorValue); + /// Call participant role is organizer. + public static AcsCallParticipantKind Organizer { get; } = new AcsCallParticipantKind(OrganizerValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantKind left, AcsCallParticipantKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantKind left, AcsCallParticipantKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantKind(string value) => new AcsCallParticipantKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantKind 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/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..4a53b19251a7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties + { + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallParticipantKind? role = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantKind(property.Value.GetString()); + continue; + } + } + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallParticipantProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..0c4d965b1ef6 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event participant user. + public partial class AcsCallParticipantProperties + { + /// Initializes a new instance of . + internal AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallParticipantKind? role) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of participant user. + public AcsCallParticipantKind? Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..9417ceef4740 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantRemovedEventDataConverter))] + public partial class AcsCallParticipantRemovedEventData + { + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantRemovedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantRemovedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantRemovedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantRemovedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..043bcaa98a10 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..df58cdb6b727 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties + { + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallRoomProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallRoomProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..e76b63b858c7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event room properties. + public partial class AcsCallRoomProperties + { + /// Initializes a new instance of . + internal AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + internal AcsCallRoomProperties(string id) + { + Id = id; + } + + /// Room Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..fa62de8c59ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallStartedEventDataConverter))] + public partial class AcsCallStartedEventData + { + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallStartedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + + internal partial class AcsCallStartedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallStartedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallStartedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..face68720585 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..271461263e59 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties + { + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallingEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..d542dc66e407 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + + StartedBy = startedBy; + ServerCallId = serverCallId; + CorrelationId = correlationId; + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The callId of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The group metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlation ID of the calling event. + public string CorrelationId { get; } + /// Is the calling event a room call. + public bool? IsRoomsCall { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bb093e2c32ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.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.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatAzureBotCommandReceivedInThreadEventDataConverter))] + public partial class AcsChatAzureBotCommandReceivedInThreadEventData + { + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatAzureBotCommandReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatAzureBotCommandReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatAzureBotCommandReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatAzureBotCommandReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..aacbe351c02d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread event. + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs index 35fad4af31d7..cb705c3b2f54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs @@ -5,21 +5,22 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all thread-level chat events. public partial class AcsChatEventInThreadBaseProperties { - /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() - { - } - /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. internal AcsChatEventInThreadBaseProperties(string transactionId, string threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + TransactionId = transactionId; ThreadId = threadId; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs index b0e34e2551c6..412ade0e5f36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs index f887d31afeb6..d84d1c847edf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs @@ -13,8 +13,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageDeletedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs index 76b39cda1b45..42a85f12161d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -47,10 +47,6 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs index ac131a18cea4..5de5749e3943 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . @@ -27,8 +38,12 @@ internal AcsChatMessageDeletedInThreadEventData() /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs index dd9e84a70fdf..e55b47bfd35b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs @@ -70,10 +70,6 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs index 6c447d2cac7e..e642000a1219 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs @@ -14,8 +14,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , or is null. + internal AcsChatMessageEditedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs index 0eeae702b68c..9ecdd0fa22a4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -69,10 +69,6 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs index 0d03146d1b26..8d24520a3858 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -31,8 +46,12 @@ internal AcsChatMessageEditedInThreadEventData() /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; EditTime = editTime; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs index c82ee40114b2..9dcd1117edd8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs index 994534c4ad59..f7e62ac8af7b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventBaseProperties : AcsChatEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventBaseProperties() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageEventBaseProperties(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index 21fa82eb0afc..5c94e28726e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,10 +35,6 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs index 685b6c8f4924..e2902be335cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs @@ -13,8 +13,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . @@ -26,8 +41,12 @@ internal AcsChatMessageEventInThreadBaseProperties() /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; SenderDisplayName = senderDisplayName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs index 4eccff957138..9bb7e07bd654 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs index d61b4a63945c..f1f2e8822ffe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs @@ -14,8 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageReceivedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 076d2837ccef..439b59b9a542 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -59,10 +59,6 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs index b4c2319c92eb..96be9775647a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -30,8 +45,12 @@ internal AcsChatMessageReceivedInThreadEventData() /// The version of the message. /// The body of the chat message. /// The chat message metadata. + /// or is null. internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs index 01e5e5c55e5f..25c47fabb450 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs index c205886b7b7b..4760962609c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// , , or is null. + internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantAddedToThreadEventData() /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index 76d4c099c082..b9e14ef1a2fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs index f51c22fd17ed..cbff24655e89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadWithUserEventData() + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) { + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index b4058aaa1092..ffd8afa045fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs index 5be604dc92c1..4b264f8a27f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantRemovedFromThreadEventData() /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index c0e5a321610d..ca7da5e6a694 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index b8ef04e76ab6..6843aecfeee6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadWithUserEventData() + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) { + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs index b83032f6e45b..7dec53ad9353 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs @@ -33,19 +33,11 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -77,10 +69,6 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -124,9 +112,9 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs index 07b76bf14be2..be9e55085a84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , , , or is null. + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . @@ -30,8 +44,12 @@ internal AcsChatThreadCreatedEventData() /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs index e0add658f568..b87ff68281e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -34,19 +34,11 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -78,10 +70,6 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -135,9 +123,9 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs index 21223daaa998..211bc5b72eee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedWithUserEventData() + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs index 5de0fd9805f3..810fb19a9d7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs index 3b9aa7a8b808..5969ce68e9b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs @@ -13,8 +13,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadDeletedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who deleted the thread. + /// , or is null. + internal AcsChatThreadDeletedEventData(string transactionId, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . @@ -24,8 +33,12 @@ internal AcsChatThreadDeletedEventData() /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. internal AcsChatThreadDeletedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs index 0583ea812be7..25b312e43764 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -22,8 +27,12 @@ internal AcsChatThreadEventInThreadBaseProperties() /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, DateTimeOffset? createTime, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreateTime = createTime; Version = version; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs index 65df3bd79497..76c268e870cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("participantCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs index c9abfa1a2fd4..8cd68cac7200 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadParticipantProperties { /// Initializes a new instance of . - internal AcsChatThreadParticipantProperties() + /// The communication identifier of the user. + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { + Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); + + ParticipantCommunicationIdentifier = participantCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 02475209a4cd..9513a660cb01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -33,10 +33,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -51,10 +47,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -72,10 +64,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -120,8 +108,8 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread version, editedByCommunicationIdentifier, editTime, - properties ?? new ChangeTrackingDictionary(), - metadata ?? new ChangeTrackingDictionary()); + properties, + metadata); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs index 5648d282b33e..edfc5c374b12 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,10 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// The thread metadata. + /// , , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); - Metadata = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; + Properties = properties; + Metadata = metadata; } /// Initializes a new instance of . @@ -29,8 +42,12 @@ internal AcsChatThreadPropertiesUpdatedEventData() /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; Properties = properties; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 85625ffe3d8b..83631ade6eb7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -34,10 +34,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -66,10 +62,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -132,7 +124,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha editedByCommunicationIdentifier, editTime, metadata ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary()); + properties); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index 4a892232df59..a7e3d37bab61 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -14,10 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedPerUserEventData() + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) { + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); + Properties = properties; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs index 45b84ede59ed..b161b90b0960 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs index 98ce51fb594b..53befac6b0fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadWithUserDeletedEventData() + /// The communication identifier of the user who deleted the thread. + /// is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) { + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bea560b58f4e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.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.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatTypingIndicatorReceivedInThreadEventDataConverter))] + public partial class AcsChatTypingIndicatorReceivedInThreadEventData + { + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatTypingIndicatorReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatTypingIndicatorReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatTypingIndicatorReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatTypingIndicatorReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..a425e3938e91 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread event. + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 699d625ddc06..614519d65a8e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv } if (property.NameEquals("deliveryStatusDetails"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs index 35a4b18f2f05..76ee86c48a15 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs @@ -13,8 +13,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsEmailDeliveryReportReceivedEventData { /// Initializes a new instance of . - internal AcsEmailDeliveryReportReceivedEventData() + /// The Sender Email Address. + /// The recipient Email Address. + /// The Internet Message Id of the email been sent. + /// Detailed information about the status if any. + /// , , or is null. + internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string internetMessageId, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails) { + Argument.AssertNotNull(sender, nameof(sender)); + Argument.AssertNotNull(recipient, nameof(recipient)); + Argument.AssertNotNull(internetMessageId, nameof(internetMessageId)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + + Sender = sender; + Recipient = recipient; + InternetMessageId = internetMessageId; + DeliveryStatusDetails = deliveryStatusDetails; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index a73e40942035..526a2be14367 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi { if (property.NameEquals("recordingStorageInfo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } recordingStorageInfo = AcsRecordingStorageInfoProperties.DeserializeAcsRecordingStorageInfoProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs index 99097128a203..9539b2cc74f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRecordingFileStatusUpdatedEventData { /// Initializes a new instance of . - internal AcsRecordingFileStatusUpdatedEventData() + /// The details of recording storage information. + /// is null. + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo) { + Argument.AssertNotNull(recordingStorageInfo, nameof(recordingStorageInfo)); + + RecordingStorageInfo = recordingStorageInfo; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs index f550f0cdb19d..3d50fc0ed7a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, note, dispositionCode); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs index d1a3f1dbc0e6..0127944158f3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCancelledEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCancelledEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCancelledEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs index da6e88a040d1..5495126ab9be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -57,10 +57,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -71,10 +67,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -104,8 +96,8 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, classificationPolicyId, errors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs index e5808f84949b..6a3d32115007 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassificationFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ErrorsInternal = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs index e5f641386a5d..8f3a9227820d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs @@ -77,10 +77,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -91,10 +87,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -124,8 +116,8 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, queueDetails, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs index 68edb7286203..f1f5f1bc63ca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassifiedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs index 6ee0f8a829f1..c15de98e74a1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs @@ -54,10 +54,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -68,10 +64,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -101,8 +93,8 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId, dispositionCode); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs index 7c07a79c1fa6..abaf8cab7d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClosedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClosedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClosedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs index 039f0fc7d09e..200b985e7f32 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs index c8f62735ce18..9df18d40daf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCompletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCompletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCompletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs index 8d513a015823..eba6896d3464 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs index 4958b5deb302..d276890907b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobDeletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobDeletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobDeletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs index 95ed38702f2e..bd699d9e86cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs index 225f5c98e994..a8212cc2cf97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,10 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobEventData : AcsRouterEventData { /// Initializes a new instance of . - internal AcsRouterJobEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Labels = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + + Labels = labels; + Tags = tags; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index 060ec74483a1..6afc0e609cbd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, ruleKey, exceptionRuleId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs index 0da91a332506..f8bc69ebbb53 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobExceptionTriggeredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobExceptionTriggeredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobExceptionTriggeredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs index e998b5b551a5..9bbc4f9ae55e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs @@ -76,10 +76,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -90,10 +86,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -123,8 +115,8 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, attachedWorkerSelectors ?? new ChangeTrackingList(), requestedWorkerSelectors ?? new ChangeTrackingList()); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs index 044eb47870f2..797c4cfd8d4e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobQueuedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); RequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs index a4f23d4ec7dc..f8fa64a54129 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs @@ -93,10 +93,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -107,10 +103,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -140,8 +132,8 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, jobStatus, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs index 13c6c91c8c64..c712d537cfe2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Unavailable For Matching for Router Job Received. - internal AcsRouterJobReceivedEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs index c8b8e96f4057..7d7c5e07956f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs index 4d8112a29709..5f400a1c0355 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs @@ -14,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobSchedulingFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs index 43af7a79bfdd..bce0dba3c9e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs index bffd65c3cbda..bcfc3db88d4a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobUnassignedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobUnassignedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobUnassignedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs index ac76ef097876..2ca035d25d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs index 63560d33256a..436bde258fb1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Router Job Waiting For Activation Unavailable For Matching. - internal AcsRouterJobWaitingForActivationEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 6fcb3dd32ab7..e778ac9ae112 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -66,10 +66,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -80,10 +76,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -113,8 +105,8 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), expiredAttachedWorkerSelectors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 386be9d0060b..3f0bc7c56977 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobWorkerSelectorsExpiredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 21c072e6265f..19f4af830866 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -43,10 +43,6 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR } if (property.NameEquals("deliveryAttempts"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -91,7 +87,7 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR to, deliveryStatus, deliveryStatusDetails, - deliveryAttempts ?? new ChangeTrackingList(), + deliveryAttempts, receivedTimestamp, tag); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs index ed1420496297..9f1914c177d7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,9 +15,25 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - internal AcsSmsDeliveryReportReceivedEventData() + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// Status of Delivery. + /// Details about Delivery Status. + /// List of details of delivery attempts made. + /// , , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IEnumerable deliveryAttempts) : base(messageId, @from, to) { - DeliveryAttempts = new ChangeTrackingList(); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(deliveryStatus, nameof(deliveryStatus)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = deliveryAttempts.ToList(); } /// Initializes a new instance of . @@ -28,8 +45,13 @@ internal AcsSmsDeliveryReportReceivedEventData() /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset? receivedTimestamp, string tag) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + DeliveryStatus = deliveryStatus; DeliveryStatusDetails = deliveryStatusDetails; DeliveryAttempts = deliveryAttempts; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs index 8608591a1983..db2f1cd35bac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs @@ -5,22 +5,24 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all SMS events. public partial class AcsSmsEventBaseProperties { - /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() - { - } - /// Initializes a new instance of . /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. internal AcsSmsEventBaseProperties(string messageId, string @from, string to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + MessageId = messageId; From = @from; To = to; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs index 5cb9b0a642af..99c42b1b4626 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs @@ -13,9 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// The SMS content. /// Number of segments in the message. - internal AcsSmsReceivedEventData(int segmentCount) + /// , , or is null. + internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; SegmentCount = segmentCount; } @@ -26,8 +37,13 @@ internal AcsSmsReceivedEventData(int segmentCount) /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, DateTimeOffset? receivedTimestamp, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Message = message; ReceivedTimestamp = receivedTimestamp; SegmentCount = segmentCount; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..a58e224054df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerClosedEventDataConverter))] + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..897cfa437c87 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..c8f409d55e6f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerOpenedEventDataConverter))] + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerOpenedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerOpenedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerOpenedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..a2e73568a90b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..78f35106bf1d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties + { + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"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, property0.Value.GetObject()); + } + } + rules = dictionary; + continue; + } + } + return new ApiManagementCircuitBreakerProperties(rules ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..0aebae96e81b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerProperties() + { + Rules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Rules = rules; + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..2845e4321078 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiredAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..d6a2f1a4f92e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// Initializes a new instance of . + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..514405425e94 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties + { + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + } + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..2dda56e1690e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayProperties() + { + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..0ed20221e377 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenExpiredEventDataConverter))] + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..99ce9f9f3bfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway, ApiManagementExpiredGatewayTokenProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..842e50b94cde --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenNearExpiryEventDataConverter))] + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementGatewayTokenNearExpiryProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementGatewayTokenNearExpiryProperties.DeserializeApiManagementGatewayTokenNearExpiryProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenNearExpiryEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenNearExpiryEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenNearExpiryEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..abc56161ade8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway, ApiManagementGatewayTokenNearExpiryProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public ApiManagementGatewayTokenNearExpiryProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs new file mode 100644 index 000000000000..5169abd95612 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal static ApiManagementGatewayTokenNearExpiryProperties DeserializeApiManagementGatewayTokenNearExpiryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiresAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiresAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryProperties(expiresAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs new file mode 100644 index 000000000000..7c6084b3a12d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..c553e1b9cf6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(EdgeSolutionVersionPublishedEventDataConverter))] + public partial class EdgeSolutionVersionPublishedEventData + { + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + internal partial class EdgeSolutionVersionPublishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, EdgeSolutionVersionPublishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override EdgeSolutionVersionPublishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..12a8779da578 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index b12e339e22f2..5ccb08e064a2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,7 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/8af03db33a90581edffb8a32fea562f36b7c61a8/specification/eventgrid/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/90041e31d04e686567849f27d8641a5d61110508/specification/eventgrid/data-plane/readme.md generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset @@ -185,6 +185,14 @@ directive: { $[path]["properties"]["completionStatus"]["x-namespace"] = namespace; } + if (path.includes("AcsCallEndedByProperties")) + { + $[path]["properties"]["type"]["x-namespace"] = namespace; + } + if (path.includes("AcsCallParticipantProperties")) + { + $[path]["properties"]["role"]["x-namespace"] = namespace; + } } ``` diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.Serialization.cs index 031ca52c33cd..238ed2342163 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/CaCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class CaCertificateResource : IJsonModel { + private static CaCertificateData s_dataDeserializationInstance; + private static CaCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CaCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CaCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); CaCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.Serialization.cs index ea49c4906285..984716d6c450 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class DomainEventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.Serialization.cs index e10f472e7ffd..1136e5b6d5c0 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class DomainTopicEventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.Serialization.cs index 8534b2344432..3a53f6df53c4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/DomainTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class DomainTopicResource : IJsonModel { + private static DomainTopicData s_dataDeserializationInstance; + private static DomainTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DomainTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DomainTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); DomainTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.Serialization.cs index 2877ebfaf150..90562f068629 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridDomainPrivateEndpointConnectionResource : IJsonModel { + private static EventGridPrivateEndpointConnectionData s_dataDeserializationInstance; + private static EventGridPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.Serialization.cs index 2d12d35e3ce6..e7a8256ee4f4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridDomainPrivateLinkResource : IJsonModel { + private static EventGridPrivateLinkResourceData s_dataDeserializationInstance; + private static EventGridPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.Serialization.cs index 84ee67bd3f41..e2d17ab24874 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridDomainResource : IJsonModel { + private static EventGridDomainData s_dataDeserializationInstance; + private static EventGridDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.Serialization.cs index fb9071cdb3ea..1df141f95805 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridNamespaceClientGroupResource : IJsonModel { + private static EventGridNamespaceClientGroupData s_dataDeserializationInstance; + private static EventGridNamespaceClientGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridNamespaceClientGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridNamespaceClientGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridNamespaceClientGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.Serialization.cs index cfeb2df632f2..8d9e815098b2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceClientResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridNamespaceClientResource : IJsonModel { + private static EventGridNamespaceClientData s_dataDeserializationInstance; + private static EventGridNamespaceClientData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridNamespaceClientData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridNamespaceClientData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridNamespaceClientData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.Serialization.cs index b6285accf458..87d593ddbd8c 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespacePermissionBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridNamespacePermissionBindingResource : IJsonModel { + private static EventGridNamespacePermissionBindingData s_dataDeserializationInstance; + private static EventGridNamespacePermissionBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridNamespacePermissionBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridNamespacePermissionBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridNamespacePermissionBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.Serialization.cs index 6fbb60123f64..3452c98a0984 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridNamespaceResource : IJsonModel { + private static EventGridNamespaceData s_dataDeserializationInstance; + private static EventGridNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.Serialization.cs index 641ec78ee805..b7c71a1d13f4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridPartnerNamespacePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridPartnerNamespacePrivateEndpointConnectionResource : IJsonModel { + private static EventGridPrivateEndpointConnectionData s_dataDeserializationInstance; + private static EventGridPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.Serialization.cs index 485544054da8..1db808f360dc 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridTopicPrivateEndpointConnectionResource : IJsonModel { + private static EventGridPrivateEndpointConnectionData s_dataDeserializationInstance; + private static EventGridPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.Serialization.cs index 6d6a74925b90..71038bbcc817 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridTopicPrivateLinkResource : IJsonModel { + private static EventGridPrivateLinkResourceData s_dataDeserializationInstance; + private static EventGridPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.Serialization.cs index c81d3f227d01..05e96d5639ac 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventGridTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventGridTopicResource : IJsonModel { + private static EventGridTopicData s_dataDeserializationInstance; + private static EventGridTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.Serialization.cs index 165ccaab396c..847b4676cc94 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/EventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class EventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.Serialization.cs index 8e19a90042ad..8575a2ffa70b 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/ExtensionTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class ExtensionTopicResource : IJsonModel { + private static ExtensionTopicData s_dataDeserializationInstance; + private static ExtensionTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtensionTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtensionTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); ExtensionTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.Serialization.cs index b46eab215a3d..b6215fc71abd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class NamespaceTopicEventSubscriptionResource : IJsonModel { + private static NamespaceTopicEventSubscriptionData s_dataDeserializationInstance; + private static NamespaceTopicEventSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NamespaceTopicEventSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NamespaceTopicEventSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); NamespaceTopicEventSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.Serialization.cs index abad0759e5c4..28f63d55399d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/NamespaceTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class NamespaceTopicResource : IJsonModel { + private static NamespaceTopicData s_dataDeserializationInstance; + private static NamespaceTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NamespaceTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NamespaceTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); NamespaceTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.Serialization.cs index f3a9fe7f926c..62d9ed61c3c9 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerConfigurationResource : IJsonModel { + private static PartnerConfigurationData s_dataDeserializationInstance; + private static PartnerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); PartnerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.Serialization.cs index a54a3a88dc24..05e6210453cd 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceChannelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerNamespaceChannelResource : IJsonModel { + private static PartnerNamespaceChannelData s_dataDeserializationInstance; + private static PartnerNamespaceChannelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerNamespaceChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerNamespaceChannelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); PartnerNamespaceChannelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.Serialization.cs index 6ec974f64e40..d852fb13f007 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespacePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerNamespacePrivateLinkResource : IJsonModel { + private static EventGridPrivateLinkResourceData s_dataDeserializationInstance; + private static EventGridPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.Serialization.cs index b0ab4a81090f..d6d2bf367d61 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerNamespaceResource : IJsonModel { + private static PartnerNamespaceData s_dataDeserializationInstance; + private static PartnerNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); PartnerNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.Serialization.cs index 0d4e0ebddc65..7b522546aa85 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerRegistrationResource : IJsonModel { + private static PartnerRegistrationData s_dataDeserializationInstance; + private static PartnerRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); PartnerRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.Serialization.cs index 3c9e3186a769..4397d89e9da8 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerTopicEventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.Serialization.cs index 45a210201144..334bad04cb6d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/PartnerTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class PartnerTopicResource : IJsonModel { + private static PartnerTopicData s_dataDeserializationInstance; + private static PartnerTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); PartnerTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.Serialization.cs index 36f2e5cbb180..3160766ebec2 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class SystemTopicEventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.Serialization.cs index 32af161365dc..14d5e2a49221 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/SystemTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class SystemTopicResource : IJsonModel { + private static SystemTopicData s_dataDeserializationInstance; + private static SystemTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SystemTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SystemTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); SystemTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.Serialization.cs index 4e01ab4c4984..8c6bd0ffb3e4 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicEventSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class TopicEventSubscriptionResource : IJsonModel { + private static EventGridSubscriptionData s_dataDeserializationInstance; + private static EventGridSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventGridSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); EventGridSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.Serialization.cs index 806005234f85..a41d97cc570d 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicSpaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class TopicSpaceResource : IJsonModel { + private static TopicSpaceData s_dataDeserializationInstance; + private static TopicSpaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TopicSpaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TopicSpaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); TopicSpaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.Serialization.cs index 700262355293..165f5aa35835 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/TopicTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class TopicTypeResource : IJsonModel { + private static TopicTypeData s_dataDeserializationInstance; + private static TopicTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TopicTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TopicTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); TopicTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.Serialization.cs b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.Serialization.cs index f42507b68e86..1bfaaccd1771 100644 --- a/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.Serialization.cs +++ b/sdk/eventgrid/Azure.ResourceManager.EventGrid/src/Generated/VerifiedPartnerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventGrid { public partial class VerifiedPartnerResource : IJsonModel { + private static VerifiedPartnerData s_dataDeserializationInstance; + private static VerifiedPartnerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VerifiedPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VerifiedPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventGridContext.Default); VerifiedPartnerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventGridContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md index 08df2ac94833..bb1240a116f8 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/CHANGELOG.md @@ -8,8 +8,12 @@ ### Bugs Fixed +- Fixed a bug where the data types of broker-owned properties were being adjusted when an event was read by the client, causing the underlying AMQP data to be mutated. This resulted in binary changes when the AMQP message was serialized and unintentionally altered the service contract. Going forward, the original data types will be preserved on the AMQP representation of the message and type normalization only applied to the .NET `EventData` projection. + ### Other Changes +- Updated the `Microsoft.Azure.Amqp` dependency to 2.6.11, which contains several bug fixes. _(see: [commits](https://github.com/Azure/azure-amqp/commits/hotfix/))_ + ## 5.12.1 (2025-04-09) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Azure.Messaging.EventHubs.Processor.Tests.csproj b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Azure.Messaging.EventHubs.Processor.Tests.csproj index d565a3efe809..91b2ebab24a5 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Azure.Messaging.EventHubs.Processor.Tests.csproj +++ b/sdk/eventhub/Azure.Messaging.EventHubs.Processor/tests/Azure.Messaging.EventHubs.Processor.Tests.csproj @@ -15,7 +15,6 @@ - diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md index f01468e28716..c42d7034b1ca 100755 --- a/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md @@ -2,14 +2,26 @@ ## 5.13.0-beta.1 (Unreleased) +### Acknowledgments + +Thank you to our developer community members who helped to make the Event Hubs client libraries better with their contributions to this release: + +- Daniel Marbach _([GitHub](https://github.com/danielmarbach))_ + ### Features Added ### Breaking Changes ### Bugs Fixed +- Fixed a bug where the data types of broker-owned properties were being adjusted when an event was read by the client, causing the underlying AMQP data to be mutated. This resulted in binary changes when the AMQP message was serialized and unintentionally altered the service contract. Going forward, the original data types will be preserved on the AMQP representation of the message and type normalization only applied to the .NET `EventData` projection. + ### Other Changes +- Updated the `Microsoft.Azure.Amqp` dependency to 2.6.11, which contains several bug fixes. _(see: [commits](https://github.com/Azure/azure-amqp/commits/hotfix/))_ + +- Improved the performance of the Jenkins3 hash computation used for partition key resolution. Across various input sizes, the updated implementation achieves up to 39% faster hash calculation, with the most notable gains seen for smaller keys (8–32 bytes), and consistent improvements across all sizes. The new approach maintains the exact bit-for-bit hash output while reducing overhead. _(A community contribution, courtesy of [danielmarbach](https://github.com/danielmarbach))_ + ## 5.12.1 (2025-04-09) ### Bugs Fixed diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpAnnotatedMessageExtensions.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpAnnotatedMessageExtensions.cs index cd64f1480e62..879ad7b4b618 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpAnnotatedMessageExtensions.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpAnnotatedMessageExtensions.cs @@ -173,7 +173,13 @@ public static long GetSequenceNumber(this AmqpAnnotatedMessage instance, if ((instance.HasSection(AmqpMessageSection.MessageAnnotations)) && (instance.MessageAnnotations.TryGetValue(AmqpProperty.SequenceNumber.ToString(), out var value))) { - return (long)value; + return value switch + { + string stringValue when long.TryParse(stringValue, NumberStyles.Integer, CultureInfo.InvariantCulture, out var longValue) => longValue, + long longValue => longValue, + int intValue => intValue, + _ => (long)value + }; } return defaultValue; @@ -215,7 +221,13 @@ public static DateTimeOffset GetEnqueuedTime(this AmqpAnnotatedMessage instance, if ((instance.HasSection(AmqpMessageSection.MessageAnnotations)) && (instance.MessageAnnotations.TryGetValue(AmqpProperty.EnqueuedTime.ToString(), out var value))) { - return (DateTimeOffset)value; + return value switch + { + DateTime dateValue => new DateTimeOffset(dateValue, TimeSpan.Zero), + long longValue => new DateTimeOffset(longValue, TimeSpan.Zero), + DateTimeOffset dateTimeOffsetValue => dateTimeOffsetValue, + _ => (DateTimeOffset)value + }; } return defaultValue; @@ -231,7 +243,7 @@ public static DateTimeOffset GetEnqueuedTime(this AmqpAnnotatedMessage instance, public static void SetEnqueuedTime(this AmqpAnnotatedMessage instance, DateTimeOffset enqueueTime) { - instance.MessageAnnotations[AmqpProperty.EnqueuedTime.ToString()] = enqueueTime; + instance.MessageAnnotations[AmqpProperty.EnqueuedTime.ToString()] = enqueueTime.UtcDateTime; } /// @@ -283,7 +295,12 @@ public static void SetPartitionKey(this AmqpAnnotatedMessage instance, if ((instance.HasSection(AmqpMessageSection.DeliveryAnnotations)) && (instance.DeliveryAnnotations.TryGetValue(AmqpProperty.PartitionLastEnqueuedSequenceNumber.ToString(), out var value))) { - return (long)value; + return value switch + { + string stringValue when long.TryParse(stringValue, NumberStyles.Integer, CultureInfo.InvariantCulture, out var longValue) => longValue, + long longValue => longValue, + _ => (long)value + }; } return defaultValue; @@ -299,7 +316,7 @@ public static void SetPartitionKey(this AmqpAnnotatedMessage instance, /// The offset of the last event published to the partition, if represented in the ; otherwise, . /// public static string GetLastPartitionOffset(this AmqpAnnotatedMessage instance, - string defaultValue = default) + string defaultValue = default) { if ((instance.HasSection(AmqpMessageSection.DeliveryAnnotations)) && (instance.DeliveryAnnotations.TryGetValue(AmqpProperty.PartitionLastEnqueuedOffset.ToString(), out var value))) @@ -325,7 +342,13 @@ public static string GetLastPartitionOffset(this AmqpAnnotatedMessage instance, if ((instance.HasSection(AmqpMessageSection.DeliveryAnnotations)) && (instance.DeliveryAnnotations.TryGetValue(AmqpProperty.PartitionLastEnqueuedTimeUtc.ToString(), out var value))) { - return (DateTimeOffset)value; + return value switch + { + DateTime dateValue => new DateTimeOffset(dateValue, TimeSpan.Zero), + long longValue => new DateTimeOffset(longValue, TimeSpan.Zero), + DateTimeOffset dateTimeOffsetValue => dateTimeOffsetValue, + _ => (DateTimeOffset)value + }; } return defaultValue; @@ -346,12 +369,50 @@ public static string GetLastPartitionOffset(this AmqpAnnotatedMessage instance, if ((instance.HasSection(AmqpMessageSection.DeliveryAnnotations)) && (instance.DeliveryAnnotations.TryGetValue(AmqpProperty.LastPartitionPropertiesRetrievalTimeUtc.ToString(), out var value))) { - return (DateTimeOffset)value; + return value switch + { + DateTime dateValue => new DateTimeOffset(dateValue, TimeSpan.Zero), + long longValue => new DateTimeOffset(longValue, TimeSpan.Zero), + DateTimeOffset dateTimeOffsetValue => dateTimeOffsetValue, + _ => (DateTimeOffset)value + }; } return defaultValue; } + /// + /// Retrieves the value for a specific message annotation of an + /// in normalized form. + /// + /// + /// The instance that this method was invoked on. + /// The key of the message annotation value to retrieve. + /// + /// The normalized value for the specified , if present in the ; otherwise, the default value for the key. + /// + public static object GetMessageAnnotationNormalizedValue(this AmqpAnnotatedMessage instance, + string key) + { + if (!instance.HasSection(AmqpMessageSection.MessageAnnotations)) + { + return null; + } + + return key switch + { + _ when key == AmqpProperty.EnqueuedTime.ToString() => GetEnqueuedTime(instance, default), + _ when key == AmqpProperty.SequenceNumber.ToString() => GetSequenceNumber(instance, default), + _ when instance.MessageAnnotations.TryGetValue(key, out var value) => value switch + { + AmqpMessageId id => id.ToString(), + AmqpAddress address => address.ToString(), + _ => value + }, + _ => null + }; + } + /// /// Clones the body of an . /// diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpMessageConverter.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpMessageConverter.cs index d6c879b296a1..16cdee9eb71a 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpMessageConverter.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpMessageConverter.cs @@ -5,12 +5,8 @@ using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Runtime.InteropServices; -using System.Runtime.Serialization; using Azure.Core; -using Azure.Core.Amqp; using Azure.Core.Amqp.Shared; -using Azure.Messaging.EventHubs.Diagnostics; using Microsoft.Azure.Amqp; using Microsoft.Azure.Amqp.Encoding; using Microsoft.Azure.Amqp.Framing; @@ -27,21 +23,6 @@ internal class AmqpMessageConverter /// The size, in bytes, to use as a buffer for stream operations. private const int StreamBufferSizeInBytes = 512; - /// The set of key names for annotations known to be DateTime-based system properties. - private static readonly HashSet SystemPropertyDateTimeKeys = new() - { - AmqpProperty.EnqueuedTime.ToString(), - AmqpProperty.PartitionLastEnqueuedTimeUtc.ToString(), - AmqpProperty.LastPartitionPropertiesRetrievalTimeUtc.ToString() - }; - - /// The set of key names for annotations known to be long-based system properties. - private static readonly HashSet SystemPropertyLongKeys = new() - { - AmqpProperty.SequenceNumber.ToString(), - AmqpProperty.PartitionLastEnqueuedSequenceNumber.ToString(), - }; - /// /// Converts a given source into its corresponding /// AMQP representation. @@ -123,7 +104,7 @@ public virtual AmqpMessage CreateBatchFromMessages(IReadOnlyCollection @@ -413,72 +394,6 @@ private static AmqpMessage BuildAmqpMessageFromEvent(EventData source, return message; } - /// - /// Builds an from an . - /// - /// - /// The message to use as the source of the event. - /// - /// The constructed from the source message. - /// - private static EventData BuildEventFromAmqpMessage(AmqpMessage source) - { - var message = AmqpAnnotatedMessageConverter.FromAmqpMessage(source); - - // Message Annotations - special handling for Event Hub service annotations - - if ((source.Sections & SectionFlag.MessageAnnotations) > 0) - { - NormalizeBrokerProperties(message.MessageAnnotations, source.MessageAnnotations.Map); - } - - // Delivery Annotations - special handling for Event Hub service annotations - - if ((source.Sections & SectionFlag.DeliveryAnnotations) > 0) - { - NormalizeBrokerProperties(message.DeliveryAnnotations, source.DeliveryAnnotations.Map); - } - - return new EventData(message); - } - - /// - /// Normalizes the broker-owned properties of an event. - /// - /// - /// The properties to normalize. - /// The source properties from the AMQP message. - /// - private static void NormalizeBrokerProperties(IDictionary properties, - Annotations sourceProperties) - { - foreach (var pair in sourceProperties) - { - string keyString = pair.Key.ToString(); - if (SystemPropertyDateTimeKeys.Contains(keyString)) - { - properties[keyString] = - pair.Value switch - { - DateTime dateValue => new DateTimeOffset(dateValue, TimeSpan.Zero), - long longValue => new DateTimeOffset(longValue, TimeSpan.Zero), - _ => pair.Value - }; - } - else if (SystemPropertyLongKeys.Contains(keyString)) - { - properties[keyString] = - pair.Value switch - { - string stringValue when long.TryParse(stringValue, NumberStyles.Integer, CultureInfo.InvariantCulture, - out var longValue) => - longValue, - _ => pair.Value - }; - } - } - } - /// /// Conditionally applies the set of properties associated with message /// publishing, if values were provided. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpSystemProperties.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpSystemProperties.cs index e00b368ace9e..3adbb8788b98 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpSystemProperties.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpSystemProperties.cs @@ -1,6 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System; using System.Collections; using System.Collections.Generic; using System.Globalization; @@ -25,8 +26,8 @@ namespace Azure.Messaging.EventHubs.Amqp internal class AmqpSystemProperties : IReadOnlyDictionary { /// The set of system properties that are sourced from the Properties section of the . - private static readonly string[] PropertySectionNames = new[] - { + private static readonly string[] PropertySectionNames = + [ Properties.MessageIdName, Properties.UserIdName, Properties.ToName, @@ -40,7 +41,7 @@ internal class AmqpSystemProperties : IReadOnlyDictionary Properties.GroupIdName, Properties.GroupSequenceName, Properties.ReplyToGroupIdName - }; + ]; /// The AMQP message to use as the source for the system properties data. private readonly AmqpAnnotatedMessage _amqpMessage; @@ -130,12 +131,15 @@ public object this[string key] if (_amqpMessage.HasSection(AmqpMessageSection.MessageAnnotations)) { - return _amqpMessage.MessageAnnotations[key] switch + var annotationValue = _amqpMessage.GetMessageAnnotationNormalizedValue(key); + + // If the value came back as null, only return it if the key exists. Otherwise, allow + // the KeyNotFoundException to be thrown. + + if ((annotationValue != null) || (_amqpMessage.MessageAnnotations.ContainsKey(key))) { - AmqpMessageId id => id.ToString(), - AmqpAddress address => address.ToString(), - object value => value - }; + return annotationValue; + } } // If no section was available to delegate to, mimic the behavior of the standard dictionary implementation. @@ -196,7 +200,7 @@ public IEnumerable Values { foreach (var name in _amqpMessage.MessageAnnotations.Keys) { - yield return _amqpMessage.MessageAnnotations[name]; + yield return _amqpMessage.GetMessageAnnotationNormalizedValue(name); } } } diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/PartitionResolver.cs b/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/PartitionResolver.cs index f3fc8af3b03e..e706339508b0 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/PartitionResolver.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/src/Core/PartitionResolver.cs @@ -5,6 +5,7 @@ using System.Buffers; using System.Buffers.Binary; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Text; using System.Threading; @@ -149,17 +150,31 @@ private static void ComputeHash(ReadOnlySpan data, out uint hash1, out uint hash2) { - uint a, b, c; + uint len = (uint)data.Length; + uint a = 0xDEADBEEF + len + seed1; + uint b = a; + uint c = a + seed2; - a = b = c = (uint)(0xdeadbeef + data.Length + seed1); - c += seed2; + int chunks = data.Length > 12 ? (data.Length - 1) / 12 : 0; - int index = 0, size = data.Length; - while (size > 12) + ref byte ptr = ref MemoryMarshal.GetReference(data); + for (int i = 0; i < chunks; i++) { - a += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index)); - b += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index + 4)); - c += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index + 8)); + uint w0 = Unsafe.ReadUnaligned(ref ptr); + uint w1 = Unsafe.ReadUnaligned(ref Unsafe.Add(ref ptr, 4)); + uint w2 = Unsafe.ReadUnaligned(ref Unsafe.Add(ref ptr, 8)); + ptr = ref Unsafe.Add(ref ptr, 12); + + if (!BitConverter.IsLittleEndian) + { + w0 = BinaryPrimitives.ReverseEndianness(w0); + w1 = BinaryPrimitives.ReverseEndianness(w1); + w2 = BinaryPrimitives.ReverseEndianness(w2); + } + + a += w0; + b += w1; + c += w2; a -= c; a ^= (c << 4) | (c >> 28); @@ -184,51 +199,51 @@ private static void ComputeHash(ReadOnlySpan data, c -= b; c ^= (b << 4) | (b >> 28); b += a; - - index += 12; - size -= 12; } - switch (size) + int consumed = chunks * 12; + ref byte tail = ref Unsafe.Add(ref MemoryMarshal.GetReference(data), consumed); + int left = data.Length - consumed; + switch (left) { case 12: - a += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index)); - b += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index + 4)); - c += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index + 8)); + a += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref tail) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref tail)); + b += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 4)) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 4))); + c += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 8)) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 8))); break; case 11: - c += ((uint)data[index + 10]) << 16; + c += (uint)Unsafe.Add(ref tail, 10) << 16; goto case 10; case 10: - c += ((uint)data[index + 9]) << 8; + c += (uint)Unsafe.Add(ref tail, 9) << 8; goto case 9; case 9: - c += (uint)data[index + 8]; + c += Unsafe.Add(ref tail, 8); goto case 8; case 8: - b += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index + 4)); - a += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index)); + b += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 4)) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref Unsafe.Add(ref tail, 4))); + a += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref tail) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref tail)); break; case 7: - b += ((uint)data[index + 6]) << 16; + b += (uint)Unsafe.Add(ref tail, 6) << 16; goto case 6; case 6: - b += ((uint)data[index + 5]) << 8; + b += (uint)Unsafe.Add(ref tail, 5) << 8; goto case 5; case 5: - b += (uint)data[index + 4]; + b += Unsafe.Add(ref tail, 4); goto case 4; case 4: - a += BinaryPrimitives.ReadUInt32LittleEndian(data.Slice(index)); + a += BitConverter.IsLittleEndian ? Unsafe.ReadUnaligned(ref tail) : BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref tail)); break; case 3: - a += ((uint)data[index + 2]) << 16; + a += (uint)Unsafe.Add(ref tail, 2) << 16; goto case 2; case 2: - a += ((uint)data[index + 1]) << 8; + a += (uint)Unsafe.Add(ref tail, 1) << 8; goto case 1; case 1: - a += (uint)data[index]; + a += Unsafe.Add(ref tail, 0); break; case 0: hash1 = c; diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpAnnotatedMessageExtensionsTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpAnnotatedMessageExtensionsTests.cs index 8dc0d83bd445..e7762115a14d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpAnnotatedMessageExtensionsTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpAnnotatedMessageExtensionsTests.cs @@ -434,6 +434,121 @@ public void EnqueueTimeCanBeSet() Assert.That(message.GetEnqueuedTime(), Is.EqualTo(enqueueTime), "The enqueue time should match."); } + /// + /// Verifies functionality of the + /// method. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueReturnsNullWhenNoAnnotations() + { + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + var value = message.GetMessageAnnotationNormalizedValue("anyKey"); + Assert.That(value, Is.Null, "A missing annotation section should return null."); + } + + /// + /// Verifies functionality of the + /// method for enqueued time normalization. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueNormalizesEnqueuedTime() + { + var key = AmqpProperty.EnqueuedTime.ToString(); + var expected = new DateTimeOffset(2024, 5, 19, 12, 0, 0, TimeSpan.Zero); + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add(key, expected.UtcDateTime); + + var value = message.GetMessageAnnotationNormalizedValue(key); + Assert.That(value, Is.EqualTo(expected), "The enqueued time should be normalized to DateTimeOffset."); + } + + /// + /// Verifies functionality of the + /// method for sequence number normalization. + /// + /// + [Test] + [TestCase(42, 42L)] + [TestCase(12345L, 12345L)] + [TestCase("12345", 12345L)] + public void GetMessageAnnotationNormalizedValueNormalizesSequenceNumber(object input, + long expected) + { + var key = AmqpProperty.SequenceNumber.ToString(); + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add(key, input); + + var value = message.GetMessageAnnotationNormalizedValue(key); + Assert.That(value, Is.EqualTo(expected), "The sequence number should be normalized to long."); + } + + /// + /// Verifies functionality of the + /// method for AmqpMessageId normalization. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueNormalizesAmqpMessageId() + { + var key = "customId"; + var id = new AmqpMessageId("id-123"); + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add(key, id); + + var value = message.GetMessageAnnotationNormalizedValue(key); + Assert.That(value, Is.EqualTo(id.ToString()), "The AmqpMessageId should be normalized to string."); + } + + /// + /// Verifies functionality of the + /// method for AmqpAddress normalization. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueNormalizesAmqpAddress() + { + var key = "customAddress"; + var address = new AmqpAddress("amqps://test"); + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add(key, address); + + var value = message.GetMessageAnnotationNormalizedValue(key); + Assert.That(value, Is.EqualTo(address.ToString()), "The AmqpAddress should be normalized to string."); + } + + /// + /// Verifies functionality of the + /// method for pass through of other types. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueReturnsRawValueForOtherTypes() + { + var key = "customInt"; + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add(key, 42); + + var value = message.GetMessageAnnotationNormalizedValue(key); + Assert.That(value, Is.EqualTo(42), "Other types should be returned as-is."); + } + + /// + /// Verifies functionality of the + /// method when the key is not present. + /// + /// + [Test] + public void GetMessageAnnotationNormalizedValueReturnsNullWhenKeyNotPresent() + { + var message = new AmqpAnnotatedMessage(AmqpMessageBody.FromData([ReadOnlyMemory.Empty])); + message.MessageAnnotations.Add("someKey", "someValue"); + + var value = message.GetMessageAnnotationNormalizedValue("otherKey"); + Assert.That(value, Is.Null, "A missing key should return null."); + } + /// /// Creates a fully populated message with a consistent set of /// test data. diff --git a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpSystemPropertiesTests.cs b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpSystemPropertiesTests.cs index 1005d5187fdc..fe475e92a90d 100644 --- a/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpSystemPropertiesTests.cs +++ b/sdk/eventhub/Azure.Messaging.EventHubs/tests/Amqp/AmqpSystemPropertiesTests.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; +using System.Linq; using Azure.Core.Amqp; using Azure.Messaging.EventHubs.Amqp; using Microsoft.Azure.Amqp; @@ -209,6 +210,69 @@ public void ValueOperationsWorkWhenNotEmpty() } } + /// + /// Validates basic dictionary operation for the normalized enqueue time. + /// + /// + [Test] + public void ValueOperationsNormalizeEnqueuedTime() + { + var message = CreateEmptydDataBodyMessage(); + var systemKey = AmqpProperty.EnqueuedTime.ToString(); + + var systemProps = new AmqpSystemProperties(message); + message.MessageAnnotations.Add(systemKey, new DateTime(2015, 10, 15, 0, 0, 0)); + + var expectedValue = message.GetEnqueuedTime(default); + + Assert.That(systemProps[systemKey], Is.EqualTo(expectedValue), "The enqueued time did not match when read through the indexer."); + Assert.That(systemProps.TryGetValue(systemKey, out var enqueueTime), Is.True, "The enqueued time was not contained when read through TryGetValue."); + Assert.That(enqueueTime, Is.EqualTo(expectedValue), "The enqueued time did not match when read through TryGetValue."); + + // Message annotation values are correct. + + var key = systemProps.Keys.Single(); + Assert.That(key, Is.EqualTo(systemKey), "The key should be the same as the enqueued time key."); + Assert.That(systemProps[key], Is.EqualTo(expectedValue), $"The message annotation, {key}, did not match when read through the indexer."); + + // Value set should contain the enqueued time. + + Assert.That(systemProps.Values.Single(), Is.EqualTo(expectedValue), "The enqueued time did not match when read through the Values set."); + } + + /// + /// Validates basic dictionary operation for the normalized sequence number. + /// + /// + [Test] + [TestCase(12345)] + [TestCase(12345L)] + [TestCase("12345")] + public void ValueOperationsNormalizeSequenceNumber(object sequenceSource) + { + var message = CreateEmptydDataBodyMessage(); + var systemKey = AmqpProperty.SequenceNumber.ToString(); + + var systemProps = new AmqpSystemProperties(message); + message.MessageAnnotations.Add(systemKey, sequenceSource); + + var expectedValue = message.GetSequenceNumber(default); + + Assert.That(systemProps[systemKey], Is.EqualTo(expectedValue), "The sequence number did not match when read through the indexer."); + Assert.That(systemProps.TryGetValue(systemKey, out var enqueueTime), Is.True, "The sequence number was not contained when read through TryGetValue."); + Assert.That(enqueueTime, Is.EqualTo(expectedValue), "The sequence number did not match when read through TryGetValue."); + + // Message annotation values are correct. + + var key = systemProps.Keys.Single(); + Assert.That(key, Is.EqualTo(systemKey), "The key should be the same as the sequence number key."); + Assert.That(systemProps[key], Is.EqualTo(expectedValue), $"The message annotation, {key}, did not match when read through the indexer."); + + // Value set should contain the sequence number. + + Assert.That(systemProps.Values.Single(), Is.EqualTo(expectedValue), "The sequence number did not match when read through the Values set."); + } + /// /// Validates basic dictionary operations. /// diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubAuthorizationRuleResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubAuthorizationRuleResource.Serialization.cs index ecc756518445..ccbff362521f 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubAuthorizationRuleResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubAuthorizationRuleResource : IJsonModel { + private static EventHubsAuthorizationRuleData s_dataDeserializationInstance; + private static EventHubsAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubResource.Serialization.cs index e8c58834a810..ae38f03e9b8b 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubResource : IJsonModel { + private static EventHubData s_dataDeserializationInstance; + private static EventHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupResource.Serialization.cs index d11f6c40b1ad..fbb445cf6c5e 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsApplicationGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsApplicationGroupResource : IJsonModel { + private static EventHubsApplicationGroupData s_dataDeserializationInstance; + private static EventHubsApplicationGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsApplicationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsApplicationGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsApplicationGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterResource.Serialization.cs index 3d0135764d23..6fdbcc6a0b50 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsClusterResource : IJsonModel { + private static EventHubsClusterData s_dataDeserializationInstance; + private static EventHubsClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupResource.Serialization.cs index d43a56cb9641..3c823e0c98e1 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsConsumerGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsConsumerGroupResource : IJsonModel { + private static EventHubsConsumerGroupData s_dataDeserializationInstance; + private static EventHubsConsumerGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsConsumerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsConsumerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsConsumerGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryAuthorizationRuleResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryAuthorizationRuleResource.Serialization.cs index 935a83de0367..6572e4c3fae1 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryAuthorizationRuleResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsDisasterRecoveryAuthorizationRuleResource : IJsonModel { + private static EventHubsAuthorizationRuleData s_dataDeserializationInstance; + private static EventHubsAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryResource.Serialization.cs index 6f71ce523928..791533b0978f 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsDisasterRecoveryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsDisasterRecoveryResource : IJsonModel { + private static EventHubsDisasterRecoveryData s_dataDeserializationInstance; + private static EventHubsDisasterRecoveryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsDisasterRecoveryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsDisasterRecoveryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsDisasterRecoveryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRuleResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRuleResource.Serialization.cs index 872cb1036622..279700963b51 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRuleResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsNamespaceAuthorizationRuleResource : IJsonModel { + private static EventHubsAuthorizationRuleData s_dataDeserializationInstance; + private static EventHubsAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceResource.Serialization.cs index 940d96533bcf..9d6c7ff34b7d 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsNamespaceResource : IJsonModel { + private static EventHubsNamespaceData s_dataDeserializationInstance; + private static EventHubsNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetResource.Serialization.cs index bcc0a00654d5..6a40759101d6 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsNetworkRuleSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsNetworkRuleSetResource : IJsonModel { + private static EventHubsNetworkRuleSetData s_dataDeserializationInstance; + private static EventHubsNetworkRuleSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsNetworkRuleSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionResource.Serialization.cs index b38afc99cd19..13897b088073 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsPrivateEndpointConnectionResource : IJsonModel { + private static EventHubsPrivateEndpointConnectionData s_dataDeserializationInstance; + private static EventHubsPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupResource.Serialization.cs b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupResource.Serialization.cs index 421b4264b14a..758d138590cf 100644 --- a/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupResource.Serialization.cs +++ b/sdk/eventhub/Azure.ResourceManager.EventHubs/src/Generated/EventHubsSchemaGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EventHubs { public partial class EventHubsSchemaGroupResource : IJsonModel { + private static EventHubsSchemaGroupData s_dataDeserializationInstance; + private static EventHubsSchemaGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubsSchemaGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubsSchemaGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEventHubsContext.Default); EventHubsSchemaGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEventHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md index 27aa822f8593..1942038e0c97 100644 --- a/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md +++ b/sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/CHANGELOG.md @@ -8,8 +8,12 @@ ### Bugs Fixed +- Fixed a bug where the data types of broker-owned properties were being adjusted when an event was read by the client, causing the underlying AMQP data to be mutated. This resulted in binary changes when the AMQP message was serialized and unintentionally altered the service contract. Going forward, the original data types will be preserved on the AMQP representation of the message and type normalization only applied to the .NET `EventData` projection. + ### Other Changes +- Updated the `Microsoft.Azure.Amqp` dependency to 2.6.11, which contains several bug fixes. _(see: [commits](https://github.com/Azure/azure-amqp/commits/hotfix/))_ + ## 6.5.1 (2025-04-09) ### Bugs Fixed diff --git a/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/src/Generated/CustomLocationResource.Serialization.cs b/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/src/Generated/CustomLocationResource.Serialization.cs index b416fbc5c358..98d5a374243c 100644 --- a/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/src/Generated/CustomLocationResource.Serialization.cs +++ b/sdk/extendedlocation/Azure.ResourceManager.ExtendedLocations/src/Generated/CustomLocationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ExtendedLocations { public partial class CustomLocationResource : IJsonModel { + private static CustomLocationData s_dataDeserializationInstance; + private static CustomLocationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerExtendedLocationsContext.Default); CustomLocationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerExtendedLocationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/CHANGELOG.md b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/CHANGELOG.md index ea9525c7952e..29f030fbdc52 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/CHANGELOG.md +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.6.0-beta.1 (Unreleased) +## 1.7.0-beta.1 (Unreleased) ### Features Added @@ -10,11 +10,17 @@ ### Other Changes +## 1.6.0 (2025-05-19) + +### Features Added + +- Overloads were added to accept a `Uri`-typed key identifier to all protection methods. _(A community contribution, courtesy of [MattKotsenas](https://github.com/abatishchev))_ + ## 1.5.0 (2025-05-06) ### Acknowledgments -Thank you to our developer community members who helped to make the Event Hubs client libraries better with their contributions to this release: +Thank you to our developer community members who helped to make the Data Protection libraries better with their contributions to this release: - Matt Kotsenas _([GitHub](https://github.com/MattKotsenas))_ diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/README.md b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/README.md index e81e89c6c32d..29d13d450be5 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/README.md +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/README.md @@ -52,9 +52,8 @@ To protect keys using Azure Key Vault Key, configure the system with `ProtectKey ```C# Snippet:ProtectKeysWithAzureKeyVault public void ConfigureServices(IServiceCollection services) { - services - .AddDataProtection() - .ProtectKeysWithAzureKeyVault(new Uri(""), new DefaultAzureCredential()); + services.AddDataProtection() + .ProtectKeysWithAzureKeyVault(new Uri(""), new DefaultAzureCredential()); } ``` diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.net8.0.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.net8.0.cs index 69b9021a8016..20d0db9a1370 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.net8.0.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.net8.0.cs @@ -3,9 +3,14 @@ namespace Microsoft.AspNetCore.DataProtection public static partial class AzureDataProtectionKeyVaultKeyBuilderExtensions { public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func keyIdentifierFactory, System.Func tokenCredentialFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func keyIdentifierFactory, System.Func tokenCredentialFactory) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, Azure.Core.Cryptography.IKeyEncryptionKeyResolver keyResolver) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, Azure.Core.TokenCredential tokenCredential) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, System.Func keyResolverFactory) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, System.Func tokenCredentialFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, Azure.Core.Cryptography.IKeyEncryptionKeyResolver keyResolver) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, Azure.Core.TokenCredential tokenCredential) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, System.Func keyResolverFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, System.Func tokenCredentialFactory) { throw null; } } } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.netstandard2.0.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.netstandard2.0.cs index 69b9021a8016..20d0db9a1370 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.netstandard2.0.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/api/Azure.Extensions.AspNetCore.DataProtection.Keys.netstandard2.0.cs @@ -3,9 +3,14 @@ namespace Microsoft.AspNetCore.DataProtection public static partial class AzureDataProtectionKeyVaultKeyBuilderExtensions { public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func keyIdentifierFactory, System.Func tokenCredentialFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Func keyIdentifierFactory, System.Func tokenCredentialFactory) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, Azure.Core.Cryptography.IKeyEncryptionKeyResolver keyResolver) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, Azure.Core.TokenCredential tokenCredential) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, System.Func keyResolverFactory) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, string keyIdentifier, System.Func tokenCredentialFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, Azure.Core.Cryptography.IKeyEncryptionKeyResolver keyResolver) { throw null; } public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, Azure.Core.TokenCredential tokenCredential) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, System.Func keyResolverFactory) { throw null; } + public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, System.Uri keyIdentifier, System.Func tokenCredentialFactory) { throw null; } } } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj index 1077e235a6db..e82ad85abe9c 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj @@ -3,9 +3,9 @@ Microsoft Azure Key Vault key encryption support. aspnetcore;dataprotection;azure;keyvault - 1.6.0-beta.1 + 1.7.0-beta.1 - 1.5.0 + 1.6.0 true $(NoWarn);AZC0102 diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureDataProtectionKeyVaultKeyBuilderExtensions.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureDataProtectionKeyVaultKeyBuilderExtensions.cs index 3601cf65ceef..7d5c6c1763a1 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureDataProtectionKeyVaultKeyBuilderExtensions.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureDataProtectionKeyVaultKeyBuilderExtensions.cs @@ -2,9 +2,9 @@ // Licensed under the MIT License. using System; -using Azure.Extensions.AspNetCore.DataProtection.Keys; using Azure.Core; using Azure.Core.Cryptography; +using Azure.Extensions.AspNetCore.DataProtection.Keys; using Azure.Security.KeyVault.Keys.Cryptography; using Microsoft.AspNetCore.DataProtection.Internal; using Microsoft.AspNetCore.DataProtection.KeyManagement; @@ -20,6 +20,20 @@ namespace Microsoft.AspNetCore.DataProtection /// public static class AzureDataProtectionKeyVaultKeyBuilderExtensions { + /// + /// Configures the data protection system to protect keys with specified key in Azure KeyVault. + /// + /// The builder instance to modify. + /// The Azure Key Vault key identifier used for key encryption. + /// The token credential to use for authentication. + /// The value . + public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, string keyIdentifier, TokenCredential tokenCredential) + { + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); + return builder.ProtectKeysWithAzureKeyVault(keyIdentifier, new KeyResolver(tokenCredential)); + } + /// /// Configures the data protection system to protect keys with specified key in Azure KeyVault. /// @@ -30,7 +44,8 @@ public static class AzureDataProtectionKeyVaultKeyBuilderExtensions public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Uri keyIdentifier, TokenCredential tokenCredential) { Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); - return ProtectKeysWithAzureKeyVault(builder, keyIdentifier.ToString(), new KeyResolver(tokenCredential)); + Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); + return builder.ProtectKeysWithAzureKeyVault(keyIdentifier.ToString(), new KeyResolver(tokenCredential)); } /// @@ -56,6 +71,20 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt return builder; } + /// + /// Configures the data protection system to protect keys with specified key in Azure KeyVault. + /// + /// The builder instance to modify. + /// The Azure Key Vault key identifier used for key encryption. + /// The to use for Key Vault access. + /// The value . + public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Uri keyIdentifier, IKeyEncryptionKeyResolver keyResolver) + { + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + Argument.AssertNotNull(keyResolver, nameof(keyResolver)); + return builder.ProtectKeysWithAzureKeyVault(keyIdentifier.ToString(), keyResolver); + } + /// /// Configures the data protection system to protect keys with specified key in Azure Key Vault. /// @@ -70,9 +99,7 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt Argument.AssertNotNullOrEmpty(keyIdentifier, nameof(keyIdentifier)); builder.Services.AddSingleton(); - builder.Services.AddSingleton(keyResolverFactory); - builder.Services.AddSingleton(sp => { var keyResolver = sp.GetRequiredService(); @@ -84,6 +111,20 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt return builder; } + /// + /// Configures the data protection system to protect keys with specified key in Azure Key Vault. + /// + /// The builder instance to modify. + /// The Azure Key Vault key identifier used for key encryption. + /// The factory delegate to create the to use for Key Vault access. + /// The value . + public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Uri keyIdentifier, Func keyResolverFactory) + { + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); + Argument.AssertNotNull(keyResolverFactory, nameof(keyResolverFactory)); + return builder.ProtectKeysWithAzureKeyVault(keyIdentifier.ToString(), keyResolverFactory); + } + /// /// Configures the data protection system to protect keys with specified key in Azure Key Vault. /// @@ -93,10 +134,21 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt /// The value . public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, string keyIdentifier, Func tokenCredentialFactory) { - Argument.AssertNotNull(builder, nameof(builder)); - Argument.AssertNotNull(tokenCredentialFactory, nameof(tokenCredentialFactory)); Argument.AssertNotNullOrEmpty(keyIdentifier, nameof(keyIdentifier)); + Argument.AssertNotNull(tokenCredentialFactory, nameof(tokenCredentialFactory)); + return builder.ProtectKeysWithAzureKeyVault(_ => keyIdentifier, tokenCredentialFactory); + } + /// + /// Configures the data protection system to protect keys with specified key in Azure Key Vault. + /// + /// The builder instance to modify. + /// The Azure Key Vault key identifier used for key encryption. + /// The factory delegate to create the to use for authenticating Key Vault access. + /// The value . + public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Uri keyIdentifier, Func tokenCredentialFactory) + { + Argument.AssertNotNull(keyIdentifier, nameof(keyIdentifier)); return builder.ProtectKeysWithAzureKeyVault(_ => keyIdentifier, tokenCredentialFactory); } @@ -104,7 +156,7 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt /// Configures the data protection system to protect keys with specified key in Azure Key Vault. /// /// The builder instance to modify. - /// The factory delgate to creat the Azure Key Vault key identifier used for key encryption. + /// The factory delegate to create the Azure Key Vault key identifier used for key encryption. /// The factory delegate to create the to use for authenticating Key Vault access. /// The value . public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Func keyIdentifierFactory, Func tokenCredentialFactory) @@ -131,5 +183,19 @@ public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProt return builder; } + + /// + /// Configures the data protection system to protect keys with specified key in Azure Key Vault. + /// + /// The builder instance to modify. + /// The factory delegate to create the Azure Key Vault key identifier used for key encryption. + /// The factory delegate to create the to use for authenticating Key Vault access. + /// The value . + public static IDataProtectionBuilder ProtectKeysWithAzureKeyVault(this IDataProtectionBuilder builder, Func keyIdentifierFactory, Func tokenCredentialFactory) + { + Argument.AssertNotNull(keyIdentifierFactory, nameof(keyIdentifierFactory)); + Argument.AssertNotNull(tokenCredentialFactory, nameof(tokenCredentialFactory)); + return builder.ProtectKeysWithAzureKeyVault(sp => keyIdentifierFactory(sp).ToString(), tokenCredentialFactory); + } } } diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs index 400f4b0ce5f3..a5f4bf5f58b7 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/AzureKeyVaultXmlEncryptor.cs @@ -4,7 +4,6 @@ using System; using System.IO; using System.Security.Cryptography; -using System.Threading.Tasks; using System.Xml.Linq; using Azure.Core.Cryptography; using Azure.Security.KeyVault.Keys.Cryptography; diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.AzureKeyVaultXmlEncryptor.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.AzureKeyVaultXmlEncryptor.cs new file mode 100644 index 000000000000..c523950c4ad7 --- /dev/null +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.AzureKeyVaultXmlEncryptor.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using Azure.Identity; +using Azure.Security.KeyVault.Keys.Cryptography; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.AspNetCore.DataProtection.KeyManagement; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using NUnit.Framework; + +namespace Azure.Extensions.AspNetCore.DataProtection.Keys.Tests +{ + public partial class AzureDataProtectionBuilderExtensionsTests + { + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_Credential_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_Credential_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_CredentialFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", _ => new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolver_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), new KeyResolver(new MockCredential())); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_KeyResolver_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", new KeyResolver(new MockCredential())); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_CredentialFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), _ => new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncString_And_CredentialFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(_ => "http://www.example.com/dummyKey", _ => new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncUri_And_CredentialFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(_ => new Uri("http://www.example.com/dummyKey"), _ => new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_KeyResolverFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", _ => new KeyResolver(new MockCredential())); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolverFunc_Uses_AzureKeyVaultXmlEncryptor() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), _ => new KeyResolver(new MockCredential())); + var services = serviceCollection.BuildServiceProvider(); + + // Assert + var options = services.GetRequiredService>(); + Assert.IsInstanceOf(options.Value.XmlEncryptor); + } + } +} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyIdentifier.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyIdentifier.cs new file mode 100644 index 000000000000..e6441dab3eb2 --- /dev/null +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyIdentifier.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using Azure.Identity; +using Azure.Security.KeyVault.Keys.Cryptography; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.Extensions.DependencyInjection; +using NUnit.Framework; + +namespace Azure.Extensions.AspNetCore.DataProtection.Keys.Tests +{ + public partial class AzureDataProtectionBuilderExtensionsTests + { + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_Credential_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((string)null, new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_Credential_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Uri)null, new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_CredentialFunc_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((string)null, _ => new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolver_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Uri)null, new KeyResolver(new MockCredential())); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_KeyResolver_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((string)null, new KeyResolver(new MockCredential())); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_CredentialFunc_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Uri)null, _ => new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncString_And_CredentialFunc_Throws_Exception_When_KeyIdentifierFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Func)null, _ => new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifierFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncUri_And_CredentialFunc_Throws_Exception_When_KeyIdentifierFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Func)null, _ => new MockCredential()); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifierFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_KeyResolverFunc_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((string)null, _ => new KeyResolver(new MockCredential())); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolverFunc_Throws_Exception_When_KeyIdentifier_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault((Uri)null, _ => new KeyResolver(new MockCredential())); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyIdentifier"); + } + } +} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyResolver.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyResolver.cs new file mode 100644 index 000000000000..a6d0dbbabf73 --- /dev/null +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.KeyResolver.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.Cryptography; +using Azure.Security.KeyVault.Keys.Cryptography; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.Extensions.DependencyInjection; +using NUnit.Framework; + +namespace Azure.Extensions.AspNetCore.DataProtection.Keys.Tests +{ + public partial class AzureDataProtectionBuilderExtensionsTests + { + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_KeyResolver_Throws_Exception_When_KeyResolver_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", (KeyResolver)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyResolver"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolver_Throws_Exception_When_KeyResolver_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), (KeyResolver)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyResolver"); + } + + [Test] + public void + ProtectKeysWithAzureKeyVault_With_String_And_KeyResolverFunc_Throws_Exception_When_KeyResolverFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", + (Func)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyResolverFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_KeyResolverFunc_Throws_Exception_When_KeyResolverFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), (Func)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "keyResolverFactory"); + } + } +} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.TokenCredential.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.TokenCredential.cs new file mode 100644 index 000000000000..b8d3cb853d7b --- /dev/null +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.TokenCredential.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core; +using Microsoft.AspNetCore.DataProtection; +using Microsoft.Extensions.DependencyInjection; +using NUnit.Framework; + +namespace Azure.Extensions.AspNetCore.DataProtection.Keys.Tests +{ + public partial class AzureDataProtectionBuilderExtensionsTests + { + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_Credential_Throws_Exception_When_Credential_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", (TokenCredential)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredential"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_Credential_Throws_Exception_When_Credential_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), (TokenCredential)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredential"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_String_And_CredentialFunc_Throws_Exception_When_CredentialFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", (Func)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredentialFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_Uri_And_CredentialFunc_Throws_Exception_When_CredentialFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), (Func)null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredentialFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncString_And_CredentialFunc_Throws_Exception_When_CredentialFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(_ => "http://www.example.com/dummyKey", null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredentialFactory"); + } + + [Test] + public void ProtectKeysWithAzureKeyVault_With_FuncUri_And_CredentialFunc_Throws_Exception_When_CredentialFactory_Is_Null() + { + // Arrange + var serviceCollection = new ServiceCollection(); + var builder = serviceCollection.AddDataProtection(); + + // Act + TestDelegate action = () => builder.ProtectKeysWithAzureKeyVault(_ => new Uri("http://www.example.com/dummyKey"), null); + + // Assert + var ex = Assert.Throws(action); + Assert.NotNull(ex); + Assert.AreEqual(ex.ParamName, "tokenCredentialFactory"); + } + } +} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.cs deleted file mode 100644 index 8df9a9eb55e1..000000000000 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/AzureDataProtectionBuilderExtensionsTests.cs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -using System; -using System.Threading.Tasks; -using Azure.Identity; -using Microsoft.AspNetCore.DataProtection; -using Microsoft.AspNetCore.DataProtection.KeyManagement; -using Azure.Security.KeyVault.Keys; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Options; -using NUnit.Framework; -using Azure.Core.TestFramework; - -namespace Azure.Extensions.AspNetCore.DataProtection.Keys.Tests -{ - public class AzureDataProtectionBuilderExtensionsTests - { - [Test] - public void ProtectKeysWithAzureKeyVault_UsesAzureKeyVaultXmlEncryptor() - { - // Arrange - var client = new KeyClient(new Uri("http://www.example.com/dummyKey"),new MockCredential()); - var serviceCollection = new ServiceCollection(); - var builder = serviceCollection.AddDataProtection(); - - // Act - builder.ProtectKeysWithAzureKeyVault(new Uri("http://www.example.com/dummyKey"), new DefaultAzureCredential()); - var services = serviceCollection.BuildServiceProvider(); - - // Assert - var options = services.GetRequiredService>(); - Assert.IsInstanceOf(options.Value.XmlEncryptor); - } - - [Test] - public void ProtectKeysWithAzureKeyVault_WithServiceProviderFunc_UsesAzureKeyVaultXmlEncryptor() - { - // Arrange - var client = new KeyClient(new Uri("http://www.example.com/dummyKey"), new MockCredential()); - var serviceCollection = new ServiceCollection(); - var builder = serviceCollection.AddDataProtection(); - - // Act - builder.ProtectKeysWithAzureKeyVault("http://www.example.com/dummyKey", sp => new DefaultAzureCredential()); - var services = serviceCollection.BuildServiceProvider(); - - // Assert - var options = services.GetRequiredService>(); - Assert.IsInstanceOf(options.Value.XmlEncryptor); - } - - [Test] - public void ProtectKeysWithAzureKeyVault_WithServiceProviderAndUriFuncs_UsesAzureKeyVaultXmlEncryptor() - { - // Arrange - var client = new KeyClient(new Uri("http://www.example.com/dummyKey"), new MockCredential()); - var serviceCollection = new ServiceCollection(); - var builder = serviceCollection.AddDataProtection(); - - // Act - builder.ProtectKeysWithAzureKeyVault(sp => "http://www.example.com/dummyKey", sp => new DefaultAzureCredential()); - var services = serviceCollection.BuildServiceProvider(); - - // Assert - var options = services.GetRequiredService>(); - Assert.IsInstanceOf(options.Value.XmlEncryptor); - } - } -} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Snippets.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Snippets.cs index b2df23ac7127..cf37f157e368 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Snippets.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/Snippets.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; @@ -15,11 +15,10 @@ private class StartupIdentity #region Snippet:ProtectKeysWithAzureKeyVault public void ConfigureServices(IServiceCollection services) { - services - .AddDataProtection() - .ProtectKeysWithAzureKeyVault(new Uri(""), new DefaultAzureCredential()); + services.AddDataProtection() + .ProtectKeysWithAzureKeyVault(new Uri(""), new DefaultAzureCredential()); } #endregion } } -} \ No newline at end of file +} diff --git a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/TypeForwardingActivatorTests.cs b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/TypeForwardingActivatorTests.cs index 01219134e306..8349c3dbb920 100644 --- a/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/TypeForwardingActivatorTests.cs +++ b/sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/tests/TypeForwardingActivatorTests.cs @@ -1,11 +1,11 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; using System.Collections.Generic; using System.IO; using System.Reflection; -using Azure.Identity; +using Azure.Core.TestFramework; using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection.Internal; using Microsoft.Extensions.DependencyInjection; @@ -20,16 +20,17 @@ public void CreateInstance_ForwardsToNewNamespaceIfExists() { // Arrange var serviceCollection = new ServiceCollection(); - serviceCollection.AddDataProtection().ProtectKeysWithAzureKeyVault(new Uri("http://localhost"), new DefaultAzureCredential()); + serviceCollection.AddDataProtection().ProtectKeysWithAzureKeyVault(new Uri("http://localhost"), new MockCredential()); + var services = serviceCollection.BuildServiceProvider(); var activator = services.GetRequiredService(); // Act - var name = "Microsoft.AspNetCore.DataProtection.AzureKeyVault.AzureKeyVaultXmlDecryptor, Microsoft.AspNetCore.DataProtection.AzureKeyVault, Version=1.0.0.0"; + const string name = "Microsoft.AspNetCore.DataProtection.AzureKeyVault.AzureKeyVaultXmlDecryptor, Microsoft.AspNetCore.DataProtection.AzureKeyVault, Version=1.0.0.0"; var instance = activator.CreateInstance(typeof(object), name); // Assert - Assert.IsInstanceOf(instance); + Assert.IsInstanceOf(instance); } [Test] @@ -38,14 +39,15 @@ public void CreateInstance_DoesNotForwardIfClassDoesNotExist() // Arrange var serviceCollection = new ServiceCollection(); serviceCollection.AddDataProtection(); + var services = serviceCollection.BuildServiceProvider(); var activator = services.GetRequiredService(); // Act & Assert - var name = "Microsoft.AspNet.DataProtection.TypeForwardingActivatorTests+NonExistentClassWithParameterlessCtor, Microsoft.AspNet.DataProtection.Tests"; - var exception = Assert.Throws(() => activator.CreateInstance(typeof(object), name)); - - StringAssert.Contains("Microsoft.AspNet.DataProtection.Test", exception.Message); + const string name = "Microsoft.AspNet.DataProtection.TypeForwardingActivatorTests+NonExistentClassWithParameterlessCtor, Microsoft.AspNet.DataProtection.Tests"; + var ex = Assert.Throws(() => activator.CreateInstance(typeof(object), name)); + Assert.IsNotNull(ex); + StringAssert.Contains("Microsoft.AspNet.DataProtection.Test", ex.Message); } [TestCase(typeof(GenericType>))] @@ -62,6 +64,7 @@ public void CreateInstance_Generics(Type type) var name = type.AssemblyQualifiedName; // Act & Assert + Assert.IsNotNull(name); Assert.IsInstanceOf(type, activator.CreateInstance(typeof(object), name)); } @@ -74,6 +77,7 @@ public void CreateInstance_ThrowsForOpenGenerics(Type type) var name = type.AssemblyQualifiedName; // Act & Assert + Assert.IsNotNull(name); Assert.Throws(() => activator.CreateInstance(typeof(object), name)); } @@ -105,7 +109,7 @@ public void CreateInstance_ForwardsAcrossVersionChanges(Version version) CreateInstance_ForwardsAcrossVersionChangesImpl(version); } - private void CreateInstance_ForwardsAcrossVersionChangesImpl(Version newVersion) + private static void CreateInstance_ForwardsAcrossVersionChangesImpl(Version newVersion) { var activator = new DecryptorTypeForwardingActivator(null); @@ -121,18 +125,15 @@ private void CreateInstance_ForwardsAcrossVersionChangesImpl(Version newVersion) Assert.True(forwarded); } - public static Version[][] AssemblyVersions + public static IEnumerable AssemblyVersions { get { - var current = typeof(ClassWithParameterlessCtor).Assembly.GetName().Version; - return new[] - { - new[] { new Version(Math.Max(0, current.Major - 1), 0, 0, 0)}, - new[] { new Version(current.Major + 1, 0, 0, 0)}, - new[] { new Version(current.Major, current.Minor + 1, 0, 0)}, - new[] { new Version(current.Major, current.Minor, current.Build + 1, 0)} - }; + var current = typeof(ClassWithParameterlessCtor).Assembly.GetName().Version!; + yield return [new Version(Math.Max(0, current.Major - 1), 0, 0, 0)]; + yield return [new Version(current.Major + 1, 0, 0, 0)]; + yield return [new Version(current.Major, current.Minor + 1, 0, 0)]; + yield return [new Version(current.Major, current.Minor, current.Build + 1, 0)]; } } @@ -154,4 +155,4 @@ private class GenericType { } } -} \ No newline at end of file +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.Serialization.cs index 3145efb88f68..4b6f92132e86 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.Serialization.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Fabric { public partial class FabricCapacityResource : IJsonModel { + private static FabricCapacityData s_dataDeserializationInstance; + private static FabricCapacityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FabricCapacityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FabricCapacityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFabricContext.Default); FabricCapacityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs index 43e4f0b14f77..9a8731977073 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/AutoUpgradeProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerServiceFleet { public partial class AutoUpgradeProfileResource : IJsonModel { + private static AutoUpgradeProfileData s_dataDeserializationInstance; + private static AutoUpgradeProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutoUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutoUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceFleetContext.Default); AutoUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.Serialization.cs index c8e25a58af92..3a68aa6ed7b5 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetMemberResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerServiceFleet { public partial class ContainerServiceFleetMemberResource : IJsonModel { + private static ContainerServiceFleetMemberData s_dataDeserializationInstance; + private static ContainerServiceFleetMemberData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceFleetMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceFleetMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceFleetContext.Default); ContainerServiceFleetMemberData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.Serialization.cs index 31db03289970..57d93fd49bdb 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerServiceFleet { public partial class ContainerServiceFleetResource : IJsonModel { + private static ContainerServiceFleetData s_dataDeserializationInstance; + private static ContainerServiceFleetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceFleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceFleetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceFleetContext.Default); ContainerServiceFleetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.Serialization.cs index 4676b26b17c7..9674bdbfd5ac 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/ContainerServiceFleetUpdateRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerServiceFleet { public partial class ContainerServiceFleetUpdateRunResource : IJsonModel { + private static ContainerServiceFleetUpdateRunData s_dataDeserializationInstance; + private static ContainerServiceFleetUpdateRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContainerServiceFleetUpdateRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContainerServiceFleetUpdateRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceFleetContext.Default); ContainerServiceFleetUpdateRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.Serialization.cs b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.Serialization.cs index a712e199e290..841847f19640 100644 --- a/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.Serialization.cs +++ b/sdk/fleet/Azure.ResourceManager.ContainerServiceFleet/src/Generated/FleetUpdateStrategyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ContainerServiceFleet { public partial class FleetUpdateStrategyResource : IJsonModel { + private static FleetUpdateStrategyData s_dataDeserializationInstance; + private static FleetUpdateStrategyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FleetUpdateStrategyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FleetUpdateStrategyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContainerServiceFleetContext.Default); FleetUpdateStrategyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContainerServiceFleetContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayContainerResource.Serialization.cs b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayContainerResource.Serialization.cs index a6a3665cfcb5..8aeab06b38f5 100644 --- a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayContainerResource.Serialization.cs +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FluidRelay { public partial class FluidRelayContainerResource : IJsonModel { + private static FluidRelayContainerData s_dataDeserializationInstance; + private static FluidRelayContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FluidRelayContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FluidRelayContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFluidRelayContext.Default); FluidRelayContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFluidRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayServerResource.Serialization.cs b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayServerResource.Serialization.cs index f2fc2cc31e6b..5de6d48b8c5f 100644 --- a/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayServerResource.Serialization.cs +++ b/sdk/fluidrelay/Azure.ResourceManager.FluidRelay/src/Generated/FluidRelayServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FluidRelay { public partial class FluidRelayServerResource : IJsonModel { + private static FluidRelayServerData s_dataDeserializationInstance; + private static FluidRelayServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FluidRelayServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FluidRelayServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFluidRelayContext.Default); FluidRelayServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFluidRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md index f6650c19e85d..d9d9f2761f14 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.5.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,13 @@ ### Other Changes +## 1.4.0 (2025-05-10) + +### Features Added + +- Upgraded version to 2025-03-01 +- Added support for captcha + ## 1.3.1 (2025-03-11) ### Features Added diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.net8.0.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.net8.0.cs index 66389584328c..03db1d41cf25 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.net8.0.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.net8.0.cs @@ -1283,6 +1283,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class FrontDoorWebApplicationFirewallPolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FrontDoorWebApplicationFirewallPolicySettings() { } + public int? CaptchaExpirationInMinutes { get { throw null; } set { } } public string CustomBlockResponseBody { get { throw null; } set { } } public int? CustomBlockResponseStatusCode { get { throw null; } set { } } public Azure.ResourceManager.FrontDoor.Models.PolicyEnabledState? EnabledState { get { throw null; } set { } } @@ -1759,6 +1760,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Allow { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType AnomalyScoring { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Block { get { throw null; } } + public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Captcha { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType JSChallenge { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Log { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Redirect { get { throw null; } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs index 66389584328c..03db1d41cf25 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/api/Azure.ResourceManager.FrontDoor.netstandard2.0.cs @@ -1283,6 +1283,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class FrontDoorWebApplicationFirewallPolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FrontDoorWebApplicationFirewallPolicySettings() { } + public int? CaptchaExpirationInMinutes { get { throw null; } set { } } public string CustomBlockResponseBody { get { throw null; } set { } } public int? CustomBlockResponseStatusCode { get { throw null; } set { } } public Azure.ResourceManager.FrontDoor.Models.PolicyEnabledState? EnabledState { get { throw null; } set { } } @@ -1759,6 +1760,7 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Allow { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType AnomalyScoring { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Block { get { throw null; } } + public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Captcha { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType JSChallenge { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Log { get { throw null; } } public static Azure.ResourceManager.FrontDoor.Models.RuleMatchActionType Redirect { get { throw null; } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Azure.ResourceManager.FrontDoor.csproj b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Azure.ResourceManager.FrontDoor.csproj index ce3b68830572..c0c52657ac06 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Azure.ResourceManager.FrontDoor.csproj +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Azure.ResourceManager.FrontDoor.csproj @@ -1,8 +1,8 @@ - 1.4.0-beta.1 + 1.5.0-beta.1 - 1.3.1 + 1.4.0 Azure.ResourceManager.FrontDoor Microsoft Azure Resource Manager client SDK for Azure resource provider Microsoft.Network Front Door. azure;management;arm;resource manager;frontdoor diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/FrontDoorExtensions.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/FrontDoorExtensions.cs index 4c098990e460..f647200c76fa 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/FrontDoorExtensions.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/FrontDoorExtensions.cs @@ -182,7 +182,7 @@ public static FrontDoorWebApplicationFirewallPolicyCollection GetFrontDoorWebApp /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -220,7 +220,7 @@ public static async Task /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public static Response GetFrontDoorNe /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -480,7 +480,7 @@ public static AsyncPageable GetFr /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -516,7 +516,7 @@ public static Pageable GetFrontDo /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// @@ -548,7 +548,7 @@ public static AsyncPageable GetManagedRuleSetsAsync(th /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorResourceGroupResource.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorResourceGroupResource.cs index afbaccb86d67..ccb312d71570 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorResourceGroupResource.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual FrontDoorWebApplicationFirewallPolicyCollection GetFrontDoorWebAp /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorSubscriptionResource.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorSubscriptionResource.cs index f0e084f70b17..c8cf839546a5 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorSubscriptionResource.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Extensions/MockableFrontDoorSubscriptionResource.cs @@ -71,7 +71,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -101,7 +101,7 @@ public virtual AsyncPageable GetF /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -131,7 +131,7 @@ public virtual Pageable GetFrontD /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// @@ -157,7 +157,7 @@ public virtual AsyncPageable GetManagedRuleSetsAsync(C /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorExperimentResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorExperimentResource.Serialization.cs index 5f500533f92a..1eb267d7865a 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorExperimentResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorExperimentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontDoorExperimentResource : IJsonModel { + private static FrontDoorExperimentData s_dataDeserializationInstance; + private static FrontDoorExperimentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorExperimentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorExperimentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontDoorExperimentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorNetworkExperimentProfileResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorNetworkExperimentProfileResource.Serialization.cs index a2a1b847cb25..fe03db89aa07 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorNetworkExperimentProfileResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorNetworkExperimentProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontDoorNetworkExperimentProfileResource : IJsonModel { + private static FrontDoorNetworkExperimentProfileData s_dataDeserializationInstance; + private static FrontDoorNetworkExperimentProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorNetworkExperimentProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorNetworkExperimentProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontDoorNetworkExperimentProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorResource.Serialization.cs index 356df8335b6e..ee4b218f7bed 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontDoorResource : IJsonModel { + private static FrontDoorData s_dataDeserializationInstance; + private static FrontDoorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontDoorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorRulesEngineResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorRulesEngineResource.Serialization.cs index 6b00ed992f27..96ae86f8fd37 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorRulesEngineResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorRulesEngineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontDoorRulesEngineResource : IJsonModel { + private static FrontDoorRulesEngineData s_dataDeserializationInstance; + private static FrontDoorRulesEngineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorRulesEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorRulesEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontDoorRulesEngineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyCollection.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyCollection.cs index c6576151adc5..e30a9b55ed39 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyCollection.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string policyName, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string policyName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.Serialization.cs index dcaf9793e3b0..eed8ce282b6a 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontDoorWebApplicationFirewallPolicyResource : IJsonModel { + private static FrontDoorWebApplicationFirewallPolicyData s_dataDeserializationInstance; + private static FrontDoorWebApplicationFirewallPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontDoorWebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontDoorWebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontDoorWebApplicationFirewallPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.cs index df381e13d134..f1a89a3b3400 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontDoorWebApplicationFirewallPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Updat /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -421,7 +421,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -483,7 +483,7 @@ public virtual Response AddTag(st /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -540,7 +540,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -597,7 +597,7 @@ public virtual Response SetTags(I /// /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource @@ -657,7 +657,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-02-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontendEndpointResource.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontendEndpointResource.Serialization.cs index d5682f4082e5..0051ec1059c8 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontendEndpointResource.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/FrontendEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.FrontDoor { public partial class FrontendEndpointResource : IJsonModel { + private static FrontendEndpointData s_dataDeserializationInstance; + private static FrontendEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontendEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontendEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerFrontDoorContext.Default); FrontendEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerFrontDoorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.Serialization.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.Serialization.cs index de917a630dd4..3f6d4d1f81b7 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.Serialization.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.Serialization.cs @@ -69,6 +69,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("javascriptChallengeExpirationInMinutes"u8); writer.WriteNumberValue(JavascriptChallengeExpirationInMinutes.Value); } + if (Optional.IsDefined(CaptchaExpirationInMinutes)) + { + writer.WritePropertyName("captchaExpirationInMinutes"u8); + writer.WriteNumberValue(CaptchaExpirationInMinutes.Value); + } writer.WritePropertyName("logScrubbing"u8); writer.WriteStartObject(); if (Optional.IsDefined(State)) @@ -131,6 +136,7 @@ internal static FrontDoorWebApplicationFirewallPolicySettings DeserializeFrontDo string customBlockResponseBody = default; PolicyRequestBodyCheck? requestBodyCheck = default; int? javascriptChallengeExpirationInMinutes = default; + int? captchaExpirationInMinutes = default; WebApplicationFirewallScrubbingState? state = default; IList scrubbingRules = default; IDictionary serializedAdditionalRawData = default; @@ -196,6 +202,15 @@ internal static FrontDoorWebApplicationFirewallPolicySettings DeserializeFrontDo javascriptChallengeExpirationInMinutes = property.Value.GetInt32(); continue; } + if (property.NameEquals("captchaExpirationInMinutes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + captchaExpirationInMinutes = property.Value.GetInt32(); + continue; + } if (property.NameEquals("logScrubbing"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -245,6 +260,7 @@ internal static FrontDoorWebApplicationFirewallPolicySettings DeserializeFrontDo customBlockResponseBody, requestBodyCheck, javascriptChallengeExpirationInMinutes, + captchaExpirationInMinutes, state, scrubbingRules ?? new ChangeTrackingList(), serializedAdditionalRawData); diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.cs index d8ca2927551c..d884ffb74a1f 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/FrontDoorWebApplicationFirewallPolicySettings.cs @@ -58,11 +58,12 @@ public FrontDoorWebApplicationFirewallPolicySettings() /// If the action type is block, customer can override the response status code. /// If the action type is block, customer can override the response body. The body must be specified in base64 encoding. /// Describes if policy managed rules will inspect the request body content. - /// Defines the JavaScript challenge cookie validity lifetime in minutes. Value must be an integer between 5 and 1440 with the default value being 30. + /// Defines the JavaScript challenge cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30. + /// Defines the Captcha cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30. /// State of the log scrubbing config. Default value is Enabled. /// List of log scrubbing rules applied to the Web Application Firewall logs. /// Keeps track of any properties unknown to the library. - internal FrontDoorWebApplicationFirewallPolicySettings(PolicyEnabledState? enabledState, FrontDoorWebApplicationFirewallPolicyMode? mode, Uri redirectUri, int? customBlockResponseStatusCode, string customBlockResponseBody, PolicyRequestBodyCheck? requestBodyCheck, int? javascriptChallengeExpirationInMinutes, WebApplicationFirewallScrubbingState? state, IList scrubbingRules, IDictionary serializedAdditionalRawData) + internal FrontDoorWebApplicationFirewallPolicySettings(PolicyEnabledState? enabledState, FrontDoorWebApplicationFirewallPolicyMode? mode, Uri redirectUri, int? customBlockResponseStatusCode, string customBlockResponseBody, PolicyRequestBodyCheck? requestBodyCheck, int? javascriptChallengeExpirationInMinutes, int? captchaExpirationInMinutes, WebApplicationFirewallScrubbingState? state, IList scrubbingRules, IDictionary serializedAdditionalRawData) { EnabledState = enabledState; Mode = mode; @@ -71,6 +72,7 @@ internal FrontDoorWebApplicationFirewallPolicySettings(PolicyEnabledState? enabl CustomBlockResponseBody = customBlockResponseBody; RequestBodyCheck = requestBodyCheck; JavascriptChallengeExpirationInMinutes = javascriptChallengeExpirationInMinutes; + CaptchaExpirationInMinutes = captchaExpirationInMinutes; State = state; ScrubbingRules = scrubbingRules; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -88,8 +90,10 @@ internal FrontDoorWebApplicationFirewallPolicySettings(PolicyEnabledState? enabl public string CustomBlockResponseBody { get; set; } /// Describes if policy managed rules will inspect the request body content. public PolicyRequestBodyCheck? RequestBodyCheck { get; set; } - /// Defines the JavaScript challenge cookie validity lifetime in minutes. Value must be an integer between 5 and 1440 with the default value being 30. + /// Defines the JavaScript challenge cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30. public int? JavascriptChallengeExpirationInMinutes { get; set; } + /// Defines the Captcha cookie validity lifetime in minutes. This setting is only applicable to Premium_AzureFrontDoor. Value must be an integer between 5 and 1440 with the default value being 30. + public int? CaptchaExpirationInMinutes { get; set; } /// State of the log scrubbing config. Default value is Enabled. public WebApplicationFirewallScrubbingState? State { get; set; } /// List of log scrubbing rules applied to the Web Application Firewall logs. diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/RuleMatchActionType.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/RuleMatchActionType.cs index 9769c72095b8..1c5095e54fd2 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/RuleMatchActionType.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/Models/RuleMatchActionType.cs @@ -28,6 +28,7 @@ public RuleMatchActionType(string value) private const string RedirectValue = "Redirect"; private const string AnomalyScoringValue = "AnomalyScoring"; private const string JSChallengeValue = "JSChallenge"; + private const string CaptchaValue = "CAPTCHA"; /// Allow. public static RuleMatchActionType Allow { get; } = new RuleMatchActionType(AllowValue); @@ -41,6 +42,8 @@ public RuleMatchActionType(string value) public static RuleMatchActionType AnomalyScoring { get; } = new RuleMatchActionType(AnomalyScoringValue); /// JSChallenge. public static RuleMatchActionType JSChallenge { get; } = new RuleMatchActionType(JSChallengeValue); + /// CAPTCHA. + public static RuleMatchActionType Captcha { get; } = new RuleMatchActionType(CaptchaValue); /// Determines if two values are the same. public static bool operator ==(RuleMatchActionType left, RuleMatchActionType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs index 77bf17549cc3..85c022584d39 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/ManagedRuleSetsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedRuleSetsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/PoliciesRestOperations.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/PoliciesRestOperations.cs index 1b0c02ba0c70..83c1649995d3 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/PoliciesRestOperations.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/Generated/RestOperations/PoliciesRestOperations.cs @@ -32,7 +32,7 @@ public PoliciesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-02-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md index a37f2eabbc35..6804eb8dfddb 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: FrontDoor namespace: Azure.ResourceManager.FrontDoor -require: https://github.com/Azure/azure-rest-api-specs/blob/2d973fccf9f28681a481e9760fa12b2334216e21/specification/frontdoor/resource-manager/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/f11631f1c1057d8363f9e3f9597c73b90f8924c8/specification/frontdoor/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyCollection.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyCollection.cs index c064ec6559e5..fd5056f543c8 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyCollection.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FrontDoorWebApplicationFirewallPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesSpecificPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyCreateOrUpdate.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyCreateOrUpdate.json // this example is just showing the usage of "Policies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,6 +53,7 @@ public async Task CreateOrUpdate_CreatesSpecificPolicy() CustomBlockResponseBody = "PGh0bWw+CjxoZWFkZXI+PHRpdGxlPkhlbGxvPC90aXRsZT48L2hlYWRlcj4KPGJvZHk+CkhlbGxvIHdvcmxkCjwvYm9keT4KPC9odG1sPg==", RequestBodyCheck = PolicyRequestBodyCheck.Disabled, JavascriptChallengeExpirationInMinutes = 30, + CaptchaExpirationInMinutes = 30, State = WebApplicationFirewallScrubbingState.Enabled, ScrubbingRules = {new WebApplicationFirewallScrubbingRules(ScrubbingRuleEntryMatchVariable.RequestIPAddress, ScrubbingRuleEntryMatchOperator.EqualsAny) { @@ -78,6 +79,13 @@ public async Task CreateOrUpdate_CreatesSpecificPolicy() }, RuleMatchActionType.Block) { Name = "Rule2", +}, new WebApplicationCustomRule(1, WebApplicationRuleType.RateLimitRule, new WebApplicationRuleMatchCondition[] +{ +new WebApplicationRuleMatchCondition(WebApplicationRuleMatchVariable.RemoteAddr, new WebApplicationRuleMatchOperator("ServiceTagMatch"), new string[]{"AzureBackup", "AzureBotService"}) +}, RuleMatchActionType.Captcha) +{ +Name = "Rule3", +RateLimitThreshold = 1000, }}, ManagedRuleSets = {new ManagedRuleSet("DefaultRuleSet", "1.0") { @@ -112,7 +120,7 @@ public async Task CreateOrUpdate_CreatesSpecificPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +153,7 @@ public async Task Get_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllPoliciesInAResourceGroup() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPolicies.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPolicies.json // this example is just showing the usage of "Policies_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 +188,7 @@ public async Task GetAll_GetAllPoliciesInAResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +217,7 @@ public async Task Exists_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyResource.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyResource.cs index 966b0bcf1912..1a8f85aed12b 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyResource.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_FrontDoorWebApplicationFirewallPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FrontDoorWebApplicationFirewallPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyGet.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyGet.json // this example is just showing the usage of "Policies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteProtectionPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyDelete.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyDelete.json // this example is just showing the usage of "Policies_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_DeleteProtectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_PatchesSpecificPolicy() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafPolicyPatch.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafPolicyPatch.json // this example is just showing the usage of "Policies_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/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 685931fce4f0..85f7abf9f7fb 100644 --- a/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/frontdoor/Azure.ResourceManager.FrontDoor/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetFrontDoorWebApplicationFirewallPoliciesByFrontDoorWebApplicationFirewallPolicy_GetAllPoliciesInAResourceGroup() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListPoliciesUnderSubscription.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListPoliciesUnderSubscription.json // this example is just showing the usage of "Policies_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 @@ -52,7 +52,7 @@ public async Task GetFrontDoorWebApplicationFirewallPoliciesByFrontDoorWebApplic [Ignore("Only validating compilation of examples")] public async Task GetManagedRuleSets_ListPoliciesManagedRuleSetsInAResourceGroup() { - // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2024-02-01/examples/WafListManagedRuleSets.json + // Generated from example definition: specification/frontdoor/resource-manager/Microsoft.Network/stable/2025-03-01/examples/WafListManagedRuleSets.json // this example is just showing the usage of "ManagedRuleSets_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/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.Serialization.cs index 47dd8439165c..2141619d3cb1 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Grafana { public partial class GrafanaPrivateEndpointConnectionResource : IJsonModel { + private static GrafanaPrivateEndpointConnectionData s_dataDeserializationInstance; + private static GrafanaPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GrafanaPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GrafanaPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); GrafanaPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.Serialization.cs index 8ee92e914a52..726c1d3ffd15 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/GrafanaPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Grafana { public partial class GrafanaPrivateLinkResource : IJsonModel { + private static GrafanaPrivateLinkResourceData s_dataDeserializationInstance; + private static GrafanaPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GrafanaPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GrafanaPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); GrafanaPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.Serialization.cs index 2f63b90716fb..db91fbe5a944 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedGrafanaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Grafana { public partial class ManagedGrafanaResource : IJsonModel { + private static ManagedGrafanaData s_dataDeserializationInstance; + private static ManagedGrafanaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedGrafanaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedGrafanaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); ManagedGrafanaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.Serialization.cs b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.Serialization.cs index d0a5a699eccb..03e6a913238f 100644 --- a/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.Serialization.cs +++ b/sdk/grafana/Azure.ResourceManager.Grafana/src/Generated/ManagedPrivateEndpointModelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Grafana { public partial class ManagedPrivateEndpointModelResource : IJsonModel { + private static ManagedPrivateEndpointModelData s_dataDeserializationInstance; + private static ManagedPrivateEndpointModelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedPrivateEndpointModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedPrivateEndpointModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGrafanaContext.Default); ManagedPrivateEndpointModelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGrafanaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/graphservices/Azure.ResourceManager.GraphServices/src/Generated/GraphServicesAccountResource.Serialization.cs b/sdk/graphservices/Azure.ResourceManager.GraphServices/src/Generated/GraphServicesAccountResource.Serialization.cs index ac7672a86531..dcdd6075739e 100644 --- a/sdk/graphservices/Azure.ResourceManager.GraphServices/src/Generated/GraphServicesAccountResource.Serialization.cs +++ b/sdk/graphservices/Azure.ResourceManager.GraphServices/src/Generated/GraphServicesAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.GraphServices { public partial class GraphServicesAccountResource : IJsonModel { + private static GraphServicesAccountResourceData s_dataDeserializationInstance; + private static GraphServicesAccountResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GraphServicesAccountResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GraphServicesAccountResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGraphServicesContext.Default); GraphServicesAccountResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGraphServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.Serialization.cs index b22c638eeeeb..4def97bcdf39 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationHcrpAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.GuestConfiguration { public partial class GuestConfigurationHcrpAssignmentResource : IJsonModel { + private static GuestConfigurationAssignmentData s_dataDeserializationInstance; + private static GuestConfigurationAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGuestConfigurationContext.Default); GuestConfigurationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGuestConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs index 8103ed79b38d..a56dc508ff83 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVMwarevSphereAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.GuestConfiguration { public partial class GuestConfigurationVMwarevSphereAssignmentResource : IJsonModel { + private static GuestConfigurationAssignmentData s_dataDeserializationInstance; + private static GuestConfigurationAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGuestConfigurationContext.Default); GuestConfigurationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGuestConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.Serialization.cs index ac9f81c79103..05db468869b3 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.GuestConfiguration { public partial class GuestConfigurationVmAssignmentResource : IJsonModel { + private static GuestConfigurationAssignmentData s_dataDeserializationInstance; + private static GuestConfigurationAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGuestConfigurationContext.Default); GuestConfigurationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGuestConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.Serialization.cs b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.Serialization.cs index d44e537e9d8a..afa764b86396 100644 --- a/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.Serialization.cs +++ b/sdk/guestconfiguration/Azure.ResourceManager.GuestConfiguration/src/Generated/GuestConfigurationVmssAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.GuestConfiguration { public partial class GuestConfigurationVmssAssignmentResource : IJsonModel { + private static GuestConfigurationAssignmentData s_dataDeserializationInstance; + private static GuestConfigurationAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GuestConfigurationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerGuestConfigurationContext.Default); GuestConfigurationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerGuestConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterPrivateEndpointConnectionResource.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterPrivateEndpointConnectionResource.Serialization.cs index c2479c0149e5..3aea22129e88 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HardwareSecurityModules { public partial class CloudHsmClusterPrivateEndpointConnectionResource : IJsonModel { + private static CloudHsmClusterPrivateEndpointConnectionData s_dataDeserializationInstance; + private static CloudHsmClusterPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudHsmClusterPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudHsmClusterPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); CloudHsmClusterPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.Serialization.cs index 6ae5ac38a7d7..70202bfb69c6 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/CloudHsmClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HardwareSecurityModules { public partial class CloudHsmClusterResource : IJsonModel { + private static CloudHsmClusterData s_dataDeserializationInstance; + private static CloudHsmClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudHsmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudHsmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); CloudHsmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.Serialization.cs b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.Serialization.cs index 931646022407..22a2ffd677dd 100644 --- a/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.Serialization.cs +++ b/sdk/hardwaresecuritymodules/Azure.ResourceManager.HardwareSecurityModules/src/Generated/DedicatedHsmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HardwareSecurityModules { public partial class DedicatedHsmResource : IJsonModel { + private static DedicatedHsmData s_dataDeserializationInstance; + private static DedicatedHsmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DedicatedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DedicatedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); DedicatedHsmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHardwareSecurityModulesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.Serialization.cs index d141ba55e525..3e13c6d1e2ad 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight { public partial class HDInsightApplicationResource : IJsonModel { + private static HDInsightApplicationData s_dataDeserializationInstance; + private static HDInsightApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContext.Default); HDInsightApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.Serialization.cs index 3ca0d7ffeca6..8e5a8c0dc190 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight { public partial class HDInsightClusterResource : IJsonModel { + private static HDInsightClusterData s_dataDeserializationInstance; + private static HDInsightClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContext.Default); HDInsightClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.Serialization.cs index 875ffdf20234..767f4f589946 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight { public partial class HDInsightPrivateEndpointConnectionResource : IJsonModel { + private static HDInsightPrivateEndpointConnectionData s_dataDeserializationInstance; + private static HDInsightPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContext.Default); HDInsightPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.Serialization.cs b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.Serialization.cs index 76adfce8cd6a..14be275bd3b7 100644 --- a/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.Serialization.cs +++ b/sdk/hdinsight/Azure.ResourceManager.HDInsight/src/Generated/HDInsightPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight { public partial class HDInsightPrivateLinkResource : IJsonModel { + private static HDInsightPrivateLinkResourceData s_dataDeserializationInstance; + private static HDInsightPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContext.Default); HDInsightPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolResource.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolResource.Serialization.cs index c263a6eaeccb..271af210a4b0 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolResource.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight.Containers { public partial class HDInsightClusterPoolResource : IJsonModel { + private static HDInsightClusterPoolData s_dataDeserializationInstance; + private static HDInsightClusterPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightClusterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightClusterPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContainersContext.Default); HDInsightClusterPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterResource.Serialization.cs b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterResource.Serialization.cs index 6fc6f28fd8a7..e8068af4f675 100644 --- a/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterResource.Serialization.cs +++ b/sdk/hdinsightcontainers/Azure.ResourceManager.HDInsight.Containers/src/Generated/HDInsightClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HDInsight.Containers { public partial class HDInsightClusterResource : IJsonModel { + private static HDInsightClusterData s_dataDeserializationInstance; + private static HDInsightClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HDInsightClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHDInsightContainersContext.Default); HDInsightClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHDInsightContainersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthbot/Azure.ResourceManager.HealthBot/src/Generated/HealthBotResource.Serialization.cs b/sdk/healthbot/Azure.ResourceManager.HealthBot/src/Generated/HealthBotResource.Serialization.cs index 2662f23701ab..c5a6fb6bcde4 100644 --- a/sdk/healthbot/Azure.ResourceManager.HealthBot/src/Generated/HealthBotResource.Serialization.cs +++ b/sdk/healthbot/Azure.ResourceManager.HealthBot/src/Generated/HealthBotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthBot { public partial class HealthBotResource : IJsonModel { + private static HealthBotData s_dataDeserializationInstance; + private static HealthBotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthBotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthBotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthBotContext.Default); HealthBotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthBotContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceResource.Serialization.cs index f6b7a8f8a8f0..6ca4d67137cf 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/DicomServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class DicomServiceResource : IJsonModel { + private static DicomServiceData s_dataDeserializationInstance; + private static DicomServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DicomServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DicomServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); DicomServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceResource.Serialization.cs index 24fedeeefb78..8c155eb833d0 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/FhirServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class FhirServiceResource : IJsonModel { + private static FhirServiceData s_dataDeserializationInstance; + private static FhirServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FhirServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FhirServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); FhirServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorResource.Serialization.cs index 2af794a0462e..c48d454de19a 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisIotConnectorResource : IJsonModel { + private static HealthcareApisIotConnectorData s_dataDeserializationInstance; + private static HealthcareApisIotConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisIotConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisIotConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisIotConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationResource.Serialization.cs index 5441a64e2bea..2bc8dccc8b06 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisIotFhirDestinationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisIotFhirDestinationResource : IJsonModel { + private static HealthcareApisIotFhirDestinationData s_dataDeserializationInstance; + private static HealthcareApisIotFhirDestinationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisIotFhirDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisIotFhirDestinationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisIotFhirDestinationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateEndpointConnectionResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateEndpointConnectionResource.Serialization.cs index fc4de82aefaa..502a81aef000 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisServicePrivateEndpointConnectionResource : IJsonModel { + private static HealthcareApisPrivateEndpointConnectionData s_dataDeserializationInstance; + private static HealthcareApisPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateLinkResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateLinkResource.Serialization.cs index 3ca1dd49359f..5eb5f252ee1b 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateLinkResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServicePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisServicePrivateLinkResource : IJsonModel { + private static HealthcareApisPrivateLinkResourceData s_dataDeserializationInstance; + private static HealthcareApisPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceResource.Serialization.cs index 0a756acff3af..8aeebadbc8c0 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisServiceResource : IJsonModel { + private static HealthcareApisServiceData s_dataDeserializationInstance; + private static HealthcareApisServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateEndpointConnectionResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateEndpointConnectionResource.Serialization.cs index cb12fd74a741..2996be33b54e 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisWorkspacePrivateEndpointConnectionResource : IJsonModel { + private static HealthcareApisPrivateEndpointConnectionData s_dataDeserializationInstance; + private static HealthcareApisPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateLinkResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateLinkResource.Serialization.cs index b52ec286e7b7..7fdf3358cb26 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateLinkResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspacePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisWorkspacePrivateLinkResource : IJsonModel { + private static HealthcareApisPrivateLinkResourceData s_dataDeserializationInstance; + private static HealthcareApisPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceResource.Serialization.cs b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceResource.Serialization.cs index 7d3a3170365f..cf71f2a0b383 100644 --- a/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceResource.Serialization.cs +++ b/sdk/healthcareapis/Azure.ResourceManager.HealthcareApis/src/Generated/HealthcareApisWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthcareApis { public partial class HealthcareApisWorkspaceResource : IJsonModel { + private static HealthcareApisWorkspaceData s_dataDeserializationInstance; + private static HealthcareApisWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthcareApisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthcareApisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthcareApisContext.Default); HealthcareApisWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthcareApisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.Serialization.cs index 9675b83f5ea4..75d9563f914f 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/DeidServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthDataAIServices { public partial class DeidServiceResource : IJsonModel { + private static DeidServiceData s_dataDeserializationInstance; + private static DeidServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeidServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeidServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthDataAIServicesContext.Default); DeidServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthDataAIServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.Serialization.cs b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.Serialization.cs index b97b6c9f1cf6..57a7299a4629 100644 --- a/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/healthdataaiservices/Azure.ResourceManager.HealthDataAIServices/src/Generated/HealthDataAIServicesPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HealthDataAIServices { public partial class HealthDataAIServicesPrivateEndpointConnectionResource : IJsonModel { + private static HealthDataAIServicesPrivateEndpointConnectionResourceData s_dataDeserializationInstance; + private static HealthDataAIServicesPrivateEndpointConnectionResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthDataAIServicesPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthDataAIServicesPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHealthDataAIServicesContext.Default); HealthDataAIServicesPrivateEndpointConnectionResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHealthDataAIServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/healthdataaiservices/test-resources-post.ps1 b/sdk/healthdataaiservices/test-resources-post.ps1 index dfb336d16fe2..1a020c8eb236 100644 --- a/sdk/healthdataaiservices/test-resources-post.ps1 +++ b/sdk/healthdataaiservices/test-resources-post.ps1 @@ -21,7 +21,7 @@ $storageAccountName = $DeploymentOutputs['HEALTHDATAAISERVICES_STORAGE_ACCOUNT_N $containerName = $DeploymentOutputs['HEALTHDATAAISERVICES_STORAGE_CONTAINER_NAME'] # Set the local folder path to upload -$localFolderPath = "Azure.Health.Deidentification\tests\data\example_patient_1" +$localFolderPath = "$PSScriptRoot\Azure.Health.Deidentification\tests\data\example_patient_1" # Check if the connection string is present if ([string]::IsNullOrWhiteSpace($storageAccountName)) { diff --git a/sdk/healthdataaiservices/test-resources.bicep b/sdk/healthdataaiservices/test-resources.bicep index a40e1f901db0..acd21acc95d9 100644 --- a/sdk/healthdataaiservices/test-resources.bicep +++ b/sdk/healthdataaiservices/test-resources.bicep @@ -26,10 +26,7 @@ var storageBlobDataContributor = 'ba92f5b4-2d11-453d-a403-e96b0029c9fe' var blobStorageName = take(toLower(replace('blob-${baseName}', '-', '')), 24) var blobContainerName = 'container-${baseName}' - -var maxBaseNameLength = 24 - 5 - length(deidLocationShort) // 5 characters for 'deid-' and 1 for '-' -var truncatedBaseName = take(baseName, maxBaseNameLength) -var deidServiceName = 'deid-${truncatedBaseName}-${deidLocationShort}' +var deidServiceName = take('deid-${deidLocationShort}-${baseName}', 24) resource storageAccount 'Microsoft.Storage/storageAccounts@2022-05-01' = { name: blobStorageName @@ -190,7 +187,7 @@ resource storageRoleAssignment 'Microsoft.Authorization/roleAssignments@2020-04- scope: storageAccount } -resource testDeidService 'microsoft.healthdataaiservices/deidservices@2024-02-28-preview' = { +resource testDeidService 'microsoft.healthdataaiservices/deidservices@2024-09-20' = { name: deidServiceName location: deidLocation identity: { diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceAgentPoolResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceAgentPoolResource.Serialization.cs index 8f55262dec75..bec9d5ee1860 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceAgentPoolResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceAgentPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class HybridContainerServiceAgentPoolResource : IJsonModel { + private static HybridContainerServiceAgentPoolData s_dataDeserializationInstance; + private static HybridContainerServiceAgentPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridContainerServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridContainerServiceAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); HybridContainerServiceAgentPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVirtualNetworkResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVirtualNetworkResource.Serialization.cs index 25a078bcc69b..bb199a43c639 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVirtualNetworkResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class HybridContainerServiceVirtualNetworkResource : IJsonModel { + private static HybridContainerServiceVirtualNetworkData s_dataDeserializationInstance; + private static HybridContainerServiceVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridContainerServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridContainerServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); HybridContainerServiceVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVmSkuResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVmSkuResource.Serialization.cs index d78e372da51c..c61e1ec834f7 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVmSkuResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridContainerServiceVmSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class HybridContainerServiceVmSkuResource : IJsonModel { + private static HybridContainerServiceVmSkuData s_dataDeserializationInstance; + private static HybridContainerServiceVmSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridContainerServiceVmSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridContainerServiceVmSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); HybridContainerServiceVmSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridIdentityMetadataResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridIdentityMetadataResource.Serialization.cs index 0a2a331d1637..41dacc69eb32 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridIdentityMetadataResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/HybridIdentityMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class HybridIdentityMetadataResource : IJsonModel { + private static HybridIdentityMetadataData s_dataDeserializationInstance; + private static HybridIdentityMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridIdentityMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); HybridIdentityMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/KubernetesVersionProfileResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/KubernetesVersionProfileResource.Serialization.cs index 3f8efa0aa469..36c604c0c090 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/KubernetesVersionProfileResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/KubernetesVersionProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class KubernetesVersionProfileResource : IJsonModel { + private static KubernetesVersionProfileData s_dataDeserializationInstance; + private static KubernetesVersionProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KubernetesVersionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KubernetesVersionProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); KubernetesVersionProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterResource.Serialization.cs index 168b8049f157..41c25bb8ad46 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class ProvisionedClusterResource : IJsonModel { + private static ProvisionedClusterData s_dataDeserializationInstance; + private static ProvisionedClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProvisionedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProvisionedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); ProvisionedClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterUpgradeProfileResource.Serialization.cs b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterUpgradeProfileResource.Serialization.cs index 6ed756a9e905..c2cb71bb88f3 100644 --- a/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterUpgradeProfileResource.Serialization.cs +++ b/sdk/hybridaks/Azure.ResourceManager.HybridContainerService/src/Generated/ProvisionedClusterUpgradeProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridContainerService { public partial class ProvisionedClusterUpgradeProfileResource : IJsonModel { + private static ProvisionedClusterUpgradeProfileData s_dataDeserializationInstance; + private static ProvisionedClusterUpgradeProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProvisionedClusterUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProvisionedClusterUpgradeProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridContainerServiceContext.Default); ProvisionedClusterUpgradeProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridContainerServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArcGatewayResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArcGatewayResource.Serialization.cs index 4c24aab936e4..a0699562b4cd 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArcGatewayResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/ArcGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class ArcGatewayResource : IJsonModel { + private static ArcGatewayData s_dataDeserializationInstance; + private static ArcGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArcGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArcGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); ArcGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.Serialization.cs index d2b83eaa38ec..3205da380b3f 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeExtensionValueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputeExtensionValueResource : IJsonModel { + private static HybridComputeExtensionValueData s_dataDeserializationInstance; + private static HybridComputeExtensionValueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputeExtensionValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputeExtensionValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputeExtensionValueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs index 7cc47263a1d4..c48ac13efb6d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputeLicenseProfileResource : IJsonModel { + private static HybridComputeLicenseProfileData s_dataDeserializationInstance; + private static HybridComputeLicenseProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputeLicenseProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputeLicenseProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputeLicenseProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.Serialization.cs index 111017320b3d..ffde2bb98b3a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeLicenseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputeLicenseResource : IJsonModel { + private static HybridComputeLicenseData s_dataDeserializationInstance; + private static HybridComputeLicenseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputeLicenseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputeLicenseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputeLicenseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.Serialization.cs index fd4449b3ce01..d7b3cacd717a 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputeMachineExtensionResource : IJsonModel { + private static HybridComputeMachineExtensionData s_dataDeserializationInstance; + private static HybridComputeMachineExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputeMachineExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputeMachineExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputeMachineExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.Serialization.cs index 8d0455084441..155449008b6b 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputeMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputeMachineResource : IJsonModel { + private static HybridComputeMachineData s_dataDeserializationInstance; + private static HybridComputeMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputeMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputeMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputeMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.Serialization.cs index 6c0aa8879505..42a2cc74b76d 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputePrivateEndpointConnectionResource : IJsonModel { + private static HybridComputePrivateEndpointConnectionData s_dataDeserializationInstance; + private static HybridComputePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.Serialization.cs index 4a8389302fa8..0ee73563d3f2 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputePrivateLinkResource : IJsonModel { + private static HybridComputePrivateLinkResourceData s_dataDeserializationInstance; + private static HybridComputePrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputePrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.Serialization.cs index 4e5b259fd05b..66826d9ee345 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/HybridComputePrivateLinkScopeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class HybridComputePrivateLinkScopeResource : IJsonModel { + private static HybridComputePrivateLinkScopeData s_dataDeserializationInstance; + private static HybridComputePrivateLinkScopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridComputePrivateLinkScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridComputePrivateLinkScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); HybridComputePrivateLinkScopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs index 5c9abe8a8787..16fdec286370 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/MachineRunCommandResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class MachineRunCommandResource : IJsonModel { + private static MachineRunCommandData s_dataDeserializationInstance; + private static MachineRunCommandData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineRunCommandData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); MachineRunCommandData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index b1be69ca5bfa..5fdffb72cf49 100644 --- a/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/hybridcompute/Azure.ResourceManager.HybridCompute/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridCompute { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridComputeContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.Serialization.cs index 94f0e2f9884c..773a9f974c80 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class HybridConnectivityEndpointResource : IJsonModel { + private static HybridConnectivityEndpointData s_dataDeserializationInstance; + private static HybridConnectivityEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectivityEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectivityEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); HybridConnectivityEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.Serialization.cs index 1decd8cb9968..29058e9ed234 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/HybridConnectivityServiceConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class HybridConnectivityServiceConfigurationResource : IJsonModel { + private static HybridConnectivityServiceConfigurationData s_dataDeserializationInstance; + private static HybridConnectivityServiceConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectivityServiceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectivityServiceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); HybridConnectivityServiceConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorResource.Serialization.cs index 321dd02e48d3..c5c5b3880ba0 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class PublicCloudConnectorResource : IJsonModel { + private static PublicCloudConnectorData s_dataDeserializationInstance; + private static PublicCloudConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); PublicCloudConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionConfigurationResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionConfigurationResource.Serialization.cs index bc794ea25d6a..c9c5320137e7 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionConfigurationResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class PublicCloudConnectorSolutionConfigurationResource : IJsonModel { + private static PublicCloudConnectorSolutionConfigurationData s_dataDeserializationInstance; + private static PublicCloudConnectorSolutionConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCloudConnectorSolutionConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCloudConnectorSolutionConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); PublicCloudConnectorSolutionConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionTypeResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionTypeResource.Serialization.cs index 1e046da03c18..b2baec4d4510 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionTypeResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudConnectorSolutionTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class PublicCloudConnectorSolutionTypeResource : IJsonModel { + private static PublicCloudConnectorSolutionTypeData s_dataDeserializationInstance; + private static PublicCloudConnectorSolutionTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCloudConnectorSolutionTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCloudConnectorSolutionTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); PublicCloudConnectorSolutionTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudInventoryResource.Serialization.cs b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudInventoryResource.Serialization.cs index 74fd8eb8623d..170230fee454 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudInventoryResource.Serialization.cs +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/src/Generated/PublicCloudInventoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridConnectivity { public partial class PublicCloudInventoryResource : IJsonModel { + private static PublicCloudInventoryData s_dataDeserializationInstance; + private static PublicCloudInventoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCloudInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCloudInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridConnectivityContext.Default); PublicCloudInventoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridConnectivityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.Serialization.cs b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.Serialization.cs index 69619febe0a6..a0de3fa6c753 100644 --- a/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.Serialization.cs +++ b/sdk/hybridkubernetes/Azure.ResourceManager.Kubernetes/src/Generated/ConnectedClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kubernetes { public partial class ConnectedClusterResource : IJsonModel { + private static ConnectedClusterData s_dataDeserializationInstance; + private static ConnectedClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKubernetesContext.Default); ConnectedClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKubernetesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactManifestResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactManifestResource.Serialization.cs index a4027891d5f6..1953bf497a1c 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactManifestResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactManifestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class ArtifactManifestResource : IJsonModel { + private static ArtifactManifestData s_dataDeserializationInstance; + private static ArtifactManifestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArtifactManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArtifactManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); ArtifactManifestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactStoreResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactStoreResource.Serialization.cs index 4ba353f7181d..7853af88980b 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactStoreResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ArtifactStoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class ArtifactStoreResource : IJsonModel { + private static ArtifactStoreData s_dataDeserializationInstance; + private static ArtifactStoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArtifactStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArtifactStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); ArtifactStoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ComponentResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ComponentResource.Serialization.cs index 26bbe300357a..3ac97cb03fd8 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ComponentResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ComponentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class ComponentResource : IJsonModel { + private static ComponentData s_dataDeserializationInstance; + private static ComponentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); ComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupSchemaResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupSchemaResource.Serialization.cs index 649030967c55..fbee6730fda6 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupSchemaResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class ConfigurationGroupSchemaResource : IJsonModel { + private static ConfigurationGroupSchemaData s_dataDeserializationInstance; + private static ConfigurationGroupSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConfigurationGroupSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConfigurationGroupSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); ConfigurationGroupSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupValueResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupValueResource.Serialization.cs index d3e2034f9221..ceaa6900226f 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupValueResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/ConfigurationGroupValueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class ConfigurationGroupValueResource : IJsonModel { + private static ConfigurationGroupValueData s_dataDeserializationInstance; + private static ConfigurationGroupValueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConfigurationGroupValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConfigurationGroupValueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); ConfigurationGroupValueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionGroupResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionGroupResource.Serialization.cs index 17a6b11db148..2c510c6530fa 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionGroupResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class NetworkFunctionDefinitionGroupResource : IJsonModel { + private static NetworkFunctionDefinitionGroupData s_dataDeserializationInstance; + private static NetworkFunctionDefinitionGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFunctionDefinitionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFunctionDefinitionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); NetworkFunctionDefinitionGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionVersionResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionVersionResource.Serialization.cs index 5c22c0c86419..bdf43e6237e4 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionVersionResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionDefinitionVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class NetworkFunctionDefinitionVersionResource : IJsonModel { + private static NetworkFunctionDefinitionVersionData s_dataDeserializationInstance; + private static NetworkFunctionDefinitionVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFunctionDefinitionVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFunctionDefinitionVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); NetworkFunctionDefinitionVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionResource.Serialization.cs index 695c283465d3..d60b35d77552 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkFunctionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class NetworkFunctionResource : IJsonModel { + private static NetworkFunctionData s_dataDeserializationInstance; + private static NetworkFunctionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); NetworkFunctionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignGroupResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignGroupResource.Serialization.cs index 6cf0ad289f64..2ba1fb2f7afb 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignGroupResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class NetworkServiceDesignGroupResource : IJsonModel { + private static NetworkServiceDesignGroupData s_dataDeserializationInstance; + private static NetworkServiceDesignGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkServiceDesignGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkServiceDesignGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); NetworkServiceDesignGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignVersionResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignVersionResource.Serialization.cs index 3fd9ba4580e0..359bb1aef704 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignVersionResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/NetworkServiceDesignVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class NetworkServiceDesignVersionResource : IJsonModel { + private static NetworkServiceDesignVersionData s_dataDeserializationInstance; + private static NetworkServiceDesignVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkServiceDesignVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkServiceDesignVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); NetworkServiceDesignVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/PublisherResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/PublisherResource.Serialization.cs index 7d2137dc6350..6ecdeba14246 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/PublisherResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/PublisherResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class PublisherResource : IJsonModel { + private static PublisherData s_dataDeserializationInstance; + private static PublisherData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublisherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublisherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); PublisherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteNetworkServiceResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteNetworkServiceResource.Serialization.cs index 67ff84a41bbf..eecb5168c733 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteNetworkServiceResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteNetworkServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class SiteNetworkServiceResource : IJsonModel { + private static SiteNetworkServiceData s_dataDeserializationInstance; + private static SiteNetworkServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteNetworkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteNetworkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); SiteNetworkServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteResource.Serialization.cs b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteResource.Serialization.cs index de09bc3aa5af..c74b3edbb333 100644 --- a/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteResource.Serialization.cs +++ b/sdk/hybridnetwork/Azure.ResourceManager.HybridNetwork/src/Generated/SiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.HybridNetwork { public partial class SiteResource : IJsonModel { + private static SiteData s_dataDeserializationInstance; + private static SiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerHybridNetworkContext.Default); SiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerHybridNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/identity/Azure.Identity.Broker/CHANGELOG.md b/sdk/identity/Azure.Identity.Broker/CHANGELOG.md index a4c11ac2ea82..2faafa1de239 100644 --- a/sdk/identity/Azure.Identity.Broker/CHANGELOG.md +++ b/sdk/identity/Azure.Identity.Broker/CHANGELOG.md @@ -4,6 +4,8 @@ ### Features Added +- Support broker on Linux. + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/identity/Azure.Identity.Broker/src/DevelopmentBrokerOptions.cs b/sdk/identity/Azure.Identity.Broker/src/DevelopmentBrokerOptions.cs index c9a2894b0a3d..ff30c45545d6 100644 --- a/sdk/identity/Azure.Identity.Broker/src/DevelopmentBrokerOptions.cs +++ b/sdk/identity/Azure.Identity.Broker/src/DevelopmentBrokerOptions.cs @@ -44,7 +44,7 @@ Action IMsalSettablePublicClientInitializerOptio private void AddBroker(PublicClientApplicationBuilder builder) { builder.WithParentActivityOrWindow(() => IntPtr.Zero); - var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows); + var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows | BrokerOptions.OperatingSystems.Linux); if (IsLegacyMsaPassthroughEnabled.HasValue) { options.MsaPassthrough = IsLegacyMsaPassthroughEnabled.Value; diff --git a/sdk/identity/Azure.Identity.Broker/src/InteractiveBrowserCredentialBrokerOptions.cs b/sdk/identity/Azure.Identity.Broker/src/InteractiveBrowserCredentialBrokerOptions.cs index 4114d7d0233b..7bfe1a517b19 100644 --- a/sdk/identity/Azure.Identity.Broker/src/InteractiveBrowserCredentialBrokerOptions.cs +++ b/sdk/identity/Azure.Identity.Broker/src/InteractiveBrowserCredentialBrokerOptions.cs @@ -39,7 +39,7 @@ public InteractiveBrowserCredentialBrokerOptions(IntPtr parentWindowHandle) : ba private void AddBroker(PublicClientApplicationBuilder builder) { builder.WithParentActivityOrWindow(() => _parentWindowHandle); - var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows); + var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows | BrokerOptions.OperatingSystems.Linux); if (IsLegacyMsaPassthroughEnabled.HasValue) { options.MsaPassthrough = IsLegacyMsaPassthroughEnabled.Value; diff --git a/sdk/identity/Azure.Identity.Broker/src/SharedTokenCacheCredentialBrokerOptions.cs b/sdk/identity/Azure.Identity.Broker/src/SharedTokenCacheCredentialBrokerOptions.cs index 1fadbc7d4099..564df2a44641 100644 --- a/sdk/identity/Azure.Identity.Broker/src/SharedTokenCacheCredentialBrokerOptions.cs +++ b/sdk/identity/Azure.Identity.Broker/src/SharedTokenCacheCredentialBrokerOptions.cs @@ -43,7 +43,7 @@ public SharedTokenCacheCredentialBrokerOptions(TokenCachePersistenceOptions toke private void AddBroker(PublicClientApplicationBuilder builder) { - var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows); + var options = new BrokerOptions(BrokerOptions.OperatingSystems.Windows | BrokerOptions.OperatingSystems.Linux); if (IsLegacyMsaPassthroughEnabled.HasValue) { options.MsaPassthrough = IsLegacyMsaPassthroughEnabled.Value; diff --git a/sdk/identity/Azure.Identity.Broker/tests/Azure.Identity.Broker.Tests.csproj b/sdk/identity/Azure.Identity.Broker/tests/Azure.Identity.Broker.Tests.csproj index 7a1d6f3bdae8..fe2dd8703c96 100644 --- a/sdk/identity/Azure.Identity.Broker/tests/Azure.Identity.Broker.Tests.csproj +++ b/sdk/identity/Azure.Identity.Broker/tests/Azure.Identity.Broker.Tests.csproj @@ -26,6 +26,7 @@ + diff --git a/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTests.cs b/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTests.cs index f0970f4783ad..75430e66fcad 100644 --- a/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTests.cs +++ b/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTests.cs @@ -14,7 +14,7 @@ namespace Azure.Identity.Broker.Tests { - public class ManualInteractiveBrowserCredentialBrokerTests + public partial class ManualInteractiveBrowserCredentialBrokerTests { private static TokenRequestContext context = new TokenRequestContext(new string[] { "https://vault.azure.net/.default" }); diff --git a/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTestsLinux.cs b/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTestsLinux.cs new file mode 100644 index 000000000000..5053e71d09bb --- /dev/null +++ b/sdk/identity/Azure.Identity.Broker/tests/ManualInteractiveBrowserCredentialBrokerTestsLinux.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics.Tracing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Identity.Broker.Tests +{ + public partial class ManualInteractiveBrowserCredentialBrokerTests + { + /// + /// Get the handle of the console window for Linux + /// + [DllImport("libX11")] + private static extern IntPtr XOpenDisplay(string display); + + [DllImport("libX11")] + private static extern IntPtr XRootWindow(IntPtr display, int screen); + + [Test] + [Ignore("This test is an integration test which can only be run with user interaction")] + public async Task AuthenticateWithBrokerAsync() + { + IntPtr parentWindowHandle = XRootWindow(XOpenDisplay(null), 0); + // to fully manually verify the InteractiveBrowserCredential this test should be run both authenticating with a + // school / organization account as well as a personal live account, i.e. a @outlook.com, @live.com, or @hotmail.com + var cred = new InteractiveBrowserCredential(new InteractiveBrowserCredentialBrokerOptions(parentWindowHandle)); + + AccessToken token = await cred.GetTokenAsync(new TokenRequestContext(new string[] { "https://vault.azure.net/.default" })).ConfigureAwait(false); + + Assert.NotNull(token.Token); + } + + [Test] + [Ignore("This test is an integration test which can only be run with user interaction")] + public async Task AuthenticateWithBrokerWithDefaultBrokerAccountLinux() + { + IntPtr parentWindowHandle = XRootWindow(XOpenDisplay(null), 0); + + using var _listener = new TestEventListener(); + _listener.EnableEvents(AzureIdentityEventSource.Singleton, EventLevel.Verbose); // Capture all event levels + + var cred = new InteractiveBrowserCredential(new InteractiveBrowserCredentialBrokerOptions(parentWindowHandle) { UseDefaultBrokerAccount = true }); + + AccessToken token = await cred.GetTokenAsync(new TokenRequestContext(new string[] { "https://vault.azure.net/.default" })).ConfigureAwait(false); + + Assert.NotNull(token.Token); + + var brokerEvents = _listener.EventData.Where(e => e.Payload.Any(p => p.ToString().Contains("source: Broker"))).ToList(); + Assert.That(brokerEvents, Is.Not.Empty, "Expected to find log event with source: Broker"); + } + } +} \ No newline at end of file diff --git a/sdk/identity/Azure.Identity/CHANGELOG.md b/sdk/identity/Azure.Identity/CHANGELOG.md index 741ba562ad64..8fad58e42382 100644 --- a/sdk/identity/Azure.Identity/CHANGELOG.md +++ b/sdk/identity/Azure.Identity/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.15.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.14.0 (2025-05-13) ### Other Changes diff --git a/sdk/identity/Azure.Identity/api/Azure.Identity.net8.0.cs b/sdk/identity/Azure.Identity/api/Azure.Identity.net8.0.cs index 4bc2db858ffe..edb24632a583 100644 --- a/sdk/identity/Azure.Identity/api/Azure.Identity.net8.0.cs +++ b/sdk/identity/Azure.Identity/api/Azure.Identity.net8.0.cs @@ -201,6 +201,7 @@ public DefaultAzureCredentialOptions() { } public bool ExcludeAzureCliCredential { get { throw null; } set { } } public bool ExcludeAzureDeveloperCliCredential { get { throw null; } set { } } public bool ExcludeAzurePowerShellCredential { get { throw null; } set { } } + public bool ExcludeBrokerCredential { get { throw null; } set { } } public bool ExcludeEnvironmentCredential { get { throw null; } set { } } public bool ExcludeInteractiveBrowserCredential { get { throw null; } set { } } public bool ExcludeManagedIdentityCredential { get { throw null; } set { } } diff --git a/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs b/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs index cad8b2243855..23722746e1e6 100644 --- a/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs +++ b/sdk/identity/Azure.Identity/api/Azure.Identity.netstandard2.0.cs @@ -198,6 +198,7 @@ public DefaultAzureCredentialOptions() { } public bool ExcludeAzureCliCredential { get { throw null; } set { } } public bool ExcludeAzureDeveloperCliCredential { get { throw null; } set { } } public bool ExcludeAzurePowerShellCredential { get { throw null; } set { } } + public bool ExcludeBrokerCredential { get { throw null; } set { } } public bool ExcludeEnvironmentCredential { get { throw null; } set { } } public bool ExcludeInteractiveBrowserCredential { get { throw null; } set { } } public bool ExcludeManagedIdentityCredential { get { throw null; } set { } } diff --git a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj index b22c3ee6292f..342318bfe6fe 100644 --- a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj +++ b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj @@ -2,9 +2,9 @@ Provides APIs for authenticating to Microsoft Entra ID Microsoft Azure.Identity Component - 1.14.0 + 1.15.0-beta.1 - 1.13.2 + 1.14.0 Microsoft Azure Identity;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021;AZC0011 diff --git a/sdk/identity/Azure.Identity/tests/Azure.Identity.Tests.csproj b/sdk/identity/Azure.Identity/tests/Azure.Identity.Tests.csproj index af4fbb62f940..36c71f4969c9 100644 --- a/sdk/identity/Azure.Identity/tests/Azure.Identity.Tests.csproj +++ b/sdk/identity/Azure.Identity/tests/Azure.Identity.Tests.csproj @@ -6,6 +6,12 @@ $(NoWarn);0618 + + + + + + diff --git a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs index 37e5c59ba015..da218d18fdf3 100644 --- a/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs +++ b/sdk/identity/Azure.Identity/tests/ManagedIdentityCredentialTests.cs @@ -449,16 +449,11 @@ public void VerifyImdsRequestFailureWithValidJsonIdentityNotFoundErrorThrowsCUE( var options = new TokenCredentialOptions() { Transport = mockTransport, IsChainedCredential = true }; var pipeline = CredentialPipeline.GetInstance(options); - ManagedIdentityCredential credential = InstrumentClient(new ManagedIdentityCredential("mock-client-id", pipeline, options)); - if (content != null) - { - var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default))); - Assert.That(ex.Message, Does.Contain(ImdsManagedIdentityProbeSource.IdentityUnavailableError)); - } - else - { - var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default))); - } + ManagedIdentityCredential credential = InstrumentClient(new ManagedIdentityCredential( + new ManagedIdentityClient( + new ManagedIdentityClientOptions() { Pipeline = pipeline, ManagedIdentityId = ManagedIdentityId.FromUserAssignedClientId("mock-client-id"), IsForceRefreshEnabled = true, Options = options }))); + var ex = Assert.ThrowsAsync(async () => await credential.GetTokenAsync(new TokenRequestContext(MockScopes.Default))); + Assert.That(ex.Message, Does.Contain(ImdsManagedIdentityProbeSource.IdentityUnavailableError)); } [NonParallelizable] diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.Serialization.cs index 69a6c2be8174..e8f0138d5fb4 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.InformaticaDataManagement { public partial class InformaticaOrganizationResource : IJsonModel { + private static InformaticaOrganizationData s_dataDeserializationInstance; + private static InformaticaOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InformaticaOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InformaticaOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerInformaticaDataManagementContext.Default); InformaticaOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerInformaticaDataManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.Serialization.cs b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.Serialization.cs index 4f9d48a17500..c646abac64dd 100644 --- a/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.Serialization.cs +++ b/sdk/informaticadatamanagement/Azure.ResourceManager.InformaticaDataManagement/src/Generated/InformaticaServerlessRuntimeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.InformaticaDataManagement { public partial class InformaticaServerlessRuntimeResource : IJsonModel { + private static InformaticaServerlessRuntimeData s_dataDeserializationInstance; + private static InformaticaServerlessRuntimeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InformaticaServerlessRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InformaticaServerlessRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerInformaticaDataManagementContext.Default); InformaticaServerlessRuntimeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerInformaticaDataManagementContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md index 1e35e56120bc..dad45de6fd86 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2025-06-02) ### Features Added @@ -11,10 +11,6 @@ - Renamed models as per previous API/SDK review instructions to align with standard naming conventions -### Bugs Fixed - -### Other Changes - ## 1.0.1 (2025-03-11) ### Features Added diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisSummaryResource.Serialization.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisSummaryResource.Serialization.cs index 7224da954db7..f5a154dd5fe2 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisSummaryResource.Serialization.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisSummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotFirmwareDefense { public partial class FirmwareAnalysisSummaryResource : IJsonModel { + private static FirmwareAnalysisSummaryData s_dataDeserializationInstance; + private static FirmwareAnalysisSummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirmwareAnalysisSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirmwareAnalysisSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); FirmwareAnalysisSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisWorkspaceResource.Serialization.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisWorkspaceResource.Serialization.cs index 27496ea824ac..330ca27394a7 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisWorkspaceResource.Serialization.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/FirmwareAnalysisWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotFirmwareDefense { public partial class FirmwareAnalysisWorkspaceResource : IJsonModel { + private static FirmwareAnalysisWorkspaceData s_dataDeserializationInstance; + private static FirmwareAnalysisWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirmwareAnalysisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirmwareAnalysisWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); FirmwareAnalysisWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/IotFirmwareResource.Serialization.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/IotFirmwareResource.Serialization.cs index be3321be152a..9b0300692d87 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/IotFirmwareResource.Serialization.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/IotFirmwareResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotFirmwareDefense { public partial class IotFirmwareResource : IJsonModel { + private static IotFirmwareData s_dataDeserializationInstance; + private static IotFirmwareData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotFirmwareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotFirmwareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); IotFirmwareData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/UsageMetricResource.Serialization.cs b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/UsageMetricResource.Serialization.cs index c729d98370bb..4d88321cdee5 100644 --- a/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/UsageMetricResource.Serialization.cs +++ b/sdk/iot/Azure.ResourceManager.IotFirmwareDefense/src/Generated/UsageMetricResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotFirmwareDefense { public partial class UsageMetricResource : IJsonModel { + private static UsageMetricData s_dataDeserializationInstance; + private static UsageMetricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - UsageMetricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + UsageMetricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); UsageMetricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotFirmwareDefenseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralAppResource.Serialization.cs b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralAppResource.Serialization.cs index 4bfa01aa8a72..d09b5da1ed81 100644 --- a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralAppResource.Serialization.cs +++ b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotCentral { public partial class IotCentralAppResource : IJsonModel { + private static IotCentralAppData s_dataDeserializationInstance; + private static IotCentralAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotCentralAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotCentralAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotCentralContext.Default); IotCentralAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotCentralContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateEndpointConnectionResource.Serialization.cs b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateEndpointConnectionResource.Serialization.cs index f63fa2022a82..e9803b92d673 100644 --- a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotCentral { public partial class IotCentralPrivateEndpointConnectionResource : IJsonModel { + private static IotCentralPrivateEndpointConnectionData s_dataDeserializationInstance; + private static IotCentralPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotCentralPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotCentralPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotCentralContext.Default); IotCentralPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotCentralContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateLinkResource.Serialization.cs b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateLinkResource.Serialization.cs index e3069d379bf0..7fba647b28f3 100644 --- a/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateLinkResource.Serialization.cs +++ b/sdk/iotcentral/Azure.ResourceManager.IotCentral/src/Generated/IotCentralPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotCentral { public partial class IotCentralPrivateLinkResource : IJsonModel { + private static IotCentralPrivateLinkResourceData s_dataDeserializationInstance; + private static IotCentralPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotCentralPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotCentralPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotCentralContext.Default); IotCentralPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotCentralContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoResource.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoResource.Serialization.cs index 3b13f1e73acd..d64150e1aaba 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoResource.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/EventHubConsumerGroupInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotHub { public partial class EventHubConsumerGroupInfoResource : IJsonModel { + private static EventHubConsumerGroupInfoData s_dataDeserializationInstance; + private static EventHubConsumerGroupInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EventHubConsumerGroupInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EventHubConsumerGroupInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotHubContext.Default); EventHubConsumerGroupInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionResource.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionResource.Serialization.cs index c5cd0f7730ee..36d21ead7be9 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionResource.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubCertificateDescriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotHub { public partial class IotHubCertificateDescriptionResource : IJsonModel { + private static IotHubCertificateDescriptionData s_dataDeserializationInstance; + private static IotHubCertificateDescriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotHubCertificateDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotHubCertificateDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotHubContext.Default); IotHubCertificateDescriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionResource.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionResource.Serialization.cs index 7df796b6b320..2cb2394f725a 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionResource.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubDescriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotHub { public partial class IotHubDescriptionResource : IJsonModel { + private static IotHubDescriptionData s_dataDeserializationInstance; + private static IotHubDescriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotHubDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotHubDescriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotHubContext.Default); IotHubDescriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionResource.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionResource.Serialization.cs index 1c3044f80c09..e8b038d263ef 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotHub { public partial class IotHubPrivateEndpointConnectionResource : IJsonModel { + private static IotHubPrivateEndpointConnectionData s_dataDeserializationInstance; + private static IotHubPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotHubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotHubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotHubContext.Default); IotHubPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationResource.Serialization.cs b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationResource.Serialization.cs index b184238b82e8..bb89936f2ac2 100644 --- a/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationResource.Serialization.cs +++ b/sdk/iothub/Azure.ResourceManager.IotHub/src/Generated/IotHubPrivateEndpointGroupInformationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotHub { public partial class IotHubPrivateEndpointGroupInformationResource : IJsonModel { + private static IotHubPrivateEndpointGroupInformationData s_dataDeserializationInstance; + private static IotHubPrivateEndpointGroupInformationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotHubPrivateEndpointGroupInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotHubPrivateEndpointGroupInformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotHubContext.Default); IotHubPrivateEndpointGroupInformationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.Serialization.cs index 154f006deb56..f5e7f24aa4ce 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsBrokerAuthenticationResource : IJsonModel { + private static IotOperationsBrokerAuthenticationData s_dataDeserializationInstance; + private static IotOperationsBrokerAuthenticationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsBrokerAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsBrokerAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsBrokerAuthenticationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.Serialization.cs index c85978542aa6..4118768085e3 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsBrokerAuthorizationResource : IJsonModel { + private static IotOperationsBrokerAuthorizationData s_dataDeserializationInstance; + private static IotOperationsBrokerAuthorizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsBrokerAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsBrokerAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsBrokerAuthorizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.Serialization.cs index fdf6d3378717..1af7cca8c728 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsBrokerListenerResource : IJsonModel { + private static IotOperationsBrokerListenerData s_dataDeserializationInstance; + private static IotOperationsBrokerListenerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsBrokerListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsBrokerListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsBrokerListenerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.Serialization.cs index 5bf83a27bf56..3a3f1cacf439 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsBrokerResource : IJsonModel { + private static IotOperationsBrokerData s_dataDeserializationInstance; + private static IotOperationsBrokerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsBrokerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsBrokerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsBrokerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.Serialization.cs index 1a906fd78833..137115b0a054 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsDataflowEndpointResource : IJsonModel { + private static IotOperationsDataflowEndpointData s_dataDeserializationInstance; + private static IotOperationsDataflowEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsDataflowEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsDataflowEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsDataflowEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.Serialization.cs index 723547628eb1..391252d9c273 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsDataflowProfileResource : IJsonModel { + private static IotOperationsDataflowProfileData s_dataDeserializationInstance; + private static IotOperationsDataflowProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsDataflowProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsDataflowProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsDataflowProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.Serialization.cs index 4f44bcdf6598..0f62ae74fc94 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsDataflowResource : IJsonModel { + private static IotOperationsDataflowData s_dataDeserializationInstance; + private static IotOperationsDataflowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsDataflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsDataflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsDataflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.Serialization.cs index 05dcb3fa7d2d..f87d4d2f7a27 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.IotOperations { public partial class IotOperationsInstanceResource : IJsonModel { + private static IotOperationsInstanceData s_dataDeserializationInstance; + private static IotOperationsInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotOperationsInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotOperationsInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); IotOperationsInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.Serialization.cs index fe3cc08003a4..c2777d97ad2a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedKeyVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class DeletedKeyVaultResource : IJsonModel { + private static DeletedKeyVaultData s_dataDeserializationInstance; + private static DeletedKeyVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedKeyVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedKeyVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); DeletedKeyVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.Serialization.cs index e9368e5486d7..102d5b4c325b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/DeletedManagedHsmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class DeletedManagedHsmResource : IJsonModel { + private static DeletedManagedHsmData s_dataDeserializationInstance; + private static DeletedManagedHsmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedManagedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedManagedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); DeletedManagedHsmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.Serialization.cs index d1c22b5365b6..0423c72c85d9 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class KeyVaultPrivateEndpointConnectionResource : IJsonModel { + private static KeyVaultPrivateEndpointConnectionData s_dataDeserializationInstance; + private static KeyVaultPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KeyVaultPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KeyVaultPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); KeyVaultPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.Serialization.cs index bc1dfcb2aed2..b45d538c0cd6 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class KeyVaultResource : IJsonModel { + private static KeyVaultData s_dataDeserializationInstance; + private static KeyVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KeyVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KeyVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); KeyVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.Serialization.cs index 190f17acc621..69159ad41fa8 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/KeyVaultSecretResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class KeyVaultSecretResource : IJsonModel { + private static KeyVaultSecretData s_dataDeserializationInstance; + private static KeyVaultSecretData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KeyVaultSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KeyVaultSecretData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); KeyVaultSecretData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.Serialization.cs index 170fd5ecb9ba..28fd38a2659b 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class ManagedHsmPrivateEndpointConnectionResource : IJsonModel { + private static ManagedHsmPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ManagedHsmPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedHsmPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedHsmPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); ManagedHsmPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.Serialization.cs b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.Serialization.cs index 2dea89695801..3d5e0982970a 100644 --- a/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.Serialization.cs +++ b/sdk/keyvault/Azure.ResourceManager.KeyVault/src/Generated/ManagedHsmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KeyVault { public partial class ManagedHsmResource : IJsonModel { + private static ManagedHsmData s_dataDeserializationInstance; + private static ManagedHsmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedHsmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKeyVaultContext.Default); ManagedHsmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKeyVaultContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesClusterExtensionResource.Serialization.cs b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesClusterExtensionResource.Serialization.cs index 1df17c72e0d1..372470d13886 100644 --- a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesClusterExtensionResource.Serialization.cs +++ b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesClusterExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KubernetesConfiguration { public partial class KubernetesClusterExtensionResource : IJsonModel { + private static KubernetesClusterExtensionData s_dataDeserializationInstance; + private static KubernetesClusterExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KubernetesClusterExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KubernetesClusterExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKubernetesConfigurationContext.Default); KubernetesClusterExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKubernetesConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesFluxConfigurationResource.Serialization.cs b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesFluxConfigurationResource.Serialization.cs index 51a820d4299e..a7982e8a1533 100644 --- a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesFluxConfigurationResource.Serialization.cs +++ b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesFluxConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KubernetesConfiguration { public partial class KubernetesFluxConfigurationResource : IJsonModel { + private static KubernetesFluxConfigurationData s_dataDeserializationInstance; + private static KubernetesFluxConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KubernetesFluxConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KubernetesFluxConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKubernetesConfigurationContext.Default); KubernetesFluxConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKubernetesConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfigurationResource.Serialization.cs b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfigurationResource.Serialization.cs index 0f3f701cf6d6..d99ed74c3588 100644 --- a/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfigurationResource.Serialization.cs +++ b/sdk/kubernetesconfiguration/Azure.ResourceManager.KubernetesConfiguration/src/Generated/KubernetesSourceControlConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.KubernetesConfiguration { public partial class KubernetesSourceControlConfigurationResource : IJsonModel { + private static KubernetesSourceControlConfigurationData s_dataDeserializationInstance; + private static KubernetesSourceControlConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KubernetesSourceControlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KubernetesSourceControlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKubernetesConfigurationContext.Default); KubernetesSourceControlConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKubernetesConfigurationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationResource.Serialization.cs index f2632fb9f5b2..3b102b57ba61 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoAttachedDatabaseConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoAttachedDatabaseConfigurationResource : IJsonModel { + private static KustoAttachedDatabaseConfigurationData s_dataDeserializationInstance; + private static KustoAttachedDatabaseConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoAttachedDatabaseConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoAttachedDatabaseConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoAttachedDatabaseConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterPrincipalAssignmentResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterPrincipalAssignmentResource.Serialization.cs index b7a2b26ffc43..7f243b4649b5 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterPrincipalAssignmentResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterPrincipalAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoClusterPrincipalAssignmentResource : IJsonModel { + private static KustoClusterPrincipalAssignmentData s_dataDeserializationInstance; + private static KustoClusterPrincipalAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoClusterPrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoClusterPrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoClusterPrincipalAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.Serialization.cs index 41c72eef0d8a..dcbfdc158a6d 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoClusterResource : IJsonModel { + private static KustoClusterData s_dataDeserializationInstance; + private static KustoClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDataConnectionResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDataConnectionResource.Serialization.cs index b4b904f61dc7..6edb848ef4ac 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDataConnectionResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDataConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoDataConnectionResource : IJsonModel { + private static KustoDataConnectionData s_dataDeserializationInstance; + private static KustoDataConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoDataConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoDataConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoDataConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabasePrincipalAssignmentResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabasePrincipalAssignmentResource.Serialization.cs index a9d165ec4ca1..44c38350948a 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabasePrincipalAssignmentResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabasePrincipalAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoDatabasePrincipalAssignmentResource : IJsonModel { + private static KustoDatabasePrincipalAssignmentData s_dataDeserializationInstance; + private static KustoDatabasePrincipalAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoDatabasePrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoDatabasePrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoDatabasePrincipalAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.Serialization.cs index 8e3271626a4a..d5580f218174 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoDatabaseResource : IJsonModel { + private static KustoDatabaseData s_dataDeserializationInstance; + private static KustoDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoManagedPrivateEndpointResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoManagedPrivateEndpointResource.Serialization.cs index 127899ec9e4a..9eedeaffa818 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoManagedPrivateEndpointResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoManagedPrivateEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoManagedPrivateEndpointResource : IJsonModel { + private static KustoManagedPrivateEndpointData s_dataDeserializationInstance; + private static KustoManagedPrivateEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoManagedPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoManagedPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoManagedPrivateEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateEndpointConnectionResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateEndpointConnectionResource.Serialization.cs index fb8c94949338..1a3866667c25 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoPrivateEndpointConnectionResource : IJsonModel { + private static KustoPrivateEndpointConnectionData s_dataDeserializationInstance; + private static KustoPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateLinkResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateLinkResource.Serialization.cs index 5c15731896f9..4c6c7ac6d1eb 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateLinkResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoPrivateLinkResource : IJsonModel { + private static KustoPrivateLinkResourceData s_dataDeserializationInstance; + private static KustoPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoScriptResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoScriptResource.Serialization.cs index 979a2f778e82..314a2e947f42 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoScriptResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/KustoScriptResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class KustoScriptResource : IJsonModel { + private static KustoScriptData s_dataDeserializationInstance; + private static KustoScriptData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KustoScriptData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KustoScriptData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); KustoScriptData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.Serialization.cs b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.Serialization.cs index 1e7ca72c1242..984c6e726b3b 100644 --- a/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.Serialization.cs +++ b/sdk/kusto/Azure.ResourceManager.Kusto/src/Generated/SandboxCustomImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Kusto { public partial class SandboxCustomImageResource : IJsonModel { + private static SandboxCustomImageData s_dataDeserializationInstance; + private static SandboxCustomImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SandboxCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SandboxCustomImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerKustoContext.Default); SandboxCustomImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerKustoContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanResource.Serialization.cs index 1356257e941b..cee853502487 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabPlanResource : IJsonModel { + private static LabPlanData s_dataDeserializationInstance; + private static LabPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabResource.Serialization.cs index e54dc1811a0e..aa89fff0a5e2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabResource : IJsonModel { + private static LabData s_dataDeserializationInstance; + private static LabData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleResource.Serialization.cs index 733e5c29de7a..c2f844878568 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabServicesScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabServicesScheduleResource : IJsonModel { + private static LabServicesScheduleData s_dataDeserializationInstance; + private static LabServicesScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabServicesScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabServicesScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabServicesScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserResource.Serialization.cs index a49419fe736e..815ef2c095a2 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabUserResource : IJsonModel { + private static LabUserData s_dataDeserializationInstance; + private static LabUserData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabUserData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageResource.Serialization.cs index 0f07a8197f44..13755be5cbf0 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabVirtualMachineImageResource : IJsonModel { + private static LabVirtualMachineImageData s_dataDeserializationInstance; + private static LabVirtualMachineImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabVirtualMachineImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabVirtualMachineImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabVirtualMachineImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineResource.Serialization.cs b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineResource.Serialization.cs index 3ba16ae8f27c..5450128cfd8e 100644 --- a/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineResource.Serialization.cs +++ b/sdk/labservices/Azure.ResourceManager.LabServices/src/Generated/LabVirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LabServices { public partial class LabVirtualMachineResource : IJsonModel { + private static LabVirtualMachineData s_dataDeserializationInstance; + private static LabVirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LabVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LabVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLabServicesContext.Default); LabVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLabServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.Serialization.cs b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.Serialization.cs index 33754ebb53e6..36c26b4fc6fb 100644 --- a/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.Serialization.cs +++ b/sdk/lambdatesthyperexecute/Azure.ResourceManager.LambdaTestHyperExecute/src/Generated/LambdaTestHyperExecuteOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LambdaTestHyperExecute { public partial class LambdaTestHyperExecuteOrganizationResource : IJsonModel { + private static LambdaTestHyperExecuteOrganizationData s_dataDeserializationInstance; + private static LambdaTestHyperExecuteOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LambdaTestHyperExecuteOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LambdaTestHyperExecuteOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLambdaTestHyperExecuteContext.Default); LambdaTestHyperExecuteOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLambdaTestHyperExecuteContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/assets.json b/sdk/loadtestservice/Azure.Developer.LoadTesting/assets.json index 2d1d6a5b0420..f19786ebae45 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/assets.json +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/loadtestservice/Azure.Developer.LoadTesting", - "Tag": "net/loadtestservice/Azure.Developer.LoadTesting_72afcd7526" + "Tag": "net/loadtestservice/Azure.Developer.LoadTesting_577293327e" } diff --git a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs index e8fa27f6f6b1..72a921f17a8e 100644 --- a/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs +++ b/sdk/loadtestservice/Azure.Developer.LoadTesting/tests/LoadTestRunClientTest.cs @@ -105,6 +105,8 @@ public async Task BeginTestRun_PollOperation() [Category(REQUIRES_TEST_RUN)] public async Task GetTestRun() { + await _testRunOperation.WaitForCompletionAsync(); + var testRunResponse = await _loadTestRunClient.GetTestRunAsync(_testRunId); var testRun = testRunResponse.Value; Assert.NotNull(testRun); @@ -116,6 +118,8 @@ public async Task GetTestRun() [Category(REQUIRES_TEST_RUN)] public async Task GetTestRunFile() { + await _testRunOperation.WaitForCompletionAsync(); + var testRunFileResponse = await _loadTestRunClient.GetTestRunFileAsync(_testRunId, _fileName); Assert.NotNull(testRunFileResponse.Value); Assert.AreEqual(_fileName, testRunFileResponse.Value.FileName); @@ -126,6 +130,8 @@ public async Task GetTestRunFile() [Category(REQUIRES_TEST_RUN)] public async Task ListTestRuns() { + await _testRunOperation.WaitForCompletionAsync(); + int pageSizeHint = 2; var pagedResponse = _loadTestRunClient.GetTestRunsAsync(); @@ -163,6 +169,7 @@ public async Task ListTestRuns() [Category(SKIP_DELETE_TEST_RUN)] public async Task DeleteTestRun() { + await _testRunOperation.WaitForCompletionAsync(); Response response = await _loadTestRunClient.DeleteTestRunAsync(_testRunId); } @@ -180,6 +187,8 @@ public async Task StopTestRun() [Category(REQUIRES_TEST_RUN)] public async Task CreateOrUpdateAppComponents() { + await _testRunOperation.WaitForCompletionAsync(); + _resourceId = TestEnvironment.ResourceId; Response response = await _loadTestRunClient.CreateOrUpdateAppComponentsAsync( @@ -211,6 +220,8 @@ public async Task CreateOrUpdateAppComponents() [Category(REQUIRES_TEST_RUN)] public async Task GetAppComponents() { + await _testRunOperation.WaitForCompletionAsync(); + _resourceId = TestEnvironment.ResourceId; await _loadTestRunClient.CreateOrUpdateAppComponentsAsync( @@ -274,12 +285,16 @@ public async Task CreateOrUpdateServerMetricsConfig() ); JsonDocument jsonDocument = JsonDocument.Parse(response.Content.ToString()); Assert.AreEqual(_resourceId, jsonDocument.RootElement.GetProperty("metrics").GetProperty(_resourceId).GetProperty("resourceId").ToString()); + + await _testRunOperation.WaitForCompletionAsync(); } [Test] [Category(REQUIRES_TEST_RUN)] public async Task GetServerMetricsConfig() { + await _testRunOperation.WaitForCompletionAsync(); + _resourceId = TestEnvironment.ResourceId; await _loadTestRunClient.CreateOrUpdateServerMetricsConfigAsync( _testRunId, diff --git a/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingQuotaResource.Serialization.cs b/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingQuotaResource.Serialization.cs index 381426fe5363..b6280a672ef5 100644 --- a/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingQuotaResource.Serialization.cs +++ b/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingQuotaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LoadTesting { public partial class LoadTestingQuotaResource : IJsonModel { + private static LoadTestingQuotaData s_dataDeserializationInstance; + private static LoadTestingQuotaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LoadTestingQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LoadTestingQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLoadTestingContext.Default); LoadTestingQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLoadTestingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingResource.Serialization.cs b/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingResource.Serialization.cs index 10f39d6efe45..a4cb1e46d624 100644 --- a/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingResource.Serialization.cs +++ b/sdk/loadtestservice/Azure.ResourceManager.LoadTesting/src/Generated/LoadTestingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.LoadTesting { public partial class LoadTestingResource : IJsonModel { + private static LoadTestingResourceData s_dataDeserializationInstance; + private static LoadTestingResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LoadTestingResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LoadTestingResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLoadTestingContext.Default); LoadTestingResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLoadTestingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/loadtestservice/test-resources.bicep b/sdk/loadtestservice/test-resources.bicep index 1a5a4426b7ac..27ab314e5d55 100644 --- a/sdk/loadtestservice/test-resources.bicep +++ b/sdk/loadtestservice/test-resources.bicep @@ -1,8 +1,8 @@ param baseName string = resourceGroup().name -param location string = 'eastus' +param location string = 'centralus' resource loadTests 'Microsoft.LoadTestService/loadTests@2022-12-01' = { - name: '${baseName}-loadTests' + name: '${baseName}-csharpsdk-loadTests' location: location properties: { } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementResource.Serialization.cs index 59da80f0b0fa..120856e8065e 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAgreementResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountAgreementResource : IJsonModel { + private static IntegrationAccountAgreementData s_dataDeserializationInstance; + private static IntegrationAccountAgreementData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountAgreementData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountAgreementData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountAgreementData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionResource.Serialization.cs index ff889b820ad4..5f84cc368b6c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountAssemblyDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountAssemblyDefinitionResource : IJsonModel { + private static IntegrationAccountAssemblyDefinitionData s_dataDeserializationInstance; + private static IntegrationAccountAssemblyDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountAssemblyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountAssemblyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountAssemblyDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationResource.Serialization.cs index c3666d46f603..c17573859c09 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountBatchConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountBatchConfigurationResource : IJsonModel { + private static IntegrationAccountBatchConfigurationData s_dataDeserializationInstance; + private static IntegrationAccountBatchConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountBatchConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountBatchConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountBatchConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateResource.Serialization.cs index 0fe6a023f5a4..dcde9c6cb4d3 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountCertificateResource : IJsonModel { + private static IntegrationAccountCertificateData s_dataDeserializationInstance; + private static IntegrationAccountCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapResource.Serialization.cs index 394a6933c146..1b8acbbb5e81 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountMapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountMapResource : IJsonModel { + private static IntegrationAccountMapData s_dataDeserializationInstance; + private static IntegrationAccountMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerResource.Serialization.cs index 0cbf746910a0..97c791eda4a9 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountPartnerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountPartnerResource : IJsonModel { + private static IntegrationAccountPartnerData s_dataDeserializationInstance; + private static IntegrationAccountPartnerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountPartnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountPartnerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountResource.Serialization.cs index f0299a9aad8f..27f886f82b11 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountResource : IJsonModel { + private static IntegrationAccountData s_dataDeserializationInstance; + private static IntegrationAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaResource.Serialization.cs index 886f3208c6bf..0b7c04b305dc 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountSchemaResource : IJsonModel { + private static IntegrationAccountSchemaData s_dataDeserializationInstance; + private static IntegrationAccountSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionResource.Serialization.cs index ce96f1998c11..0948554a56c6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationAccountSessionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationAccountSessionResource : IJsonModel { + private static IntegrationAccountSessionData s_dataDeserializationInstance; + private static IntegrationAccountSessionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationAccountSessionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationAccountSessionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationAccountSessionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiResource.Serialization.cs index 04aa85a6c5de..202aa69319aa 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentManagedApiResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationServiceEnvironmentManagedApiResource : IJsonModel { + private static IntegrationServiceEnvironmentManagedApiData s_dataDeserializationInstance; + private static IntegrationServiceEnvironmentManagedApiData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationServiceEnvironmentManagedApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationServiceEnvironmentManagedApiData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationServiceEnvironmentManagedApiData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentResource.Serialization.cs index 64411d2405bd..9011e8882b4c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/IntegrationServiceEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class IntegrationServiceEnvironmentResource : IJsonModel { + private static IntegrationServiceEnvironmentData s_dataDeserializationInstance; + private static IntegrationServiceEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IntegrationServiceEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IntegrationServiceEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); IntegrationServiceEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowResource.Serialization.cs index e9e632ce0d6a..f7782539e165 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowResource : IJsonModel { + private static LogicWorkflowData s_dataDeserializationInstance; + private static LogicWorkflowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionRequestHistoryResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionRequestHistoryResource.Serialization.cs index e1abd981c619..48b99666d871 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionRequestHistoryResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionRequestHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunActionRepetitionRequestHistoryResource : IJsonModel { + private static LogicWorkflowRequestHistoryData s_dataDeserializationInstance; + private static LogicWorkflowRequestHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionResource.Serialization.cs index f77813358f07..19047d9c776d 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRepetitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunActionRepetitionResource : IJsonModel { + private static LogicWorkflowRunActionRepetitionDefinitionData s_dataDeserializationInstance; + private static LogicWorkflowRunActionRepetitionDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRequestHistoryResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRequestHistoryResource.Serialization.cs index 3888f8b685a2..773069cc045b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRequestHistoryResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionRequestHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunActionRequestHistoryResource : IJsonModel { + private static LogicWorkflowRequestHistoryData s_dataDeserializationInstance; + private static LogicWorkflowRequestHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionResource.Serialization.cs index 50e618675695..369f1fb5c637 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunActionResource : IJsonModel { + private static LogicWorkflowRunActionData s_dataDeserializationInstance; + private static LogicWorkflowRunActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionScopeRepetitionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionScopeRepetitionResource.Serialization.cs index 86a5bea5eb5b..5b47957fbf6a 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionScopeRepetitionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunActionScopeRepetitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunActionScopeRepetitionResource : IJsonModel { + private static LogicWorkflowRunActionRepetitionDefinitionData s_dataDeserializationInstance; + private static LogicWorkflowRunActionRepetitionDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunOperationResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunOperationResource.Serialization.cs index a5d4dcf04320..1259f951cba6 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunOperationResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunOperationResource : IJsonModel { + private static LogicWorkflowRunData s_dataDeserializationInstance; + private static LogicWorkflowRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunResource.Serialization.cs index f79908d91a1a..7f519d68b651 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowRunResource : IJsonModel { + private static LogicWorkflowRunData s_dataDeserializationInstance; + private static LogicWorkflowRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryResource.Serialization.cs index 5235752f3fa7..067cd2a2ea0b 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowTriggerHistoryResource : IJsonModel { + private static LogicWorkflowTriggerHistoryData s_dataDeserializationInstance; + private static LogicWorkflowTriggerHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerResource.Serialization.cs index d3a89faa4673..b3b8b2b9541c 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowTriggerResource : IJsonModel { + private static LogicWorkflowTriggerData s_dataDeserializationInstance; + private static LogicWorkflowTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionResource.Serialization.cs b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionResource.Serialization.cs index 9bfbfa43c2b2..32d6d4dc5785 100644 --- a/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionResource.Serialization.cs +++ b/sdk/logic/Azure.ResourceManager.Logic/src/Generated/LogicWorkflowVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Logic { public partial class LogicWorkflowVersionResource : IJsonModel { + private static LogicWorkflowVersionData s_dataDeserializationInstance; + private static LogicWorkflowVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicWorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicWorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerLogicContext.Default); LogicWorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerLogicContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/src/Generated/OperationalizationClusterResource.Serialization.cs b/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/src/Generated/OperationalizationClusterResource.Serialization.cs index edc691fd5a90..402dc0d79f2d 100644 --- a/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/src/Generated/OperationalizationClusterResource.Serialization.cs +++ b/sdk/machinelearningcompute/Azure.ResourceManager.MachineLearningCompute/src/Generated/OperationalizationClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearningCompute { public partial class OperationalizationClusterResource : IJsonModel { + private static OperationalizationClusterData s_dataDeserializationInstance; + private static OperationalizationClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalizationClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalizationClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningComputeContext.Default); OperationalizationClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningComputeContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.Serialization.cs index dfcb42288a1d..d6c4bc711ef7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearninRegistryComponentContainerResource : IJsonModel { + private static MachineLearningComponentContainerData s_dataDeserializationInstance; + private static MachineLearningComponentContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningComponentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningComponentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningComponentContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.Serialization.cs index dc96738806db..8fd7ba05587d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearninRegistryComponentVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearninRegistryComponentVersionResource : IJsonModel { + private static MachineLearningComponentVersionData s_dataDeserializationInstance; + private static MachineLearningComponentVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningComponentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningComponentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningComponentVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.Serialization.cs index a1f1b61e0788..766ce19549f7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningBatchDeploymentResource : IJsonModel { + private static MachineLearningBatchDeploymentData s_dataDeserializationInstance; + private static MachineLearningBatchDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningBatchDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningBatchDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningBatchDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.Serialization.cs index d66bb40a5e7f..3f2d6118bda9 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningBatchEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningBatchEndpointResource : IJsonModel { + private static MachineLearningBatchEndpointData s_dataDeserializationInstance; + private static MachineLearningBatchEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningBatchEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningBatchEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningBatchEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.Serialization.cs index 4bc5890edb56..d203ac33866f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningCodeContainerResource : IJsonModel { + private static MachineLearningCodeContainerData s_dataDeserializationInstance; + private static MachineLearningCodeContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningCodeContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningCodeContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningCodeContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.Serialization.cs index 8998a699e2f4..abd253bd3fb5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningCodeVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningCodeVersionResource : IJsonModel { + private static MachineLearningCodeVersionData s_dataDeserializationInstance; + private static MachineLearningCodeVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningCodeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningCodeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningCodeVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.Serialization.cs index b6aa3e35ef3a..eaa62276f4aa 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningComponentContainerResource : IJsonModel { + private static MachineLearningComponentContainerData s_dataDeserializationInstance; + private static MachineLearningComponentContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningComponentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningComponentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningComponentContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.Serialization.cs index 96cae94d2c73..c969b775cdf4 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComponentVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningComponentVersionResource : IJsonModel { + private static MachineLearningComponentVersionData s_dataDeserializationInstance; + private static MachineLearningComponentVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningComponentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningComponentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningComponentVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.Serialization.cs index 483d5334d073..730b00602043 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningComputeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningComputeResource : IJsonModel { + private static MachineLearningComputeData s_dataDeserializationInstance; + private static MachineLearningComputeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningComputeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningComputeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.Serialization.cs index d44ac1a36dcb..87d7e90ee7bb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningDataContainerResource : IJsonModel { + private static MachineLearningDataContainerData s_dataDeserializationInstance; + private static MachineLearningDataContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningDataContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningDataContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningDataContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.Serialization.cs index 073060a06852..28b370f6eeea 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDataVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningDataVersionResource : IJsonModel { + private static MachineLearningDataVersionData s_dataDeserializationInstance; + private static MachineLearningDataVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningDataVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningDataVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningDataVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.Serialization.cs index 871907292890..0cb122d04a99 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningDatastoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningDatastoreResource : IJsonModel { + private static MachineLearningDatastoreData s_dataDeserializationInstance; + private static MachineLearningDatastoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningDatastoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningDatastoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.Serialization.cs index eaae58616d09..d217302b6400 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningEnvironmentContainerResource : IJsonModel { + private static MachineLearningEnvironmentContainerData s_dataDeserializationInstance; + private static MachineLearningEnvironmentContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningEnvironmentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningEnvironmentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningEnvironmentContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.Serialization.cs index ef346ab513dd..7c07e175f939 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningEnvironmentVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningEnvironmentVersionResource : IJsonModel { + private static MachineLearningEnvironmentVersionData s_dataDeserializationInstance; + private static MachineLearningEnvironmentVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningEnvironmentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningEnvironmentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningEnvironmentVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.Serialization.cs index 425d2b965cc6..0f0f3150c014 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningFeatureResource : IJsonModel { + private static MachineLearningFeatureData s_dataDeserializationInstance; + private static MachineLearningFeatureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningFeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.Serialization.cs index 303af55daf7d..2c42b1ef46ca 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningFeatureSetContainerResource : IJsonModel { + private static MachineLearningFeatureSetContainerData s_dataDeserializationInstance; + private static MachineLearningFeatureSetContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningFeatureSetContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningFeatureSetContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningFeatureSetContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.Serialization.cs index a8b659006fa5..096a36945273 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureSetVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningFeatureSetVersionResource : IJsonModel { + private static MachineLearningFeatureSetVersionData s_dataDeserializationInstance; + private static MachineLearningFeatureSetVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningFeatureSetVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningFeatureSetVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningFeatureSetVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.Serialization.cs index 6336085b9be4..9be0127febc0 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeatureStoreEntityContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningFeatureStoreEntityContainerResource : IJsonModel { + private static MachineLearningFeatureStoreEntityContainerData s_dataDeserializationInstance; + private static MachineLearningFeatureStoreEntityContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningFeatureStoreEntityContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningFeatureStoreEntityContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningFeatureStoreEntityContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.Serialization.cs index b8c79bda5659..33d3499e78f6 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningFeaturestoreEntityVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningFeaturestoreEntityVersionResource : IJsonModel { + private static MachineLearningFeaturestoreEntityVersionData s_dataDeserializationInstance; + private static MachineLearningFeaturestoreEntityVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningFeaturestoreEntityVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningFeaturestoreEntityVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningFeaturestoreEntityVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.Serialization.cs index c7985ebec5e0..8ca6ccc77866 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningJobResource : IJsonModel { + private static MachineLearningJobData s_dataDeserializationInstance; + private static MachineLearningJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningMarketplaceSubscriptionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningMarketplaceSubscriptionResource.Serialization.cs index e7aa81d4408a..35d699a806ed 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningMarketplaceSubscriptionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningMarketplaceSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningMarketplaceSubscriptionResource : IJsonModel { + private static MachineLearningMarketplaceSubscriptionData s_dataDeserializationInstance; + private static MachineLearningMarketplaceSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningMarketplaceSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningMarketplaceSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningMarketplaceSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.Serialization.cs index f6c456a38cb6..cc8644c2daa5 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningModelContainerResource : IJsonModel { + private static MachineLearningModelContainerData s_dataDeserializationInstance; + private static MachineLearningModelContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningModelContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningModelContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningModelContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.Serialization.cs index 40cad4bf9c67..d75b878abb0f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningModelVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningModelVersionResource : IJsonModel { + private static MachineLearningModelVersionData s_dataDeserializationInstance; + private static MachineLearningModelVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningModelVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningModelVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningModelVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.Serialization.cs index 1b92caeb863a..2755e8ed6f60 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningOnlineDeploymentResource : IJsonModel { + private static MachineLearningOnlineDeploymentData s_dataDeserializationInstance; + private static MachineLearningOnlineDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningOnlineDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningOnlineDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningOnlineDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.Serialization.cs index 6e1dc8b8d28c..5f1d3da6300f 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOnlineEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningOnlineEndpointResource : IJsonModel { + private static MachineLearningOnlineEndpointData s_dataDeserializationInstance; + private static MachineLearningOnlineEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningOnlineEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningOnlineEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningOnlineEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.Serialization.cs index e75d6cb69921..6f3320c3ba85 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningOutboundRuleBasicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningOutboundRuleBasicResource : IJsonModel { + private static MachineLearningOutboundRuleBasicData s_dataDeserializationInstance; + private static MachineLearningOutboundRuleBasicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningOutboundRuleBasicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningOutboundRuleBasicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningOutboundRuleBasicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.Serialization.cs index a04abdff119c..9c3fb3036e6e 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningPrivateEndpointConnectionResource : IJsonModel { + private static MachineLearningPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MachineLearningPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.Serialization.cs index cc9a7fb83d6c..54636059939c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryCodeContainerResource : IJsonModel { + private static MachineLearningCodeContainerData s_dataDeserializationInstance; + private static MachineLearningCodeContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningCodeContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningCodeContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningCodeContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.Serialization.cs index 53a791df607f..f3a1b91ba4cb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryCodeVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryCodeVersionResource : IJsonModel { + private static MachineLearningCodeVersionData s_dataDeserializationInstance; + private static MachineLearningCodeVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningCodeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningCodeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningCodeVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.Serialization.cs index 7607f2373820..632574363387 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryDataContainerResource : IJsonModel { + private static MachineLearningDataContainerData s_dataDeserializationInstance; + private static MachineLearningDataContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningDataContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningDataContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningDataContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.Serialization.cs index efbad9bf44c2..ef6adfe37d2b 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryDataVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryDataVersionResource : IJsonModel { + private static MachineLearningDataVersionData s_dataDeserializationInstance; + private static MachineLearningDataVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningDataVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningDataVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningDataVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.Serialization.cs index 2c9135389e2d..270df28cf2d7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryEnvironmentContainerResource : IJsonModel { + private static MachineLearningEnvironmentContainerData s_dataDeserializationInstance; + private static MachineLearningEnvironmentContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningEnvironmentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningEnvironmentContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningEnvironmentContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.Serialization.cs index 48a788d7e219..1298c50ce99c 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryEnvironmentVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryEnvironmentVersionResource : IJsonModel { + private static MachineLearningEnvironmentVersionData s_dataDeserializationInstance; + private static MachineLearningEnvironmentVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningEnvironmentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningEnvironmentVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningEnvironmentVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.Serialization.cs index a9eaf387f67d..0e72129418b7 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryModelContainerResource : IJsonModel { + private static MachineLearningModelContainerData s_dataDeserializationInstance; + private static MachineLearningModelContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningModelContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningModelContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningModelContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.Serialization.cs index 3d7545459591..7b30ed26d2cb 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryModelVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryModelVersionResource : IJsonModel { + private static MachineLearningModelVersionData s_dataDeserializationInstance; + private static MachineLearningModelVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningModelVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningModelVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningModelVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.Serialization.cs index b65edab4a37d..1a51196abcd1 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningRegistryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningRegistryResource : IJsonModel { + private static MachineLearningRegistryData s_dataDeserializationInstance; + private static MachineLearningRegistryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningRegistryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningRegistryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.Serialization.cs index ba488d2ae333..f0641a63d026 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningScheduleResource : IJsonModel { + private static MachineLearningScheduleData s_dataDeserializationInstance; + private static MachineLearningScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningServerlessEndpointResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningServerlessEndpointResource.Serialization.cs index 1e46c75c720d..445764013310 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningServerlessEndpointResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningServerlessEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningServerlessEndpointResource : IJsonModel { + private static MachineLearningServerlessEndpointData s_dataDeserializationInstance; + private static MachineLearningServerlessEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningServerlessEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningServerlessEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningServerlessEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.Serialization.cs index 4737c9de0b41..3d68ba3a7e57 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningWorkspaceConnectionResource : IJsonModel { + private static MachineLearningWorkspaceConnectionData s_dataDeserializationInstance; + private static MachineLearningWorkspaceConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningWorkspaceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningWorkspaceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningWorkspaceConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.Serialization.cs b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.Serialization.cs index 3a6da4d09fa6..bbf206db443d 100644 --- a/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.Serialization.cs +++ b/sdk/machinelearningservices/Azure.ResourceManager.MachineLearning/src/Generated/MachineLearningWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MachineLearning { public partial class MachineLearningWorkspaceResource : IJsonModel { + private static MachineLearningWorkspaceData s_dataDeserializationInstance; + private static MachineLearningWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MachineLearningWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MachineLearningWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMachineLearningContext.Default); MachineLearningWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMachineLearningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceApplyUpdateResource.Serialization.cs b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceApplyUpdateResource.Serialization.cs index 3d8ef9875699..36f7cf80c83d 100644 --- a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceApplyUpdateResource.Serialization.cs +++ b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceApplyUpdateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Maintenance { public partial class MaintenanceApplyUpdateResource : IJsonModel { + private static MaintenanceApplyUpdateData s_dataDeserializationInstance; + private static MaintenanceApplyUpdateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MaintenanceApplyUpdateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MaintenanceApplyUpdateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMaintenanceContext.Default); MaintenanceApplyUpdateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMaintenanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceConfigurationResource.Serialization.cs b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceConfigurationResource.Serialization.cs index 2e494423506d..6bc8a0d7f80a 100644 --- a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceConfigurationResource.Serialization.cs +++ b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenanceConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Maintenance { public partial class MaintenanceConfigurationResource : IJsonModel { + private static MaintenanceConfigurationData s_dataDeserializationInstance; + private static MaintenanceConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMaintenanceContext.Default); MaintenanceConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMaintenanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenancePublicConfigurationResource.Serialization.cs b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenancePublicConfigurationResource.Serialization.cs index ed09ca02028e..3cadf2bc2b66 100644 --- a/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenancePublicConfigurationResource.Serialization.cs +++ b/sdk/maintenance/Azure.ResourceManager.Maintenance/src/Generated/MaintenancePublicConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Maintenance { public partial class MaintenancePublicConfigurationResource : IJsonModel { + private static MaintenanceConfigurationData s_dataDeserializationInstance; + private static MaintenanceConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MaintenanceConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMaintenanceContext.Default); MaintenanceConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMaintenanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkGroupResource.Serialization.cs b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkGroupResource.Serialization.cs index e25c8540017e..0165daed15cc 100644 --- a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkGroupResource.Serialization.cs +++ b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetwork { public partial class ManagedNetworkGroupResource : IJsonModel { + private static ManagedNetworkGroupData s_dataDeserializationInstance; + private static ManagedNetworkGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedNetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedNetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkContext.Default); ManagedNetworkGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkPeeringPolicyResource.Serialization.cs b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkPeeringPolicyResource.Serialization.cs index 9ba744b347cc..a3a37f50adc4 100644 --- a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkPeeringPolicyResource.Serialization.cs +++ b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkPeeringPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetwork { public partial class ManagedNetworkPeeringPolicyResource : IJsonModel { + private static ManagedNetworkPeeringPolicyData s_dataDeserializationInstance; + private static ManagedNetworkPeeringPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedNetworkPeeringPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedNetworkPeeringPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkContext.Default); ManagedNetworkPeeringPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkResource.Serialization.cs b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkResource.Serialization.cs index bb1dd92bebee..1e5306261619 100644 --- a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkResource.Serialization.cs +++ b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ManagedNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetwork { public partial class ManagedNetworkResource : IJsonModel { + private static ManagedNetworkData s_dataDeserializationInstance; + private static ManagedNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkContext.Default); ManagedNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ScopeAssignmentResource.Serialization.cs b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ScopeAssignmentResource.Serialization.cs index 398327c73797..b318c8df0e14 100644 --- a/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ScopeAssignmentResource.Serialization.cs +++ b/sdk/managednetwork/Azure.ResourceManager.ManagedNetwork/src/Generated/ScopeAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetwork { public partial class ScopeAssignmentResource : IJsonModel { + private static ScopeAssignmentData s_dataDeserializationInstance; + private static ScopeAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScopeAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScopeAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkContext.Default); ScopeAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.Serialization.cs index ade58fcc480c..fca8e3aa32ab 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceInterfaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkDeviceInterfaceResource : IJsonModel { + private static NetworkDeviceInterfaceData s_dataDeserializationInstance; + private static NetworkDeviceInterfaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkDeviceInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkDeviceInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkDeviceInterfaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.Serialization.cs index f64af9b3774d..3abe2868190d 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkDeviceResource : IJsonModel { + private static NetworkDeviceData s_dataDeserializationInstance; + private static NetworkDeviceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkDeviceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.Serialization.cs index b35e125baf13..94002ff59098 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkDeviceSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkDeviceSkuResource : IJsonModel { + private static NetworkDeviceSkuData s_dataDeserializationInstance; + private static NetworkDeviceSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkDeviceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkDeviceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkDeviceSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.Serialization.cs index 890324d2e19b..8d6491c7d079 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricAccessControlListResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricAccessControlListResource : IJsonModel { + private static NetworkFabricAccessControlListData s_dataDeserializationInstance; + private static NetworkFabricAccessControlListData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricAccessControlListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricAccessControlListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricAccessControlListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.Serialization.cs index fd79ddedf189..e4c887bf7e47 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricControllerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricControllerResource : IJsonModel { + private static NetworkFabricControllerData s_dataDeserializationInstance; + private static NetworkFabricControllerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricControllerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.Serialization.cs index 12ca1e2ba8bc..320b55b02987 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricExternalNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricExternalNetworkResource : IJsonModel { + private static NetworkFabricExternalNetworkData s_dataDeserializationInstance; + private static NetworkFabricExternalNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricExternalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricExternalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricExternalNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.Serialization.cs index 8d23654f4831..79548a7c23f2 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPCommunityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricIPCommunityResource : IJsonModel { + private static NetworkFabricIPCommunityData s_dataDeserializationInstance; + private static NetworkFabricIPCommunityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricIPCommunityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricIPCommunityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricIPCommunityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.Serialization.cs index 2a8effff0210..6614a979e1cf 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPExtendedCommunityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricIPExtendedCommunityResource : IJsonModel { + private static NetworkFabricIPExtendedCommunityData s_dataDeserializationInstance; + private static NetworkFabricIPExtendedCommunityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricIPExtendedCommunityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricIPExtendedCommunityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricIPExtendedCommunityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.Serialization.cs index 94e7ea41a4d0..bf10a9ee6104 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricIPPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricIPPrefixResource : IJsonModel { + private static NetworkFabricIPPrefixData s_dataDeserializationInstance; + private static NetworkFabricIPPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricIPPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.Serialization.cs index 882bd189746d..f88fcdb00ac5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternalNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricInternalNetworkResource : IJsonModel { + private static NetworkFabricInternalNetworkData s_dataDeserializationInstance; + private static NetworkFabricInternalNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricInternalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricInternalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricInternalNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.Serialization.cs index ca6519fef6a3..d544500c013e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricInternetGatewayResource : IJsonModel { + private static NetworkFabricInternetGatewayData s_dataDeserializationInstance; + private static NetworkFabricInternetGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricInternetGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricInternetGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricInternetGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.Serialization.cs index bdf037d121f9..aa49f158e916 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricInternetGatewayRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricInternetGatewayRuleResource : IJsonModel { + private static NetworkFabricInternetGatewayRuleData s_dataDeserializationInstance; + private static NetworkFabricInternetGatewayRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricInternetGatewayRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricInternetGatewayRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricInternetGatewayRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.Serialization.cs index 01f61e08c31d..a9ddcf046b45 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL2IsolationDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricL2IsolationDomainResource : IJsonModel { + private static NetworkFabricL2IsolationDomainData s_dataDeserializationInstance; + private static NetworkFabricL2IsolationDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricL2IsolationDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricL2IsolationDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricL2IsolationDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.Serialization.cs index 64ccee3d1665..56154c82be98 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricL3IsolationDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricL3IsolationDomainResource : IJsonModel { + private static NetworkFabricL3IsolationDomainData s_dataDeserializationInstance; + private static NetworkFabricL3IsolationDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricL3IsolationDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricL3IsolationDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricL3IsolationDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.Serialization.cs index 6b064c504280..89bf27ce3c71 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricNeighborGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricNeighborGroupResource : IJsonModel { + private static NetworkFabricNeighborGroupData s_dataDeserializationInstance; + private static NetworkFabricNeighborGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricNeighborGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricNeighborGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricNeighborGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.Serialization.cs index 3e4a493dc97b..6c6c637e09e5 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricResource : IJsonModel { + private static NetworkFabricData s_dataDeserializationInstance; + private static NetworkFabricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.Serialization.cs index 4f92d8abc6bf..b3b48be64e95 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricRoutePolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricRoutePolicyResource : IJsonModel { + private static NetworkFabricRoutePolicyData s_dataDeserializationInstance; + private static NetworkFabricRoutePolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricRoutePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricRoutePolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricRoutePolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.Serialization.cs index 670cb4be14a9..4e0e9fb3090e 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkFabricSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkFabricSkuResource : IJsonModel { + private static NetworkFabricSkuData s_dataDeserializationInstance; + private static NetworkFabricSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFabricSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFabricSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkFabricSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.Serialization.cs index 0744e13aae10..2426482f1874 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkPacketBrokerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkPacketBrokerResource : IJsonModel { + private static NetworkPacketBrokerData s_dataDeserializationInstance; + private static NetworkPacketBrokerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkPacketBrokerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkPacketBrokerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkPacketBrokerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackResource.Serialization.cs index 580453f05ff1..8166f5ab5998 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkRackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkRackResource : IJsonModel { + private static NetworkRackData s_dataDeserializationInstance; + private static NetworkRackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkRackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkRackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkRackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.Serialization.cs index e8251cf73683..6a1f37b78cab 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkTapResource : IJsonModel { + private static NetworkTapData s_dataDeserializationInstance; + private static NetworkTapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkTapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.Serialization.cs index e5301adde946..10e7b9d5256c 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkTapRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkTapRuleResource : IJsonModel { + private static NetworkTapRuleData s_dataDeserializationInstance; + private static NetworkTapRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkTapRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkTapRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkTapRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.Serialization.cs b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.Serialization.cs index ad894d245057..3124e682b756 100644 --- a/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.Serialization.cs +++ b/sdk/managednetworkfabric/Azure.ResourceManager.ManagedNetworkFabric/src/Generated/NetworkToNetworkInterconnectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedNetworkFabric { public partial class NetworkToNetworkInterconnectResource : IJsonModel { + private static NetworkToNetworkInterconnectData s_dataDeserializationInstance; + private static NetworkToNetworkInterconnectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkToNetworkInterconnectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkToNetworkInterconnectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedNetworkFabricContext.Default); NetworkToNetworkInterconnectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedNetworkFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialResource.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialResource.Serialization.cs index e984d7eb674d..015db40b6738 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialResource.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/FederatedIdentityCredentialResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServiceIdentities { public partial class FederatedIdentityCredentialResource : IJsonModel { + private static FederatedIdentityCredentialData s_dataDeserializationInstance; + private static FederatedIdentityCredentialData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FederatedIdentityCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FederatedIdentityCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); FederatedIdentityCredentialData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityResource.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityResource.Serialization.cs index 01034856cb41..94633c265e4b 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityResource.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/SystemAssignedIdentityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServiceIdentities { public partial class SystemAssignedIdentityResource : IJsonModel { + private static SystemAssignedIdentityData s_dataDeserializationInstance; + private static SystemAssignedIdentityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SystemAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SystemAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); SystemAssignedIdentityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityResource.Serialization.cs b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityResource.Serialization.cs index 433c5fe62dbc..ccb0abbc93cf 100644 --- a/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityResource.Serialization.cs +++ b/sdk/managedserviceidentity/Azure.ResourceManager.ManagedServiceIdentities/src/Generated/UserAssignedIdentityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServiceIdentities { public partial class UserAssignedIdentityResource : IJsonModel { + private static UserAssignedIdentityData s_dataDeserializationInstance; + private static UserAssignedIdentityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - UserAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + UserAssignedIdentityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); UserAssignedIdentityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServiceIdentitiesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesMarketplaceRegistrationResource.Serialization.cs b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesMarketplaceRegistrationResource.Serialization.cs index 921e6f622abc..998e2d64b002 100644 --- a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesMarketplaceRegistrationResource.Serialization.cs +++ b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesMarketplaceRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServices { public partial class ManagedServicesMarketplaceRegistrationResource : IJsonModel { + private static ManagedServicesMarketplaceRegistrationData s_dataDeserializationInstance; + private static ManagedServicesMarketplaceRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedServicesMarketplaceRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedServicesMarketplaceRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServicesContext.Default); ManagedServicesMarketplaceRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationAssignmentResource.Serialization.cs b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationAssignmentResource.Serialization.cs index 6237b3a22b2d..b0b1bc744d87 100644 --- a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationAssignmentResource.Serialization.cs +++ b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServices { public partial class ManagedServicesRegistrationAssignmentResource : IJsonModel { + private static ManagedServicesRegistrationAssignmentData s_dataDeserializationInstance; + private static ManagedServicesRegistrationAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedServicesRegistrationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedServicesRegistrationAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServicesContext.Default); ManagedServicesRegistrationAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationResource.Serialization.cs b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationResource.Serialization.cs index 9c2d37b2585f..62f990b2c023 100644 --- a/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationResource.Serialization.cs +++ b/sdk/managedservices/Azure.ResourceManager.ManagedServices/src/Generated/ManagedServicesRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagedServices { public partial class ManagedServicesRegistrationResource : IJsonModel { + private static ManagedServicesRegistrationData s_dataDeserializationInstance; + private static ManagedServicesRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedServicesRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedServicesRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagedServicesContext.Default); ManagedServicesRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagedServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/src/Generated/PartnerResponseResource.Serialization.cs b/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/src/Generated/PartnerResponseResource.Serialization.cs index 76b358095743..44a0bfdfbe53 100644 --- a/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/src/Generated/PartnerResponseResource.Serialization.cs +++ b/sdk/managementpartner/Azure.ResourceManager.ManagementPartner/src/Generated/PartnerResponseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagementPartner { public partial class PartnerResponseResource : IJsonModel { + private static PartnerResponseData s_dataDeserializationInstance; + private static PartnerResponseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PartnerResponseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PartnerResponseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerManagementPartnerContext.Default); PartnerResponseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerManagementPartnerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.Serialization.cs index 5df1a3f1b1ba..3fe25cf71d40 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Maps { public partial class MapsAccountResource : IJsonModel { + private static MapsAccountData s_dataDeserializationInstance; + private static MapsAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MapsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MapsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMapsContext.Default); MapsAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMapsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.Serialization.cs b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.Serialization.cs index 15c0982c9d04..8902bfd5e57a 100644 --- a/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.Serialization.cs +++ b/sdk/maps/Azure.ResourceManager.Maps/src/Generated/MapsCreatorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Maps { public partial class MapsCreatorResource : IJsonModel { + private static MapsCreatorData s_dataDeserializationInstance; + private static MapsCreatorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MapsCreatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MapsCreatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMapsContext.Default); MapsCreatorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMapsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceAdminApprovalRequestResource.Serialization.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceAdminApprovalRequestResource.Serialization.cs index d72cea90520e..c8a721e2ca97 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceAdminApprovalRequestResource.Serialization.cs +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceAdminApprovalRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Marketplace { public partial class MarketplaceAdminApprovalRequestResource : IJsonModel { + private static MarketplaceAdminApprovalRequestData s_dataDeserializationInstance; + private static MarketplaceAdminApprovalRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MarketplaceAdminApprovalRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MarketplaceAdminApprovalRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceContext.Default); MarketplaceAdminApprovalRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceApprovalRequestResource.Serialization.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceApprovalRequestResource.Serialization.cs index a425f261eeaa..4c98fa71014b 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceApprovalRequestResource.Serialization.cs +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/MarketplaceApprovalRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Marketplace { public partial class MarketplaceApprovalRequestResource : IJsonModel { + private static MarketplaceApprovalRequestData s_dataDeserializationInstance; + private static MarketplaceApprovalRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MarketplaceApprovalRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MarketplaceApprovalRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceContext.Default); MarketplaceApprovalRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreCollectionInfoResource.Serialization.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreCollectionInfoResource.Serialization.cs index e66666e47e51..ae4522f4beb5 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreCollectionInfoResource.Serialization.cs +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreCollectionInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Marketplace { public partial class PrivateStoreCollectionInfoResource : IJsonModel { + private static PrivateStoreCollectionInfoData s_dataDeserializationInstance; + private static PrivateStoreCollectionInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateStoreCollectionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateStoreCollectionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceContext.Default); PrivateStoreCollectionInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreOfferResource.Serialization.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreOfferResource.Serialization.cs index bc3ccb87f2bb..a3ccf0cd10da 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreOfferResource.Serialization.cs +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreOfferResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Marketplace { public partial class PrivateStoreOfferResource : IJsonModel { + private static PrivateStoreOfferData s_dataDeserializationInstance; + private static PrivateStoreOfferData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateStoreOfferData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateStoreOfferData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceContext.Default); PrivateStoreOfferData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreResource.Serialization.cs b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreResource.Serialization.cs index 463ab8a33117..f0f1ba223a0c 100644 --- a/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreResource.Serialization.cs +++ b/sdk/marketplace/Azure.ResourceManager.Marketplace/src/Generated/PrivateStoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Marketplace { public partial class PrivateStoreResource : IJsonModel { + private static PrivateStoreData s_dataDeserializationInstance; + private static PrivateStoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateStoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceContext.Default); PrivateStoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.Serialization.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.Serialization.cs index b4e1918be99b..40696f4bb63d 100644 --- a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.Serialization.cs +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MarketplaceOrdering { public partial class MarketplaceAgreementResource : IJsonModel { + private static MarketplaceAgreementTermData s_dataDeserializationInstance; + private static MarketplaceAgreementTermData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MarketplaceAgreementTermData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MarketplaceAgreementTermData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceOrderingContext.Default); MarketplaceAgreementTermData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceOrderingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementTermResource.Serialization.cs b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementTermResource.Serialization.cs index 7234b7fab1a5..d7727250b93c 100644 --- a/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementTermResource.Serialization.cs +++ b/sdk/marketplaceordering/Azure.ResourceManager.MarketplaceOrdering/src/Generated/MarketplaceAgreementTermResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MarketplaceOrdering { public partial class MarketplaceAgreementTermResource : IJsonModel { + private static MarketplaceAgreementTermData s_dataDeserializationInstance; + private static MarketplaceAgreementTermData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MarketplaceAgreementTermData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MarketplaceAgreementTermData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMarketplaceOrderingContext.Default); MarketplaceAgreementTermData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMarketplaceOrderingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/ContentKeyPolicyResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/ContentKeyPolicyResource.Serialization.cs index b4490962f7d1..86107765dfe8 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/ContentKeyPolicyResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/ContentKeyPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class ContentKeyPolicyResource : IJsonModel { + private static ContentKeyPolicyData s_dataDeserializationInstance; + private static ContentKeyPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContentKeyPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContentKeyPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); ContentKeyPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetFilterResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetFilterResource.Serialization.cs index 4c70ba01f4de..c0bcc60c2284 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetFilterResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetFilterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaAssetFilterResource : IJsonModel { + private static MediaAssetFilterData s_dataDeserializationInstance; + private static MediaAssetFilterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaAssetFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaAssetFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaAssetFilterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetResource.Serialization.cs index cf4c4356c663..ef2644959cc1 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaAssetResource : IJsonModel { + private static MediaAssetData s_dataDeserializationInstance; + private static MediaAssetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaAssetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaAssetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaAssetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetTrackResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetTrackResource.Serialization.cs index e0bdac46a4da..c05bcc98ad4e 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetTrackResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaAssetTrackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaAssetTrackResource : IJsonModel { + private static MediaAssetTrackData s_dataDeserializationInstance; + private static MediaAssetTrackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaAssetTrackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaAssetTrackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaAssetTrackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaJobResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaJobResource.Serialization.cs index 1de3a837b2ef..6b85b62358e2 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaJobResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaJobResource : IJsonModel { + private static MediaJobData s_dataDeserializationInstance; + private static MediaJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveEventResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveEventResource.Serialization.cs index ed9526f9df12..c3a7081bbd26 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveEventResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveEventResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaLiveEventResource : IJsonModel { + private static MediaLiveEventData s_dataDeserializationInstance; + private static MediaLiveEventData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaLiveEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaLiveEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaLiveEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveOutputResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveOutputResource.Serialization.cs index ac7c92e3c93b..bbc2bfd4c187 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveOutputResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaLiveOutputResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaLiveOutputResource : IJsonModel { + private static MediaLiveOutputData s_dataDeserializationInstance; + private static MediaLiveOutputData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaLiveOutputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaLiveOutputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaLiveOutputData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountFilterResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountFilterResource.Serialization.cs index 7f6d2a610655..9fa7ddff6e58 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountFilterResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountFilterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaServicesAccountFilterResource : IJsonModel { + private static MediaServicesAccountFilterData s_dataDeserializationInstance; + private static MediaServicesAccountFilterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaServicesAccountFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaServicesAccountFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaServicesAccountFilterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountResource.Serialization.cs index abbd27b21ee2..38b5ef5ea90b 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaServicesAccountResource : IJsonModel { + private static MediaServicesAccountData s_dataDeserializationInstance; + private static MediaServicesAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaServicesAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaServicesAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateEndpointConnectionResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateEndpointConnectionResource.Serialization.cs index eaf84875d3a7..fe2932040ea2 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaServicesPrivateEndpointConnectionResource : IJsonModel { + private static MediaServicesPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MediaServicesPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaServicesPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaServicesPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateLinkResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateLinkResource.Serialization.cs index 4ddde45b6f22..57569942866f 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateLinkResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaServicesPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaServicesPrivateLinkResource : IJsonModel { + private static MediaServicesPrivateLinkResourceData s_dataDeserializationInstance; + private static MediaServicesPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaServicesPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaTransformResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaTransformResource.Serialization.cs index f2016c6c7ec1..dce400940c5c 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaTransformResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/MediaTransformResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class MediaTransformResource : IJsonModel { + private static MediaTransformData s_dataDeserializationInstance; + private static MediaTransformData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MediaTransformData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MediaTransformData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); MediaTransformData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingEndpointResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingEndpointResource.Serialization.cs index 2a7dd1595280..8b41431e796d 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingEndpointResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class StreamingEndpointResource : IJsonModel { + private static StreamingEndpointData s_dataDeserializationInstance; + private static StreamingEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); StreamingEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingLocatorResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingLocatorResource.Serialization.cs index e30bda5c0ece..86bec54ec2e6 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingLocatorResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingLocatorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class StreamingLocatorResource : IJsonModel { + private static StreamingLocatorData s_dataDeserializationInstance; + private static StreamingLocatorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingLocatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingLocatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); StreamingLocatorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingPolicyResource.Serialization.cs b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingPolicyResource.Serialization.cs index 62c98436837f..504b3aa59065 100644 --- a/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingPolicyResource.Serialization.cs +++ b/sdk/mediaservices/Azure.ResourceManager.Media/src/Generated/StreamingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Media { public partial class StreamingPolicyResource : IJsonModel { + private static StreamingPolicyData s_dataDeserializationInstance; + private static StreamingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMediaContext.Default); StreamingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMediaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedMachineResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedMachineResource.Serialization.cs index 3b78b64670b1..0b5248f02a06 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedMachineResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessedMachineResource : IJsonModel { + private static MigrationAssessedMachineData s_dataDeserializationInstance; + private static MigrationAssessedMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessedMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessedMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessedMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlDatabaseV2Resource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlDatabaseV2Resource.Serialization.cs index 89eee388395e..6bfd65202403 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlDatabaseV2Resource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlDatabaseV2Resource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessedSqlDatabaseV2Resource : IJsonModel { + private static MigrationAssessedSqlDatabaseV2Data s_dataDeserializationInstance; + private static MigrationAssessedSqlDatabaseV2Data DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessedSqlDatabaseV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessedSqlDatabaseV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessedSqlDatabaseV2Data IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlInstanceV2Resource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlInstanceV2Resource.Serialization.cs index 7db9386406d9..21dfae9677cb 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlInstanceV2Resource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlInstanceV2Resource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessedSqlInstanceV2Resource : IJsonModel { + private static MigrationAssessedSqlInstanceV2Data s_dataDeserializationInstance; + private static MigrationAssessedSqlInstanceV2Data DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessedSqlInstanceV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessedSqlInstanceV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessedSqlInstanceV2Data IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlMachineResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlMachineResource.Serialization.cs index 283cc70fa459..cf64e858719d 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlMachineResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessedSqlMachineResource : IJsonModel { + private static MigrationAssessedSqlMachineData s_dataDeserializationInstance; + private static MigrationAssessedSqlMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessedSqlMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessedSqlMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessedSqlMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlRecommendedEntityResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlRecommendedEntityResource.Serialization.cs index 617a073347af..aa92985df2d9 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlRecommendedEntityResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessedSqlRecommendedEntityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessedSqlRecommendedEntityResource : IJsonModel { + private static MigrationAssessedSqlRecommendedEntityData s_dataDeserializationInstance; + private static MigrationAssessedSqlRecommendedEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessedSqlRecommendedEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessedSqlRecommendedEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessedSqlRecommendedEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentGroupResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentGroupResource.Serialization.cs index b582f1dd8101..4707fb2b6a39 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentGroupResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentGroupResource : IJsonModel { + private static MigrationAssessmentGroupData s_dataDeserializationInstance; + private static MigrationAssessmentGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentHyperVCollectorResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentHyperVCollectorResource.Serialization.cs index 3517e9984be2..bdd307a6a1f1 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentHyperVCollectorResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentHyperVCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentHyperVCollectorResource : IJsonModel { + private static MigrationAssessmentHyperVCollectorData s_dataDeserializationInstance; + private static MigrationAssessmentHyperVCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentHyperVCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentHyperVCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentHyperVCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentImportCollectorResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentImportCollectorResource.Serialization.cs index 16f7d9a72d62..12e9dab789a8 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentImportCollectorResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentImportCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentImportCollectorResource : IJsonModel { + private static MigrationAssessmentImportCollectorData s_dataDeserializationInstance; + private static MigrationAssessmentImportCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentImportCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentImportCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentImportCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentMachineResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentMachineResource.Serialization.cs index b86d7be9c20a..873b4c21e4a9 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentMachineResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentMachineResource : IJsonModel { + private static MigrationAssessmentMachineData s_dataDeserializationInstance; + private static MigrationAssessmentMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentOptionResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentOptionResource.Serialization.cs index b9b27576b297..ffc3c0771d5c 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentOptionResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentOptionResource : IJsonModel { + private static MigrationAssessmentOptionData s_dataDeserializationInstance; + private static MigrationAssessmentOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateEndpointConnectionResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateEndpointConnectionResource.Serialization.cs index 90d717e733c5..49ab16c31e60 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentPrivateEndpointConnectionResource : IJsonModel { + private static MigrationAssessmentPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MigrationAssessmentPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateLinkResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateLinkResource.Serialization.cs index f9b2a980a12d..8e64845e55c7 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateLinkResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentPrivateLinkResource : IJsonModel { + private static MigrationAssessmentPrivateLinkResourceData s_dataDeserializationInstance; + private static MigrationAssessmentPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectResource.Serialization.cs index f71633357979..0f9146fa8092 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentProjectResource : IJsonModel { + private static MigrationAssessmentProjectData s_dataDeserializationInstance; + private static MigrationAssessmentProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectSummaryResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectSummaryResource.Serialization.cs index 2d1c1d0e269a..2628bc31bb95 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectSummaryResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentProjectSummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentProjectSummaryResource : IJsonModel { + private static MigrationAssessmentProjectSummaryData s_dataDeserializationInstance; + private static MigrationAssessmentProjectSummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentProjectSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentProjectSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentProjectSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentResource.Serialization.cs index 1e261ca4508d..133560aba65f 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentResource : IJsonModel { + private static MigrationAssessmentData s_dataDeserializationInstance; + private static MigrationAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentServerCollectorResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentServerCollectorResource.Serialization.cs index 495821356d16..2103bc9e8b65 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentServerCollectorResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentServerCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentServerCollectorResource : IJsonModel { + private static MigrationAssessmentServerCollectorData s_dataDeserializationInstance; + private static MigrationAssessmentServerCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentServerCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentServerCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentServerCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentSqlCollectorResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentSqlCollectorResource.Serialization.cs index 707f1ec678e6..8566edc40ac7 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentSqlCollectorResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentSqlCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentSqlCollectorResource : IJsonModel { + private static MigrationAssessmentSqlCollectorData s_dataDeserializationInstance; + private static MigrationAssessmentSqlCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentSqlCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentSqlCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentSqlCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentVMwareCollectorResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentVMwareCollectorResource.Serialization.cs index 79d0a7b92735..a21df29b17a1 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentVMwareCollectorResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAssessmentVMwareCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAssessmentVMwareCollectorResource : IJsonModel { + private static MigrationAssessmentVMwareCollectorData s_dataDeserializationInstance; + private static MigrationAssessmentVMwareCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAssessmentVMwareCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAssessmentVMwareCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAssessmentVMwareCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessedMachineResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessedMachineResource.Serialization.cs index d225a02e5915..6dafcf155d69 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessedMachineResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessedMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAvsAssessedMachineResource : IJsonModel { + private static MigrationAvsAssessedMachineData s_dataDeserializationInstance; + private static MigrationAvsAssessedMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAvsAssessedMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAvsAssessedMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAvsAssessedMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentOptionResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentOptionResource.Serialization.cs index 8bbf7fcb255c..cd7d8872c328 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentOptionResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAvsAssessmentOptionResource : IJsonModel { + private static MigrationAvsAssessmentOptionData s_dataDeserializationInstance; + private static MigrationAvsAssessmentOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAvsAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAvsAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAvsAssessmentOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentResource.Serialization.cs index a4d243705350..2f8b4acfe6f0 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationAvsAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationAvsAssessmentResource : IJsonModel { + private static MigrationAvsAssessmentData s_dataDeserializationInstance; + private static MigrationAvsAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationAvsAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationAvsAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationAvsAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentOptionResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentOptionResource.Serialization.cs index bff3e2df9e71..78ce14cc206a 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentOptionResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationSqlAssessmentOptionResource : IJsonModel { + private static MigrationSqlAssessmentOptionData s_dataDeserializationInstance; + private static MigrationSqlAssessmentOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationSqlAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationSqlAssessmentOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationSqlAssessmentOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2Resource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2Resource.Serialization.cs index fd159bb2f3c9..6f54bf4e9906 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2Resource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2Resource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationSqlAssessmentV2Resource : IJsonModel { + private static MigrationSqlAssessmentV2Data s_dataDeserializationInstance; + private static MigrationSqlAssessmentV2Data DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationSqlAssessmentV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationSqlAssessmentV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationSqlAssessmentV2Data IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2SummaryResource.Serialization.cs b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2SummaryResource.Serialization.cs index d5b7b4fbc103..8f0ee9cc56d7 100644 --- a/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2SummaryResource.Serialization.cs +++ b/sdk/migrationassessment/Azure.ResourceManager.Migration.Assessment/src/Generated/MigrationSqlAssessmentV2SummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Migration.Assessment { public partial class MigrationSqlAssessmentV2SummaryResource : IJsonModel { + private static MigrationSqlAssessmentV2SummaryData s_dataDeserializationInstance; + private static MigrationSqlAssessmentV2SummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationSqlAssessmentV2SummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationSqlAssessmentV2SummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationAssessmentContext.Default); MigrationSqlAssessmentV2SummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationAssessmentContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoveryServerInstanceResource.Serialization.cs b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoveryServerInstanceResource.Serialization.cs index b11bc8f27991..8bf41bfa0725 100644 --- a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoveryServerInstanceResource.Serialization.cs +++ b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoveryServerInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MigrationDiscoverySap { public partial class SapDiscoveryServerInstanceResource : IJsonModel { + private static SapDiscoveryServerInstanceData s_dataDeserializationInstance; + private static SapDiscoveryServerInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapDiscoveryServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapDiscoveryServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); SapDiscoveryServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoverySiteResource.Serialization.cs b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoverySiteResource.Serialization.cs index 5be026b8bda8..e92fce8575f5 100644 --- a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoverySiteResource.Serialization.cs +++ b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapDiscoverySiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MigrationDiscoverySap { public partial class SapDiscoverySiteResource : IJsonModel { + private static SapDiscoverySiteData s_dataDeserializationInstance; + private static SapDiscoverySiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapDiscoverySiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapDiscoverySiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); SapDiscoverySiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapInstanceResource.Serialization.cs b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapInstanceResource.Serialization.cs index 72bd42cfe767..15ba651e4915 100644 --- a/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapInstanceResource.Serialization.cs +++ b/sdk/migrationdiscoverysap/Azure.ResourceManager.MigrationDiscoverySap/src/Generated/SapInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MigrationDiscoverySap { public partial class SapInstanceResource : IJsonModel { + private static SapInstanceData s_dataDeserializationInstance; + private static SapInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); SapInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMigrationDiscoverySapContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/RemoteRenderingAccountResource.Serialization.cs b/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/RemoteRenderingAccountResource.Serialization.cs index 3463a14cf43a..d7dbc036289e 100644 --- a/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/RemoteRenderingAccountResource.Serialization.cs +++ b/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/RemoteRenderingAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MixedReality { public partial class RemoteRenderingAccountResource : IJsonModel { + private static RemoteRenderingAccountData s_dataDeserializationInstance; + private static RemoteRenderingAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RemoteRenderingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RemoteRenderingAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMixedRealityContext.Default); RemoteRenderingAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMixedRealityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/SpatialAnchorsAccountResource.Serialization.cs b/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/SpatialAnchorsAccountResource.Serialization.cs index 1db6ccf798c3..3ffcecc0ef98 100644 --- a/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/SpatialAnchorsAccountResource.Serialization.cs +++ b/sdk/mixedreality/Azure.ResourceManager.MixedReality/src/Generated/SpatialAnchorsAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MixedReality { public partial class SpatialAnchorsAccountResource : IJsonModel { + private static SpatialAnchorsAccountData s_dataDeserializationInstance; + private static SpatialAnchorsAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpatialAnchorsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpatialAnchorsAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMixedRealityContext.Default); SpatialAnchorsAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMixedRealityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/ExtendedUEInfoResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/ExtendedUEInfoResource.Serialization.cs index f7dbc7d85d54..3388467fb6c1 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/ExtendedUEInfoResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/ExtendedUEInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class ExtendedUEInfoResource : IJsonModel { + private static ExtendedUEInfoData s_dataDeserializationInstance; + private static ExtendedUEInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtendedUEInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtendedUEInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); ExtendedUEInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileAttachedDataNetworkResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileAttachedDataNetworkResource.Serialization.cs index ee889e132531..0f85909a7926 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileAttachedDataNetworkResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileAttachedDataNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileAttachedDataNetworkResource : IJsonModel { + private static MobileAttachedDataNetworkData s_dataDeserializationInstance; + private static MobileAttachedDataNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileAttachedDataNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileAttachedDataNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileAttachedDataNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileDataNetworkResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileDataNetworkResource.Serialization.cs index dc37f97b4e3a..46a14f445b44 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileDataNetworkResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileDataNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileDataNetworkResource : IJsonModel { + private static MobileDataNetworkData s_dataDeserializationInstance; + private static MobileDataNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileDataNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileDataNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileDataNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkDiagnosticsPackageResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkDiagnosticsPackageResource.Serialization.cs index b9fa50807b49..b87577feca03 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkDiagnosticsPackageResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkDiagnosticsPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkDiagnosticsPackageResource : IJsonModel { + private static MobileNetworkDiagnosticsPackageData s_dataDeserializationInstance; + private static MobileNetworkDiagnosticsPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkDiagnosticsPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkDiagnosticsPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkDiagnosticsPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkPacketCaptureResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkPacketCaptureResource.Serialization.cs index 32179ce22b47..f326aec42058 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkPacketCaptureResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkPacketCaptureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkPacketCaptureResource : IJsonModel { + private static MobileNetworkPacketCaptureData s_dataDeserializationInstance; + private static MobileNetworkPacketCaptureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkPacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkPacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkPacketCaptureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkResource.Serialization.cs index 2b3bdb5d3262..403293ae65b9 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkResource : IJsonModel { + private static MobileNetworkData s_dataDeserializationInstance; + private static MobileNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkRoutingInfoResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkRoutingInfoResource.Serialization.cs index e6a63a21a237..3a543a4c8ff9 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkRoutingInfoResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkRoutingInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkRoutingInfoResource : IJsonModel { + private static MobileNetworkRoutingInfoData s_dataDeserializationInstance; + private static MobileNetworkRoutingInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkRoutingInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkRoutingInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkRoutingInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkServiceResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkServiceResource.Serialization.cs index 1ceb1ca3dda4..3d83658890f5 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkServiceResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkServiceResource : IJsonModel { + private static MobileNetworkServiceData s_dataDeserializationInstance; + private static MobileNetworkServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimGroupResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimGroupResource.Serialization.cs index 21e90d4f0936..90b79a85c25f 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimGroupResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkSimGroupResource : IJsonModel { + private static MobileNetworkSimGroupData s_dataDeserializationInstance; + private static MobileNetworkSimGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkSimGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkSimGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkSimGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimPolicyResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimPolicyResource.Serialization.cs index d92b206f35b4..685729d44a73 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimPolicyResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkSimPolicyResource : IJsonModel { + private static MobileNetworkSimPolicyData s_dataDeserializationInstance; + private static MobileNetworkSimPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkSimPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkSimPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkSimPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimResource.Serialization.cs index 6a39c2cda58d..eaf445d886b4 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSimResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkSimResource : IJsonModel { + private static MobileNetworkSimData s_dataDeserializationInstance; + private static MobileNetworkSimData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkSimData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkSimData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkSimData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSiteResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSiteResource.Serialization.cs index 51f6eb1b8de5..553cbf9f2c89 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSiteResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkSiteResource : IJsonModel { + private static MobileNetworkSiteData s_dataDeserializationInstance; + private static MobileNetworkSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSliceResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSliceResource.Serialization.cs index ca5be04609be..1680d5d4aea7 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSliceResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/MobileNetworkSliceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class MobileNetworkSliceResource : IJsonModel { + private static MobileNetworkSliceData s_dataDeserializationInstance; + private static MobileNetworkSliceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MobileNetworkSliceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MobileNetworkSliceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); MobileNetworkSliceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreControlPlaneResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreControlPlaneResource.Serialization.cs index 2c2f669678d2..26721235c680 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreControlPlaneResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreControlPlaneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class PacketCoreControlPlaneResource : IJsonModel { + private static PacketCoreControlPlaneData s_dataDeserializationInstance; + private static PacketCoreControlPlaneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PacketCoreControlPlaneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PacketCoreControlPlaneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); PacketCoreControlPlaneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreDataPlaneResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreDataPlaneResource.Serialization.cs index b74c1f31d925..68406448bfa0 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreDataPlaneResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/PacketCoreDataPlaneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class PacketCoreDataPlaneResource : IJsonModel { + private static PacketCoreDataPlaneData s_dataDeserializationInstance; + private static PacketCoreDataPlaneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PacketCoreDataPlaneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PacketCoreDataPlaneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); PacketCoreDataPlaneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/SubscriptionPacketCoreControlPlaneVersionResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/SubscriptionPacketCoreControlPlaneVersionResource.Serialization.cs index b3b932c4f8cb..f59dcaea7059 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/SubscriptionPacketCoreControlPlaneVersionResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/SubscriptionPacketCoreControlPlaneVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class SubscriptionPacketCoreControlPlaneVersionResource : IJsonModel { + private static PacketCoreControlPlaneVersionData s_dataDeserializationInstance; + private static PacketCoreControlPlaneVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PacketCoreControlPlaneVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PacketCoreControlPlaneVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); PacketCoreControlPlaneVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/TenantPacketCoreControlPlaneVersionResource.Serialization.cs b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/TenantPacketCoreControlPlaneVersionResource.Serialization.cs index f9830e8aa611..7cb40a2c68a8 100644 --- a/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/TenantPacketCoreControlPlaneVersionResource.Serialization.cs +++ b/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/src/Generated/TenantPacketCoreControlPlaneVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MobileNetwork { public partial class TenantPacketCoreControlPlaneVersionResource : IJsonModel { + private static PacketCoreControlPlaneVersionData s_dataDeserializationInstance; + private static PacketCoreControlPlaneVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PacketCoreControlPlaneVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PacketCoreControlPlaneVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMobileNetworkContext.Default); PacketCoreControlPlaneVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMobileNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.Serialization.cs index 7b54f607d692..a4791ff7cbec 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MongoCluster { public partial class MongoClusterFirewallRuleResource : IJsonModel { + private static MongoClusterFirewallRuleData s_dataDeserializationInstance; + private static MongoClusterFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoClusterFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoClusterFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMongoClusterContext.Default); MongoClusterFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMongoClusterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.Serialization.cs index 05ef96076b2e..41f827ed1667 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MongoCluster { public partial class MongoClusterPrivateEndpointConnectionResource : IJsonModel { + private static MongoClusterPrivateEndpointConnectionResourceData s_dataDeserializationInstance; + private static MongoClusterPrivateEndpointConnectionResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoClusterPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoClusterPrivateEndpointConnectionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMongoClusterContext.Default); MongoClusterPrivateEndpointConnectionResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMongoClusterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.Serialization.cs b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.Serialization.cs index 53eabcd974f9..8bcbc5bb80ee 100644 --- a/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.Serialization.cs +++ b/sdk/mongocluster/Azure.ResourceManager.MongoCluster/src/Generated/MongoClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MongoCluster { public partial class MongoClusterResource : IJsonModel { + private static MongoClusterData s_dataDeserializationInstance; + private static MongoClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MongoClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MongoClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMongoClusterContext.Default); MongoClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMongoClusterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln new file mode 100644 index 000000000000..2038b5f7f8d6 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Azure.ResourceManager.MongoDBAtlas.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.ResourceManager.MongoDBAtlas.Samples", "samples\Azure.ResourceManager.MongoDBAtlas.Samples.csproj", "{7A2DFF15-5746-49F4-BD0F-C6C35337088A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoDBAtlas", "src\Azure.ResourceManager.MongoDBAtlas.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.ResourceManager.MongoDBAtlas.Tests", "tests\Azure.ResourceManager.MongoDBAtlas.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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/CHANGELOG.md b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Directory.Build.props b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/README.md b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/README.md new file mode 100644 index 000000000000..1c6a87583d30 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure MongoDBAtlas 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 MongoDBAtlas management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.MongoDBAtlas --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://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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.net8.0.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.net8.0.cs new file mode 100644 index 000000000000..92e93592a61e --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.net8.0.cs @@ -0,0 +1,213 @@ +namespace Azure.ResourceManager.MongoDBAtlas +{ + public partial class AzureResourceManagerMongoDBAtlasContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerMongoDBAtlasContext() { } + public static Azure.ResourceManager.MongoDBAtlas.AzureResourceManagerMongoDBAtlasContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public static partial class MongoDBAtlasExtensions + { + public static Azure.Response GetMongoDBAtlasOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetMongoDBAtlasOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetMongoDBAtlasOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMongoDBAtlasOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MongoDBAtlasOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MongoDBAtlasOrganizationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string organizationName, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string organizationName, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string organizationName, 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 organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string organizationName, 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 MongoDBAtlasOrganizationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOrganizationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOrganizationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MongoDBAtlasOrganizationResource() { } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData 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 organizationName) { 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.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.MongoDBAtlas.Mocking +{ + public partial class MockableMongoDBAtlasArmClient : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasArmClient() { } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableMongoDBAtlasResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasResourceGroupResource() { } + public virtual Azure.Response GetMongoDBAtlasOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMongoDBAtlasOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations() { throw null; } + } + public partial class MockableMongoDBAtlasSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasSubscriptionResource() { } + public virtual Azure.Pageable GetMongoDBAtlasOrganizations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMongoDBAtlasOrganizationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.MongoDBAtlas.Models +{ + public static partial class ArmMongoDBAtlasModelFactory + { + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails MongoDBAtlasMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData MongoDBAtlasOrganizationData(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.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties MongoDBAtlasOrganizationProperties(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails marketplace = null, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails user = null, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState?), Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties partnerProperties = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus 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.MongoDBAtlas.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MongoDBAtlasMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasMarketplaceDetails(string subscriptionId, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails offerDetails) { } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOrganizationProperties(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails marketplace, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails user) { } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties PartnerProperties { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasPartnerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasPartnerProperties(string organizationName) { } + public string OrganizationId { get { throw null; } set { } } + public string OrganizationName { get { throw null; } set { } } + public string RedirectUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 MongoDBAtlasResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MongoDBAtlasResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState 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.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState left, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState left, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MongoDBAtlasUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasUserDetails(string firstName, string lastName, string emailAddress) { } + public string CompanyName { get { throw null; } set { } } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.netstandard2.0.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.netstandard2.0.cs new file mode 100644 index 000000000000..92e93592a61e --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/api/Azure.ResourceManager.MongoDBAtlas.netstandard2.0.cs @@ -0,0 +1,213 @@ +namespace Azure.ResourceManager.MongoDBAtlas +{ + public partial class AzureResourceManagerMongoDBAtlasContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerMongoDBAtlasContext() { } + public static Azure.ResourceManager.MongoDBAtlas.AzureResourceManagerMongoDBAtlasContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public static partial class MongoDBAtlasExtensions + { + public static Azure.Response GetMongoDBAtlasOrganization(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetMongoDBAtlasOrganizationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetMongoDBAtlasOrganizations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetMongoDBAtlasOrganizationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class MongoDBAtlasOrganizationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected MongoDBAtlasOrganizationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string organizationName, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string organizationName, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string organizationName, 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 organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string organizationName, 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 MongoDBAtlasOrganizationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOrganizationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOrganizationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected MongoDBAtlasOrganizationResource() { } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData 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 organizationName) { 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.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.MongoDBAtlas.Mocking +{ + public partial class MockableMongoDBAtlasArmClient : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasArmClient() { } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableMongoDBAtlasResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasResourceGroupResource() { } + public virtual Azure.Response GetMongoDBAtlasOrganization(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetMongoDBAtlasOrganizationAsync(string organizationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations() { throw null; } + } + public partial class MockableMongoDBAtlasSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableMongoDBAtlasSubscriptionResource() { } + public virtual Azure.Pageable GetMongoDBAtlasOrganizations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMongoDBAtlasOrganizationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.MongoDBAtlas.Models +{ + public static partial class ArmMongoDBAtlasModelFactory + { + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails MongoDBAtlasMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus?), Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.MongoDBAtlasOrganizationData MongoDBAtlasOrganizationData(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.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties MongoDBAtlasOrganizationProperties(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails marketplace = null, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails user = null, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState? provisioningState = default(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState?), Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties partnerProperties = null) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct MarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus 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.MongoDBAtlas.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus left, Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MongoDBAtlasMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasMarketplaceDetails(string subscriptionId, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails offerDetails) { } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasOrganizationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasOrganizationProperties(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails marketplace, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails user) { } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties PartnerProperties { get { throw null; } set { } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasOrganizationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MongoDBAtlasPartnerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasPartnerProperties(string organizationName) { } + public string OrganizationId { get { throw null; } set { } } + public string OrganizationName { get { throw null; } set { } } + public string RedirectUri { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasPartnerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 MongoDBAtlasResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public MongoDBAtlasResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState 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.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState left, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState left, Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class MongoDBAtlasUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MongoDBAtlasUserDetails(string firstName, string lastName, string emailAddress) { } + public string CompanyName { get { throw null; } set { } } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.MongoDBAtlas.Models.MongoDBAtlasUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/assets.json b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/assets.json new file mode 100644 index 000000000000..137f2e6f58c6 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/mongodbatlas/Azure.ResourceManager.MongoDBAtlas", + "Tag": "" +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj new file mode 100644 index 000000000000..d2418b0b87d0 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Azure.ResourceManager.MongoDBAtlas.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs new file mode 100644 index 000000000000..616fa130fdf2 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationCollection.cs @@ -0,0 +1,254 @@ +// 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.Models; +using Azure.ResourceManager.MongoDBAtlas.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.MongoDBAtlas.Samples +{ + public partial class Sample_MongoDBAtlasOrganizationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_OrganizationsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "AD4FE133-6EF1-4ED8-82DB-5C1CBA58597E"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation + string organizationName = "U.1-:7"; + MongoDBAtlasOrganizationData data = new MongoDBAtlasOrganizationData(new AzureLocation("wobqn")) + { + Properties = new MongoDBAtlasOrganizationProperties(new MongoDBAtlasMarketplaceDetails("o", new MongoDBAtlasOfferDetails("rxglearenxsgpwzlsxmiicynks", "ohnquleylybvjrtnpjupvwlk", "obhxnhvrtbcnoovgofbs") + { + PlanName = "lkwdzpfhvjezjusrqzyftcikxdt", + TermUnit = "omkxrnburbnruglwqgjlahvjmbfcse", + TermId = "bqmmltwmtpdcdeszbka", + }), new MongoDBAtlasUserDetails("aslybvdwwddqxwazxvxhjrs", "cnuitqoqpcyvmuqowgnxpwxjcveyr", ".K_@e7N-g1.xjqnbPs") + { + Upn = "howdzmfy", + PhoneNumber = "ilypntsrbmbbbexbasuu", + CompanyName = "oxdcwwl", + }) + { + PartnerProperties = new MongoDBAtlasPartnerProperties("U.1-:7") + { + OrganizationId = "lyombjlhvwxithkiy", + RedirectUri = "cbxwtehraetlluocdihfgchvjzockn", + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, organizationName, data); + MongoDBAtlasOrganizationResource 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 + MongoDBAtlasOrganizationData 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_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation + string organizationName = "U.1-:7"; + MongoDBAtlasOrganizationResource result = await collection.GetAsync(organizationName); + + // 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 + MongoDBAtlasOrganizationData 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_OrganizationsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation and iterate over the result + await foreach (MongoDBAtlasOrganizationResource 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 + MongoDBAtlasOrganizationData 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_OrganizationsListByResourceGroupMaximumSetGeneratedByMinimumSetRule() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListByResourceGroup_MinimumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "422A4D59-A5BC-4DBB-8831-EC666633F64F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation and iterate over the result + await foreach (MongoDBAtlasOrganizationResource 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 + MongoDBAtlasOrganizationData 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_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation + string organizationName = "U.1-:7"; + bool result = await collection.ExistsAsync(organizationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this MongoDBAtlasOrganizationResource + MongoDBAtlasOrganizationCollection collection = resourceGroupResource.GetMongoDBAtlasOrganizations(); + + // invoke the operation + string organizationName = "U.1-:7"; + NullableResponse response = await collection.GetIfExistsAsync(organizationName); + MongoDBAtlasOrganizationResource 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 + MongoDBAtlasOrganizationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs new file mode 100644 index 000000000000..24024ee2b0b9 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_MongoDBAtlasOrganizationResource.cs @@ -0,0 +1,128 @@ +// 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.Models; +using Azure.ResourceManager.MongoDBAtlas.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.MongoDBAtlas.Samples +{ + public partial class Sample_MongoDBAtlasOrganizationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this MongoDBAtlasOrganizationResource created on azure + // for more information of creating MongoDBAtlasOrganizationResource, please refer to the document of MongoDBAtlasOrganizationResource + string subscriptionId = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier mongoDBAtlasOrganizationResourceId = MongoDBAtlasOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + MongoDBAtlasOrganizationResource mongoDBAtlasOrganization = client.GetMongoDBAtlasOrganizationResource(mongoDBAtlasOrganizationResourceId); + + // invoke the operation + MongoDBAtlasOrganizationResource result = await mongoDBAtlasOrganization.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 + MongoDBAtlasOrganizationData 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_OrganizationsDeleteMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 MongoDBAtlasOrganizationResource created on azure + // for more information of creating MongoDBAtlasOrganizationResource, please refer to the document of MongoDBAtlasOrganizationResource + string subscriptionId = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier mongoDBAtlasOrganizationResourceId = MongoDBAtlasOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + MongoDBAtlasOrganizationResource mongoDBAtlasOrganization = client.GetMongoDBAtlasOrganizationResource(mongoDBAtlasOrganizationResourceId); + + // invoke the operation + await mongoDBAtlasOrganization.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_OrganizationsUpdateMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 MongoDBAtlasOrganizationResource created on azure + // for more information of creating MongoDBAtlasOrganizationResource, please refer to the document of MongoDBAtlasOrganizationResource + string subscriptionId = "422A4D59-A5BC-4DBB-8831-EC666633F64F"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier mongoDBAtlasOrganizationResourceId = MongoDBAtlasOrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + MongoDBAtlasOrganizationResource mongoDBAtlasOrganization = client.GetMongoDBAtlasOrganizationResource(mongoDBAtlasOrganizationResourceId); + + // invoke the operation + MongoDBAtlasOrganizationData data = new MongoDBAtlasOrganizationData(default) + { + Properties = new MongoDBAtlasOrganizationProperties(null, new MongoDBAtlasUserDetails("btyhwmlbzzihjfimviefebg", "xx", ".K_@e7N-g1.xjqnbPs") + { + Upn = "mxtbogd", + PhoneNumber = "isvc", + CompanyName = "oztteysco", + }) + { + PartnerProperties = new MongoDBAtlasPartnerProperties("U.1-:7") + { + OrganizationId = "vugtqrobendjkinziswxlqueouo", + RedirectUri = "cbxwtehraetlluocdihfgchvjzockn", + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + Tags = { }, + }; + ArmOperation lro = await mongoDBAtlasOrganization.UpdateAsync(WaitUntil.Completed, data); + MongoDBAtlasOrganizationResource 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 + MongoDBAtlasOrganizationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResource.cs new file mode 100644 index 000000000000..065841e350dd --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResource.cs @@ -0,0 +1,128 @@ +// 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.Models; +using Azure.ResourceManager.MongoDBAtlas.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.MongoDBAtlas.Samples +{ + public partial class Sample_OrganizationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + OrganizationResource result = await organizationResource.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 + OrganizationResourceData 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_OrganizationsDeleteMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + await organizationResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_OrganizationsUpdateMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Update_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 OrganizationResource created on azure + // for more information of creating OrganizationResource, please refer to the document of OrganizationResource + string subscriptionId = "422A4D59-A5BC-4DBB-8831-EC666633F64F"; + string resourceGroupName = "rgopenapi"; + string organizationName = "U.1-:7"; + ResourceIdentifier organizationResourceId = OrganizationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, organizationName); + OrganizationResource organizationResource = client.GetOrganizationResource(organizationResourceId); + + // invoke the operation + OrganizationResourceData data = new OrganizationResourceData(default) + { + Properties = new OrganizationProperties(null, new UserDetails("btyhwmlbzzihjfimviefebg", "xx", ".K_@e7N-g1.xjqnbPs") + { + Upn = "mxtbogd", + PhoneNumber = "isvc", + CompanyName = "oztteysco", + }) + { + PartnerProperties = new PartnerProperties("U.1-:7") + { + OrganizationId = "vugtqrobendjkinziswxlqueouo", + RedirectUri = "cbxwtehraetlluocdihfgchvjzockn", + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + Tags = { }, + }; + ArmOperation lro = await organizationResource.UpdateAsync(WaitUntil.Completed, data); + OrganizationResource 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 + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs new file mode 100644 index 000000000000..14398a3a046d --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_OrganizationResourceCollection.cs @@ -0,0 +1,254 @@ +// 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.Models; +using Azure.ResourceManager.MongoDBAtlas.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.MongoDBAtlas.Samples +{ + public partial class Sample_OrganizationResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_OrganizationsCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "AD4FE133-6EF1-4ED8-82DB-5C1CBA58597E"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationName = "U.1-:7"; + OrganizationResourceData data = new OrganizationResourceData(new AzureLocation("wobqn")) + { + Properties = new OrganizationProperties(new MarketplaceDetails("o", new OfferDetails("rxglearenxsgpwzlsxmiicynks", "ohnquleylybvjrtnpjupvwlk", "obhxnhvrtbcnoovgofbs") + { + PlanName = "lkwdzpfhvjezjusrqzyftcikxdt", + TermUnit = "omkxrnburbnruglwqgjlahvjmbfcse", + TermId = "bqmmltwmtpdcdeszbka", + }), new UserDetails("aslybvdwwddqxwazxvxhjrs", "cnuitqoqpcyvmuqowgnxpwxjcveyr", ".K_@e7N-g1.xjqnbPs") + { + Upn = "howdzmfy", + PhoneNumber = "ilypntsrbmbbbexbasuu", + CompanyName = "oxdcwwl", + }) + { + PartnerProperties = new PartnerProperties("U.1-:7") + { + OrganizationId = "lyombjlhvwxithkiy", + RedirectUri = "cbxwtehraetlluocdihfgchvjzockn", + }, + }, + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = { }, + }, + Tags = { }, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, organizationName, data); + OrganizationResource 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 + OrganizationResourceData 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_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationName = "U.1-:7"; + OrganizationResource result = await collection.GetAsync(organizationName); + + // 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 + OrganizationResourceData 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_OrganizationsListByResourceGroupMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation and iterate over the result + await foreach (OrganizationResource 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 + OrganizationResourceData 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_OrganizationsListByResourceGroupMaximumSetGeneratedByMinimumSetRule() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListByResourceGroup_MinimumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "422A4D59-A5BC-4DBB-8831-EC666633F64F"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation and iterate over the result + await foreach (OrganizationResource 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 + OrganizationResourceData 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_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationName = "U.1-:7"; + bool result = await collection.ExistsAsync(organizationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_OrganizationsGetMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_Get_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this OrganizationResource + OrganizationResourceCollection collection = resourceGroupResource.GetOrganizationResources(); + + // invoke the operation + string organizationName = "U.1-:7"; + NullableResponse response = await collection.GetIfExistsAsync(organizationName); + OrganizationResource 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 + OrganizationResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..5801bd4906d3 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,81 @@ +// 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.MongoDBAtlas.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetMongoDBAtlasOrganizations_OrganizationsListBySubscriptionMaximumSet() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "4AFC1287-D389-4265-B2D4-59B96A45CACC"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MongoDBAtlasOrganizationResource item in subscriptionResource.GetMongoDBAtlasOrganizationsAsync()) + { + // 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 + MongoDBAtlasOrganizationData 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 GetMongoDBAtlasOrganizations_OrganizationsListBySubscriptionMaximumSetGeneratedByMinimumSetRule() + { + // Generated from example definition: 2024-11-18-preview/Organizations_ListBySubscription_MinimumSet_Gen.json + // this example is just showing the usage of "OrganizationResource_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 = "422A4D59-A5BC-4DBB-8831-EC666633F64F"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (MongoDBAtlasOrganizationResource item in subscriptionResource.GetMongoDBAtlasOrganizationsAsync()) + { + // 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 + MongoDBAtlasOrganizationData 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Azure.ResourceManager.MongoDBAtlas.csproj b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Azure.ResourceManager.MongoDBAtlas.csproj new file mode 100644 index 000000000000..14220fd827ac --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Azure.ResourceManager.MongoDBAtlas.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider MongoDBAtlas. + 1.0.0-beta.1 + azure;management;arm;resource manager;mongodbatlas + Azure.ResourceManager.MongoDBAtlas + + diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/ArmMongoDBAtlasModelFactory.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/ArmMongoDBAtlasModelFactory.cs new file mode 100644 index 000000000000..a74094f4e040 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/ArmMongoDBAtlasModelFactory.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; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.MongoDBAtlas.Models +{ + /// Model factory for models. + public static partial class ArmMongoDBAtlasModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static MongoDBAtlasOrganizationData MongoDBAtlasOrganizationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, MongoDBAtlasOrganizationProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new MongoDBAtlasOrganizationData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// MongoDB properties. + /// A new instance for mocking. + public static MongoDBAtlasOrganizationProperties MongoDBAtlasOrganizationProperties(MongoDBAtlasMarketplaceDetails marketplace = null, MongoDBAtlasUserDetails user = null, MongoDBAtlasResourceProvisioningState? provisioningState = null, MongoDBAtlasPartnerProperties partnerProperties = null) + { + return new MongoDBAtlasOrganizationProperties(marketplace, user, provisioningState, partnerProperties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// A new instance for mocking. + public static MongoDBAtlasMarketplaceDetails MongoDBAtlasMarketplaceDetails(string subscriptionId = null, MarketplaceSubscriptionStatus? subscriptionStatus = null, MongoDBAtlasOfferDetails offerDetails = null) + { + return new MongoDBAtlasMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasArmClient.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasArmClient.cs new file mode 100644 index 000000000000..2d9caa5a14c7 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasArmClient.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.MongoDBAtlas.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableMongoDBAtlasArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableMongoDBAtlasArmClient() + { + } + + /// 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 MockableMongoDBAtlasArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableMongoDBAtlasArmClient(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 MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(ResourceIdentifier id) + { + MongoDBAtlasOrganizationResource.ValidateResourceId(id); + return new MongoDBAtlasOrganizationResource(Client, id); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasResourceGroupResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasResourceGroupResource.cs new file mode 100644 index 000000000000..46dd882e4ffc --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasResourceGroupResource.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.MongoDBAtlas.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableMongoDBAtlasResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableMongoDBAtlasResourceGroupResource() + { + } + + /// 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 MockableMongoDBAtlasResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of MongoDBAtlasOrganizationResources in the ResourceGroupResource. + /// An object representing collection of MongoDBAtlasOrganizationResources and their operations over a MongoDBAtlasOrganizationResource. + public virtual MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations() + { + return GetCachedClient(client => new MongoDBAtlasOrganizationCollection(client, Id)); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetMongoDBAtlasOrganizationAsync(string organizationName, CancellationToken cancellationToken = default) + { + return await GetMongoDBAtlasOrganizations().GetAsync(organizationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetMongoDBAtlasOrganization(string organizationName, CancellationToken cancellationToken = default) + { + return GetMongoDBAtlasOrganizations().Get(organizationName, cancellationToken); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasSubscriptionResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasSubscriptionResource.cs new file mode 100644 index 000000000000..dd0d3f4a12fb --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MockableMongoDBAtlasSubscriptionResource.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.MongoDBAtlas.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableMongoDBAtlasSubscriptionResource : ArmResource + { + private ClientDiagnostics _mongoDBAtlasOrganizationOrganizationsClientDiagnostics; + private OrganizationsRestOperations _mongoDBAtlasOrganizationOrganizationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableMongoDBAtlasSubscriptionResource() + { + } + + /// 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 MockableMongoDBAtlasSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics MongoDBAtlasOrganizationOrganizationsClientDiagnostics => _mongoDBAtlasOrganizationOrganizationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.MongoDBAtlas", MongoDBAtlasOrganizationResource.ResourceType.Namespace, Diagnostics); + private OrganizationsRestOperations MongoDBAtlasOrganizationOrganizationsRestClient => _mongoDBAtlasOrganizationOrganizationsRestClient ??= new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MongoDBAtlasOrganizationResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetMongoDBAtlasOrganizationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MongoDBAtlasOrganizationOrganizationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MongoDBAtlasOrganizationOrganizationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MongoDBAtlasOrganizationResource(Client, MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(e)), MongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, "MockableMongoDBAtlasSubscriptionResource.GetMongoDBAtlasOrganizations", "value", "nextLink", cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetMongoDBAtlasOrganizations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => MongoDBAtlasOrganizationOrganizationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MongoDBAtlasOrganizationOrganizationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MongoDBAtlasOrganizationResource(Client, MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(e)), MongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, "MockableMongoDBAtlasSubscriptionResource.GetMongoDBAtlasOrganizations", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MongoDBAtlasExtensions.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MongoDBAtlasExtensions.cs new file mode 100644 index 000000000000..1461da28b865 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Extensions/MongoDBAtlasExtensions.cs @@ -0,0 +1,219 @@ +// 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.MongoDBAtlas.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + /// A class to add extension methods to Azure.ResourceManager.MongoDBAtlas. + public static partial class MongoDBAtlasExtensions + { + private static MockableMongoDBAtlasArmClient GetMockableMongoDBAtlasArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableMongoDBAtlasArmClient(client0)); + } + + private static MockableMongoDBAtlasResourceGroupResource GetMockableMongoDBAtlasResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableMongoDBAtlasResourceGroupResource(client, resource.Id)); + } + + private static MockableMongoDBAtlasSubscriptionResource GetMockableMongoDBAtlasSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableMongoDBAtlasSubscriptionResource(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 MongoDBAtlasOrganizationResource GetMongoDBAtlasOrganizationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableMongoDBAtlasArmClient(client).GetMongoDBAtlasOrganizationResource(id); + } + + /// + /// Gets a collection of MongoDBAtlasOrganizationResources 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 MongoDBAtlasOrganizationResources and their operations over a MongoDBAtlasOrganizationResource. + public static MongoDBAtlasOrganizationCollection GetMongoDBAtlasOrganizations(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMongoDBAtlasResourceGroupResource(resourceGroupResource).GetMongoDBAtlasOrganizations(); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Organization 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> GetMongoDBAtlasOrganizationAsync(this ResourceGroupResource resourceGroupResource, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableMongoDBAtlasResourceGroupResource(resourceGroupResource).GetMongoDBAtlasOrganizationAsync(organizationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Organization resource. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetMongoDBAtlasOrganization(this ResourceGroupResource resourceGroupResource, string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableMongoDBAtlasResourceGroupResource(resourceGroupResource).GetMongoDBAtlasOrganization(organizationName, cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-18-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 GetMongoDBAtlasOrganizationsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableMongoDBAtlasSubscriptionResource(subscriptionResource).GetMongoDBAtlasOrganizationsAsync(cancellationToken); + } + + /// + /// List OrganizationResource resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-18-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 GetMongoDBAtlasOrganizations(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableMongoDBAtlasSubscriptionResource(subscriptionResource).GetMongoDBAtlasOrganizations(cancellationToken); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Argument.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..8617e7d4048c --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..9c926f199b1f --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ChangeTrackingList.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..f4a383302d51 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..ee63971b1d1c --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,407 @@ +// Copyright (c) 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.MongoDBAtlas +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Optional.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..c3179211abb1 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..11b5fde2bb19 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperation.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperation.cs new file mode 100644 index 000000000000..17d176fe5e42 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MongoDBAtlas +{ +#pragma warning disable SA1649 // File name should match first type name + internal class MongoDBAtlasArmOperation : 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 MongoDBAtlasArmOperation for mocking. + protected MongoDBAtlasArmOperation() + { + } + + internal MongoDBAtlasArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal MongoDBAtlasArmOperation(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, "MongoDBAtlasArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerMongoDBAtlasContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperationOfT.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperationOfT.cs new file mode 100644 index 000000000000..f7610ab515be --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.MongoDBAtlas +{ +#pragma warning disable SA1649 // File name should match first type name + internal class MongoDBAtlasArmOperation : 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 MongoDBAtlasArmOperation for mocking. + protected MongoDBAtlasArmOperation() + { + } + + internal MongoDBAtlasArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal MongoDBAtlasArmOperation(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, "MongoDBAtlasArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerMongoDBAtlasContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasOrganizationOperationSource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasOrganizationOperationSource.cs new file mode 100644 index 000000000000..0355d54de91d --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/LongRunningOperation/MongoDBAtlasOrganizationOperationSource.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.MongoDBAtlas +{ + internal class MongoDBAtlasOrganizationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal MongoDBAtlasOrganizationOperationSource(ArmClient client) + { + _client = client; + } + + MongoDBAtlasOrganizationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerMongoDBAtlasContext.Default); + return new MongoDBAtlasOrganizationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerMongoDBAtlasContext.Default); + return await Task.FromResult(new MongoDBAtlasOrganizationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/AzureResourceManagerMongoDBAtlasContext.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/AzureResourceManagerMongoDBAtlasContext.cs new file mode 100644 index 000000000000..821b0688d288 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/AzureResourceManagerMongoDBAtlasContext.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + /// + /// 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' + /// + public partial class AzureResourceManagerMongoDBAtlasContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MarketplaceSubscriptionStatus.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MarketplaceSubscriptionStatus.cs new file mode 100644 index 000000000000..e9fd89f339e5 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MarketplaceSubscriptionStatus.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.MongoDBAtlas.Models +{ + /// Marketplace subscription status of a resource. + public readonly partial struct MarketplaceSubscriptionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MarketplaceSubscriptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingFulfillmentStartValue = "PendingFulfillmentStart"; + private const string SubscribedValue = "Subscribed"; + private const string SuspendedValue = "Suspended"; + private const string UnsubscribedValue = "Unsubscribed"; + + /// Purchased but not yet activated. + public static MarketplaceSubscriptionStatus PendingFulfillmentStart { get; } = new MarketplaceSubscriptionStatus(PendingFulfillmentStartValue); + /// Marketplace subscription is activated. + public static MarketplaceSubscriptionStatus Subscribed { get; } = new MarketplaceSubscriptionStatus(SubscribedValue); + /// This state indicates that a customer's payment for the Marketplace service was not received. + public static MarketplaceSubscriptionStatus Suspended { get; } = new MarketplaceSubscriptionStatus(SuspendedValue); + /// Customer has cancelled the subscription. + public static MarketplaceSubscriptionStatus Unsubscribed { get; } = new MarketplaceSubscriptionStatus(UnsubscribedValue); + /// Determines if two values are the same. + public static bool operator ==(MarketplaceSubscriptionStatus left, MarketplaceSubscriptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MarketplaceSubscriptionStatus left, MarketplaceSubscriptionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MarketplaceSubscriptionStatus(string value) => new MarketplaceSubscriptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MarketplaceSubscriptionStatus other && Equals(other); + /// + public bool Equals(MarketplaceSubscriptionStatus 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.Serialization.cs new file mode 100644 index 000000000000..bf7c78265dcd --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.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.MongoDBAtlas.Models +{ + public partial class MongoDBAtlasMarketplaceDetails : 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(MongoDBAtlasMarketplaceDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + if (options.Format != "W" && Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + writer.WritePropertyName("offerDetails"u8); + writer.WriteObjectValue(OfferDetails, 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 + } + } + } + + MongoDBAtlasMarketplaceDetails 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(MongoDBAtlasMarketplaceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasMarketplaceDetails(document.RootElement, options); + } + + internal static MongoDBAtlasMarketplaceDetails DeserializeMongoDBAtlasMarketplaceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + MarketplaceSubscriptionStatus? subscriptionStatus = default; + MongoDBAtlasOfferDetails offerDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new MarketplaceSubscriptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("offerDetails"u8)) + { + offerDetails = MongoDBAtlasOfferDetails.DeserializeMongoDBAtlasOfferDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasMarketplaceDetails)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasMarketplaceDetails 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 DeserializeMongoDBAtlasMarketplaceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasMarketplaceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.cs new file mode 100644 index 000000000000..876392681720 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasMarketplaceDetails.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.MongoDBAtlas.Models +{ + /// Marketplace details for an organization. + public partial class MongoDBAtlasMarketplaceDetails + { + /// + /// 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 subscription id for the the marketplace offer is purchased from. + /// Offer details for the marketplace that is selected by the user. + /// or is null. + public MongoDBAtlasMarketplaceDetails(string subscriptionId, MongoDBAtlasOfferDetails offerDetails) + { + Argument.AssertNotNull(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(offerDetails, nameof(offerDetails)); + + SubscriptionId = subscriptionId; + OfferDetails = offerDetails; + } + + /// Initializes a new instance of . + /// Azure subscription id for the the marketplace offer is purchased from. + /// Marketplace subscription status. + /// Offer details for the marketplace that is selected by the user. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasMarketplaceDetails(string subscriptionId, MarketplaceSubscriptionStatus? subscriptionStatus, MongoDBAtlasOfferDetails offerDetails, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + SubscriptionStatus = subscriptionStatus; + OfferDetails = offerDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasMarketplaceDetails() + { + } + + /// Azure subscription id for the the marketplace offer is purchased from. + public string SubscriptionId { get; set; } + /// Marketplace subscription status. + public MarketplaceSubscriptionStatus? SubscriptionStatus { get; } + /// Offer details for the marketplace that is selected by the user. + public MongoDBAtlasOfferDetails OfferDetails { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.Serialization.cs new file mode 100644 index 000000000000..63a9fb679474 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) 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.MongoDBAtlas.Models +{ + public partial class MongoDBAtlasOfferDetails : 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(MongoDBAtlasOfferDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("publisherId"u8); + writer.WriteStringValue(PublisherId); + writer.WritePropertyName("offerId"u8); + writer.WriteStringValue(OfferId); + writer.WritePropertyName("planId"u8); + writer.WriteStringValue(PlanId); + if (Optional.IsDefined(PlanName)) + { + writer.WritePropertyName("planName"u8); + writer.WriteStringValue(PlanName); + } + if (Optional.IsDefined(TermUnit)) + { + writer.WritePropertyName("termUnit"u8); + writer.WriteStringValue(TermUnit); + } + if (Optional.IsDefined(TermId)) + { + writer.WritePropertyName("termId"u8); + writer.WriteStringValue(TermId); + } + 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 + } + } + } + + MongoDBAtlasOfferDetails 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(MongoDBAtlasOfferDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasOfferDetails(document.RootElement, options); + } + + internal static MongoDBAtlasOfferDetails DeserializeMongoDBAtlasOfferDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisherId = default; + string offerId = default; + string planId = default; + string planName = default; + string termUnit = default; + string termId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisherId"u8)) + { + publisherId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planId"u8)) + { + planId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planName"u8)) + { + planName = property.Value.GetString(); + continue; + } + if (property.NameEquals("termUnit"u8)) + { + termUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("termId"u8)) + { + termId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasOfferDetails( + publisherId, + offerId, + planId, + planName, + termUnit, + termId, + 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOfferDetails)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasOfferDetails 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 DeserializeMongoDBAtlasOfferDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOfferDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.cs new file mode 100644 index 000000000000..cf0a272565aa --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOfferDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MongoDBAtlas.Models +{ + /// Offer details for the marketplace that is selected by the user. + public partial class MongoDBAtlasOfferDetails + { + /// + /// 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 . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// , or is null. + public MongoDBAtlasOfferDetails(string publisherId, string offerId, string planId) + { + Argument.AssertNotNull(publisherId, nameof(publisherId)); + Argument.AssertNotNull(offerId, nameof(offerId)); + Argument.AssertNotNull(planId, nameof(planId)); + + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + } + + /// Initializes a new instance of . + /// Publisher Id for the marketplace offer. + /// Offer Id for the marketplace offer. + /// Plan Id for the marketplace offer. + /// Plan Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Plan Display Name for the marketplace offer. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasOfferDetails(string publisherId, string offerId, string planId, string planName, string termUnit, string termId, IDictionary serializedAdditionalRawData) + { + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + PlanName = planName; + TermUnit = termUnit; + TermId = termId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasOfferDetails() + { + } + + /// Publisher Id for the marketplace offer. + public string PublisherId { get; set; } + /// Offer Id for the marketplace offer. + public string OfferId { get; set; } + /// Plan Id for the marketplace offer. + public string PlanId { get; set; } + /// Plan Name for the marketplace offer. + public string PlanName { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermUnit { get; set; } + /// Plan Display Name for the marketplace offer. + public string TermId { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.Serialization.cs new file mode 100644 index 000000000000..9c13a067b9e3 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) 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.MongoDBAtlas.Models +{ + public partial class MongoDBAtlasOrganizationProperties : 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(MongoDBAtlasOrganizationProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("marketplace"u8); + writer.WriteObjectValue(Marketplace, options); + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(PartnerProperties)) + { + writer.WritePropertyName("partnerProperties"u8); + writer.WriteObjectValue(PartnerProperties, 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 + } + } + } + + MongoDBAtlasOrganizationProperties 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(MongoDBAtlasOrganizationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasOrganizationProperties(document.RootElement, options); + } + + internal static MongoDBAtlasOrganizationProperties DeserializeMongoDBAtlasOrganizationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MongoDBAtlasMarketplaceDetails marketplace = default; + MongoDBAtlasUserDetails user = default; + MongoDBAtlasResourceProvisioningState? provisioningState = default; + MongoDBAtlasPartnerProperties partnerProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("marketplace"u8)) + { + marketplace = MongoDBAtlasMarketplaceDetails.DeserializeMongoDBAtlasMarketplaceDetails(property.Value, options); + continue; + } + if (property.NameEquals("user"u8)) + { + user = MongoDBAtlasUserDetails.DeserializeMongoDBAtlasUserDetails(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new MongoDBAtlasResourceProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("partnerProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + partnerProperties = MongoDBAtlasPartnerProperties.DeserializeMongoDBAtlasPartnerProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasOrganizationProperties(marketplace, user, provisioningState, partnerProperties, 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOrganizationProperties)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasOrganizationProperties 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 DeserializeMongoDBAtlasOrganizationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOrganizationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.cs new file mode 100644 index 000000000000..9441aed7f605 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasOrganizationProperties.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.MongoDBAtlas.Models +{ + /// Properties specific to Organization. + public partial class MongoDBAtlasOrganizationProperties + { + /// + /// 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 . + /// Marketplace details of the resource. + /// Details of the user. + /// or is null. + public MongoDBAtlasOrganizationProperties(MongoDBAtlasMarketplaceDetails marketplace, MongoDBAtlasUserDetails user) + { + Argument.AssertNotNull(marketplace, nameof(marketplace)); + Argument.AssertNotNull(user, nameof(user)); + + Marketplace = marketplace; + User = user; + } + + /// Initializes a new instance of . + /// Marketplace details of the resource. + /// Details of the user. + /// Provisioning state of the resource. + /// MongoDB properties. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasOrganizationProperties(MongoDBAtlasMarketplaceDetails marketplace, MongoDBAtlasUserDetails user, MongoDBAtlasResourceProvisioningState? provisioningState, MongoDBAtlasPartnerProperties partnerProperties, IDictionary serializedAdditionalRawData) + { + Marketplace = marketplace; + User = user; + ProvisioningState = provisioningState; + PartnerProperties = partnerProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasOrganizationProperties() + { + } + + /// Marketplace details of the resource. + public MongoDBAtlasMarketplaceDetails Marketplace { get; set; } + /// Details of the user. + public MongoDBAtlasUserDetails User { get; set; } + /// Provisioning state of the resource. + public MongoDBAtlasResourceProvisioningState? ProvisioningState { get; } + /// MongoDB properties. + public MongoDBAtlasPartnerProperties PartnerProperties { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.Serialization.cs new file mode 100644 index 000000000000..8dc62702daee --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.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.MongoDBAtlas.Models +{ + public partial class MongoDBAtlasPartnerProperties : 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(MongoDBAtlasPartnerProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(OrganizationId)) + { + writer.WritePropertyName("organizationId"u8); + writer.WriteStringValue(OrganizationId); + } + if (Optional.IsDefined(RedirectUri)) + { + writer.WritePropertyName("redirectUrl"u8); + writer.WriteStringValue(RedirectUri); + } + writer.WritePropertyName("organizationName"u8); + writer.WriteStringValue(OrganizationName); + 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 + } + } + } + + MongoDBAtlasPartnerProperties 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(MongoDBAtlasPartnerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasPartnerProperties(document.RootElement, options); + } + + internal static MongoDBAtlasPartnerProperties DeserializeMongoDBAtlasPartnerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string organizationId = default; + string redirectUrl = default; + string organizationName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("organizationId"u8)) + { + organizationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("redirectUrl"u8)) + { + redirectUrl = property.Value.GetString(); + continue; + } + if (property.NameEquals("organizationName"u8)) + { + organizationName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasPartnerProperties(organizationId, redirectUrl, organizationName, 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasPartnerProperties)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasPartnerProperties 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 DeserializeMongoDBAtlasPartnerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasPartnerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.cs new file mode 100644 index 000000000000..d530fdf06b16 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasPartnerProperties.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.MongoDBAtlas.Models +{ + /// MongoDB specific Properties. + public partial class MongoDBAtlasPartnerProperties + { + /// + /// 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 . + /// Organization name in MongoDB system. + /// is null. + public MongoDBAtlasPartnerProperties(string organizationName) + { + Argument.AssertNotNull(organizationName, nameof(organizationName)); + + OrganizationName = organizationName; + } + + /// Initializes a new instance of . + /// Organization Id in MongoDB system. + /// Redirect URL for the MongoDB. + /// Organization name in MongoDB system. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasPartnerProperties(string organizationId, string redirectUri, string organizationName, IDictionary serializedAdditionalRawData) + { + OrganizationId = organizationId; + RedirectUri = redirectUri; + OrganizationName = organizationName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasPartnerProperties() + { + } + + /// Organization Id in MongoDB system. + public string OrganizationId { get; set; } + /// Redirect URL for the MongoDB. + public string RedirectUri { get; set; } + /// Organization name in MongoDB system. + public string OrganizationName { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasResourceProvisioningState.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasResourceProvisioningState.cs new file mode 100644 index 000000000000..00fc54a3cb66 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasResourceProvisioningState.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.MongoDBAtlas.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct MongoDBAtlasResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public MongoDBAtlasResourceProvisioningState(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 MongoDBAtlasResourceProvisioningState Succeeded { get; } = new MongoDBAtlasResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static MongoDBAtlasResourceProvisioningState Failed { get; } = new MongoDBAtlasResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static MongoDBAtlasResourceProvisioningState Canceled { get; } = new MongoDBAtlasResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(MongoDBAtlasResourceProvisioningState left, MongoDBAtlasResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(MongoDBAtlasResourceProvisioningState left, MongoDBAtlasResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator MongoDBAtlasResourceProvisioningState(string value) => new MongoDBAtlasResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is MongoDBAtlasResourceProvisioningState other && Equals(other); + /// + public bool Equals(MongoDBAtlasResourceProvisioningState 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.Serialization.cs new file mode 100644 index 000000000000..3477589e3f71 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) 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.MongoDBAtlas.Models +{ + public partial class MongoDBAtlasUserDetails : 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(MongoDBAtlasUserDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstName"u8); + writer.WriteStringValue(FirstName); + writer.WritePropertyName("lastName"u8); + writer.WriteStringValue(LastName); + writer.WritePropertyName("emailAddress"u8); + writer.WriteStringValue(EmailAddress); + if (Optional.IsDefined(Upn)) + { + writer.WritePropertyName("upn"u8); + writer.WriteStringValue(Upn); + } + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (Optional.IsDefined(CompanyName)) + { + writer.WritePropertyName("companyName"u8); + writer.WriteStringValue(CompanyName); + } + 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 + } + } + } + + MongoDBAtlasUserDetails 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(MongoDBAtlasUserDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasUserDetails(document.RootElement, options); + } + + internal static MongoDBAtlasUserDetails DeserializeMongoDBAtlasUserDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstName = default; + string lastName = default; + string emailAddress = default; + string upn = default; + string phoneNumber = default; + string companyName = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstName"u8)) + { + firstName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastName"u8)) + { + lastName = property.Value.GetString(); + continue; + } + if (property.NameEquals("emailAddress"u8)) + { + emailAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("upn"u8)) + { + upn = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("companyName"u8)) + { + companyName = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasUserDetails( + firstName, + lastName, + emailAddress, + upn, + phoneNumber, + companyName, + 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasUserDetails)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasUserDetails 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 DeserializeMongoDBAtlasUserDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasUserDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.cs new file mode 100644 index 000000000000..851a418f8a5c --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/MongoDBAtlasUserDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.MongoDBAtlas.Models +{ + /// User details for an organization. + public partial class MongoDBAtlasUserDetails + { + /// + /// 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 . + /// First name of the user. + /// Last name of the user. + /// Email address of the user. + /// , or is null. + public MongoDBAtlasUserDetails(string firstName, string lastName, string emailAddress) + { + Argument.AssertNotNull(firstName, nameof(firstName)); + Argument.AssertNotNull(lastName, nameof(lastName)); + Argument.AssertNotNull(emailAddress, nameof(emailAddress)); + + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + } + + /// Initializes a new instance of . + /// First name of the user. + /// Last name of the user. + /// Email address of the user. + /// User's principal name. + /// User's phone number. + /// Company Name. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasUserDetails(string firstName, string lastName, string emailAddress, string upn, string phoneNumber, string companyName, IDictionary serializedAdditionalRawData) + { + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + Upn = upn; + PhoneNumber = phoneNumber; + CompanyName = companyName; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasUserDetails() + { + } + + /// First name of the user. + public string FirstName { get; set; } + /// Last name of the user. + public string LastName { get; set; } + /// Email address of the user. + public string EmailAddress { get; set; } + /// User's principal name. + public string Upn { get; set; } + /// User's phone number. + public string PhoneNumber { get; set; } + /// Company Name. + public string CompanyName { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.Serialization.cs new file mode 100644 index 000000000000..a26692e40c53 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.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.MongoDBAtlas.Models +{ + internal partial class OrganizationResourceListResult : 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(OrganizationResourceListResult)} 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 + } + } + } + + OrganizationResourceListResult 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(OrganizationResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOrganizationResourceListResult(document.RootElement, options); + } + + internal static OrganizationResourceListResult DeserializeOrganizationResourceListResult(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(MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(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 OrganizationResourceListResult(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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + OrganizationResourceListResult 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 DeserializeOrganizationResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OrganizationResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.cs new file mode 100644 index 000000000000..5fb1160f67ea --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/Models/OrganizationResourceListResult.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.MongoDBAtlas.Models +{ + /// The response of a OrganizationResource list operation. + internal partial class OrganizationResourceListResult + { + /// + /// 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 OrganizationResource items on this page. + /// is null. + internal OrganizationResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OrganizationResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OrganizationResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OrganizationResourceListResult() + { + } + + /// The OrganizationResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationCollection.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationCollection.cs new file mode 100644 index 000000000000..6d7d63cb5b70 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationCollection.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.MongoDBAtlas +{ + /// + /// 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 GetMongoDBAtlasOrganizations method from an instance of . + /// + public partial class MongoDBAtlasOrganizationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _mongoDBAtlasOrganizationOrganizationsClientDiagnostics; + private readonly OrganizationsRestOperations _mongoDBAtlasOrganizationOrganizationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MongoDBAtlasOrganizationCollection() + { + } + + /// 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 MongoDBAtlasOrganizationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mongoDBAtlasOrganizationOrganizationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MongoDBAtlas", MongoDBAtlasOrganizationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(MongoDBAtlasOrganizationResource.ResourceType, out string mongoDBAtlasOrganizationOrganizationsApiVersion); + _mongoDBAtlasOrganizationOrganizationsRestClient = new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mongoDBAtlasOrganizationOrganizationsApiVersion); +#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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-18-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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationName, data, cancellationToken).ConfigureAwait(false); + var operation = new MongoDBAtlasArmOperation(new MongoDBAtlasOrganizationOperationSource(Client), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, organizationName, 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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-11-18-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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, organizationName, data, cancellationToken); + var operation = new MongoDBAtlasArmOperation(new MongoDBAtlasOrganizationOperationSource(Client), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, organizationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.Get"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.Get"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List OrganizationResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-18-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) => _mongoDBAtlasOrganizationOrganizationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mongoDBAtlasOrganizationOrganizationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MongoDBAtlasOrganizationResource(Client, MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(e)), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, "MongoDBAtlasOrganizationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List OrganizationResource resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations + /// + /// + /// Operation Id + /// OrganizationResource_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-18-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) => _mongoDBAtlasOrganizationOrganizationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _mongoDBAtlasOrganizationOrganizationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MongoDBAtlasOrganizationResource(Client, MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(e)), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, "MongoDBAtlasOrganizationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.Exists"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationName, 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.Exists"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationName, 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, organizationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Organization resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, organizationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.Serialization.cs new file mode 100644 index 000000000000..c17141894d7e --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.MongoDBAtlas.Models; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + public partial class MongoDBAtlasOrganizationData : 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(MongoDBAtlasOrganizationData)} 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(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + MongoDBAtlasOrganizationData 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(MongoDBAtlasOrganizationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMongoDBAtlasOrganizationData(document.RootElement, options); + } + + internal static MongoDBAtlasOrganizationData DeserializeMongoDBAtlasOrganizationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + MongoDBAtlasOrganizationProperties properties = default; + ManagedServiceIdentity identity = 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 = MongoDBAtlasOrganizationProperties.DeserializeMongoDBAtlasOrganizationProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new MongoDBAtlasOrganizationData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + 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, AzureResourceManagerMongoDBAtlasContext.Default); + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOrganizationData)} does not support writing '{options.Format}' format."); + } + } + + MongoDBAtlasOrganizationData 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 DeserializeMongoDBAtlasOrganizationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MongoDBAtlasOrganizationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.cs new file mode 100644 index 000000000000..1c16d79420dc --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationData.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.MongoDBAtlas.Models; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + /// + /// A class representing the MongoDBAtlasOrganization data model. + /// The resource model definition for an Azure Organization + /// + public partial class MongoDBAtlasOrganizationData : 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 MongoDBAtlasOrganizationData(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. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal MongoDBAtlasOrganizationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, MongoDBAtlasOrganizationProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal MongoDBAtlasOrganizationData() + { + } + + /// The resource-specific properties for this resource. + public MongoDBAtlasOrganizationProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.Serialization.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.Serialization.cs new file mode 100644 index 000000000000..5e9862c11837 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.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.MongoDBAtlas +{ + public partial class MongoDBAtlasOrganizationResource : IJsonModel + { + private static MongoDBAtlasOrganizationData s_dataDeserializationInstance; + private static MongoDBAtlasOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + MongoDBAtlasOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMongoDBAtlasContext.Default); + + MongoDBAtlasOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMongoDBAtlasContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.cs new file mode 100644 index 000000000000..a113f50abc25 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/MongoDBAtlasOrganizationResource.cs @@ -0,0 +1,706 @@ +// 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; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + /// + /// A Class representing a MongoDBAtlasOrganization 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 GetMongoDBAtlasOrganizationResource method. + /// Otherwise you can get one from its parent resource using the GetMongoDBAtlasOrganization method. + /// + public partial class MongoDBAtlasOrganizationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The organizationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string organizationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _mongoDBAtlasOrganizationOrganizationsClientDiagnostics; + private readonly OrganizationsRestOperations _mongoDBAtlasOrganizationOrganizationsRestClient; + private readonly MongoDBAtlasOrganizationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "MongoDB.Atlas/organizations"; + + /// Initializes a new instance of the class for mocking. + protected MongoDBAtlasOrganizationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal MongoDBAtlasOrganizationResource(ArmClient client, MongoDBAtlasOrganizationData 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 MongoDBAtlasOrganizationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _mongoDBAtlasOrganizationOrganizationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.MongoDBAtlas", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string mongoDBAtlasOrganizationOrganizationsApiVersion); + _mongoDBAtlasOrganizationOrganizationsRestClient = new OrganizationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, mongoDBAtlasOrganizationOrganizationsApiVersion); +#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 MongoDBAtlasOrganizationData 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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Get"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Get"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Delete + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Delete"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new MongoDBAtlasArmOperation(_mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Delete + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Delete"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new MongoDBAtlasArmOperation(_mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Update + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Update"); + scope.Start(); + try + { + var response = await _mongoDBAtlasOrganizationOrganizationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new MongoDBAtlasArmOperation(new MongoDBAtlasOrganizationOperationSource(Client), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, 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 OrganizationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Update + /// + /// + /// Default Api Version + /// 2024-11-18-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.Update"); + scope.Start(); + try + { + var response = _mongoDBAtlasOrganizationOrganizationsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, cancellationToken); + var operation = new MongoDBAtlasArmOperation(new MongoDBAtlasOrganizationOperationSource(Client), _mongoDBAtlasOrganizationOrganizationsClientDiagnostics, Pipeline, _mongoDBAtlasOrganizationOrganizationsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data).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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 _mongoDBAtlasOrganizationOrganizationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/MongoDB.Atlas/organizations/{organizationName} + /// + /// + /// Operation Id + /// OrganizationResource_Get + /// + /// + /// Default Api Version + /// 2024-11-18-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 = _mongoDBAtlasOrganizationOrganizationsClientDiagnostics.CreateScope("MongoDBAtlasOrganizationResource.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 = _mongoDBAtlasOrganizationOrganizationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new MongoDBAtlasOrganizationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new MongoDBAtlasOrganizationData(current.Location); + 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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/ProviderConstants.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..c9e87c7658ba --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/RestOperations/OrganizationsRestOperations.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/RestOperations/OrganizationsRestOperations.cs new file mode 100644 index 000000000000..e9cc002424f8 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Generated/RestOperations/OrganizationsRestOperations.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.MongoDBAtlas.Models; + +namespace Azure.ResourceManager.MongoDBAtlas +{ + internal partial class OrganizationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OrganizationsRestOperations. + /// 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 OrganizationsRestOperations(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-11-18-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string organizationName) + { + 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a OrganizationResource. + /// 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 Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + MongoDBAtlasOrganizationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MongoDBAtlasOrganizationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a OrganizationResource. + /// 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 Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, organizationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + MongoDBAtlasOrganizationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MongoDBAtlasOrganizationData.DeserializeMongoDBAtlasOrganizationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MongoDBAtlasOrganizationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string organizationName, MongoDBAtlasOrganizationData 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, MongoDBAtlasOrganizationData 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, 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 OrganizationResource. + /// 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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, 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 OrganizationResource. + /// 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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, organizationName, 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 organizationName, MongoDBAtlasOrganizationData 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string organizationName, MongoDBAtlasOrganizationData 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, 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 OrganizationResource. + /// 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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, 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 OrganizationResource. + /// 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 Organization 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 organizationName, MongoDBAtlasOrganizationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, organizationName, 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 organizationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string organizationName) + { + 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/MongoDB.Atlas/organizations/", false); + uri.AppendPath(organizationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a OrganizationResource. + /// 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 Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName); + 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 OrganizationResource. + /// 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 Organization 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 organizationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(organizationName, nameof(organizationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, organizationName); + _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/MongoDB.Atlas/organizations", 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/MongoDB.Atlas/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(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/MongoDB.Atlas/organizations", 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/MongoDB.Atlas/organizations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(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 OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(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 OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List OrganizationResource 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: + { + OrganizationResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OrganizationResourceListResult.DeserializeOrganizationResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Properties/AssemblyInfo.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..efda5a80d6b2 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/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.MongoDBAtlas.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("MongoDBAtlas")] diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Azure.ResourceManager.MongoDBAtlas.Tests.csproj b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Azure.ResourceManager.MongoDBAtlas.Tests.csproj new file mode 100644 index 000000000000..3c475a87d342 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/Azure.ResourceManager.MongoDBAtlas.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestBase.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestBase.cs new file mode 100644 index 000000000000..a12a9082533f --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestBase.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.MongoDBAtlas.Tests +{ + public class MongoDBAtlasManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected MongoDBAtlasManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected MongoDBAtlasManagementTestBase(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/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestEnvironment.cs b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestEnvironment.cs new file mode 100644 index 000000000000..b36c65a74962 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tests/MongoDBAtlasManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.MongoDBAtlas.Tests +{ + public class MongoDBAtlasManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tsp-location.yaml b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tsp-location.yaml new file mode 100644 index 000000000000..f11bbe8c5ba1 --- /dev/null +++ b/sdk/mongodbatlas/Azure.ResourceManager.MongoDBAtlas/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/liftrmongodb/MongoDB.Atlas.Management +commit: b8e3b77624ee6b96b81578c0efa1e6e0b2ac53ec +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/mongodbatlas/ci.mgmt.yml b/sdk/mongodbatlas/ci.mgmt.yml new file mode 100644 index 000000000000..89a18dfc7ff3 --- /dev/null +++ b/sdk/mongodbatlas/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/mongodbatlas /ci.mgmt.yml + - sdk/mongodbatlas /Azure.ResourceManager.MongoDBAtlas / + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: mongodbatlas + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.MongoDBAtlas + safeName: AzureResourceManagerMongoDBAtlas diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActionGroupResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActionGroupResource.Serialization.cs index d75a6a2f612f..5d6d206fd951 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActionGroupResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActionGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class ActionGroupResource : IJsonModel { + private static ActionGroupData s_dataDeserializationInstance; + private static ActionGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ActionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ActionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); ActionGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActivityLogAlertResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActivityLogAlertResource.Serialization.cs index 732ed53e1aad..92c26bb85d3c 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActivityLogAlertResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ActivityLogAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class ActivityLogAlertResource : IJsonModel { + private static ActivityLogAlertData s_dataDeserializationInstance; + private static ActivityLogAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ActivityLogAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ActivityLogAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); ActivityLogAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AlertRuleResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AlertRuleResource.Serialization.cs index a5b36a84cc53..7b2497ec8622 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AlertRuleResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AlertRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class AlertRuleResource : IJsonModel { + private static AlertRuleData s_dataDeserializationInstance; + private static AlertRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); AlertRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AutoscaleSettingResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AutoscaleSettingResource.Serialization.cs index 6733303b2bef..c780eaf11835 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AutoscaleSettingResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/AutoscaleSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class AutoscaleSettingResource : IJsonModel { + private static AutoscaleSettingData s_dataDeserializationInstance; + private static AutoscaleSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutoscaleSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutoscaleSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); AutoscaleSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionEndpointResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionEndpointResource.Serialization.cs index d6b1f841e777..86f61e4b1cd1 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionEndpointResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class DataCollectionEndpointResource : IJsonModel { + private static DataCollectionEndpointData s_dataDeserializationInstance; + private static DataCollectionEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataCollectionEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataCollectionEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); DataCollectionEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleAssociationResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleAssociationResource.Serialization.cs index e8d056c350ec..cfae36f4bef4 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleAssociationResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleAssociationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class DataCollectionRuleAssociationResource : IJsonModel { + private static DataCollectionRuleAssociationData s_dataDeserializationInstance; + private static DataCollectionRuleAssociationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataCollectionRuleAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataCollectionRuleAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); DataCollectionRuleAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleResource.Serialization.cs index 3ae2c2590cee..029ee3365d46 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DataCollectionRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class DataCollectionRuleResource : IJsonModel { + private static DataCollectionRuleData s_dataDeserializationInstance; + private static DataCollectionRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataCollectionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataCollectionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); DataCollectionRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingResource.Serialization.cs index cf98c8f03b91..a2681b09d4df 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class DiagnosticSettingResource : IJsonModel { + private static DiagnosticSettingData s_dataDeserializationInstance; + private static DiagnosticSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); DiagnosticSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingsCategoryResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingsCategoryResource.Serialization.cs index b561539f4ceb..2a3bf151f4df 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingsCategoryResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/DiagnosticSettingsCategoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class DiagnosticSettingsCategoryResource : IJsonModel { + private static DiagnosticSettingsCategoryData s_dataDeserializationInstance; + private static DiagnosticSettingsCategoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticSettingsCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticSettingsCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); DiagnosticSettingsCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/LogProfileResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/LogProfileResource.Serialization.cs index 840d9f4d8a4b..861d6063d5a3 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/LogProfileResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/LogProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class LogProfileResource : IJsonModel { + private static LogProfileData s_dataDeserializationInstance; + private static LogProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); LogProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MetricAlertResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MetricAlertResource.Serialization.cs index e9cae95137d7..866644911208 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MetricAlertResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MetricAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MetricAlertResource : IJsonModel { + private static MetricAlertData s_dataDeserializationInstance; + private static MetricAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MetricAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MetricAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MetricAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateEndpointConnectionResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateEndpointConnectionResource.Serialization.cs index f318ff72d68e..026ad6eadf61 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MonitorPrivateEndpointConnectionResource : IJsonModel { + private static MonitorPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MonitorPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitorPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitorPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MonitorPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkResource.Serialization.cs index ba03ae95c083..d85ce886870d 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MonitorPrivateLinkResource : IJsonModel { + private static MonitorPrivateLinkResourceData s_dataDeserializationInstance; + private static MonitorPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitorPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitorPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MonitorPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopeResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopeResource.Serialization.cs index f3f4f8a73e2b..72196e363cbe 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopeResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MonitorPrivateLinkScopeResource : IJsonModel { + private static MonitorPrivateLinkScopeData s_dataDeserializationInstance; + private static MonitorPrivateLinkScopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitorPrivateLinkScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitorPrivateLinkScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MonitorPrivateLinkScopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopedResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopedResource.Serialization.cs index cc0500784b84..5053c86789a8 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopedResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorPrivateLinkScopedResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MonitorPrivateLinkScopedResource : IJsonModel { + private static MonitorPrivateLinkScopedResourceData s_dataDeserializationInstance; + private static MonitorPrivateLinkScopedResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitorPrivateLinkScopedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitorPrivateLinkScopedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MonitorPrivateLinkScopedResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorWorkspaceResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorWorkspaceResource.Serialization.cs index 176eadc7635c..26a99094c03c 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorWorkspaceResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/MonitorWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class MonitorWorkspaceResource : IJsonModel { + private static MonitorWorkspaceResourceData s_dataDeserializationInstance; + private static MonitorWorkspaceResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MonitorWorkspaceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MonitorWorkspaceResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); MonitorWorkspaceResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/PipelineGroupResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/PipelineGroupResource.Serialization.cs index ed04c076dc25..6fad89e574c5 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/PipelineGroupResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/PipelineGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class PipelineGroupResource : IJsonModel { + private static PipelineGroupData s_dataDeserializationInstance; + private static PipelineGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PipelineGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PipelineGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); PipelineGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ScheduledQueryRuleResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ScheduledQueryRuleResource.Serialization.cs index 00c26b1ad871..11b60773db3f 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ScheduledQueryRuleResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/ScheduledQueryRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class ScheduledQueryRuleResource : IJsonModel { + private static ScheduledQueryRuleData s_dataDeserializationInstance; + private static ScheduledQueryRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScheduledQueryRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScheduledQueryRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); ScheduledQueryRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/VmInsightsOnboardingStatusResource.Serialization.cs b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/VmInsightsOnboardingStatusResource.Serialization.cs index 7e42fa053726..0abdce663ebe 100644 --- a/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/VmInsightsOnboardingStatusResource.Serialization.cs +++ b/sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/VmInsightsOnboardingStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Monitor { public partial class VmInsightsOnboardingStatusResource : IJsonModel { + private static VmInsightsOnboardingStatusData s_dataDeserializationInstance; + private static VmInsightsOnboardingStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VmInsightsOnboardingStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VmInsightsOnboardingStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMonitorContext.Default); VmInsightsOnboardingStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs index 3258559907cf..34ad3da2b84f 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlAdvisorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlAdvisorResource : IJsonModel { + private static MySqlAdvisorData s_dataDeserializationInstance; + private static MySqlAdvisorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlAdvisorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs index de8760003b4a..20803d3b2400 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlConfigurationResource : IJsonModel { + private static MySqlConfigurationData s_dataDeserializationInstance; + private static MySqlConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs index 976ad56d1db2..1005cd4b77b3 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlDatabaseResource : IJsonModel { + private static MySqlDatabaseData s_dataDeserializationInstance; + private static MySqlDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs index 5a278e7be661..f374c7b7fee9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlFirewallRuleResource : IJsonModel { + private static MySqlFirewallRuleData s_dataDeserializationInstance; + private static MySqlFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs index 7c1d810adfcf..3095969c9541 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlPrivateEndpointConnectionResource : IJsonModel { + private static MySqlPrivateEndpointConnectionData s_dataDeserializationInstance; + private static MySqlPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs index c0a0922f2da1..7fadf6770ec1 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlPrivateLinkResource : IJsonModel { + private static MySqlPrivateLinkResourceData s_dataDeserializationInstance; + private static MySqlPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs index b1df43eeb6a7..102f51e235a5 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryStatisticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlQueryStatisticResource : IJsonModel { + private static MySqlQueryStatisticData s_dataDeserializationInstance; + private static MySqlQueryStatisticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlQueryStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlQueryStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlQueryStatisticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs index 7fddf6eefb7d..d715aaa6cc0b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlQueryTextResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlQueryTextResource : IJsonModel { + private static MySqlQueryTextData s_dataDeserializationInstance; + private static MySqlQueryTextData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlQueryTextData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlQueryTextData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlQueryTextData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs index a594db8d729f..03c20752e857 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlRecommendationActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlRecommendationActionResource : IJsonModel { + private static MySqlRecommendationActionData s_dataDeserializationInstance; + private static MySqlRecommendationActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlRecommendationActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlRecommendationActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlRecommendationActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs index d43336ec6b64..ca6aa5c9f898 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlServerAdministratorResource : IJsonModel { + private static MySqlServerAdministratorData s_dataDeserializationInstance; + private static MySqlServerAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlServerAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs index a3490c5210d2..848d2de5152e 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlServerKeyResource : IJsonModel { + private static MySqlServerKeyData s_dataDeserializationInstance; + private static MySqlServerKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlServerKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs index 03149aad53a3..e367265eb3f9 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlServerResource : IJsonModel { + private static MySqlServerData s_dataDeserializationInstance; + private static MySqlServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs index 6e635a30bad2..5df1a04dca64 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlServerSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlServerSecurityAlertPolicyResource : IJsonModel { + private static MySqlServerSecurityAlertPolicyData s_dataDeserializationInstance; + private static MySqlServerSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlServerSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs index 694f88674093..5ef508256e9a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlVirtualNetworkRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlVirtualNetworkRuleResource : IJsonModel { + private static MySqlVirtualNetworkRuleData s_dataDeserializationInstance; + private static MySqlVirtualNetworkRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlVirtualNetworkRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs index 479767b7cdb7..a7dc83724b5b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySql/Generated/MySqlWaitStatisticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql { public partial class MySqlWaitStatisticResource : IJsonModel { + private static MySqlWaitStatisticData s_dataDeserializationInstance; + private static MySqlWaitStatisticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlWaitStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlWaitStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlWaitStatisticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs index 38e94ca82dac..0d212011e691 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/AdvancedThreatProtectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class AdvancedThreatProtectionResource : IJsonModel { + private static AdvancedThreatProtectionData s_dataDeserializationInstance; + private static AdvancedThreatProtectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); AdvancedThreatProtectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs index 019cb618b418..8d759ed69df2 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerAadAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerAadAdministratorResource : IJsonModel { + private static MySqlFlexibleServerAadAdministratorData s_dataDeserializationInstance; + private static MySqlFlexibleServerAadAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerAadAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerAadAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerAadAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs index 814d34c8b518..de212f0c735a 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerBackupResource : IJsonModel { + private static MySqlFlexibleServerBackupData s_dataDeserializationInstance; + private static MySqlFlexibleServerBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs index 6cafb1ee868c..61dcfaee9557 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerBackupV2Resource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerBackupV2Resource : IJsonModel { + private static MySqlFlexibleServerBackupV2Data s_dataDeserializationInstance; + private static MySqlFlexibleServerBackupV2Data DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerBackupV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerBackupV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerBackupV2Data IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs index 23f416d360ac..a0677223a035 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerConfigurationResource : IJsonModel { + private static MySqlFlexibleServerConfigurationData s_dataDeserializationInstance; + private static MySqlFlexibleServerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs index 985441f465d2..0ae3d9cc39ce 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerDatabaseResource : IJsonModel { + private static MySqlFlexibleServerDatabaseData s_dataDeserializationInstance; + private static MySqlFlexibleServerDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs index f93f85fa9335..0d1acf21e41b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerFirewallRuleResource : IJsonModel { + private static MySqlFlexibleServerFirewallRuleData s_dataDeserializationInstance; + private static MySqlFlexibleServerFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs index 0eeeb3d5ab68..a43bcb90f4cd 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerMaintenanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerMaintenanceResource : IJsonModel { + private static MySqlFlexibleServerMaintenanceData s_dataDeserializationInstance; + private static MySqlFlexibleServerMaintenanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerMaintenanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerMaintenanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerMaintenanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs index f0858fbd7134..7b891d30f03b 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServerResource : IJsonModel { + private static MySqlFlexibleServerData s_dataDeserializationInstance; + private static MySqlFlexibleServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs index 5980486ac9ca..5bba238bf806 100644 --- a/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs +++ b/sdk/mysql/Azure.ResourceManager.MySql/src/MySqlFlexibleServers/Generated/MySqlFlexibleServersCapabilityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.MySql.FlexibleServers { public partial class MySqlFlexibleServersCapabilityResource : IJsonModel { + private static MySqlFlexibleServersCapabilityData s_dataDeserializationInstance; + private static MySqlFlexibleServersCapabilityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MySqlFlexibleServersCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MySqlFlexibleServersCapabilityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerMySqlContext.Default); MySqlFlexibleServersCapabilityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerMySqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/CHANGELOG.md b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/CHANGELOG.md index a6505cce78df..b5cef9dc5257 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/CHANGELOG.md +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.1.0-beta.1 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.0.0 (2025-05-22) + +### Features Added + +Stable release of api-version tag '2025-03-01'. + ## 1.0.0-beta.2 (2025-05-05) ### Features Added diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/README.md b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/README.md index adb7d4439a9b..bbde7e46b1da 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/README.md +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/README.md @@ -1,6 +1,6 @@ -# Microsoft Azure liftrneon management client library for .NET +# Microsoft Azure Neon Postgres management client library for .NET -**[Describe the service briefly first.]** +Neon is a cloud-native Postgres solution designed for modern applications. It offers a serverless, fully managed, and scalable Postgres database. Neon's advanced features include autoscaling, scale-to-zero, database branching, instant point-in-time restore, and time travel queries. Neon simplifies database management with seamless integration into your existing workflows, providing a powerful, cost-efficient solution for developers and businesses.  This library follows the [new Azure SDK guidelines](https://azure.github.io/azure-sdk/general_introduction.html), and provides many core capabilities: @@ -14,10 +14,10 @@ This library follows the [new Azure SDK guidelines](https://azure.github.io/azur ### Install the package -Install the Microsoft Azure liftrneon management library for .NET with [NuGet](https://www.nuget.org/): +Install the Microsoft Azure Neon Postgres management library for .NET with [NuGet](https://www.nuget.org/): ```dotnetcli -dotnet add package Azure.ResourceManager.NeonPostgres --prerelease +dotnet add package Azure.ResourceManager.NeonPostgres ``` ### Prerequisites diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Azure.ResourceManager.NeonPostgres.csproj b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Azure.ResourceManager.NeonPostgres.csproj index 27dc503d8f85..b4a16b0ae349 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Azure.ResourceManager.NeonPostgres.csproj +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Azure.ResourceManager.NeonPostgres.csproj @@ -1,6 +1,8 @@ - 1.0.0-beta.3 + 1.1.0-beta.1 + + 1.0.0 Azure.ResourceManager.NeonPostgres Azure Resource Manager client SDK for Azure resource provider liftrneon. azure;management;arm;resource manager;liftrneon diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonBranchResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonBranchResource.Serialization.cs index d431178f80a9..aa70abddd312 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonBranchResource.Serialization.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonBranchResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NeonPostgres { public partial class NeonBranchResource : IJsonModel { + private static NeonBranchData s_dataDeserializationInstance; + private static NeonBranchData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NeonBranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NeonBranchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNeonPostgresContext.Default); NeonBranchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNeonPostgresContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.Serialization.cs index 53995e3fd55f..8579a74c7c84 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.Serialization.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NeonPostgres { public partial class NeonOrganizationResource : IJsonModel { + private static NeonOrganizationData s_dataDeserializationInstance; + private static NeonOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NeonOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NeonOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNeonPostgresContext.Default); NeonOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNeonPostgresContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonProjectResource.Serialization.cs b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonProjectResource.Serialization.cs index 5a595d890df2..0ed31dc125de 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonProjectResource.Serialization.cs +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/src/Generated/NeonProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NeonPostgres { public partial class NeonProjectResource : IJsonModel { + private static NeonProjectData s_dataDeserializationInstance; + private static NeonProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NeonProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NeonProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNeonPostgresContext.Default); NeonProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNeonPostgresContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml index ff8ff4db21ed..f1e7c98b39f9 100644 --- a/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml +++ b/sdk/neonpostgres/Azure.ResourceManager.NeonPostgres/tsp-location.yaml @@ -1,3 +1,3 @@ directory: specification/liftrneon/Neon.Postgres.Management -commit: ccfd0797af2cc1dee2decfaae46add2f76e108d8 +commit: b15e6baad78142745642047f29e7391ea37ab155 repo: Azure/azure-rest-api-specs diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.Serialization.cs index 59b62c771662..7cfdc1e5a646 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/CapacityPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class CapacityPoolResource : IJsonModel { + private static CapacityPoolData s_dataDeserializationInstance; + private static CapacityPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CapacityPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CapacityPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); CapacityPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.Serialization.cs index c4756e341ed9..ffe67b233be1 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppAccountResource : IJsonModel { + private static NetAppAccountData s_dataDeserializationInstance; + private static NetAppAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.Serialization.cs index 25820525986d..821ee05367af 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppBackupPolicyResource : IJsonModel { + private static NetAppBackupPolicyData s_dataDeserializationInstance; + private static NetAppBackupPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.Serialization.cs index 7b8201b569b2..28bd705187ec 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppBackupVaultBackupResource : IJsonModel { + private static NetAppBackupData s_dataDeserializationInstance; + private static NetAppBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.Serialization.cs index 592efd90cc55..b51f3687905e 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppBackupVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppBackupVaultResource : IJsonModel { + private static NetAppBackupVaultData s_dataDeserializationInstance; + private static NetAppBackupVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppBackupVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppBackupVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.Serialization.cs index 14e6971f870e..180356e23b8f 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppSubvolumeInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppSubvolumeInfoResource : IJsonModel { + private static NetAppSubvolumeInfoData s_dataDeserializationInstance; + private static NetAppSubvolumeInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppSubvolumeInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppSubvolumeInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppSubvolumeInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.Serialization.cs index 9f0f209fd6a3..fb17dd7cb5bb 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppVolumeGroupResource : IJsonModel { + private static NetAppVolumeGroupData s_dataDeserializationInstance; + private static NetAppVolumeGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppVolumeGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppVolumeGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppVolumeGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.Serialization.cs index 40ac3874f149..38244a3691f0 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeQuotaRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppVolumeQuotaRuleResource : IJsonModel { + private static NetAppVolumeQuotaRuleData s_dataDeserializationInstance; + private static NetAppVolumeQuotaRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppVolumeQuotaRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppVolumeQuotaRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppVolumeQuotaRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.Serialization.cs index 40d5b1b2c646..8a381b044996 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppVolumeResource : IJsonModel { + private static NetAppVolumeData s_dataDeserializationInstance; + private static NetAppVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.Serialization.cs index 824c5c61dcae..9873b40a3bd3 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/NetAppVolumeSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class NetAppVolumeSnapshotResource : IJsonModel { + private static NetAppVolumeSnapshotData s_dataDeserializationInstance; + private static NetAppVolumeSnapshotData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetAppVolumeSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetAppVolumeSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); NetAppVolumeSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.Serialization.cs index c7aa40b95a4d..8c50b20edade 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/RegionInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class RegionInfoResource : IJsonModel { + private static RegionInfoResourceData s_dataDeserializationInstance; + private static RegionInfoResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RegionInfoResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RegionInfoResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); RegionInfoResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.Serialization.cs b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.Serialization.cs index 1cfb7de5737d..5ef3ed922783 100644 --- a/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.Serialization.cs +++ b/sdk/netapp/Azure.ResourceManager.NetApp/src/Generated/SnapshotPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetApp { public partial class SnapshotPolicyResource : IJsonModel { + private static SnapshotPolicyData s_dataDeserializationInstance; + private static SnapshotPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SnapshotPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SnapshotPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetAppContext.Default); SnapshotPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetAppContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.Serialization.cs index 4706f7f6c5da..0319de8b1faf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AdminRuleGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class AdminRuleGroupResource : IJsonModel { + private static AdminRuleGroupData s_dataDeserializationInstance; + private static AdminRuleGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AdminRuleGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AdminRuleGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); AdminRuleGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.Serialization.cs index 249d98cdfae2..6f7702304163 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ApplicationGatewayPrivateEndpointConnectionResource : IJsonModel { + private static ApplicationGatewayPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ApplicationGatewayPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationGatewayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationGatewayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ApplicationGatewayPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.Serialization.cs index d0c08ea5a5c9..dd8a1ade9b7b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ApplicationGatewayResource : IJsonModel { + private static ApplicationGatewayData s_dataDeserializationInstance; + private static ApplicationGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ApplicationGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.Serialization.cs index c26999cd2ce5..2d7987613156 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationGatewayWafDynamicManifestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ApplicationGatewayWafDynamicManifestResource : IJsonModel { + private static ApplicationGatewayWafDynamicManifestData s_dataDeserializationInstance; + private static ApplicationGatewayWafDynamicManifestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationGatewayWafDynamicManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationGatewayWafDynamicManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ApplicationGatewayWafDynamicManifestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.Serialization.cs index b3388aa96236..76bb5d56c21b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ApplicationSecurityGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ApplicationSecurityGroupResource : IJsonModel { + private static ApplicationSecurityGroupData s_dataDeserializationInstance; + private static ApplicationSecurityGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ApplicationSecurityGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.Serialization.cs index cf48d652474e..d6c5b8162749 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureFirewallResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class AzureFirewallResource : IJsonModel { + private static AzureFirewallData s_dataDeserializationInstance; + private static AzureFirewallData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); AzureFirewallData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.Serialization.cs index b09756d6df5e..bb79d28e1731 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/AzureWebCategoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class AzureWebCategoryResource : IJsonModel { + private static AzureWebCategoryData s_dataDeserializationInstance; + private static AzureWebCategoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureWebCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureWebCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); AzureWebCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.Serialization.cs index dc924c45e25e..7b826ffdc5f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BackendAddressPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class BackendAddressPoolResource : IJsonModel { + private static BackendAddressPoolData s_dataDeserializationInstance; + private static BackendAddressPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackendAddressPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackendAddressPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); BackendAddressPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.Serialization.cs index 0930a6f90076..6805fa482db6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BaseAdminRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class BaseAdminRuleResource : IJsonModel { + private static BaseAdminRuleData s_dataDeserializationInstance; + private static BaseAdminRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BaseAdminRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); BaseAdminRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.Serialization.cs index 93c4b07df584..c1ad47d4c1b3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BastionHostResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class BastionHostResource : IJsonModel { + private static BastionHostData s_dataDeserializationInstance; + private static BastionHostData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BastionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BastionHostData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); BastionHostData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.Serialization.cs index 31b35d6eb88f..f041f00c9587 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/BgpConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class BgpConnectionResource : IJsonModel { + private static BgpConnectionData s_dataDeserializationInstance; + private static BgpConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BgpConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BgpConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); BgpConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.Serialization.cs index b763d1245bd1..59683373dbec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CloudServiceSwapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class CloudServiceSwapResource : IJsonModel { + private static CloudServiceSwapData s_dataDeserializationInstance; + private static CloudServiceSwapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudServiceSwapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudServiceSwapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); CloudServiceSwapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.Serialization.cs index 937076894b6a..7172df46ce3d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectionMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ConnectionMonitorResource : IJsonModel { + private static ConnectionMonitorData s_dataDeserializationInstance; + private static ConnectionMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectionMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectionMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ConnectionMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.Serialization.cs index 41f2600f5f18..e681b54eb9ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ConnectivityConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ConnectivityConfigurationResource : IJsonModel { + private static ConnectivityConfigurationData s_dataDeserializationInstance; + private static ConnectivityConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectivityConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectivityConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ConnectivityConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.Serialization.cs index f7c75e1c7e0a..938ab141152b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/CustomIPPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class CustomIPPrefixResource : IJsonModel { + private static CustomIPPrefixData s_dataDeserializationInstance; + private static CustomIPPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); CustomIPPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.Serialization.cs index 4bb60a2c00ee..7c863ad8215d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosCustomPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class DdosCustomPolicyResource : IJsonModel { + private static DdosCustomPolicyData s_dataDeserializationInstance; + private static DdosCustomPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DdosCustomPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DdosCustomPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); DdosCustomPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.Serialization.cs index 906232b35b4f..036fed29a085 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DdosProtectionPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class DdosProtectionPlanResource : IJsonModel { + private static DdosProtectionPlanData s_dataDeserializationInstance; + private static DdosProtectionPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DdosProtectionPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DdosProtectionPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); DdosProtectionPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.Serialization.cs index 0371ebac2e6d..2440260e26b5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DefaultSecurityRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class DefaultSecurityRuleResource : IJsonModel { + private static SecurityRuleData s_dataDeserializationInstance; + private static SecurityRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); SecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.Serialization.cs index 04f7f49f2c59..5138628fa647 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/DscpConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class DscpConfigurationResource : IJsonModel { + private static DscpConfigurationData s_dataDeserializationInstance; + private static DscpConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DscpConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DscpConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); DscpConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.Serialization.cs index c1a8a94ae360..4886547b2db5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitAuthorizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCircuitAuthorizationResource : IJsonModel { + private static ExpressRouteCircuitAuthorizationData s_dataDeserializationInstance; + private static ExpressRouteCircuitAuthorizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCircuitAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCircuitAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCircuitAuthorizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.Serialization.cs index 2797873fed38..02f09d18a3df 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCircuitConnectionResource : IJsonModel { + private static ExpressRouteCircuitConnectionData s_dataDeserializationInstance; + private static ExpressRouteCircuitConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCircuitConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.Serialization.cs index 2e2a30b63f96..336b53d78173 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitPeeringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCircuitPeeringResource : IJsonModel { + private static ExpressRouteCircuitPeeringData s_dataDeserializationInstance; + private static ExpressRouteCircuitPeeringData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCircuitPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCircuitPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCircuitPeeringData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.Serialization.cs index ff9c20f0253e..bd497cd0d101 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCircuitResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCircuitResource : IJsonModel { + private static ExpressRouteCircuitData s_dataDeserializationInstance; + private static ExpressRouteCircuitData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCircuitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCircuitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCircuitData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.Serialization.cs index 899b79462f93..f7b8fbd27177 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteConnectionResource : IJsonModel { + private static ExpressRouteConnectionData s_dataDeserializationInstance; + private static ExpressRouteConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.Serialization.cs index 195327c19eb3..5397df5eba3f 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionPeeringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCrossConnectionPeeringResource : IJsonModel { + private static ExpressRouteCrossConnectionPeeringData s_dataDeserializationInstance; + private static ExpressRouteCrossConnectionPeeringData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCrossConnectionPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCrossConnectionPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCrossConnectionPeeringData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.Serialization.cs index 158b22117db7..fef2ab9dfae0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteCrossConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteCrossConnectionResource : IJsonModel { + private static ExpressRouteCrossConnectionData s_dataDeserializationInstance; + private static ExpressRouteCrossConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteCrossConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteCrossConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteCrossConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.Serialization.cs index 40eb47fae72e..c4fb62ba6a9c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteGatewayResource : IJsonModel { + private static ExpressRouteGatewayData s_dataDeserializationInstance; + private static ExpressRouteGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.Serialization.cs index 68e2e33dff2b..990d5e7bb53c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteLinkResource : IJsonModel { + private static ExpressRouteLinkData s_dataDeserializationInstance; + private static ExpressRouteLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.Serialization.cs index af616ffd073a..8bbbba02acb7 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortAuthorizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRoutePortAuthorizationResource : IJsonModel { + private static ExpressRoutePortAuthorizationData s_dataDeserializationInstance; + private static ExpressRoutePortAuthorizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRoutePortAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRoutePortAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRoutePortAuthorizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.Serialization.cs index 5f30f6561d7b..9b63d3ef1eb1 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRoutePortResource : IJsonModel { + private static ExpressRoutePortData s_dataDeserializationInstance; + private static ExpressRoutePortData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRoutePortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRoutePortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRoutePortData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.Serialization.cs index 93066b998e1d..878a6cb2ab96 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRoutePortsLocationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRoutePortsLocationResource : IJsonModel { + private static ExpressRoutePortsLocationData s_dataDeserializationInstance; + private static ExpressRoutePortsLocationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRoutePortsLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRoutePortsLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRoutePortsLocationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.Serialization.cs index e7b2f6832028..4cae5225eb6b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ExpressRouteProviderPortResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ExpressRouteProviderPortResource : IJsonModel { + private static ExpressRouteProviderPortData s_dataDeserializationInstance; + private static ExpressRouteProviderPortData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExpressRouteProviderPortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExpressRouteProviderPortData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ExpressRouteProviderPortData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.Serialization.cs index df7480f7f90e..999dd99e2871 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyDraftResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FirewallPolicyDraftResource : IJsonModel { + private static FirewallPolicyDraftData s_dataDeserializationInstance; + private static FirewallPolicyDraftData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirewallPolicyDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirewallPolicyDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FirewallPolicyDraftData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.Serialization.cs index 8699884b70d8..790080f565ba 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FirewallPolicyResource : IJsonModel { + private static FirewallPolicyData s_dataDeserializationInstance; + private static FirewallPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FirewallPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.Serialization.cs index 838977a1c5fa..5a78f31233fb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupDraftResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FirewallPolicyRuleCollectionGroupDraftResource : IJsonModel { + private static FirewallPolicyRuleCollectionGroupDraftData s_dataDeserializationInstance; + private static FirewallPolicyRuleCollectionGroupDraftData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirewallPolicyRuleCollectionGroupDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirewallPolicyRuleCollectionGroupDraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FirewallPolicyRuleCollectionGroupDraftData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.Serialization.cs index 715c22f82e7b..1cc3f28c8561 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FirewallPolicyRuleCollectionGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FirewallPolicyRuleCollectionGroupResource : IJsonModel { + private static FirewallPolicyRuleCollectionGroupData s_dataDeserializationInstance; + private static FirewallPolicyRuleCollectionGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FirewallPolicyRuleCollectionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FirewallPolicyRuleCollectionGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FirewallPolicyRuleCollectionGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.Serialization.cs index 1cd13800430c..5dcc9032dda9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FlowLogResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FlowLogResource : IJsonModel { + private static FlowLogData s_dataDeserializationInstance; + private static FlowLogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FlowLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FlowLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FlowLogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.Serialization.cs index 44b9241d139e..02d43e694cd3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/FrontendIPConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class FrontendIPConfigurationResource : IJsonModel { + private static FrontendIPConfigurationData s_dataDeserializationInstance; + private static FrontendIPConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FrontendIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FrontendIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); FrontendIPConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.Serialization.cs index 07297b096269..8fc0bc81d6cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubIPConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class HubIPConfigurationResource : IJsonModel { + private static HubIPConfigurationData s_dataDeserializationInstance; + private static HubIPConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HubIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HubIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); HubIPConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.Serialization.cs index aaa2e9760d6b..889d1d2d15c6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubRouteTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class HubRouteTableResource : IJsonModel { + private static HubRouteTableData s_dataDeserializationInstance; + private static HubRouteTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HubRouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HubRouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); HubRouteTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.Serialization.cs index 39d80d75b0c5..ff88c38a604a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/HubVirtualNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class HubVirtualNetworkConnectionResource : IJsonModel { + private static HubVirtualNetworkConnectionData s_dataDeserializationInstance; + private static HubVirtualNetworkConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HubVirtualNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HubVirtualNetworkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); HubVirtualNetworkConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.Serialization.cs index 8b8f1fdec4f9..d30f19855f2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPAllocationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class IPAllocationResource : IJsonModel { + private static IPAllocationData s_dataDeserializationInstance; + private static IPAllocationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IPAllocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IPAllocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); IPAllocationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.Serialization.cs index c5eb260efc4b..87ab7ab1e065 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IPGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class IPGroupResource : IJsonModel { + private static IPGroupData s_dataDeserializationInstance; + private static IPGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IPGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IPGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); IPGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.Serialization.cs index 9c205c3f7079..f5c4b3358312 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundNatRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class InboundNatRuleResource : IJsonModel { + private static InboundNatRuleData s_dataDeserializationInstance; + private static InboundNatRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InboundNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InboundNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); InboundNatRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs index cbec3cc7f088..9546b31e1508 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/InboundSecurityRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class InboundSecurityRuleResource : IJsonModel { + private static InboundSecurityRuleData s_dataDeserializationInstance; + private static InboundSecurityRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InboundSecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); InboundSecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.Serialization.cs index a16ee3e1a140..9ebf7e737f23 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/IpamPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class IpamPoolResource : IJsonModel { + private static IpamPoolData s_dataDeserializationInstance; + private static IpamPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IpamPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IpamPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); IpamPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.Serialization.cs index 89d9a010376d..b33126181fad 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class LoadBalancerResource : IJsonModel { + private static LoadBalancerData s_dataDeserializationInstance; + private static LoadBalancerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); LoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.Serialization.cs index 7668f6195f63..6c9e744b1992 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LoadBalancingRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class LoadBalancingRuleResource : IJsonModel { + private static LoadBalancingRuleData s_dataDeserializationInstance; + private static LoadBalancingRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LoadBalancingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LoadBalancingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); LoadBalancingRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.Serialization.cs index 01ce64c51fbb..dfe673e692d0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/LocalNetworkGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class LocalNetworkGatewayResource : IJsonModel { + private static LocalNetworkGatewayData s_dataDeserializationInstance; + private static LocalNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); LocalNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.Serialization.cs index af394d0b6fe4..93983d846758 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ManagementGroupNetworkManagerConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ManagementGroupNetworkManagerConnectionResource : IJsonModel { + private static NetworkManagerConnectionData s_dataDeserializationInstance; + private static NetworkManagerConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.Serialization.cs index 32faa9c6e4ae..40dd330df446 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NatGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NatGatewayResource : IJsonModel { + private static NatGatewayData s_dataDeserializationInstance; + private static NatGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NatGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NatGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NatGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.Serialization.cs index 33f5705330bb..680454640a01 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkGroupResource : IJsonModel { + private static NetworkGroupData s_dataDeserializationInstance; + private static NetworkGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.Serialization.cs index 6ff80d879148..6bec72a2e870 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkGroupStaticMemberResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkGroupStaticMemberResource : IJsonModel { + private static NetworkGroupStaticMemberData s_dataDeserializationInstance; + private static NetworkGroupStaticMemberData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkGroupStaticMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkGroupStaticMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkGroupStaticMemberData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.Serialization.cs index b92468fe6c1f..fbb6a44b3d7c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceIPConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkInterfaceIPConfigurationResource : IJsonModel { + private static NetworkInterfaceIPConfigurationData s_dataDeserializationInstance; + private static NetworkInterfaceIPConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkInterfaceIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkInterfaceIPConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkInterfaceIPConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.Serialization.cs index 7351a21920b9..e7f81b930dc8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkInterfaceResource : IJsonModel { + private static NetworkInterfaceData s_dataDeserializationInstance; + private static NetworkInterfaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkInterfaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkInterfaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.Serialization.cs index da34ca907cf8..79f8eb4b362d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkInterfaceTapConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkInterfaceTapConfigurationResource : IJsonModel { + private static NetworkInterfaceTapConfigurationData s_dataDeserializationInstance; + private static NetworkInterfaceTapConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkInterfaceTapConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkInterfaceTapConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkInterfaceTapConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.Serialization.cs index 731b931d934c..15e56780504e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerResource : IJsonModel { + private static NetworkManagerData s_dataDeserializationInstance; + private static NetworkManagerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.Serialization.cs index 384ab9ba72b8..3b0860a471e6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerRoutingConfigurationResource : IJsonModel { + private static NetworkManagerRoutingConfigurationData s_dataDeserializationInstance; + private static NetworkManagerRoutingConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerRoutingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerRoutingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerRoutingConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.Serialization.cs index 2ff04516ac30..b5d58fcaea0b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerRoutingRuleResource : IJsonModel { + private static NetworkManagerRoutingRuleData s_dataDeserializationInstance; + private static NetworkManagerRoutingRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerRoutingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerRoutingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerRoutingRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.Serialization.cs index 638aae9f1749..81be6bcdef42 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerRoutingRulesResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerRoutingRulesResource : IJsonModel { + private static NetworkManagerRoutingRulesData s_dataDeserializationInstance; + private static NetworkManagerRoutingRulesData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerRoutingRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerRoutingRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerRoutingRulesData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.Serialization.cs index 62d9ece9ef9b..95c21d6fc5fd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerSecurityUserConfigurationResource : IJsonModel { + private static NetworkManagerSecurityUserConfigurationData s_dataDeserializationInstance; + private static NetworkManagerSecurityUserConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerSecurityUserConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerSecurityUserConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerSecurityUserConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.Serialization.cs index 939fe2eddc2b..29e7caa256b9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerSecurityUserRuleResource : IJsonModel { + private static NetworkManagerSecurityUserRuleData s_dataDeserializationInstance; + private static NetworkManagerSecurityUserRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerSecurityUserRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerSecurityUserRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerSecurityUserRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.Serialization.cs index bd30adc96863..495f1147dfe3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkManagerSecurityUserRulesResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkManagerSecurityUserRulesResource : IJsonModel { + private static NetworkManagerSecurityUserRulesData s_dataDeserializationInstance; + private static NetworkManagerSecurityUserRulesData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerSecurityUserRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerSecurityUserRulesData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerSecurityUserRulesData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.Serialization.cs index 72a9ef4c6718..1dbf5343178c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkPrivateEndpointConnectionResource : IJsonModel { + private static NetworkPrivateEndpointConnectionData s_dataDeserializationInstance; + private static NetworkPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.Serialization.cs index 5b4c3bb582c1..d8aa65d59c66 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkProfileResource : IJsonModel { + private static NetworkProfileData s_dataDeserializationInstance; + private static NetworkProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.Serialization.cs index eff0da5525bd..e5001cc30410 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityGroupResource : IJsonModel { + private static NetworkSecurityGroupData s_dataDeserializationInstance; + private static NetworkSecurityGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.Serialization.cs index 443c33760a5f..4035b1eb1c1a 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAccessRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterAccessRuleResource : IJsonModel { + private static NetworkSecurityPerimeterAccessRuleData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterAccessRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterAccessRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterAccessRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterAccessRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.Serialization.cs index 647b3e3c53c6..ab93d7a8d966 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterAssociationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterAssociationResource : IJsonModel { + private static NetworkSecurityPerimeterAssociationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterAssociationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.Serialization.cs index 211230282d3e..4a3ff79d7085 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkReferenceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterLinkReferenceResource : IJsonModel { + private static NetworkSecurityPerimeterLinkReferenceData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterLinkReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterLinkReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterLinkReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterLinkReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.Serialization.cs index 3b5e3b7dee66..dd1586c455f4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterLinkResource : IJsonModel { + private static NetworkSecurityPerimeterLinkData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.Serialization.cs index 3cfca9bd6f6e..ca93014a8485 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterLoggingConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterLoggingConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterLoggingConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterLoggingConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterLoggingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterLoggingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterLoggingConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.Serialization.cs index e16a63614d9f..332b7a8f24ac 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterProfileResource : IJsonModel { + private static NetworkSecurityPerimeterProfileData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.Serialization.cs index 98ec0512af4e..d1838499da32 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkSecurityPerimeterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkSecurityPerimeterResource : IJsonModel { + private static NetworkSecurityPerimeterData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkSecurityPerimeterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.Serialization.cs index 175582e5331a..2acaca376166 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVerifierWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkVerifierWorkspaceResource : IJsonModel { + private static NetworkVerifierWorkspaceData s_dataDeserializationInstance; + private static NetworkVerifierWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkVerifierWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkVerifierWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkVerifierWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.Serialization.cs index c8081fb1c49e..e59e3acc0d67 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkVirtualApplianceConnectionResource : IJsonModel { + private static NetworkVirtualApplianceConnectionData s_dataDeserializationInstance; + private static NetworkVirtualApplianceConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkVirtualApplianceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkVirtualApplianceConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkVirtualApplianceConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.Serialization.cs index 9aeaa4bf7922..3da680d6eccc 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkVirtualApplianceResource : IJsonModel { + private static NetworkVirtualApplianceData s_dataDeserializationInstance; + private static NetworkVirtualApplianceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkVirtualApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkVirtualApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkVirtualApplianceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.Serialization.cs index 5c51fd2def7f..99925124f9e8 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkVirtualApplianceSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkVirtualApplianceSkuResource : IJsonModel { + private static NetworkVirtualApplianceSkuData s_dataDeserializationInstance; + private static NetworkVirtualApplianceSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkVirtualApplianceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkVirtualApplianceSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkVirtualApplianceSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.Serialization.cs index 68c321455d77..97ac0d864448 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/NetworkWatcherResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class NetworkWatcherResource : IJsonModel { + private static NetworkWatcherData s_dataDeserializationInstance; + private static NetworkWatcherData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkWatcherData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkWatcherData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.Serialization.cs index 8e5a7007c0e0..67bf8d539791 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/OutboundRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class OutboundRuleResource : IJsonModel { + private static OutboundRuleData s_dataDeserializationInstance; + private static OutboundRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OutboundRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OutboundRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); OutboundRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.Serialization.cs index 656fbdeaa3f2..650711347f97 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/P2SVpnGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class P2SVpnGatewayResource : IJsonModel { + private static P2SVpnGatewayData s_dataDeserializationInstance; + private static P2SVpnGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - P2SVpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + P2SVpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); P2SVpnGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.Serialization.cs index 3d0adee29c19..06bd687ce1cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PacketCaptureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PacketCaptureResource : IJsonModel { + private static PacketCaptureData s_dataDeserializationInstance; + private static PacketCaptureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PacketCaptureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PacketCaptureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.Serialization.cs index 7e91aa52c19f..ee561b9108c5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PeerExpressRouteCircuitConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PeerExpressRouteCircuitConnectionResource : IJsonModel { + private static PeerExpressRouteCircuitConnectionData s_dataDeserializationInstance; + private static PeerExpressRouteCircuitConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeerExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeerExpressRouteCircuitConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PeerExpressRouteCircuitConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.Serialization.cs index 31431f9c0faa..573ab6b476a6 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PolicySignaturesOverridesForIdpsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PolicySignaturesOverridesForIdpsResource : IJsonModel { + private static PolicySignaturesOverridesForIdpsData s_dataDeserializationInstance; + private static PolicySignaturesOverridesForIdpsData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicySignaturesOverridesForIdpsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicySignaturesOverridesForIdpsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PolicySignaturesOverridesForIdpsData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.Serialization.cs index b55b1fb8e446..bdc355ac9ac2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateDnsZoneGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PrivateDnsZoneGroupResource : IJsonModel { + private static PrivateDnsZoneGroupData s_dataDeserializationInstance; + private static PrivateDnsZoneGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateDnsZoneGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateDnsZoneGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PrivateDnsZoneGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.Serialization.cs index 56e30c252873..ef42dae987cf 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PrivateEndpointResource : IJsonModel { + private static PrivateEndpointData s_dataDeserializationInstance; + private static PrivateEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PrivateEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.Serialization.cs index 422a9d9732d4..5f691c132157 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PrivateLinkServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PrivateLinkServiceResource : IJsonModel { + private static PrivateLinkServiceData s_dataDeserializationInstance; + private static PrivateLinkServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateLinkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateLinkServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PrivateLinkServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.Serialization.cs index 15a1230de619..f42ad9316132 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ProbeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ProbeResource : IJsonModel { + private static ProbeData s_dataDeserializationInstance; + private static ProbeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProbeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProbeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ProbeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.Serialization.cs index 8ef6ec301eb0..9d346054c2d4 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPAddressResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PublicIPAddressResource : IJsonModel { + private static PublicIPAddressData s_dataDeserializationInstance; + private static PublicIPAddressData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicIPAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicIPAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PublicIPAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.Serialization.cs index 4bde8dac6f6a..8f4864f38e63 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/PublicIPPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class PublicIPPrefixResource : IJsonModel { + private static PublicIPPrefixData s_dataDeserializationInstance; + private static PublicIPPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicIPPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); PublicIPPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.Serialization.cs index 8a4ae000b6e8..2445e6346a68 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisIntentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ReachabilityAnalysisIntentResource : IJsonModel { + private static ReachabilityAnalysisIntentData s_dataDeserializationInstance; + private static ReachabilityAnalysisIntentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReachabilityAnalysisIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReachabilityAnalysisIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ReachabilityAnalysisIntentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.Serialization.cs index 9695f0cace04..250bea8065d3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ReachabilityAnalysisRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ReachabilityAnalysisRunResource : IJsonModel { + private static ReachabilityAnalysisRunData s_dataDeserializationInstance; + private static ReachabilityAnalysisRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReachabilityAnalysisRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReachabilityAnalysisRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ReachabilityAnalysisRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.Serialization.cs index 5c8e7c5588c7..99b0eaaa09ea 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RouteFilterResource : IJsonModel { + private static RouteFilterData s_dataDeserializationInstance; + private static RouteFilterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RouteFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RouteFilterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RouteFilterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.Serialization.cs index 12d9a76c7366..de45bc77d14b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteFilterRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RouteFilterRuleResource : IJsonModel { + private static RouteFilterRuleData s_dataDeserializationInstance; + private static RouteFilterRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RouteFilterRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RouteFilterRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RouteFilterRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.Serialization.cs index cae25dccfa78..9e24fc25dd93 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteMapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RouteMapResource : IJsonModel { + private static RouteMapData s_dataDeserializationInstance; + private static RouteMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RouteMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RouteMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RouteMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.Serialization.cs index 875928ab2ea8..807742a8e975 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RouteResource : IJsonModel { + private static RouteData s_dataDeserializationInstance; + private static RouteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RouteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RouteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.Serialization.cs index 3c4591c527a9..add497c85042 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RouteTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RouteTableResource : IJsonModel { + private static RouteTableData s_dataDeserializationInstance; + private static RouteTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RouteTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RouteTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.Serialization.cs index 5622426ab3a8..80d89abe46ec 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/RoutingIntentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class RoutingIntentResource : IJsonModel { + private static RoutingIntentData s_dataDeserializationInstance; + private static RoutingIntentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RoutingIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RoutingIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); RoutingIntentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.Serialization.cs index 07330ff09e77..77983c3f1349 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ScopeConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ScopeConnectionResource : IJsonModel { + private static ScopeConnectionData s_dataDeserializationInstance; + private static ScopeConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScopeConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScopeConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ScopeConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.Serialization.cs index 308bae8c205b..f3bf3a53b73b 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityAdminConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class SecurityAdminConfigurationResource : IJsonModel { + private static SecurityAdminConfigurationData s_dataDeserializationInstance; + private static SecurityAdminConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAdminConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAdminConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); SecurityAdminConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.Serialization.cs index 0450c79e8539..93c0cfc71c5c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityPartnerProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class SecurityPartnerProviderResource : IJsonModel { + private static SecurityPartnerProviderData s_dataDeserializationInstance; + private static SecurityPartnerProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityPartnerProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityPartnerProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); SecurityPartnerProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.Serialization.cs index 6d5daf0a7e31..2c11e4a7700c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SecurityRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class SecurityRuleResource : IJsonModel { + private static SecurityRuleData s_dataDeserializationInstance; + private static SecurityRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); SecurityRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.Serialization.cs index 0858a9334e76..4da7cb05bad3 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ServiceEndpointPolicyDefinitionResource : IJsonModel { + private static ServiceEndpointPolicyDefinitionData s_dataDeserializationInstance; + private static ServiceEndpointPolicyDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceEndpointPolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceEndpointPolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ServiceEndpointPolicyDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.Serialization.cs index d0a414d6da9d..bb2ff79a28a9 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/ServiceEndpointPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class ServiceEndpointPolicyResource : IJsonModel { + private static ServiceEndpointPolicyData s_dataDeserializationInstance; + private static ServiceEndpointPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceEndpointPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceEndpointPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); ServiceEndpointPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.Serialization.cs index 9a78991f92d0..8e280cc21c2e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/StaticCidrResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class StaticCidrResource : IJsonModel { + private static StaticCidrData s_dataDeserializationInstance; + private static StaticCidrData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticCidrData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticCidrData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); StaticCidrData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.Serialization.cs index 2058ac4f56df..ed5fcaaac16c 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubnetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class SubnetResource : IJsonModel { + private static SubnetData s_dataDeserializationInstance; + private static SubnetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubnetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubnetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); SubnetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.Serialization.cs index e3f3c3b13792..c4c5de83d96d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/SubscriptionNetworkManagerConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class SubscriptionNetworkManagerConnectionResource : IJsonModel { + private static NetworkManagerConnectionData s_dataDeserializationInstance; + private static NetworkManagerConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkManagerConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); NetworkManagerConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.Serialization.cs index 812a072d1048..34c2ea21cc61 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualApplianceSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualApplianceSiteResource : IJsonModel { + private static VirtualApplianceSiteData s_dataDeserializationInstance; + private static VirtualApplianceSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualApplianceSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualApplianceSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualApplianceSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.Serialization.cs index 3ef72e2c7ee9..62d7dbbf3eb5 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualHubResource : IJsonModel { + private static VirtualHubData s_dataDeserializationInstance; + private static VirtualHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.Serialization.cs index 96aced514bfb..123c686ed4aa 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualHubRouteTableV2Resource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualHubRouteTableV2Resource : IJsonModel { + private static VirtualHubRouteTableV2Data s_dataDeserializationInstance; + private static VirtualHubRouteTableV2Data DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualHubRouteTableV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualHubRouteTableV2Data IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualHubRouteTableV2Data IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.Serialization.cs index 00ae57acdd4a..6e71070aed4d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkGatewayConnectionResource : IJsonModel { + private static VirtualNetworkGatewayConnectionData s_dataDeserializationInstance; + private static VirtualNetworkGatewayConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkGatewayConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkGatewayConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkGatewayConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.Serialization.cs index 8be93ad358d2..712411bd9028 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayNatRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkGatewayNatRuleResource : IJsonModel { + private static VirtualNetworkGatewayNatRuleData s_dataDeserializationInstance; + private static VirtualNetworkGatewayNatRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkGatewayNatRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.Serialization.cs index f8b9387d356d..81d62d215c22 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkGatewayResource : IJsonModel { + private static VirtualNetworkGatewayData s_dataDeserializationInstance; + private static VirtualNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.Serialization.cs index b10de4789822..11fa824ae756 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkPeeringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkPeeringResource : IJsonModel { + private static VirtualNetworkPeeringData s_dataDeserializationInstance; + private static VirtualNetworkPeeringData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkPeeringData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.Serialization.cs index 7cf94a6e9644..2e4b41642088 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkResource : IJsonModel { + private static VirtualNetworkData s_dataDeserializationInstance; + private static VirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.Serialization.cs index 9d81a67cef87..777ca2c5a4ef 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualNetworkTapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualNetworkTapResource : IJsonModel { + private static VirtualNetworkTapData s_dataDeserializationInstance; + private static VirtualNetworkTapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkTapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualNetworkTapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.Serialization.cs index 43122efb34f6..06c6a3ec2f03 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterPeeringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualRouterPeeringResource : IJsonModel { + private static VirtualRouterPeeringData s_dataDeserializationInstance; + private static VirtualRouterPeeringData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualRouterPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualRouterPeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualRouterPeeringData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.Serialization.cs index 75ddc9ab8b65..b496506896a2 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualRouterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualRouterResource : IJsonModel { + private static VirtualRouterData s_dataDeserializationInstance; + private static VirtualRouterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualRouterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualRouterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualRouterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.Serialization.cs index 0cb3a2b1326a..a0ac50e65c81 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VirtualWanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VirtualWanResource : IJsonModel { + private static VirtualWanData s_dataDeserializationInstance; + private static VirtualWanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualWanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualWanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VirtualWanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.Serialization.cs index 9f4abc172d41..3f3033be4681 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnConnectionResource : IJsonModel { + private static VpnConnectionData s_dataDeserializationInstance; + private static VpnConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.Serialization.cs index 307c99324f20..f87d30d811ed 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayNatRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnGatewayNatRuleResource : IJsonModel { + private static VpnGatewayNatRuleData s_dataDeserializationInstance; + private static VpnGatewayNatRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnGatewayNatRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnGatewayNatRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.Serialization.cs index 7ecdae312c45..cb8609395a0e 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnGatewayResource : IJsonModel { + private static VpnGatewayData s_dataDeserializationInstance; + private static VpnGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.Serialization.cs index d5855777ca9e..990542c4a7cd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnLinkConnectionSharedKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnLinkConnectionSharedKeyResource : IJsonModel { + private static VpnLinkConnectionSharedKeyData s_dataDeserializationInstance; + private static VpnLinkConnectionSharedKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnLinkConnectionSharedKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnLinkConnectionSharedKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnLinkConnectionSharedKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.Serialization.cs index 0b706b2adc8a..4f82803383cb 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationPolicyGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnServerConfigurationPolicyGroupResource : IJsonModel { + private static VpnServerConfigurationPolicyGroupData s_dataDeserializationInstance; + private static VpnServerConfigurationPolicyGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnServerConfigurationPolicyGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnServerConfigurationPolicyGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnServerConfigurationPolicyGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.Serialization.cs index b76db29c61e4..eff14942ba46 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnServerConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnServerConfigurationResource : IJsonModel { + private static VpnServerConfigurationData s_dataDeserializationInstance; + private static VpnServerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnServerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.Serialization.cs index f1a8ae0cd76c..ba05a138432d 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnSiteLinkConnectionResource : IJsonModel { + private static VpnSiteLinkConnectionData s_dataDeserializationInstance; + private static VpnSiteLinkConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnSiteLinkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnSiteLinkConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnSiteLinkConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.Serialization.cs index dfbe7dbe5d6c..f690c3a21094 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnSiteLinkResource : IJsonModel { + private static VpnSiteLinkData s_dataDeserializationInstance; + private static VpnSiteLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnSiteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnSiteLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnSiteLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.Serialization.cs index eabc66a52410..cf2b67b33ebd 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/VpnSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class VpnSiteResource : IJsonModel { + private static VpnSiteData s_dataDeserializationInstance; + private static VpnSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VpnSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VpnSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); VpnSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.Serialization.cs b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.Serialization.cs index 64dc91b2ccf9..deb66aa08ac0 100644 --- a/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.Serialization.cs +++ b/sdk/network/Azure.ResourceManager.Network/src/Generated/WebApplicationFirewallPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Network { public partial class WebApplicationFirewallPolicyResource : IJsonModel { + private static WebApplicationFirewallPolicyData s_dataDeserializationInstance; + private static WebApplicationFirewallPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebApplicationFirewallPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkContext.Default); WebApplicationFirewallPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/network/Azure.ResourceManager.Network/tests/Tests/ConnectionMonitorTests.cs b/sdk/network/Azure.ResourceManager.Network/tests/Tests/ConnectionMonitorTests.cs index 562c80394371..d6acef811045 100644 --- a/sdk/network/Azure.ResourceManager.Network/tests/Tests/ConnectionMonitorTests.cs +++ b/sdk/network/Azure.ResourceManager.Network/tests/Tests/ConnectionMonitorTests.cs @@ -84,56 +84,6 @@ public async Task PutConnectionMonitorTest() Assert.AreEqual(80, putConnectionMonitor.Value.Data.Destination.Port); } - [Test] - [Ignore("Track2: ApiVersion does not meet the requirements")] - public async Task StartConnectionMonitorTest() - { - string resourceGroupName = Recording.GenerateAssetName("azsmnet"); - - string location = "westus2"; - var resourceGroup = await CreateResourceGroup(resourceGroupName, location); - - string virtualMachineName = Recording.GenerateAssetName("azsmnet"); - string networkInterfaceName = Recording.GenerateAssetName("azsmnet"); - string networkSecurityGroupName = virtualMachineName + "-nsg"; - - //Deploy VM with a template - var vm = await CreateWindowsVM(virtualMachineName, networkInterfaceName, location, resourceGroup); - - //Deploy networkWatcherAgent on VM - await deployWindowsNetworkAgent(virtualMachineName, location, resourceGroup); - - //TODO:There is no need to perform a separate create NetworkWatchers operation - //Create network Watcher - //string networkWatcherName = Recording.GenerateAssetName("azsmnet"); - //NetworkWatcherResource properties = new NetworkWatcherResource { Location = location }; - //await networkWatcherCollection.CreateOrUpdateAsync(true, "NetworkWatcherRG", "NetworkWatcher_westus2", properties); - - string connectionMonitorName = Recording.GenerateAssetName("azsmnet"); - var cm = new ConnectionMonitorCreateOrUpdateContent - { - Location = location, - Source = new ConnectionMonitorSource(vm.Id), - Destination = new ConnectionMonitorDestination - { - Address = "bing.com", - Port = 80 - }, - MonitoringIntervalInSeconds = 30, - AutoStart = false - }; - - var putConnectionMonitorOperation = await ConnectionMonitors.CreateOrUpdateAsync(WaitUntil.Completed, connectionMonitorName, cm); - Response putConnectionMonitor = await putConnectionMonitorOperation.WaitForCompletionAsync();; - Assert.AreEqual("NotStarted", putConnectionMonitor.Value.Data.MonitoringStatus); - - Operation connectionMonitorsStartOperation = await ConnectionMonitors.Get(connectionMonitorName).Value.StartAsync(WaitUntil.Completed); - await connectionMonitorsStartOperation.WaitForCompletionResponseAsync();; - - Response getConnectionMonitor = await ConnectionMonitors.GetAsync(connectionMonitorName); - Assert.AreEqual("Running", getConnectionMonitor.Value.Data.MonitoringStatus); - } - [Test] [Ignore("Track2: ApiVersion does not meet the requirements")] public async Task StopConnectionMonitorTest() @@ -182,60 +132,6 @@ public async Task StopConnectionMonitorTest() Assert.AreEqual("Stopped", getConnectionMonitor.Value.Data.MonitoringStatus); } - [Test] - [Ignore("Track2: ApiVersion does not meet the requirements")] - public async Task QueryConnectionMonitorTest() - { - string resourceGroupName = Recording.GenerateAssetName("azsmnet"); - - string location = "westus2"; - var resourceGroup = await CreateResourceGroup(resourceGroupName, location); - string virtualMachineName = Recording.GenerateAssetName("azsmnet"); - string networkInterfaceName = Recording.GenerateAssetName("azsmnet"); - string networkSecurityGroupName = virtualMachineName + "-nsg"; - - //Deploy VM with a template - var vm = await CreateWindowsVM(virtualMachineName, networkInterfaceName, location, resourceGroup); - - //Deploy networkWatcherAgent on VM - await deployWindowsNetworkAgent (virtualMachineName, location, resourceGroup); - - //TODO:There is no need to perform a separate create NetworkWatchers operation - //Create network Watcher - //string networkWatcherName = Recording.GenerateAssetName("azsmnet"); - //NetworkWatcherResource properties = new NetworkWatcherResource { Location = location }; - //await networkWatcherCollection.CreateOrUpdateAsync(true, "NetworkWatcherRG", "NetworkWatcher_westus2", properties); - - string connectionMonitorName = Recording.GenerateAssetName("azsmnet"); - var cm = new ConnectionMonitorCreateOrUpdateContent - { - Location = location, - Source = new ConnectionMonitorSource(vm.Id), - Destination = new ConnectionMonitorDestination - { - Address = "bing.com", - Port = 80 - }, - MonitoringIntervalInSeconds = 30 - }; - - var putConnectionMonitorOperation = await ConnectionMonitors.CreateOrUpdateAsync(WaitUntil.Completed, connectionMonitorName, cm); - await putConnectionMonitorOperation.WaitForCompletionAsync();; - - Operation connectionMonitorsStartOperation = await ConnectionMonitors.Get(connectionMonitorName).Value.StartAsync(WaitUntil.Completed); - await connectionMonitorsStartOperation.WaitForCompletionResponseAsync();; - - Operation connectionMonitorsStopOperation = await ConnectionMonitors.Get(connectionMonitorName).Value.StopAsync(WaitUntil.Completed); - await connectionMonitorsStopOperation.WaitForCompletionResponseAsync();; - - Operation queryResultOperation = await ConnectionMonitors.Get(connectionMonitorName).Value.QueryAsync(WaitUntil.Completed); - Response queryResult = await queryResultOperation.WaitForCompletionAsync();; - //Has.One.EqualTo(queryResult.States); - Assert.AreEqual("Reachable", queryResult.Value.States[0].NetworkConnectionState); - Assert.AreEqual("InProgress", queryResult.Value.States[0].EvaluationState); - Assert.AreEqual(2, queryResult.Value.States[0].Hops.Count); - } - [Test] [Ignore("Track2: ApiVersion does not meet the requirements")] public async Task UpdateConnectionMonitorTest() diff --git a/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductResource.Serialization.cs b/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductResource.Serialization.cs index 26020c3e861a..f343246a0daf 100644 --- a/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductResource.Serialization.cs +++ b/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkAnalytics { public partial class DataProductResource : IJsonModel { + private static DataProductData s_dataDeserializationInstance; + private static DataProductData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkAnalyticsContext.Default); DataProductData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductsCatalogResource.Serialization.cs b/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductsCatalogResource.Serialization.cs index 92911b3e05b7..13406d605a4d 100644 --- a/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductsCatalogResource.Serialization.cs +++ b/sdk/networkanalytics/Azure.ResourceManager.NetworkAnalytics/src/Generated/DataProductsCatalogResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkAnalytics { public partial class DataProductsCatalogResource : IJsonModel { + private static DataProductsCatalogData s_dataDeserializationInstance; + private static DataProductsCatalogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataProductsCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataProductsCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkAnalyticsContext.Default); DataProductsCatalogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.Serialization.cs index 162776bb6aa9..728d357d1351 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudAgentPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudAgentPoolResource : IJsonModel { + private static NetworkCloudAgentPoolData s_dataDeserializationInstance; + private static NetworkCloudAgentPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudAgentPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudAgentPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.Serialization.cs index d2da445dacb5..d7321c51abbb 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineKeySetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudBareMetalMachineKeySetResource : IJsonModel { + private static NetworkCloudBareMetalMachineKeySetData s_dataDeserializationInstance; + private static NetworkCloudBareMetalMachineKeySetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudBareMetalMachineKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudBareMetalMachineKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudBareMetalMachineKeySetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.Serialization.cs index 98b1d6d7a268..593947698ca0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBareMetalMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudBareMetalMachineResource : IJsonModel { + private static NetworkCloudBareMetalMachineData s_dataDeserializationInstance; + private static NetworkCloudBareMetalMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudBareMetalMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudBareMetalMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudBareMetalMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.Serialization.cs index 1109169fb723..31d6d5261abf 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudBmcKeySetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudBmcKeySetResource : IJsonModel { + private static NetworkCloudBmcKeySetData s_dataDeserializationInstance; + private static NetworkCloudBmcKeySetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudBmcKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudBmcKeySetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudBmcKeySetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.Serialization.cs index 0b88b229aa85..03d6eba808d2 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudCloudServicesNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudCloudServicesNetworkResource : IJsonModel { + private static NetworkCloudCloudServicesNetworkData s_dataDeserializationInstance; + private static NetworkCloudCloudServicesNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudCloudServicesNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudCloudServicesNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudCloudServicesNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.Serialization.cs index 13ac07eab111..4c8fba5b3655 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterManagerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudClusterManagerResource : IJsonModel { + private static NetworkCloudClusterManagerData s_dataDeserializationInstance; + private static NetworkCloudClusterManagerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudClusterManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudClusterManagerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudClusterManagerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.Serialization.cs index 8eed273b8f91..7261bbdded04 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterMetricsConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudClusterMetricsConfigurationResource : IJsonModel { + private static NetworkCloudClusterMetricsConfigurationData s_dataDeserializationInstance; + private static NetworkCloudClusterMetricsConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudClusterMetricsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudClusterMetricsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudClusterMetricsConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.Serialization.cs index f3dbf2148c00..4f3b61aee5d0 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudClusterResource : IJsonModel { + private static NetworkCloudClusterData s_dataDeserializationInstance; + private static NetworkCloudClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs index 70a5da72114b..ca2e4434360e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterFeatureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudKubernetesClusterFeatureResource : IJsonModel { + private static NetworkCloudKubernetesClusterFeatureData s_dataDeserializationInstance; + private static NetworkCloudKubernetesClusterFeatureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudKubernetesClusterFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudKubernetesClusterFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudKubernetesClusterFeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.Serialization.cs index 6e2be5d9fb7d..ed499caebe91 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudKubernetesClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudKubernetesClusterResource : IJsonModel { + private static NetworkCloudKubernetesClusterData s_dataDeserializationInstance; + private static NetworkCloudKubernetesClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudKubernetesClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudKubernetesClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudKubernetesClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.Serialization.cs index 8292c80ad7ba..d005a12f8462 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL2NetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudL2NetworkResource : IJsonModel { + private static NetworkCloudL2NetworkData s_dataDeserializationInstance; + private static NetworkCloudL2NetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudL2NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudL2NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudL2NetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.Serialization.cs index 2544ccbefaae..5280a9ed792e 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudL3NetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudL3NetworkResource : IJsonModel { + private static NetworkCloudL3NetworkData s_dataDeserializationInstance; + private static NetworkCloudL3NetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudL3NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudL3NetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudL3NetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.Serialization.cs index a8fbf3903dfc..d1a03c981890 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudRackResource : IJsonModel { + private static NetworkCloudRackData s_dataDeserializationInstance; + private static NetworkCloudRackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudRackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudRackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudRackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.Serialization.cs index 7a79755cab27..1cf56912b6ca 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudRackSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudRackSkuResource : IJsonModel { + private static NetworkCloudRackSkuData s_dataDeserializationInstance; + private static NetworkCloudRackSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudRackSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudRackSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudRackSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.Serialization.cs index adb3e2157d7f..4e9385b9da4a 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudStorageApplianceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudStorageApplianceResource : IJsonModel { + private static NetworkCloudStorageApplianceData s_dataDeserializationInstance; + private static NetworkCloudStorageApplianceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudStorageApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudStorageApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudStorageApplianceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.Serialization.cs index c9288c320df8..805da4b281b6 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudTrunkedNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudTrunkedNetworkResource : IJsonModel { + private static NetworkCloudTrunkedNetworkData s_dataDeserializationInstance; + private static NetworkCloudTrunkedNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudTrunkedNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudTrunkedNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudTrunkedNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.Serialization.cs index 77560a57b73f..bbc9dbdfeaa5 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineConsoleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudVirtualMachineConsoleResource : IJsonModel { + private static NetworkCloudVirtualMachineConsoleData s_dataDeserializationInstance; + private static NetworkCloudVirtualMachineConsoleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudVirtualMachineConsoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudVirtualMachineConsoleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudVirtualMachineConsoleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.Serialization.cs index 8bf420f39684..a6e6d9faa0da 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudVirtualMachineResource : IJsonModel { + private static NetworkCloudVirtualMachineData s_dataDeserializationInstance; + private static NetworkCloudVirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.Serialization.cs b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.Serialization.cs index 2a5271bceb83..e04d163238fe 100644 --- a/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.Serialization.cs +++ b/sdk/networkcloud/Azure.ResourceManager.NetworkCloud/src/Generated/NetworkCloudVolumeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkCloud { public partial class NetworkCloudVolumeResource : IJsonModel { + private static NetworkCloudVolumeData s_dataDeserializationInstance; + private static NetworkCloudVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkCloudVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkCloudVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkCloudContext.Default); NetworkCloudVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkCloudContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/AzureTrafficCollectorResource.Serialization.cs b/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/AzureTrafficCollectorResource.Serialization.cs index 4fd0246d4dc6..a31b20ee5df8 100644 --- a/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/AzureTrafficCollectorResource.Serialization.cs +++ b/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/AzureTrafficCollectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkFunction { public partial class AzureTrafficCollectorResource : IJsonModel { + private static AzureTrafficCollectorData s_dataDeserializationInstance; + private static AzureTrafficCollectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureTrafficCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureTrafficCollectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkFunctionContext.Default); AzureTrafficCollectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkFunctionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/CollectorPolicyResource.Serialization.cs b/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/CollectorPolicyResource.Serialization.cs index 0ebe7249cc71..8fdd4bf13a5e 100644 --- a/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/CollectorPolicyResource.Serialization.cs +++ b/sdk/networkfunction/Azure.ResourceManager.NetworkFunction/src/Generated/CollectorPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NetworkFunction { public partial class CollectorPolicyResource : IJsonModel { + private static CollectorPolicyData s_dataDeserializationInstance; + private static CollectorPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CollectorPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CollectorPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNetworkFunctionContext.Default); CollectorPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNetworkFunctionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.Serialization.cs index 8e7d3ad16815..d6ac402b1b4a 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NewRelicObservability { public partial class NewRelicMonitorResource : IJsonModel { + private static NewRelicMonitorResourceData s_dataDeserializationInstance; + private static NewRelicMonitorResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NewRelicMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NewRelicMonitorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNewRelicObservabilityContext.Default); NewRelicMonitorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNewRelicObservabilityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs index 6904c65dcb5c..be75203aca9e 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicMonitoredSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NewRelicObservability { public partial class NewRelicMonitoredSubscriptionResource : IJsonModel { + private static NewRelicMonitoredSubscriptionData s_dataDeserializationInstance; + private static NewRelicMonitoredSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NewRelicMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NewRelicMonitoredSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNewRelicObservabilityContext.Default); NewRelicMonitoredSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNewRelicObservabilityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.Serialization.cs b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.Serialization.cs index 24f391d16af2..168288457a2c 100644 --- a/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.Serialization.cs +++ b/sdk/newrelicobservability/Azure.ResourceManager.NewRelicObservability/src/Generated/NewRelicObservabilityTagRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NewRelicObservability { public partial class NewRelicObservabilityTagRuleResource : IJsonModel { + private static NewRelicObservabilityTagRuleData s_dataDeserializationInstance; + private static NewRelicObservabilityTagRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NewRelicObservabilityTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NewRelicObservabilityTagRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNewRelicObservabilityContext.Default); NewRelicObservabilityTagRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNewRelicObservabilityContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.Serialization.cs index 04f94665046e..4ebf47811b1e 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Nginx { public partial class NginxCertificateResource : IJsonModel { + private static NginxCertificateData s_dataDeserializationInstance; + private static NginxCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NginxCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NginxCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNginxContext.Default); NginxCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNginxContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.Serialization.cs index bdc1f934cc71..0654355c20d5 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Nginx { public partial class NginxConfigurationResource : IJsonModel { + private static NginxConfigurationData s_dataDeserializationInstance; + private static NginxConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NginxConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NginxConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNginxContext.Default); NginxConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNginxContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs index 9a9f0a1806c3..95b63e11cdac 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentApiKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Nginx { public partial class NginxDeploymentApiKeyResource : IJsonModel { + private static NginxDeploymentApiKeyData s_dataDeserializationInstance; + private static NginxDeploymentApiKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NginxDeploymentApiKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NginxDeploymentApiKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNginxContext.Default); NginxDeploymentApiKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNginxContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.Serialization.cs b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.Serialization.cs index bf24464491cc..4f49954262ae 100644 --- a/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.Serialization.cs +++ b/sdk/nginx/Azure.ResourceManager.Nginx/src/Generated/NginxDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Nginx { public partial class NginxDeploymentResource : IJsonModel { + private static NginxDeploymentData s_dataDeserializationInstance; + private static NginxDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NginxDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NginxDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNginxContext.Default); NginxDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNginxContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubAuthorizationRuleResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubAuthorizationRuleResource.Serialization.cs index 1ecc8058dd76..f2350d121492 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubAuthorizationRuleResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubAuthorizationRuleResource : IJsonModel { + private static NotificationHubAuthorizationRuleData s_dataDeserializationInstance; + private static NotificationHubAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceAuthorizationRuleResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceAuthorizationRuleResource.Serialization.cs index f15d53312ed1..1e8587c02de9 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceAuthorizationRuleResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubNamespaceAuthorizationRuleResource : IJsonModel { + private static NotificationHubAuthorizationRuleData s_dataDeserializationInstance; + private static NotificationHubAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceResource.Serialization.cs index dcc0073f8041..00b26bc50f2d 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubNamespaceResource : IJsonModel { + private static NotificationHubNamespaceData s_dataDeserializationInstance; + private static NotificationHubNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubPrivateEndpointConnectionResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubPrivateEndpointConnectionResource.Serialization.cs index 6370a0be7795..45c9a5b4c45c 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubPrivateEndpointConnectionResource : IJsonModel { + private static NotificationHubPrivateEndpointConnectionData s_dataDeserializationInstance; + private static NotificationHubPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubResource.Serialization.cs index b3bdb7ce4d52..a26f6d344047 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubResource : IJsonModel { + private static NotificationHubData s_dataDeserializationInstance; + private static NotificationHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubsPrivateLinkResource.Serialization.cs b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubsPrivateLinkResource.Serialization.cs index 0df37a18dc06..bfb0750d4179 100644 --- a/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubsPrivateLinkResource.Serialization.cs +++ b/sdk/notificationhubs/Azure.ResourceManager.NotificationHubs/src/Generated/NotificationHubsPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.NotificationHubs { public partial class NotificationHubsPrivateLinkResource : IJsonModel { + private static NotificationHubsPrivateLinkResourceData s_dataDeserializationInstance; + private static NotificationHubsPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationHubsPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationHubsPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerNotificationHubsContext.Default); NotificationHubsPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerNotificationHubsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Azure.Analytics.OnlineExperimentation.sln b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Azure.Analytics.OnlineExperimentation.sln new file mode 100644 index 000000000000..939ec6a0bab8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Azure.Analytics.OnlineExperimentation.sln @@ -0,0 +1,56 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29709.97 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Analytics.OnlineExperimentation", "src\Azure.Analytics.OnlineExperimentation.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.Analytics.OnlineExperimentation.Tests", "tests\Azure.Analytics.OnlineExperimentation.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 + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/CHANGELOG.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/CHANGELOG.md new file mode 100644 index 000000000000..8b33f0fedccc --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes \ No newline at end of file diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Directory.Build.props b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Directory.Build.props new file mode 100644 index 000000000000..63bd836ad44b --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/README.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/README.md new file mode 100644 index 000000000000..7acba3283066 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/README.md @@ -0,0 +1,99 @@ +# Azure Online Experimentation client library for .NET + +Azure Online Experimentation is a managed service that enables developers to create and manage experiment metrics for evaluating online A/B tests. + +[Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src) | [Package (NuGet)](https://www.nuget.org/packages/Azure.Analytics.OnlineExperimentation) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure) | [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples) + +## Getting started + +### Install the package + +Install the Azure Online Experimentation client library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.Analytics.OnlineExperimentation +``` + +### Prerequisites + +You need an [Azure subscription](https://azure.microsoft.com/free/dotnet/) with an Azure Online Experimentation workspace resource. + +### Authenticate the client + +The Azure Online Experimentation client library initialization requires two parameters: + +- The `endpoint` property value from the [`Microsoft.OnlineExperimentation/workspaces`](https://learn.microsoft.com/azure/templates/microsoft.onlineexperimentation/workspaces) resource. +- A `TokenCredential` for authentication, the simplest approach is to use [`DefaultAzureCredential`](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential). + +```C# Snippet:OnlineExperimentation_InitializeClient +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); +``` + +### Select a service API version + +You can explicitly select a supported service API version when instantiating a client: + +```C# Snippet:OnlineExperimentation_InitializeClientApiVersion +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var options = new OnlineExperimentationClientOptions(OnlineExperimentationClientOptions.ServiceVersion.V2025_05_31_Preview); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options); +``` + +Always ensure that the chosen API version is fully supported and operational for your specific use case and aligns with the service's versioning policy. + +## Key concepts + +The Azure Online Experimentation client library provides the following key classes: + +- `OnlineExperimentationClient`: Main client class for interacting with the service. +- `DiagnosticDetail`: Represents diagnostic details for experiment metrics. + +### Thread safety + +All client instances are thread-safe. It's recommended to reuse client instances across threads. + +### Additional concepts + +[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) | +[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-response-details) | +[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) | +[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) + +## Examples + +Explore common scenarios using the [samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples): + +- [Creating Experiment Metrics](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetrics.md) +- [Updating Experiment Metrics](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetrics.md) + +## Troubleshooting + +Common exceptions include: + +- `RequestFailedException`: Indicates a failure in the request. Inspect the exception message and status code for details. + +Enable logging and diagnostics to debug issues: + +```C# Snippet:OnlineExperimentation_InitializeClientDiagnostics +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var options = new OnlineExperimentationClientOptions() +{ + Diagnostics = + { + IsLoggingContentEnabled = true + } +}; +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options); +``` + +## Next steps + +- Explore additional [samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples) to learn more. +- Visit the [Azure SDK for .NET](https://github.com/Azure/azure-sdk-for-net) repository for more libraries. + +## Contributing + +See [CONTRIBUTING.md](https://github.com/Azure/azure-sdk-for-net/blob/main/CONTRIBUTING.md) for details on contributing to this library. + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/README.png) diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.net8.0.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.net8.0.cs new file mode 100644 index 000000000000..245dec413306 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.net8.0.cs @@ -0,0 +1,291 @@ +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class AggregatedValue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AggregatedValue(string eventName, string eventProperty) { } + public string EventName { get { throw null; } set { } } + public string EventProperty { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AggregatedValue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AggregatedValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 AnalyticsOnlineExperimentationModelFactory + { + public static Azure.Analytics.OnlineExperimentation.DiagnosticDetail DiagnosticDetail(string message = null, Azure.Analytics.OnlineExperimentation.DiagnosticCode code = default(Azure.Analytics.OnlineExperimentation.DiagnosticCode)) { throw null; } + public static Azure.Analytics.OnlineExperimentation.ExperimentMetric ExperimentMetric(string id = null, Azure.Analytics.OnlineExperimentation.LifecycleStage lifecycle = default(Azure.Analytics.OnlineExperimentation.LifecycleStage), string displayName = null, string description = null, System.Collections.Generic.IEnumerable categories = null, Azure.Analytics.OnlineExperimentation.DesiredDirection desiredDirection = default(Azure.Analytics.OnlineExperimentation.DesiredDirection), Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition definition = null, Azure.ETag eTag = default(Azure.ETag), System.DateTimeOffset lastModifiedAt = default(System.DateTimeOffset)) { throw null; } + public static Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult ExperimentMetricValidationResult(bool isValid = false, System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } + } + public partial class AverageMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AverageMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value) { } + public AverageMetricDefinition(string eventName, string eventProperty) { } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AverageMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AverageMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureAnalyticsOnlineExperimentationContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureAnalyticsOnlineExperimentationContext() { } + public static Azure.Analytics.OnlineExperimentation.AzureAnalyticsOnlineExperimentationContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DesiredDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DesiredDirection(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Decrease { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Increase { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Neutral { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.DesiredDirection 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.OnlineExperimentation.DesiredDirection left, Azure.Analytics.OnlineExperimentation.DesiredDirection right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.DesiredDirection (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.DesiredDirection left, Azure.Analytics.OnlineExperimentation.DesiredDirection right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DiagnosticCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DiagnosticCode(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode FailedSchemaValidation { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode InvalidEventCondition { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode InvalidExperimentMetricDefinition { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode UnsupportedEventCondition { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.DiagnosticCode 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.OnlineExperimentation.DiagnosticCode left, Azure.Analytics.OnlineExperimentation.DiagnosticCode right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.DiagnosticCode (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.DiagnosticCode left, Azure.Analytics.OnlineExperimentation.DiagnosticCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiagnosticDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiagnosticDetail() { } + public Azure.Analytics.OnlineExperimentation.DiagnosticCode Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.DiagnosticDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.DiagnosticDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventCountMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventCountMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event) { } + public EventCountMetricDefinition(string eventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventCountMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventCountMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventRateMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventRateMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event, string rateCondition) { } + public EventRateMetricDefinition(string eventName, string rateCondition) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + public string RateCondition { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventRateMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventRateMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExperimentMetric : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExperimentMetric(Azure.Analytics.OnlineExperimentation.LifecycleStage lifecycle, string displayName, string description, System.Collections.Generic.IEnumerable categories, Azure.Analytics.OnlineExperimentation.DesiredDirection desiredDirection, Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition definition) { } + public System.Collections.Generic.IList Categories { get { throw null; } } + public Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition Definition { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.DesiredDirection DesiredDirection { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ETag ETag { get { throw null; } } + public string Id { get { throw null; } } + public System.DateTimeOffset LastModifiedAt { get { throw null; } } + public Azure.Analytics.OnlineExperimentation.LifecycleStage Lifecycle { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetric System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExperimentMetricDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExperimentMetricDefinition() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExperimentMetricUpdate : Azure.Analytics.OnlineExperimentation.ExperimentMetric + { + public ExperimentMetricUpdate() : base (default(Azure.Analytics.OnlineExperimentation.LifecycleStage), default(string), default(string), default(System.Collections.Generic.IEnumerable), default(Azure.Analytics.OnlineExperimentation.DesiredDirection), default(Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + } + public partial class ExperimentMetricValidationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExperimentMetricValidationResult() { } + public System.Collections.Generic.IReadOnlyList Diagnostics { get { throw null; } } + public bool IsValid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 LifecycleStage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LifecycleStage(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.LifecycleStage Active { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.LifecycleStage Inactive { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.LifecycleStage 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.OnlineExperimentation.LifecycleStage left, Azure.Analytics.OnlineExperimentation.LifecycleStage right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.LifecycleStage (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.LifecycleStage left, Azure.Analytics.OnlineExperimentation.LifecycleStage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ObservedEvent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ObservedEvent(string eventName) { } + public string EventName { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ObservedEvent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ObservedEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OnlineExperimentationClient + { + protected OnlineExperimentationClient() { } + public OnlineExperimentationClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public OnlineExperimentationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response ActivateMetric(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ActivateMetricAsync(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, Azure.ETag? ifMatch = default(Azure.ETag?), Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMetric(string experimentMetricId, Azure.Core.RequestContent content, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, Azure.ETag? ifMatch = default(Azure.ETag?), Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateMetricAsync(string experimentMetricId, Azure.Core.RequestContent content, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeactivateMetric(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeactivateMetricAsync(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteMetric(string experimentMetricId, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetMetric(string experimentMetricId, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetMetric(string experimentMetricId, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMetrics(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetMetrics(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMetricsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetMetricsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetricUpdate metric, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetricUpdate metric, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateMetric(Azure.Analytics.OnlineExperimentation.ExperimentMetric body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateMetric(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateMetricAsync(Azure.Analytics.OnlineExperimentation.ExperimentMetric body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateMetricAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class OnlineExperimentationClientOptions : Azure.Core.ClientOptions + { + public OnlineExperimentationClientOptions(Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions.ServiceVersion version = Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions.ServiceVersion.V2025_05_31_Preview) { } + public enum ServiceVersion + { + V2025_05_31_Preview = 1, + } + } + public partial class PercentileMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PercentileMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value, double percentile) { } + public PercentileMetricDefinition(string eventName, string eventProperty, int percentile) { } + public double Percentile { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.PercentileMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.PercentileMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SumMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SumMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value) { } + public SumMetricDefinition(string eventName, string eventProperty) { } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.SumMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.SumMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserCountMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserCountMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event) { } + public UserCountMetricDefinition(string eventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserCountMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserCountMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserRateMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserRateMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent startEvent, Azure.Analytics.OnlineExperimentation.ObservedEvent endEvent) { } + public UserRateMetricDefinition(string startEventName, string endEventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent EndEvent { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.ObservedEvent StartEvent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserRateMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserRateMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 Microsoft.Extensions.Azure +{ + public static partial class AnalyticsOnlineExperimentationClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.netstandard2.0.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.netstandard2.0.cs new file mode 100644 index 000000000000..245dec413306 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/api/Azure.Analytics.OnlineExperimentation.netstandard2.0.cs @@ -0,0 +1,291 @@ +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class AggregatedValue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AggregatedValue(string eventName, string eventProperty) { } + public string EventName { get { throw null; } set { } } + public string EventProperty { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AggregatedValue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AggregatedValue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 AnalyticsOnlineExperimentationModelFactory + { + public static Azure.Analytics.OnlineExperimentation.DiagnosticDetail DiagnosticDetail(string message = null, Azure.Analytics.OnlineExperimentation.DiagnosticCode code = default(Azure.Analytics.OnlineExperimentation.DiagnosticCode)) { throw null; } + public static Azure.Analytics.OnlineExperimentation.ExperimentMetric ExperimentMetric(string id = null, Azure.Analytics.OnlineExperimentation.LifecycleStage lifecycle = default(Azure.Analytics.OnlineExperimentation.LifecycleStage), string displayName = null, string description = null, System.Collections.Generic.IEnumerable categories = null, Azure.Analytics.OnlineExperimentation.DesiredDirection desiredDirection = default(Azure.Analytics.OnlineExperimentation.DesiredDirection), Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition definition = null, Azure.ETag eTag = default(Azure.ETag), System.DateTimeOffset lastModifiedAt = default(System.DateTimeOffset)) { throw null; } + public static Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult ExperimentMetricValidationResult(bool isValid = false, System.Collections.Generic.IEnumerable diagnostics = null) { throw null; } + } + public partial class AverageMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AverageMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value) { } + public AverageMetricDefinition(string eventName, string eventProperty) { } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AverageMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.AverageMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AzureAnalyticsOnlineExperimentationContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureAnalyticsOnlineExperimentationContext() { } + public static Azure.Analytics.OnlineExperimentation.AzureAnalyticsOnlineExperimentationContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DesiredDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DesiredDirection(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Decrease { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Increase { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DesiredDirection Neutral { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.DesiredDirection 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.OnlineExperimentation.DesiredDirection left, Azure.Analytics.OnlineExperimentation.DesiredDirection right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.DesiredDirection (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.DesiredDirection left, Azure.Analytics.OnlineExperimentation.DesiredDirection right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DiagnosticCode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DiagnosticCode(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode FailedSchemaValidation { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode InvalidEventCondition { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode InvalidExperimentMetricDefinition { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.DiagnosticCode UnsupportedEventCondition { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.DiagnosticCode 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.OnlineExperimentation.DiagnosticCode left, Azure.Analytics.OnlineExperimentation.DiagnosticCode right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.DiagnosticCode (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.DiagnosticCode left, Azure.Analytics.OnlineExperimentation.DiagnosticCode right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DiagnosticDetail : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DiagnosticDetail() { } + public Azure.Analytics.OnlineExperimentation.DiagnosticCode Code { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.DiagnosticDetail System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.DiagnosticDetail System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventCountMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventCountMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event) { } + public EventCountMetricDefinition(string eventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventCountMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventCountMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EventRateMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EventRateMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event, string rateCondition) { } + public EventRateMetricDefinition(string eventName, string rateCondition) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + public string RateCondition { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventRateMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.EventRateMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExperimentMetric : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExperimentMetric(Azure.Analytics.OnlineExperimentation.LifecycleStage lifecycle, string displayName, string description, System.Collections.Generic.IEnumerable categories, Azure.Analytics.OnlineExperimentation.DesiredDirection desiredDirection, Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition definition) { } + public System.Collections.Generic.IList Categories { get { throw null; } } + public Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition Definition { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.DesiredDirection DesiredDirection { get { throw null; } set { } } + public string DisplayName { get { throw null; } set { } } + public Azure.ETag ETag { get { throw null; } } + public string Id { get { throw null; } } + public System.DateTimeOffset LastModifiedAt { get { throw null; } } + public Azure.Analytics.OnlineExperimentation.LifecycleStage Lifecycle { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetric System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetric System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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 ExperimentMetricDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected ExperimentMetricDefinition() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ExperimentMetricUpdate : Azure.Analytics.OnlineExperimentation.ExperimentMetric + { + public ExperimentMetricUpdate() : base (default(Azure.Analytics.OnlineExperimentation.LifecycleStage), default(string), default(string), default(System.Collections.Generic.IEnumerable), default(Azure.Analytics.OnlineExperimentation.DesiredDirection), default(Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition)) { } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + } + public partial class ExperimentMetricValidationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ExperimentMetricValidationResult() { } + public System.Collections.Generic.IReadOnlyList Diagnostics { get { throw null; } } + public bool IsValid { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ExperimentMetricValidationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 LifecycleStage : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public LifecycleStage(string value) { throw null; } + public static Azure.Analytics.OnlineExperimentation.LifecycleStage Active { get { throw null; } } + public static Azure.Analytics.OnlineExperimentation.LifecycleStage Inactive { get { throw null; } } + public bool Equals(Azure.Analytics.OnlineExperimentation.LifecycleStage 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.OnlineExperimentation.LifecycleStage left, Azure.Analytics.OnlineExperimentation.LifecycleStage right) { throw null; } + public static implicit operator Azure.Analytics.OnlineExperimentation.LifecycleStage (string value) { throw null; } + public static bool operator !=(Azure.Analytics.OnlineExperimentation.LifecycleStage left, Azure.Analytics.OnlineExperimentation.LifecycleStage right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ObservedEvent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ObservedEvent(string eventName) { } + public string EventName { get { throw null; } set { } } + public string Filter { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ObservedEvent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.ObservedEvent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class OnlineExperimentationClient + { + protected OnlineExperimentationClient() { } + public OnlineExperimentationClient(System.Uri endpoint, Azure.Core.TokenCredential credential) { } + public OnlineExperimentationClient(System.Uri endpoint, Azure.Core.TokenCredential credential, Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions options) { } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response ActivateMetric(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ActivateMetricAsync(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, Azure.ETag? ifMatch = default(Azure.ETag?), Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateMetric(string experimentMetricId, Azure.Core.RequestContent content, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetric metric, Azure.ETag? ifMatch = default(Azure.ETag?), Azure.ETag? ifNoneMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateMetricAsync(string experimentMetricId, Azure.Core.RequestContent content, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response DeactivateMetric(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeactivateMetricAsync(string experimentMetricId, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteMetric(string experimentMetricId, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task DeleteMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions = null, Azure.RequestContext context = null) { throw null; } + public virtual Azure.Response GetMetric(string experimentMetricId, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual Azure.Response GetMetric(string experimentMetricId, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions, Azure.RequestContext context) { throw null; } + public virtual System.Threading.Tasks.Task> GetMetricAsync(string experimentMetricId, Azure.RequestConditions requestConditions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetMetrics(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.Pageable GetMetrics(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetMetricsAsync(int? maxCount, int? skip, int? maxpagesize, Azure.RequestContext context) { throw null; } + public virtual Azure.AsyncPageable GetMetricsAsync(int? maxCount = default(int?), int? skip = default(int?), int? maxpagesize = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UpdateMetric(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetricUpdate metric, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateMetricAsync(string experimentMetricId, Azure.Analytics.OnlineExperimentation.ExperimentMetricUpdate metric, Azure.ETag? ifMatch = default(Azure.ETag?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateMetric(Azure.Analytics.OnlineExperimentation.ExperimentMetric body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ValidateMetric(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + public virtual System.Threading.Tasks.Task> ValidateMetricAsync(Azure.Analytics.OnlineExperimentation.ExperimentMetric body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ValidateMetricAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } + } + public partial class OnlineExperimentationClientOptions : Azure.Core.ClientOptions + { + public OnlineExperimentationClientOptions(Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions.ServiceVersion version = Azure.Analytics.OnlineExperimentation.OnlineExperimentationClientOptions.ServiceVersion.V2025_05_31_Preview) { } + public enum ServiceVersion + { + V2025_05_31_Preview = 1, + } + } + public partial class PercentileMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PercentileMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value, double percentile) { } + public PercentileMetricDefinition(string eventName, string eventProperty, int percentile) { } + public double Percentile { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.PercentileMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.PercentileMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SumMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SumMetricDefinition(Azure.Analytics.OnlineExperimentation.AggregatedValue value) { } + public SumMetricDefinition(string eventName, string eventProperty) { } + public Azure.Analytics.OnlineExperimentation.AggregatedValue Value { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.SumMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.SumMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserCountMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserCountMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent @event) { } + public UserCountMetricDefinition(string eventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent Event { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserCountMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserCountMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class UserRateMetricDefinition : Azure.Analytics.OnlineExperimentation.ExperimentMetricDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public UserRateMetricDefinition(Azure.Analytics.OnlineExperimentation.ObservedEvent startEvent, Azure.Analytics.OnlineExperimentation.ObservedEvent endEvent) { } + public UserRateMetricDefinition(string startEventName, string endEventName) { } + public Azure.Analytics.OnlineExperimentation.ObservedEvent EndEvent { get { throw null; } set { } } + public Azure.Analytics.OnlineExperimentation.ObservedEvent StartEvent { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserRateMetricDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Analytics.OnlineExperimentation.UserRateMetricDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 Microsoft.Extensions.Azure +{ + public static partial class AnalyticsOnlineExperimentationClientBuilderExtensions + { + public static Azure.Core.Extensions.IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, System.Uri endpoint) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithCredential { throw null; } + public static Azure.Core.Extensions.IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, TConfiguration configuration) where TBuilder : Azure.Core.Extensions.IAzureClientFactoryBuilderWithConfiguration { throw null; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/README.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/README.md new file mode 100644 index 000000000000..27a4890a0211 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/README.md @@ -0,0 +1,53 @@ +--- +page_type: sample +languages: +- csharp +products: +- azure +name: Azure.Analytics.OnlineExperimentation samples for .NET +description: Samples for the Azure.Analytics.OnlineExperimentation client library +--- + +# Azure Online Experimentation client library samples for .NET + +Azure Online Experimentation is a service that helps you manage and analyze experiments in your online applications. The service provides capabilities for defining and tracking metrics, setting up experiments, and analyzing results. + +## Getting started + +### Install the package + +Install the Azure Online Experimentation client library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.Analytics.OnlineExperimentation +``` + +### Initialize the client + +The Azure Online Experimentation client library initialization requires two parameters: + +- The `endpoint` property value from the [`Microsoft.OnlineExperimentation/workspaces`](https://learn.microsoft.com/azure/templates/microsoft.onlineexperimentation/workspaces) resource. +- A `TokenCredential` for authentication, the simplest approach is to use [`DefaultAzureCredential`](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential). + +```C# Snippet:OnlineExperimentation_InitializeClient +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); +``` + +## Samples + +These code samples show common scenarios with the Azure Online Experimentation client library. + +| Sample | Description | +|--------|-------------| +| [Initializing the Client](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample1_InitializeClient.md) | Initialize the client with different options. | +| [Creating Experiment Metrics](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetricsAsync.md) | Create various types of metrics synchronously. | +| [Creating Experiment Metrics Asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetricsAsync.md) | Create various types of metrics asynchronously. | +| [Validating Experiment Metrics](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetrics.md) | Validate metric definitions before creating them. | +| [Validating Experiment Metrics Asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetricsAsync.md) | Validate metric definitions asynchronously. | +| [Retrieving and Listing Metrics](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetrics.md) | Retrieve a specific metric or list all metrics. | +| [Retrieving and Listing Metrics Asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetricsAsync.md) | Retrieve or list metrics asynchronously. | +| [Updating an Experiment Metric](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetrics.md) | Update properties of an existing metric. | +| [Updating an Experiment Metric Asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetricsAsync.md) | Update properties of an existing metric asynchronously. | +| [Deleting an Experiment Metric](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetric.md) | Delete a metric when it's no longer needed. | +| [Deleting an Experiment Metric Asynchronously](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetricAsync.md) | Delete a metric asynchronously. | diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample1_InitializeClient.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample1_InitializeClient.md new file mode 100644 index 000000000000..f8546f6eb439 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample1_InitializeClient.md @@ -0,0 +1,25 @@ +# Initializing the Online Experimentation Client + +This sample demonstrates how to initialize the Azure Online Experimentation client library. + +## Basic Initialization + +The Azure Online Experimentation client library initialization requires two parameters: + +- The `endpoint` property value from the [`Microsoft.OnlineExperimentation/workspaces`](https://learn.microsoft.com/azure/templates/microsoft.onlineexperimentation/workspaces) resource. +- A `TokenCredential` for authentication, the simplest approach is to use [`DefaultAzureCredential`](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential). + +```C# Snippet:OnlineExperimentation_InitializeClient +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); +``` + +## Initialization with Specific API Version + +The client library can be initialized to use a specific API version instead of the latest available. + +```C# Snippet:OnlineExperimentation_InitializeClientApiVersion +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var options = new OnlineExperimentationClientOptions(OnlineExperimentationClientOptions.ServiceVersion.V2025_05_31_Preview); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetrics.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetrics.md new file mode 100644 index 000000000000..42d0b9ed951e --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetrics.md @@ -0,0 +1,182 @@ +# Creating Experiment Metrics + +This sample demonstrates how to create different types of metrics for your experimentation workspace. + +## Creating an Event Count Metric + +Event Count metrics count all occurrences of a specific event type. + +```C# Snippet:OnlineExperimentation_CreateEventCountMetric +// Create a client with your Azure Online Experimentation workspace endpoint and credentials +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Event Count metric - counts all occurrences of a specific event type +var promptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total number of prompts sent", + "Counts the total number of prompts sent by users to the chatbot", + ["Usage"], + DesiredDirection.Increase, + new EventCountMetricDefinition("PromptSent") +); + +// Create the metric with ID "PromptSentCount" +var response = client.CreateMetric("prompt_sent_count", promptSentMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +Console.WriteLine($"Display name: {response.Value.DisplayName}"); +``` + +## Creating a User Count Metric + +User Count metrics count unique users who performed a specific action. + +```C# Snippet:OnlineExperimentation_CreateUserCountMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the User Count metric with a filter - counts unique users who performed a specific action +var usersPromptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Users with at least one prompt sent on checkout page", + "Counts unique users who sent at least one prompt while on the checkout page", + ["Usage"], + DesiredDirection.Increase, + new UserCountMetricDefinition("PromptSent") + { + Event = { Filter = "Page == 'checkout.html'" } + } +); + +// Create the metric with ID "UsersPromptSent" +var response = client.CreateMetric("users_prompt_sent", usersPromptSentMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating an Event Rate Metric + +Event Rate metrics measure the percentage of events meeting a condition. + +```C# Snippet:OnlineExperimentation_CreateEventRateMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Event Rate metric - measures a percentage of events meeting a condition +var relevanceMetric = new ExperimentMetric( + LifecycleStage.Active, + "% evaluated conversations with good relevance", + "Percentage of evaluated conversations where the LLM response has good relevance (score >= 4)", + ["Quality"], + DesiredDirection.Increase, + new EventRateMetricDefinition("EvaluateLLM", rateCondition: "Relevance > 4") +); + +// Create the metric +var response = client.CreateMetric("momo_pct_relevance_good", relevanceMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating a User Rate Metric + +User Rate metrics measure the percentage of users who performed action B after action A. + +```C# Snippet:OnlineExperimentation_CreateUserRateMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the User Rate metric - measures percentage of users who performed action B after action A +var conversionMetric = new ExperimentMetric( + LifecycleStage.Active, + "% users with LLM interaction who made a high-value purchase", + "Percentage of users who received a response from the LLM and then made a purchase of $100 or more", + ["Business"], + DesiredDirection.Increase, + new UserRateMetricDefinition(startEventName: "ResponseReceived", endEventName: "Purchase") + { + EndEvent = { Filter = "Revenue > 100" } + } +); + +// Create the metric +var response = client.CreateMetric("pct_chat_to_high_value_purchase_conversion", conversionMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating a Sum Metric + +Sum metrics compute the sum of a numeric property across events. + +```C# Snippet:OnlineExperimentation_CreateSumMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Sum metric - sums a numeric value across all events of a type +var revenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total revenue", + "Sum of revenue from all purchase transactions", + ["Business"], + DesiredDirection.Increase, + new SumMetricDefinition("Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } +); + +// Create the metric +var response = client.CreateMetric("total_revenue", revenueMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating an Average Metric + +Average metrics calculate the mean of a numeric value across events. + +```C# Snippet:OnlineExperimentation_CreateAverageMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Average metric - calculates the mean of a numeric value across events +var avgRevenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase", + "The average revenue per purchase transaction in USD", + ["Business"], + DesiredDirection.Increase, + new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") +); + +// Create the metric +var response = client.CreateMetric("avg_revenue_per_purchase", avgRevenueMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating a Percentile Metric + +Percentile metrics calculate a specific percentile of a numeric value. + +```C# Snippet:OnlineExperimentation_CreatePercentileMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Percentile metric - calculates a specific percentile of a numeric value +var p95ResponseTimeMetric = new ExperimentMetric( + LifecycleStage.Active, + "P95 LLM response time [seconds]", + "The 95th percentile of response time in seconds for LLM responses", + ["Performance"], + DesiredDirection.Decrease, + new PercentileMetricDefinition(eventName: "ResponseReceived", eventProperty: "ResponseTimeSeconds", percentile: 95) +); + +// Create the metric +var response = client.CreateMetric("p95_response_time_seconds", p95ResponseTimeMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetricsAsync.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetricsAsync.md new file mode 100644 index 000000000000..eda9ca4dc7b2 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample2_CreateExperimentMetricsAsync.md @@ -0,0 +1,182 @@ +# Creating Experiment Metrics Asynchronously + +This sample demonstrates how to create different types of metrics for your experimentation workspace using asynchronous operations. + +## Creating an Event Count Metric + +Event Count metrics count all occurrences of a specific event type. + +```C# Snippet:OnlineExperimentation_CreateEventCountMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Event Count metric - counts all occurrences of a specific event type +var promptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total number of prompts sent", + "Counts the total number of prompts sent by users to the chatbot", + ["Usage"], + DesiredDirection.Increase, + new EventCountMetricDefinition("PromptSent") +); + +// Create the metric with ID "PromptSentCount" +var response = await client.CreateMetricAsync("prompt_sent_count", promptSentMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +Console.WriteLine($"Display name: {response.Value.DisplayName}"); +``` + +## Creating a User Count Metric + +User Count metrics count unique users who performed a specific action. + +```C# Snippet:OnlineExperimentation_CreateUserCountMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the User Count metric with a filter - counts unique users who performed a specific action +var usersPromptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Users with at least one prompt sent on checkout page", + "Counts unique users who sent at least one prompt while on the checkout page", + ["Usage"], + DesiredDirection.Increase, + new UserCountMetricDefinition("PromptSent") + { + Event = { Filter = "Page == 'checkout.html'" } + } +); + +// Create the metric with ID "UsersPromptSent" +var response = await client.CreateMetricAsync("users_prompt_sent", usersPromptSentMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating an Event Rate Metric + +Event Rate metrics measure the percentage of events meeting a condition. + +```C# Snippet:OnlineExperimentation_CreateEventRateMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Event Rate metric - measures a percentage of events meeting a condition +var relevanceMetric = new ExperimentMetric( + LifecycleStage.Active, + "% evaluated conversations with good relevance", + "Percentage of evaluated conversations where the LLM response has good relevance (score >= 4)", + ["Quality"], + DesiredDirection.Increase, + new EventRateMetricDefinition("EvaluateLLM", rateCondition: "Relevance > 4") +); + +// Create the metric +var response = await client.CreateMetricAsync("momo_pct_relevance_good", relevanceMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating a User Rate Metric + +User Rate metrics measure the percentage of users who performed action B after action A. + +```C# Snippet:OnlineExperimentation_CreateUserRateMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the User Rate metric - measures percentage of users who performed action B after action A +var conversionMetric = new ExperimentMetric( + LifecycleStage.Active, + "% users with LLM interaction who made a high-value purchase", + "Percentage of users who received a response from the LLM and then made a purchase of $100 or more", + ["Business"], + DesiredDirection.Increase, + new UserRateMetricDefinition(startEventName: "ResponseReceived", endEventName: "Purchase") + { + EndEvent = { Filter = "Revenue > 100" } + } +); + +// Create the metric +var response = await client.CreateMetricAsync("pct_chat_to_high_value_purchase_conversion", conversionMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating a Sum Metric + +Sum metrics compute the sum of a numeric property across events. + +```C# Snippet:OnlineExperimentation_CreateSumMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Sum metric - sums a numeric value across all events of a type +var revenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total revenue", + "Sum of revenue from all purchase transactions", + ["Business"], + DesiredDirection.Increase, + new SumMetricDefinition("Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } +); + +// Create the metric +var response = await client.CreateMetricAsync("total_revenue", revenueMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` + +## Creating an Average Metric + +Average metrics calculate the mean of a numeric value across events. + +```C# Snippet:OnlineExperimentation_CreateAverageMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Average metric - calculates the mean of a numeric value across events +var avgRevenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase", + "The average revenue per purchase transaction in USD", + ["Business"], + DesiredDirection.Increase, + new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") +); + +// Create the metric +var response = await client.CreateMetricAsync("avg_revenue_per_purchase", avgRevenueMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +Console.WriteLine($"Display name: {response.Value.DisplayName}"); +``` + +## Creating a Percentile Metric + +Percentile metrics calculate a specific percentile of a numeric value. + +```C# Snippet:OnlineExperimentation_CreatePercentileMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define the Percentile metric - calculates a specific percentile of a numeric value +var p95ResponseTimeMetric = new ExperimentMetric( + LifecycleStage.Active, + "P95 LLM response time [seconds]", + "The 95th percentile of response time in seconds for LLM responses", + ["Performance"], + DesiredDirection.Decrease, + new PercentileMetricDefinition(eventName: "ResponseReceived", eventProperty: "ResponseTimeSeconds", percentile: 95) +); + +// Create the metric +var response = await client.CreateMetricAsync("p95_response_time_seconds", p95ResponseTimeMetric); + +Console.WriteLine($"Created metric: {response.Value.Id}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetrics.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetrics.md new file mode 100644 index 000000000000..54e43215ad44 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetrics.md @@ -0,0 +1,44 @@ +# Validating and Deleting Metrics + +This sample demonstrates how to validate metric definitions before creating them and how to delete metrics when they're no longer needed. + +## Validating a Metric Definition + +Validate a metric definition to check for any errors before creating it. + +```C# Snippet:OnlineExperimentation_ValidateMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define a metric to validate +var metricToValidate = new ExperimentMetric( + LifecycleStage.Active, + "Test metric for validation", + "This metric definition will be validated before creation", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent") +); + +// Validate the metric - checks for errors in the definition +var validationResult = client.ValidateMetric(metricToValidate); + +// Check if the metric definition is valid +if (validationResult.Value.IsValid) +{ + Console.WriteLine("Metric definition is valid"); + + // Now create the validated metric + var createdMetric = client.CreateOrUpdateMetric("test_metric_id", metricToValidate); + Console.WriteLine($"Created metric: {createdMetric.Value.Id}"); +} +else +{ + // Handle validation errors + Console.WriteLine("Metric definition has errors:"); + foreach (var error in validationResult.Value.Diagnostics) + { + Console.WriteLine($"- [{error.Code}] {error.Message}"); + } +} +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetricsAsync.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetricsAsync.md new file mode 100644 index 000000000000..2fab48044025 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample3_ValidateExperimentMetricsAsync.md @@ -0,0 +1,44 @@ +# Validating and Deleting Metrics Asynchronously + +This sample demonstrates how to validate metric definitions before creating them and how to delete metrics when they're no longer needed using asynchronous operations. + +## Validating a Metric Definition + +Validate a metric definition to check for any errors before creating it. + +```C# Snippet:OnlineExperimentation_ValidateMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Define a metric to validate +var metricToValidate = new ExperimentMetric( + LifecycleStage.Active, + "Test metric for validation", + "This metric definition will be validated before creation", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent") +); + +// Validate the metric - checks for errors in the definition +var validationResult = await client.ValidateMetricAsync(metricToValidate); + +// Check if the metric definition is valid +if (validationResult.Value.IsValid) +{ + Console.WriteLine("Metric definition is valid"); + + // Now create the validated metric + var createdMetric = await client.CreateOrUpdateMetricAsync("test_metric_id", metricToValidate); + Console.WriteLine($"Created metric: {createdMetric.Value.Id}"); +} +else +{ + // Handle validation errors + Console.WriteLine("Metric definition has errors:"); + foreach (var error in validationResult.Value.Diagnostics) + { + Console.WriteLine($"- [{error.Code}] {error.Message}"); + } +} +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetrics.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetrics.md new file mode 100644 index 000000000000..ab9903392307 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetrics.md @@ -0,0 +1,38 @@ +# Retrieving and Listing Metrics + +This sample demonstrates how to retrieve a specific metric and how to list all metrics in your experimentation workspace. + +## Retrieving a Single Metric + +Get a specific metric by ID to access its properties. + +```C# Snippet:OnlineExperimentation_RetrieveMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Get a specific metric by ID +var metric = client.GetMetric("avg_revenue_per_purchase"); + +// Access metric properties to view or use the metric definition +Console.WriteLine($"Metric ID: {metric.Value.Id}"); +Console.WriteLine($"Display name: {metric.Value.DisplayName}"); +Console.WriteLine($"Description: {metric.Value.Description}"); +Console.WriteLine($"Lifecycle stage: {metric.Value.Lifecycle}"); +Console.WriteLine($"Desired direction: {metric.Value.DesiredDirection}"); +``` + +## Listing All Metrics + +Retrieve a list of all metrics in the workspace. + +```C# Snippet:OnlineExperimentation_ListMetrics +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// List all metrics in the workspace +Console.WriteLine("Listing all metrics:"); +foreach (var item in client.GetMetrics()) +{ + Console.WriteLine($"- {item.Id}: {item.DisplayName}"); +} +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetricsAsync.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetricsAsync.md new file mode 100644 index 000000000000..a45d37ffd5b5 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample4_RetrieveAndListMetricsAsync.md @@ -0,0 +1,38 @@ +# Retrieving and Listing Metrics Asynchronously + +This sample demonstrates how to retrieve a specific metric and how to list all metrics in your experimentation workspace using asynchronous operations. + +## Retrieving a Single Metric + +Get a specific metric by ID to access its properties. + +```C# Snippet:OnlineExperimentation_RetrieveMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Get a specific metric by ID +var metric = await client.GetMetricAsync("avg_revenue_per_purchase"); + +// Access metric properties to view or use the metric definition +Console.WriteLine($"Metric ID: {metric.Value.Id}"); +Console.WriteLine($"Display name: {metric.Value.DisplayName}"); +Console.WriteLine($"Description: {metric.Value.Description}"); +Console.WriteLine($"Lifecycle stage: {metric.Value.Lifecycle}"); +Console.WriteLine($"Desired direction: {metric.Value.DesiredDirection}"); +``` + +## Listing All Metrics + +Retrieve a list of all metrics in the workspace. + +```C# Snippet:OnlineExperimentation_ListMetricsAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// List all metrics in the workspace +Console.WriteLine("Listing all metrics:"); +await foreach (var item in client.GetMetricsAsync()) +{ + Console.WriteLine($"- {item.Id}: {item.DisplayName}"); +} +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetrics.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetrics.md new file mode 100644 index 000000000000..1aa34ef4ae91 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetrics.md @@ -0,0 +1,25 @@ +# Updating an Experiment Metric + +This sample demonstrates how to update an existing metric by retrieving it, modifying its properties, and saving the changes. + +```C# Snippet:OnlineExperimentation_UpdateMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Update a Description and Definition of an existing metric, +// other fields (DisplayName, Categories, DesiredDirection, Lifecycle) remain unchanged. +var response = client.UpdateMetric( + experimentMetricId: "avg_revenue_per_purchase", + new ExperimentMetricUpdate + { + Description = "The average revenue per purchase transaction in USD.", + Definition = new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + }); + +Console.WriteLine($"Updated metric: {response.Value.Id}"); +Console.WriteLine($"New display name: {response.Value.DisplayName}"); +Console.WriteLine($"New description: {response.Value.Description}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetricsAsync.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetricsAsync.md new file mode 100644 index 000000000000..c2031312996b --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample5_UpdateExperimentMetricsAsync.md @@ -0,0 +1,25 @@ +# Updating an Experiment Metric Asynchronously + +This sample demonstrates how to update an existing metric by retrieving it, modifying its properties, and saving the changes using asynchronous operations. + +```C# Snippet:OnlineExperimentation_UpdateMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Update a Description and Definition of an existing metric, +// other fields (DisplayName, Categories, DesiredDirection, Lifecycle) remain unchanged. +var response = await client.UpdateMetricAsync( + experimentMetricId: "avg_revenue_per_purchase", + new ExperimentMetricUpdate + { + Description = "The average revenue per purchase transaction in USD.", + Definition = new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + }); + +Console.WriteLine($"Updated metric: {response.Value.Id}"); +Console.WriteLine($"New display name: {response.Value.DisplayName}"); +Console.WriteLine($"New description: {response.Value.Description}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetric.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetric.md new file mode 100644 index 000000000000..bf37320930a7 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetric.md @@ -0,0 +1,13 @@ +# Deleting an Experiment Metric + +This sample demonstrates how to delete a metric from your experimentation workspace when it's no longer needed. + +```C# Snippet:OnlineExperimentation_DeleteMetric +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Delete a metric by ID - removes it from the workspace +var response = client.DeleteMetric("test_metric_id"); + +Console.WriteLine($"Delete operation status: {response.Status}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetricAsync.md b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetricAsync.md new file mode 100644 index 000000000000..1b834ea9bf0e --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/samples/Sample6_DeleteExperimentMetricAsync.md @@ -0,0 +1,13 @@ +# Deleting an Experiment Metric Asynchronously + +This sample demonstrates how to delete a metric from your experimentation workspace when it's no longer needed using asynchronous operations. + +```C# Snippet:OnlineExperimentation_DeleteMetricAsync +var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); +var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + +// Delete a metric by ID - removes it from the workspace +var response = await client.DeleteMetricAsync("test_metric_id"); + +Console.WriteLine($"Delete operation status: {response.Status}"); +``` diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Azure.Analytics.OnlineExperimentation.csproj b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Azure.Analytics.OnlineExperimentation.csproj new file mode 100644 index 000000000000..1c029d39a350 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Azure.Analytics.OnlineExperimentation.csproj @@ -0,0 +1,19 @@ + + + This is the Azure.Analytics.OnlineExperimentation client library for developing .NET applications with rich experience. + Azure SDK Code Generation Azure.Analytics.OnlineExperimentation for Azure Data Plane + 1.0.0-beta.1 + Azure.Analytics.OnlineExperimentation + $(RequiredTargetFrameworks) + true + + + + + + + + + + + diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/AverageMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/AverageMetricDefinition.cs new file mode 100644 index 000000000000..26f9baf5d490 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/AverageMetricDefinition.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class AverageMetricDefinition + { + /// Initializes a new instance of . + /// The name of the event. + /// The key of the event property to aggregate. + public AverageMetricDefinition(string eventName, string eventProperty) + : this(new AggregatedValue(eventName, eventProperty)) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventCountMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventCountMetricDefinition.cs new file mode 100644 index 000000000000..64fd962f245e --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventCountMetricDefinition.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class EventCountMetricDefinition + { + /// Initializes a new instance of . + /// Name of the event to observe. + public EventCountMetricDefinition(string eventName) + : this(new ObservedEvent(eventName)) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventRateMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventRateMetricDefinition.cs new file mode 100644 index 000000000000..77ef0424790d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/EventRateMetricDefinition.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class EventRateMetricDefinition + { + /// Initializes a new instance of . + /// Name of the event to observe. + /// The event contributes to the rate numerator if it satisfies this condition. + public EventRateMetricDefinition(string eventName, string rateCondition) + : this(new ObservedEvent(eventName), rateCondition) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/ExperimentMetricUpdate.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/ExperimentMetricUpdate.cs new file mode 100644 index 000000000000..2f18879d6144 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/ExperimentMetricUpdate.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// Partial instance for update operations. + public class ExperimentMetricUpdate : ExperimentMetric + { + /// Initializes a new instance of for partial updates. + public ExperimentMetricUpdate() + : base( + id: null, + lifecycle: default, + displayName: null, + description: null, + categories: new ChangeTrackingList(), + desiredDirection: default, + definition: null, + eTag: default, + lastModifiedAt: default, + serializedAdditionalRawData: null) + { + } + + /// + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + WriteOptional("id"u8, Id); + WriteOptional("lifecycle"u8, Lifecycle.ToString()); + WriteOptional("displayName"u8, DisplayName); + WriteOptional("description"u8, Description); + + if (Optional.IsCollectionDefined(Categories)) + { + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + + WriteOptional("desiredDirection"u8, DesiredDirection.ToString()); + + // "definition" should not be updated partially + if (Optional.IsDefined(Definition)) + { + writer.WritePropertyName("definition"u8); + IJsonModel jsonModel = Definition; + jsonModel.Write(writer, ModelReaderWriterOptions.Json); + } + + void WriteOptional(ReadOnlySpan key, string value) + { + if (Optional.IsDefined(value)) + { + writer.WritePropertyName(key); + writer.WriteStringValue(value); + } + } + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/OnlineExperimentationClient.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/OnlineExperimentationClient.cs new file mode 100644 index 000000000000..c7f8caba7487 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/OnlineExperimentationClient.cs @@ -0,0 +1,238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; + +using Azure.Core; + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class OnlineExperimentationClient + { + /// + /// Creates or update an experiment metric asynchronously. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A ExperimentMetric object that describes the metric. + /// Optionally limit requests to resources that have a matching ETag. + /// Optionally limit requests to resources that do not match the ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual async Task> CreateOrUpdateMetricAsync( + string experimentMetricId, + ExperimentMetric metric, + ETag? ifMatch = null, + ETag? ifNoneMatch = null, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfMatch = ifMatch, IfNoneMatch = ifNoneMatch }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrUpdateMetricAsync(experimentMetricId, content, conditions, context).ConfigureAwait(false); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Create or update an experiment metric. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A ExperimentMetric object that describes the metric. + /// Optionally limit requests to resources that have a matching ETag. + /// Optionally limit requests to resources that do not match the ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual Response CreateOrUpdateMetric( + string experimentMetricId, + ExperimentMetric metric, + ETag? ifMatch = null, + ETag? ifNoneMatch = null, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfMatch = ifMatch, IfNoneMatch = ifNoneMatch }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrUpdateMetric(experimentMetricId, content, conditions, context); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Creates an experiment metric asynchronously. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A ExperimentMetric object that describes the metric. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual async Task> CreateMetricAsync( + string experimentMetricId, + ExperimentMetric metric, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfNoneMatch = ETag.All }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrUpdateMetricAsync(experimentMetricId, content, conditions, context).ConfigureAwait(false); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Creates an experiment metric. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A ExperimentMetric object that describes the metric. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual Response CreateMetric( + string experimentMetricId, + ExperimentMetric metric, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfNoneMatch = ETag.All }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrUpdateMetric(experimentMetricId, content, conditions, context); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Updates an experiment metric asynchronously. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A partial definition for incremental updates. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual async Task> UpdateMetricAsync( + string experimentMetricId, + ExperimentMetricUpdate metric, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfMatch = ifMatch }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await CreateOrUpdateMetricAsync(experimentMetricId, content, conditions, context).ConfigureAwait(false); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Updates an experiment metric. + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// A partial definition for incremental updates. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when or parameter is null. + /// Thrown when is empty. + + [ForwardsClientCalls] + public virtual Response UpdateMetric( + string experimentMetricId, + ExperimentMetricUpdate metric, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + using RequestContent content = metric.ToRequestContent(); + var conditions = new RequestConditions { IfMatch = ifMatch }; + RequestContext context = FromCancellationToken(cancellationToken); + Response response = CreateOrUpdateMetric(experimentMetricId, content, conditions, context); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// Update to . + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when parameter is null. + /// Thrown when is empty. + [ForwardsClientCalls] + public virtual Task> DeactivateMetricAsync( + string experimentMetricId, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + var payload = new ExperimentMetricUpdate { Lifecycle = LifecycleStage.Inactive }; + return UpdateMetricAsync(experimentMetricId, payload, ifMatch, cancellationToken); + } + + /// + /// Update to . + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// Thrown when parameter is null. + /// Thrown when is empty. + [ForwardsClientCalls] + public virtual Response DeactivateMetric( + string experimentMetricId, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + var payload = new ExperimentMetricUpdate { Lifecycle = LifecycleStage.Inactive }; + return UpdateMetric(experimentMetricId, payload, ifMatch, cancellationToken); + } + + /// + /// Update to . + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// An awaitable task. + /// Thrown when parameter is null. + /// Thrown when is empty. + [ForwardsClientCalls] + public virtual Task> ActivateMetricAsync( + string experimentMetricId, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + var payload = new ExperimentMetricUpdate { Lifecycle = LifecycleStage.Active }; + return UpdateMetricAsync(experimentMetricId, payload, ifMatch, cancellationToken); + } + + /// + /// Update to . + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Optionally limit requests to resources that have a matching ETag. + /// The token to check for cancellation. + /// Thrown when parameter is null. + /// Thrown when is empty. + [ForwardsClientCalls] + public virtual Response ActivateMetric( + string experimentMetricId, + ETag? ifMatch = null, + CancellationToken cancellationToken = default) + { + var payload = new ExperimentMetricUpdate { Lifecycle = LifecycleStage.Active }; + return UpdateMetric(experimentMetricId, payload, ifMatch, cancellationToken); + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/PercentileMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/PercentileMetricDefinition.cs new file mode 100644 index 000000000000..776e391323b8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/PercentileMetricDefinition.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class PercentileMetricDefinition + { + /// Initializes a new instance of . + /// The name of the event. + /// The key of the event property to aggregate. + /// The percentile to measure. + public PercentileMetricDefinition(string eventName, string eventProperty, int percentile) + : this(new AggregatedValue(eventName, eventProperty), percentile) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/SumMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/SumMetricDefinition.cs new file mode 100644 index 000000000000..47c8a0f1dfa0 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/SumMetricDefinition.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class SumMetricDefinition + { + /// Initializes a new instance of . + /// The name of the event. + /// The key of the event property to aggregate. + public SumMetricDefinition(string eventName, string eventProperty) + : this(new AggregatedValue(eventName, eventProperty)) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserCountMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserCountMetricDefinition.cs new file mode 100644 index 000000000000..a6b115d650c7 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserCountMetricDefinition.cs @@ -0,0 +1,15 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class UserCountMetricDefinition + { + /// Initializes a new instance of . + /// Name of the event to observe. + public UserCountMetricDefinition(string eventName) + : this(new ObservedEvent(eventName)) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserRateMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserRateMetricDefinition.cs new file mode 100644 index 000000000000..b0409d1d2d78 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Customization/UserRateMetricDefinition.cs @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.Analytics.OnlineExperimentation +{ + public partial class UserRateMetricDefinition + { + /// Initializes a new instance of . + /// Name of the event that starts the rate calculation. + /// Name of the event that ends the rate calculation. + public UserRateMetricDefinition(string startEventName, string endEventName) + : this(new ObservedEvent(startEventName), new ObservedEvent(endEventName)) + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.Serialization.cs new file mode 100644 index 000000000000..4440d4d43954 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) 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.Analytics.OnlineExperimentation +{ + public partial class AggregatedValue : 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(AggregatedValue)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("eventName"u8); + writer.WriteStringValue(EventName); + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); + writer.WriteStringValue(Filter); + } + writer.WritePropertyName("eventProperty"u8); + writer.WriteStringValue(EventProperty); + 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 + } + } + } + + AggregatedValue 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(AggregatedValue)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAggregatedValue(document.RootElement, options); + } + + internal static AggregatedValue DeserializeAggregatedValue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventName = default; + string filter = default; + string eventProperty = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventName"u8)) + { + eventName = property.Value.GetString(); + continue; + } + if (property.NameEquals("filter"u8)) + { + filter = property.Value.GetString(); + continue; + } + if (property.NameEquals("eventProperty"u8)) + { + eventProperty = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AggregatedValue(eventName, filter, eventProperty, 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(AggregatedValue)} does not support writing '{options.Format}' format."); + } + } + + AggregatedValue 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 DeserializeAggregatedValue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AggregatedValue)} 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 AggregatedValue FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAggregatedValue(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.cs new file mode 100644 index 000000000000..d1429326a68d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AggregatedValue.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.Analytics.OnlineExperimentation +{ + /// An event property value aggregated by a metric. + public partial class AggregatedValue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the event. + /// The key of the event property to aggregate. + /// or is null. + public AggregatedValue(string eventName, string eventProperty) + { + Argument.AssertNotNull(eventName, nameof(eventName)); + Argument.AssertNotNull(eventProperty, nameof(eventProperty)); + + EventName = eventName; + EventProperty = eventProperty; + } + + /// Initializes a new instance of . + /// The name of the event. + /// [Optional] A condition to filter events. + /// The key of the event property to aggregate. + /// Keeps track of any properties unknown to the library. + internal AggregatedValue(string eventName, string filter, string eventProperty, IDictionary serializedAdditionalRawData) + { + EventName = eventName; + Filter = filter; + EventProperty = eventProperty; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AggregatedValue() + { + } + + /// The name of the event. + public string EventName { get; set; } + /// [Optional] A condition to filter events. + public string Filter { get; set; } + /// The key of the event property to aggregate. + public string EventProperty { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationClientBuilderExtensions.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationClientBuilderExtensions.cs new file mode 100644 index 000000000000..21c9affb0bd5 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationClientBuilderExtensions.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Analytics.OnlineExperimentation; +using Azure.Core.Extensions; + +namespace Microsoft.Extensions.Azure +{ + /// Extension methods to add to client builder. + public static partial class AnalyticsOnlineExperimentationClientBuilderExtensions + { + /// Registers a instance. + /// The builder to register with. + /// Endpoint URL for the Online Experimentation workspace. + public static IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, Uri endpoint) + where TBuilder : IAzureClientFactoryBuilderWithCredential + { + return builder.RegisterClientFactory((options, cred) => new OnlineExperimentationClient(endpoint, cred, options)); + } + + /// Registers a instance. + /// The builder to register with. + /// The configuration values. + public static IAzureClientBuilder AddOnlineExperimentationClient(this TBuilder builder, TConfiguration configuration) + where TBuilder : IAzureClientFactoryBuilderWithConfiguration + { + return builder.RegisterClientFactory(configuration); + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationModelFactory.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationModelFactory.cs new file mode 100644 index 000000000000..9dfa351c175d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AnalyticsOnlineExperimentationModelFactory.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; +using System.Linq; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// Model factory for models. + public static partial class AnalyticsOnlineExperimentationModelFactory + { + /// Initializes a new instance of . + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Determines whether it is included in experiment analysis. + /// A user-friendly display name for the experiment metric shown in reports and dashboards. + /// A detailed description of the experiment metric. + /// Categories associated with the experiment metric. Used for organizing and filtering metrics. + /// The desired direction for changes in the metric value. + /// + /// The metric definition specifying how the metric value is calculated from event data. + /// 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 . + /// + /// ETag of the experiment metric. + /// The timestamp (UTC) of the last modification to the experiment metric resource. + /// A new instance for mocking. + public static ExperimentMetric ExperimentMetric(string id = null, LifecycleStage lifecycle = default, string displayName = null, string description = null, IEnumerable categories = null, DesiredDirection desiredDirection = default, ExperimentMetricDefinition definition = null, ETag eTag = default, DateTimeOffset lastModifiedAt = default) + { + categories ??= new List(); + + return new ExperimentMetric( + id, + lifecycle, + displayName, + description, + categories?.ToList(), + desiredDirection, + definition, + eTag, + lastModifiedAt, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Indicates whether the experiment metric is valid. + /// Diagnostic details from the validation process. + /// A new instance for mocking. + public static ExperimentMetricValidationResult ExperimentMetricValidationResult(bool isValid = default, IEnumerable diagnostics = null) + { + diagnostics ??= new List(); + + return new ExperimentMetricValidationResult(isValid, diagnostics?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// A human-readable error message. + /// The diagnostic error code. + /// A new instance for mocking. + public static DiagnosticDetail DiagnosticDetail(string message = null, DiagnosticCode code = default) + { + return new DiagnosticDetail(message, code, serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..7f0adf61d277 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class AverageMetricDefinition : 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(AverageMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("value"u8); + writer.WriteObjectValue(Value, options); + } + + AverageMetricDefinition 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(AverageMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAverageMetricDefinition(document.RootElement, options); + } + + internal static AverageMetricDefinition DeserializeAverageMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AggregatedValue value = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = AggregatedValue.DeserializeAggregatedValue(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AverageMetricDefinition(type, serializedAdditionalRawData, value); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(AverageMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + AverageMetricDefinition 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 DeserializeAverageMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AverageMetricDefinition)} 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 new AverageMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAverageMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.cs new file mode 100644 index 000000000000..877afcc9edeb --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/AverageMetricDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of an Average metric definition. Calculates the average value of a specified event property. + public partial class AverageMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// The value to aggregate. + /// is null. + public AverageMetricDefinition(AggregatedValue value) + { + Argument.AssertNotNull(value, nameof(value)); + + Type = ExperimentMetricType.Average; + Value = value; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// The value to aggregate. + internal AverageMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, AggregatedValue value) : base(type, serializedAdditionalRawData) + { + Value = value; + } + + /// Initializes a new instance of for deserialization. + internal AverageMetricDefinition() + { + } + + /// The value to aggregate. + public AggregatedValue Value { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DesiredDirection.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DesiredDirection.cs new file mode 100644 index 000000000000..66a7a98cd31d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DesiredDirection.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.OnlineExperimentation +{ + /// Desired direction for an experiment metric value. + public readonly partial struct DesiredDirection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DesiredDirection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IncreaseValue = "Increase"; + private const string DecreaseValue = "Decrease"; + private const string NeutralValue = "Neutral"; + + /// An increase to the metric value is desired. E.g., Success rate, Total revenue. + public static DesiredDirection Increase { get; } = new DesiredDirection(IncreaseValue); + /// A decrease to the metric value is desired. E.g., Error rate, Latency. + public static DesiredDirection Decrease { get; } = new DesiredDirection(DecreaseValue); + /// Neither an increase nor a decrease to the metric value is desired, or the desired direction depends on other factors. E.g., Number of video play attempts, Number of user feedbacks. + public static DesiredDirection Neutral { get; } = new DesiredDirection(NeutralValue); + /// Determines if two values are the same. + public static bool operator ==(DesiredDirection left, DesiredDirection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DesiredDirection left, DesiredDirection right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DesiredDirection(string value) => new DesiredDirection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DesiredDirection other && Equals(other); + /// + public bool Equals(DesiredDirection 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticCode.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticCode.cs new file mode 100644 index 000000000000..f67968186953 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticCode.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The diagnostic error codes. + public readonly partial struct DiagnosticCode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DiagnosticCode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FailedSchemaValidationValue = "FailedSchemaValidation"; + private const string InvalidEventConditionValue = "InvalidEventCondition"; + private const string UnsupportedEventConditionValue = "UnsupportedEventCondition"; + private const string InvalidExperimentMetricDefinitionValue = "InvalidExperimentMetricDefinition"; + + /// The metric definition does not conform to the required schema. + public static DiagnosticCode FailedSchemaValidation { get; } = new DiagnosticCode(FailedSchemaValidationValue); + /// The filter condition is invalid. + public static DiagnosticCode InvalidEventCondition { get; } = new DiagnosticCode(InvalidEventConditionValue); + /// The filter condition is valid but not currently supported. + public static DiagnosticCode UnsupportedEventCondition { get; } = new DiagnosticCode(UnsupportedEventConditionValue); + /// + /// The provided metric definition is invalid. + /// For example, defining a metric to calculate the average of a numeric property but + /// including a filter condition that compares it to a string value creates a type mismatch. + /// + public static DiagnosticCode InvalidExperimentMetricDefinition { get; } = new DiagnosticCode(InvalidExperimentMetricDefinitionValue); + /// Determines if two values are the same. + public static bool operator ==(DiagnosticCode left, DiagnosticCode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DiagnosticCode left, DiagnosticCode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DiagnosticCode(string value) => new DiagnosticCode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DiagnosticCode other && Equals(other); + /// + public bool Equals(DiagnosticCode 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.Serialization.cs new file mode 100644 index 000000000000..5203bef98b4a --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.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.Analytics.OnlineExperimentation +{ + public partial class DiagnosticDetail : 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(DiagnosticDetail)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W") + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code.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 + } + } + } + + DiagnosticDetail 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(DiagnosticDetail)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDiagnosticDetail(document.RootElement, options); + } + + internal static DiagnosticDetail DeserializeDiagnosticDetail(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string message = default; + DiagnosticCode code = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("code"u8)) + { + code = new DiagnosticCode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DiagnosticDetail(message, code, 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(DiagnosticDetail)} does not support writing '{options.Format}' format."); + } + } + + DiagnosticDetail 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 DeserializeDiagnosticDetail(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DiagnosticDetail)} 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 DiagnosticDetail FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDiagnosticDetail(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.cs new file mode 100644 index 000000000000..def63fa2490f --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/DiagnosticDetail.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.Analytics.OnlineExperimentation +{ + /// Diagnostic details for validation errors. + public partial class DiagnosticDetail + { + /// + /// 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 DiagnosticDetail() + { + } + + /// Initializes a new instance of . + /// A human-readable error message. + /// The diagnostic error code. + /// Keeps track of any properties unknown to the library. + internal DiagnosticDetail(string message, DiagnosticCode code, IDictionary serializedAdditionalRawData) + { + Message = message; + Code = code; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A human-readable error message. + public string Message { get; } + /// The diagnostic error code. + public DiagnosticCode Code { get; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Docs/OnlineExperimentationClient.xml b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Docs/OnlineExperimentationClient.xml new file mode 100644 index 000000000000..ae2807f70393 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Docs/OnlineExperimentationClient.xml @@ -0,0 +1,855 @@ + + + + + +This sample shows how to call GetMetricAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = await client.GetMetricAsync("events_purchase_creditcard"); +]]> + + + +This sample shows how to call GetMetric. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = client.GetMetric("events_purchase_creditcard"); +]]> + + + +This sample shows how to call GetMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = await client.GetMetricAsync("events_purchase_creditcard", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> + + + +This sample shows how to call GetMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = client.GetMetric("events_purchase_creditcard", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> + + + +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue > 0", + }, + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("avg_purchase_revenue", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Number of purchases (credit card)", + description = "The number of purchase transactions made with credit card. Refund transactions are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "EventCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0 and ['payment.method'] == 'credit_card'", + } + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("events_purchase_creditcard", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Refund rate", + description = "The percentage of transactions that are refunds. This metric is calculated as the number of refund transactions divided by the total number of transactions.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Neutral", + definition = new Dictionary + { + ["type"] = "EventRate", + ["event"] = new + { + eventName = "Transaction", + }, + ["rateCondition"] = "Revenue < 0" + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("rate_refund", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "95th percentile of page load time [ms]", + description = "The 95th percentile of the page load time for all pages. Measured in milliseconds. Review page-specific metric results to identify pages that need optimization.", + lifecycle = "Active", + categories = new object[] + { + "Performance", + "Important" + }, + desiredDirection = "Decrease", + definition = new + { + type = "Percentile", + value = new + { + eventName = "PageLoad", + eventProperty = "LoadTime_ms", + }, + percentile = 95, + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("p95_page_load_time", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Total revenue [USD]", + description = "The total revenue in USD. Refund transactions contribute negatively to this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization", + "Important" + }, + desiredDirection = "Increase", + definition = new + { + type = "Sum", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + }, + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("sum_revenue", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Users with purchase", + description = "The number of users who have made at least one purchase transaction. Refund transactions are excluded from this metric. As the analysis period grows, this metric begins to saturate as users making multiple purchases no longer contribute.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "UserCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0", + } + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("users_purchase", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Subscription ad conversion rate", + description = "The percentage of users who saw an advertisement for a subscription promotion and then later successfully subscribed. This metric is calculated as the number of users who successfully subscribed after seeing the advert divided by the total number of users who saw the advert. Users who saw multiple adverts or subscribed multiple times are counted only once. Users who saw the advert before the analysis period starts are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "UserRate", + startEvent = new + { + eventName = "AdView", + filter = "Source == 'subscription_promo'", + }, + endEvent = new + { + eventName = "Subscribe", + filter = "Status == 'Success'", + }, + }, +}); +Response response = await client.CreateOrUpdateMetricAsync("rate_subscription_ad", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> + + + +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue > 0", + }, + }, +}); +Response response = client.CreateOrUpdateMetric("avg_purchase_revenue", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Number of purchases (credit card)", + description = "The number of purchase transactions made with credit card. Refund transactions are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "EventCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0 and ['payment.method'] == 'credit_card'", + } + }, +}); +Response response = client.CreateOrUpdateMetric("events_purchase_creditcard", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Refund rate", + description = "The percentage of transactions that are refunds. This metric is calculated as the number of refund transactions divided by the total number of transactions.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Neutral", + definition = new Dictionary + { + ["type"] = "EventRate", + ["event"] = new + { + eventName = "Transaction", + }, + ["rateCondition"] = "Revenue < 0" + }, +}); +Response response = client.CreateOrUpdateMetric("rate_refund", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "95th percentile of page load time [ms]", + description = "The 95th percentile of the page load time for all pages. Measured in milliseconds. Review page-specific metric results to identify pages that need optimization.", + lifecycle = "Active", + categories = new object[] + { + "Performance", + "Important" + }, + desiredDirection = "Decrease", + definition = new + { + type = "Percentile", + value = new + { + eventName = "PageLoad", + eventProperty = "LoadTime_ms", + }, + percentile = 95, + }, +}); +Response response = client.CreateOrUpdateMetric("p95_page_load_time", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Total revenue [USD]", + description = "The total revenue in USD. Refund transactions contribute negatively to this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization", + "Important" + }, + desiredDirection = "Increase", + definition = new + { + type = "Sum", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + }, + }, +}); +Response response = client.CreateOrUpdateMetric("sum_revenue", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Users with purchase", + description = "The number of users who have made at least one purchase transaction. Refund transactions are excluded from this metric. As the analysis period grows, this metric begins to saturate as users making multiple purchases no longer contribute.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "UserCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0", + } + }, +}); +Response response = client.CreateOrUpdateMetric("users_purchase", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> +This sample shows how to call CreateOrUpdateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Subscription ad conversion rate", + description = "The percentage of users who saw an advertisement for a subscription promotion and then later successfully subscribed. This metric is calculated as the number of users who successfully subscribed after seeing the advert divided by the total number of users who saw the advert. Users who saw multiple adverts or subscribed multiple times are counted only once. Users who saw the advert before the analysis period starts are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "UserRate", + startEvent = new + { + eventName = "AdView", + filter = "Source == 'subscription_promo'", + }, + endEvent = new + { + eventName = "Subscribe", + filter = "Status == 'Success'", + }, + }, +}); +Response response = client.CreateOrUpdateMetric("rate_subscription_ad", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("lifecycle").ToString()); +Console.WriteLine(result.GetProperty("displayName").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("categories")[0].ToString()); +Console.WriteLine(result.GetProperty("desiredDirection").ToString()); +Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("eTag").ToString()); +Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +]]> + + + +This sample shows how to call ValidateMetricAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +ExperimentMetric body = new ExperimentMetric( +LifecycleStage.Active, +"Average revenue per purchase [USD]", +"The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", +new string[] { "Monetization" }, +DesiredDirection.Increase, +new AverageMetricDefinition(new AggregatedValue("Transaction", "Revenue") +{ + Filter = "Revenue >", +})); +Response response = await client.ValidateMetricAsync(body); +]]> + + + +This sample shows how to call ValidateMetric. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +ExperimentMetric body = new ExperimentMetric( +LifecycleStage.Active, +"Average revenue per purchase [USD]", +"The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", +new string[] { "Monetization" }, +DesiredDirection.Increase, +new AverageMetricDefinition(new AggregatedValue("Transaction", "Revenue") +{ + Filter = "Revenue >", +})); +Response response = client.ValidateMetric(body); +]]> + + + +This sample shows how to call ValidateMetricAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue >", + }, + }, +}); +Response response = await client.ValidateMetricAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("isValid").ToString()); +Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("code").ToString()); +]]> + + + +This sample shows how to call ValidateMetric and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { + "Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue >", + }, + }, +}); +Response response = client.ValidateMetric(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("isValid").ToString()); +Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("code").ToString()); +]]> + + + +This sample shows how to call DeleteMetricAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = await client.DeleteMetricAsync("avg_purchase_revenue"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call DeleteMetric. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +Response response = client.DeleteMetric("avg_purchase_revenue"); + +Console.WriteLine(response.Status); +]]> + + + +This sample shows how to call GetMetricsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +await foreach (ExperimentMetric item in client.GetMetricsAsync()) +{ +} +]]> + + + +This sample shows how to call GetMetrics. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +foreach (ExperimentMetric item in client.GetMetrics()) +{ +} +]]> + + + +This sample shows how to call GetMetricsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetMetricsAsync(null, 15, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +} +]]> + + + +This sample shows how to call GetMetrics and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + +foreach (BinaryData item in client.GetMetrics(null, 15, null, null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..1ce4fad94b99 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class EventCountMetricDefinition : 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(EventCountMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("event"u8); + writer.WriteObjectValue(Event, options); + } + + EventCountMetricDefinition 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(EventCountMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEventCountMetricDefinition(document.RootElement, options); + } + + internal static EventCountMetricDefinition DeserializeEventCountMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ObservedEvent @event = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("event"u8)) + { + @event = ObservedEvent.DeserializeObservedEvent(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EventCountMetricDefinition(type, serializedAdditionalRawData, @event); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(EventCountMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + EventCountMetricDefinition 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 DeserializeEventCountMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EventCountMetricDefinition)} 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 new EventCountMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEventCountMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.cs new file mode 100644 index 000000000000..d30854f98556 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventCountMetricDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of an EventCount metric definition. Counts the occurrences of a specified event. + public partial class EventCountMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// Event to observe. + /// is null. + public EventCountMetricDefinition(ObservedEvent @event) + { + Argument.AssertNotNull(@event, nameof(@event)); + + Type = ExperimentMetricType.EventCount; + Event = @event; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// Event to observe. + internal EventCountMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, ObservedEvent @event) : base(type, serializedAdditionalRawData) + { + Event = @event; + } + + /// Initializes a new instance of for deserialization. + internal EventCountMetricDefinition() + { + } + + /// Event to observe. + public ObservedEvent Event { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..b1769ac2470f --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class EventRateMetricDefinition : 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(EventRateMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("event"u8); + writer.WriteObjectValue(Event, options); + writer.WritePropertyName("rateCondition"u8); + writer.WriteStringValue(RateCondition); + } + + EventRateMetricDefinition 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(EventRateMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEventRateMetricDefinition(document.RootElement, options); + } + + internal static EventRateMetricDefinition DeserializeEventRateMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ObservedEvent @event = default; + string rateCondition = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("event"u8)) + { + @event = ObservedEvent.DeserializeObservedEvent(property.Value, options); + continue; + } + if (property.NameEquals("rateCondition"u8)) + { + rateCondition = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new EventRateMetricDefinition(type, serializedAdditionalRawData, @event, rateCondition); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(EventRateMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + EventRateMetricDefinition 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 DeserializeEventRateMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EventRateMetricDefinition)} 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 new EventRateMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEventRateMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.cs new file mode 100644 index 000000000000..1baa984314a2 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/EventRateMetricDefinition.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of an EventRate metric definition. Calculates the percentage of events satisfying a specified condition. + public partial class EventRateMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// Event to observe as the rate denominator. + /// The event contributes to the rate numerator if it satisfies this condition. + /// or is null. + public EventRateMetricDefinition(ObservedEvent @event, string rateCondition) + { + Argument.AssertNotNull(@event, nameof(@event)); + Argument.AssertNotNull(rateCondition, nameof(rateCondition)); + + Type = ExperimentMetricType.EventRate; + Event = @event; + RateCondition = rateCondition; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// Event to observe as the rate denominator. + /// The event contributes to the rate numerator if it satisfies this condition. + internal EventRateMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, ObservedEvent @event, string rateCondition) : base(type, serializedAdditionalRawData) + { + Event = @event; + RateCondition = rateCondition; + } + + /// Initializes a new instance of for deserialization. + internal EventRateMetricDefinition() + { + } + + /// Event to observe as the rate denominator. + public ObservedEvent Event { get; set; } + /// The event contributes to the rate numerator if it satisfies this condition. + public string RateCondition { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.Serialization.cs new file mode 100644 index 000000000000..36ca63951f1c --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.Serialization.cs @@ -0,0 +1,235 @@ +// Copyright (c) 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.Analytics.OnlineExperimentation +{ + public partial class ExperimentMetric : 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(ExperimentMetric)} does not support writing '{format}' format."); + } + + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + writer.WritePropertyName("lifecycle"u8); + writer.WriteStringValue(Lifecycle.ToString()); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("categories"u8); + writer.WriteStartArray(); + foreach (var item in Categories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("desiredDirection"u8); + writer.WriteStringValue(DesiredDirection.ToString()); + writer.WritePropertyName("definition"u8); + writer.WriteObjectValue(Definition, options); + if (options.Format != "W") + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.ToString()); + } + if (options.Format != "W") + { + writer.WritePropertyName("lastModifiedAt"u8); + writer.WriteStringValue(LastModifiedAt, "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 + } + } + } + + ExperimentMetric 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(ExperimentMetric)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExperimentMetric(document.RootElement, options); + } + + internal static ExperimentMetric DeserializeExperimentMetric(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + LifecycleStage lifecycle = default; + string displayName = default; + string description = default; + IList categories = default; + DesiredDirection desiredDirection = default; + ExperimentMetricDefinition definition = default; + ETag eTag = default; + DateTimeOffset lastModifiedAt = 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("lifecycle"u8)) + { + lifecycle = new LifecycleStage(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("categories"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + categories = array; + continue; + } + if (property.NameEquals("desiredDirection"u8)) + { + desiredDirection = new DesiredDirection(property.Value.GetString()); + continue; + } + if (property.NameEquals("definition"u8)) + { + definition = ExperimentMetricDefinition.DeserializeExperimentMetricDefinition(property.Value, options); + continue; + } + if (property.NameEquals("eTag"u8)) + { + eTag = new ETag(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastModifiedAt"u8)) + { + lastModifiedAt = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExperimentMetric( + id, + lifecycle, + displayName, + description, + categories, + desiredDirection, + definition, + eTag, + lastModifiedAt, + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(ExperimentMetric)} does not support writing '{options.Format}' format."); + } + } + + ExperimentMetric 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 DeserializeExperimentMetric(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExperimentMetric)} 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 ExperimentMetric FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExperimentMetric(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.cs new file mode 100644 index 000000000000..7f3497acd2a1 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetric.cs @@ -0,0 +1,133 @@ +// 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.Analytics.OnlineExperimentation +{ + /// Defines experiment metric metadata and computation details. + public partial class ExperimentMetric + { + /// + /// 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 . + /// Determines whether it is included in experiment analysis. + /// A user-friendly display name for the experiment metric shown in reports and dashboards. + /// A detailed description of the experiment metric. + /// Categories associated with the experiment metric. Used for organizing and filtering metrics. + /// The desired direction for changes in the metric value. + /// + /// The metric definition specifying how the metric value is calculated from event data. + /// 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 ExperimentMetric(LifecycleStage lifecycle, string displayName, string description, IEnumerable categories, DesiredDirection desiredDirection, ExperimentMetricDefinition definition) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(description, nameof(description)); + Argument.AssertNotNull(categories, nameof(categories)); + Argument.AssertNotNull(definition, nameof(definition)); + + Lifecycle = lifecycle; + DisplayName = displayName; + Description = description; + Categories = categories.ToList(); + DesiredDirection = desiredDirection; + Definition = definition; + } + + /// Initializes a new instance of . + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// Determines whether it is included in experiment analysis. + /// A user-friendly display name for the experiment metric shown in reports and dashboards. + /// A detailed description of the experiment metric. + /// Categories associated with the experiment metric. Used for organizing and filtering metrics. + /// The desired direction for changes in the metric value. + /// + /// The metric definition specifying how the metric value is calculated from event data. + /// 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 . + /// + /// ETag of the experiment metric. + /// The timestamp (UTC) of the last modification to the experiment metric resource. + /// Keeps track of any properties unknown to the library. + internal ExperimentMetric(string id, LifecycleStage lifecycle, string displayName, string description, IList categories, DesiredDirection desiredDirection, ExperimentMetricDefinition definition, ETag eTag, DateTimeOffset lastModifiedAt, IDictionary serializedAdditionalRawData) + { + Id = id; + Lifecycle = lifecycle; + DisplayName = displayName; + Description = description; + Categories = categories; + DesiredDirection = desiredDirection; + Definition = definition; + ETag = eTag; + LastModifiedAt = lastModifiedAt; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExperimentMetric() + { + } + + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + public string Id { get; } + /// Determines whether it is included in experiment analysis. + public LifecycleStage Lifecycle { get; set; } + /// A user-friendly display name for the experiment metric shown in reports and dashboards. + public string DisplayName { get; set; } + /// A detailed description of the experiment metric. + public string Description { get; set; } + /// Categories associated with the experiment metric. Used for organizing and filtering metrics. + public IList Categories { get; } + /// The desired direction for changes in the metric value. + public DesiredDirection DesiredDirection { get; set; } + /// + /// The metric definition specifying how the metric value is calculated from event data. + /// 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 ExperimentMetricDefinition Definition { get; set; } + /// ETag of the experiment metric. + public ETag ETag { get; } + /// The timestamp (UTC) of the last modification to the experiment metric resource. + public DateTimeOffset LastModifiedAt { get; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..fd2dc52b622e --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.Serialization.cs @@ -0,0 +1,139 @@ +// 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.Analytics.OnlineExperimentation +{ + [PersistableModelProxy(typeof(UnknownExperimentMetricDefinition))] + public partial class ExperimentMetricDefinition : 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(ExperimentMetricDefinition)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.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 + } + } + } + + ExperimentMetricDefinition 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(ExperimentMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExperimentMetricDefinition(document.RootElement, options); + } + + internal static ExperimentMetricDefinition DeserializeExperimentMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Average": return AverageMetricDefinition.DeserializeAverageMetricDefinition(element, options); + case "EventCount": return EventCountMetricDefinition.DeserializeEventCountMetricDefinition(element, options); + case "EventRate": return EventRateMetricDefinition.DeserializeEventRateMetricDefinition(element, options); + case "Percentile": return PercentileMetricDefinition.DeserializePercentileMetricDefinition(element, options); + case "Sum": return SumMetricDefinition.DeserializeSumMetricDefinition(element, options); + case "UserCount": return UserCountMetricDefinition.DeserializeUserCountMetricDefinition(element, options); + case "UserRate": return UserRateMetricDefinition.DeserializeUserRateMetricDefinition(element, options); + } + } + return UnknownExperimentMetricDefinition.DeserializeUnknownExperimentMetricDefinition(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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(ExperimentMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + ExperimentMetricDefinition 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 DeserializeExperimentMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExperimentMetricDefinition)} 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 ExperimentMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExperimentMetricDefinition(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.cs new file mode 100644 index 000000000000..93c715cdd260 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricDefinition.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.Analytics.OnlineExperimentation +{ + /// + /// The metric definition, which determines how the metric value is calculated from event data. + /// 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 abstract partial class ExperimentMetricDefinition + { + /// + /// 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 ExperimentMetricDefinition() + { + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + internal ExperimentMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData) + { + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Discriminator property for ExperimentMetricDefinition. + internal ExperimentMetricType Type { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricType.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricType.cs new file mode 100644 index 000000000000..a798f02778e9 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricType.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.Analytics.OnlineExperimentation +{ + /// How the metric definition calculates metric values from event data. + internal readonly partial struct ExperimentMetricType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExperimentMetricType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EventCountValue = "EventCount"; + private const string UserCountValue = "UserCount"; + private const string EventRateValue = "EventRate"; + private const string UserRateValue = "UserRate"; + private const string SumValue = "Sum"; + private const string AverageValue = "Average"; + private const string PercentileValue = "Percentile"; + + /// Counts the occurrences of an event. Experiment analysis accounts for unequal traffic allocation. + public static ExperimentMetricType EventCount { get; } = new ExperimentMetricType(EventCountValue); + /// Counts the number of unique users who encounter an event. Experiment analysis accounts for unequal traffic allocation. + public static ExperimentMetricType UserCount { get; } = new ExperimentMetricType(UserCountValue); + /// Calculates the percentage of events that satisfy a specified condition. + public static ExperimentMetricType EventRate { get; } = new ExperimentMetricType(EventRateValue); + /// Calculates the percentage of users who encounter a start event and subsequently encounter an end event. Users must encounter the start event before the end event to be counted. + public static ExperimentMetricType UserRate { get; } = new ExperimentMetricType(UserRateValue); + /// Calculates the sum of a specified event property. Experiment analysis accounts for unequal traffic allocation. + public static ExperimentMetricType Sum { get; } = new ExperimentMetricType(SumValue); + /// Calculates the average value of a specified event property. + public static ExperimentMetricType Average { get; } = new ExperimentMetricType(AverageValue); + /// Calculates a specified percentile of an event property. + public static ExperimentMetricType Percentile { get; } = new ExperimentMetricType(PercentileValue); + /// Determines if two values are the same. + public static bool operator ==(ExperimentMetricType left, ExperimentMetricType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExperimentMetricType left, ExperimentMetricType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExperimentMetricType(string value) => new ExperimentMetricType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExperimentMetricType other && Equals(other); + /// + public bool Equals(ExperimentMetricType 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.Serialization.cs new file mode 100644 index 000000000000..83ced579be90 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.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.Analytics.OnlineExperimentation +{ + public partial class ExperimentMetricValidationResult : 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(ExperimentMetricValidationResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("isValid"u8); + writer.WriteBooleanValue(IsValid); + if (options.Format != "W") + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteStartArray(); + foreach (var item in Diagnostics) + { + 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 + } + } + } + + ExperimentMetricValidationResult 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(ExperimentMetricValidationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExperimentMetricValidationResult(document.RootElement, options); + } + + internal static ExperimentMetricValidationResult DeserializeExperimentMetricValidationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool isValid = default; + IReadOnlyList diagnostics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isValid"u8)) + { + isValid = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("diagnostics"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DiagnosticDetail.DeserializeDiagnosticDetail(item, options)); + } + diagnostics = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExperimentMetricValidationResult(isValid, diagnostics, 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(ExperimentMetricValidationResult)} does not support writing '{options.Format}' format."); + } + } + + ExperimentMetricValidationResult 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 DeserializeExperimentMetricValidationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExperimentMetricValidationResult)} 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 ExperimentMetricValidationResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeExperimentMetricValidationResult(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.cs new file mode 100644 index 000000000000..799ea1df7c62 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ExperimentMetricValidationResult.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; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The result of validating an experiment metric. + public partial class ExperimentMetricValidationResult + { + /// + /// 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 . + /// Indicates whether the experiment metric is valid. + internal ExperimentMetricValidationResult(bool isValid) + { + IsValid = isValid; + Diagnostics = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Indicates whether the experiment metric is valid. + /// Diagnostic details from the validation process. + /// Keeps track of any properties unknown to the library. + internal ExperimentMetricValidationResult(bool isValid, IReadOnlyList diagnostics, IDictionary serializedAdditionalRawData) + { + IsValid = isValid; + Diagnostics = diagnostics; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExperimentMetricValidationResult() + { + } + + /// Indicates whether the experiment metric is valid. + public bool IsValid { get; } + /// Diagnostic details from the validation process. + public IReadOnlyList Diagnostics { get; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Argument.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..b6a0f18d3d7c --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/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.Analytics.OnlineExperimentation +{ + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..2faf429e0521 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/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.Analytics.OnlineExperimentation +{ + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ChangeTrackingList.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..9599d0cee8d3 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/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.Analytics.OnlineExperimentation +{ + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..a50e0d64c4d0 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,407 @@ +// Copyright (c) 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.Analytics.OnlineExperimentation +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Optional.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..cd1f6c9e1c75 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/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.Analytics.OnlineExperimentation +{ + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..2b2ea35805b8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/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.Analytics.OnlineExperimentation +{ + 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/LifecycleStage.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/LifecycleStage.cs new file mode 100644 index 000000000000..d7426b6e2a28 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/LifecycleStage.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.OnlineExperimentation +{ + /// Lifecycle stages of an experiment metric, determining whether the metric is included in experiment analysis. + public readonly partial struct LifecycleStage : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public LifecycleStage(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ActiveValue = "Active"; + private const string InactiveValue = "Inactive"; + + /// The metric is included in experiment analysis. + public static LifecycleStage Active { get; } = new LifecycleStage(ActiveValue); + /// The metric is excluded from experiment analysis but remains available for future use. + public static LifecycleStage Inactive { get; } = new LifecycleStage(InactiveValue); + /// Determines if two values are the same. + public static bool operator ==(LifecycleStage left, LifecycleStage right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(LifecycleStage left, LifecycleStage right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator LifecycleStage(string value) => new LifecycleStage(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is LifecycleStage other && Equals(other); + /// + public bool Equals(LifecycleStage 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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Models/AzureAnalyticsOnlineExperimentationContext.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Models/AzureAnalyticsOnlineExperimentationContext.cs new file mode 100644 index 000000000000..ec898b4ff03a --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/Models/AzureAnalyticsOnlineExperimentationContext.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// + /// 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' + /// + public partial class AzureAnalyticsOnlineExperimentationContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.Serialization.cs new file mode 100644 index 000000000000..976deed9d691 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.Serialization.cs @@ -0,0 +1,153 @@ +// Copyright (c) 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.Analytics.OnlineExperimentation +{ + public partial class ObservedEvent : 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(ObservedEvent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("eventName"u8); + writer.WriteStringValue(EventName); + if (Optional.IsDefined(Filter)) + { + writer.WritePropertyName("filter"u8); + writer.WriteStringValue(Filter); + } + 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 + } + } + } + + ObservedEvent 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(ObservedEvent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeObservedEvent(document.RootElement, options); + } + + internal static ObservedEvent DeserializeObservedEvent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string eventName = default; + string filter = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("eventName"u8)) + { + eventName = property.Value.GetString(); + continue; + } + if (property.NameEquals("filter"u8)) + { + filter = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ObservedEvent(eventName, filter, 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(ObservedEvent)} does not support writing '{options.Format}' format."); + } + } + + ObservedEvent 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 DeserializeObservedEvent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ObservedEvent)} 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 ObservedEvent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeObservedEvent(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/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.cs new file mode 100644 index 000000000000..e8cfe8b39094 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/ObservedEvent.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.Analytics.OnlineExperimentation +{ + /// An event observed by a metric. + public partial class ObservedEvent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the event. + /// is null. + public ObservedEvent(string eventName) + { + Argument.AssertNotNull(eventName, nameof(eventName)); + + EventName = eventName; + } + + /// Initializes a new instance of . + /// The name of the event. + /// [Optional] A condition to filter events. + /// Keeps track of any properties unknown to the library. + internal ObservedEvent(string eventName, string filter, IDictionary serializedAdditionalRawData) + { + EventName = eventName; + Filter = filter; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ObservedEvent() + { + } + + /// The name of the event. + public string EventName { get; set; } + /// [Optional] A condition to filter events. + public string Filter { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClient.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClient.cs new file mode 100644 index 000000000000..41b26a7438fb --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClient.cs @@ -0,0 +1,654 @@ +// 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; + +namespace Azure.Analytics.OnlineExperimentation +{ + // Data plane generated client. + /// The OnlineExperimentation service client. + public partial class OnlineExperimentationClient + { + private static readonly string[] AuthorizationScopes = new string[] { "https://exp.azure.net/.default" }; + private readonly TokenCredential _tokenCredential; + 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 OnlineExperimentationClient for mocking. + protected OnlineExperimentationClient() + { + } + + /// Initializes a new instance of OnlineExperimentationClient. + /// Endpoint URL for the Online Experimentation workspace. + /// A credential used to authenticate to an Azure Service. + /// or is null. + public OnlineExperimentationClient(Uri endpoint, TokenCredential credential) : this(endpoint, credential, new OnlineExperimentationClientOptions()) + { + } + + /// Initializes a new instance of OnlineExperimentationClient. + /// Endpoint URL for the Online Experimentation workspace. + /// A credential used to authenticate to an Azure Service. + /// The options for configuring the client. + /// or is null. + public OnlineExperimentationClient(Uri endpoint, TokenCredential credential, OnlineExperimentationClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + Argument.AssertNotNull(credential, nameof(credential)); + options ??= new OnlineExperimentationClientOptions(); + + ClientDiagnostics = new ClientDiagnostics(options, true); + _tokenCredential = credential; + _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier()); + _endpoint = endpoint; + _apiVersion = options.Version; + } + + /// Fetches an experiment metric by ID. + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual async Task> GetMetricAsync(string experimentMetricId, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await GetMetricAsync(experimentMetricId, requestConditions, context).ConfigureAwait(false); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// Fetches an experiment metric by ID. + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// + public virtual Response GetMetric(string experimentMetricId, RequestConditions requestConditions = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + RequestContext context = FromCancellationToken(cancellationToken); + Response response = GetMetric(experimentMetricId, requestConditions, context); + return Response.FromValue(ExperimentMetric.FromResponse(response), response); + } + + /// + /// [Protocol Method] Fetches an experiment metric by ID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// 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 GetMetricAsync(string experimentMetricId, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.GetMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateGetMetricRequest(experimentMetricId, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Fetches an experiment metric by ID. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// 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 GetMetric(string experimentMetricId, RequestConditions requestConditions, RequestContext context) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.GetMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateGetMetricRequest(experimentMetricId, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates or updates an experiment metric. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the body of the request. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or 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 CreateOrUpdateMetricAsync(string experimentMetricId, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.CreateOrUpdateMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateMetricRequest(experimentMetricId, content, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Creates or updates an experiment metric. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the body of the request. + /// The content to send as the request conditions of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// or 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 CreateOrUpdateMetric(string experimentMetricId, RequestContent content, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.CreateOrUpdateMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateCreateOrUpdateMetricRequest(experimentMetricId, content, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Validates an experiment metric definition. + /// Experiment metric input to validate. + /// The cancellation token to use. + /// is null. + /// + public virtual async Task> ValidateMetricAsync(ExperimentMetric body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = await ValidateMetricAsync(content, context).ConfigureAwait(false); + return Response.FromValue(ExperimentMetricValidationResult.FromResponse(response), response); + } + + /// Validates an experiment metric definition. + /// Experiment metric input to validate. + /// The cancellation token to use. + /// is null. + /// + public virtual Response ValidateMetric(ExperimentMetric body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using RequestContent content = body.ToRequestContent(); + RequestContext context = FromCancellationToken(cancellationToken); + Response response = ValidateMetric(content, context); + return Response.FromValue(ExperimentMetricValidationResult.FromResponse(response), response); + } + + /// + /// [Protocol Method] Validates an experiment metric definition. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual async Task ValidateMetricAsync(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.ValidateMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateValidateMetricRequest(content, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// [Protocol Method] Validates an experiment metric definition. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The content to send as the body of the request. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// is null. + /// Service returned a non-success status code. + /// The response returned from the service. + /// + public virtual Response ValidateMetric(RequestContent content, RequestContext context = null) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.ValidateMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateValidateMetricRequest(content, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an experiment metric. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// 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 DeleteMetricAsync(string experimentMetricId, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.DeleteMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteMetricRequest(experimentMetricId, requestConditions, context); + return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + // The convenience method is omitted here because it has exactly the same parameter list as the corresponding protocol method + /// + /// [Protocol Method] Deletes an experiment metric. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Identifier for this experiment metric. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores. + /// The content to send as the request conditions of the request. + /// 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 DeleteMetric(string experimentMetricId, RequestConditions requestConditions = null, RequestContext context = null) + { + Argument.AssertNotNullOrEmpty(experimentMetricId, nameof(experimentMetricId)); + + using var scope = ClientDiagnostics.CreateScope("OnlineExperimentationClient.DeleteMetric"); + scope.Start(); + try + { + using HttpMessage message = CreateDeleteMetricRequest(experimentMetricId, requestConditions, context); + return _pipeline.ProcessMessage(message, context); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// Lists experiment metrics. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual AsyncPageable GetMetricsAsync(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ExperimentMetric.DeserializeExperimentMetric(e), ClientDiagnostics, _pipeline, "OnlineExperimentationClient.GetMetrics", "value", "nextLink", maxpagesize, context); + } + + /// Lists experiment metrics. + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The cancellation token to use. + /// + public virtual Pageable GetMetrics(int? maxCount = null, int? skip = null, int? maxpagesize = null, CancellationToken cancellationToken = default) + { + RequestContext context = cancellationToken.CanBeCanceled ? new RequestContext { CancellationToken = cancellationToken } : null; + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ExperimentMetric.DeserializeExperimentMetric(e), ClientDiagnostics, _pipeline, "OnlineExperimentationClient.GetMetrics", "value", "nextLink", maxpagesize, context); + } + + /// + /// [Protocol Method] Lists experiment metrics. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual AsyncPageable GetMetricsAsync(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "OnlineExperimentationClient.GetMetrics", "value", "nextLink", maxpagesize, context); + } + + /// + /// [Protocol Method] Lists experiment metrics. + /// + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// Please try the simpler convenience overload with strongly typed models first. + /// + /// + /// + /// + /// The number of result items to return. + /// The number of result items to skip. + /// The maximum number of result items per page. + /// The request context, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. + /// + public virtual Pageable GetMetrics(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetMetricsRequest(maxCount, skip, pageSizeHint, context); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetMetricsNextPageRequest(nextLink, maxCount, skip, pageSizeHint, context); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "OnlineExperimentationClient.GetMetrics", "value", "nextLink", maxpagesize, context); + } + + internal HttpMessage CreateGetMetricRequest(string experimentMetricId, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/experiment-metrics/", false); + uri.AppendPath(experimentMetricId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateCreateOrUpdateMetricRequest(string experimentMetricId, RequestContent content, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200201); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/experiment-metrics/", false); + uri.AppendPath(experimentMetricId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + request.Headers.Add("Content-Type", "application/merge-patch+json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateValidateMetricRequest(RequestContent content, 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("/experiment-metrics:validate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + request.Content = content; + return message; + } + + internal HttpMessage CreateDeleteMetricRequest(string experimentMetricId, RequestConditions requestConditions, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier204); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/experiment-metrics/", false); + uri.AppendPath(experimentMetricId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + if (requestConditions != null) + { + request.Headers.Add(requestConditions, "R"); + } + return message; + } + + internal HttpMessage CreateGetMetricsRequest(int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/experiment-metrics", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (maxCount != null) + { + uri.AppendQuery("top", maxCount.Value, true); + } + if (skip != null) + { + uri.AppendQuery("skip", skip.Value, true); + } + if (maxpagesize != null) + { + uri.AppendQuery("maxpagesize", maxpagesize.Value, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + return message; + } + + internal HttpMessage CreateGetMetricsNextPageRequest(string nextLink, int? maxCount, int? skip, int? maxpagesize, RequestContext context) + { + var message = _pipeline.CreateMessage(context, ResponseClassifier200); + 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"); + return message; + } + + private static RequestContext DefaultRequestContext = new RequestContext(); + internal static RequestContext FromCancellationToken(CancellationToken cancellationToken = default) + { + if (!cancellationToken.CanBeCanceled) + { + return DefaultRequestContext; + } + + return new RequestContext() { CancellationToken = cancellationToken }; + } + + private static ResponseClassifier _responseClassifier200; + private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); + private static ResponseClassifier _responseClassifier200201; + private static ResponseClassifier ResponseClassifier200201 => _responseClassifier200201 ??= new StatusCodeClassifier(stackalloc ushort[] { 200, 201 }); + private static ResponseClassifier _responseClassifier204; + private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClientOptions.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClientOptions.cs new file mode 100644 index 000000000000..f2722e3ac3b4 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/OnlineExperimentationClientOptions.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// Client options for OnlineExperimentationClient. + public partial class OnlineExperimentationClientOptions : ClientOptions + { + private const ServiceVersion LatestVersion = ServiceVersion.V2025_05_31_Preview; + + /// The version of the service to use. + public enum ServiceVersion + { + /// Service version "2025-05-31-preview". + V2025_05_31_Preview = 1, + } + + internal string Version { get; } + + /// Initializes new instance of OnlineExperimentationClientOptions. + public OnlineExperimentationClientOptions(ServiceVersion version = LatestVersion) + { + Version = version switch + { + ServiceVersion.V2025_05_31_Preview => "2025-05-31-preview", + _ => throw new NotSupportedException() + }; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..dc6c511bbb60 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class PercentileMetricDefinition : 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(PercentileMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("value"u8); + writer.WriteObjectValue(Value, options); + writer.WritePropertyName("percentile"u8); + writer.WriteNumberValue(Percentile); + } + + PercentileMetricDefinition 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(PercentileMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePercentileMetricDefinition(document.RootElement, options); + } + + internal static PercentileMetricDefinition DeserializePercentileMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AggregatedValue value = default; + double percentile = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = AggregatedValue.DeserializeAggregatedValue(property.Value, options); + continue; + } + if (property.NameEquals("percentile"u8)) + { + percentile = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PercentileMetricDefinition(type, serializedAdditionalRawData, value, percentile); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(PercentileMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + PercentileMetricDefinition 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 DeserializePercentileMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PercentileMetricDefinition)} 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 new PercentileMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializePercentileMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.cs new file mode 100644 index 000000000000..d6d680dd8429 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/PercentileMetricDefinition.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of a Percentile metric definition. Calculates a specified percentile of an event property. + public partial class PercentileMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// The value to aggregate, including the event name and property to measure. + /// The percentile to measure. + /// is null. + public PercentileMetricDefinition(AggregatedValue value, double percentile) + { + Argument.AssertNotNull(value, nameof(value)); + + Type = ExperimentMetricType.Percentile; + Value = value; + Percentile = percentile; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// The value to aggregate, including the event name and property to measure. + /// The percentile to measure. + internal PercentileMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, AggregatedValue value, double percentile) : base(type, serializedAdditionalRawData) + { + Value = value; + Percentile = percentile; + } + + /// Initializes a new instance of for deserialization. + internal PercentileMetricDefinition() + { + } + + /// The value to aggregate, including the event name and property to measure. + public AggregatedValue Value { get; set; } + /// The percentile to measure. + public double Percentile { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..59f25ab12475 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class SumMetricDefinition : 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(SumMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("value"u8); + writer.WriteObjectValue(Value, options); + } + + SumMetricDefinition 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(SumMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSumMetricDefinition(document.RootElement, options); + } + + internal static SumMetricDefinition DeserializeSumMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AggregatedValue value = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = AggregatedValue.DeserializeAggregatedValue(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SumMetricDefinition(type, serializedAdditionalRawData, value); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(SumMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + SumMetricDefinition 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 DeserializeSumMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SumMetricDefinition)} 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 new SumMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSumMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.cs new file mode 100644 index 000000000000..ffe5291130ae --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/SumMetricDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of a Sum metric definition. Calculates the sum of a specified event property. Experiment analysis accounts for unequal traffic allocation. + public partial class SumMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// The value to aggregate. + /// is null. + public SumMetricDefinition(AggregatedValue value) + { + Argument.AssertNotNull(value, nameof(value)); + + Type = ExperimentMetricType.Sum; + Value = value; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// The value to aggregate. + internal SumMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, AggregatedValue value) : base(type, serializedAdditionalRawData) + { + Value = value; + } + + /// Initializes a new instance of for deserialization. + internal SumMetricDefinition() + { + } + + /// The value to aggregate. + public AggregatedValue Value { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..2f039a4ab2d6 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.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.Analytics.OnlineExperimentation +{ + internal partial class UnknownExperimentMetricDefinition : 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(ExperimentMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + ExperimentMetricDefinition 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(ExperimentMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExperimentMetricDefinition(document.RootElement, options); + } + + internal static UnknownExperimentMetricDefinition DeserializeUnknownExperimentMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExperimentMetricType type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownExperimentMetricDefinition(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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(ExperimentMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + ExperimentMetricDefinition 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 DeserializeExperimentMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExperimentMetricDefinition)} 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 new UnknownExperimentMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownExperimentMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.cs new file mode 100644 index 000000000000..ac95dd649fd1 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UnknownExperimentMetricDefinition.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// Unknown version of ExperimentMetricDefinition. + internal partial class UnknownExperimentMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + internal UnknownExperimentMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + } + + /// Initializes a new instance of for deserialization. + internal UnknownExperimentMetricDefinition() + { + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..198ba83aa97b --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class UserCountMetricDefinition : 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(UserCountMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("event"u8); + writer.WriteObjectValue(Event, options); + } + + UserCountMetricDefinition 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(UserCountMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserCountMetricDefinition(document.RootElement, options); + } + + internal static UserCountMetricDefinition DeserializeUserCountMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ObservedEvent @event = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("event"u8)) + { + @event = ObservedEvent.DeserializeObservedEvent(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserCountMetricDefinition(type, serializedAdditionalRawData, @event); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(UserCountMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + UserCountMetricDefinition 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 DeserializeUserCountMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserCountMetricDefinition)} 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 new UserCountMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUserCountMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.cs new file mode 100644 index 000000000000..090c38a10ad4 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserCountMetricDefinition.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of a UserCount metric definition. Counts unique users who encounter a specified event. + public partial class UserCountMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// Event to observe. + /// is null. + public UserCountMetricDefinition(ObservedEvent @event) + { + Argument.AssertNotNull(@event, nameof(@event)); + + Type = ExperimentMetricType.UserCount; + Event = @event; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// Event to observe. + internal UserCountMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, ObservedEvent @event) : base(type, serializedAdditionalRawData) + { + Event = @event; + } + + /// Initializes a new instance of for deserialization. + internal UserCountMetricDefinition() + { + } + + /// Event to observe. + public ObservedEvent Event { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.Serialization.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.Serialization.cs new file mode 100644 index 000000000000..3bbe061bd6fe --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.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.Analytics.OnlineExperimentation +{ + public partial class UserRateMetricDefinition : 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(UserRateMetricDefinition)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("startEvent"u8); + writer.WriteObjectValue(StartEvent, options); + writer.WritePropertyName("endEvent"u8); + writer.WriteObjectValue(EndEvent, options); + } + + UserRateMetricDefinition 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(UserRateMetricDefinition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeUserRateMetricDefinition(document.RootElement, options); + } + + internal static UserRateMetricDefinition DeserializeUserRateMetricDefinition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ObservedEvent startEvent = default; + ObservedEvent endEvent = default; + ExperimentMetricType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startEvent"u8)) + { + startEvent = ObservedEvent.DeserializeObservedEvent(property.Value, options); + continue; + } + if (property.NameEquals("endEvent"u8)) + { + endEvent = ObservedEvent.DeserializeObservedEvent(property.Value, options); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ExperimentMetricType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UserRateMetricDefinition(type, serializedAdditionalRawData, startEvent, endEvent); + } + + 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, AzureAnalyticsOnlineExperimentationContext.Default); + default: + throw new FormatException($"The model {nameof(UserRateMetricDefinition)} does not support writing '{options.Format}' format."); + } + } + + UserRateMetricDefinition 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 DeserializeUserRateMetricDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(UserRateMetricDefinition)} 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 new UserRateMetricDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUserRateMetricDefinition(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.cs new file mode 100644 index 000000000000..4f4b3fe0e116 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Generated/UserRateMetricDefinition.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Analytics.OnlineExperimentation +{ + /// The definition of a UserRate metric definition. Calculates the percentage of users who encounter a start event and subsequently an end event. Users must encounter events in the specified order. + public partial class UserRateMetricDefinition : ExperimentMetricDefinition + { + /// Initializes a new instance of . + /// The start event to observe as the rate denominator. + /// The end event to observe, which is a condition for the rate numerator. + /// or is null. + public UserRateMetricDefinition(ObservedEvent startEvent, ObservedEvent endEvent) + { + Argument.AssertNotNull(startEvent, nameof(startEvent)); + Argument.AssertNotNull(endEvent, nameof(endEvent)); + + Type = ExperimentMetricType.UserRate; + StartEvent = startEvent; + EndEvent = endEvent; + } + + /// Initializes a new instance of . + /// Discriminator property for ExperimentMetricDefinition. + /// Keeps track of any properties unknown to the library. + /// The start event to observe as the rate denominator. + /// The end event to observe, which is a condition for the rate numerator. + internal UserRateMetricDefinition(ExperimentMetricType type, IDictionary serializedAdditionalRawData, ObservedEvent startEvent, ObservedEvent endEvent) : base(type, serializedAdditionalRawData) + { + StartEvent = startEvent; + EndEvent = endEvent; + } + + /// Initializes a new instance of for deserialization. + internal UserRateMetricDefinition() + { + } + + /// The start event to observe as the rate denominator. + public ObservedEvent StartEvent { get; set; } + /// The end event to observe, which is a condition for the rate numerator. + public ObservedEvent EndEvent { get; set; } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/GlobalSuppressions.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/GlobalSuppressions.cs new file mode 100644 index 000000000000..9706db7430a3 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/GlobalSuppressions.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Diagnostics.CodeAnalysis; + +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.AverageMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.EventCountMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.EventRateMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.SumMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.PercentileMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.UserCountMetricDefinition")] +[assembly: SuppressMessage("Naming", "AZC0031:Improper model name suffix", Justification = "Names approved by SDK review board.", Scope = "type", Target = "~T:Azure.Analytics.OnlineExperimentation.UserRateMetricDefinition")] diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Properties/AssemblyInfo.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..27234535d0c9 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/src/Properties/AssemblyInfo.cs @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Azure.Analytics.OnlineExperimentation.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +[assembly: Azure.Core.AzureResourceProviderNamespace("Microsoft.OnlineExperimentation")] diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Azure.Analytics.OnlineExperimentation.Tests.csproj b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Azure.Analytics.OnlineExperimentation.Tests.csproj new file mode 100644 index 000000000000..aadd659f2f43 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Azure.Analytics.OnlineExperimentation.Tests.csproj @@ -0,0 +1,21 @@ + + + $(RequiredTargetFrameworks) + + $(NoWarn);CS1591 + + + + + + + + + + + + + + + + diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/ExperimentMetricUpdateSerializationTests.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/ExperimentMetricUpdateSerializationTests.cs new file mode 100644 index 000000000000..17f37796c764 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/ExperimentMetricUpdateSerializationTests.cs @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Text.Json; + +using FluentAssertions; + +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Tests +{ + [TestFixture] + public class ExperimentMetricUpdateSerializationTests + { + [Test] + public void AllProperties() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Lifecycle = LifecycleStage.Inactive, + DisplayName = "Serialization Test", + Description = "Serialization Test Description", + Categories = { "Test", "Serialization" }, + DesiredDirection = DesiredDirection.Increase, + Definition = new UserRateMetricDefinition("startEventName", "endEventName") + { + StartEvent = { Filter = "startEventFilter" }, + EndEvent = { Filter = "endEventFilter" } + } + }); + } + + [Test] + public void NoProperties() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate()); + } + + [Test] + public void UpdateLifecycleStage() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Lifecycle = LifecycleStage.Inactive + }); + } + + [Test] + public void UpdateDisplayFields() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + DisplayName = "Updated Display Name", + Description = "Updated Description" + }); + } + + [Test] + public void SetCategories() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Categories = { "NewCategory" } + }); + } + + [Test] + public void CategoriesOmittedByDefault() + { + var update = new ExperimentMetricUpdate { DisplayName = "something" }; + Assert.That(update.Categories, Is.Not.Null); + Assert.That(update.Categories, Is.Empty); + + TestSerializationRoundtrip(update); + } + + [Test] + public void SetCategoriesEmpty() + { + var update = new ExperimentMetricUpdate { DisplayName = "something" }; + update.Categories.Clear(); // initializes internal state causing the property to be emitted. + + TestSerializationRoundtrip(update); + } + + [Test] + public void SetEventCountMetricDefinition() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Definition = new EventCountMetricDefinition("eventName") + }); + } + + [Test] + public void SetEventCountMetricDefinitionWithFilter() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Definition = new EventCountMetricDefinition("eventName") + { + Event = { Filter = "eventFilter" } + } + }); + } + + [Test] + public void SetAverageMetricDefinition() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Definition = new AverageMetricDefinition("eventName", "eventProperty") + }); + } + + [Test] + public void SetAverageMetricDefinitionWithFilter() + { + TestSerializationRoundtrip(new ExperimentMetricUpdate + { + Definition = new AverageMetricDefinition("eventName", "eventProperty") + { + Value = { Filter = "eventFilter" } + } + }); + } + + private static void TestSerializationRoundtrip(ExperimentMetricUpdate original) + { + using var requestContent = original.ToRequestContent(); + + using var buffer = new MemoryStream(); + requestContent.WriteTo(buffer, cancellation: default); + + buffer.Position = 0; // rewind stream for reading + + // Deserialization matches ExperimentMetric.FromResponse() + using var document = JsonDocument.Parse(buffer, ModelSerializationExtensions.JsonDocumentOptions); + var deserialized = ExperimentMetric.DeserializeExperimentMetric(document.RootElement); + + // _serializedAdditionalRawData is originally null, Deserialize*() methods set it empty dictionary. + deserialized.Should().BeEquivalentTo( + original, + c => c.Excluding(m => m.Categories) + .Excluding(m => m.SelectedMemberPath.EndsWith("._serializedAdditionalRawData"))); + + var originalCategories = original.Categories.Should().BeOfType>().Which; + var categoriesEmitted = document.RootElement.TryGetProperty("categories", out var categoriesElement); + if (originalCategories.IsUndefined) + { + Assert.IsFalse(categoriesEmitted); + } + else + { + Assert.IsTrue(categoriesEmitted); + Assert.AreEqual(JsonValueKind.Array, categoriesElement.ValueKind); + Assert.AreEqual(originalCategories.Count, categoriesElement.GetArrayLength()); + for (int i = 0; i < originalCategories.Count; i++) + { + Assert.AreEqual(originalCategories[i], categoriesElement[i].GetString()); + } + } + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Generated/Samples/Samples_OnlineExperimentationClient.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Generated/Samples/Samples_OnlineExperimentationClient.cs new file mode 100644 index 000000000000..f9ec215f26b6 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Generated/Samples/Samples_OnlineExperimentationClient.cs @@ -0,0 +1,906 @@ +// 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.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class Samples_OnlineExperimentationClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_GetMetric_GetMetric() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = client.GetMetric("events_purchase_creditcard", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_GetMetric_GetMetric_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = await client.GetMetricAsync("events_purchase_creditcard", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_GetMetric_GetMetric_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = client.GetMetric("events_purchase_creditcard"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_GetMetric_GetMetric_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = await client.GetMetricAsync("events_purchase_creditcard"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricAverage() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue > 0", + }, + }, + }); + Response response = client.CreateOrUpdateMetric("avg_purchase_revenue", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricAverage_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue > 0", + }, + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("avg_purchase_revenue", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricEventCount() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Number of purchases (credit card)", + description = "The number of purchase transactions made with credit card. Refund transactions are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "EventCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0 and ['payment.method'] == 'credit_card'", + } + }, + }); + Response response = client.CreateOrUpdateMetric("events_purchase_creditcard", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricEventCount_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Number of purchases (credit card)", + description = "The number of purchase transactions made with credit card. Refund transactions are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "EventCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0 and ['payment.method'] == 'credit_card'", + } + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("events_purchase_creditcard", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricEventRate() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Refund rate", + description = "The percentage of transactions that are refunds. This metric is calculated as the number of refund transactions divided by the total number of transactions.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Neutral", + definition = new Dictionary + { + ["type"] = "EventRate", + ["event"] = new + { + eventName = "Transaction", + }, + ["rateCondition"] = "Revenue < 0" + }, + }); + Response response = client.CreateOrUpdateMetric("rate_refund", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricEventRate_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Refund rate", + description = "The percentage of transactions that are refunds. This metric is calculated as the number of refund transactions divided by the total number of transactions.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Neutral", + definition = new Dictionary + { + ["type"] = "EventRate", + ["event"] = new + { + eventName = "Transaction", + }, + ["rateCondition"] = "Revenue < 0" + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("rate_refund", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricPercentile() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "95th percentile of page load time [ms]", + description = "The 95th percentile of the page load time for all pages. Measured in milliseconds. Review page-specific metric results to identify pages that need optimization.", + lifecycle = "Active", + categories = new object[] + { +"Performance", +"Important" + }, + desiredDirection = "Decrease", + definition = new + { + type = "Percentile", + value = new + { + eventName = "PageLoad", + eventProperty = "LoadTime_ms", + }, + percentile = 95, + }, + }); + Response response = client.CreateOrUpdateMetric("p95_page_load_time", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricPercentile_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "95th percentile of page load time [ms]", + description = "The 95th percentile of the page load time for all pages. Measured in milliseconds. Review page-specific metric results to identify pages that need optimization.", + lifecycle = "Active", + categories = new object[] + { +"Performance", +"Important" + }, + desiredDirection = "Decrease", + definition = new + { + type = "Percentile", + value = new + { + eventName = "PageLoad", + eventProperty = "LoadTime_ms", + }, + percentile = 95, + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("p95_page_load_time", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricSum() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Total revenue [USD]", + description = "The total revenue in USD. Refund transactions contribute negatively to this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization", +"Important" + }, + desiredDirection = "Increase", + definition = new + { + type = "Sum", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + }, + }, + }); + Response response = client.CreateOrUpdateMetric("sum_revenue", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricSum_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Total revenue [USD]", + description = "The total revenue in USD. Refund transactions contribute negatively to this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization", +"Important" + }, + desiredDirection = "Increase", + definition = new + { + type = "Sum", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + }, + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("sum_revenue", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricUserCount() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Users with purchase", + description = "The number of users who have made at least one purchase transaction. Refund transactions are excluded from this metric. As the analysis period grows, this metric begins to saturate as users making multiple purchases no longer contribute.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "UserCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0", + } + }, + }); + Response response = client.CreateOrUpdateMetric("users_purchase", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricUserCount_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Users with purchase", + description = "The number of users who have made at least one purchase transaction. Refund transactions are excluded from this metric. As the analysis period grows, this metric begins to saturate as users making multiple purchases no longer contribute.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new Dictionary + { + ["type"] = "UserCount", + ["event"] = new + { + eventName = "Transaction", + filter = "Revenue > 0", + } + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("users_purchase", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricUserRate() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Subscription ad conversion rate", + description = "The percentage of users who saw an advertisement for a subscription promotion and then later successfully subscribed. This metric is calculated as the number of users who successfully subscribed after seeing the advert divided by the total number of users who saw the advert. Users who saw multiple adverts or subscribed multiple times are counted only once. Users who saw the advert before the analysis period starts are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "UserRate", + startEvent = new + { + eventName = "AdView", + filter = "Source == 'subscription_promo'", + }, + endEvent = new + { + eventName = "Subscribe", + filter = "Status == 'Success'", + }, + }, + }); + Response response = client.CreateOrUpdateMetric("rate_subscription_ad", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_CreateOrUpdateMetric_CreateOrUpdateMetricUserRate_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Subscription ad conversion rate", + description = "The percentage of users who saw an advertisement for a subscription promotion and then later successfully subscribed. This metric is calculated as the number of users who successfully subscribed after seeing the advert divided by the total number of users who saw the advert. Users who saw multiple adverts or subscribed multiple times are counted only once. Users who saw the advert before the analysis period starts are excluded from this metric.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "UserRate", + startEvent = new + { + eventName = "AdView", + filter = "Source == 'subscription_promo'", + }, + endEvent = new + { + eventName = "Subscribe", + filter = "Status == 'Success'", + }, + }, + }); + Response response = await client.CreateOrUpdateMetricAsync("rate_subscription_ad", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_OnlineExperimentation_ValidateMetric_ValidateMetric() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue >", + }, + }, + }); + Response response = client.ValidateMetric(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("isValid").ToString()); + Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_OnlineExperimentation_ValidateMetric_ValidateMetric_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + displayName = "Average revenue per purchase [USD]", + description = "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + lifecycle = "Active", + categories = new object[] + { +"Monetization" + }, + desiredDirection = "Increase", + definition = new + { + type = "Average", + value = new + { + eventName = "Transaction", + eventProperty = "Revenue", + filter = "Revenue >", + }, + }, + }); + Response response = await client.ValidateMetricAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("isValid").ToString()); + Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("diagnostics")[0].GetProperty("code").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_OnlineExperimentation_ValidateMetric_ValidateMetric_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + ExperimentMetric body = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase [USD]", + "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + new string[] { "Monetization" }, + DesiredDirection.Increase, + new AverageMetricDefinition(new AggregatedValue("Transaction", "Revenue") + { + Filter = "Revenue >", + })); + Response response = client.ValidateMetric(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_OnlineExperimentation_ValidateMetric_ValidateMetric_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + ExperimentMetric body = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase [USD]", + "The average revenue per purchase transaction in USD. Refund transactions are excluded from this metric. The total revenue might increase while this metric decreases if the number of purchases increases.", + new string[] { "Monetization" }, + DesiredDirection.Increase, + new AverageMetricDefinition(new AggregatedValue("Transaction", "Revenue") + { + Filter = "Revenue >", + })); + Response response = await client.ValidateMetricAsync(body); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_DeleteMetric_DeleteMetric() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = client.DeleteMetric("avg_purchase_revenue"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_DeleteMetric_DeleteMetric_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + Response response = await client.DeleteMetricAsync("avg_purchase_revenue"); + + Console.WriteLine(response.Status); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_GetMetrics_ListMetrics() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + foreach (BinaryData item in client.GetMetrics(null, 15, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_GetMetrics_ListMetrics_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetMetricsAsync(null, 15, null, null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("lifecycle").ToString()); + Console.WriteLine(result.GetProperty("displayName").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("categories")[0].ToString()); + Console.WriteLine(result.GetProperty("desiredDirection").ToString()); + Console.WriteLine(result.GetProperty("definition").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("eTag").ToString()); + Console.WriteLine(result.GetProperty("lastModifiedAt").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_ExperimentMetric_GetMetrics_ListMetrics_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + foreach (ExperimentMetric item in client.GetMetrics()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_ExperimentMetric_GetMetrics_ListMetrics_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + OnlineExperimentationClient client = new OnlineExperimentationClient(endpoint, credential); + + await foreach (ExperimentMetric item in client.GetMetricsAsync()) + { + } + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTestEnvironment.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTestEnvironment.cs new file mode 100644 index 000000000000..ef1498c18757 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTestEnvironment.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.Analytics.OnlineExperimentation.Tests +{ + public class OnlineExperimentationClientTestEnvironment : TestEnvironment + { + public string Endpoint => GetRecordedVariable("ENDPOINT"); + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTests.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTests.cs new file mode 100644 index 000000000000..27c840da04c7 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/OnlineExperimentationClientTests.cs @@ -0,0 +1,489 @@ +// 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 Microsoft.AspNetCore.Http; + +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Tests +{ + public class OnlineExperimentationClientTests : RecordedTestBase + { + private OnlineExperimentationClient _client; + + public OnlineExperimentationClientTests(bool isAsync) : base(isAsync) + { + } + + [SetUp] + public void Setup() + { + var testEndpoint = new Uri(TestEnvironment.Endpoint); + OnlineExperimentationClientOptions testClientOptions = InstrumentClientOptions(new OnlineExperimentationClientOptions()); + var testClient = new OnlineExperimentationClient(testEndpoint, TestEnvironment.Credential, testClientOptions); + _client = InstrumentClient(testClient); + } + + [RecordedTest] + public async Task CreateExperimentMetric() + { + string metricId = base.Recording.GenerateId("test_metric_create", 10); + + await _client.DeleteMetricAsync(metricId); // make sure it doesn't exist + + var metricDefinition = new ExperimentMetric( + LifecycleStage.Active, + "New Test Metric", + "A metric created for testing purposes", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent")); + + Response response = await _client.CreateMetricAsync(metricId, metricDefinition); + + Assert.That(response, Is.Not.Null); + Assert.That(response.Value, Is.Not.Null); + Assert.That(response.Value.Id, Is.EqualTo(metricId)); + Assert.That(response.Value.DisplayName, Is.EqualTo(metricDefinition.DisplayName)); + Assert.That(response.Value.Description, Is.EqualTo(metricDefinition.Description)); + } + + [RecordedTest] + public async Task CreateExperimentMetricOnlyIfNotExists() + { + string metricId = "test_metric_create_if_not_exists"; + + try + { + await _client.DeleteMetricAsync(metricId); // make sure it doesn't exist + } + catch (RequestFailedException deleteException) + { + Assert.That(deleteException.Status, Is.EqualTo(StatusCodes.Status404NotFound)); + } + + var metricDefinition = new ExperimentMetric( + LifecycleStage.Active, + "If-None-Match Test Metric", + "A metric created with If-None-Match header", + ["Test", "Conditional"], + DesiredDirection.Increase, + new EventCountMetricDefinition("ConditionalCreateEvent")); + + Response response = await _client.CreateMetricAsync(metricId, metricDefinition); + + Assert.That(response, Is.Not.Null); + Assert.That(response.Value, Is.Not.Null); + Assert.That(response.Value.Id, Is.EqualTo(metricId)); + Assert.That(response.Value.DisplayName, Is.EqualTo(metricDefinition.DisplayName)); + + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.CreateMetricAsync(metricId, metricDefinition); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status412PreconditionFailed)); + } + + [RecordedTest] + public async Task UpdateExistingExperimentMetric() + { + string metricId = "test_metric_update_existing"; + + ExperimentMetric originalMetric = await SetupTestMetricAsync(metricId); + + var updatedDefinition = new ExperimentMetricUpdate + { + DisplayName = "Updated Metric", + Description = "This metric has been updated", + }; + + Response response = await _client.UpdateMetricAsync(metricId, updatedDefinition); + ExperimentMetric updatedMetric = response.Value; + + Assert.That(updatedMetric, Is.Not.Null); + Assert.That(updatedMetric.Id, Is.EqualTo(metricId)); + Assert.That(updatedMetric.DisplayName, Is.EqualTo(updatedDefinition.DisplayName)); + Assert.That(updatedMetric.Description, Is.EqualTo(updatedDefinition.Description)); + Assert.That(updatedMetric.ETag, Is.Not.EqualTo(originalMetric.ETag)); + } + + [RecordedTest] + public void CreateOrUpdateExperimentMetricInvalidInputRejected() + { + string metricId = "test_metric_invalid"; + + var invalidDefinition = new ExperimentMetric( + LifecycleStage.Active, + displayName: "", // missing required value + description: "", // missing required value + categories: ["Test"], + DesiredDirection.Increase, + definition: new EventCountMetricDefinition("EventName")); + + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.CreateOrUpdateMetricAsync(metricId, invalidDefinition); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status400BadRequest)); + Assert.That(exception.ErrorCode, Is.EqualTo("InvalidOrUnsupportedError")); + } + + [RecordedTest] + public async Task UpdateExperimentMetricWithETag() + { + string metricId = "test_metric_conditional_update"; + + ExperimentMetric originalMetric = await SetupTestMetricAsync(metricId); + + var updatedDefinition = new ExperimentMetricUpdate + { + DisplayName = "Updated With ETag", + Description = "This metric has been updated with ETag condition" + }; + + Response response = await _client.UpdateMetricAsync( + metricId, + updatedDefinition, + ifMatch: originalMetric.ETag); + + ExperimentMetric updatedMetric = response.Value; + + Assert.That(updatedMetric, Is.Not.Null); + Assert.That(updatedMetric.Id, Is.EqualTo(metricId)); + Assert.That(updatedMetric.DisplayName, Is.EqualTo(updatedDefinition.DisplayName)); + Assert.That(updatedMetric.ETag, Is.Not.EqualTo(originalMetric.ETag)); + } + + [RecordedTest] + public async Task UpdateExperimentMetricWithETagPreconditionFailed() + { + string metricId = "test_metric_if_match_fail"; + + await SetupTestMetricAsync(metricId); + + var updatedDefinition = new ExperimentMetricUpdate + { + DisplayName = "This Should Not Update", + Description = "This update should fail due to ETag mismatch", + }; + + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.UpdateMetricAsync(metricId, updatedDefinition, ifMatch: new ETag("incorrect-etag-value")); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status412PreconditionFailed)); + } + + [RecordedTest] + public async Task ListExperimentMetrics() + { + const int numMetrics = 3; + + for (int i = 0; i < numMetrics; i++) + { + await SetupTestMetricAsync($"test_metric_list_{i}"); + } + + List metrics = []; + await foreach (ExperimentMetric metric in _client.GetMetricsAsync()) + { + metrics.Add(metric); + } + + Assert.That(metrics.Count, Is.GreaterThanOrEqualTo(numMetrics)); + } + + [RecordedTest] + public async Task ListExperimentMetricsWithTopParameter() + { + const int numMetrics = 5; + const int topCount = 2; + + for (int i = 0; i < numMetrics; i++) + { + await SetupTestMetricAsync($"test_metric_list_{i}"); + } + + List metrics = await _client.GetMetricsAsync(maxCount: topCount).ToEnumerableAsync(); + + Assert.That(metrics.Count, Is.GreaterThanOrEqualTo(numMetrics)); + } + + [RecordedTest] + public async Task GetExperimentMetricById() + { + string metricId = "test_metric_retrieve"; + + ExperimentMetric createdMetric = await SetupTestMetricAsync(metricId); + + Response response = await _client.GetMetricAsync(metricId); + ExperimentMetric retrievedMetric = response.Value; + + Assert.That(retrievedMetric, Is.Not.Null); + Assert.That(retrievedMetric.Id, Is.EqualTo(metricId)); + Assert.That(retrievedMetric.DisplayName, Is.EqualTo(createdMetric.DisplayName)); + Assert.That(retrievedMetric.Description, Is.EqualTo(createdMetric.Description)); + Assert.That(retrievedMetric.ETag, Is.EqualTo(createdMetric.ETag)); + } + + [RecordedTest] + public void GetExperimentMetricByIdNotFound() + { + string nonExistentMetricId = "test_metric_does_not_exist"; + + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.GetMetricAsync(nonExistentMetricId); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status404NotFound)); + } + + [RecordedTest] + public async Task ValidateExperimentMetricValid() + { + var validDefinition = new ExperimentMetric( + LifecycleStage.Active, + "Valid Metric", + "A valid metric for validation testing", + ["Test", "Validation"], + DesiredDirection.Increase, + new EventCountMetricDefinition("ValidationEvent")); + + Response response = await _client.ValidateMetricAsync(validDefinition); + ExperimentMetricValidationResult result = response.Value; + + if (result.Diagnostics != null) + { + foreach (DiagnosticDetail diagnostic in result.Diagnostics) + { + Console.WriteLine($"- {diagnostic.Code}: {diagnostic.Message}"); + } + } + + Assert.That(result, Is.Not.Null); + Assert.That(result.IsValid, Is.True); + Assert.That(result.Diagnostics, Is.Null.Or.Empty); + } + + [RecordedTest] + public async Task ValidateExperimentMetricInvalid() + { + var invalidDefinition = new ExperimentMetric( + LifecycleStage.Active, + "Invalid Metric", + "An invalid metric for validation testing", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("ValidationEvent") + { + Event = { Filter = "this is not a valid filter expression." } + }); + + Response response = await _client.ValidateMetricAsync(invalidDefinition); + ExperimentMetricValidationResult result = response.Value; + + Assert.That(result, Is.Not.Null); + Assert.That(result.IsValid, Is.False); + Assert.That(result.Diagnostics, Is.Not.Null); + Assert.That(result.Diagnostics, Is.Not.Empty); + } + + [RecordedTest] + public async Task DeleteExperimentMetric() + { + string metricId = "test_metric_delete"; + + // Create a test metric that will be deleted + await SetupTestMetricAsync(metricId); + + // Delete the metric + await _client.DeleteMetricAsync(metricId); + + // Verify the metric was deleted + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.GetMetricAsync(metricId); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status404NotFound)); + } + + [RecordedTest] + public async Task DeleteExperimentMetricWithETag() + { + string metricId = "test_metric_delete_etag"; + + // Create a test metric and capture its ETag for conditional deletion + ExperimentMetric createdMetric = await SetupTestMetricAsync(metricId); + string etag = createdMetric.ETag.ToString(); + + // Delete the metric using ETag condition + await _client.DeleteMetricAsync(metricId, new RequestConditions { IfMatch = new ETag(etag) }); + + // Verify the metric was deleted + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.GetMetricAsync(metricId); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status404NotFound)); + } + + [RecordedTest] + public async Task DeleteExperimentMetricPreconditionFailed() + { + string metricId = "test_metric_delete_etag_fail"; + + // Create a test metric + await SetupTestMetricAsync(metricId); + + // Attempt to delete with incorrect ETag should fail + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.DeleteMetricAsync( + metricId, + new RequestConditions { IfMatch = new ETag("incorrect-etag-value") }); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status412PreconditionFailed)); + + // Verify metric still exists + Response response = await _client.GetMetricAsync(metricId); + ExperimentMetric stillExists = response.Value; + + Assert.That(stillExists, Is.Not.Null); + Assert.That(stillExists.Id, Is.EqualTo(metricId)); + } + + [RecordedTest] + public async Task ActivateExperimentMetric() + { + string metricId = "test_metric_activate"; + + await SetupTestMetricAsync(metricId, LifecycleStage.Inactive); + + // Activate the metric + Response response = await _client.ActivateMetricAsync(metricId); + + // Verify the metric was activated + ExperimentMetric activatedMetric = response.Value; + + Assert.That(activatedMetric, Is.Not.Null); + Assert.That(activatedMetric.Id, Is.EqualTo(metricId)); + Assert.That(activatedMetric.Lifecycle, Is.EqualTo(LifecycleStage.Active)); + } + + [RecordedTest] + public async Task DeactivateExperimentMetric() + { + string metricId = "test_metric_deactivate"; + + // Create a test metric with Active status + await SetupTestMetricAsync(metricId, LifecycleStage.Active); + + // Deactivate the metric + Response response = await _client.DeactivateMetricAsync(metricId); + + // Verify the metric was deactivated + ExperimentMetric deactivatedMetric = response.Value; + + Assert.That(deactivatedMetric, Is.Not.Null); + Assert.That(deactivatedMetric.Id, Is.EqualTo(metricId)); + Assert.That(deactivatedMetric.Lifecycle, Is.EqualTo(LifecycleStage.Inactive)); + } + + [RecordedTest] + public async Task DeactivateExperimentMetricWithETag() + { + string metricId = "test_metric_deactivate_etag"; + + // Create an inactive metric and capture its ETag + ExperimentMetric activeMetric = await SetupTestMetricAsync(metricId, LifecycleStage.Active); + + // Activate the metric with ETag condition + Response response = await _client.DeactivateMetricAsync(metricId, ifMatch: activeMetric.ETag); + + // Verify the metric was activated + ExperimentMetric deactivatedMetric = response.Value; + + Assert.That(deactivatedMetric.Lifecycle, Is.EqualTo(LifecycleStage.Inactive)); + Assert.That(deactivatedMetric.ETag.ToString(), Is.Not.EqualTo(activeMetric.ETag), "ETag should change when metric is modified"); + } + + [RecordedTest] + public async Task DeactivateExperimentMetricPreconditionFailed() + { + string metricId = "test_metric_deactivate_etag_fail"; + ExperimentMetric activeMetric = await SetupTestMetricAsync(metricId, LifecycleStage.Active); + + // Attempt to deactivate with incorrect ETag should fail + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.DeactivateMetricAsync(metricId, ifMatch: new ETag("some-other-value")); + }); + + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status412PreconditionFailed)); + } + + [RecordedTest] + public async Task ActivateExperimentMetricWithETag() + { + string metricId = "test_metric_activate_etag"; + + // Create an inactive metric and capture its ETag + ExperimentMetric inactiveMetric = await SetupTestMetricAsync(metricId, LifecycleStage.Inactive); + + // Activate the metric with ETag condition + Response response = await _client.ActivateMetricAsync(metricId, ifMatch: inactiveMetric.ETag); + + // Verify the metric was activated + ExperimentMetric activatedMetric = response.Value; + + Assert.That(activatedMetric.Lifecycle, Is.EqualTo(LifecycleStage.Active)); + Assert.That(activatedMetric.ETag.ToString(), Is.Not.EqualTo(inactiveMetric.ETag), "ETag should change when metric is modified"); + } + + [RecordedTest] + public async Task ActivateExperimentMetricWithETagPreconditionFailed() + { + string metricId = "test_metric_activate_etag_fail"; + + // Create an inactive metric and capture its ETag + await SetupTestMetricAsync(metricId, LifecycleStage.Inactive); + + RequestFailedException exception = Assert.ThrowsAsync(async () => + { + await _client.ActivateMetricAsync(metricId, ifMatch: new ETag("some-other-value")); + }); + + // Verify the metric was activated + Assert.That(exception.Status, Is.EqualTo(StatusCodes.Status412PreconditionFailed)); + } + + private async Task SetupTestMetricAsync(string metricId, LifecycleStage lifecycle = default) + { + var currentTest = TestContext.CurrentContext.Test; + var metricDefinition = new ExperimentMetric( + lifecycle == default ? LifecycleStage.Active : lifecycle, + displayName: $"Test Metric {currentTest.Name}", + description: $"A metric created for testing purposes ({currentTest.FullName})", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent")); + + Response response = await _client.CreateOrUpdateMetricAsync(metricId, metricDefinition); + + return response.Value; + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/OnlineExperimentationSamplesBase.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/OnlineExperimentationSamplesBase.cs new file mode 100644 index 000000000000..6a520f19078d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/OnlineExperimentationSamplesBase.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; +using NUnit.Framework; +using Azure.Analytics.OnlineExperimentation.Tests; +using System; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + [LiveOnly] + [NonParallelizable] + public class OnlineExperimentationSamplesBase : SamplesBase + { + /// + /// Redirects calls to . + /// + protected internal TestEnvironmentFacade Environment => new(TestEnvironment); + + protected internal readonly struct TestEnvironmentFacade(OnlineExperimentationClientTestEnvironment TestEnvironment) + { + public string GetEnvironmentVariable(string name) + { + return name?.ToUpperInvariant() switch + { + "AZURE_ONLINEEXPERIMENTATION_ENDPOINT" => TestEnvironment.Endpoint, + _ => throw new ArgumentException($"Environment variable '{name}' not expected in samples.", nameof(name)) + }; + } + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample1_InitializeClient.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample1_InitializeClient.cs new file mode 100644 index 000000000000..1f76f01753fa --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample1_InitializeClient.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples : OnlineExperimentationSamplesBase + { + [Test] + [SyncOnly] + public void InitializeClient() + { + #region Snippet:OnlineExperimentation_InitializeClient + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + #endregion + } + + [Test] + [SyncOnly] + public void InitializeClientWithApiVersion() + { + #region Snippet:OnlineExperimentation_InitializeClientApiVersion + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var options = new OnlineExperimentationClientOptions(OnlineExperimentationClientOptions.ServiceVersion.V2025_05_31_Preview); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options); + #endregion + } + + [Test] + [SyncOnly] + public void InitializeClientWithDiagnostics() + { + #region Snippet:OnlineExperimentation_InitializeClientDiagnostics + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var options = new OnlineExperimentationClientOptions() + { + Diagnostics = + { + IsLoggingContentEnabled = true + } + }; + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential(), options); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetrics.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetrics.cs new file mode 100644 index 000000000000..e9e84eb36f4b --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetrics.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [SyncOnly] + public void CreateEventCountMetric() + { + #region Snippet:OnlineExperimentation_CreateEventCountMetric + // Create a client with your Azure Online Experimentation workspace endpoint and credentials + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Event Count metric - counts all occurrences of a specific event type + var promptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total number of prompts sent", + "Counts the total number of prompts sent by users to the chatbot", + ["Usage"], + DesiredDirection.Increase, + new EventCountMetricDefinition("PromptSent") + ); + + // Create the metric with ID "PromptSentCount" + var response = client.CreateMetric("prompt_sent_count", promptSentMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + Console.WriteLine($"Display name: {response.Value.DisplayName}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreateUserCountMetric() + { + #region Snippet:OnlineExperimentation_CreateUserCountMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the User Count metric with a filter - counts unique users who performed a specific action + var usersPromptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Users with at least one prompt sent on checkout page", + "Counts unique users who sent at least one prompt while on the checkout page", + ["Usage"], + DesiredDirection.Increase, + new UserCountMetricDefinition("PromptSent") + { + Event = { Filter = "Page == 'checkout.html'" } + } + ); + + // Create the metric with ID "UsersPromptSent" + var response = client.CreateMetric("users_prompt_sent", usersPromptSentMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreateEventRateMetric() + { + #region Snippet:OnlineExperimentation_CreateEventRateMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Event Rate metric - measures a percentage of events meeting a condition + var relevanceMetric = new ExperimentMetric( + LifecycleStage.Active, + "% evaluated conversations with good relevance", + "Percentage of evaluated conversations where the LLM response has good relevance (score >= 4)", + ["Quality"], + DesiredDirection.Increase, + new EventRateMetricDefinition("EvaluateLLM", rateCondition: "Relevance > 4") + ); + + // Create the metric + var response = client.CreateMetric("momo_pct_relevance_good", relevanceMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreateUserRateMetric() + { + #region Snippet:OnlineExperimentation_CreateUserRateMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the User Rate metric - measures percentage of users who performed action B after action A + var conversionMetric = new ExperimentMetric( + LifecycleStage.Active, + "% users with LLM interaction who made a high-value purchase", + "Percentage of users who received a response from the LLM and then made a purchase of $100 or more", + ["Business"], + DesiredDirection.Increase, + new UserRateMetricDefinition(startEventName: "ResponseReceived", endEventName: "Purchase") + { + EndEvent = { Filter = "Revenue > 100" } + } + ); + + // Create the metric + var response = client.CreateMetric("pct_chat_to_high_value_purchase_conversion", conversionMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreateSumMetric() + { + #region Snippet:OnlineExperimentation_CreateSumMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Sum metric - sums a numeric value across all events of a type + var revenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total revenue", + "Sum of revenue from all purchase transactions", + ["Business"], + DesiredDirection.Increase, + new SumMetricDefinition("Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + ); + + // Create the metric + var response = client.CreateMetric("total_revenue", revenueMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreateAverageMetric() + { + #region Snippet:OnlineExperimentation_CreateAverageMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Average metric - calculates the mean of a numeric value across events + var avgRevenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase", + "The average revenue per purchase transaction in USD", + ["Business"], + DesiredDirection.Increase, + new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + ); + + // Create the metric + var response = client.CreateMetric("avg_revenue_per_purchase", avgRevenueMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [SyncOnly] + public void CreatePercentileMetric() + { + #region Snippet:OnlineExperimentation_CreatePercentileMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Percentile metric - calculates a specific percentile of a numeric value + var p95ResponseTimeMetric = new ExperimentMetric( + LifecycleStage.Active, + "P95 LLM response time [seconds]", + "The 95th percentile of response time in seconds for LLM responses", + ["Performance"], + DesiredDirection.Decrease, + new PercentileMetricDefinition(eventName: "ResponseReceived", eventProperty: "ResponseTimeSeconds", percentile: 95) + ); + + // Create the metric + var response = client.CreateMetric("p95_response_time_seconds", p95ResponseTimeMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetricsAsync.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetricsAsync.cs new file mode 100644 index 000000000000..4683f9ffe3a0 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample2_CreateExperimentMetricsAsync.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [AsyncOnly] + public async Task CreateEventCountMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateEventCountMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Event Count metric - counts all occurrences of a specific event type + var promptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total number of prompts sent", + "Counts the total number of prompts sent by users to the chatbot", + ["Usage"], + DesiredDirection.Increase, + new EventCountMetricDefinition("PromptSent") + ); + + // Create the metric with ID "PromptSentCount" + var response = await client.CreateMetricAsync("prompt_sent_count", promptSentMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + Console.WriteLine($"Display name: {response.Value.DisplayName}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreateUserCountMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateUserCountMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the User Count metric with a filter - counts unique users who performed a specific action + var usersPromptSentMetric = new ExperimentMetric( + LifecycleStage.Active, + "Users with at least one prompt sent on checkout page", + "Counts unique users who sent at least one prompt while on the checkout page", + ["Usage"], + DesiredDirection.Increase, + new UserCountMetricDefinition("PromptSent") + { + Event = { Filter = "Page == 'checkout.html'" } + } + ); + + // Create the metric with ID "UsersPromptSent" + var response = await client.CreateMetricAsync("users_prompt_sent", usersPromptSentMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreateEventRateMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateEventRateMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Event Rate metric - measures a percentage of events meeting a condition + var relevanceMetric = new ExperimentMetric( + LifecycleStage.Active, + "% evaluated conversations with good relevance", + "Percentage of evaluated conversations where the LLM response has good relevance (score >= 4)", + ["Quality"], + DesiredDirection.Increase, + new EventRateMetricDefinition("EvaluateLLM", rateCondition: "Relevance > 4") + ); + + // Create the metric + var response = await client.CreateMetricAsync("momo_pct_relevance_good", relevanceMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreateUserRateMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateUserRateMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the User Rate metric - measures percentage of users who performed action B after action A + var conversionMetric = new ExperimentMetric( + LifecycleStage.Active, + "% users with LLM interaction who made a high-value purchase", + "Percentage of users who received a response from the LLM and then made a purchase of $100 or more", + ["Business"], + DesiredDirection.Increase, + new UserRateMetricDefinition(startEventName: "ResponseReceived", endEventName: "Purchase") + { + EndEvent = { Filter = "Revenue > 100" } + } + ); + + // Create the metric + var response = await client.CreateMetricAsync("pct_chat_to_high_value_purchase_conversion", conversionMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreateSumMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateSumMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Sum metric - sums a numeric value across all events of a type + var revenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Total revenue", + "Sum of revenue from all purchase transactions", + ["Business"], + DesiredDirection.Increase, + new SumMetricDefinition("Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + ); + + // Create the metric + var response = await client.CreateMetricAsync("total_revenue", revenueMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreateAverageMetricAsync() + { + #region Snippet:OnlineExperimentation_CreateAverageMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Average metric - calculates the mean of a numeric value across events + var avgRevenueMetric = new ExperimentMetric( + LifecycleStage.Active, + "Average revenue per purchase", + "The average revenue per purchase transaction in USD", + ["Business"], + DesiredDirection.Increase, + new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + ); + + // Create the metric + var response = await client.CreateMetricAsync("avg_revenue_per_purchase", avgRevenueMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + Console.WriteLine($"Display name: {response.Value.DisplayName}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task CreatePercentileMetricAsync() + { + #region Snippet:OnlineExperimentation_CreatePercentileMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define the Percentile metric - calculates a specific percentile of a numeric value + var p95ResponseTimeMetric = new ExperimentMetric( + LifecycleStage.Active, + "P95 LLM response time [seconds]", + "The 95th percentile of response time in seconds for LLM responses", + ["Performance"], + DesiredDirection.Decrease, + new PercentileMetricDefinition(eventName: "ResponseReceived", eventProperty: "ResponseTimeSeconds", percentile: 95) + ); + + // Create the metric + var response = await client.CreateMetricAsync("p95_response_time_seconds", p95ResponseTimeMetric); + + Console.WriteLine($"Created metric: {response.Value.Id}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetrics.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetrics.cs new file mode 100644 index 000000000000..5b625104dc8f --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetrics.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [SyncOnly] + public void ValidateMetric() + { + #region Snippet:OnlineExperimentation_ValidateMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define a metric to validate + var metricToValidate = new ExperimentMetric( + LifecycleStage.Active, + "Test metric for validation", + "This metric definition will be validated before creation", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent") + ); + + // Validate the metric - checks for errors in the definition + var validationResult = client.ValidateMetric(metricToValidate); + + // Check if the metric definition is valid + if (validationResult.Value.IsValid) + { + Console.WriteLine("Metric definition is valid"); + + // Now create the validated metric + var createdMetric = client.CreateOrUpdateMetric("test_metric_id", metricToValidate); + Console.WriteLine($"Created metric: {createdMetric.Value.Id}"); + } + else + { + // Handle validation errors + Console.WriteLine("Metric definition has errors:"); + foreach (var error in validationResult.Value.Diagnostics) + { + Console.WriteLine($"- [{error.Code}] {error.Message}"); + } + } + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetricsAsync.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetricsAsync.cs new file mode 100644 index 000000000000..cddd9cc00962 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample3_ValidateExperimentMetricsAsync.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [AsyncOnly] + public async Task ValidateMetricAsync() + { + #region Snippet:OnlineExperimentation_ValidateMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Define a metric to validate + var metricToValidate = new ExperimentMetric( + LifecycleStage.Active, + "Test metric for validation", + "This metric definition will be validated before creation", + ["Test"], + DesiredDirection.Increase, + new EventCountMetricDefinition("TestEvent") + ); + + // Validate the metric - checks for errors in the definition + var validationResult = await client.ValidateMetricAsync(metricToValidate); + + // Check if the metric definition is valid + if (validationResult.Value.IsValid) + { + Console.WriteLine("Metric definition is valid"); + + // Now create the validated metric + var createdMetric = await client.CreateOrUpdateMetricAsync("test_metric_id", metricToValidate); + Console.WriteLine($"Created metric: {createdMetric.Value.Id}"); + } + else + { + // Handle validation errors + Console.WriteLine("Metric definition has errors:"); + foreach (var error in validationResult.Value.Diagnostics) + { + Console.WriteLine($"- [{error.Code}] {error.Message}"); + } + } + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetrics.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetrics.cs new file mode 100644 index 000000000000..54b702cd7970 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetrics.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [SyncOnly] + public void RetrieveSingleMetric() + { + #region Snippet:OnlineExperimentation_RetrieveMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Get a specific metric by ID + var metric = client.GetMetric("avg_revenue_per_purchase"); + + // Access metric properties to view or use the metric definition + Console.WriteLine($"Metric ID: {metric.Value.Id}"); + Console.WriteLine($"Display name: {metric.Value.DisplayName}"); + Console.WriteLine($"Description: {metric.Value.Description}"); + Console.WriteLine($"Lifecycle stage: {metric.Value.Lifecycle}"); + Console.WriteLine($"Desired direction: {metric.Value.DesiredDirection}"); + #endregion + } + + [Test] + [SyncOnly] + public void ListAllMetrics() + { + #region Snippet:OnlineExperimentation_ListMetrics + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // List all metrics in the workspace + Console.WriteLine("Listing all metrics:"); + foreach (var item in client.GetMetrics()) + { + Console.WriteLine($"- {item.Id}: {item.DisplayName}"); + } + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetricsAsync.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetricsAsync.cs new file mode 100644 index 000000000000..c5bbdf72ce2d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample4_RetrieveAndListMetricsAsync.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [AsyncOnly] + public async Task RetrieveSingleMetricAsync() + { + #region Snippet:OnlineExperimentation_RetrieveMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Get a specific metric by ID + var metric = await client.GetMetricAsync("avg_revenue_per_purchase"); + + // Access metric properties to view or use the metric definition + Console.WriteLine($"Metric ID: {metric.Value.Id}"); + Console.WriteLine($"Display name: {metric.Value.DisplayName}"); + Console.WriteLine($"Description: {metric.Value.Description}"); + Console.WriteLine($"Lifecycle stage: {metric.Value.Lifecycle}"); + Console.WriteLine($"Desired direction: {metric.Value.DesiredDirection}"); + #endregion + } + + [Test] + [AsyncOnly] + public async Task ListAllMetricsAsync() + { + #region Snippet:OnlineExperimentation_ListMetricsAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // List all metrics in the workspace + Console.WriteLine("Listing all metrics:"); + await foreach (var item in client.GetMetricsAsync()) + { + Console.WriteLine($"- {item.Id}: {item.DisplayName}"); + } + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetric.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetric.cs new file mode 100644 index 000000000000..f9787123aac8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetric.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [SyncOnly] + public void UpdateMetric() + { + #region Snippet:OnlineExperimentation_UpdateMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Update a Description and Definition of an existing metric, + // other fields (DisplayName, Categories, DesiredDirection, Lifecycle) remain unchanged. + var response = client.UpdateMetric( + experimentMetricId: "avg_revenue_per_purchase", + new ExperimentMetricUpdate + { + Description = "The average revenue per purchase transaction in USD.", + Definition = new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + }); + + Console.WriteLine($"Updated metric: {response.Value.Id}"); + Console.WriteLine($"New display name: {response.Value.DisplayName}"); + Console.WriteLine($"New description: {response.Value.Description}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetricAsync.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetricAsync.cs new file mode 100644 index 000000000000..03978c330a28 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample5_UpdateExperimentMetricAsync.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [AsyncOnly] + public async Task UpdateMetricAsync() + { + #region Snippet:OnlineExperimentation_UpdateMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Update a Description and Definition of an existing metric, + // other fields (DisplayName, Categories, DesiredDirection, Lifecycle) remain unchanged. + var response = await client.UpdateMetricAsync( + experimentMetricId: "avg_revenue_per_purchase", + new ExperimentMetricUpdate + { + Description = "The average revenue per purchase transaction in USD.", + Definition = new AverageMetricDefinition(eventName: "Purchase", eventProperty: "Revenue") + { + Value = { Filter = "Revenue > 0" } + } + }); + + Console.WriteLine($"Updated metric: {response.Value.Id}"); + Console.WriteLine($"New display name: {response.Value.DisplayName}"); + Console.WriteLine($"New description: {response.Value.Description}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetric.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetric.cs new file mode 100644 index 000000000000..ce0fedcb8698 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetric.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [SyncOnly] + public void DeleteMetric() + { + #region Snippet:OnlineExperimentation_DeleteMetric + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Delete a metric by ID - removes it from the workspace + var response = client.DeleteMetric("test_metric_id"); + + Console.WriteLine($"Delete operation status: {response.Status}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetricAsync.cs b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetricAsync.cs new file mode 100644 index 000000000000..a8ab536c85c2 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/Samples/Sample6_DeleteExperimentMetricAsync.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using NUnit.Framework; + +namespace Azure.Analytics.OnlineExperimentation.Samples +{ + public partial class OnlineExperimentationSamples + { + [Test] + [AsyncOnly] + public async Task DeleteMetricAsync() + { + #region Snippet:OnlineExperimentation_DeleteMetricAsync + var endpoint = new Uri(Environment.GetEnvironmentVariable("AZURE_ONLINEEXPERIMENTATION_ENDPOINT")); + var client = new OnlineExperimentationClient(endpoint, new DefaultAzureCredential()); + + // Delete a metric by ID - removes it from the workspace + var response = await client.DeleteMetricAsync("test_metric_id"); + + Console.WriteLine($"Delete operation status: {response.Status}"); + #endregion + } + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetric.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetric.json new file mode 100644 index 000000000000..0e3f48ee1dac --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetric.json @@ -0,0 +1,132 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "363", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-ef369f79eec96860fdb0de739f9f4eda-32398ce68b1df212-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "470", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:23 GMT", + "ETag": "\"Bsj7frKDn6s=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:23 GMT", + "mise-correlation-id": "a7abccbb-9aca-41df-9d98-9c8208cfb793", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "08947595-897e-42fe-8c32-56eb4ab786e7", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"Bsj7frKDn6s=\"", + "lastModifiedAt": "2025-05-01T04:34:23.8046368+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-d6aeb568ef1edb794cf7e5943f892706-9811b3605e1f27b3-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:23 GMT", + "ETag": "\"JutorBLJ9OY=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:23 GMT", + "mise-correlation-id": "49faea72-7548-4e49-aeaf-591056b4e19c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "cd603d16-f92f-4e20-83d3-509660b5987c", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JutorBLJ9OY=\"", + "lastModifiedAt": "2025-05-01T04:34:23.9770525+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "827089991" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricAsync.json new file mode 100644 index 000000000000..695827689748 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricAsync.json @@ -0,0 +1,132 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "362", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-4d6f9b2882c4bab00f23c71200c732e0-c8b96adca4452e67-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "469", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:22 GMT", + "ETag": "\"aiYncDQXIKg=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:22 GMT", + "mise-correlation-id": "4d418d4b-763e-4349-80ab-5ad33e30a31c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "7afa7aa7-32fb-4248-bf7c-69c9737410b4", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"aiYncDQXIKg=\"", + "lastModifiedAt": "2025-05-01T04:35:22.6196887+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-20788196d83d2b6a37a42931ab1a0180-0bab7be11dde538c-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "467", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:22 GMT", + "ETag": "\"s3lTmA/v+iw=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:22 GMT", + "mise-correlation-id": "a51df3ab-4620-4bd1-adb2-3f501c0a95c7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "89c85f83-2707-4ae4-99d8-e2a67eace00c", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"s3lTmA/v+iw=\"", + "lastModifiedAt": "2025-05-01T04:35:22.7923878+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1851757969" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETag.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETag.json new file mode 100644 index 000000000000..5f0f11fe7e8a --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETag.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "379", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-f7fdb554a2864e38ede5455d4a9f7873-2e06c1f2ded893a5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:27 GMT", + "ETag": "\"tFdXckxpsqg=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:27 GMT", + "mise-correlation-id": "95da3e3a-d7f3-478c-bf28-40a0f3731b47", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "95f90795-6e9a-455c-8b3a-658f6b8805db", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"tFdXckxpsqg=\"", + "lastModifiedAt": "2025-05-01T04:34:27.4346289+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"tFdXckxpsqg=\"", + "traceparent": "00-173009d289288fa415ef0d056520fcba-f8def1053df24df1-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "489", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:27 GMT", + "ETag": "\"zUPCwfvmxh0=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:27 GMT", + "mise-correlation-id": "c221e7c9-ad73-406b-8d4b-246a13116e49", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "7834fd12-9f3a-454c-9393-b163cc689192", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"zUPCwfvmxh0=\"", + "lastModifiedAt": "2025-05-01T04:34:27.6438691+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "2101315819" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagAsync.json new file mode 100644 index 000000000000..0a6e9cae17fe --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagAsync.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "378", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-e3df680de6e4bf5821e5d2f96668c764-b8c13c3946204d61-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "489", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:25 GMT", + "ETag": "\"wkGqKUBO42w=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:25 GMT", + "mise-correlation-id": "f9a9a6e6-b545-4b3d-ac34-62d6a021a1b7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e62476d5-5aa6-4716-b2c7-e0ac9babbb71", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"wkGqKUBO42w=\"", + "lastModifiedAt": "2025-05-01T04:35:25.588587+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"wkGqKUBO42w=\"", + "traceparent": "00-695eec6ecfd5bd3a543f9a17a1b49791-8d218c2539b560e2-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "488", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:25 GMT", + "ETag": "\"4h+lmrlzwCM=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:25 GMT", + "mise-correlation-id": "ea1d3035-35db-4a5d-83e0-717548c1cdea", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "d3e5adac-b056-4aea-b6af-fa854d7a2fe1", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"4h+lmrlzwCM=\"", + "lastModifiedAt": "2025-05-01T04:35:25.7497425+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1312875541" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailed.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailed.json new file mode 100644 index 000000000000..eb3ea79e475d --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailed.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "415", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-16ca55f2c3dddcaf6c33f3b68e4fbe98-0e0c3eb49bb6890a-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "532", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:30 GMT", + "ETag": "\"R2DHqnWRi+4=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:30 GMT", + "mise-correlation-id": "d18f2212-96a5-456c-8f64-9b96fc5922b3", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "cfa54d5c-9267-480c-957d-2601ecd9a3c6", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"R2DHqnWRi+4=\"", + "lastModifiedAt": "2025-05-01T04:34:30.1618885+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"some-other-value\"", + "traceparent": "00-c27ed93a91fee18c16e5c7e234ab23a7-e654f69473119604-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:30 GMT", + "mise-correlation-id": "01ff273e-4f2c-4e41-a3b8-c1977ab48f01", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "e4229985-26b5-4f85-8702-ff163ed84bb1", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1723369728" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailedAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailedAsync.json new file mode 100644 index 000000000000..fbdd971df122 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ActivateExperimentMetricWithETagPreconditionFailedAsync.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "414", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-90e41ccc75100556e0d452b39f723a42-1d8b3a38a592dc9d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "531", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:28 GMT", + "ETag": "\"50eFsl0PJes=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:28 GMT", + "mise-correlation-id": "c0932594-1fa3-4a45-8330-1ab7fe7b28ec", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "45c65eca-b5b9-404b-bff2-b7ed5a6ff748", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"50eFsl0PJes=\"", + "lastModifiedAt": "2025-05-01T04:35:28.7566612+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_activate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "22", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"some-other-value\"", + "traceparent": "00-d6e34a4e0fb20bf59fa3a9f83fe5916b-4d81cd12f7effc4d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:28 GMT", + "mise-correlation-id": "744ec656-07b2-4bc8-b995-b6917b95b369", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "3c82723f-e46d-4c7f-9415-b96d78b3032d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1608634222" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetric.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetric.json new file mode 100644 index 000000000000..1a182c66c396 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetric.json @@ -0,0 +1,109 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metri?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4e9eb4e7c0817913a050af726574a0b8-0d9d032eb31cd1e5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:34:32 GMT", + "mise-correlation-id": "3073a779-d95e-4999-9eff-f9efacec3357", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "114f5894-a411-48bc-bb56-d1c3734d90b0", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metri?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "229", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-bb00d379819ea24afcfef2349cc99090-dc833f107f9285f9-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "326", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:33 GMT", + "ETag": "\"YG7X7NypAo8=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:33 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metri", + "mise-correlation-id": "ea5e0d65-2288-4248-aacc-2e983d295d0e", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "4168a057-71ec-4b13-a12e-87ee888660e6", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:34:33.0330161+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1970534699" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricAsync.json new file mode 100644 index 000000000000..c97cbbf2f8ca --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricAsync.json @@ -0,0 +1,109 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metri?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1cf6c74c67434dadaaa89d0d062466df-c544745edeea6c4a-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:35:31 GMT", + "mise-correlation-id": "eef7d27b-0b1d-4012-9754-4ebd25bbab9f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "8d992579-7f3c-4342-9385-650ae6f13da3", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metri?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "229", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-92c148b5a67d345bb1a32815d61a469f-b6aad073708f1f79-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "326", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:31 GMT", + "ETag": "\"YG7X7NypAo8=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:31 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metri", + "mise-correlation-id": "fbae5e47-e4dc-4ce8-8eea-c6dd48b2d3b1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "f40e20ca-7ed3-4c7e-9c43-a46104b95e9b", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:35:31.5736411+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1245875860" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExists.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExists.json new file mode 100644 index 000000000000..888bdbc2f393 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExists.json @@ -0,0 +1,170 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-8d92bfa01f826744dffcedb5d9371bbc-c3527c6a90cec0ef-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:34:35 GMT", + "mise-correlation-id": "6de7c690-728d-487b-910f-914fed8c9d2a", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "3d9c7484-660a-46b2-8bcb-b409e5110e04", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "271", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-fd279512d723f4a201cf81592437ba74-cf32d336128d2538-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ConditionalCreateEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "390", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:35 GMT", + "ETag": "\"NyoM+7py4jQ=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:35 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_create_if_not_exists", + "mise-correlation-id": "db33d537-4a8b-405e-b854-0fd028872fab", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "4b98256c-391b-47c6-9852-0d31c890d515", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:34:35.7269418+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "271", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-325b8b926de22f424e484d48122c34a0-ffbd8adaf88843b7-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ConditionalCreateEvent" + } + } + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:35 GMT", + "mise-correlation-id": "1df7dedd-a43d-4a0c-8742-a9f0f7f18e84", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "e742b0b1-999a-47d6-86a7-4a0c4a21ae66", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-None-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1865535777" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExistsAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExistsAsync.json new file mode 100644 index 000000000000..c72abe780542 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateExperimentMetricOnlyIfNotExistsAsync.json @@ -0,0 +1,170 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-7da29283d7d85a5c49ba82755b3e94b3-d136beb9d1ef5a33-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:35:34 GMT", + "mise-correlation-id": "018b98f9-698a-4fd7-afa3-e1d07f6d1a31", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "71f1d566-9398-4733-831b-c8383eb2b8ac", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "271", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-2426087c9917c3d81eb86cd46ae243b5-2bcbb4a47ce6f979-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ConditionalCreateEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "390", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:34 GMT", + "ETag": "\"NyoM+7py4jQ=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:34 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_create_if_not_exists", + "mise-correlation-id": "c35d9612-0c06-4d4d-b4db-bc5b58866920", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e735edd9-4abc-4a1d-b9f8-5da9711fe4d7", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:35:34.4391386+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_create_if_not_exists?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "271", + "Content-Type": "application/merge-patch+json", + "If-None-Match": "*", + "traceparent": "00-60aaba25fe94c01e895a99aa99476320-ca3f795dcb4d4cdd-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ConditionalCreateEvent" + } + } + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "166", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:34 GMT", + "mise-correlation-id": "185ace46-5e1c-41f0-bd96-4ccbd6711ab5", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "7c9ed750-e75f-42d0-acdc-6c31ec94ac7d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-None-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "607561776" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejected.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejected.json new file mode 100644 index 000000000000..5b6126928ece --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejected.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_invalid?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "177", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-5d5bf7dd8b7baf935a02eb6732ffd848-fbd1e40ed8f9b2cb-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "", + "description": "", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "EventName" + } + } + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:38 GMT", + "mise-correlation-id": "57459715-bb9b-4e76-990d-ddaef392da7f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "InvalidOrUnsupportedError", + "x-ms-request-id": "c9411435-aba7-4b70-8561-1e9281db103d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "InvalidOrUnsupportedError", + "message": "Invalid or unsupported Input", + "target": null, + "details": [ + { + "code": "FailedSchemaValidation", + "message": "Invalid or unsupported Input", + "target": null, + "details": [], + "innerError": null + } + ], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1588792592" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejectedAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejectedAsync.json new file mode 100644 index 000000000000..e48e59dffdb2 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/CreateOrUpdateExperimentMetricInvalidInputRejectedAsync.json @@ -0,0 +1,74 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_invalid?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "177", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-c13ef347ffa3ad08e62eda90c9aa373f-40582a9c409dd88e-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "", + "description": "", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "EventName" + } + } + }, + "StatusCode": 400, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:37 GMT", + "mise-correlation-id": "ce1445ff-9ac5-4e31-88d9-526d67eb6e1e", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "InvalidOrUnsupportedError", + "x-ms-request-id": "694214bf-a504-4ccb-b7ca-b4d2cc74e9ca", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "InvalidOrUnsupportedError", + "message": "Invalid or unsupported Input", + "target": null, + "details": [ + { + "code": "FailedSchemaValidation", + "message": "Invalid or unsupported Input", + "target": null, + "details": [], + "innerError": null + } + ], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1395780117" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetric.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetric.json new file mode 100644 index 000000000000..a6ff0e74d401 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetric.json @@ -0,0 +1,132 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "365", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-0a18b0340aa4eee6ff7eb995cdf43c90-dc936474cca9a28f-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "474", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:40 GMT", + "ETag": "\"Xnt2c1BCuY8=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:40 GMT", + "mise-correlation-id": "af3ce4f3-677a-4d59-8ed6-37da4fb86871", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "ea30825b-2552-4776-8df6-96a02a745735", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"Xnt2c1BCuY8=\"", + "lastModifiedAt": "2025-05-01T04:34:40.8584522+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-6f4cf45839d969360b9fb515cf2289d3-f6e179a289121da7-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:41 GMT", + "ETag": "\"upt1shNNgZo=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:41 GMT", + "mise-correlation-id": "159e799f-5e13-4c82-aad7-26975f51bcb3", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "4fe336ac-e546-4853-8d88-2577b59b394e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"upt1shNNgZo=\"", + "lastModifiedAt": "2025-05-01T04:34:41.0174278+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1402124391" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricAsync.json new file mode 100644 index 000000000000..810a6c9dafbd --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricAsync.json @@ -0,0 +1,132 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "364", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-1b7332f712bde6fe15cc170c903f3aeb-9fc22246e557376a-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "473", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:39 GMT", + "ETag": "\"tM5cnGw5Hp0=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:39 GMT", + "mise-correlation-id": "8edf182a-56e8-4f03-a8c9-31ac11c90ef7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "907e77d8-e296-44b1-97dd-cf3a7690246f", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"tM5cnGw5Hp0=\"", + "lastModifiedAt": "2025-05-01T04:35:39.5115416+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-a2174916d5b8857a3b66afb8c1d57242-5a4e6e21b8283072-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "475", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:39 GMT", + "ETag": "\"bt+tkBy2Ajo=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:39 GMT", + "mise-correlation-id": "29812784-03b4-45fd-b98e-8db20f3ebcde", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "a9e39d4d-e4cb-48ee-912a-47f711ce9166", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bt+tkBy2Ajo=\"", + "lastModifiedAt": "2025-05-01T04:35:39.6673576+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1858985414" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailed.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailed.json new file mode 100644 index 000000000000..ff623b3e8e09 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailed.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "401", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-4284988baede17be9e21f0fd0ffdfb0c-c404810a92f80177-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "520", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:43 GMT", + "ETag": "\"JR6UkVIRbKo=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:43 GMT", + "mise-correlation-id": "4cc7836c-0784-4e4d-ba12-05041b7b82af", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "0650ea57-a7bc-4925-baf2-b71ff8c90032", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JR6UkVIRbKo=\"", + "lastModifiedAt": "2025-05-01T04:34:43.4752277+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"some-other-value\"", + "traceparent": "00-b4d5e6f0218ad546ca3e8d7559e5838c-8e8844bf21ebd32e-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:43 GMT", + "mise-correlation-id": "a4e6b50b-bcc6-40dc-abd9-cd779c1b506b", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "8ccbb2cb-b2e2-4852-9c34-1ee141333594", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "688885247" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailedAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailedAsync.json new file mode 100644 index 000000000000..2ea661e1e464 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricPreconditionFailedAsync.json @@ -0,0 +1,122 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "400", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-bd750aeeb150350d7a3e080bedc8669a-49e14532840166dc-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "519", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:42 GMT", + "ETag": "\"5hPf3Pdplo8=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:42 GMT", + "mise-correlation-id": "8e52e9f0-561f-4b42-b6f0-46791d3feba4", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "46e7822a-d990-4951-811d-dfa85f732ee2", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"5hPf3Pdplo8=\"", + "lastModifiedAt": "2025-05-01T04:35:42.1693751+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"some-other-value\"", + "traceparent": "00-bebde3663d7569ef86695e0d1cdad03f-d3671c4c6b98ac73-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:42 GMT", + "mise-correlation-id": "91ff4c13-976b-4735-9414-90b43ac89693", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "599ab523-c764-4994-a61b-646b744919db", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "67868731" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETag.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETag.json new file mode 100644 index 000000000000..ad7c01a080bb --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETag.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "381", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-c8fdf5360dd6e5920bd9978aceae5462-1d41b751273141c3-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "495", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:46 GMT", + "ETag": "\"9rt3BcisUOQ=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:46 GMT", + "mise-correlation-id": "85fbc2bd-7aa6-4c1b-bc0b-0239649fc992", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "0af6f1c5-39f6-4f6a-8753-2dda72a44fb1", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"9rt3BcisUOQ=\"", + "lastModifiedAt": "2025-05-01T04:34:46.1740172+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"9rt3BcisUOQ=\"", + "traceparent": "00-ac4f93505d4fd5321adfc78fbeba3bcc-87087187b497658e-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "496", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:46 GMT", + "ETag": "\"/BC2QWRqGyY=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:46 GMT", + "mise-correlation-id": "f54958bb-9996-4790-b26c-303cd739003d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "1a42cf09-5932-4e41-a73c-a02b0009e13d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"/BC2QWRqGyY=\"", + "lastModifiedAt": "2025-05-01T04:34:46.335715+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "597664266" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETagAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETagAsync.json new file mode 100644 index 000000000000..5d5ba8978f02 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeactivateExperimentMetricWithETagAsync.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "380", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-caf433106748d9f50a63a94c745e5a0d-3dac54bfcaac6ca5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "494", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:45 GMT", + "ETag": "\"l8Z9jdhEkKE=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:45 GMT", + "mise-correlation-id": "14765b7d-2391-4e56-b314-628bfc19111d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "21332ae1-33e8-4c66-930e-18eaac3b7dcd", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"l8Z9jdhEkKE=\"", + "lastModifiedAt": "2025-05-01T04:35:45.1089202+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_deactivate_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "24", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"l8Z9jdhEkKE=\"", + "traceparent": "00-dbee097a83dd3a6c8ebf641b43556955-bdec941f2a3d8a88-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Inactive" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "496", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:45 GMT", + "ETag": "\"2uW29kD3Ewo=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:45 GMT", + "mise-correlation-id": "2881060b-d611-4917-b645-9d7ded67d1ff", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "25216127-b5dc-462a-9060-c558cc8ac12d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"2uW29kD3Ewo=\"", + "lastModifiedAt": "2025-05-01T04:35:45.2603178+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1082103995" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetric.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetric.json new file mode 100644 index 000000000000..318f0773943f --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetric.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "357", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-007bc9fce7b22cccec23bdd9bc60a53d-2f1dc3f093094307-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "462", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:48 GMT", + "ETag": "\"p3+tyW16raU=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:48 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_delete", + "mise-correlation-id": "21a46cd2-d62e-444f-ab26-0cdd732ed40b", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "47e5fe6a-bb39-4855-bcb8-cad432d44932", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete", + "displayName": "Test Metric DeleteExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"p3+tyW16raU=\"", + "lastModifiedAt": "2025-05-01T04:34:48.8306018+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-7afc8b44b464010563fc73596d7568b2-518d38914f2c2c20-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:34:49 GMT", + "mise-correlation-id": "85107f4c-85ff-4805-aaa8-c1944d5a89d1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "a59e0669-d769-4280-8001-96c867c86b40", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6395e61317600c66f44606ed79f80a84-f64be46c160df12c-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:49 GMT", + "mise-correlation-id": "b7759a8b-ecf5-48fb-a344-5d376233942d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "1c714f07-0600-4420-8f7d-258317c97ced", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_delete", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1713532790" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricAsync.json new file mode 100644 index 000000000000..716e76beb27c --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricAsync.json @@ -0,0 +1,150 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "356", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-844a0e21e01cca64573442bb30a320b9-fa02893be0e61a98-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "461", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:47 GMT", + "ETag": "\"5yDQTuqhpkk=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:47 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_delete", + "mise-correlation-id": "b24ae763-0c90-4376-bd68-8328f1dff71f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "6f638c2b-8de1-4057-a3a9-17698a0d01ce", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete", + "displayName": "Test Metric DeleteExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"5yDQTuqhpkk=\"", + "lastModifiedAt": "2025-05-01T04:35:47.6958853+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d21c65faba8f090baebd67a74578386c-aaae982e98ac511d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:35:47 GMT", + "mise-correlation-id": "fbb93c74-9cfa-4ce9-ab87-63b66fbe1248", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "10559d92-263b-4989-b2a2-cf1105b53bc8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5c026e77a430e2f3ca3a86118ae3e517-efea81cf833cfe32-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:48 GMT", + "mise-correlation-id": "0f646c5d-7393-43c5-88bf-c2bf7c910fa5", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "78a59fd5-56ac-4a26-844b-94fcabbca6d8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_delete", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "453090569" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailed.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailed.json new file mode 100644 index 000000000000..3ed137b0e300 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailed.json @@ -0,0 +1,170 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "393", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-78a67054b932349fa06fb872c3b578c4-0cbc1df3ec031a32-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "508", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:51 GMT", + "ETag": "\"qv09oLOHyCo=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:51 GMT", + "mise-correlation-id": "947253dc-9d90-4b0c-9ada-9e89bfedd0c8", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "1261ffe1-287e-48f9-b35b-810b38428e2e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qv09oLOHyCo=\"", + "lastModifiedAt": "2025-05-01T04:34:51.6601683+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "If-Match": "\"incorrect-etag-value\"", + "traceparent": "00-d69755ae9a909868e13ba6ccb1ae6846-c262f160dee0752c-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:51 GMT", + "mise-correlation-id": "44bfb151-e325-4665-97e5-ca57eece866d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "4d744b97-90c1-4b7f-9f67-1c4be1521507", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-3a9d545d79098b5114894f7179f1bf7d-96e76c562f5d9865-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "508", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:52 GMT", + "ETag": "\"qv09oLOHyCo=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:51 GMT", + "mise-correlation-id": "1407d762-fc80-46f9-b36d-1223be5cfaff", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "6578af21-eaf2-49d1-9b88-5ed9a3a71ee8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qv09oLOHyCo=\"", + "lastModifiedAt": "2025-05-01T04:34:51.6601683+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "720041987" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailedAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailedAsync.json new file mode 100644 index 000000000000..363076a2295e --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricPreconditionFailedAsync.json @@ -0,0 +1,170 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "392", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-e2199cae8612699896a2c00cbe6b619e-6c1f9cfde1b2b3f7-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "507", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:50 GMT", + "ETag": "\"E3QQrEayB0U=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:50 GMT", + "mise-correlation-id": "cd3e8545-6e97-47b2-8f68-482d15123943", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "06dedbef-4859-4379-8475-c991e8efa5ce", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"E3QQrEayB0U=\"", + "lastModifiedAt": "2025-05-01T04:35:50.4649116+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "If-Match": "\"incorrect-etag-value\"", + "traceparent": "00-62ed215596019f35664a01ceaf13c135-45f845c0bcedcd28-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:50 GMT", + "mise-correlation-id": "0ad63236-7078-4141-aff4-31f532643a5f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "b57f1be8-89eb-48e6-ac9b-b8f297347471", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag_fail?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-9795e445a734e622e4bdc3f161c9d8d1-3a3d54a01b5b968d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "507", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:50 GMT", + "ETag": "\"E3QQrEayB0U=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:50 GMT", + "mise-correlation-id": "fdb3bb42-dc22-41be-b8b8-1175493e62e2", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "10255a0a-50c9-4512-8f9b-0ac271bbdf63", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"E3QQrEayB0U=\"", + "lastModifiedAt": "2025-05-01T04:35:50.4649116+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "450331746" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETag.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETag.json new file mode 100644 index 000000000000..75cc7a1a34ac --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETag.json @@ -0,0 +1,151 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "373", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-d5b7c4c6e7a56afd1b9d67ef6b50e810-3b032107a826cdd1-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "483", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:54 GMT", + "ETag": "\"d7WqT7hvweA=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:54 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_delete_etag", + "mise-correlation-id": "5242aaef-8feb-4cd1-9c31-3a4b4b23cae7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "ddabaceb-d6ec-408b-9095-9352d7e0ccd0", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag", + "displayName": "Test Metric DeleteExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"d7WqT7hvweA=\"", + "lastModifiedAt": "2025-05-01T04:34:54.4355669+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "If-Match": "\"d7WqT7hvweA=\"", + "traceparent": "00-7638625fec965a5a9492be6fae2565c0-3727844912b99bbf-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:34:54 GMT", + "mise-correlation-id": "4b9714f1-bd13-4d3f-bbd1-ab5589ba2d62", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "3c99b8e8-b345-40f1-89ac-9a75c8f2f142", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b8fb25cdd4c1c5e40d411d6769e3d454-38f1e438420d4272-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:54 GMT", + "mise-correlation-id": "16a4fbd4-5ff1-4f5d-b11e-4f3e02ff2187", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "44539d25-bea2-488e-ac21-9e6856ccab0a", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_delete_etag", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "705894191" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETagAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETagAsync.json new file mode 100644 index 000000000000..bc38d5a5200f --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/DeleteExperimentMetricWithETagAsync.json @@ -0,0 +1,151 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "372", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-a0140e53516488892e9f22ab443437f9-d5b8a04ddd545e43-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric DeleteExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 201, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "482", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:53 GMT", + "ETag": "\"4tq9rMlGj3Y=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:53 GMT", + "Location": "/workspaces/3498ec60-ff3f-4fb4-8064-bfcf8de553aa/experiment-metrics/test_metric_delete_etag", + "mise-correlation-id": "a2638bc0-1216-4339-94c0-965f1a1567ac", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "13bce9fc-d13f-4725-a466-277b980fe819", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag", + "displayName": "Test Metric DeleteExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"4tq9rMlGj3Y=\"", + "lastModifiedAt": "2025-05-01T04:35:53.2141829+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "If-Match": "\"4tq9rMlGj3Y=\"", + "traceparent": "00-565f34d1fe70dd81276022c66c7a17a8-81ab5dbbb591a8d8-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 204, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Date": "Thu, 01 May 2025 04:35:53 GMT", + "mise-correlation-id": "8116ab1a-5f69-4df8-bd48-2acf6b8d47e2", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "85d3d23b-0980-482a-83f7-92b972aa63a7", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": null + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_delete_etag?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1ddc6a2257544c21da6e35a219df16d6-79aabe688bedc15b-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:53 GMT", + "mise-correlation-id": "733b01a2-192e-4728-92db-ef2a2ebe7232", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "689dc534-eb76-4435-8d9f-3a0bc956713b", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_delete_etag", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "409370137" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricById.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricById.json new file mode 100644 index 000000000000..ee4d3beb0080 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricById.json @@ -0,0 +1,128 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_retrieve?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "359", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-04988fe57c7c22097b0cf8645f0f85e1-9eca85401f39cc4d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "466", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:57 GMT", + "ETag": "\"cfeqG0VqwBk=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:57 GMT", + "mise-correlation-id": "4f3523aa-1aec-4f12-bf37-6b8c9985749e", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "c55a3d45-f592-46fe-bbb7-2153ed7e3602", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cfeqG0VqwBk=\"", + "lastModifiedAt": "2025-05-01T04:34:57.1816873+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_retrieve?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-691df060e303dba710890c0076e11207-97d6560dcfda13d5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "466", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:57 GMT", + "ETag": "\"cfeqG0VqwBk=\"", + "Last-Modified": "Thu, 01 May 2025 04:34:57 GMT", + "mise-correlation-id": "dd732f4a-8957-455e-8087-768f3dbd4cc7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "2ddf8506-c7b6-49d9-9351-65bfcdb0306e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cfeqG0VqwBk=\"", + "lastModifiedAt": "2025-05-01T04:34:57.1816873+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "104425337" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdAsync.json new file mode 100644 index 000000000000..9b2998f44877 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdAsync.json @@ -0,0 +1,128 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_retrieve?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "358", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-849d8ffb578218c4acca92dd67973f8d-7bff19e6c18f857d-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "465", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:57 GMT", + "ETag": "\"lLKY+G3QglE=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:57 GMT", + "mise-correlation-id": "4cd4e802-6b55-4469-bbc4-663cf15b9261", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "99112889-8711-4538-8dd8-bedb9cc9fddf", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"lLKY+G3QglE=\"", + "lastModifiedAt": "2025-05-01T04:35:57.0364151+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_retrieve?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b01204da6158ce47df8e21c069ef67d2-57f9afa2d7bb2b4f-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "465", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:57 GMT", + "ETag": "\"lLKY+G3QglE=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:57 GMT", + "mise-correlation-id": "03bf8ed6-76f5-45c4-9835-9ea20a58ea8b", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e1dae4ad-a139-45e6-a281-00edcf7caf61", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"lLKY+G3QglE=\"", + "lastModifiedAt": "2025-05-01T04:35:57.0364151+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1821150187" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFound.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFound.json new file mode 100644 index 000000000000..76db0311707c --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFound.json @@ -0,0 +1,50 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_does_not_exist?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-c50586fc9297ef9da8fd78a4056e137a-9169b920ae105494-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:34:59 GMT", + "mise-correlation-id": "55d1e569-9ab1-4ec5-bab7-442402858c7c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "9c7d0130-aa6d-4325-ad22-e121d9cba764", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_does_not_exist", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "73068868" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFoundAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFoundAsync.json new file mode 100644 index 000000000000..51b80b0b5037 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/GetExperimentMetricByIdNotFoundAsync.json @@ -0,0 +1,50 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_does_not_exist?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5566933c346eddf0cdc7b344b9715f36-4418e9cc042d8d27-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:59 GMT", + "mise-correlation-id": "814b01bd-c2e3-420b-978f-09f8b9e5988d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "Transfer-Encoding": "chunked", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "NotFound", + "x-ms-request-id": "53aa1bec-c456-441a-993a-7cadac9b1b85", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "NotFound", + "message": "Metric not found", + "target": "test_metric_does_not_exist", + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "400469612" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetrics.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetrics.json new file mode 100644 index 000000000000..39c7f24e45a4 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetrics.json @@ -0,0 +1,591 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_0?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "355", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-202b52b53dfa631f46fb64111cb93541-6b1254e628249de4-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "460", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:02 GMT", + "ETag": "\"bRJg3wQuaLY=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:02 GMT", + "mise-correlation-id": "3cbbda52-cce3-4767-a97e-c3c708a7ed15", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "961caa33-2501-45dc-b1fd-5036c74bde4a", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bRJg3wQuaLY=\"", + "lastModifiedAt": "2025-05-01T04:35:02.2043379+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_1?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "355", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-64b7c185e6141cbd71d0cb79e9a444d1-c517cf2d367a55b1-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "460", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:02 GMT", + "ETag": "\"asly93vPnnE=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:02 GMT", + "mise-correlation-id": "b6e173b4-18ac-477d-846e-607ef8b127d7", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "24c183dd-7607-473b-9912-8b4a11747469", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"asly93vPnnE=\"", + "lastModifiedAt": "2025-05-01T04:35:02.3668282+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_2?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "355", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-938b452df8ed5159b72ea94687e36088-8abd41de3c9ae5dd-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "460", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:02 GMT", + "ETag": "\"vYRtmVl8tHU=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:02 GMT", + "mise-correlation-id": "f7e14919-f1d1-4dc8-bb8d-0b95e6a43cbc", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "ed563cf9-f7bd-498c-b7dd-b2ebbc648813", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"vYRtmVl8tHU=\"", + "lastModifiedAt": "2025-05-01T04:35:02.5459419+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5b39d163fb7823ed9eb37f9262b142c9-1e730d7c7b6978a4-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "8618", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:02 GMT", + "mise-correlation-id": "df358c01-9b5f-43f9-8078-d8450cef978d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e767b67c-a6c9-4bcc-b571-c0fb4bac6c90", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_or_update", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qOF7bCW8W7s=\"", + "lastModifiedAt": "2025-05-01T02:21:49.158338+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JutorBLJ9OY=\"", + "lastModifiedAt": "2025-05-01T04:34:23.9770525+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"zUPCwfvmxh0=\"", + "lastModifiedAt": "2025-05-01T04:34:27.6438691+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"R2DHqnWRi+4=\"", + "lastModifiedAt": "2025-05-01T04:34:30.1618885+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"upt1shNNgZo=\"", + "lastModifiedAt": "2025-05-01T04:34:41.0174278+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JR6UkVIRbKo=\"", + "lastModifiedAt": "2025-05-01T04:34:43.4752277+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"/BC2QWRqGyY=\"", + "lastModifiedAt": "2025-05-01T04:34:46.335715+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qv09oLOHyCo=\"", + "lastModifiedAt": "2025-05-01T04:34:51.6601683+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cfeqG0VqwBk=\"", + "lastModifiedAt": "2025-05-01T04:34:57.1816873+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bRJg3wQuaLY=\"", + "lastModifiedAt": "2025-05-01T04:35:02.2043379+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"asly93vPnnE=\"", + "lastModifiedAt": "2025-05-01T04:35:02.3668282+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"vYRtmVl8tHU=\"", + "lastModifiedAt": "2025-05-01T04:35:02.5459419+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:34:06.5364634+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:34:09.1264599+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"gb4lJU9RxE8=\"", + "lastModifiedAt": "2025-05-01T04:34:11.5812701+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"j2psW0U8l5w=\"", + "lastModifiedAt": "2025-05-01T04:34:02.1407069+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"6ld3jtUKHCw=\"", + "lastModifiedAt": "2025-05-01T04:34:02.3316789+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:34:33.0330161+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:34:35.7269418+00:00" + } + ] + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "17605172" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsAsync.json new file mode 100644 index 000000000000..766a62b757f8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsAsync.json @@ -0,0 +1,590 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_0?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "354", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-39dae94cbb23e06d6add5384b9ac6c6f-71f7e743d6802942-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "459", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:02 GMT", + "ETag": "\"qr6xMh/Ohqc=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:02 GMT", + "mise-correlation-id": "90ae50ec-153b-456f-a6b0-03b040681f92", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "4159a1d2-47ed-49a7-82a4-05f95de698b8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qr6xMh/Ohqc=\"", + "lastModifiedAt": "2025-05-01T04:36:02.2312079+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_1?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "354", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-8ae81cb445fe9f975850987b1049dff6-4510d277cdfcb5b5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "459", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:02 GMT", + "ETag": "\"9oJ1ldTIg0o=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:02 GMT", + "mise-correlation-id": "278cf997-ab71-412e-a975-77c25252fc30", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "b312cf1f-a8af-4fa3-9a13-5dab789127d7", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"9oJ1ldTIg0o=\"", + "lastModifiedAt": "2025-05-01T04:36:02.3927779+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_2?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "354", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-957824b1a45b7bed50e85d0bd1df6a53-68b1d37f99811b81-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "459", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:02 GMT", + "ETag": "\"bLaMhhLQUaU=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:02 GMT", + "mise-correlation-id": "efb3df1b-c630-4a75-983e-ba41db84ae20", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "59e29202-4ecf-4c08-89a0-8cee7dff9489", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bLaMhhLQUaU=\"", + "lastModifiedAt": "2025-05-01T04:36:02.5578023+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "8609", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:02 GMT", + "mise-correlation-id": "7df45478-eb44-4a5d-aa29-bfd453df9df1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "3d91731d-34de-4e9f-8e64-f0e734a7b9a8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_or_update", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qOF7bCW8W7s=\"", + "lastModifiedAt": "2025-05-01T02:21:49.158338+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"s3lTmA/v+iw=\"", + "lastModifiedAt": "2025-05-01T04:35:22.7923878+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"4h+lmrlzwCM=\"", + "lastModifiedAt": "2025-05-01T04:35:25.7497425+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"50eFsl0PJes=\"", + "lastModifiedAt": "2025-05-01T04:35:28.7566612+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bt+tkBy2Ajo=\"", + "lastModifiedAt": "2025-05-01T04:35:39.6673576+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"5hPf3Pdplo8=\"", + "lastModifiedAt": "2025-05-01T04:35:42.1693751+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"2uW29kD3Ewo=\"", + "lastModifiedAt": "2025-05-01T04:35:45.2603178+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"E3QQrEayB0U=\"", + "lastModifiedAt": "2025-05-01T04:35:50.4649116+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"lLKY+G3QglE=\"", + "lastModifiedAt": "2025-05-01T04:35:57.0364151+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qr6xMh/Ohqc=\"", + "lastModifiedAt": "2025-05-01T04:36:02.2312079+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"9oJ1ldTIg0o=\"", + "lastModifiedAt": "2025-05-01T04:36:02.3927779+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetrics", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetrics)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bLaMhhLQUaU=\"", + "lastModifiedAt": "2025-05-01T04:36:02.5578023+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:35:10.1269139+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:35:12.7608955+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"aO89ZnioWaM=\"", + "lastModifiedAt": "2025-05-01T04:35:15.1874465+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"sn+LTHyh7gA=\"", + "lastModifiedAt": "2025-05-01T04:35:05.6708239+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"c/EmzgnnIUE=\"", + "lastModifiedAt": "2025-05-01T04:35:05.85767+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:35:31.5736411+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:35:34.4391386+00:00" + } + ] + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "816287547" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameter.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameter.json new file mode 100644 index 000000000000..926f00777ee1 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameter.json @@ -0,0 +1,1060 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_0?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "387", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-804541542e9434f5c00859191a6068aa-4b663deb9ae22ba4-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "492", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:05 GMT", + "ETag": "\"I+L1eobx0LM=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:05 GMT", + "mise-correlation-id": "f8d5e160-3c7b-4db2-8b11-1b44fc4b7404", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "8d74d7a9-34c0-4dbd-827d-951ca23629be", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"I+L1eobx0LM=\"", + "lastModifiedAt": "2025-05-01T04:35:05.1999803+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_1?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "387", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-9ed39835b493b38359ca0d35d2e41156-36ca357bf13950a6-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "492", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:05 GMT", + "ETag": "\"V9o8wd08tKY=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:05 GMT", + "mise-correlation-id": "c37eef00-8ca2-47fc-b4b7-15375af35921", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "a559a6cd-7911-4753-bb43-96914577c7df", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"V9o8wd08tKY=\"", + "lastModifiedAt": "2025-05-01T04:35:05.3617882+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_2?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "387", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-52492747fdd895dddd7f1ed87d99bd08-8d04ba4ae2af0054-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "492", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:05 GMT", + "ETag": "\"Ch9bblducSM=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:05 GMT", + "mise-correlation-id": "c3f59ddf-c47c-4f44-8871-bcac0760bd22", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e1e9ba6e-5edc-462c-b7f1-944ef7ae1f38", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"Ch9bblducSM=\"", + "lastModifiedAt": "2025-05-01T04:35:05.5163582+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_3?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "387", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-709874f35700525cfc946cd12694a0c6-a9a5b84d77b1ad1f-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "492", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:05 GMT", + "ETag": "\"sn+LTHyh7gA=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:05 GMT", + "mise-correlation-id": "73637842-b1a7-4589-8869-b933c07bdb6a", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "debd0802-2d93-4d3b-beec-3b4aba2e062e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"sn+LTHyh7gA=\"", + "lastModifiedAt": "2025-05-01T04:35:05.6708239+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_4?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "387", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-e6dad9cc7ce5e328e3e4c2dd12a8104c-5c26c58baafbd4c2-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "490", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:05 GMT", + "ETag": "\"c/EmzgnnIUE=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:05 GMT", + "mise-correlation-id": "0ed0365d-08fe-4ee1-8ec3-596e0c14ff89", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "d1ba8f59-81a5-42e5-9431-d043053812b8", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"c/EmzgnnIUE=\"", + "lastModifiedAt": "2025-05-01T04:35:05.85767+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-455b281ecc8eca91b23e7f38649a9801-5eb1cb4746a9a229-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "967", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "322df0c5-56cf-49e9-90b2-72782a6dce02", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "751532cb-8788-400e-9058-8887aadc22fb", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_or_update", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qOF7bCW8W7s=\"", + "lastModifiedAt": "2025-05-01T02:21:49.158338+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JutorBLJ9OY=\"", + "lastModifiedAt": "2025-05-01T04:34:23.9770525+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=2" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-45fe161cb667a083fee192a704d8848b-c1bfc760b440259b-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1177", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "80cc2dea-6021-469a-ba1b-c85901dd0f2d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "1bb72405-c1e2-4886-9e13-31bffd48a110", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"zUPCwfvmxh0=\"", + "lastModifiedAt": "2025-05-01T04:34:27.6438691+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"R2DHqnWRi+4=\"", + "lastModifiedAt": "2025-05-01T04:34:30.1618885+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=4" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-33bdee75d23b1c81ef2521e2ac237c62-6836b116d09e6cc1-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1152", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "1e5ccf38-faa8-472a-8f8d-5688595d4a1c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "ab9da08b-d3b1-4da5-8b00-9590732db2df", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"upt1shNNgZo=\"", + "lastModifiedAt": "2025-05-01T04:34:41.0174278+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"JR6UkVIRbKo=\"", + "lastModifiedAt": "2025-05-01T04:34:43.4752277+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=6" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=6", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d9ace8e1d2b16e0bd9548d77a3c21585-a3aa4f8d530c9a95-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1160", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "41dc099b-7f09-45cd-8d9d-ae7b3625c7a4", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "16156c5e-51c2-4b79-aad8-d68bd7afc059", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"/BC2QWRqGyY=\"", + "lastModifiedAt": "2025-05-01T04:34:46.335715+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qv09oLOHyCo=\"", + "lastModifiedAt": "2025-05-01T04:34:51.6601683+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=8" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a8f771c790060dae1cd529c62869a1c2-e218da9fe70f477e-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1115", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "47bc7698-317c-45f3-b9e2-fbf5f585994c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "e374ff2e-43c9-4a06-8fd6-45d80c056f36", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cfeqG0VqwBk=\"", + "lastModifiedAt": "2025-05-01T04:34:57.1816873+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"I+L1eobx0LM=\"", + "lastModifiedAt": "2025-05-01T04:35:05.1999803+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=10" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=10", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-3addf0013bccfb895a48fe6a1150d65d-3aba535ddfc9b53f-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1141", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:06 GMT", + "mise-correlation-id": "cd93d05f-4db6-41b6-be49-c762acd4a8b2", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "66c08a33-c62c-48aa-bb17-c18fce5d588c", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"V9o8wd08tKY=\"", + "lastModifiedAt": "2025-05-01T04:35:05.3617882+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"Ch9bblducSM=\"", + "lastModifiedAt": "2025-05-01T04:35:05.5163582+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=12" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=12", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-1cd60089f429b17484bbe683b3ffdc1c-c486f35e18d20cd2-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "849", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:07 GMT", + "mise-correlation-id": "2813e14b-4943-4f45-ab7e-4970ee36c3a5", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "9d27c1a7-8824-44fe-a4f4-f8c9f0f26be2", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:34:06.5364634+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:34:09.1264599+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=14" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=14", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-43ab57a52b67084d164e0473851796d5-5e7a2d95fddab911-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1169", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:07 GMT", + "mise-correlation-id": "59f1ebea-dd05-4a37-a3ee-3d495b3dc252", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "303069aa-7fc0-41e9-be9d-6657bd248671", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"gb4lJU9RxE8=\"", + "lastModifiedAt": "2025-05-01T04:34:11.5812701+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"sn+LTHyh7gA=\"", + "lastModifiedAt": "2025-05-01T04:35:05.6708239+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=16" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=16", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-04d3583fbd2bf88687316ea5986d4449-5bc4d87898d78953-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "973", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:07 GMT", + "mise-correlation-id": "a60bca80-f109-4d53-a095-1387a7484be1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "163250e2-3c99-450c-8576-46fef956ae8a", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"c/EmzgnnIUE=\"", + "lastModifiedAt": "2025-05-01T04:35:05.85767+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:34:33.0330161+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=18" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=18", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0861ba6026987cc53ba0f4862b0b8abe-0b7e18f14db2eda1-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:07 GMT", + "mise-correlation-id": "19ceaf1d-d9f4-40cc-84dc-b54fa4f050c5", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "a223bc30-1ae9-4900-930b-47b3e78e3df5", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:34:35.7269418+00:00" + } + ] + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "520982584" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameterAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameterAsync.json new file mode 100644 index 000000000000..365e348dffcc --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ListExperimentMetricsWithTopParameterAsync.json @@ -0,0 +1,1050 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_0?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "386", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-c5d0f050ef05420b39d1b9a13f82366f-58aa52f80588cadc-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:05 GMT", + "ETag": "\"hDy8i0gwy1Q=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:05 GMT", + "mise-correlation-id": "02492a21-444c-4e2c-a9d8-73c799700fa0", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "80d4d14e-63f3-449d-b0f2-8a1d9850dda7", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"hDy8i0gwy1Q=\"", + "lastModifiedAt": "2025-05-01T04:36:05.5930275+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_1?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "386", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-9ec54fed053ae0c3505c8fc64b0a0c95-4108705ecc8cd904-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:05 GMT", + "ETag": "\"f9UUxi8OjFQ=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:05 GMT", + "mise-correlation-id": "5bf66d2c-d54e-4adb-9ffa-83d3fed8a3bd", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "60b80d42-080a-4309-8929-eef55db17e6a", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"f9UUxi8OjFQ=\"", + "lastModifiedAt": "2025-05-01T04:36:05.7887799+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_2?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "386", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-9e5c74c8d4a8a717ea665d6ea412ae01-e60b81d8e4b679ae-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:05 GMT", + "ETag": "\"cHyMCXEFjUA=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:05 GMT", + "mise-correlation-id": "9dd98910-e4c0-40bf-b509-e5fe31615676", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "a4e8a119-04c8-40fc-aa7b-9af66a56b902", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cHyMCXEFjUA=\"", + "lastModifiedAt": "2025-05-01T04:36:05.9386032+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_3?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "386", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-c9925e6b37faec2cc52277ae8b5cbe6c-99523a4458b99e90-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "ETag": "\"j2psW0U8l5w=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "b9c4fa20-5af7-48b2-81cc-7eced6bfaab2", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "de6ad4b8-d345-46c0-9827-9779f4cf7c22", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"j2psW0U8l5w=\"", + "lastModifiedAt": "2025-05-01T04:36:06.1096547+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_list_4?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "386", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-40b762b720fcb17a6568717e5208613a-bbc7e2a20785bbe0-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "491", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "ETag": "\"6ld3jtUKHCw=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "4873d78a-480b-40e6-8e52-e7d6849ec604", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "35a34624-1605-48b5-93e6-26032c12b060", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"6ld3jtUKHCw=\"", + "lastModifiedAt": "2025-05-01T04:36:06.2534375+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "966", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "64dd02c7-f60f-4fb7-b99c-dc16a3314e2b", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "d9c58ea6-e859-46a2-9d7b-98c234feebe1", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_or_update", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"qOF7bCW8W7s=\"", + "lastModifiedAt": "2025-05-01T02:21:49.158338+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate", + "displayName": "Test Metric ActivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"s3lTmA/v+iw=\"", + "lastModifiedAt": "2025-05-01T04:35:22.7923878+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=2" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=2", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1175", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "b713c036-8da4-4c63-9c20-50f7a42bc3d9", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "1e004610-6a1d-48ba-bfc9-e9fb4bc5f611", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag", + "displayName": "Test Metric ActivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"4h+lmrlzwCM=\"", + "lastModifiedAt": "2025-05-01T04:35:25.7497425+00:00" + }, + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_activate_etag_fail", + "displayName": "Test Metric ActivateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ActivateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"50eFsl0PJes=\"", + "lastModifiedAt": "2025-05-01T04:35:28.7566612+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=4" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=4", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1150", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "5be360e2-6687-4953-be5e-942a293e2261", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "f86bb9e9-fabd-4b06-b6a0-145081e5a159", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate", + "displayName": "Test Metric DeactivateExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"bt+tkBy2Ajo=\"", + "lastModifiedAt": "2025-05-01T04:35:39.6673576+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag_fail", + "displayName": "Test Metric DeactivateExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"5hPf3Pdplo8=\"", + "lastModifiedAt": "2025-05-01T04:35:42.1693751+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=6" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=6", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1159", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:06 GMT", + "mise-correlation-id": "1b133afe-b06d-45f2-bda3-853a076ec9d8", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "b7db5574-2637-44bf-9156-ecb5fd0e04ce", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Inactive", + "desiredDirection": "Increase", + "id": "test_metric_deactivate_etag", + "displayName": "Test Metric DeactivateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeactivateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"2uW29kD3Ewo=\"", + "lastModifiedAt": "2025-05-01T04:35:45.2603178+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_delete_etag_fail", + "displayName": "Test Metric DeleteExperimentMetricPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).DeleteExperimentMetricPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"E3QQrEayB0U=\"", + "lastModifiedAt": "2025-05-01T04:35:50.4649116+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=8" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=8", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1113", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "7abb6839-d766-4088-9f30-f1ae89bc4afb", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "b18c1d6b-a5a5-48d5-a4dd-e8d6a98b4f5e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_retrieve", + "displayName": "Test Metric GetExperimentMetricById", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).GetExperimentMetricById)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"lLKY+G3QglE=\"", + "lastModifiedAt": "2025-05-01T04:35:57.0364151+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_0", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"hDy8i0gwy1Q=\"", + "lastModifiedAt": "2025-05-01T04:36:05.5930275+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=10" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=10", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1139", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "34d895af-aa50-4c9e-88e2-c51d47a21654", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "ad5646e7-98c6-43d3-a7ae-7856f6534d74", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_1", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"f9UUxi8OjFQ=\"", + "lastModifiedAt": "2025-05-01T04:36:05.7887799+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_2", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"cHyMCXEFjUA=\"", + "lastModifiedAt": "2025-05-01T04:36:05.9386032+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=12" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=12", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "849", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "a5397ac8-5d2d-465a-a3a9-67dd4abd2ec0", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "1da1ace7-57ad-44b8-ba0f-50c97af8f627", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:35:10.1269139+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:35:12.7608955+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=14" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=14", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1169", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "4db68fd4-e762-447a-b89b-f70fdd8955f1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "cf37e349-f216-4bd9-abab-6c23fc236bf5", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"aO89ZnioWaM=\"", + "lastModifiedAt": "2025-05-01T04:35:15.1874465+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_3", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"j2psW0U8l5w=\"", + "lastModifiedAt": "2025-05-01T04:36:06.1096547+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=16" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=16", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "974", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "0d3c684d-606b-461d-9221-85bed1927d16", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "653db3bd-6638-4ea0-89b5-e835e11494bd", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_list_4", + "displayName": "Test Metric ListExperimentMetricsWithTopParameter", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).ListExperimentMetricsWithTopParameter)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"6ld3jtUKHCw=\"", + "lastModifiedAt": "2025-05-01T04:36:06.2534375+00:00" + }, + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metri", + "displayName": "New Test Metric", + "description": "A metric created for testing purposes", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"YG7X7NypAo8=\"", + "lastModifiedAt": "2025-05-01T04:35:31.5736411+00:00" + } + ], + "nextLink": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=18" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics?api-version=2025-05-31-preview&top=2&skip=18", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "402", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:07 GMT", + "mise-correlation-id": "6d45e681-06c1-4650-ad92-be4225d81603", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "0cb6b976-2dd3-4416-9420-293f5624bf82", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "value": [ + { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_create_if_not_exists", + "displayName": "If-None-Match Test Metric", + "description": "A metric created with If-None-Match header", + "categories": [ + "Test", + "Conditional" + ], + "definition": { + "event": { + "eventName": "ConditionalCreateEvent" + }, + "type": "EventCount" + }, + "eTag": "\"NyoM+7py4jQ=\"", + "lastModifiedAt": "2025-05-01T04:35:34.4391386+00:00" + } + ] + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "463789196" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetric.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetric.json new file mode 100644 index 000000000000..b0bfaceb2fa5 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetric.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_update_existing?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "373", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-527dfae96b2267da493be58c8bde2f5c-c7263a161aabca04-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExistingExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExistingExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "487", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:09 GMT", + "ETag": "\"WyP/w6/VL00=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:09 GMT", + "mise-correlation-id": "1b081c40-d860-4649-89db-3542d8961176", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "02e18e3c-8b10-46ed-8c5d-3b10825b2e9d", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Test Metric UpdateExistingExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExistingExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"WyP/w6/VL00=\"", + "lastModifiedAt": "2025-05-01T04:35:09.9757161+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_update_existing?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "77", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-df69f41d7c87c3021e32f93b1c792f5f-e64b0a2e73f4a6fc-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "Updated Metric", + "description": "This metric has been updated" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "333", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:10 GMT", + "ETag": "\"69TxF6wMaWY=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:10 GMT", + "mise-correlation-id": "c893cebb-ef81-4f99-96ab-66d1ef7f4d3c", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "53a0fd3c-89a0-4a7d-88d6-1e7f49fd49fd", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:35:10.1269139+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "917291627" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetricAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetricAsync.json new file mode 100644 index 000000000000..4108d1b33ada --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExistingExperimentMetricAsync.json @@ -0,0 +1,133 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_update_existing?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "372", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-655512397d5c415dc2679824e967e9d7-cbf4d8508be3b46f-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExistingExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExistingExperimentMetric)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "486", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:10 GMT", + "ETag": "\"2+c6BSLJ9iA=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:10 GMT", + "mise-correlation-id": "db2ba189-1235-43ff-adb4-dd173fd4163e", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "27800b23-2a6d-491c-b25a-2dcd98e556b1", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Test Metric UpdateExistingExperimentMetric", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExistingExperimentMetric)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"2+c6BSLJ9iA=\"", + "lastModifiedAt": "2025-05-01T04:36:10.3506958+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_update_existing?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "77", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-4470b296eca5a2fcda4539becc52d477-df23e8675d356c22-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "Updated Metric", + "description": "This metric has been updated" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "333", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:10 GMT", + "ETag": "\"69TxF6wMaWY=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:10 GMT", + "mise-correlation-id": "52b43de6-0419-4580-9bfc-84b912eeff3d", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "d8ab6a92-4867-4add-a09e-5c21d4834e1f", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_update_existing", + "displayName": "Updated Metric", + "description": "This metric has been updated", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"69TxF6wMaWY=\"", + "lastModifiedAt": "2025-05-01T04:36:10.4879107+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1117792443" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETag.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETag.json new file mode 100644 index 000000000000..025825813af5 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETag.json @@ -0,0 +1,134 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_conditional_update?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "373", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-d369f694c26437a451575e5d7507ce98-03f944aba8faa2ad-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "490", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:12 GMT", + "ETag": "\"8PJY+pz43Kc=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:12 GMT", + "mise-correlation-id": "464ef7ce-df2b-49e9-b397-3c10c2978641", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "03f0f334-8413-4bfa-a554-2d155eadf7da", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Test Metric UpdateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"8PJY+pz43Kc=\"", + "lastModifiedAt": "2025-05-01T04:35:12.5833925+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_conditional_update?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "100", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"8PJY+pz43Kc=\"", + "traceparent": "00-604a8b5fc219ffe280df13d63f214cdb-7484147594cc4645-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "359", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:12 GMT", + "ETag": "\"AlhYUb/g3Iw=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:12 GMT", + "mise-correlation-id": "15c8897e-f212-47e8-b6f9-a3f574278778", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "f6d55bc9-6895-483f-8efd-e7d16282df60", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:35:12.7608955+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "787642163" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagAsync.json new file mode 100644 index 000000000000..c236f42a28f3 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagAsync.json @@ -0,0 +1,134 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_conditional_update?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "372", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-e082b21c37d1396bc1fbf3ef6ef778ae-ff22411c71f53e89-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "489", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:13 GMT", + "ETag": "\"r5IKeTJdQ5E=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:13 GMT", + "mise-correlation-id": "ec33fcf6-9b34-4b3e-bd05-7e02b668f11e", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "41e14986-e9a4-4223-8391-53f24101733e", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Test Metric UpdateExperimentMetricWithETag", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETag)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"r5IKeTJdQ5E=\"", + "lastModifiedAt": "2025-05-01T04:36:13.8002411+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_conditional_update?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "100", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"r5IKeTJdQ5E=\"", + "traceparent": "00-6ef50d4cdf1f285ff209aacfac9cbca4-85208e6ed3eddaaa-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition" + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "359", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:13 GMT", + "ETag": "\"AlhYUb/g3Iw=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:13 GMT", + "mise-correlation-id": "93eaa3a9-3f4d-4816-a1ae-4fdb35c508cd", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "8653076f-89a8-4048-b98a-6946a0b8614f", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_conditional_update", + "displayName": "Updated With ETag", + "description": "This metric has been updated with ETag condition", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"AlhYUb/g3Iw=\"", + "lastModifiedAt": "2025-05-01T04:36:13.9537905+00:00" + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "98711123" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailed.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailed.json new file mode 100644 index 000000000000..bb9bce8f491c --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailed.json @@ -0,0 +1,123 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_if_match_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "409", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-dc1708fc2c0e33c70a3e2c47a1aec71f-1b149044ae9b40a5-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "521", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:15 GMT", + "ETag": "\"aO89ZnioWaM=\"", + "Last-Modified": "Thu, 01 May 2025 04:35:15 GMT", + "mise-correlation-id": "7fb00945-5c7b-45f0-ae2e-52d8271a91a1", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "13b8b962-979f-41d6-b132-f1fb40584f39", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(False).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"aO89ZnioWaM=\"", + "lastModifiedAt": "2025-05-01T04:35:15.1874465+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_if_match_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "101", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"incorrect-etag-value\"", + "traceparent": "00-429a00e7601f0290a6bdbee8813615b2-8d173a44b96ac6f9-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "This Should Not Update", + "description": "This update should fail due to ETag mismatch" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:15 GMT", + "mise-correlation-id": "f9e37cd4-69e2-4dd5-8fd4-592369420fcd", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "187194fd-3491-4185-acb8-fbf0b07d9dd5", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1920920635" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailedAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailedAsync.json new file mode 100644 index 000000000000..c1342ebcb4c0 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/UpdateExperimentMetricWithETagPreconditionFailedAsync.json @@ -0,0 +1,123 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_if_match_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "408", + "Content-Type": "application/merge-patch+json", + "traceparent": "00-3784d8a435f8bb92f7a076e266efdeb9-8c20a9cb5740a751-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "TestEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "520", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:17 GMT", + "ETag": "\"gb4lJU9RxE8=\"", + "Last-Modified": "Thu, 01 May 2025 04:36:17 GMT", + "mise-correlation-id": "31b77cf0-bdeb-4bcb-9cf8-2857c346a026", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "50882d96-504b-4070-bf75-4591c0d568ae", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "lifecycle": "Active", + "desiredDirection": "Increase", + "id": "test_metric_if_match_fail", + "displayName": "Test Metric UpdateExperimentMetricWithETagPreconditionFailed", + "description": "A metric created for testing purposes (Azure.Analytics.OnlineExperimentation.Tests.OnlineExperimentationClientTests(True).UpdateExperimentMetricWithETagPreconditionFailed)", + "categories": [ + "Test" + ], + "definition": { + "event": { + "eventName": "TestEvent" + }, + "type": "EventCount" + }, + "eTag": "\"gb4lJU9RxE8=\"", + "lastModifiedAt": "2025-05-01T04:36:17.3626854+00:00" + } + }, + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics/test_metric_if_match_fail?api-version=2025-05-31-preview", + "RequestMethod": "PATCH", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "101", + "Content-Type": "application/merge-patch+json", + "If-Match": "\"incorrect-etag-value\"", + "traceparent": "00-30bcaddef9b077d03162905f2285bcfb-0080125074fb4f3c-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "displayName": "This Should Not Update", + "description": "This update should fail due to ETag mismatch" + }, + "StatusCode": 412, + "ResponseHeaders": { + "Connection": "keep-alive", + "Content-Length": "161", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:17 GMT", + "mise-correlation-id": "04200d37-b349-4a4b-a68c-2d2e73795f29", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-error-code": "ConditionNotMet", + "x-ms-request-id": "c1d01f33-53c8-4e8b-add8-0c7140c70367", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "error": { + "code": "ConditionNotMet", + "message": "The condition specified in the If-Match request header was not met.", + "target": null, + "details": [], + "innerError": null + } + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1510542945" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalid.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalid.json new file mode 100644 index 000000000000..94d2c71bd7f8 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalid.json @@ -0,0 +1,126 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics:validate?api-version=2025-05-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "287", + "Content-Type": "application/json", + "traceparent": "00-ac82c9ad2f89d1a062ad0505b3805089-d353e1ebbcc32736-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Invalid Metric", + "description": "An invalid metric for validation testing", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ValidationEvent", + "filter": "this is not a valid filter expression." + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1240", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:17 GMT", + "mise-correlation-id": "355dadf3-4024-44c8-b6e0-63d581e3f258", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "5b624f9b-cdac-427b-9da2-5213e405fc20", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "diagnostics": [ + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Missing name" + }, + { + "code": "UnsupportedEventCondition", + "message": "Syntax of kind PathExpression is currently not supproted" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference 'this' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' is' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' not' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' a' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' valid' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' filter' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' expression' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference '' is not supported" + } + ], + "isValid": false + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "744257200" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalidAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalidAsync.json new file mode 100644 index 000000000000..723cace33167 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricInvalidAsync.json @@ -0,0 +1,126 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics:validate?api-version=2025-05-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "287", + "Content-Type": "application/json", + "traceparent": "00-9fa06cabb2466b419fad948a8b6e86e8-87d178677eeb8052-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Invalid Metric", + "description": "An invalid metric for validation testing", + "categories": [ + "Test" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ValidationEvent", + "filter": "this is not a valid filter expression." + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "1240", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:20 GMT", + "mise-correlation-id": "9b0c2575-8a3e-40c5-9c67-3844d3ff4652", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "999cfa98-9691-4f89-8896-deed9b3e01ea", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "diagnostics": [ + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Expected: ;" + }, + { + "code": "InvalidEventCondition", + "message": "Missing name" + }, + { + "code": "UnsupportedEventCondition", + "message": "Syntax of kind PathExpression is currently not supproted" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference 'this' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' is' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' not' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' a' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' valid' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' filter' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference ' expression' is not supported" + }, + { + "code": "UnsupportedEventCondition", + "message": "NameReference '' is not supported" + } + ], + "isValid": false + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "1844972334" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValid.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValid.json new file mode 100644 index 000000000000..27e2fd9b0efa --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValid.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics:validate?api-version=2025-05-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "245", + "Content-Type": "application/json", + "traceparent": "00-52aa58bb6a8ef3fcb5c4f36876f5cf65-0257ed73b56f1ce6-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Valid Metric", + "description": "A valid metric for validation testing", + "categories": [ + "Test", + "Validation" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ValidationEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "33", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:35:20 GMT", + "mise-correlation-id": "26be99a5-7a6b-474d-903f-37302f140b3f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "929496a6-9d07-4fdf-9e2c-082df9fdb202", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "diagnostics": [], + "isValid": true + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "532578383" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValidAsync.json b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValidAsync.json new file mode 100644 index 000000000000..9a49dd809a21 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tests/SessionRecords/OnlineExperimentationClientTests/ValidateExperimentMetricValidAsync.json @@ -0,0 +1,61 @@ +{ + "Entries": [ + { + "RequestUri": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net/experiment-metrics:validate?api-version=2025-05-31-preview", + "RequestMethod": "POST", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "245", + "Content-Type": "application/json", + "traceparent": "00-e9968af210af96d39e7c49824d007124-fe213b1a72f4da9c-00", + "User-Agent": "azsdk-net-Analytics.OnlineExperimentation/1.0.0-alpha.20250430.1 (.NET 9.0.4; Microsoft Windows 10.0.26100)", + "x-ms-client-request-id": "Sanitized", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "lifecycle": "Active", + "displayName": "Valid Metric", + "description": "A valid metric for validation testing", + "categories": [ + "Test", + "Validation" + ], + "desiredDirection": "Increase", + "definition": { + "type": "EventCount", + "event": { + "eventName": "ValidationEvent" + } + } + }, + "StatusCode": 200, + "ResponseHeaders": { + "api-supported-versions": "2025-05-31-preview", + "Connection": "keep-alive", + "Content-Length": "33", + "Content-Type": "application/json; charset=utf-8", + "Date": "Thu, 01 May 2025 04:36:24 GMT", + "mise-correlation-id": "807558b2-2853-4826-9d8a-4497b7e3ce0f", + "Request-Context": "appId=cid-v1:4ae78417-7f25-4068-bd96-557cb165ec62", + "Server": "Microsoft-IIS/10.0", + "Strict-Transport-Security": "max-age=31536000", + "X-Content-Type-Options": [ + "nosniff", + "nosniff" + ], + "x-ms-client-request-id": "Sanitized", + "x-ms-request-id": "fc5cb947-5eeb-4fa9-a1c2-da77c31ba383", + "X-Powered-By": "ASP.NET" + }, + "ResponseBody": { + "diagnostics": [], + "isValid": true + } + } + ], + "Variables": { + "ENDPOINT": "https://3498ec60-ff3f-4fb4-8064-bfcf8de553aa.eastus2.exp.azure.net", + "RandomSeed": "230707760" + } +} diff --git a/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tsp-location.yaml b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tsp-location.yaml new file mode 100644 index 000000000000..2c7a7b6d2609 --- /dev/null +++ b/sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/onlineexperimentation/Azure.Analytics.OnlineExperimentation +commit: 7b94be99f4c65d06d2b980843ac54234becbbdda +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/onlineexperimentation/ci.yml b/sdk/onlineexperimentation/ci.yml new file mode 100644 index 000000000000..ee3c08960228 --- /dev/null +++ b/sdk/onlineexperimentation/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/onlineexperimentation + - sdk/onlineexperimentation/ci.yml + - sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + paths: + include: + - sdk/onlineexperimentation + - sdk/onlineexperimentation/ci.yml + - sdk/onlineexperimentation/Azure.Analytics.OnlineExperimentation + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: onlineexperimentation + ArtifactName: packages + Artifacts: + - name: Azure.Analytics.OnlineExperimentation + safeName: AzureAnalyticsOnlineExperimentation diff --git a/sdk/onlineexperimentation/test-resources-pre.ps1 b/sdk/onlineexperimentation/test-resources-pre.ps1 new file mode 100644 index 000000000000..4bb6054ca2e1 --- /dev/null +++ b/sdk/onlineexperimentation/test-resources-pre.ps1 @@ -0,0 +1,48 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# IMPORTANT: Do not invoke this file directly. Please instead run eng/New-TestResources.ps1 from the repository root. + +#Requires -Version 6.0 +#Requires -PSEdition Core + +# Use same parameter names as declared in eng/New-TestResources.ps1 (assume validation therein). +[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] +param ( + [Parameter(Mandatory = $true)] + [string] $SubscriptionId, + + [Parameter()] + [string] $BaseName, + + # Captures any arguments from eng/New-TestResources.ps1 not declared here (no parameter errors). + [Parameter(ValueFromRemainingArguments = $true)] + $RemainingArguments +) + +# If the App Configuration store is in a soft-deleted state the ARM deployment fails with error code NameUnavailable. +Write-Output "Checking for App Configuration store named $BaseName-* is in soft-deleted state..." +$appConfigSoftDeleted = Get-AzAppConfigurationDeletedStore -ErrorAction SilentlyContinue | Where-Object Name -like "$BaseName-*"; +if ($appConfigSoftDeleted) { + Write-Output "Purging App Configuration store '$($appConfigSoftDeleted.Name)'..." + $appConfigSoftDeleted | Clear-AzAppConfigurationDeletedStore; +} +else { + Write-Output "No soft-deleted App Configuration stores with name $BaseName-* detected." +} + +Write-Output "Checking for KeyVaults $BaseName-* is in soft-deleted state..." +$keyVaultSoftDeleted = Get-AzKeyVault -InRemovedState -ErrorAction SilentlyContinue | Where-Object VaultName -like "$BaseName-*"; +if ($keyVaultSoftDeleted) { + if ($keyVaultSoftDeleted.EnablePurgeProtection) { + Write-Output "KeyVault '$($keyVaultSoftDeleted.VaultName)' is purge-protected, deployment will use createMode='recover'." + $templateFileParameters['keyVaultIsSoftDeleted'] = $true; + } + else { + Write-Output "Purging KeyVault '$($keyVaultSoftDeleted.VaultName)'..." + $keyVaultSoftDeleted | Remove-AzKeyVault -Force; + } +} +else { + Write-Output "No soft-deleted KeyVaults with name $BaseName-* detected." +} diff --git a/sdk/onlineexperimentation/test-resources-role-assignments.bicep b/sdk/onlineexperimentation/test-resources-role-assignments.bicep new file mode 100644 index 000000000000..9273d48f0525 --- /dev/null +++ b/sdk/onlineexperimentation/test-resources-role-assignments.bicep @@ -0,0 +1,70 @@ +param principalId string +param keyVaultName string +param storageAccountName string +param logAnalyticsName string +param appConfigName string + +resource keyVault 'Microsoft.KeyVault/vaults@2023-02-01' existing = { + name: keyVaultName +} + +var keyVaultCryptoServiceEncryptionUserRoleId = resourceId('Microsoft.Authorization/roleDefinitions', 'e147488a-f6f5-4113-8e2d-b22465e65bf6') +resource keyVaultroleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = { + name: guid(keyVault.id, principalId, keyVaultCryptoServiceEncryptionUserRoleId) + scope: keyVault + properties: { + principalId: principalId + principalType: 'ServicePrincipal' + roleDefinitionId: keyVaultCryptoServiceEncryptionUserRoleId + } +} + +resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' existing = { + name: storageAccountName +} + +// Allow Online Experiment Workspace read access to logs storage account +var storageDataReaderRoleId = resourceId('Microsoft.Authorization/roleDefinitions', '2a2b9908-6ea1-4ae2-8e65-a410df84e7d1') +resource storageAccountExpAccess 'Microsoft.Authorization/roleAssignments@2022-04-01' = { + name: guid(storageAccount.id, principalId, storageDataReaderRoleId) + scope: storageAccount + properties: { + principalId: principalId + principalType: 'ServicePrincipal' + roleDefinitionId: storageDataReaderRoleId + } +} + +// Create Azure Monitor resources: Log Analytics workspace, App Insights, Storage Account and Data Export Rule +resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2021-12-01-preview' existing = { + name: logAnalyticsName +} + +// Allow Online Experiment Workspace read access to log analytics workspace +var logAnalyticsReaderRoleId = resourceId('Microsoft.Authorization/roleDefinitions', '73c42c96-874c-492b-b04d-ab87d138a893') +resource logAnalyticsExpAccess 'Microsoft.Authorization/roleAssignments@2022-04-01' = { + name: guid(logAnalytics.id, principalId, logAnalyticsReaderRoleId) + scope: logAnalytics + properties: { + principalId: principalId + principalType: 'ServicePrincipal' + roleDefinitionId: logAnalyticsReaderRoleId + } +} + +// Create App Configuration Store +resource appConfig 'Microsoft.AppConfiguration/configurationStores@2022-05-01' existing = { + name: appConfigName +} + +// Allow input principal read/write access to app configuration +var appConfigDataOwnerRoleId = resourceId('Microsoft.Authorization/roleDefinitions', '5ae67dd6-50cb-40e7-96ff-dc2bfa4b606b') +resource appConfigAccess 'Microsoft.Authorization/roleAssignments@2022-04-01' = { + name: guid(appConfig.id, principalId, appConfigDataOwnerRoleId) + scope: appConfig + properties: { + principalId: principalId + principalType: 'ServicePrincipal' + roleDefinitionId: appConfigDataOwnerRoleId + } +} diff --git a/sdk/onlineexperimentation/test-resources.bicep b/sdk/onlineexperimentation/test-resources.bicep new file mode 100644 index 000000000000..234eb2439dd1 --- /dev/null +++ b/sdk/onlineexperimentation/test-resources.bicep @@ -0,0 +1,171 @@ +// PARAMETERS +@description('The location of the resource. By default, this is the same as the resource group.') +param location string = resourceGroup().location + +@description('The base resource name.') +param baseName string = resourceGroup().name + +param testApplicationOid string + +param keyVaultIsSoftDeleted bool = false + +param storageAccountName string = uniqueString(baseName, 'storage') + +var experimentationWorkspaceLocations = [ + 'eastus2' + 'sweedencentral' +] + +// The default location is typically westus, but Online Experimentation Workspaces are only available in a limited set of regions for now. +var experimentationWorkspaceLocation = contains(experimentationWorkspaceLocations, location) ? location : experimentationWorkspaceLocations[0] + +// Create Azure Monitor resources: Log Analytics workspace, App Insights, Storage Account and Data Export Rule +resource logAnalytics 'Microsoft.OperationalInsights/workspaces@2020-08-01' = { + name: '${baseName}-loganalytics' + location: location + properties: any({ + retentionInDays: 30 + features: { + searchVersion: 1 + } + sku: { + name: 'PerGB2018' + } + }) + + // resource dataExportRule 'dataExports' = { + // name: 'AppEvents' + // properties: { + // destination: { + // resourceId: storageAccount.id + // } + // enable: true + // tableNames: [ + // 'AppEvents' + // 'AppEvents_CL' + // ] + // } + // } +} + +resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = { + name: storageAccountName + location: location + sku: { + name: 'Standard_LRS' + } + kind: 'StorageV2' + properties: { + allowSharedKeyAccess: false + } +} + +resource keyVault 'Microsoft.KeyVault/vaults@2023-02-01' = { + name: '${baseName}-kv' + location: location + properties: { + createMode: keyVaultIsSoftDeleted ? 'recover' : 'default' + sku: { + family: 'A' + name: 'standard' + } + tenantId: subscription().tenantId + enablePurgeProtection: true // required for CMK use + enableSoftDelete: true // required for CMK use + enableRbacAuthorization: true + } + + resource onlineExperimentationWorkspaceKey 'keys' = { + name: 'exp-workspace-key' + properties: { + keySize: 2048 + kty: 'RSA' + keyOps: [ 'wrapKey', 'unwrapKey' ] + attributes: { + enabled: true + exportable: false + } + } + } +} + +resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = { + name: '${baseName}-appinsights' + location: location + kind: 'web' + properties: { + Application_Type: 'web' + WorkspaceResourceId: logAnalytics.id + } +} + +// Create App Configuration Store +resource appConfig 'Microsoft.AppConfiguration/configurationStores@2023-09-01-preview' = { + name: '${baseName}-appconfig' + location: location + sku: { + name: 'standard' + } + properties: { + encryption: {} + disableLocalAuth: true + enablePurgeProtection: false + experimentation:{} + dataPlaneProxy:{ + authenticationMode: 'Pass-through' + privateLinkDelegation: 'Disabled' + } + telemetry: { + resourceId: applicationInsights.id + } + } +} + +#disable-next-line BCP081 +resource onlineExperimentationWorkspace 'Microsoft.OnlineExperimentation/workspaces@2025-05-31-preview' = { + name: '${baseName}-exp' + location: experimentationWorkspaceLocation + sku: { + name: 'S0' + } + identity: { + type: 'SystemAssigned' + } + properties: { + logAnalyticsWorkspaceResourceId: logAnalytics.id + logsExporterStorageAccountResourceId: storageAccount.id + appConfigurationResourceId: appConfig.id + } +} + +resource onlineExperimentationWorkspaceAssignments 'Microsoft.Authorization/roleAssignments@2022-04-01' = [for roleDefinitionId in [ + '2c7a01fe-5518-4a42-93c2-658e45441691' // Online Experimentation Contributor + '53747cdd-e97c-477a-948c-b587d0e514b2' // Online Experimentation Data Owner +]: { + name: guid(onlineExperimentationWorkspace.id, testApplicationOid, resourceId('Microsoft.Authorization/roleDefinitions', roleDefinitionId)) + scope: onlineExperimentationWorkspace + properties: { + principalId: testApplicationOid + roleDefinitionId: resourceId('Microsoft.Authorization/roleDefinitions', roleDefinitionId) + } +}] + +module roleAssignments './test-resources-role-assignments.bicep' = { + name: '${deployment().name}-ra' + params: { + principalId: onlineExperimentationWorkspace.identity.principalId + keyVaultName: keyVault.name + storageAccountName: storageAccount.name + logAnalyticsName: logAnalytics.name + appConfigName: appConfig.name + } +} + +output APPCONFIGURATION_RESOURCEID string = appConfig.id +output APPINSIGHTS_RESOURCEID string = applicationInsights.id +output LOGANALYTICS_RESOURCEID string = logAnalytics.id +output STORAGE_APPEVENTS_RESOURCEID string = storageAccount.id +output ONLINEEXPERIMENTATION_RESOURCEID string = onlineExperimentationWorkspace.id +output ONLINEEXPERIMENTATION_ENDPOINT string = onlineExperimentationWorkspace.properties.endpoint +output ONLINEEXPERIMENTATION_LOCATION string = experimentationWorkspaceLocation +output CUSTOMER_MANAGED_KEY_URI string = keyVault::onlineExperimentationWorkspaceKey.properties.keyUri diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantDeletionStatusObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantDeletionStatusObject.cs index db387f3cd4b5..b6eaccfac003 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantDeletionStatusObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The InternalAssistantDeletionStatus_object. + /// The InternalAssistantDeletionStatusObject. internal readonly partial struct InternalAssistantDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantFileDeletionStatusObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantFileDeletionStatusObject.cs index 5c52700f6c0f..13de0a0d9def 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantFileDeletionStatusObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalAssistantFileDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The InternalAssistantFileDeletionStatus_object. + /// The InternalAssistantFileDeletionStatusObject. internal readonly partial struct InternalAssistantFileDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileDeletionStatusObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileDeletionStatusObject.cs index a3572431a68c..3982f64175b7 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileDeletionStatusObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The InternalFileDeletionStatus_object. + /// The InternalFileDeletionStatusObject. internal readonly partial struct InternalFileDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileListResponseObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileListResponseObject.cs index cc760a9ac0a9..c66c183f89a5 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileListResponseObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/InternalFileListResponseObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The InternalFileListResponse_object. + /// The InternalFileListResponseObject. internal readonly partial struct InternalFileListResponseObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantFileObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantFileObject.cs index 1a72c0020e88..ca850e4e0df1 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantFileObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantFileObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfAssistantFile_object. + /// The OpenAIPageableListOfAssistantFileObject. internal readonly partial struct OpenAIPageableListOfAssistantFileObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantObject.cs index 19f4bce69082..43016300be16 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfAssistantObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfAssistant_object. + /// The OpenAIPageableListOfAssistantObject. internal readonly partial struct OpenAIPageableListOfAssistantObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfMessageFileObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfMessageFileObject.cs index 9993d3b6fdec..46bd38dd1275 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfMessageFileObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfMessageFileObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfMessageFile_object. + /// The OpenAIPageableListOfMessageFileObject. internal readonly partial struct OpenAIPageableListOfMessageFileObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfRunStepObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfRunStepObject.cs index 428dfa50baa2..150fd1edf8a2 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfRunStepObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfRunStepObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfRunStep_object. + /// The OpenAIPageableListOfRunStepObject. internal readonly partial struct OpenAIPageableListOfRunStepObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadMessageObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadMessageObject.cs index e1dcddb24812..c7573a22a2b8 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadMessageObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadMessageObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfThreadMessage_object. + /// The OpenAIPageableListOfThreadMessageObject. internal readonly partial struct OpenAIPageableListOfThreadMessageObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadRunObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadRunObject.cs index 2f4ebdc5ab1d..199af3dadfa5 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadRunObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/OpenAIPageableListOfThreadRunObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The OpenAIPageableListOfThreadRun_object. + /// The OpenAIPageableListOfThreadRunObject. internal readonly partial struct OpenAIPageableListOfThreadRunObject : IEquatable { private readonly string _value; diff --git a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/ThreadDeletionStatusObject.cs b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/ThreadDeletionStatusObject.cs index 73191cffd7d6..e99096a040f7 100644 --- a/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/ThreadDeletionStatusObject.cs +++ b/sdk/openai/Azure.AI.OpenAI.Assistants/src/Generated/ThreadDeletionStatusObject.cs @@ -10,7 +10,7 @@ namespace Azure.AI.OpenAI.Assistants { - /// The ThreadDeletionStatus_object. + /// The ThreadDeletionStatusObject. internal readonly partial struct ThreadDeletionStatusObject : IEquatable { private readonly string _value; diff --git a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/EnergyServiceResource.Serialization.cs b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/EnergyServiceResource.Serialization.cs index 64a0c25f3078..9cea80bdae7d 100644 --- a/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/EnergyServiceResource.Serialization.cs +++ b/sdk/openenergyplatform/Azure.ResourceManager.EnergyServices/src/Generated/EnergyServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.EnergyServices { public partial class EnergyServiceResource : IJsonModel { + private static EnergyServiceData s_dataDeserializationInstance; + private static EnergyServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EnergyServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EnergyServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerEnergyServicesContext.Default); EnergyServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerEnergyServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackResource.Serialization.cs index ad9ff89e93a3..a46357df2dd4 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryPackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class LogAnalyticsQueryPackResource : IJsonModel { + private static LogAnalyticsQueryPackData s_dataDeserializationInstance; + private static LogAnalyticsQueryPackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogAnalyticsQueryPackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogAnalyticsQueryPackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); LogAnalyticsQueryPackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryResource.Serialization.cs index 9b8cd8aa8eff..d5e74997abe8 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/LogAnalyticsQueryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class LogAnalyticsQueryResource : IJsonModel { + private static LogAnalyticsQueryData s_dataDeserializationInstance; + private static LogAnalyticsQueryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogAnalyticsQueryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogAnalyticsQueryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); LogAnalyticsQueryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterResource.Serialization.cs index b84076502ce3..0c53348b350d 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsClusterResource : IJsonModel { + private static OperationalInsightsClusterData s_dataDeserializationInstance; + private static OperationalInsightsClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportResource.Serialization.cs index 2501a82b1270..453b08bb1d9a 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataExportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsDataExportResource : IJsonModel { + private static OperationalInsightsDataExportData s_dataDeserializationInstance; + private static OperationalInsightsDataExportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsDataExportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsDataExportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsDataExportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceResource.Serialization.cs index c40412c43ad4..c3a8c25fb30c 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsDataSourceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsDataSourceResource : IJsonModel { + private static OperationalInsightsDataSourceData s_dataDeserializationInstance; + private static OperationalInsightsDataSourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsDataSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsDataSourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsDataSourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceResource.Serialization.cs index 55072ac1caf2..d0d072352ec9 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsLinkedServiceResource : IJsonModel { + private static OperationalInsightsLinkedServiceData s_dataDeserializationInstance; + private static OperationalInsightsLinkedServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsLinkedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsLinkedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsLinkedServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsResource.Serialization.cs index 209e188a22c7..9b06d14d12c0 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsLinkedStorageAccountsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsLinkedStorageAccountsResource : IJsonModel { + private static OperationalInsightsLinkedStorageAccountsData s_dataDeserializationInstance; + private static OperationalInsightsLinkedStorageAccountsData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsLinkedStorageAccountsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsLinkedStorageAccountsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsLinkedStorageAccountsData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchResource.Serialization.cs index 4e07cd2e0d88..1a4515a78a32 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsSavedSearchResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsSavedSearchResource : IJsonModel { + private static OperationalInsightsSavedSearchData s_dataDeserializationInstance; + private static OperationalInsightsSavedSearchData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsSavedSearchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsSavedSearchData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsSavedSearchData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableResource.Serialization.cs index 080110279bc7..fd175225af90 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsTableResource : IJsonModel { + private static OperationalInsightsTableData s_dataDeserializationInstance; + private static OperationalInsightsTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceResource.Serialization.cs index 382ff32b85ea..c9056ae20674 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/OperationalInsightsWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class OperationalInsightsWorkspaceResource : IJsonModel { + private static OperationalInsightsWorkspaceData s_dataDeserializationInstance; + private static OperationalInsightsWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OperationalInsightsWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OperationalInsightsWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); OperationalInsightsWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightResource.Serialization.cs b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightResource.Serialization.cs index 308d02a4c019..e21a7c13cd2a 100644 --- a/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightResource.Serialization.cs +++ b/sdk/operationalinsights/Azure.ResourceManager.OperationalInsights/src/Generated/StorageInsightResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OperationalInsights { public partial class StorageInsightResource : IJsonModel { + private static StorageInsightData s_dataDeserializationInstance; + private static StorageInsightData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageInsightData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageInsightData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOperationalInsightsContext.Default); StorageInsightData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOperationalInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.Serialization.cs index ad9442e525cb..34864c0c2a57 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class AutonomousDBVersionResource : IJsonModel { + private static AutonomousDBVersionData s_dataDeserializationInstance; + private static AutonomousDBVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutonomousDBVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutonomousDBVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); AutonomousDBVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs index 454d90a019a8..756f52047849 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class AutonomousDatabaseBackupResource : IJsonModel { + private static AutonomousDatabaseBackupData s_dataDeserializationInstance; + private static AutonomousDatabaseBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutonomousDatabaseBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutonomousDatabaseBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); AutonomousDatabaseBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs index 16f4b0c72f2a..61a07f6456ec 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class AutonomousDatabaseCharacterSetResource : IJsonModel { + private static AutonomousDatabaseCharacterSetData s_dataDeserializationInstance; + private static AutonomousDatabaseCharacterSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutonomousDatabaseCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutonomousDatabaseCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); AutonomousDatabaseCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs index c5ebcf2c2e24..7e525f479e36 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class AutonomousDatabaseNationalCharacterSetResource : IJsonModel { + private static AutonomousDatabaseNationalCharacterSetData s_dataDeserializationInstance; + private static AutonomousDatabaseNationalCharacterSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutonomousDatabaseNationalCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutonomousDatabaseNationalCharacterSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); AutonomousDatabaseNationalCharacterSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs index 7e671aac3aba..5e6a9be3d26a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class AutonomousDatabaseResource : IJsonModel { + private static AutonomousDatabaseData s_dataDeserializationInstance; + private static AutonomousDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutonomousDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutonomousDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); AutonomousDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs index 3ad4b8952423..5918cba36a2d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class CloudExadataInfrastructureResource : IJsonModel { + private static CloudExadataInfrastructureData s_dataDeserializationInstance; + private static CloudExadataInfrastructureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudExadataInfrastructureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudExadataInfrastructureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); CloudExadataInfrastructureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.Serialization.cs index 8df89494a77f..f44e97a9715a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class CloudVmClusterDBNodeResource : IJsonModel { + private static CloudVmClusterDBNodeData s_dataDeserializationInstance; + private static CloudVmClusterDBNodeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudVmClusterDBNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudVmClusterDBNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); CloudVmClusterDBNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs index ffeb3d19061d..698f7fedcef9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class CloudVmClusterResource : IJsonModel { + private static CloudVmClusterData s_dataDeserializationInstance; + private static CloudVmClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); CloudVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.Serialization.cs index 0205513b3647..2bca9074c295 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class CloudVmClusterVirtualNetworkAddressResource : IJsonModel { + private static CloudVmClusterVirtualNetworkAddressData s_dataDeserializationInstance; + private static CloudVmClusterVirtualNetworkAddressData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudVmClusterVirtualNetworkAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudVmClusterVirtualNetworkAddressData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); CloudVmClusterVirtualNetworkAddressData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.Serialization.cs index 6968ee9d4358..27e54e5afac5 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleDBServerResource : IJsonModel { + private static OracleDBServerData s_dataDeserializationInstance; + private static OracleDBServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleDBServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleDBServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleDBServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.Serialization.cs index 754952062d90..0ba97e6bf32b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleDBSystemShapeResource : IJsonModel { + private static OracleDBSystemShapeData s_dataDeserializationInstance; + private static OracleDBSystemShapeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleDBSystemShapeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleDBSystemShapeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleDBSystemShapeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.Serialization.cs index d0b2e2a07186..591aa2484506 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleDnsPrivateViewResource : IJsonModel { + private static OracleDnsPrivateViewData s_dataDeserializationInstance; + private static OracleDnsPrivateViewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleDnsPrivateViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleDnsPrivateViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleDnsPrivateViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.Serialization.cs index f10adfa93206..287d0efcc5f6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleDnsPrivateZoneResource : IJsonModel { + private static OracleDnsPrivateZoneData s_dataDeserializationInstance; + private static OracleDnsPrivateZoneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleDnsPrivateZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleDnsPrivateZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleDnsPrivateZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.Serialization.cs index 79473c9ea6c7..5841593688cc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleGIVersionResource : IJsonModel { + private static OracleGIVersionData s_dataDeserializationInstance; + private static OracleGIVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleGIVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleGIVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleGIVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs index 96909817af7b..01bfb4712e48 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleSubscriptionResource : IJsonModel { + private static OracleSubscriptionData s_dataDeserializationInstance; + private static OracleSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.Serialization.cs index a081046408f0..69487a209ef1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.OracleDatabase { public partial class OracleSystemVersionResource : IJsonModel { + private static OracleSystemVersionData s_dataDeserializationInstance; + private static OracleSystemVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OracleSystemVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OracleSystemVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); OracleSystemVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationResource.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationResource.Serialization.cs index 5de58df94686..024a8f5b241f 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationResource.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/AvailableGroundStationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Orbital { public partial class AvailableGroundStationResource : IJsonModel { + private static AvailableGroundStationData s_dataDeserializationInstance; + private static AvailableGroundStationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvailableGroundStationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvailableGroundStationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOrbitalContext.Default); AvailableGroundStationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOrbitalContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileResource.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileResource.Serialization.cs index 598ecc5f1f9f..746a20253592 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileResource.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Orbital { public partial class OrbitalContactProfileResource : IJsonModel { + private static OrbitalContactProfileData s_dataDeserializationInstance; + private static OrbitalContactProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OrbitalContactProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OrbitalContactProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOrbitalContext.Default); OrbitalContactProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOrbitalContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactResource.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactResource.Serialization.cs index d7c468d6a967..11ef94f4a266 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactResource.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalContactResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Orbital { public partial class OrbitalContactResource : IJsonModel { + private static OrbitalContactData s_dataDeserializationInstance; + private static OrbitalContactData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OrbitalContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OrbitalContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOrbitalContext.Default); OrbitalContactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOrbitalContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftResource.Serialization.cs b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftResource.Serialization.cs index 78b754b02650..366a77c58b9c 100644 --- a/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftResource.Serialization.cs +++ b/sdk/orbital/Azure.ResourceManager.Orbital/src/Generated/OrbitalSpacecraftResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Orbital { public partial class OrbitalSpacecraftResource : IJsonModel { + private static OrbitalSpacecraftData s_dataDeserializationInstance; + private static OrbitalSpacecraftData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OrbitalSpacecraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OrbitalSpacecraftData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOrbitalContext.Default); OrbitalSpacecraftData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOrbitalContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackCertificateObjectResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackCertificateObjectResource.Serialization.cs index c373f3d969f3..f98fff355f8a 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackCertificateObjectResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackCertificateObjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class GlobalRulestackCertificateObjectResource : IJsonModel { + private static GlobalRulestackCertificateObjectData s_dataDeserializationInstance; + private static GlobalRulestackCertificateObjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GlobalRulestackCertificateObjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GlobalRulestackCertificateObjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); GlobalRulestackCertificateObjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackFqdnResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackFqdnResource.Serialization.cs index 082122f02522..84c7efa1247b 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackFqdnResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackFqdnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class GlobalRulestackFqdnResource : IJsonModel { + private static GlobalRulestackFqdnData s_dataDeserializationInstance; + private static GlobalRulestackFqdnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GlobalRulestackFqdnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GlobalRulestackFqdnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); GlobalRulestackFqdnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackPrefixResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackPrefixResource.Serialization.cs index 25c28f5f1bd9..9872f06ee8c7 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackPrefixResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class GlobalRulestackPrefixResource : IJsonModel { + private static GlobalRulestackPrefixData s_dataDeserializationInstance; + private static GlobalRulestackPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GlobalRulestackPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GlobalRulestackPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); GlobalRulestackPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackResource.Serialization.cs index 85b7df7dde8b..0e3250246878 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/GlobalRulestackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class GlobalRulestackResource : IJsonModel { + private static GlobalRulestackData s_dataDeserializationInstance; + private static GlobalRulestackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GlobalRulestackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GlobalRulestackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); GlobalRulestackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackCertificateObjectResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackCertificateObjectResource.Serialization.cs index 930ee2fcf54f..c940e8d96ba3 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackCertificateObjectResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackCertificateObjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class LocalRulestackCertificateObjectResource : IJsonModel { + private static LocalRulestackCertificateObjectData s_dataDeserializationInstance; + private static LocalRulestackCertificateObjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalRulestackCertificateObjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalRulestackCertificateObjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); LocalRulestackCertificateObjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackFqdnResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackFqdnResource.Serialization.cs index 08d00397edcc..ef794cf77ed7 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackFqdnResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackFqdnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class LocalRulestackFqdnResource : IJsonModel { + private static LocalRulestackFqdnData s_dataDeserializationInstance; + private static LocalRulestackFqdnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalRulestackFqdnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalRulestackFqdnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); LocalRulestackFqdnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackPrefixResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackPrefixResource.Serialization.cs index 83de62b86df4..661cdaa6e4cf 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackPrefixResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class LocalRulestackPrefixResource : IJsonModel { + private static LocalRulestackPrefixData s_dataDeserializationInstance; + private static LocalRulestackPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalRulestackPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalRulestackPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); LocalRulestackPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackResource.Serialization.cs index 95a93ae14240..567603224ebc 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class LocalRulestackResource : IJsonModel { + private static LocalRulestackData s_dataDeserializationInstance; + private static LocalRulestackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalRulestackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalRulestackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); LocalRulestackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackRuleResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackRuleResource.Serialization.cs index 83ad65862e59..a8ff15465829 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackRuleResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/LocalRulestackRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class LocalRulestackRuleResource : IJsonModel { + private static LocalRulestackRuleData s_dataDeserializationInstance; + private static LocalRulestackRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LocalRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LocalRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); LocalRulestackRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallResource.Serialization.cs index d19b49dd1854..695b6549b9d5 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class PaloAltoNetworksFirewallResource : IJsonModel { + private static PaloAltoNetworksFirewallData s_dataDeserializationInstance; + private static PaloAltoNetworksFirewallData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PaloAltoNetworksFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PaloAltoNetworksFirewallData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); PaloAltoNetworksFirewallData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallStatusResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallStatusResource.Serialization.cs index 5ac69a98ed57..60043a460933 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallStatusResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PaloAltoNetworksFirewallStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class PaloAltoNetworksFirewallStatusResource : IJsonModel { + private static PaloAltoNetworksFirewallStatusData s_dataDeserializationInstance; + private static PaloAltoNetworksFirewallStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PaloAltoNetworksFirewallStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PaloAltoNetworksFirewallStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); PaloAltoNetworksFirewallStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PostRulestackRuleResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PostRulestackRuleResource.Serialization.cs index 847caece6076..212dec10beda 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PostRulestackRuleResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PostRulestackRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class PostRulestackRuleResource : IJsonModel { + private static PostRulestackRuleData s_dataDeserializationInstance; + private static PostRulestackRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); PostRulestackRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PreRulestackRuleResource.Serialization.cs b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PreRulestackRuleResource.Serialization.cs index 735e68d248fb..01c8846a1860 100644 --- a/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PreRulestackRuleResource.Serialization.cs +++ b/sdk/paloaltonetworks.ngfw/Azure.ResourceManager.PaloAltoNetworks.Ngfw/src/Generated/PreRulestackRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PaloAltoNetworks.Ngfw { public partial class PreRulestackRuleResource : IJsonModel { + private static PreRulestackRuleData s_dataDeserializationInstance; + private static PreRulestackRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PreRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PreRulestackRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); PreRulestackRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPaloAltoNetworksNgfwContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestResource.Serialization.cs index 306302279b12..2d4fac419ba0 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/ConnectionMonitorTestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class ConnectionMonitorTestResource : IJsonModel { + private static ConnectionMonitorTestData s_dataDeserializationInstance; + private static ConnectionMonitorTestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ConnectionMonitorTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ConnectionMonitorTestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); ConnectionMonitorTestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnResource.Serialization.cs index 8759fa86e557..1cc7d4e72dc8 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeerAsnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeerAsnResource : IJsonModel { + private static PeerAsnData s_dataDeserializationInstance; + private static PeerAsnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeerAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeerAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeerAsnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnResource.Serialization.cs index 2227c479c956..18e36ada8ba6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredAsnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeeringRegisteredAsnResource : IJsonModel { + private static PeeringRegisteredAsnData s_dataDeserializationInstance; + private static PeeringRegisteredAsnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeeringRegisteredAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeeringRegisteredAsnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeeringRegisteredAsnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixResource.Serialization.cs index d28b18a13be5..1c8b98ae528d 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringRegisteredPrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeeringRegisteredPrefixResource : IJsonModel { + private static PeeringRegisteredPrefixData s_dataDeserializationInstance; + private static PeeringRegisteredPrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeeringRegisteredPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeeringRegisteredPrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeeringRegisteredPrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringResource.Serialization.cs index 2004d1c7a6dd..74f0f3268824 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeeringResource : IJsonModel { + private static PeeringData s_dataDeserializationInstance; + private static PeeringData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeeringData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeeringData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixResource.Serialization.cs index 895cff5c04bd..b0a64b6c25e6 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServicePrefixResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeeringServicePrefixResource : IJsonModel { + private static PeeringServicePrefixData s_dataDeserializationInstance; + private static PeeringServicePrefixData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeeringServicePrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeeringServicePrefixData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeeringServicePrefixData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceResource.Serialization.cs b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceResource.Serialization.cs index b059d7196a4e..cff0a4187d3b 100644 --- a/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceResource.Serialization.cs +++ b/sdk/peering/Azure.ResourceManager.Peering/src/Generated/PeeringServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Peering { public partial class PeeringServiceResource : IJsonModel { + private static PeeringServiceData s_dataDeserializationInstance; + private static PeeringServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PeeringServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PeeringServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPeeringContext.Default); PeeringServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPeeringContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.Serialization.cs b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.Serialization.cs index b5376e1c8786..0add5b78babb 100644 --- a/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.Serialization.cs +++ b/sdk/pineconevectordb/Azure.ResourceManager.PineconeVectorDB/src/Generated/PineconeVectorDBOrganizationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PineconeVectorDB { public partial class PineconeVectorDBOrganizationResource : IJsonModel { + private static PineconeVectorDBOrganizationData s_dataDeserializationInstance; + private static PineconeVectorDBOrganizationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PineconeVectorDBOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PineconeVectorDBOrganizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPineconeVectorDBContext.Default); PineconeVectorDBOrganizationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPineconeVectorDBContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs index a9c731b4acc4..f3dd2e68d147 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountQuotaResource.Serialization.cs @@ -13,14 +13,17 @@ 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)Data).Create(ref reader, 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)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs index 68a90073e276..19b85ad88151 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingAccountResource.Serialization.cs @@ -13,14 +13,17 @@ 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)Data).Create(ref reader, 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)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs index 38017afc5d83..a8981087ed27 100644 --- a/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs +++ b/sdk/playwrighttesting/Azure.ResourceManager.PlaywrightTesting/src/Generated/PlaywrightTestingQuotaResource.Serialization.cs @@ -13,14 +13,17 @@ 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)Data).Create(ref reader, 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)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyAttestationResource.Serialization.cs b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyAttestationResource.Serialization.cs index 7d9c76924785..dd6d6ea725d6 100644 --- a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyAttestationResource.Serialization.cs +++ b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyAttestationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PolicyInsights { public partial class PolicyAttestationResource : IJsonModel { + private static PolicyAttestationData s_dataDeserializationInstance; + private static PolicyAttestationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyAttestationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyAttestationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPolicyInsightsContext.Default); PolicyAttestationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPolicyInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyMetadataResource.Serialization.cs b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyMetadataResource.Serialization.cs index c08601ef9d4c..2733ff9944f3 100644 --- a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyMetadataResource.Serialization.cs +++ b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PolicyInsights { public partial class PolicyMetadataResource : IJsonModel { + private static PolicyMetadataData s_dataDeserializationInstance; + private static PolicyMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPolicyInsightsContext.Default); PolicyMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPolicyInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyRemediationResource.Serialization.cs b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyRemediationResource.Serialization.cs index 5c3c22849aae..59ee81c34baa 100644 --- a/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyRemediationResource.Serialization.cs +++ b/sdk/policyinsights/Azure.ResourceManager.PolicyInsights/src/Generated/PolicyRemediationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PolicyInsights { public partial class PolicyRemediationResource : IJsonModel { + private static PolicyRemediationData s_dataDeserializationInstance; + private static PolicyRemediationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyRemediationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyRemediationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPolicyInsightsContext.Default); PolicyRemediationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPolicyInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.Serialization.cs b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.Serialization.cs index f6fe9af39193..cb0af43391bc 100644 --- a/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.Serialization.cs +++ b/sdk/portalservices/Azure.ResourceManager.PortalServicesCopilot/src/Generated/PortalServicesCopilotSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PortalServicesCopilot { public partial class PortalServicesCopilotSettingResource : IJsonModel { + private static PortalServicesCopilotSettingData s_dataDeserializationInstance; + private static PortalServicesCopilotSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PortalServicesCopilotSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PortalServicesCopilotSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPortalServicesCopilotContext.Default); PortalServicesCopilotSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPortalServicesCopilotContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlConfigurationResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlConfigurationResource.Serialization.cs index ea72d22fc3a3..01d64ce7b8a0 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlConfigurationResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlConfigurationResource : IJsonModel { + private static PostgreSqlConfigurationData s_dataDeserializationInstance; + private static PostgreSqlConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlDatabaseResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlDatabaseResource.Serialization.cs index f9041c337cfa..fe00db9a1b33 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlDatabaseResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlDatabaseResource : IJsonModel { + private static PostgreSqlDatabaseData s_dataDeserializationInstance; + private static PostgreSqlDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlFirewallRuleResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlFirewallRuleResource.Serialization.cs index d2f6dcc593c2..7c6691612d80 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlFirewallRuleResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlFirewallRuleResource : IJsonModel { + private static PostgreSqlFirewallRuleData s_dataDeserializationInstance; + private static PostgreSqlFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateEndpointConnectionResource.Serialization.cs index be6d5026f954..736d652c11f7 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlPrivateEndpointConnectionResource : IJsonModel { + private static PostgreSqlPrivateEndpointConnectionData s_dataDeserializationInstance; + private static PostgreSqlPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateLinkResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateLinkResource.Serialization.cs index 30f904501dc5..ec8b982089e0 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateLinkResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlPrivateLinkResource : IJsonModel { + private static PostgreSqlPrivateLinkResourceData s_dataDeserializationInstance; + private static PostgreSqlPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerAdministratorResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerAdministratorResource.Serialization.cs index 802ae81cc5e2..95ba820abd7d 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerAdministratorResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlServerAdministratorResource : IJsonModel { + private static PostgreSqlServerAdministratorData s_dataDeserializationInstance; + private static PostgreSqlServerAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlServerAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlServerAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerKeyResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerKeyResource.Serialization.cs index b8c1b9a6b07a..96d7ea5b3377 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerKeyResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlServerKeyResource : IJsonModel { + private static PostgreSqlServerKeyData s_dataDeserializationInstance; + private static PostgreSqlServerKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlServerKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerResource.Serialization.cs index c05c5fd088a4..eb51c5393194 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlServerResource : IJsonModel { + private static PostgreSqlServerData s_dataDeserializationInstance; + private static PostgreSqlServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerSecurityAlertPolicyResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerSecurityAlertPolicyResource.Serialization.cs index 322c5779d9b4..0853a0542fac 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlServerSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlServerSecurityAlertPolicyResource : IJsonModel { + private static PostgreSqlServerSecurityAlertPolicyData s_dataDeserializationInstance; + private static PostgreSqlServerSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlServerSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlVirtualNetworkRuleResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlVirtualNetworkRuleResource.Serialization.cs index 52e2e840986f..356972e3528a 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlVirtualNetworkRuleResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSql/Generated/PostgreSqlVirtualNetworkRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql { public partial class PostgreSqlVirtualNetworkRuleResource : IJsonModel { + private static PostgreSqlVirtualNetworkRuleData s_dataDeserializationInstance; + private static PostgreSqlVirtualNetworkRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlVirtualNetworkRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.Serialization.cs index 751d7d105d49..f98f195c71a3 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerActiveDirectoryAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerActiveDirectoryAdministratorResource : IJsonModel { + private static PostgreSqlFlexibleServerActiveDirectoryAdministratorData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerActiveDirectoryAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerActiveDirectoryAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerActiveDirectoryAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerActiveDirectoryAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerBackupResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerBackupResource.Serialization.cs index 01a34cde4c32..c37fa484c512 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerBackupResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerBackupResource : IJsonModel { + private static PostgreSqlFlexibleServerBackupData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerConfigurationResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerConfigurationResource.Serialization.cs index d0352ff4a3d9..4a9f821e621f 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerConfigurationResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerConfigurationResource : IJsonModel { + private static PostgreSqlFlexibleServerConfigurationData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerDatabaseResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerDatabaseResource.Serialization.cs index ba09cd396661..99becc948935 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerDatabaseResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerDatabaseResource : IJsonModel { + private static PostgreSqlFlexibleServerDatabaseData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerFirewallRuleResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerFirewallRuleResource.Serialization.cs index 904638b1a4f8..757a7ad9ef7c 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerFirewallRuleResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerFirewallRuleResource : IJsonModel { + private static PostgreSqlFlexibleServerFirewallRuleData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerResource.Serialization.cs index a27ab9556f7a..57939b023dd4 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServerResource : IJsonModel { + private static PostgreSqlFlexibleServerData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs index 094bb8904b90..5446d11cee53 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServersPrivateEndpointConnectionResource : IJsonModel { + private static PostgreSqlFlexibleServersPrivateEndpointConnectionData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServersPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServersPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServersPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServersPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateLinkResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateLinkResource.Serialization.cs index 39d67712ba1f..cf4bc5217846 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateLinkResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlFlexibleServersPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlFlexibleServersPrivateLinkResource : IJsonModel { + private static PostgreSqlFlexibleServersPrivateLinkResourceData s_dataDeserializationInstance; + private static PostgreSqlFlexibleServersPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlFlexibleServersPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlFlexibleServersPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlFlexibleServersPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlLtrServerBackupOperationResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlLtrServerBackupOperationResource.Serialization.cs index 618d273d481e..6ec3905f49d4 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlLtrServerBackupOperationResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlLtrServerBackupOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlLtrServerBackupOperationResource : IJsonModel { + private static PostgreSqlLtrServerBackupOperationData s_dataDeserializationInstance; + private static PostgreSqlLtrServerBackupOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlLtrServerBackupOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlLtrServerBackupOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlLtrServerBackupOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlMigrationResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlMigrationResource.Serialization.cs index be4e66cdf6e1..d348d9936c63 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlMigrationResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/PostgreSqlMigrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class PostgreSqlMigrationResource : IJsonModel { + private static PostgreSqlMigrationData s_dataDeserializationInstance; + private static PostgreSqlMigrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PostgreSqlMigrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PostgreSqlMigrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); PostgreSqlMigrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/ServerThreatProtectionSettingsModelResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/ServerThreatProtectionSettingsModelResource.Serialization.cs index 6037a23b00ce..7a9e8c27c8f8 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/ServerThreatProtectionSettingsModelResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/ServerThreatProtectionSettingsModelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class ServerThreatProtectionSettingsModelResource : IJsonModel { + private static ServerThreatProtectionSettingsModelData s_dataDeserializationInstance; + private static ServerThreatProtectionSettingsModelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServerThreatProtectionSettingsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServerThreatProtectionSettingsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); ServerThreatProtectionSettingsModelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/VirtualEndpointResource.Serialization.cs b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/VirtualEndpointResource.Serialization.cs index e7c0f1a27776..a21ac00dcc6e 100644 --- a/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/VirtualEndpointResource.Serialization.cs +++ b/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/PostgreSqlFlexibleServers/Generated/VirtualEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PostgreSql.FlexibleServers { public partial class VirtualEndpointResource : IJsonModel { + private static VirtualEndpointResourceData s_dataDeserializationInstance; + private static VirtualEndpointResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPostgreSqlContext.Default); VirtualEndpointResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPostgreSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.Serialization.cs index 9f14ee311775..5d30f48bdcbf 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.Serialization.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/AutoScaleVCoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PowerBIDedicated { public partial class AutoScaleVCoreResource : IJsonModel { + private static AutoScaleVCoreData s_dataDeserializationInstance; + private static AutoScaleVCoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutoScaleVCoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutoScaleVCoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPowerBIDedicatedContext.Default); AutoScaleVCoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPowerBIDedicatedContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.Serialization.cs b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.Serialization.cs index b9bd526a327e..93e3d38418a9 100644 --- a/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.Serialization.cs +++ b/sdk/powerbidedicated/Azure.ResourceManager.PowerBIDedicated/src/Generated/DedicatedCapacityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PowerBIDedicated { public partial class DedicatedCapacityResource : IJsonModel { + private static DedicatedCapacityData s_dataDeserializationInstance; + private static DedicatedCapacityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DedicatedCapacityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DedicatedCapacityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPowerBIDedicatedContext.Default); DedicatedCapacityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPowerBIDedicatedContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkResource.Serialization.cs b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkResource.Serialization.cs index a1e40a14aa3b..fdee2975553b 100644 --- a/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkResource.Serialization.cs +++ b/sdk/privatedns/Azure.ResourceManager.PrivateDns/src/Generated/VirtualNetworkLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.PrivateDns { public partial class VirtualNetworkLinkResource : IJsonModel { + private static VirtualNetworkLinkData s_dataDeserializationInstance; + private static VirtualNetworkLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualNetworkLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPrivateDnsContext.Default); VirtualNetworkLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPrivateDnsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.Serialization.cs index 33c1b4f44548..43a83b98fe99 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/CustomRolloutResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class CustomRolloutResource : IJsonModel { + private static CustomRolloutData s_dataDeserializationInstance; + private static CustomRolloutData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomRolloutData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomRolloutData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); CustomRolloutData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.Serialization.cs index 17b1a4f9cd36..08b9a8a115ad 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/DefaultRolloutResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class DefaultRolloutResource : IJsonModel { + private static DefaultRolloutData s_dataDeserializationInstance; + private static DefaultRolloutData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DefaultRolloutData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DefaultRolloutData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); DefaultRolloutData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.Serialization.cs index 0a48312873f3..b1315bbf9dc7 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeFirstSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class NestedResourceTypeFirstSkuResource : IJsonModel { + private static ResourceTypeSkuData s_dataDeserializationInstance; + private static ResourceTypeSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ResourceTypeSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.Serialization.cs index 5fa1063bb413..f1a4fa3d934f 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeSecondSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class NestedResourceTypeSecondSkuResource : IJsonModel { + private static ResourceTypeSkuData s_dataDeserializationInstance; + private static ResourceTypeSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ResourceTypeSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.Serialization.cs index f6503297a7c7..8cce06f77fbf 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NestedResourceTypeThirdSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class NestedResourceTypeThirdSkuResource : IJsonModel { + private static ResourceTypeSkuData s_dataDeserializationInstance; + private static ResourceTypeSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ResourceTypeSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.Serialization.cs index 7b05642d0e24..027ac4bfcae2 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/NotificationRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class NotificationRegistrationResource : IJsonModel { + private static NotificationRegistrationData s_dataDeserializationInstance; + private static NotificationRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NotificationRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NotificationRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); NotificationRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.Serialization.cs index a545a1b4a414..7fd6cc39586d 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ProviderRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class ProviderRegistrationResource : IJsonModel { + private static ProviderRegistrationData s_dataDeserializationInstance; + private static ProviderRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProviderRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProviderRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ProviderRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.Serialization.cs index 0ee72ce71aee..05467dcaf0cc 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeRegistrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class ResourceTypeRegistrationResource : IJsonModel { + private static ResourceTypeRegistrationData s_dataDeserializationInstance; + private static ResourceTypeRegistrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceTypeRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceTypeRegistrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ResourceTypeRegistrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.Serialization.cs b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.Serialization.cs index 747e17c1e419..12ebd693afba 100644 --- a/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.Serialization.cs +++ b/sdk/providerhub/Azure.ResourceManager.ProviderHub/src/Generated/ResourceTypeSkuResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ProviderHub { public partial class ResourceTypeSkuResource : IJsonModel { + private static ResourceTypeSkuData s_dataDeserializationInstance; + private static ResourceTypeSkuData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceTypeSkuData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerProviderHubContext.Default); ResourceTypeSkuData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerProviderHubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj index 5044e9c3a343..477eae8e8968 100644 --- a/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppConfiguration/src/Azure.Provisioning.AppConfiguration.csproj @@ -12,6 +12,10 @@ CS1591 + + + + CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj index 77a1044b3d01..156fa4dc9163 100644 --- a/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj +++ b/sdk/provisioning/Azure.Provisioning.AppService/src/Azure.Provisioning.AppService.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj index 117438998c5f..f4d3c7b238d1 100644 --- a/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj +++ b/sdk/provisioning/Azure.Provisioning.ApplicationInsights/src/Azure.Provisioning.ApplicationInsights.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj index 91242880542e..5c5eeea277b6 100644 --- a/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj +++ b/sdk/provisioning/Azure.Provisioning.CognitiveServices/src/Azure.Provisioning.CognitiveServices.csproj @@ -12,6 +12,10 @@ CS1591 + + + + CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj index 6e17da3eb75f..aa833ee40549 100644 --- a/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj +++ b/sdk/provisioning/Azure.Provisioning.CosmosDB/src/Azure.Provisioning.CosmosDB.csproj @@ -12,6 +12,10 @@ CS1591 + + + + CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj index 84c1f272b679..4fa1d650f292 100644 --- a/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj +++ b/sdk/provisioning/Azure.Provisioning.KubernetesConfiguration/src/Azure.Provisioning.KubernetesConfiguration.csproj @@ -9,4 +9,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj index 4e1b7754293a..63adb35dc792 100644 --- a/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj +++ b/sdk/provisioning/Azure.Provisioning.OperationalInsights/src/Azure.Provisioning.OperationalInsights.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj index 70bdf63f47d0..bedb1bcb4be3 100644 --- a/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj +++ b/sdk/provisioning/Azure.Provisioning.PostgreSql/src/Azure.Provisioning.PostgreSql.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj b/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj index 9bd6faec0561..1b5c007c5ef9 100644 --- a/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj +++ b/sdk/provisioning/Azure.Provisioning.Redis/src/Azure.Provisioning.Redis.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj b/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj index 6e0fd4a2e4d9..0b61327bd17d 100644 --- a/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj +++ b/sdk/provisioning/Azure.Provisioning.Search/src/Azure.Provisioning.Search.csproj @@ -12,6 +12,10 @@ CS1591 + + + + CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj b/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj index a4a45da66a46..d0b12b58f0a5 100644 --- a/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj +++ b/sdk/provisioning/Azure.Provisioning.Sql/src/Azure.Provisioning.Sql.csproj @@ -11,4 +11,9 @@ CS1591 + + + + + diff --git a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md index 9b1e0f0922fb..40ae55050348 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md +++ b/sdk/provisioning/Azure.Provisioning.Storage/CHANGELOG.md @@ -10,6 +10,12 @@ ### Other Changes +## 1.0.1 (2025-05-15) + +### Bugs Fixed + +- Fixed the `Name` of `QueueService` should always be `default`. (https://github.com/Azure/azure-sdk-for-net/issues/49898) + ## 1.0.0 (2024-10-25) ### Features Added diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj index d87bdeadd533..38a94f482c14 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Azure.Provisioning.Storage.csproj @@ -4,7 +4,7 @@ Azure.Provisioning.Storage simplifies declarative resource provisioning in .NET for Azure Storage. 1.1.0-beta.1 - 1.0.0 + 1.0.1 $(RequiredTargetFrameworks) 12 @@ -18,6 +18,7 @@ ... --> + diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs index 968f8e6d5687..12ebe6cbadb8 100644 --- a/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/Generated/QueueService.cs @@ -18,13 +18,6 @@ namespace Azure.Provisioning.Storage; /// public partial class QueueService : ProvisionableResource { - /// - /// Gets the Name. - /// - public BicepValue Name - { - get { Initialize(); return _name!; } - } private BicepValue? _name; /// @@ -66,6 +59,11 @@ public StorageAccount? Parent } private ResourceReference? _parent; + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue(); + /// /// Creates a new QueueService. /// @@ -86,7 +84,7 @@ public QueueService(string bicepIdentifier, string? resourceVersion = default) /// protected override void DefineProvisionableProperties() { - _name = DefineProperty("Name", ["name"], isOutput: true); + _name = DefineProperty("Name", ["name"], defaultValue: GetNameDefaultValue()); _corsRules = DefineListProperty("CorsRules", ["properties", "cors", "corsRules"]); _id = DefineProperty("Id", ["id"], isOutput: true); _systemData = DefineModelProperty("SystemData", ["systemData"], isOutput: true); diff --git a/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs b/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs new file mode 100644 index 000000000000..7faf1c4e9dcc --- /dev/null +++ b/sdk/provisioning/Azure.Provisioning.Storage/src/QueueService.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Provisioning.Expressions; + +namespace Azure.Provisioning.Storage; + +// Customize the generated FileService resource. +public partial class QueueService +{ + /// + /// Get the default value for the Name property. + /// + private partial BicepValue GetNameDefaultValue() => + new StringLiteralExpression("default"); + + /// + /// Gets the Name. + /// + public BicepValue Name + { + get { Initialize(); return _name!; } + } +} diff --git a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj index 604f0151e1e1..e8677569dc47 100644 --- a/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj +++ b/sdk/provisioning/Azure.Provisioning.WebPubSub/src/Azure.Provisioning.WebPubSub.csproj @@ -12,6 +12,10 @@ CS1591 + + + + + + diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md new file mode 100644 index 000000000000..a4db083342f4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/README.md @@ -0,0 +1,81 @@ +# Microsoft Azure PureStorageBlock management client library for .NET + +Easily provision, manage, and tightly integrate independent software vendor (ISV) software and services on Azure with Azure Native integrations.Microsoft and Pure Storage Cloud developed this service and manage it together. +This offering provides enterprise-class cloud block storage with built-in cloud capabilities powered by a common Purity operating environment. + +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 PureStorageBlock management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.PureStorageBlock --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://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/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.net8.0.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.net8.0.cs new file mode 100644 index 000000000000..19880d64becd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.net8.0.cs @@ -0,0 +1,1123 @@ +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class AzureResourceManagerPureStorageBlockContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerPureStorageBlockContext() { } + public static Azure.ResourceManager.PureStorageBlock.AzureResourceManagerPureStorageBlockContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class PureStorageAvsStorageContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsStorageContainerCollection() { } + public virtual Azure.Response Exists(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storageContainerName, 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 storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string storageContainerName, 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 PureStorageAvsStorageContainerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsStorageContainerResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) { 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 GetPureStorageAvsStorageContainerVolume(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsStorageContainerVolumeAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeCollection GetPureStorageAvsStorageContainerVolumes() { throw null; } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsStorageContainerVolumeCollection() { } + public virtual Azure.Response Exists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeId, 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 volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeId, 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 PureStorageAvsStorageContainerVolumeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerVolumeData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsStorageContainerVolumeResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) { 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.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageAvsVmCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsVmCollection() { } + public virtual Azure.Response Exists(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string avsVmId, 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 avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string avsVmId, 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 PureStorageAvsVmData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsVmResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) { 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 GetPureStorageAvsVmVolume(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsVmVolumeAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeCollection GetPureStorageAvsVmVolumes() { throw null; } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageAvsVmVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsVmVolumeCollection() { } + public virtual Azure.Response Exists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeId, 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 volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeId, 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 PureStorageAvsVmVolumeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmVolumeData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsVmVolumeResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) { 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.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsVmVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class PureStorageBlockExtensions + { + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmResource GetPureStorageAvsVmResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPureStoragePool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPureStoragePoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolResource GetPureStoragePoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolCollection GetPureStoragePools(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPureStoragePools(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPureStoragePoolsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPureStorageReservation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPureStorageReservationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationResource GetPureStorageReservationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationCollection GetPureStorageReservations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPureStorageReservations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPureStorageReservationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStoragePoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStoragePoolCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storagePoolName, Azure.ResourceManager.PureStorageBlock.PureStoragePoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storagePoolName, Azure.ResourceManager.PureStorageBlock.PureStoragePoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storagePoolName, 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 storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string storagePoolName, 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 PureStoragePoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStoragePoolResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolData 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 storagePoolName) { 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.ResourceManager.ArmOperation DisableAvsConnection(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableAvsConnectionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation EnableAvsConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableAvsConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FinalizeAvsConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FinalizeAvsConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent 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.Response GetAvsConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAvsConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAvsStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAvsStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHealthStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHealthStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPureStorageAvsStorageContainer(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsStorageContainerAsync(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerCollection GetPureStorageAvsStorageContainers() { throw null; } + public virtual Azure.Response GetPureStorageAvsVm(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsVmAsync(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmCollection GetPureStorageAvsVms() { 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 RepairAvsConnection(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RepairAvsConnectionAsync(Azure.WaitUntil waitUntil, 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.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStoragePoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageReservationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageReservationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string reservationName, Azure.ResourceManager.PureStorageBlock.PureStorageReservationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string reservationName, Azure.ResourceManager.PureStorageBlock.PureStorageReservationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string reservationName, 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 reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string reservationName, 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 PureStorageReservationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageReservationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageReservationResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationData 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 reservationName) { 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 GetBillingReport(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingReportAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBillingStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResourceLimits(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceLimitsAsync(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.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageReservationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PureStorageBlock.Mocking +{ + public partial class MockablePureStorageBlockArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockArmClient() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmResource GetPureStorageAvsVmResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolResource GetPureStoragePoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationResource GetPureStorageReservationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePureStorageBlockResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockResourceGroupResource() { } + public virtual Azure.Response GetPureStoragePool(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStoragePoolAsync(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolCollection GetPureStoragePools() { throw null; } + public virtual Azure.Response GetPureStorageReservation(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageReservationAsync(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationCollection GetPureStorageReservations() { throw null; } + } + public partial class MockablePureStorageBlockSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockSubscriptionResource() { } + public virtual Azure.Pageable GetPureStoragePools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPureStoragePoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPureStorageReservations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPureStorageReservationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public static partial class ArmPureStorageBlockModelFactory + { + public static Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits PerformancePolicyLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits iopsLimit = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits bandwidthLimit = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits PropertyValueRangeLimits(long min = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits ProtectionPolicyLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits frequency = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits retention = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs PureStorageAvs(bool isAvsEnabled = false, Azure.Core.ResourceIdentifier clusterResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection PureStorageAvsConnection(bool isServiceInitializationCompleted = false, string serviceInitializationHandleEnc = null, Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle serviceInitializationHandle = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails PureStorageAvsDiskDetails(string diskId = null, string diskName = null, string folder = null, string avsVmInternalId = null, Azure.Core.ResourceIdentifier avsVmResourceId = null, string avsVmName = null, Azure.Core.ResourceIdentifier avsStorageContainerResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus PureStorageAvsStatus(bool isAvsEnabled = false, string currentConnectionStatus = null, Azure.Core.ResourceIdentifier clusterResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData PureStorageAvsStorageContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties PureStorageAvsStorageContainerProperties(Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, string resourceName = null, long? provisionedLimit = default(long?), string datastore = null, bool? mounted = default(bool?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData PureStorageAvsStorageContainerVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData PureStorageAvsVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails PureStorageAvsVmDetails(string vmId = null, string vmName = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType vmType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType), string avsVmInternalId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties PureStorageAvsVmProperties(string storagePoolInternalId = null, Azure.Core.ResourceIdentifier storagePoolResourceId = null, string displayName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState softDeletion = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType? volumeContainerType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData PureStorageAvsVmVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage PureStorageBandwidthUsage(long current = (long)0, long provisioned = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty PureStorageBillingUsageProperty(string propertyId = null, string propertyName = null, string currentValue = null, string previousValue = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity severity = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity), string statusMessage = null, System.Collections.Generic.IEnumerable subProperties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert PureStorageHealthAlert(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel level = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel), string message = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails PureStorageHealthDetails(double usedCapacityPercentage = 0, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage bandwidthUsage = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage iopsUsage = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, double dataReductionRatio = 0, long estimatedMaxCapacity = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage PureStorageIopsUsage(long current = (long)0, long provisioned = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails PureStorageMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolData PureStoragePoolData(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.PureStorageBlock.Models.PureStoragePoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties PureStoragePoolProperties(string storagePoolInternalId = null, string availabilityZone = null, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection vnetInjection = null, long? dataRetentionPeriod = default(long?), long provisionedBandwidthMbPerSec = (long)0, long? provisionedIops = default(long?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState?), Azure.Core.ResourceIdentifier reservationResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationData PureStorageReservationData(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.PureStorageBlock.Models.PureStorageReservationProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties PureStorageReservationProperties(string reservationInternalId = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails marketplace = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails user = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails PureStorageResourceLimitDetails(Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits storagePool = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits volumeProvisionedSize = null, Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits protectionPolicy = null, Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits performancePolicy = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState PureStorageSoftDeletionState(bool isDestroyed = false, System.DateTimeOffset? eradicatedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage PureStorageSpaceUsage(long totalUsed = (long)0, long unique = (long)0, long snapshots = (long)0, long shared = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties PureStorageVolumeProperties(string storagePoolInternalId = null, Azure.Core.ResourceIdentifier storagePoolResourceId = null, string volumeInternalId = null, string displayName = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState softDeletion = null, string createdTimestamp = null, long? provisionedSize = default(long?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType? volumeType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus ReservationBillingStatus(string timestamp = null, long totalUsedCapacityReported = (long)0, int lowDrrPoolCount = 0, double drrWeightedAverage = 0, long totalNonReducibleReported = (long)0, long extraUsedCapacityNonReducible = (long)0, long extraUsedCapacityLowUsageRounding = (long)0, long extraUsedCapacityNonReduciblePlanDiscount = (long)0, long totalUsedCapacityBilled = (long)0, long totalUsedCapacityIncludedPlan = (long)0, long totalUsedCapacityOverage = (long)0, long totalPerformanceReported = (long)0, long totalPerformanceIncludedPlan = (long)0, long totalPerformanceOverage = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport ReservationBillingUsageReport(string timestamp = null, System.Collections.Generic.IEnumerable billingUsageProperties = null, string overallStatusMessage = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle ServiceInitializationHandle(Azure.Core.ResourceIdentifier clusterResourceId = null, string serviceAccountUsername = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo StoragePoolHealthInfo(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails health = null, System.Collections.Generic.IEnumerable alerts = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits StoragePoolLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits provisionedBandwidthMbPerSec = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits provisionedIops = null, System.Collections.Generic.IEnumerable physicalAvailabilityZones = null) { throw null; } + } + public partial class PerformancePolicyLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PerformancePolicyLimits() { } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits BandwidthLimit { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits IopsLimit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PropertyValueRangeLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PropertyValueRangeLimits() { } + public long Max { get { throw null; } } + public long Min { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProtectionPolicyLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProtectionPolicyLimits() { } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits Frequency { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits Retention { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAddressDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAddressDetails(string addressLine1, string city, string state, string country, string postalCode) { } + public string AddressLine1 { get { throw null; } set { } } + public string AddressLine2 { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public string Country { get { throw null; } set { } } + public string PostalCode { get { throw null; } set { } } + public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvs() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public bool IsAvsEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsConnection() { } + public bool IsServiceInitializationCompleted { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle ServiceInitializationHandle { get { throw null; } } + public string ServiceInitializationHandleEnc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsDiskDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsDiskDetails() { } + public Azure.Core.ResourceIdentifier AvsStorageContainerResourceId { get { throw null; } } + public string AvsVmInternalId { get { throw null; } } + public string AvsVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier AvsVmResourceId { get { throw null; } } + public string DiskId { get { throw null; } } + public string DiskName { get { throw null; } } + public string Folder { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStatus() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string CurrentConnectionStatus { get { throw null; } } + public bool IsAvsEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerProperties() { } + public string Datastore { get { throw null; } } + public bool? Mounted { get { throw null; } } + public long? ProvisionedLimit { get { throw null; } } + public string ResourceName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsStorageContainerVolumePatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsStorageContainerVolumeUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmDetails() { } + public string AvsVmInternalId { get { throw null; } } + public string VmId { get { throw null; } } + public string VmName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType VmType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsVmPatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsVmUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmProperties() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails Avs { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string DisplayName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState SoftDeletion { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.Core.ResourceIdentifier StoragePoolResourceId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType? VolumeContainerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageAvsVmType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType VVol { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType 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.PureStorageBlock.Models.PureStorageAvsVmType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PureStorageAvsVmVolumeContainerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmVolumeContainerType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType AVS { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType 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.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageAvsVmVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsVmVolumePatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsVmVolumeUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageAvsVmVolumeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmVolumeType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType AVS { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType 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.PureStorageBlock.Models.PureStorageAvsVmVolumeType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageBandwidthUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageBandwidthUsage() { } + public long Current { get { throw null; } } + public long Max { get { throw null; } } + public long Provisioned { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageBillingUsageProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageBillingUsageProperty() { } + public string CurrentValue { get { throw null; } } + public string PreviousValue { get { throw null; } } + public string PropertyId { get { throw null; } } + public string PropertyName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity Severity { get { throw null; } } + public string StatusMessage { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SubProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageBillingUsageSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageBillingUsageSeverity(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity ALERT { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity INFORMATION { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity NONE { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity WARNING { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity 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.PureStorageBlock.Models.PureStorageBillingUsageSeverity left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageCompanyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageCompanyDetails(string companyName) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails Address { get { throw null; } set { } } + public string CompanyName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageHealthAlert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageHealthAlert() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Level { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageHealthAlertLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageHealthAlertLevel(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Error { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Info { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel 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.PureStorageBlock.Models.PureStorageHealthAlertLevel left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageHealthDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageHealthDetails() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage BandwidthUsage { get { throw null; } } + public double DataReductionRatio { get { throw null; } } + public long EstimatedMaxCapacity { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage IopsUsage { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public double UsedCapacityPercentage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageIopsUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageIopsUsage() { } + public long Current { get { throw null; } } + public long Max { get { throw null; } } + public long Provisioned { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageMarketplaceDetails(Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails offerDetails) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageMarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageMarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus 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.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public long? StoragePoolUpdateProvisionedBandwidthMbPerSec { 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.PureStorageBlock.Models.PureStoragePoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolProperties(string availabilityZone, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection vnetInjection, long provisionedBandwidthMbPerSec, Azure.Core.ResourceIdentifier reservationResourceId) { } + public string AvailabilityZone { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs Avs { get { throw null; } } + public long? DataRetentionPeriod { get { throw null; } } + public long ProvisionedBandwidthMbPerSec { get { throw null; } set { } } + public long? ProvisionedIops { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ReservationResourceId { get { throw null; } set { } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection VnetInjection { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolVnetInjection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolVnetInjection(Azure.Core.ResourceIdentifier subnetId, Azure.Core.ResourceIdentifier vnetId) { } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState 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.PureStorageBlock.Models.PureStorageProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageReservationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationPatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails ReservationUpdateUser { 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.PureStorageBlock.Models.PureStorageReservationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageReservationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationProperties(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails marketplace, Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails user) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? ProvisioningState { get { throw null; } } + public string ReservationInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageResourceLimitDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageResourceLimitDetails() { } + public Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits PerformancePolicy { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits ProtectionPolicy { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits StoragePool { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits VolumeProvisionedSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState 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.PureStorageBlock.Models.PureStorageResourceProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageSoftDeletionState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageSoftDeletionState(bool isDestroyed) { } + public System.DateTimeOffset? EradicatedOn { get { throw null; } } + public bool IsDestroyed { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageSpaceUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageSpaceUsage() { } + public long Shared { get { throw null; } } + public long Snapshots { get { throw null; } } + public long TotalUsed { get { throw null; } } + public long Unique { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageUserDetails(string firstName, string lastName, string emailAddress) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails CompanyDetails { get { throw null; } set { } } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageVolumeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageVolumeProperties() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails Avs { get { throw null; } } + public string CreatedTimestamp { get { throw null; } } + public string DisplayName { get { throw null; } } + public long? ProvisionedSize { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState SoftDeletion { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.Core.ResourceIdentifier StoragePoolResourceId { get { throw null; } } + public string VolumeInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType? VolumeType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReservationBillingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReservationBillingStatus() { } + public double DrrWeightedAverage { get { throw null; } } + public long ExtraUsedCapacityLowUsageRounding { get { throw null; } } + public long ExtraUsedCapacityNonReducible { get { throw null; } } + public long ExtraUsedCapacityNonReduciblePlanDiscount { get { throw null; } } + public int LowDrrPoolCount { get { throw null; } } + public string Timestamp { get { throw null; } } + public long TotalNonReducibleReported { get { throw null; } } + public long TotalPerformanceIncludedPlan { get { throw null; } } + public long TotalPerformanceOverage { get { throw null; } } + public long TotalPerformanceReported { get { throw null; } } + public long TotalUsedCapacityBilled { get { throw null; } } + public long TotalUsedCapacityIncludedPlan { get { throw null; } } + public long TotalUsedCapacityOverage { get { throw null; } } + public long TotalUsedCapacityReported { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReservationBillingUsageReport : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReservationBillingUsageReport() { } + public System.Collections.Generic.IReadOnlyList BillingUsageProperties { get { throw null; } } + public string OverallStatusMessage { get { throw null; } } + public string Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceInitializationHandle : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceInitializationHandle() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string ServiceAccountUsername { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceInitializationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceInitializationInfo() { } + public string ServiceAccountPassword { get { throw null; } set { } } + public string ServiceAccountUsername { get { throw null; } set { } } + public string VSphereCertificate { get { throw null; } set { } } + public string VSphereIP { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolEnableAvsConnectionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StoragePoolEnableAvsConnectionContent(Azure.Core.ResourceIdentifier clusterResourceId) { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolFinalizeAvsConnectionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StoragePoolFinalizeAvsConnectionContent() { } + public Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo ServiceInitializationData { get { throw null; } set { } } + public string ServiceInitializationDataEnc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolHealthInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StoragePoolHealthInfo() { } + public System.Collections.Generic.IReadOnlyList Alerts { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails Health { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StoragePoolLimits() { } + public System.Collections.Generic.IReadOnlyList PhysicalAvailabilityZones { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits ProvisionedBandwidthMbPerSec { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits ProvisionedIops { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.netstandard2.0.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.netstandard2.0.cs new file mode 100644 index 000000000000..19880d64becd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/api/Azure.ResourceManager.PureStorageBlock.netstandard2.0.cs @@ -0,0 +1,1123 @@ +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class AzureResourceManagerPureStorageBlockContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerPureStorageBlockContext() { } + public static Azure.ResourceManager.PureStorageBlock.AzureResourceManagerPureStorageBlockContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class PureStorageAvsStorageContainerCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsStorageContainerCollection() { } + public virtual Azure.Response Exists(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storageContainerName, 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 storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string storageContainerName, 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 PureStorageAvsStorageContainerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsStorageContainerResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) { 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 GetPureStorageAvsStorageContainerVolume(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsStorageContainerVolumeAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeCollection GetPureStorageAvsStorageContainerVolumes() { throw null; } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsStorageContainerVolumeCollection() { } + public virtual Azure.Response Exists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeId, 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 volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeId, 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 PureStorageAvsStorageContainerVolumeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerVolumeData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsStorageContainerVolumeResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) { 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.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageAvsVmCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsVmCollection() { } + public virtual Azure.Response Exists(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string avsVmId, 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 avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string avsVmId, 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 PureStorageAvsVmData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsVmResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) { 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 GetPureStorageAvsVmVolume(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsVmVolumeAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeCollection GetPureStorageAvsVmVolumes() { throw null; } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageAvsVmVolumeCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageAvsVmVolumeCollection() { } + public virtual Azure.Response Exists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string volumeId, 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 volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string volumeId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string volumeId, 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 PureStorageAvsVmVolumeData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmVolumeData() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties Properties { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmVolumeResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageAvsVmVolumeResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) { 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.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageAvsVmVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class PureStorageBlockExtensions + { + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmResource GetPureStorageAvsVmResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetPureStoragePool(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPureStoragePoolAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolResource GetPureStoragePoolResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolCollection GetPureStoragePools(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPureStoragePools(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPureStoragePoolsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response GetPureStorageReservation(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetPureStorageReservationAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationResource GetPureStorageReservationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationCollection GetPureStorageReservations(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetPureStorageReservations(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetPureStorageReservationsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStoragePoolCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStoragePoolCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string storagePoolName, Azure.ResourceManager.PureStorageBlock.PureStoragePoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string storagePoolName, Azure.ResourceManager.PureStorageBlock.PureStoragePoolData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string storagePoolName, 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 storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string storagePoolName, 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 PureStoragePoolData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStoragePoolResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolData 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 storagePoolName) { 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.ResourceManager.ArmOperation DisableAvsConnection(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableAvsConnectionAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation EnableAvsConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableAvsConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation FinalizeAvsConnection(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task FinalizeAvsConnectionAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent 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.Response GetAvsConnection(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAvsConnectionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAvsStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAvsStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetHealthStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetHealthStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetPureStorageAvsStorageContainer(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsStorageContainerAsync(string storageContainerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerCollection GetPureStorageAvsStorageContainers() { throw null; } + public virtual Azure.Response GetPureStorageAvsVm(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageAvsVmAsync(string avsVmId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmCollection GetPureStorageAvsVms() { 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 RepairAvsConnection(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task RepairAvsConnectionAsync(Azure.WaitUntil waitUntil, 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.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStoragePoolData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStoragePoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class PureStorageReservationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected PureStorageReservationCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string reservationName, Azure.ResourceManager.PureStorageBlock.PureStorageReservationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string reservationName, Azure.ResourceManager.PureStorageBlock.PureStorageReservationData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string reservationName, 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 reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string reservationName, 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 PureStorageReservationData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageReservationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected PureStorageReservationResource() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationData 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 reservationName) { 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 GetBillingReport(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingReportAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetBillingStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetBillingStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetResourceLimits(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetResourceLimitsAsync(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.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.PureStorageReservationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.PureStorageBlock.Models.PureStorageReservationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PureStorageBlock.Mocking +{ + public partial class MockablePureStorageBlockArmClient : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockArmClient() { } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmResource GetPureStorageAvsVmResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolResource GetPureStoragePoolResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationResource GetPureStorageReservationResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockablePureStorageBlockResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockResourceGroupResource() { } + public virtual Azure.Response GetPureStoragePool(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStoragePoolAsync(string storagePoolName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStoragePoolCollection GetPureStoragePools() { throw null; } + public virtual Azure.Response GetPureStorageReservation(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetPureStorageReservationAsync(string reservationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.PureStorageBlock.PureStorageReservationCollection GetPureStorageReservations() { throw null; } + } + public partial class MockablePureStorageBlockSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockablePureStorageBlockSubscriptionResource() { } + public virtual Azure.Pageable GetPureStoragePools(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPureStoragePoolsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetPureStorageReservations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetPureStorageReservationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public static partial class ArmPureStorageBlockModelFactory + { + public static Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits PerformancePolicyLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits iopsLimit = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits bandwidthLimit = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits PropertyValueRangeLimits(long min = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits ProtectionPolicyLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits frequency = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits retention = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs PureStorageAvs(bool isAvsEnabled = false, Azure.Core.ResourceIdentifier clusterResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection PureStorageAvsConnection(bool isServiceInitializationCompleted = false, string serviceInitializationHandleEnc = null, Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle serviceInitializationHandle = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails PureStorageAvsDiskDetails(string diskId = null, string diskName = null, string folder = null, string avsVmInternalId = null, Azure.Core.ResourceIdentifier avsVmResourceId = null, string avsVmName = null, Azure.Core.ResourceIdentifier avsStorageContainerResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus PureStorageAvsStatus(bool isAvsEnabled = false, string currentConnectionStatus = null, Azure.Core.ResourceIdentifier clusterResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerData PureStorageAvsStorageContainerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties PureStorageAvsStorageContainerProperties(Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, string resourceName = null, long? provisionedLimit = default(long?), string datastore = null, bool? mounted = default(bool?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsStorageContainerVolumeData PureStorageAvsStorageContainerVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmData PureStorageAvsVmData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails PureStorageAvsVmDetails(string vmId = null, string vmName = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType vmType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType), string avsVmInternalId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties PureStorageAvsVmProperties(string storagePoolInternalId = null, Azure.Core.ResourceIdentifier storagePoolResourceId = null, string displayName = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState softDeletion = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType? volumeContainerType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageAvsVmVolumeData PureStorageAvsVmVolumeData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage PureStorageBandwidthUsage(long current = (long)0, long provisioned = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty PureStorageBillingUsageProperty(string propertyId = null, string propertyName = null, string currentValue = null, string previousValue = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity severity = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity), string statusMessage = null, System.Collections.Generic.IEnumerable subProperties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert PureStorageHealthAlert(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel level = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel), string message = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails PureStorageHealthDetails(double usedCapacityPercentage = 0, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage bandwidthUsage = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage iopsUsage = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, double dataReductionRatio = 0, long estimatedMaxCapacity = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage PureStorageIopsUsage(long current = (long)0, long provisioned = (long)0, long max = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails PureStorageMarketplaceDetails(string subscriptionId = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus? subscriptionStatus = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails offerDetails = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStoragePoolData PureStoragePoolData(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.PureStorageBlock.Models.PureStoragePoolProperties properties = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties PureStoragePoolProperties(string storagePoolInternalId = null, string availabilityZone = null, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection vnetInjection = null, long? dataRetentionPeriod = default(long?), long provisionedBandwidthMbPerSec = (long)0, long? provisionedIops = default(long?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState?), Azure.Core.ResourceIdentifier reservationResourceId = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.PureStorageReservationData PureStorageReservationData(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.PureStorageBlock.Models.PureStorageReservationProperties properties = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties PureStorageReservationProperties(string reservationInternalId = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails marketplace = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails user = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails PureStorageResourceLimitDetails(Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits storagePool = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits volumeProvisionedSize = null, Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits protectionPolicy = null, Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits performancePolicy = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState PureStorageSoftDeletionState(bool isDestroyed = false, System.DateTimeOffset? eradicatedOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage PureStorageSpaceUsage(long totalUsed = (long)0, long unique = (long)0, long snapshots = (long)0, long shared = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties PureStorageVolumeProperties(string storagePoolInternalId = null, Azure.Core.ResourceIdentifier storagePoolResourceId = null, string volumeInternalId = null, string displayName = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage space = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState softDeletion = null, string createdTimestamp = null, long? provisionedSize = default(long?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType? volumeType = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType?), Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails avs = null, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? provisioningState = default(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState?)) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus ReservationBillingStatus(string timestamp = null, long totalUsedCapacityReported = (long)0, int lowDrrPoolCount = 0, double drrWeightedAverage = 0, long totalNonReducibleReported = (long)0, long extraUsedCapacityNonReducible = (long)0, long extraUsedCapacityLowUsageRounding = (long)0, long extraUsedCapacityNonReduciblePlanDiscount = (long)0, long totalUsedCapacityBilled = (long)0, long totalUsedCapacityIncludedPlan = (long)0, long totalUsedCapacityOverage = (long)0, long totalPerformanceReported = (long)0, long totalPerformanceIncludedPlan = (long)0, long totalPerformanceOverage = (long)0) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport ReservationBillingUsageReport(string timestamp = null, System.Collections.Generic.IEnumerable billingUsageProperties = null, string overallStatusMessage = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle ServiceInitializationHandle(Azure.Core.ResourceIdentifier clusterResourceId = null, string serviceAccountUsername = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo StoragePoolHealthInfo(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails health = null, System.Collections.Generic.IEnumerable alerts = null) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits StoragePoolLimits(Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits provisionedBandwidthMbPerSec = null, Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits provisionedIops = null, System.Collections.Generic.IEnumerable physicalAvailabilityZones = null) { throw null; } + } + public partial class PerformancePolicyLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PerformancePolicyLimits() { } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits BandwidthLimit { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits IopsLimit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PropertyValueRangeLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PropertyValueRangeLimits() { } + public long Max { get { throw null; } } + public long Min { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProtectionPolicyLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProtectionPolicyLimits() { } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits Frequency { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits Retention { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAddressDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAddressDetails(string addressLine1, string city, string state, string country, string postalCode) { } + public string AddressLine1 { get { throw null; } set { } } + public string AddressLine2 { get { throw null; } set { } } + public string City { get { throw null; } set { } } + public string Country { get { throw null; } set { } } + public string PostalCode { get { throw null; } set { } } + public string State { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvs() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public bool IsAvsEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsConnection() { } + public bool IsServiceInitializationCompleted { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle ServiceInitializationHandle { get { throw null; } } + public string ServiceInitializationHandleEnc { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsDiskDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsDiskDetails() { } + public Azure.Core.ResourceIdentifier AvsStorageContainerResourceId { get { throw null; } } + public string AvsVmInternalId { get { throw null; } } + public string AvsVmName { get { throw null; } } + public Azure.Core.ResourceIdentifier AvsVmResourceId { get { throw null; } } + public string DiskId { get { throw null; } } + public string DiskName { get { throw null; } } + public string Folder { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStatus() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string CurrentConnectionStatus { get { throw null; } } + public bool IsAvsEnabled { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsStorageContainerProperties() { } + public string Datastore { get { throw null; } } + public bool? Mounted { get { throw null; } } + public long? ProvisionedLimit { get { throw null; } } + public string ResourceName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsStorageContainerVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsStorageContainerVolumePatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsStorageContainerVolumeUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsStorageContainerVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmDetails() { } + public string AvsVmInternalId { get { throw null; } } + public string VmId { get { throw null; } } + public string VmName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType VmType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsVmPatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsVmUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageAvsVmProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageAvsVmProperties() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmDetails Avs { get { throw null; } } + public System.DateTimeOffset? CreatedOn { get { throw null; } } + public string DisplayName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState SoftDeletion { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.Core.ResourceIdentifier StoragePoolResourceId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType? VolumeContainerType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageAvsVmType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType VVol { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType 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.PureStorageBlock.Models.PureStorageAvsVmType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PureStorageAvsVmVolumeContainerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmVolumeContainerType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType AVS { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType 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.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeContainerType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageAvsVmVolumePatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageAvsVmVolumePatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState AvsVmVolumeUpdateSoftDeletion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumePatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageAvsVmVolumeType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageAvsVmVolumeType(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType AVS { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType 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.PureStorageBlock.Models.PureStorageAvsVmVolumeType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageBandwidthUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageBandwidthUsage() { } + public long Current { get { throw null; } } + public long Max { get { throw null; } } + public long Provisioned { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageBillingUsageProperty : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageBillingUsageProperty() { } + public string CurrentValue { get { throw null; } } + public string PreviousValue { get { throw null; } } + public string PropertyId { get { throw null; } } + public string PropertyName { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity Severity { get { throw null; } } + public string StatusMessage { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SubProperties { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageProperty System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageBillingUsageSeverity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageBillingUsageSeverity(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity ALERT { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity INFORMATION { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity NONE { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity WARNING { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity 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.PureStorageBlock.Models.PureStorageBillingUsageSeverity left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageBillingUsageSeverity right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageCompanyDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageCompanyDetails(string companyName) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAddressDetails Address { get { throw null; } set { } } + public string CompanyName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageHealthAlert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageHealthAlert() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Level { get { throw null; } } + public string Message { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlert System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageHealthAlertLevel : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageHealthAlertLevel(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Error { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Info { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel 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.PureStorageBlock.Models.PureStorageHealthAlertLevel left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthAlertLevel right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageHealthDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageHealthDetails() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageBandwidthUsage BandwidthUsage { get { throw null; } } + public double DataReductionRatio { get { throw null; } } + public long EstimatedMaxCapacity { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage IopsUsage { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public double UsedCapacityPercentage { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageIopsUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageIopsUsage() { } + public long Current { get { throw null; } } + public long Max { get { throw null; } } + public long Provisioned { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageIopsUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageMarketplaceDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageMarketplaceDetails(Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails offerDetails) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails OfferDetails { get { throw null; } set { } } + public string SubscriptionId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus? SubscriptionStatus { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageMarketplaceSubscriptionStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageMarketplaceSubscriptionStatus(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus PendingFulfillmentStart { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Subscribed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Suspended { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus Unsubscribed { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus 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.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceSubscriptionStatus right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageOfferDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageOfferDetails(string publisherId, string offerId, string planId) { } + public string OfferId { get { throw null; } set { } } + public string PlanId { get { throw null; } set { } } + public string PlanName { get { throw null; } set { } } + public string PublisherId { get { throw null; } set { } } + public string TermId { get { throw null; } set { } } + public string TermUnit { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageOfferDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolPatch() { } + public Azure.ResourceManager.Models.ManagedServiceIdentity Identity { get { throw null; } set { } } + public long? StoragePoolUpdateProvisionedBandwidthMbPerSec { 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.PureStorageBlock.Models.PureStoragePoolPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolProperties(string availabilityZone, Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection vnetInjection, long provisionedBandwidthMbPerSec, Azure.Core.ResourceIdentifier reservationResourceId) { } + public string AvailabilityZone { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvs Avs { get { throw null; } } + public long? DataRetentionPeriod { get { throw null; } } + public long ProvisionedBandwidthMbPerSec { get { throw null; } set { } } + public long? ProvisionedIops { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? ProvisioningState { get { throw null; } } + public Azure.Core.ResourceIdentifier ReservationResourceId { get { throw null; } set { } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection VnetInjection { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStoragePoolVnetInjection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStoragePoolVnetInjection(Azure.Core.ResourceIdentifier subnetId, Azure.Core.ResourceIdentifier vnetId) { } + public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier VnetId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStoragePoolVnetInjection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState 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.PureStorageBlock.Models.PureStorageProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageReservationPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationPatch() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails ReservationUpdateUser { 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.PureStorageBlock.Models.PureStorageReservationPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageReservationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageReservationProperties(Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails marketplace, Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails user) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageMarketplaceDetails Marketplace { get { throw null; } set { } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageProvisioningState? ProvisioningState { get { throw null; } } + public string ReservationInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails User { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageReservationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageResourceLimitDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageResourceLimitDetails() { } + public Azure.ResourceManager.PureStorageBlock.Models.PerformancePolicyLimits PerformancePolicy { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.ProtectionPolicyLimits ProtectionPolicy { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits StoragePool { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits VolumeProvisionedSize { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceLimitDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 PureStorageResourceProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PureStorageResourceProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState 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.PureStorageBlock.Models.PureStorageResourceProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState left, Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class PureStorageSoftDeletionState : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageSoftDeletionState(bool isDestroyed) { } + public System.DateTimeOffset? EradicatedOn { get { throw null; } } + public bool IsDestroyed { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageSpaceUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageSpaceUsage() { } + public long Shared { get { throw null; } } + public long Snapshots { get { throw null; } } + public long TotalUsed { get { throw null; } } + public long Unique { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageUserDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PureStorageUserDetails(string firstName, string lastName, string emailAddress) { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageCompanyDetails CompanyDetails { get { throw null; } set { } } + public string EmailAddress { get { throw null; } set { } } + public string FirstName { get { throw null; } set { } } + public string LastName { get { throw null; } set { } } + public string PhoneNumber { get { throw null; } set { } } + public string Upn { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageUserDetails System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PureStorageVolumeProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal PureStorageVolumeProperties() { } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsDiskDetails Avs { get { throw null; } } + public string CreatedTimestamp { get { throw null; } } + public string DisplayName { get { throw null; } } + public long? ProvisionedSize { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageResourceProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSoftDeletionState SoftDeletion { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageSpaceUsage Space { get { throw null; } } + public string StoragePoolInternalId { get { throw null; } } + public Azure.Core.ResourceIdentifier StoragePoolResourceId { get { throw null; } } + public string VolumeInternalId { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageAvsVmVolumeType? VolumeType { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.PureStorageVolumeProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReservationBillingStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReservationBillingStatus() { } + public double DrrWeightedAverage { get { throw null; } } + public long ExtraUsedCapacityLowUsageRounding { get { throw null; } } + public long ExtraUsedCapacityNonReducible { get { throw null; } } + public long ExtraUsedCapacityNonReduciblePlanDiscount { get { throw null; } } + public int LowDrrPoolCount { get { throw null; } } + public string Timestamp { get { throw null; } } + public long TotalNonReducibleReported { get { throw null; } } + public long TotalPerformanceIncludedPlan { get { throw null; } } + public long TotalPerformanceOverage { get { throw null; } } + public long TotalPerformanceReported { get { throw null; } } + public long TotalUsedCapacityBilled { get { throw null; } } + public long TotalUsedCapacityIncludedPlan { get { throw null; } } + public long TotalUsedCapacityOverage { get { throw null; } } + public long TotalUsedCapacityReported { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ReservationBillingUsageReport : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ReservationBillingUsageReport() { } + public System.Collections.Generic.IReadOnlyList BillingUsageProperties { get { throw null; } } + public string OverallStatusMessage { get { throw null; } } + public string Timestamp { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ReservationBillingUsageReport System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceInitializationHandle : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceInitializationHandle() { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + public string ServiceAccountUsername { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationHandle System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceInitializationInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceInitializationInfo() { } + public string ServiceAccountPassword { get { throw null; } set { } } + public string ServiceAccountUsername { get { throw null; } set { } } + public string VSphereCertificate { get { throw null; } set { } } + public string VSphereIP { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolEnableAvsConnectionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StoragePoolEnableAvsConnectionContent(Azure.Core.ResourceIdentifier clusterResourceId) { } + public Azure.Core.ResourceIdentifier ClusterResourceId { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolEnableAvsConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolFinalizeAvsConnectionContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StoragePoolFinalizeAvsConnectionContent() { } + public Azure.ResourceManager.PureStorageBlock.Models.ServiceInitializationInfo ServiceInitializationData { get { throw null; } set { } } + public string ServiceInitializationDataEnc { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolFinalizeAvsConnectionContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolHealthInfo : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StoragePoolHealthInfo() { } + public System.Collections.Generic.IReadOnlyList Alerts { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PureStorageHealthDetails Health { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolHealthInfo System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class StoragePoolLimits : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal StoragePoolLimits() { } + public System.Collections.Generic.IReadOnlyList PhysicalAvailabilityZones { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits ProvisionedBandwidthMbPerSec { get { throw null; } } + public Azure.ResourceManager.PureStorageBlock.Models.PropertyValueRangeLimits ProvisionedIops { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.PureStorageBlock.Models.StoragePoolLimits System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json new file mode 100644 index 000000000000..6514a64c2411 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/assets.json @@ -0,0 +1,7 @@ + +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/purestorageblock/Azure.ResourceManager.PureStorageBlock", + "Tag": "" +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj new file mode 100644 index 000000000000..70d5c9f46c03 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Azure.ResourceManager.PureStorageBlock.Samples.csproj @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.cs new file mode 100644 index 000000000000..458ea35766bf --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerCollection.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.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsStorageContainerCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsStorageContainersGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolName"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsStorageContainerResource + PureStorageAvsStorageContainerCollection collection = pureStoragePool.GetPureStorageAvsStorageContainers(); + + // invoke the operation + string storageContainerName = "storageContainerName"; + PureStorageAvsStorageContainerResource result = await collection.GetAsync(storageContainerName); + + // 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 + PureStorageAvsStorageContainerData 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_AvsStorageContainersListByStoragePool() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_ListByStoragePool_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_ListByStoragePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "spName"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsStorageContainerResource + PureStorageAvsStorageContainerCollection collection = pureStoragePool.GetPureStorageAvsStorageContainers(); + + // invoke the operation and iterate over the result + await foreach (PureStorageAvsStorageContainerResource 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 + PureStorageAvsStorageContainerData 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_AvsStorageContainersGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolName"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsStorageContainerResource + PureStorageAvsStorageContainerCollection collection = pureStoragePool.GetPureStorageAvsStorageContainers(); + + // invoke the operation + string storageContainerName = "storageContainerName"; + bool result = await collection.ExistsAsync(storageContainerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsStorageContainersGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolName"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsStorageContainerResource + PureStorageAvsStorageContainerCollection collection = pureStoragePool.GetPureStorageAvsStorageContainers(); + + // invoke the operation + string storageContainerName = "storageContainerName"; + NullableResponse response = await collection.GetIfExistsAsync(storageContainerName); + PureStorageAvsStorageContainerResource 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 + PureStorageAvsStorageContainerData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs new file mode 100644 index 000000000000..246667c5dfad --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerResource.cs @@ -0,0 +1,76 @@ +// 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.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsStorageContainerResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsStorageContainersGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolName"; + string storageContainerName = "storageContainerName"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // invoke the operation + PureStorageAvsStorageContainerResource result = await pureStorageAvsStorageContainer.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 + PureStorageAvsStorageContainerData 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_AvsStorageContainersDelete() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainers_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainer_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 PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolName"; + string storageContainerName = "storageContainerName"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // invoke the operation + await pureStorageAvsStorageContainer.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.cs new file mode 100644 index 000000000000..1e97be9a9c4d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeCollection.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.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsStorageContainerVolumeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsStorageContainerVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // get the collection of this PureStorageAvsStorageContainerVolumeResource + PureStorageAvsStorageContainerVolumeCollection collection = pureStorageAvsStorageContainer.GetPureStorageAvsStorageContainerVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + PureStorageAvsStorageContainerVolumeResource result = await collection.GetAsync(volumeId); + + // 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 + PureStorageAvsStorageContainerVolumeData 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_AvsStorageContainerVolumesListByAvsStorageContainer() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_ListByAvsStorageContainer_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_ListByAvsStorageContainer" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // get the collection of this PureStorageAvsStorageContainerVolumeResource + PureStorageAvsStorageContainerVolumeCollection collection = pureStorageAvsStorageContainer.GetPureStorageAvsStorageContainerVolumes(); + + // invoke the operation and iterate over the result + await foreach (PureStorageAvsStorageContainerVolumeResource 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 + PureStorageAvsStorageContainerVolumeData 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_AvsStorageContainerVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // get the collection of this PureStorageAvsStorageContainerVolumeResource + PureStorageAvsStorageContainerVolumeCollection collection = pureStorageAvsStorageContainer.GetPureStorageAvsStorageContainerVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + bool result = await collection.ExistsAsync(volumeId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsStorageContainerVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerResource created on azure + // for more information of creating PureStorageAvsStorageContainerResource, please refer to the document of PureStorageAvsStorageContainerResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + ResourceIdentifier pureStorageAvsStorageContainerResourceId = PureStorageAvsStorageContainerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + PureStorageAvsStorageContainerResource pureStorageAvsStorageContainer = client.GetPureStorageAvsStorageContainerResource(pureStorageAvsStorageContainerResourceId); + + // get the collection of this PureStorageAvsStorageContainerVolumeResource + PureStorageAvsStorageContainerVolumeCollection collection = pureStorageAvsStorageContainer.GetPureStorageAvsStorageContainerVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + NullableResponse response = await collection.GetIfExistsAsync(volumeId); + PureStorageAvsStorageContainerVolumeResource 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 + PureStorageAvsStorageContainerVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs new file mode 100644 index 000000000000..03b9ceb15e0c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsStorageContainerVolumeResource.cs @@ -0,0 +1,116 @@ +// 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.PureStorageBlock.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsStorageContainerVolumeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsStorageContainerVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsStorageContainerVolumeResource created on azure + // for more information of creating PureStorageAvsStorageContainerVolumeResource, please refer to the document of PureStorageAvsStorageContainerVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsStorageContainerVolumeResourceId = PureStorageAvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + PureStorageAvsStorageContainerVolumeResource pureStorageAvsStorageContainerVolume = client.GetPureStorageAvsStorageContainerVolumeResource(pureStorageAvsStorageContainerVolumeResourceId); + + // invoke the operation + PureStorageAvsStorageContainerVolumeResource result = await pureStorageAvsStorageContainerVolume.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 + PureStorageAvsStorageContainerVolumeData 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_AvsStorageContainerVolumesDelete() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_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 PureStorageAvsStorageContainerVolumeResource created on azure + // for more information of creating PureStorageAvsStorageContainerVolumeResource, please refer to the document of PureStorageAvsStorageContainerVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsStorageContainerVolumeResourceId = PureStorageAvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + PureStorageAvsStorageContainerVolumeResource pureStorageAvsStorageContainerVolume = client.GetPureStorageAvsStorageContainerVolumeResource(pureStorageAvsStorageContainerVolumeResourceId); + + // invoke the operation + await pureStorageAvsStorageContainerVolume.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AvsStorageContainerVolumesUpdate() + { + // Generated from example definition: 2024-11-01-preview/AvsStorageContainerVolumes_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AvsStorageContainerVolume_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 PureStorageAvsStorageContainerVolumeResource created on azure + // for more information of creating PureStorageAvsStorageContainerVolumeResource, please refer to the document of PureStorageAvsStorageContainerVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string storageContainerName = "name"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsStorageContainerVolumeResourceId = PureStorageAvsStorageContainerVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + PureStorageAvsStorageContainerVolumeResource pureStorageAvsStorageContainerVolume = client.GetPureStorageAvsStorageContainerVolumeResource(pureStorageAvsStorageContainerVolumeResourceId); + + // invoke the operation + PureStorageAvsStorageContainerVolumePatch patch = new PureStorageAvsStorageContainerVolumePatch + { + AvsStorageContainerVolumeUpdateSoftDeletion = new PureStorageSoftDeletionState(true), + }; + ArmOperation lro = await pureStorageAvsStorageContainerVolume.UpdateAsync(WaitUntil.Completed, patch); + PureStorageAvsStorageContainerVolumeResource 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 + PureStorageAvsStorageContainerVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmCollection.cs new file mode 100644 index 000000000000..e7cb98e8334f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmCollection.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.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsVmCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsVmsGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsVmResource + PureStorageAvsVmCollection collection = pureStoragePool.GetPureStorageAvsVms(); + + // invoke the operation + string avsVmId = "cbdec-ddbb"; + PureStorageAvsVmResource result = await collection.GetAsync(avsVmId); + + // 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 + PureStorageAvsVmData 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_AvsVmsListByStoragePool() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_ListByStoragePool_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_ListByStoragePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsVmResource + PureStorageAvsVmCollection collection = pureStoragePool.GetPureStorageAvsVms(); + + // invoke the operation and iterate over the result + await foreach (PureStorageAvsVmResource 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 + PureStorageAvsVmData 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_AvsVmsGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsVmResource + PureStorageAvsVmCollection collection = pureStoragePool.GetPureStorageAvsVms(); + + // invoke the operation + string avsVmId = "cbdec-ddbb"; + bool result = await collection.ExistsAsync(avsVmId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsVmsGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // get the collection of this PureStorageAvsVmResource + PureStorageAvsVmCollection collection = pureStoragePool.GetPureStorageAvsVms(); + + // invoke the operation + string avsVmId = "cbdec-ddbb"; + NullableResponse response = await collection.GetIfExistsAsync(avsVmId); + PureStorageAvsVmResource 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 + PureStorageAvsVmData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmResource.cs new file mode 100644 index 000000000000..7068c3f3742e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmResource.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.PureStorageBlock.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsVmResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsVmsGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // invoke the operation + PureStorageAvsVmResource result = await pureStorageAvsVm.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 + PureStorageAvsVmData 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_AvsVmsDelete() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_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 PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // invoke the operation + await pureStorageAvsVm.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AvsVmsUpdate() + { + // Generated from example definition: 2024-11-01-preview/AvsVms_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVm_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 PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // invoke the operation + PureStorageAvsVmPatch patch = new PureStorageAvsVmPatch + { + AvsVmUpdateSoftDeletion = new PureStorageSoftDeletionState(true), + }; + ArmOperation lro = await pureStorageAvsVm.UpdateAsync(WaitUntil.Completed, patch); + PureStorageAvsVmResource 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 + PureStorageAvsVmData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.cs new file mode 100644 index 000000000000..526d9bc02f99 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeCollection.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.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsVmVolumeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsVmVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // get the collection of this PureStorageAvsVmVolumeResource + PureStorageAvsVmVolumeCollection collection = pureStorageAvsVm.GetPureStorageAvsVmVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + PureStorageAvsVmVolumeResource result = await collection.GetAsync(volumeId); + + // 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 + PureStorageAvsVmVolumeData 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_AvsVmVolumesListByAvsVm() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_ListByAvsVm_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_ListByAvsVm" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // get the collection of this PureStorageAvsVmVolumeResource + PureStorageAvsVmVolumeCollection collection = pureStorageAvsVm.GetPureStorageAvsVmVolumes(); + + // invoke the operation and iterate over the result + await foreach (PureStorageAvsVmVolumeResource 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 + PureStorageAvsVmVolumeData 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_AvsVmVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // get the collection of this PureStorageAvsVmVolumeResource + PureStorageAvsVmVolumeCollection collection = pureStorageAvsVm.GetPureStorageAvsVmVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + bool result = await collection.ExistsAsync(volumeId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AvsVmVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmResource created on azure + // for more information of creating PureStorageAvsVmResource, please refer to the document of PureStorageAvsVmResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmResourceId = PureStorageAvsVmResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + PureStorageAvsVmResource pureStorageAvsVm = client.GetPureStorageAvsVmResource(pureStorageAvsVmResourceId); + + // get the collection of this PureStorageAvsVmVolumeResource + PureStorageAvsVmVolumeCollection collection = pureStorageAvsVm.GetPureStorageAvsVmVolumes(); + + // invoke the operation + string volumeId = "cbdec-ddbb"; + NullableResponse response = await collection.GetIfExistsAsync(volumeId); + PureStorageAvsVmVolumeResource 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 + PureStorageAvsVmVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs new file mode 100644 index 000000000000..cfd5cdc0c98c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageAvsVmVolumeResource.cs @@ -0,0 +1,116 @@ +// 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.PureStorageBlock.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageAvsVmVolumeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AvsVmVolumesGet() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageAvsVmVolumeResource created on azure + // for more information of creating PureStorageAvsVmVolumeResource, please refer to the document of PureStorageAvsVmVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmVolumeResourceId = PureStorageAvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + PureStorageAvsVmVolumeResource pureStorageAvsVmVolume = client.GetPureStorageAvsVmVolumeResource(pureStorageAvsVmVolumeResourceId); + + // invoke the operation + PureStorageAvsVmVolumeResource result = await pureStorageAvsVmVolume.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 + PureStorageAvsVmVolumeData 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_AvsVmVolumesDelete() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_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 PureStorageAvsVmVolumeResource created on azure + // for more information of creating PureStorageAvsVmVolumeResource, please refer to the document of PureStorageAvsVmVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmVolumeResourceId = PureStorageAvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + PureStorageAvsVmVolumeResource pureStorageAvsVmVolume = client.GetPureStorageAvsVmVolumeResource(pureStorageAvsVmVolumeResourceId); + + // invoke the operation + await pureStorageAvsVmVolume.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AvsVmVolumesUpdate() + { + // Generated from example definition: 2024-11-01-preview/AvsVmVolumes_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AvsVmVolume_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 PureStorageAvsVmVolumeResource created on azure + // for more information of creating PureStorageAvsVmVolumeResource, please refer to the document of PureStorageAvsVmVolumeResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + string avsVmId = "cbdec-ddbb"; + string volumeId = "cbdec-ddbb"; + ResourceIdentifier pureStorageAvsVmVolumeResourceId = PureStorageAvsVmVolumeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + PureStorageAvsVmVolumeResource pureStorageAvsVmVolume = client.GetPureStorageAvsVmVolumeResource(pureStorageAvsVmVolumeResourceId); + + // invoke the operation + PureStorageAvsVmVolumePatch patch = new PureStorageAvsVmVolumePatch + { + AvsVmVolumeUpdateSoftDeletion = new PureStorageSoftDeletionState(true), + }; + ArmOperation lro = await pureStorageAvsVmVolume.UpdateAsync(WaitUntil.Completed, patch); + PureStorageAvsVmVolumeResource 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 + PureStorageAvsVmVolumeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolCollection.cs new file mode 100644 index 000000000000..d5741c44d011 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolCollection.cs @@ -0,0 +1,208 @@ +// 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.Models; +using Azure.ResourceManager.PureStorageBlock.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStoragePoolCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_StoragePoolsCreate() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Create_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_Create" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PureStoragePoolResource + PureStoragePoolCollection collection = resourceGroupResource.GetPureStoragePools(); + + // invoke the operation + string storagePoolName = "storagePoolname"; + PureStoragePoolData data = new PureStoragePoolData(new AzureLocation("lonlc")) + { + Properties = new PureStoragePoolProperties("vknyl", new PureStoragePoolVnetInjection(new ResourceIdentifier("tnlctolrxdvnkjiphlrdxq"), new ResourceIdentifier("zbumtytyqwewjcyckwqchiypshv")), 17L, new ResourceIdentifier("xiowoxnbtcotutcmmrofvgdi")), + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("key4211")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["key7593"] = "vsyiygyurvwlfaezpuqu" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, storagePoolName, data); + PureStoragePoolResource 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 + PureStoragePoolData 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_StoragePoolsGet() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PureStoragePoolResource + PureStoragePoolCollection collection = resourceGroupResource.GetPureStoragePools(); + + // invoke the operation + string storagePoolName = "storagePoolname"; + PureStoragePoolResource result = await collection.GetAsync(storagePoolName); + + // 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 + PureStoragePoolData 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_StoragePoolsListByResourceGroup() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PureStoragePoolResource + PureStoragePoolCollection collection = resourceGroupResource.GetPureStoragePools(); + + // invoke the operation and iterate over the result + await foreach (PureStoragePoolResource 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 + PureStoragePoolData 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_StoragePoolsGet() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PureStoragePoolResource + PureStoragePoolCollection collection = resourceGroupResource.GetPureStoragePools(); + + // invoke the operation + string storagePoolName = "storagePoolname"; + bool result = await collection.ExistsAsync(storagePoolName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_StoragePoolsGet() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this PureStoragePoolResource + PureStoragePoolCollection collection = resourceGroupResource.GetPureStoragePools(); + + // invoke the operation + string storagePoolName = "storagePoolname"; + NullableResponse response = await collection.GetIfExistsAsync(storagePoolName); + PureStoragePoolResource 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 + PureStoragePoolData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolResource.cs new file mode 100644 index 000000000000..f9f7fc8d86b2 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStoragePoolResource.cs @@ -0,0 +1,316 @@ +// 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.Models; +using Azure.ResourceManager.PureStorageBlock.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStoragePoolResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_StoragePoolsGet() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Get_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + PureStoragePoolResource result = await pureStoragePool.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 + PureStoragePoolData 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_StoragePoolsDelete() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_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 PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + await pureStoragePool.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_StoragePoolsUpdate() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_Update_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_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 PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + PureStoragePoolPatch patch = new PureStoragePoolPatch + { + Identity = new ManagedServiceIdentity("None") + { + UserAssignedIdentities = +{ +[new ResourceIdentifier("key4211")] = new UserAssignedIdentity() +}, + }, + Tags = +{ +["key9065"] = "ebgmkwxqewe" +}, + StoragePoolUpdateProvisionedBandwidthMbPerSec = 23L, + }; + ArmOperation lro = await pureStoragePool.UpdateAsync(WaitUntil.Completed, patch); + PureStoragePoolResource 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 + PureStoragePoolData 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 GetHealthStatus_StoragePoolsGetHealthStatus() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_GetHealthStatus_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_GetHealthStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + StoragePoolHealthInfo result = await pureStoragePool.GetHealthStatusAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvsConnection_StoragePoolsGetAvsConnection() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_GetAvsConnection_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_GetAvsConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + PureStorageAvsConnection result = await pureStoragePool.GetAvsConnectionAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAvsStatus_StoragePoolsGetAvsStatus() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_GetAvsStatus_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_GetAvsStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + PureStorageAvsStatus result = await pureStoragePool.GetAvsStatusAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task EnableAvsConnection_StoragePoolsEnableAvsConnection() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_EnableAvsConnection_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_EnableAvsConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + StoragePoolEnableAvsConnectionContent content = new StoragePoolEnableAvsConnectionContent(new ResourceIdentifier("tghkgktlddwlszbeh")); + await pureStoragePool.EnableAvsConnectionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DisableAvsConnection_StoragePoolsDisableAvsConnection() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_DisableAvsConnection_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_DisableAvsConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + await pureStoragePool.DisableAvsConnectionAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task FinalizeAvsConnection_StoragePoolsFinalizeAvsConnection() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_FinalizeAvsConnection_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_FinalizeAvsConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + StoragePoolFinalizeAvsConnectionContent content = new StoragePoolFinalizeAvsConnectionContent + { + ServiceInitializationDataEnc = "hlgzaxrohv", + ServiceInitializationData = new ServiceInitializationInfo + { + ServiceAccountUsername = "axchgm", + ServiceAccountPassword = "i", + VSphereIP = "lhbajnykbznxnxpxozyfdjaciennks", + VSphereCertificate = "s", + }, + }; + await pureStoragePool.FinalizeAvsConnectionAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task RepairAvsConnection_StoragePoolsRepairAvsConnection() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_RepairAvsConnection_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePools_RepairAvsConnection" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStoragePoolResource created on azure + // for more information of creating PureStoragePoolResource, please refer to the document of PureStoragePoolResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string storagePoolName = "storagePoolname"; + ResourceIdentifier pureStoragePoolResourceId = PureStoragePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storagePoolName); + PureStoragePoolResource pureStoragePool = client.GetPureStoragePoolResource(pureStoragePoolResourceId); + + // invoke the operation + await pureStoragePool.RepairAvsConnectionAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageReservationResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageReservationResource.cs new file mode 100644 index 000000000000..11522c9c2e04 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_PureStorageReservationResource.cs @@ -0,0 +1,97 @@ +// 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.PureStorageBlock.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.PureStorageBlock.Samples +{ + public partial class Sample_PureStorageReservationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetResourceLimits_ReservationsGetResourceLimits() + { + // Generated from example definition: 2024-11-01-preview/Reservations_GetResourceLimits_MaximumSet_Gen.json + // this example is just showing the usage of "Reservations_GetResourceLimits" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageReservationResource created on azure + // for more information of creating PureStorageReservationResource, please refer to the document of PureStorageReservationResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string reservationName = "storagePoolname"; + ResourceIdentifier pureStorageReservationResourceId = PureStorageReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName); + PureStorageReservationResource pureStorageReservation = client.GetPureStorageReservationResource(pureStorageReservationResourceId); + + // invoke the operation + PureStorageResourceLimitDetails result = await pureStorageReservation.GetResourceLimitsAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBillingStatus_ReservationsGetBillingStatusMaximumSet() + { + // Generated from example definition: 2024-11-01-preview/Reservations_GetBillingStatus_MaximumSet_Gen.json + // this example is just showing the usage of "Reservations_GetBillingStatus" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageReservationResource created on azure + // for more information of creating PureStorageReservationResource, please refer to the document of PureStorageReservationResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string reservationName = "reservationname"; + ResourceIdentifier pureStorageReservationResourceId = PureStorageReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName); + PureStorageReservationResource pureStorageReservation = client.GetPureStorageReservationResource(pureStorageReservationResourceId); + + // invoke the operation + ReservationBillingStatus result = await pureStorageReservation.GetBillingStatusAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetBillingReport_ReservationsGetBillingReportMaximumSet() + { + // Generated from example definition: 2024-11-01-preview/Reservations_GetBillingReport_MaximumSet_Gen.json + // this example is just showing the usage of "Reservations_GetBillingReport" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this PureStorageReservationResource created on azure + // for more information of creating PureStorageReservationResource, please refer to the document of PureStorageReservationResource + string subscriptionId = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + string resourceGroupName = "rgpurestorage"; + string reservationName = "reservationname"; + ResourceIdentifier pureStorageReservationResourceId = PureStorageReservationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, reservationName); + PureStorageReservationResource pureStorageReservation = client.GetPureStorageReservationResource(pureStorageReservationResourceId); + + // invoke the operation + ReservationBillingUsageReport result = await pureStorageReservation.GetBillingReportAsync(); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..85a5e9b6bc46 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,50 @@ +// 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.PureStorageBlock.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetPureStoragePools_StoragePoolsListBySubscription() + { + // Generated from example definition: 2024-11-01-preview/StoragePools_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "StoragePool_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 = "BC47D6CC-AA80-4374-86F8-19D94EC70666"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (PureStoragePoolResource item in subscriptionResource.GetPureStoragePoolsAsync()) + { + // 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 + PureStoragePoolData 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj new file mode 100644 index 000000000000..258a48b13588 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Azure.ResourceManager.PureStorageBlock.csproj @@ -0,0 +1,8 @@ + + + Azure Resource Manager client SDK for Azure resource provider PureStorageBlock. + 1.0.0-beta.2 + azure;management;arm;resource manager;purestorageblock + Azure.ResourceManager.PureStorageBlock + + diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs new file mode 100644 index 000000000000..2fa71dc2f376 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ArmPureStorageBlockModelFactory.cs @@ -0,0 +1,535 @@ +// 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.PureStorageBlock.Models +{ + /// Model factory for models. + public static partial class ArmPureStorageBlockModelFactory + { + /// 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 PureStorageReservationData PureStorageReservationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PureStorageReservationProperties properties = null) + { + tags ??= new Dictionary(); + + return new PureStorageReservationData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the reservation. + /// Marketplace details. + /// User details. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static PureStorageReservationProperties PureStorageReservationProperties(string reservationInternalId = null, PureStorageMarketplaceDetails marketplace = null, PureStorageUserDetails user = null, PureStorageProvisioningState? provisioningState = null) + { + return new PureStorageReservationProperties(reservationInternalId, marketplace, user, provisioningState, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Marketplace subscription ID. + /// Marketplace subscription status. + /// Offer details of the marketplace subscription. + /// A new instance for mocking. + public static PureStorageMarketplaceDetails PureStorageMarketplaceDetails(string subscriptionId = null, PureStorageMarketplaceSubscriptionStatus? subscriptionStatus = null, PureStorageOfferDetails offerDetails = null) + { + return new PureStorageMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Limits used for storage pool resources. + /// Limits used for volume resources. + /// internal. + /// internal. + /// A new instance for mocking. + public static PureStorageResourceLimitDetails PureStorageResourceLimitDetails(StoragePoolLimits storagePool = null, PropertyValueRangeLimits volumeProvisionedSize = null, ProtectionPolicyLimits protectionPolicy = null, PerformancePolicyLimits performancePolicy = null) + { + return new PureStorageResourceLimitDetails(storagePool, volumeProvisionedSize != null ? new VolumeLimits(volumeProvisionedSize, serializedAdditionalRawData: null) : null, protectionPolicy, performancePolicy, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Allowed provisioned bandwidth range for a storage pool, in MB/s. + /// Allowed provisioned IOPS range for a storage pool, as a number of operations. + /// List of physical availability zones in the region in which storage pools can be deployed; some Azure regions do not support the necessary resources in all availability zones. + /// A new instance for mocking. + public static StoragePoolLimits StoragePoolLimits(PropertyValueRangeLimits provisionedBandwidthMbPerSec = null, PropertyValueRangeLimits provisionedIops = null, IEnumerable physicalAvailabilityZones = null) + { + physicalAvailabilityZones ??= new List(); + + return new StoragePoolLimits(provisionedBandwidthMbPerSec, provisionedIops, physicalAvailabilityZones?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Minimum value of the property. + /// Maximum value of the property. + /// A new instance for mocking. + public static PropertyValueRangeLimits PropertyValueRangeLimits(long min = default, long max = default) + { + return new PropertyValueRangeLimits(min, max, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// internal. + /// internal. + /// A new instance for mocking. + public static ProtectionPolicyLimits ProtectionPolicyLimits(PropertyValueRangeLimits frequency = null, PropertyValueRangeLimits retention = null) + { + return new ProtectionPolicyLimits(frequency, retention, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// internal. + /// internal. + /// A new instance for mocking. + public static PerformancePolicyLimits PerformancePolicyLimits(PropertyValueRangeLimits iopsLimit = null, PropertyValueRangeLimits bandwidthLimit = null) + { + return new PerformancePolicyLimits(iopsLimit, bandwidthLimit, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Timestamp for the latest update of this billing status, in RFC 3339 format. + /// Total used capacity as reported by associated storage pools. In bytes. + /// How many associated storage pools reported low data reduction ratio (DRR). + /// Weighted average of the data-reduction ratio for all associated pools. + /// The sum of total used capacity for all pools with low DRR, if the DRR penalty applies. In bytes. + /// Extra capacity added because of low DRR storage pools; In bytes. + /// Extra capacity added when rounding up low-usage pools to 30TiB. In bytes. + /// Extra capacity discounted due to plan forgiving some low-DRR usage. In bytes. + /// Total used capacity actually billed. In bytes. + /// Total used capacity included in plan. In bytes. + /// Total used capacity reported at on-demand price. In bytes. + /// The sum of all performance settings across the pools under this reservation. In MB per second. + /// Total performance amount included in plan. In bytes per second. + /// Total performance amount reported at on-demand price. In MB per second. + /// A new instance for mocking. + public static ReservationBillingStatus ReservationBillingStatus(string timestamp = null, long totalUsedCapacityReported = default, int lowDrrPoolCount = default, double drrWeightedAverage = default, long totalNonReducibleReported = default, long extraUsedCapacityNonReducible = default, long extraUsedCapacityLowUsageRounding = default, long extraUsedCapacityNonReduciblePlanDiscount = default, long totalUsedCapacityBilled = default, long totalUsedCapacityIncludedPlan = default, long totalUsedCapacityOverage = default, long totalPerformanceReported = default, long totalPerformanceIncludedPlan = default, long totalPerformanceOverage = default) + { + return new ReservationBillingStatus( + timestamp, + totalUsedCapacityReported, + lowDrrPoolCount, + drrWeightedAverage, + totalNonReducibleReported, + extraUsedCapacityNonReducible, + extraUsedCapacityLowUsageRounding, + extraUsedCapacityNonReduciblePlanDiscount, + totalUsedCapacityBilled, + totalUsedCapacityIncludedPlan, + totalUsedCapacityOverage, + totalPerformanceReported, + totalPerformanceIncludedPlan, + totalPerformanceOverage, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Latest formatted billing report for this reservation. + /// A list of detailed billing usage properties. + /// Overall status message of the billing usage report. + /// A new instance for mocking. + public static ReservationBillingUsageReport ReservationBillingUsageReport(string timestamp = null, IEnumerable billingUsageProperties = null, string overallStatusMessage = null) + { + billingUsageProperties ??= new List(); + + return new ReservationBillingUsageReport(timestamp, billingUsageProperties?.ToList(), overallStatusMessage, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Unique identifier for the billing usage property. + /// Name of the billing usage property. + /// Current value of the billing usage property. + /// Previous value of the billing usage property. + /// Severity level of the usage. + /// Status message for the billing usage against a property. + /// Optional list of sub-properties providing additional details. + /// A new instance for mocking. + public static PureStorageBillingUsageProperty PureStorageBillingUsageProperty(string propertyId = null, string propertyName = null, string currentValue = null, string previousValue = null, PureStorageBillingUsageSeverity severity = default, string statusMessage = null, IEnumerable subProperties = null) + { + subProperties ??= new List(); + + return new PureStorageBillingUsageProperty( + propertyId, + propertyName, + currentValue, + previousValue, + severity, + statusMessage, + subProperties?.ToList(), + 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. + /// The managed service identities assigned to this resource. + /// A new instance for mocking. + public static PureStoragePoolData PureStoragePoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, PureStoragePoolProperties properties = null, ManagedServiceIdentity identity = null) + { + tags ??= new Dictionary(); + + return new PureStoragePoolData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + identity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID of the storage pool. + /// Azure Availability Zone the Pool is located in. + /// Network properties of the storage pool. + /// How long a destroyed object is kept before being eradicated, in seconds. + /// Total bandwidth provisioned for the pool, in MB/s. + /// Total I/O operations per second (IOPS) provisioned for the pool. + /// AVS connection state summary. + /// Provisioning state of the resource. + /// Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to. + /// A new instance for mocking. + public static PureStoragePoolProperties PureStoragePoolProperties(string storagePoolInternalId = null, string availabilityZone = null, PureStoragePoolVnetInjection vnetInjection = null, long? dataRetentionPeriod = null, long provisionedBandwidthMbPerSec = default, long? provisionedIops = null, PureStorageAvs avs = null, PureStorageProvisioningState? provisioningState = null, ResourceIdentifier reservationResourceId = null) + { + return new PureStoragePoolProperties( + storagePoolInternalId, + availabilityZone, + vnetInjection, + dataRetentionPeriod, + provisionedBandwidthMbPerSec, + provisionedIops, + avs, + provisioningState, + reservationResourceId, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// If true, an AVS SDDC is successfully connected to the storage pool. + /// Azure resource ID of the AVS SDDC the storage pool is connected to. + /// A new instance for mocking. + public static PureStorageAvs PureStorageAvs(bool isAvsEnabled = default, ResourceIdentifier clusterResourceId = null) + { + return new PureStorageAvs(isAvsEnabled, clusterResourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Health metrics. + /// List of health alerts. + /// A new instance for mocking. + public static StoragePoolHealthInfo StoragePoolHealthInfo(PureStorageHealthDetails health = null, IEnumerable alerts = null) + { + alerts ??= new List(); + + return new StoragePoolHealthInfo(health, alerts?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// How full the pool is right now, in %, compared to the maximum size it can grow to; estimated based on current usage and data reduction ratio. + /// Bandwidth usage metrics. + /// IOPS usage metrics. + /// Storage space usage. + /// Data reduction ratio achieved on this pool. + /// Estimated maximum capacity of the pool, in bytes, based on current usage and data reduction ratio. + /// A new instance for mocking. + public static PureStorageHealthDetails PureStorageHealthDetails(double usedCapacityPercentage = default, PureStorageBandwidthUsage bandwidthUsage = null, PureStorageIopsUsage iopsUsage = null, PureStorageSpaceUsage space = null, double dataReductionRatio = default, long estimatedMaxCapacity = default) + { + return new PureStorageHealthDetails( + usedCapacityPercentage, + bandwidthUsage, + iopsUsage, + space, + dataReductionRatio, + estimatedMaxCapacity, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Number of bytes written and read per second (maximum value over the last 10 minutes). + /// Bandwidth value currently provisioned for the storage pool, in MB/s. + /// Maximum bandwidth value that can be provisioned for the storage pool. + /// A new instance for mocking. + public static PureStorageBandwidthUsage PureStorageBandwidthUsage(long current = default, long provisioned = default, long max = default) + { + return new PureStorageBandwidthUsage(current, provisioned, max, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Current number of IOPS (maximum value over the last 10 minutes). + /// IOPS value currently provisioned for the storage pool. + /// Maximum IOPS value that can be provisioned for the storage pool. + /// A new instance for mocking. + public static PureStorageIopsUsage PureStorageIopsUsage(long current = default, long provisioned = default, long max = default) + { + return new PureStorageIopsUsage(current, provisioned, max, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Total space occupied by customer data (i.e., being billed for), in bytes. + /// Unique space occupied by customer data, in bytes; for a volume, this is the amount of storage that would be freed by deleting the volume, since snapshot and shared data would be kept. + /// Space occupied by data unique to one or more snapshots, in bytes. + /// Space occupied by duplicated data, meaning data shared with other volumes and snapshots as a result of data deduplication, in bytes. + /// A new instance for mocking. + public static PureStorageSpaceUsage PureStorageSpaceUsage(long totalUsed = default, long unique = default, long snapshots = default, long shared = default) + { + return new PureStorageSpaceUsage(totalUsed, unique, snapshots, shared, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Severity level. + /// A short description of the alert. + /// A new instance for mocking. + public static PureStorageHealthAlert PureStorageHealthAlert(PureStorageHealthAlertLevel level = default, string message = null) + { + return new PureStorageHealthAlert(level, message, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Indicates whether service initialization is complete. + /// Encoded service account credentials alongside connection information. + /// Explicit service account credentials. + /// A new instance for mocking. + public static PureStorageAvsConnection PureStorageAvsConnection(bool isServiceInitializationCompleted = default, string serviceInitializationHandleEnc = null, ServiceInitializationHandle serviceInitializationHandle = null) + { + return new PureStorageAvsConnection(isServiceInitializationCompleted, serviceInitializationHandleEnc, serviceInitializationHandle, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure resource ID of the AVS SDDC the pool is connecting to. + /// Requested service account username. + /// A new instance for mocking. + public static ServiceInitializationHandle ServiceInitializationHandle(ResourceIdentifier clusterResourceId = null, string serviceAccountUsername = null) + { + return new ServiceInitializationHandle(clusterResourceId, serviceAccountUsername, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// If true, an AVS connection has been successfully completed. + /// Human-readable current AVS connection status. + /// Azure resource ID of the AVS SDDC the pool is connected to. + /// A new instance for mocking. + public static PureStorageAvsStatus PureStorageAvsStatus(bool isAvsEnabled = default, string currentConnectionStatus = null, ResourceIdentifier clusterResourceId = null) + { + return new PureStorageAvsStatus(isAvsEnabled, currentConnectionStatus, clusterResourceId, 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 PureStorageAvsStorageContainerData PureStorageAvsStorageContainerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PureStorageAvsStorageContainerProperties properties = null) + { + return new PureStorageAvsStorageContainerData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Storage space usage. + /// Name of the storage container. + /// Maximum amount of bytes that can be provisioned in this storage container; it must be a multiple of 512; each time a volume is provisioned in this container, its provisionedSize will be counted against the provisionLimit and the provisioning will fail if it goes over (minimum: 1048576 (1MiB), maximum: 4503599627370496 (4PiB)); by default it is unrestricted. + /// VMware datastore associated with this storage container (if any). + /// Whether the datastore is mounted in VMware or not. + /// A new instance for mocking. + public static PureStorageAvsStorageContainerProperties PureStorageAvsStorageContainerProperties(PureStorageSpaceUsage space = null, string resourceName = null, long? provisionedLimit = null, string datastore = null, bool? mounted = null) + { + return new PureStorageAvsStorageContainerProperties( + space, + resourceName, + provisionedLimit, + datastore, + mounted, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// If false, the resource is active; if true, the resource has been destroyed; resources can be soft-deleted by setting destroyed to true, and recovered by setting it to false. + /// Date at which the resource will be eradicated and impossible to recover, as an RFC 3339 timestamp; invalid if destroyed is false;. + /// A new instance for mocking. + public static PureStorageSoftDeletionState PureStorageSoftDeletionState(bool isDestroyed = default, DateTimeOffset? eradicatedOn = null) + { + return new PureStorageSoftDeletionState(isDestroyed, eradicatedOn, 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 PureStorageAvsStorageContainerVolumeData PureStorageAvsStorageContainerVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PureStorageVolumeProperties properties = null) + { + return new PureStorageAvsStorageContainerVolumeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the storage pool containing the volume. + /// Azure Resource ID of the storage pool containing this volume. + /// Pure Storage's internal ID for the volume. + /// Human-readable name of the volume. + /// Storage space usage. + /// Volume's soft-deletion state. + /// Volume creation date, as an RFC 3339 timestamp. + /// Currently provisioned size of the volume, in bytes. + /// Specify which control plane handles the lifecycle of the volume. + /// AVS-specific volume information. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static PureStorageVolumeProperties PureStorageVolumeProperties(string storagePoolInternalId = null, ResourceIdentifier storagePoolResourceId = null, string volumeInternalId = null, string displayName = null, PureStorageSpaceUsage space = null, PureStorageSoftDeletionState softDeletion = null, string createdTimestamp = null, long? provisionedSize = null, PureStorageAvsVmVolumeType? volumeType = null, PureStorageAvsDiskDetails avs = null, PureStorageResourceProvisioningState? provisioningState = null) + { + return new PureStorageVolumeProperties( + storagePoolInternalId, + storagePoolResourceId, + volumeInternalId, + displayName, + space, + softDeletion, + createdTimestamp, + provisionedSize, + volumeType, + avs, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// VMware ID of the disk/volume. + /// VMware name of the disk/volume. + /// Name of the top-level folder in the datastore that contains the disk/volume. + /// VMware ID assigned to the disk/volume. + /// Azure resource ID of the AVS VM connected to this disk/volume. + /// Name of the AVS VM connected to this disk/volume. + /// Azure resource ID of the AVS storage container containing this disk/volume. + /// A new instance for mocking. + public static PureStorageAvsDiskDetails PureStorageAvsDiskDetails(string diskId = null, string diskName = null, string folder = null, string avsVmInternalId = null, ResourceIdentifier avsVmResourceId = null, string avsVmName = null, ResourceIdentifier avsStorageContainerResourceId = null) + { + return new PureStorageAvsDiskDetails( + diskId, + diskName, + folder, + avsVmInternalId, + avsVmResourceId, + avsVmName, + avsStorageContainerResourceId, + 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 PureStorageAvsVmData PureStorageAvsVmData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PureStorageAvsVmProperties properties = null) + { + return new PureStorageAvsVmData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the storage pool. + /// Azure resource ID of the storage pool. + /// Human-readable name of the AVS VM. + /// Date at which the AVS VM was created, as an RFC 3339 timestamp. + /// AVS VM's soft-deletion state. + /// Specify which control plane handles the lifecycle of the volume container. + /// AVS VM details. + /// Contains properties related to used Flash space. + /// Provisioning state of the resource. + /// A new instance for mocking. + public static PureStorageAvsVmProperties PureStorageAvsVmProperties(string storagePoolInternalId = null, ResourceIdentifier storagePoolResourceId = null, string displayName = null, DateTimeOffset? createdOn = null, PureStorageSoftDeletionState softDeletion = null, PureStorageAvsVmVolumeContainerType? volumeContainerType = null, PureStorageAvsVmDetails avs = null, PureStorageSpaceUsage space = null, PureStorageResourceProvisioningState? provisioningState = null) + { + return new PureStorageAvsVmProperties( + storagePoolInternalId, + storagePoolResourceId, + displayName, + createdOn, + softDeletion, + volumeContainerType, + avs, + space, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ID of the AVS VM using this set of volumes. + /// Name of the VMware VM using this set of volumes. + /// Type of the VMware VM using this set of volumes. + /// Pure Storage's internal ID for this AVS VM. + /// A new instance for mocking. + public static PureStorageAvsVmDetails PureStorageAvsVmDetails(string vmId = null, string vmName = null, PureStorageAvsVmType vmType = default, string avsVmInternalId = null) + { + return new PureStorageAvsVmDetails(vmId, vmName, vmType, avsVmInternalId, 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 PureStorageAvsVmVolumeData PureStorageAvsVmVolumeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, PureStorageVolumeProperties properties = null) + { + return new PureStorageAvsVmVolumeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs new file mode 100644 index 000000000000..372c20063670 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockArmClient.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockablePureStorageBlockArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePureStorageBlockArmClient() + { + } + + /// 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 MockablePureStorageBlockArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockablePureStorageBlockArmClient(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 PureStorageReservationResource GetPureStorageReservationResource(ResourceIdentifier id) + { + PureStorageReservationResource.ValidateResourceId(id); + return new PureStorageReservationResource(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 PureStoragePoolResource GetPureStoragePoolResource(ResourceIdentifier id) + { + PureStoragePoolResource.ValidateResourceId(id); + return new PureStoragePoolResource(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 PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(ResourceIdentifier id) + { + PureStorageAvsStorageContainerResource.ValidateResourceId(id); + return new PureStorageAvsStorageContainerResource(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 PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(ResourceIdentifier id) + { + PureStorageAvsStorageContainerVolumeResource.ValidateResourceId(id); + return new PureStorageAvsStorageContainerVolumeResource(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 PureStorageAvsVmResource GetPureStorageAvsVmResource(ResourceIdentifier id) + { + PureStorageAvsVmResource.ValidateResourceId(id); + return new PureStorageAvsVmResource(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 PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(ResourceIdentifier id) + { + PureStorageAvsVmVolumeResource.ValidateResourceId(id); + return new PureStorageAvsVmVolumeResource(Client, id); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs new file mode 100644 index 000000000000..daca9a5f277b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockResourceGroupResource.cs @@ -0,0 +1,174 @@ +// 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.PureStorageBlock.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockablePureStorageBlockResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockablePureStorageBlockResourceGroupResource() + { + } + + /// 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 MockablePureStorageBlockResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of PureStorageReservationResources in the ResourceGroupResource. + /// An object representing collection of PureStorageReservationResources and their operations over a PureStorageReservationResource. + public virtual PureStorageReservationCollection GetPureStorageReservations() + { + return GetCachedClient(client => new PureStorageReservationCollection(client, Id)); + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStorageReservationAsync(string reservationName, CancellationToken cancellationToken = default) + { + return await GetPureStorageReservations().GetAsync(reservationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStorageReservation(string reservationName, CancellationToken cancellationToken = default) + { + return GetPureStorageReservations().Get(reservationName, cancellationToken); + } + + /// Gets a collection of PureStoragePoolResources in the ResourceGroupResource. + /// An object representing collection of PureStoragePoolResources and their operations over a PureStoragePoolResource. + public virtual PureStoragePoolCollection GetPureStoragePools() + { + return GetCachedClient(client => new PureStoragePoolCollection(client, Id)); + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStoragePoolAsync(string storagePoolName, CancellationToken cancellationToken = default) + { + return await GetPureStoragePools().GetAsync(storagePoolName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStoragePool(string storagePoolName, CancellationToken cancellationToken = default) + { + return GetPureStoragePools().Get(storagePoolName, cancellationToken); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs new file mode 100644 index 000000000000..4a2a8a3c1e73 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/MockablePureStorageBlockSubscriptionResource.cs @@ -0,0 +1,166 @@ +// 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.PureStorageBlock.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockablePureStorageBlockSubscriptionResource : ArmResource + { + private ClientDiagnostics _pureStorageReservationReservationsClientDiagnostics; + private ReservationsRestOperations _pureStorageReservationReservationsRestClient; + private ClientDiagnostics _pureStoragePoolStoragePoolsClientDiagnostics; + private StoragePoolsRestOperations _pureStoragePoolStoragePoolsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockablePureStorageBlockSubscriptionResource() + { + } + + /// 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 MockablePureStorageBlockSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics PureStorageReservationReservationsClientDiagnostics => _pureStorageReservationReservationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageReservationResource.ResourceType.Namespace, Diagnostics); + private ReservationsRestOperations PureStorageReservationReservationsRestClient => _pureStorageReservationReservationsRestClient ??= new ReservationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PureStorageReservationResource.ResourceType)); + private ClientDiagnostics PureStoragePoolStoragePoolsClientDiagnostics => _pureStoragePoolStoragePoolsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStoragePoolResource.ResourceType.Namespace, Diagnostics); + private StoragePoolsRestOperations PureStoragePoolStoragePoolsRestClient => _pureStoragePoolStoragePoolsRestClient ??= new StoragePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(PureStoragePoolResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// List reservations by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetPureStorageReservationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => PureStorageReservationReservationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PureStorageReservationReservationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageReservationResource(Client, PureStorageReservationData.DeserializePureStorageReservationData(e)), PureStorageReservationReservationsClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetPureStorageReservations", "value", "nextLink", cancellationToken); + } + + /// + /// List reservations by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetPureStorageReservations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => PureStorageReservationReservationsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PureStorageReservationReservationsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageReservationResource(Client, PureStorageReservationData.DeserializePureStorageReservationData(e)), PureStorageReservationReservationsClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetPureStorageReservations", "value", "nextLink", cancellationToken); + } + + /// + /// List storage pools by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetPureStoragePoolsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => PureStoragePoolStoragePoolsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PureStoragePoolStoragePoolsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStoragePoolResource(Client, PureStoragePoolData.DeserializePureStoragePoolData(e)), PureStoragePoolStoragePoolsClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetPureStoragePools", "value", "nextLink", cancellationToken); + } + + /// + /// List storage pools by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetPureStoragePools(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => PureStoragePoolStoragePoolsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => PureStoragePoolStoragePoolsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStoragePoolResource(Client, PureStoragePoolData.DeserializePureStoragePoolData(e)), PureStoragePoolStoragePoolsClientDiagnostics, Pipeline, "MockablePureStorageBlockSubscriptionResource.GetPureStoragePools", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs new file mode 100644 index 000000000000..efceeab68632 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Extensions/PureStorageBlockExtensions.cs @@ -0,0 +1,479 @@ +// 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.PureStorageBlock.Mocking; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// A class to add extension methods to Azure.ResourceManager.PureStorageBlock. + public static partial class PureStorageBlockExtensions + { + private static MockablePureStorageBlockArmClient GetMockablePureStorageBlockArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockablePureStorageBlockArmClient(client0)); + } + + private static MockablePureStorageBlockResourceGroupResource GetMockablePureStorageBlockResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePureStorageBlockResourceGroupResource(client, resource.Id)); + } + + private static MockablePureStorageBlockSubscriptionResource GetMockablePureStorageBlockSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockablePureStorageBlockSubscriptionResource(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 PureStorageReservationResource GetPureStorageReservationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStorageReservationResource(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 PureStoragePoolResource GetPureStoragePoolResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStoragePoolResource(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 PureStorageAvsStorageContainerResource GetPureStorageAvsStorageContainerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStorageAvsStorageContainerResource(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 PureStorageAvsStorageContainerVolumeResource GetPureStorageAvsStorageContainerVolumeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStorageAvsStorageContainerVolumeResource(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 PureStorageAvsVmResource GetPureStorageAvsVmResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStorageAvsVmResource(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 PureStorageAvsVmVolumeResource GetPureStorageAvsVmVolumeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockablePureStorageBlockArmClient(client).GetPureStorageAvsVmVolumeResource(id); + } + + /// + /// Gets a collection of PureStorageReservationResources 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 PureStorageReservationResources and their operations over a PureStorageReservationResource. + public static PureStorageReservationCollection GetPureStorageReservations(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStorageReservations(); + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the reservation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetPureStorageReservationAsync(this ResourceGroupResource resourceGroupResource, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStorageReservationAsync(reservationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the reservation. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetPureStorageReservation(this ResourceGroupResource resourceGroupResource, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStorageReservation(reservationName, cancellationToken); + } + + /// + /// Gets a collection of PureStoragePoolResources 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 PureStoragePoolResources and their operations over a PureStoragePoolResource. + public static PureStoragePoolCollection GetPureStoragePools(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStoragePools(); + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the storage pool. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetPureStoragePoolAsync(this ResourceGroupResource resourceGroupResource, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStoragePoolAsync(storagePoolName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the storage pool. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetPureStoragePool(this ResourceGroupResource resourceGroupResource, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockablePureStorageBlockResourceGroupResource(resourceGroupResource).GetPureStoragePool(storagePoolName, cancellationToken); + } + + /// + /// List reservations by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-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 GetPureStorageReservationsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetPureStorageReservationsAsync(cancellationToken); + } + + /// + /// List reservations by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-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 GetPureStorageReservations(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetPureStorageReservations(cancellationToken); + } + + /// + /// List storage pools by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-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 GetPureStoragePoolsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetPureStoragePoolsAsync(cancellationToken); + } + + /// + /// List storage pools by Azure subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-11-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 GetPureStoragePools(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockablePureStorageBlockSubscriptionResource(subscriptionResource).GetPureStoragePools(cancellationToken); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Argument.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..c8664855aa7e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..892c4f25ead6 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingList.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..531b34d1a503 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..7de4584b6bbd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,407 @@ +// Copyright (c) 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.PureStorageBlock +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Optional.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..c4c31c9387d4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..cf57027efd64 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsStorageContainerVolumeOperationSource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsStorageContainerVolumeOperationSource.cs new file mode 100644 index 000000000000..70fb98ed3014 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsStorageContainerVolumeOperationSource.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.PureStorageBlock +{ + internal class PureStorageAvsStorageContainerVolumeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PureStorageAvsStorageContainerVolumeOperationSource(ArmClient client) + { + _client = client; + } + + PureStorageAvsStorageContainerVolumeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return new PureStorageAvsStorageContainerVolumeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return await Task.FromResult(new PureStorageAvsStorageContainerVolumeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmOperationSource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmOperationSource.cs new file mode 100644 index 000000000000..9acb497e61ed --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmOperationSource.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.PureStorageBlock +{ + internal class PureStorageAvsVmOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PureStorageAvsVmOperationSource(ArmClient client) + { + _client = client; + } + + PureStorageAvsVmResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return new PureStorageAvsVmResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return await Task.FromResult(new PureStorageAvsVmResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmVolumeOperationSource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmVolumeOperationSource.cs new file mode 100644 index 000000000000..1ecd998a4db3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageAvsVmVolumeOperationSource.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.PureStorageBlock +{ + internal class PureStorageAvsVmVolumeOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PureStorageAvsVmVolumeOperationSource(ArmClient client) + { + _client = client; + } + + PureStorageAvsVmVolumeResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return new PureStorageAvsVmVolumeResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return await Task.FromResult(new PureStorageAvsVmVolumeResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperation.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperation.cs new file mode 100644 index 000000000000..700031e29f83 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PureStorageBlock +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PureStorageBlockArmOperation : 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 PureStorageBlockArmOperation for mocking. + protected PureStorageBlockArmOperation() + { + } + + internal PureStorageBlockArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PureStorageBlockArmOperation(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, "PureStorageBlockArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperationOfT.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperationOfT.cs new file mode 100644 index 000000000000..f83ed894f669 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageBlockArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.PureStorageBlock +{ +#pragma warning disable SA1649 // File name should match first type name + internal class PureStorageBlockArmOperation : 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 PureStorageBlockArmOperation for mocking. + protected PureStorageBlockArmOperation() + { + } + + internal PureStorageBlockArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal PureStorageBlockArmOperation(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, "PureStorageBlockArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStoragePoolOperationSource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStoragePoolOperationSource.cs new file mode 100644 index 000000000000..175cf0f62068 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStoragePoolOperationSource.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.PureStorageBlock +{ + internal class PureStoragePoolOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PureStoragePoolOperationSource(ArmClient client) + { + _client = client; + } + + PureStoragePoolResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return new PureStoragePoolResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return await Task.FromResult(new PureStoragePoolResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageReservationOperationSource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageReservationOperationSource.cs new file mode 100644 index 000000000000..f3f90463e50e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/LongRunningOperation/PureStorageReservationOperationSource.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.PureStorageBlock +{ + internal class PureStorageReservationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal PureStorageReservationOperationSource(ArmClient client) + { + _client = client; + } + + PureStorageReservationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return new PureStorageReservationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerPureStorageBlockContext.Default); + return await Task.FromResult(new PureStorageReservationResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.Serialization.cs new file mode 100644 index 000000000000..25f2d80791b0 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.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.PureStorageBlock.Models +{ + internal partial class AvsStorageContainerListResult : 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(AvsStorageContainerListResult)} 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 + } + } + } + + AvsStorageContainerListResult 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(AvsStorageContainerListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsStorageContainerListResult(document.RootElement, options); + } + + internal static AvsStorageContainerListResult DeserializeAvsStorageContainerListResult(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(PureStorageAvsStorageContainerData.DeserializePureStorageAvsStorageContainerData(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 AvsStorageContainerListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsStorageContainerListResult)} does not support writing '{options.Format}' format."); + } + } + + AvsStorageContainerListResult 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 DeserializeAvsStorageContainerListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsStorageContainerListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.cs new file mode 100644 index 000000000000..b0b3403a7d62 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerListResult.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.PureStorageBlock.Models +{ + /// The response of a AvsStorageContainer list operation. + internal partial class AvsStorageContainerListResult + { + /// + /// 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 AvsStorageContainer items on this page. + /// is null. + internal AvsStorageContainerListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AvsStorageContainer items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AvsStorageContainerListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AvsStorageContainerListResult() + { + } + + /// The AvsStorageContainer items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.Serialization.cs new file mode 100644 index 000000000000..26ecf8d97d60 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.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.PureStorageBlock.Models +{ + internal partial class AvsStorageContainerVolumeListResult : 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(AvsStorageContainerVolumeListResult)} 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 + } + } + } + + AvsStorageContainerVolumeListResult 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(AvsStorageContainerVolumeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsStorageContainerVolumeListResult(document.RootElement, options); + } + + internal static AvsStorageContainerVolumeListResult DeserializeAvsStorageContainerVolumeListResult(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(PureStorageAvsStorageContainerVolumeData.DeserializePureStorageAvsStorageContainerVolumeData(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 AvsStorageContainerVolumeListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsStorageContainerVolumeListResult)} does not support writing '{options.Format}' format."); + } + } + + AvsStorageContainerVolumeListResult 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 DeserializeAvsStorageContainerVolumeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsStorageContainerVolumeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.cs new file mode 100644 index 000000000000..48041e4a8016 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeListResult.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.PureStorageBlock.Models +{ + /// The response of a AvsStorageContainerVolume list operation. + internal partial class AvsStorageContainerVolumeListResult + { + /// + /// 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 AvsStorageContainerVolume items on this page. + /// is null. + internal AvsStorageContainerVolumeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AvsStorageContainerVolume items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AvsStorageContainerVolumeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AvsStorageContainerVolumeListResult() + { + } + + /// The AvsStorageContainerVolume items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..78ca9dfdcd8b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.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.PureStorageBlock.Models +{ + internal partial class AvsStorageContainerVolumeUpdateProperties : 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(AvsStorageContainerVolumeUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftDeletion)) + { + writer.WritePropertyName("softDeletion"u8); + writer.WriteObjectValue(SoftDeletion, 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 + } + } + } + + AvsStorageContainerVolumeUpdateProperties 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(AvsStorageContainerVolumeUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsStorageContainerVolumeUpdateProperties(document.RootElement, options); + } + + internal static AvsStorageContainerVolumeUpdateProperties DeserializeAvsStorageContainerVolumeUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageSoftDeletionState softDeletion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softDeletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeletion = PureStorageSoftDeletionState.DeserializePureStorageSoftDeletionState(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvsStorageContainerVolumeUpdateProperties(softDeletion, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsStorageContainerVolumeUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AvsStorageContainerVolumeUpdateProperties 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 DeserializeAvsStorageContainerVolumeUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsStorageContainerVolumeUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.cs new file mode 100644 index 000000000000..e44908ec4dd5 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsStorageContainerVolumeUpdateProperties.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.PureStorageBlock.Models +{ + /// The updatable properties of the AvsStorageContainerVolume. + internal partial class AvsStorageContainerVolumeUpdateProperties + { + /// + /// 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 AvsStorageContainerVolumeUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Volume's soft-deletion state. + /// Keeps track of any properties unknown to the library. + internal AvsStorageContainerVolumeUpdateProperties(PureStorageSoftDeletionState softDeletion, IDictionary serializedAdditionalRawData) + { + SoftDeletion = softDeletion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Volume's soft-deletion state. + public PureStorageSoftDeletionState SoftDeletion { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.Serialization.cs new file mode 100644 index 000000000000..55519cc3cdce --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.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.PureStorageBlock.Models +{ + internal partial class AvsVmListResult : 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(AvsVmListResult)} 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 + } + } + } + + AvsVmListResult 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(AvsVmListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsVmListResult(document.RootElement, options); + } + + internal static AvsVmListResult DeserializeAvsVmListResult(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(PureStorageAvsVmData.DeserializePureStorageAvsVmData(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 AvsVmListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsVmListResult)} does not support writing '{options.Format}' format."); + } + } + + AvsVmListResult 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 DeserializeAvsVmListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsVmListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.cs new file mode 100644 index 000000000000..e01365b0580c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmListResult.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.PureStorageBlock.Models +{ + /// The response of a AvsVm list operation. + internal partial class AvsVmListResult + { + /// + /// 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 AvsVm items on this page. + /// is null. + internal AvsVmListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AvsVm items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AvsVmListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AvsVmListResult() + { + } + + /// The AvsVm items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..099f7a633bc3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.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.PureStorageBlock.Models +{ + internal partial class AvsVmUpdateProperties : 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(AvsVmUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftDeletion)) + { + writer.WritePropertyName("softDeletion"u8); + writer.WriteObjectValue(SoftDeletion, 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 + } + } + } + + AvsVmUpdateProperties 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(AvsVmUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsVmUpdateProperties(document.RootElement, options); + } + + internal static AvsVmUpdateProperties DeserializeAvsVmUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageSoftDeletionState softDeletion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softDeletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeletion = PureStorageSoftDeletionState.DeserializePureStorageSoftDeletionState(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvsVmUpdateProperties(softDeletion, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsVmUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AvsVmUpdateProperties 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 DeserializeAvsVmUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsVmUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.cs new file mode 100644 index 000000000000..b4f68ddd88da --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmUpdateProperties.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.PureStorageBlock.Models +{ + /// The updatable properties of the AvsVm. + internal partial class AvsVmUpdateProperties + { + /// + /// 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 AvsVmUpdateProperties() + { + } + + /// Initializes a new instance of . + /// AVS VM's soft-deletion state. + /// Keeps track of any properties unknown to the library. + internal AvsVmUpdateProperties(PureStorageSoftDeletionState softDeletion, IDictionary serializedAdditionalRawData) + { + SoftDeletion = softDeletion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// AVS VM's soft-deletion state. + public PureStorageSoftDeletionState SoftDeletion { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.Serialization.cs new file mode 100644 index 000000000000..9992803347d0 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.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.PureStorageBlock.Models +{ + internal partial class AvsVmVolumeListResult : 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(AvsVmVolumeListResult)} 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 + } + } + } + + AvsVmVolumeListResult 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(AvsVmVolumeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsVmVolumeListResult(document.RootElement, options); + } + + internal static AvsVmVolumeListResult DeserializeAvsVmVolumeListResult(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(PureStorageAvsVmVolumeData.DeserializePureStorageAvsVmVolumeData(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 AvsVmVolumeListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsVmVolumeListResult)} does not support writing '{options.Format}' format."); + } + } + + AvsVmVolumeListResult 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 DeserializeAvsVmVolumeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsVmVolumeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.cs new file mode 100644 index 000000000000..8740e2599721 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeListResult.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.PureStorageBlock.Models +{ + /// The response of a AvsVmVolume list operation. + internal partial class AvsVmVolumeListResult + { + /// + /// 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 AvsVmVolume items on this page. + /// is null. + internal AvsVmVolumeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AvsVmVolume items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AvsVmVolumeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AvsVmVolumeListResult() + { + } + + /// The AvsVmVolume items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..4b8cd4408cab --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.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.PureStorageBlock.Models +{ + internal partial class AvsVmVolumeUpdateProperties : 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(AvsVmVolumeUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SoftDeletion)) + { + writer.WritePropertyName("softDeletion"u8); + writer.WriteObjectValue(SoftDeletion, 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 + } + } + } + + AvsVmVolumeUpdateProperties 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(AvsVmVolumeUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvsVmVolumeUpdateProperties(document.RootElement, options); + } + + internal static AvsVmVolumeUpdateProperties DeserializeAvsVmVolumeUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageSoftDeletionState softDeletion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("softDeletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeletion = PureStorageSoftDeletionState.DeserializePureStorageSoftDeletionState(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvsVmVolumeUpdateProperties(softDeletion, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(AvsVmVolumeUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AvsVmVolumeUpdateProperties 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 DeserializeAvsVmVolumeUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvsVmVolumeUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.cs new file mode 100644 index 000000000000..e937db7fcc9e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AvsVmVolumeUpdateProperties.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.PureStorageBlock.Models +{ + /// The updatable properties of the AvsVmVolume. + internal partial class AvsVmVolumeUpdateProperties + { + /// + /// 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 AvsVmVolumeUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Volume's soft-deletion state. + /// Keeps track of any properties unknown to the library. + internal AvsVmVolumeUpdateProperties(PureStorageSoftDeletionState softDeletion, IDictionary serializedAdditionalRawData) + { + SoftDeletion = softDeletion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Volume's soft-deletion state. + public PureStorageSoftDeletionState SoftDeletion { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AzureResourceManagerPureStorageBlockContext.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AzureResourceManagerPureStorageBlockContext.cs new file mode 100644 index 000000000000..622e50087d1c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/AzureResourceManagerPureStorageBlockContext.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// 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' + /// + public partial class AzureResourceManagerPureStorageBlockContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.Serialization.cs new file mode 100644 index 000000000000..b264343b623b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.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.PureStorageBlock.Models +{ + public partial class PerformancePolicyLimits : 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(PerformancePolicyLimits)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("iopsLimit"u8); + writer.WriteObjectValue(IopsLimit, options); + writer.WritePropertyName("bandwidthLimit"u8); + writer.WriteObjectValue(BandwidthLimit, 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 + } + } + } + + PerformancePolicyLimits 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(PerformancePolicyLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePerformancePolicyLimits(document.RootElement, options); + } + + internal static PerformancePolicyLimits DeserializePerformancePolicyLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PropertyValueRangeLimits iopsLimit = default; + PropertyValueRangeLimits bandwidthLimit = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("iopsLimit"u8)) + { + iopsLimit = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (property.NameEquals("bandwidthLimit"u8)) + { + bandwidthLimit = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PerformancePolicyLimits(iopsLimit, bandwidthLimit, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PerformancePolicyLimits)} does not support writing '{options.Format}' format."); + } + } + + PerformancePolicyLimits 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 DeserializePerformancePolicyLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PerformancePolicyLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.cs new file mode 100644 index 000000000000..66805e2b1ea3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PerformancePolicyLimits.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.PureStorageBlock.Models +{ + /// internal. + public partial class PerformancePolicyLimits + { + /// + /// 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. + /// internal. + /// or is null. + internal PerformancePolicyLimits(PropertyValueRangeLimits iopsLimit, PropertyValueRangeLimits bandwidthLimit) + { + Argument.AssertNotNull(iopsLimit, nameof(iopsLimit)); + Argument.AssertNotNull(bandwidthLimit, nameof(bandwidthLimit)); + + IopsLimit = iopsLimit; + BandwidthLimit = bandwidthLimit; + } + + /// Initializes a new instance of . + /// internal. + /// internal. + /// Keeps track of any properties unknown to the library. + internal PerformancePolicyLimits(PropertyValueRangeLimits iopsLimit, PropertyValueRangeLimits bandwidthLimit, IDictionary serializedAdditionalRawData) + { + IopsLimit = iopsLimit; + BandwidthLimit = bandwidthLimit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PerformancePolicyLimits() + { + } + + /// internal. + public PropertyValueRangeLimits IopsLimit { get; } + /// internal. + public PropertyValueRangeLimits BandwidthLimit { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.Serialization.cs new file mode 100644 index 000000000000..e6056552a9e1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.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.PureStorageBlock.Models +{ + public partial class PropertyValueRangeLimits : 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(PropertyValueRangeLimits)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("min"u8); + writer.WriteNumberValue(Min); + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max); + 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 + } + } + } + + PropertyValueRangeLimits 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(PropertyValueRangeLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePropertyValueRangeLimits(document.RootElement, options); + } + + internal static PropertyValueRangeLimits DeserializePropertyValueRangeLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long min = default; + long max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("min"u8)) + { + min = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("max"u8)) + { + max = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PropertyValueRangeLimits(min, max, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PropertyValueRangeLimits)} does not support writing '{options.Format}' format."); + } + } + + PropertyValueRangeLimits 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 DeserializePropertyValueRangeLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PropertyValueRangeLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.cs new file mode 100644 index 000000000000..3509a18b8f7b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PropertyValueRangeLimits.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.PureStorageBlock.Models +{ + /// Minimum and maximum values for a property. + public partial class PropertyValueRangeLimits + { + /// + /// 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 . + /// Minimum value of the property. + /// Maximum value of the property. + internal PropertyValueRangeLimits(long min, long max) + { + Min = min; + Max = max; + } + + /// Initializes a new instance of . + /// Minimum value of the property. + /// Maximum value of the property. + /// Keeps track of any properties unknown to the library. + internal PropertyValueRangeLimits(long min, long max, IDictionary serializedAdditionalRawData) + { + Min = min; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PropertyValueRangeLimits() + { + } + + /// Minimum value of the property. + public long Min { get; } + /// Maximum value of the property. + public long Max { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.Serialization.cs new file mode 100644 index 000000000000..00050d9875c8 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.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.PureStorageBlock.Models +{ + public partial class ProtectionPolicyLimits : 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(ProtectionPolicyLimits)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("frequency"u8); + writer.WriteObjectValue(Frequency, options); + writer.WritePropertyName("retention"u8); + writer.WriteObjectValue(Retention, 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 + } + } + } + + ProtectionPolicyLimits 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(ProtectionPolicyLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProtectionPolicyLimits(document.RootElement, options); + } + + internal static ProtectionPolicyLimits DeserializeProtectionPolicyLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PropertyValueRangeLimits frequency = default; + PropertyValueRangeLimits retention = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("frequency"u8)) + { + frequency = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (property.NameEquals("retention"u8)) + { + retention = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProtectionPolicyLimits(frequency, retention, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ProtectionPolicyLimits)} does not support writing '{options.Format}' format."); + } + } + + ProtectionPolicyLimits 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 DeserializeProtectionPolicyLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProtectionPolicyLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.cs new file mode 100644 index 000000000000..ddf28280636d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ProtectionPolicyLimits.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.PureStorageBlock.Models +{ + /// internal. + public partial class ProtectionPolicyLimits + { + /// + /// 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. + /// internal. + /// or is null. + internal ProtectionPolicyLimits(PropertyValueRangeLimits frequency, PropertyValueRangeLimits retention) + { + Argument.AssertNotNull(frequency, nameof(frequency)); + Argument.AssertNotNull(retention, nameof(retention)); + + Frequency = frequency; + Retention = retention; + } + + /// Initializes a new instance of . + /// internal. + /// internal. + /// Keeps track of any properties unknown to the library. + internal ProtectionPolicyLimits(PropertyValueRangeLimits frequency, PropertyValueRangeLimits retention, IDictionary serializedAdditionalRawData) + { + Frequency = frequency; + Retention = retention; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ProtectionPolicyLimits() + { + } + + /// internal. + public PropertyValueRangeLimits Frequency { get; } + /// internal. + public PropertyValueRangeLimits Retention { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.Serialization.cs new file mode 100644 index 000000000000..71b2b3781584 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.Serialization.cs @@ -0,0 +1,176 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageAddressDetails : 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(PureStorageAddressDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("addressLine1"u8); + writer.WriteStringValue(AddressLine1); + if (Optional.IsDefined(AddressLine2)) + { + writer.WritePropertyName("addressLine2"u8); + writer.WriteStringValue(AddressLine2); + } + writer.WritePropertyName("city"u8); + writer.WriteStringValue(City); + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State); + writer.WritePropertyName("country"u8); + writer.WriteStringValue(Country); + writer.WritePropertyName("postalCode"u8); + writer.WriteStringValue(PostalCode); + 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 + } + } + } + + PureStorageAddressDetails 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(PureStorageAddressDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAddressDetails(document.RootElement, options); + } + + internal static PureStorageAddressDetails DeserializePureStorageAddressDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string addressLine1 = default; + string addressLine2 = default; + string city = default; + string state = default; + string country = default; + string postalCode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("addressLine1"u8)) + { + addressLine1 = property.Value.GetString(); + continue; + } + if (property.NameEquals("addressLine2"u8)) + { + addressLine2 = property.Value.GetString(); + continue; + } + if (property.NameEquals("city"u8)) + { + city = property.Value.GetString(); + continue; + } + if (property.NameEquals("state"u8)) + { + state = property.Value.GetString(); + continue; + } + if (property.NameEquals("country"u8)) + { + country = property.Value.GetString(); + continue; + } + if (property.NameEquals("postalCode"u8)) + { + postalCode = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAddressDetails( + addressLine1, + addressLine2, + city, + state, + country, + postalCode, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAddressDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAddressDetails 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 DeserializePureStorageAddressDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAddressDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.cs new file mode 100644 index 000000000000..31ba8e2b3003 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAddressDetails.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Address details. + public partial class PureStorageAddressDetails + { + /// + /// 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 . + /// Address line 1. + /// Name of the city. + /// State (if any). + /// Name of the country. + /// Postal code. + /// , , , or is null. + public PureStorageAddressDetails(string addressLine1, string city, string state, string country, string postalCode) + { + Argument.AssertNotNull(addressLine1, nameof(addressLine1)); + Argument.AssertNotNull(city, nameof(city)); + Argument.AssertNotNull(state, nameof(state)); + Argument.AssertNotNull(country, nameof(country)); + Argument.AssertNotNull(postalCode, nameof(postalCode)); + + AddressLine1 = addressLine1; + City = city; + State = state; + Country = country; + PostalCode = postalCode; + } + + /// Initializes a new instance of . + /// Address line 1. + /// Address line 2. + /// Name of the city. + /// State (if any). + /// Name of the country. + /// Postal code. + /// Keeps track of any properties unknown to the library. + internal PureStorageAddressDetails(string addressLine1, string addressLine2, string city, string state, string country, string postalCode, IDictionary serializedAdditionalRawData) + { + AddressLine1 = addressLine1; + AddressLine2 = addressLine2; + City = city; + State = state; + Country = country; + PostalCode = postalCode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAddressDetails() + { + } + + /// Address line 1. + public string AddressLine1 { get; set; } + /// Address line 2. + public string AddressLine2 { get; set; } + /// Name of the city. + public string City { get; set; } + /// State (if any). + public string State { get; set; } + /// Name of the country. + public string Country { get; set; } + /// Postal code. + public string PostalCode { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.Serialization.cs new file mode 100644 index 000000000000..66266b58fba6 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.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.PureStorageBlock.Models +{ + public partial class PureStorageAvs : 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(PureStorageAvs)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("avsEnabled"u8); + writer.WriteBooleanValue(IsAvsEnabled); + if (Optional.IsDefined(ClusterResourceId)) + { + writer.WritePropertyName("sddcResourceId"u8); + writer.WriteStringValue(ClusterResourceId); + } + 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 + } + } + } + + PureStorageAvs 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(PureStorageAvs)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvs(document.RootElement, options); + } + + internal static PureStorageAvs DeserializePureStorageAvs(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool avsEnabled = default; + ResourceIdentifier sddcResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("avsEnabled"u8)) + { + avsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("sddcResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sddcResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvs(avsEnabled, sddcResourceId, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvs)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvs 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 DeserializePureStorageAvs(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvs)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.cs new file mode 100644 index 000000000000..c4bc671c819a --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvs.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Connected AVS status. + public partial class PureStorageAvs + { + /// + /// 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 . + /// If true, an AVS SDDC is successfully connected to the storage pool. + internal PureStorageAvs(bool isAvsEnabled) + { + IsAvsEnabled = isAvsEnabled; + } + + /// Initializes a new instance of . + /// If true, an AVS SDDC is successfully connected to the storage pool. + /// Azure resource ID of the AVS SDDC the storage pool is connected to. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvs(bool isAvsEnabled, ResourceIdentifier clusterResourceId, IDictionary serializedAdditionalRawData) + { + IsAvsEnabled = isAvsEnabled; + ClusterResourceId = clusterResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvs() + { + } + + /// If true, an AVS SDDC is successfully connected to the storage pool. + public bool IsAvsEnabled { get; } + /// Azure resource ID of the AVS SDDC the storage pool is connected to. + public ResourceIdentifier ClusterResourceId { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.Serialization.cs new file mode 100644 index 000000000000..99f2a870fb47 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.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.PureStorageBlock.Models +{ + public partial class PureStorageAvsConnection : 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(PureStorageAvsConnection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("serviceInitializationCompleted"u8); + writer.WriteBooleanValue(IsServiceInitializationCompleted); + if (Optional.IsDefined(ServiceInitializationHandleEnc)) + { + writer.WritePropertyName("serviceInitializationHandleEnc"u8); + writer.WriteStringValue(ServiceInitializationHandleEnc); + } + if (Optional.IsDefined(ServiceInitializationHandle)) + { + writer.WritePropertyName("serviceInitializationHandle"u8); + writer.WriteObjectValue(ServiceInitializationHandle, 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 + } + } + } + + PureStorageAvsConnection 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(PureStorageAvsConnection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsConnection(document.RootElement, options); + } + + internal static PureStorageAvsConnection DeserializePureStorageAvsConnection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool serviceInitializationCompleted = default; + string serviceInitializationHandleEnc = default; + ServiceInitializationHandle serviceInitializationHandle = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceInitializationCompleted"u8)) + { + serviceInitializationCompleted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("serviceInitializationHandleEnc"u8)) + { + serviceInitializationHandleEnc = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceInitializationHandle"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceInitializationHandle = ServiceInitializationHandle.DeserializeServiceInitializationHandle(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsConnection(serviceInitializationCompleted, serviceInitializationHandleEnc, serviceInitializationHandle, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsConnection)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsConnection 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 DeserializePureStorageAvsConnection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsConnection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.cs new file mode 100644 index 000000000000..4d497b1b2a63 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsConnection.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Transient information about an on-going connection to an AVS instance. + public partial class PureStorageAvsConnection + { + /// + /// 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 . + /// Indicates whether service initialization is complete. + internal PureStorageAvsConnection(bool isServiceInitializationCompleted) + { + IsServiceInitializationCompleted = isServiceInitializationCompleted; + } + + /// Initializes a new instance of . + /// Indicates whether service initialization is complete. + /// Encoded service account credentials alongside connection information. + /// Explicit service account credentials. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsConnection(bool isServiceInitializationCompleted, string serviceInitializationHandleEnc, ServiceInitializationHandle serviceInitializationHandle, IDictionary serializedAdditionalRawData) + { + IsServiceInitializationCompleted = isServiceInitializationCompleted; + ServiceInitializationHandleEnc = serviceInitializationHandleEnc; + ServiceInitializationHandle = serviceInitializationHandle; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvsConnection() + { + } + + /// Indicates whether service initialization is complete. + public bool IsServiceInitializationCompleted { get; } + /// Encoded service account credentials alongside connection information. + public string ServiceInitializationHandleEnc { get; } + /// Explicit service account credentials. + public ServiceInitializationHandle ServiceInitializationHandle { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.Serialization.cs new file mode 100644 index 000000000000..5177b130c078 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageAvsDiskDetails : 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(PureStorageAvsDiskDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("diskId"u8); + writer.WriteStringValue(DiskId); + writer.WritePropertyName("diskName"u8); + writer.WriteStringValue(DiskName); + writer.WritePropertyName("folder"u8); + writer.WriteStringValue(Folder); + writer.WritePropertyName("avsVmInternalId"u8); + writer.WriteStringValue(AvsVmInternalId); + writer.WritePropertyName("avsVmResourceId"u8); + writer.WriteStringValue(AvsVmResourceId); + writer.WritePropertyName("avsVmName"u8); + writer.WriteStringValue(AvsVmName); + writer.WritePropertyName("avsStorageContainerResourceId"u8); + writer.WriteStringValue(AvsStorageContainerResourceId); + 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 + } + } + } + + PureStorageAvsDiskDetails 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(PureStorageAvsDiskDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsDiskDetails(document.RootElement, options); + } + + internal static PureStorageAvsDiskDetails DeserializePureStorageAvsDiskDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string diskId = default; + string diskName = default; + string folder = default; + string avsVmInternalId = default; + ResourceIdentifier avsVmResourceId = default; + string avsVmName = default; + ResourceIdentifier avsStorageContainerResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("diskId"u8)) + { + diskId = property.Value.GetString(); + continue; + } + if (property.NameEquals("diskName"u8)) + { + diskName = property.Value.GetString(); + continue; + } + if (property.NameEquals("folder"u8)) + { + folder = property.Value.GetString(); + continue; + } + if (property.NameEquals("avsVmInternalId"u8)) + { + avsVmInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("avsVmResourceId"u8)) + { + avsVmResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("avsVmName"u8)) + { + avsVmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("avsStorageContainerResourceId"u8)) + { + avsStorageContainerResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsDiskDetails( + diskId, + diskName, + folder, + avsVmInternalId, + avsVmResourceId, + avsVmName, + avsStorageContainerResourceId, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsDiskDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsDiskDetails 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 DeserializePureStorageAvsDiskDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsDiskDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.cs new file mode 100644 index 000000000000..24aed2fc7ca1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsDiskDetails.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 Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// AVS disk/volume information. + public partial class PureStorageAvsDiskDetails + { + /// + /// 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 . + /// VMware ID of the disk/volume. + /// VMware name of the disk/volume. + /// Name of the top-level folder in the datastore that contains the disk/volume. + /// VMware ID assigned to the disk/volume. + /// Azure resource ID of the AVS VM connected to this disk/volume. + /// Name of the AVS VM connected to this disk/volume. + /// Azure resource ID of the AVS storage container containing this disk/volume. + /// , , , , , or is null. + internal PureStorageAvsDiskDetails(string diskId, string diskName, string folder, string avsVmInternalId, ResourceIdentifier avsVmResourceId, string avsVmName, ResourceIdentifier avsStorageContainerResourceId) + { + Argument.AssertNotNull(diskId, nameof(diskId)); + Argument.AssertNotNull(diskName, nameof(diskName)); + Argument.AssertNotNull(folder, nameof(folder)); + Argument.AssertNotNull(avsVmInternalId, nameof(avsVmInternalId)); + Argument.AssertNotNull(avsVmResourceId, nameof(avsVmResourceId)); + Argument.AssertNotNull(avsVmName, nameof(avsVmName)); + Argument.AssertNotNull(avsStorageContainerResourceId, nameof(avsStorageContainerResourceId)); + + DiskId = diskId; + DiskName = diskName; + Folder = folder; + AvsVmInternalId = avsVmInternalId; + AvsVmResourceId = avsVmResourceId; + AvsVmName = avsVmName; + AvsStorageContainerResourceId = avsStorageContainerResourceId; + } + + /// Initializes a new instance of . + /// VMware ID of the disk/volume. + /// VMware name of the disk/volume. + /// Name of the top-level folder in the datastore that contains the disk/volume. + /// VMware ID assigned to the disk/volume. + /// Azure resource ID of the AVS VM connected to this disk/volume. + /// Name of the AVS VM connected to this disk/volume. + /// Azure resource ID of the AVS storage container containing this disk/volume. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsDiskDetails(string diskId, string diskName, string folder, string avsVmInternalId, ResourceIdentifier avsVmResourceId, string avsVmName, ResourceIdentifier avsStorageContainerResourceId, IDictionary serializedAdditionalRawData) + { + DiskId = diskId; + DiskName = diskName; + Folder = folder; + AvsVmInternalId = avsVmInternalId; + AvsVmResourceId = avsVmResourceId; + AvsVmName = avsVmName; + AvsStorageContainerResourceId = avsStorageContainerResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvsDiskDetails() + { + } + + /// VMware ID of the disk/volume. + public string DiskId { get; } + /// VMware name of the disk/volume. + public string DiskName { get; } + /// Name of the top-level folder in the datastore that contains the disk/volume. + public string Folder { get; } + /// VMware ID assigned to the disk/volume. + public string AvsVmInternalId { get; } + /// Azure resource ID of the AVS VM connected to this disk/volume. + public ResourceIdentifier AvsVmResourceId { get; } + /// Name of the AVS VM connected to this disk/volume. + public string AvsVmName { get; } + /// Azure resource ID of the AVS storage container containing this disk/volume. + public ResourceIdentifier AvsStorageContainerResourceId { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.Serialization.cs new file mode 100644 index 000000000000..ebb7ad5e5f06 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.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.PureStorageBlock.Models +{ + public partial class PureStorageAvsStatus : 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(PureStorageAvsStatus)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("avsEnabled"u8); + writer.WriteBooleanValue(IsAvsEnabled); + writer.WritePropertyName("currentConnectionStatus"u8); + writer.WriteStringValue(CurrentConnectionStatus); + if (Optional.IsDefined(ClusterResourceId)) + { + writer.WritePropertyName("sddcResourceId"u8); + writer.WriteStringValue(ClusterResourceId); + } + 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 + } + } + } + + PureStorageAvsStatus 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(PureStorageAvsStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsStatus(document.RootElement, options); + } + + internal static PureStorageAvsStatus DeserializePureStorageAvsStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool avsEnabled = default; + string currentConnectionStatus = default; + ResourceIdentifier sddcResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("avsEnabled"u8)) + { + avsEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("currentConnectionStatus"u8)) + { + currentConnectionStatus = property.Value.GetString(); + continue; + } + if (property.NameEquals("sddcResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sddcResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsStatus(avsEnabled, currentConnectionStatus, sddcResourceId, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsStatus)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsStatus 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 DeserializePureStorageAvsStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.cs new file mode 100644 index 000000000000..cfc5a1d3a41a --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStatus.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.PureStorageBlock.Models +{ + /// Status of storage pool / AVS connection. + public partial class PureStorageAvsStatus + { + /// + /// 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 . + /// If true, an AVS connection has been successfully completed. + /// Human-readable current AVS connection status. + /// is null. + internal PureStorageAvsStatus(bool isAvsEnabled, string currentConnectionStatus) + { + Argument.AssertNotNull(currentConnectionStatus, nameof(currentConnectionStatus)); + + IsAvsEnabled = isAvsEnabled; + CurrentConnectionStatus = currentConnectionStatus; + } + + /// Initializes a new instance of . + /// If true, an AVS connection has been successfully completed. + /// Human-readable current AVS connection status. + /// Azure resource ID of the AVS SDDC the pool is connected to. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsStatus(bool isAvsEnabled, string currentConnectionStatus, ResourceIdentifier clusterResourceId, IDictionary serializedAdditionalRawData) + { + IsAvsEnabled = isAvsEnabled; + CurrentConnectionStatus = currentConnectionStatus; + ClusterResourceId = clusterResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvsStatus() + { + } + + /// If true, an AVS connection has been successfully completed. + public bool IsAvsEnabled { get; } + /// Human-readable current AVS connection status. + public string CurrentConnectionStatus { get; } + /// Azure resource ID of the AVS SDDC the pool is connected to. + public ResourceIdentifier ClusterResourceId { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.Serialization.cs new file mode 100644 index 000000000000..2705396e84fe --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.Serialization.cs @@ -0,0 +1,191 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageAvsStorageContainerProperties : 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(PureStorageAvsStorageContainerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Space)) + { + writer.WritePropertyName("space"u8); + writer.WriteObjectValue(Space, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("resourceName"u8); + writer.WriteStringValue(ResourceName); + } + if (Optional.IsDefined(ProvisionedLimit)) + { + writer.WritePropertyName("provisionedLimit"u8); + writer.WriteNumberValue(ProvisionedLimit.Value); + } + if (options.Format != "W" && Optional.IsDefined(Datastore)) + { + writer.WritePropertyName("datastore"u8); + writer.WriteStringValue(Datastore); + } + if (options.Format != "W" && Optional.IsDefined(Mounted)) + { + writer.WritePropertyName("mounted"u8); + writer.WriteBooleanValue(Mounted.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 + } + } + } + + PureStorageAvsStorageContainerProperties 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(PureStorageAvsStorageContainerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsStorageContainerProperties(document.RootElement, options); + } + + internal static PureStorageAvsStorageContainerProperties DeserializePureStorageAvsStorageContainerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageSpaceUsage space = default; + string resourceName = default; + long? provisionedLimit = default; + string datastore = default; + bool? mounted = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("space"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + space = PureStorageSpaceUsage.DeserializePureStorageSpaceUsage(property.Value, options); + continue; + } + if (property.NameEquals("resourceName"u8)) + { + resourceName = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionedLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisionedLimit = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("datastore"u8)) + { + datastore = property.Value.GetString(); + continue; + } + if (property.NameEquals("mounted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mounted = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsStorageContainerProperties( + space, + resourceName, + provisionedLimit, + datastore, + mounted, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerProperties)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsStorageContainerProperties 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 DeserializePureStorageAvsStorageContainerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.cs new file mode 100644 index 000000000000..91d70ddc6d13 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerProperties.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.PureStorageBlock.Models +{ + /// AVS storage container properties. + public partial class PureStorageAvsStorageContainerProperties + { + /// + /// 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 storage container. + internal PureStorageAvsStorageContainerProperties(string resourceName) + { + ResourceName = resourceName; + } + + /// Initializes a new instance of . + /// Storage space usage. + /// Name of the storage container. + /// Maximum amount of bytes that can be provisioned in this storage container; it must be a multiple of 512; each time a volume is provisioned in this container, its provisionedSize will be counted against the provisionLimit and the provisioning will fail if it goes over (minimum: 1048576 (1MiB), maximum: 4503599627370496 (4PiB)); by default it is unrestricted. + /// VMware datastore associated with this storage container (if any). + /// Whether the datastore is mounted in VMware or not. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsStorageContainerProperties(PureStorageSpaceUsage space, string resourceName, long? provisionedLimit, string datastore, bool? mounted, IDictionary serializedAdditionalRawData) + { + Space = space; + ResourceName = resourceName; + ProvisionedLimit = provisionedLimit; + Datastore = datastore; + Mounted = mounted; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvsStorageContainerProperties() + { + } + + /// Storage space usage. + public PureStorageSpaceUsage Space { get; } + /// Name of the storage container. + public string ResourceName { get; } + /// Maximum amount of bytes that can be provisioned in this storage container; it must be a multiple of 512; each time a volume is provisioned in this container, its provisionedSize will be counted against the provisionLimit and the provisioning will fail if it goes over (minimum: 1048576 (1MiB), maximum: 4503599627370496 (4PiB)); by default it is unrestricted. + public long? ProvisionedLimit { get; } + /// VMware datastore associated with this storage container (if any). + public string Datastore { get; } + /// Whether the datastore is mounted in VMware or not. + public bool? Mounted { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.Serialization.cs new file mode 100644 index 000000000000..423f8cee7e48 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.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.PureStorageBlock.Models +{ + public partial class PureStorageAvsStorageContainerVolumePatch : 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(PureStorageAvsStorageContainerVolumePatch)} 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 + } + } + } + + PureStorageAvsStorageContainerVolumePatch 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(PureStorageAvsStorageContainerVolumePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsStorageContainerVolumePatch(document.RootElement, options); + } + + internal static PureStorageAvsStorageContainerVolumePatch DeserializePureStorageAvsStorageContainerVolumePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvsStorageContainerVolumeUpdateProperties 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 = AvsStorageContainerVolumeUpdateProperties.DeserializeAvsStorageContainerVolumeUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsStorageContainerVolumePatch(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerVolumePatch)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsStorageContainerVolumePatch 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 DeserializePureStorageAvsStorageContainerVolumePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerVolumePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.cs new file mode 100644 index 000000000000..f94aef50be13 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsStorageContainerVolumePatch.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.PureStorageBlock.Models +{ + /// The type used for update operations of the AvsStorageContainerVolume. + public partial class PureStorageAvsStorageContainerVolumePatch + { + /// + /// 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 PureStorageAvsStorageContainerVolumePatch() + { + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsStorageContainerVolumePatch(AvsStorageContainerVolumeUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AvsStorageContainerVolumeUpdateProperties Properties { get; set; } + /// Volume's soft-deletion state. + public PureStorageSoftDeletionState AvsStorageContainerVolumeUpdateSoftDeletion + { + get => Properties is null ? default : Properties.SoftDeletion; + set + { + if (Properties is null) + Properties = new AvsStorageContainerVolumeUpdateProperties(); + Properties.SoftDeletion = value; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.Serialization.cs new file mode 100644 index 000000000000..68e003aa6914 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.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; +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public partial class PureStorageAvsVmDetails : 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(PureStorageAvsVmDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("vmId"u8); + writer.WriteStringValue(VmId); + writer.WritePropertyName("vmName"u8); + writer.WriteStringValue(VmName); + writer.WritePropertyName("vmType"u8); + writer.WriteStringValue(VmType.ToString()); + writer.WritePropertyName("avsVmInternalId"u8); + writer.WriteStringValue(AvsVmInternalId); + 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 + } + } + } + + PureStorageAvsVmDetails 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(PureStorageAvsVmDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmDetails(document.RootElement, options); + } + + internal static PureStorageAvsVmDetails DeserializePureStorageAvsVmDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string vmId = default; + string vmName = default; + PureStorageAvsVmType vmType = default; + string avsVmInternalId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("vmId"u8)) + { + vmId = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmName"u8)) + { + vmName = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmType"u8)) + { + vmType = new PureStorageAvsVmType(property.Value.GetString()); + continue; + } + if (property.NameEquals("avsVmInternalId"u8)) + { + avsVmInternalId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmDetails(vmId, vmName, vmType, avsVmInternalId, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmDetails 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 DeserializePureStorageAvsVmDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.cs new file mode 100644 index 000000000000..5956ab4f6070 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmDetails.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// AVS VM details. + public partial class PureStorageAvsVmDetails + { + /// + /// 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 . + /// ID of the AVS VM using this set of volumes. + /// Name of the VMware VM using this set of volumes. + /// Type of the VMware VM using this set of volumes. + /// Pure Storage's internal ID for this AVS VM. + /// , or is null. + internal PureStorageAvsVmDetails(string vmId, string vmName, PureStorageAvsVmType vmType, string avsVmInternalId) + { + Argument.AssertNotNull(vmId, nameof(vmId)); + Argument.AssertNotNull(vmName, nameof(vmName)); + Argument.AssertNotNull(avsVmInternalId, nameof(avsVmInternalId)); + + VmId = vmId; + VmName = vmName; + VmType = vmType; + AvsVmInternalId = avsVmInternalId; + } + + /// Initializes a new instance of . + /// ID of the AVS VM using this set of volumes. + /// Name of the VMware VM using this set of volumes. + /// Type of the VMware VM using this set of volumes. + /// Pure Storage's internal ID for this AVS VM. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsVmDetails(string vmId, string vmName, PureStorageAvsVmType vmType, string avsVmInternalId, IDictionary serializedAdditionalRawData) + { + VmId = vmId; + VmName = vmName; + VmType = vmType; + AvsVmInternalId = avsVmInternalId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageAvsVmDetails() + { + } + + /// ID of the AVS VM using this set of volumes. + public string VmId { get; } + /// Name of the VMware VM using this set of volumes. + public string VmName { get; } + /// Type of the VMware VM using this set of volumes. + public PureStorageAvsVmType VmType { get; } + /// Pure Storage's internal ID for this AVS VM. + public string AvsVmInternalId { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.Serialization.cs new file mode 100644 index 000000000000..dfc775749519 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.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.PureStorageBlock.Models +{ + public partial class PureStorageAvsVmPatch : 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(PureStorageAvsVmPatch)} 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 + } + } + } + + PureStorageAvsVmPatch 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(PureStorageAvsVmPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmPatch(document.RootElement, options); + } + + internal static PureStorageAvsVmPatch DeserializePureStorageAvsVmPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvsVmUpdateProperties 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 = AvsVmUpdateProperties.DeserializeAvsVmUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmPatch(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmPatch)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmPatch 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 DeserializePureStorageAvsVmPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.cs new file mode 100644 index 000000000000..c93f0d881910 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmPatch.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.PureStorageBlock.Models +{ + /// The type used for update operations of the AvsVm. + public partial class PureStorageAvsVmPatch + { + /// + /// 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 PureStorageAvsVmPatch() + { + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsVmPatch(AvsVmUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AvsVmUpdateProperties Properties { get; set; } + /// AVS VM's soft-deletion state. + public PureStorageSoftDeletionState AvsVmUpdateSoftDeletion + { + get => Properties is null ? default : Properties.SoftDeletion; + set + { + if (Properties is null) + Properties = new AvsVmUpdateProperties(); + Properties.SoftDeletion = value; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.Serialization.cs new file mode 100644 index 000000000000..8423f9fab07d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.Serialization.cs @@ -0,0 +1,255 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageAvsVmProperties : 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(PureStorageAvsVmProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(StoragePoolInternalId)) + { + writer.WritePropertyName("storagePoolInternalId"u8); + writer.WriteStringValue(StoragePoolInternalId); + } + if (options.Format != "W" && Optional.IsDefined(StoragePoolResourceId)) + { + writer.WritePropertyName("storagePoolResourceId"u8); + writer.WriteStringValue(StoragePoolResourceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(CreatedOn)) + { + writer.WritePropertyName("createdTimestamp"u8); + writer.WriteStringValue(CreatedOn.Value, "O"); + } + if (Optional.IsDefined(SoftDeletion)) + { + writer.WritePropertyName("softDeletion"u8); + writer.WriteObjectValue(SoftDeletion, options); + } + if (options.Format != "W" && Optional.IsDefined(VolumeContainerType)) + { + writer.WritePropertyName("volumeContainerType"u8); + writer.WriteStringValue(VolumeContainerType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Avs)) + { + writer.WritePropertyName("avs"u8); + writer.WriteObjectValue(Avs, options); + } + if (options.Format != "W" && Optional.IsDefined(Space)) + { + writer.WritePropertyName("space"u8); + writer.WriteObjectValue(Space, 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 + } + } + } + + PureStorageAvsVmProperties 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(PureStorageAvsVmProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmProperties(document.RootElement, options); + } + + internal static PureStorageAvsVmProperties DeserializePureStorageAvsVmProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string storagePoolInternalId = default; + ResourceIdentifier storagePoolResourceId = default; + string displayName = default; + DateTimeOffset? createdTimestamp = default; + PureStorageSoftDeletionState softDeletion = default; + PureStorageAvsVmVolumeContainerType? volumeContainerType = default; + PureStorageAvsVmDetails avs = default; + PureStorageSpaceUsage space = default; + PureStorageResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storagePoolInternalId"u8)) + { + storagePoolInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storagePoolResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storagePoolResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("createdTimestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("softDeletion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softDeletion = PureStorageSoftDeletionState.DeserializePureStorageSoftDeletionState(property.Value, options); + continue; + } + if (property.NameEquals("volumeContainerType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + volumeContainerType = new PureStorageAvsVmVolumeContainerType(property.Value.GetString()); + continue; + } + if (property.NameEquals("avs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avs = PureStorageAvsVmDetails.DeserializePureStorageAvsVmDetails(property.Value, options); + continue; + } + if (property.NameEquals("space"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + space = PureStorageSpaceUsage.DeserializePureStorageSpaceUsage(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PureStorageResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmProperties( + storagePoolInternalId, + storagePoolResourceId, + displayName, + createdTimestamp, + softDeletion, + volumeContainerType, + avs, + space, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmProperties)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmProperties 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 DeserializePureStorageAvsVmProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.cs new file mode 100644 index 000000000000..6d58e9087487 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmProperties.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// AVS VM properties. + public partial class PureStorageAvsVmProperties + { + /// + /// 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 PureStorageAvsVmProperties() + { + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the storage pool. + /// Azure resource ID of the storage pool. + /// Human-readable name of the AVS VM. + /// Date at which the AVS VM was created, as an RFC 3339 timestamp. + /// AVS VM's soft-deletion state. + /// Specify which control plane handles the lifecycle of the volume container. + /// AVS VM details. + /// Contains properties related to used Flash space. + /// Provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsVmProperties(string storagePoolInternalId, ResourceIdentifier storagePoolResourceId, string displayName, DateTimeOffset? createdOn, PureStorageSoftDeletionState softDeletion, PureStorageAvsVmVolumeContainerType? volumeContainerType, PureStorageAvsVmDetails avs, PureStorageSpaceUsage space, PureStorageResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + StoragePoolInternalId = storagePoolInternalId; + StoragePoolResourceId = storagePoolResourceId; + DisplayName = displayName; + CreatedOn = createdOn; + SoftDeletion = softDeletion; + VolumeContainerType = volumeContainerType; + Avs = avs; + Space = space; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Pure Storage's internal ID for the storage pool. + public string StoragePoolInternalId { get; } + /// Azure resource ID of the storage pool. + public ResourceIdentifier StoragePoolResourceId { get; } + /// Human-readable name of the AVS VM. + public string DisplayName { get; } + /// Date at which the AVS VM was created, as an RFC 3339 timestamp. + public DateTimeOffset? CreatedOn { get; } + /// AVS VM's soft-deletion state. + public PureStorageSoftDeletionState SoftDeletion { get; } + /// Specify which control plane handles the lifecycle of the volume container. + public PureStorageAvsVmVolumeContainerType? VolumeContainerType { get; } + /// AVS VM details. + public PureStorageAvsVmDetails Avs { get; } + /// Contains properties related to used Flash space. + public PureStorageSpaceUsage Space { get; } + /// Provisioning state of the resource. + public PureStorageResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmType.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmType.cs new file mode 100644 index 000000000000..0849ce6ab56f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmType.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.PureStorageBlock.Models +{ + /// AVS VM storage types. + public readonly partial struct PureStorageAvsVmType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageAvsVmType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string VVolValue = "vvol"; + + /// VM using vVols as underlying storage. + public static PureStorageAvsVmType VVol { get; } = new PureStorageAvsVmType(VVolValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageAvsVmType left, PureStorageAvsVmType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageAvsVmType left, PureStorageAvsVmType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageAvsVmType(string value) => new PureStorageAvsVmType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageAvsVmType other && Equals(other); + /// + public bool Equals(PureStorageAvsVmType 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeContainerType.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeContainerType.cs new file mode 100644 index 000000000000..e35ad52bb16f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeContainerType.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.PureStorageBlock.Models +{ + /// Specify which control plane handles the lifecycle of the volume container. + public readonly partial struct PureStorageAvsVmVolumeContainerType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageAvsVmVolumeContainerType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AVSValue = "avs"; + + /// AVS/VMware. + public static PureStorageAvsVmVolumeContainerType AVS { get; } = new PureStorageAvsVmVolumeContainerType(AVSValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageAvsVmVolumeContainerType left, PureStorageAvsVmVolumeContainerType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageAvsVmVolumeContainerType left, PureStorageAvsVmVolumeContainerType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageAvsVmVolumeContainerType(string value) => new PureStorageAvsVmVolumeContainerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageAvsVmVolumeContainerType other && Equals(other); + /// + public bool Equals(PureStorageAvsVmVolumeContainerType 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.Serialization.cs new file mode 100644 index 000000000000..c03053bcce9b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.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.PureStorageBlock.Models +{ + public partial class PureStorageAvsVmVolumePatch : 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(PureStorageAvsVmVolumePatch)} 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 + } + } + } + + PureStorageAvsVmVolumePatch 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(PureStorageAvsVmVolumePatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmVolumePatch(document.RootElement, options); + } + + internal static PureStorageAvsVmVolumePatch DeserializePureStorageAvsVmVolumePatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AvsVmVolumeUpdateProperties 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 = AvsVmVolumeUpdateProperties.DeserializeAvsVmVolumeUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmVolumePatch(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmVolumePatch)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmVolumePatch 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 DeserializePureStorageAvsVmVolumePatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmVolumePatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.cs new file mode 100644 index 000000000000..a1e2aa460c38 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumePatch.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.PureStorageBlock.Models +{ + /// The type used for update operations of the AvsVmVolume. + public partial class PureStorageAvsVmVolumePatch + { + /// + /// 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 PureStorageAvsVmVolumePatch() + { + } + + /// Initializes a new instance of . + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageAvsVmVolumePatch(AvsVmVolumeUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AvsVmVolumeUpdateProperties Properties { get; set; } + /// Volume's soft-deletion state. + public PureStorageSoftDeletionState AvsVmVolumeUpdateSoftDeletion + { + get => Properties is null ? default : Properties.SoftDeletion; + set + { + if (Properties is null) + Properties = new AvsVmVolumeUpdateProperties(); + Properties.SoftDeletion = value; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeType.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeType.cs new file mode 100644 index 000000000000..126b5a28a8a4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageAvsVmVolumeType.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.PureStorageBlock.Models +{ + /// Specify which control plane handles the lifecycle of the volume. + public readonly partial struct PureStorageAvsVmVolumeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageAvsVmVolumeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AVSValue = "avs"; + + /// AVS/VMware. + public static PureStorageAvsVmVolumeType AVS { get; } = new PureStorageAvsVmVolumeType(AVSValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageAvsVmVolumeType left, PureStorageAvsVmVolumeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageAvsVmVolumeType left, PureStorageAvsVmVolumeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageAvsVmVolumeType(string value) => new PureStorageAvsVmVolumeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageAvsVmVolumeType other && Equals(other); + /// + public bool Equals(PureStorageAvsVmVolumeType 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.Serialization.cs new file mode 100644 index 000000000000..5848c61f7684 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.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.PureStorageBlock.Models +{ + public partial class PureStorageBandwidthUsage : 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(PureStorageBandwidthUsage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("current"u8); + writer.WriteNumberValue(Current); + writer.WritePropertyName("provisioned"u8); + writer.WriteNumberValue(Provisioned); + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max); + 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 + } + } + } + + PureStorageBandwidthUsage 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(PureStorageBandwidthUsage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageBandwidthUsage(document.RootElement, options); + } + + internal static PureStorageBandwidthUsage DeserializePureStorageBandwidthUsage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long current = default; + long provisioned = default; + long max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("current"u8)) + { + current = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("provisioned"u8)) + { + provisioned = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("max"u8)) + { + max = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageBandwidthUsage(current, provisioned, max, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageBandwidthUsage)} does not support writing '{options.Format}' format."); + } + } + + PureStorageBandwidthUsage 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 DeserializePureStorageBandwidthUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageBandwidthUsage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.cs new file mode 100644 index 000000000000..2e21efb46be4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBandwidthUsage.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Bandwidth usage metrics. + public partial class PureStorageBandwidthUsage + { + /// + /// 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 bytes written and read per second (maximum value over the last 10 minutes). + /// Bandwidth value currently provisioned for the storage pool, in MB/s. + /// Maximum bandwidth value that can be provisioned for the storage pool. + internal PureStorageBandwidthUsage(long current, long provisioned, long max) + { + Current = current; + Provisioned = provisioned; + Max = max; + } + + /// Initializes a new instance of . + /// Number of bytes written and read per second (maximum value over the last 10 minutes). + /// Bandwidth value currently provisioned for the storage pool, in MB/s. + /// Maximum bandwidth value that can be provisioned for the storage pool. + /// Keeps track of any properties unknown to the library. + internal PureStorageBandwidthUsage(long current, long provisioned, long max, IDictionary serializedAdditionalRawData) + { + Current = current; + Provisioned = provisioned; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageBandwidthUsage() + { + } + + /// Number of bytes written and read per second (maximum value over the last 10 minutes). + public long Current { get; } + /// Bandwidth value currently provisioned for the storage pool, in MB/s. + public long Provisioned { get; } + /// Maximum bandwidth value that can be provisioned for the storage pool. + public long Max { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.Serialization.cs new file mode 100644 index 000000000000..765f93d84697 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageBillingUsageProperty : 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(PureStorageBillingUsageProperty)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("propertyId"u8); + writer.WriteStringValue(PropertyId); + writer.WritePropertyName("propertyName"u8); + writer.WriteStringValue(PropertyName); + writer.WritePropertyName("currentValue"u8); + writer.WriteStringValue(CurrentValue); + if (Optional.IsDefined(PreviousValue)) + { + writer.WritePropertyName("previousValue"u8); + writer.WriteStringValue(PreviousValue); + } + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.ToString()); + if (Optional.IsDefined(StatusMessage)) + { + writer.WritePropertyName("statusMessage"u8); + writer.WriteStringValue(StatusMessage); + } + if (Optional.IsCollectionDefined(SubProperties)) + { + writer.WritePropertyName("subProperties"u8); + writer.WriteStartArray(); + foreach (var item in SubProperties) + { + 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 + } + } + } + + PureStorageBillingUsageProperty 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(PureStorageBillingUsageProperty)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageBillingUsageProperty(document.RootElement, options); + } + + internal static PureStorageBillingUsageProperty DeserializePureStorageBillingUsageProperty(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string propertyId = default; + string propertyName = default; + string currentValue = default; + string previousValue = default; + PureStorageBillingUsageSeverity severity = default; + string statusMessage = default; + IReadOnlyList subProperties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("propertyId"u8)) + { + propertyId = property.Value.GetString(); + continue; + } + if (property.NameEquals("propertyName"u8)) + { + propertyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("currentValue"u8)) + { + currentValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("previousValue"u8)) + { + previousValue = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + severity = new PureStorageBillingUsageSeverity(property.Value.GetString()); + continue; + } + if (property.NameEquals("statusMessage"u8)) + { + statusMessage = property.Value.GetString(); + continue; + } + if (property.NameEquals("subProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DeserializePureStorageBillingUsageProperty(item, options)); + } + subProperties = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageBillingUsageProperty( + propertyId, + propertyName, + currentValue, + previousValue, + severity, + statusMessage, + subProperties ?? 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageBillingUsageProperty)} does not support writing '{options.Format}' format."); + } + } + + PureStorageBillingUsageProperty 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 DeserializePureStorageBillingUsageProperty(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageBillingUsageProperty)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.cs new file mode 100644 index 000000000000..3910ee8e9806 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageProperty.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Represents an individual billing usage property. + public partial class PureStorageBillingUsageProperty + { + /// + /// 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 . + /// Unique identifier for the billing usage property. + /// Name of the billing usage property. + /// Current value of the billing usage property. + /// Severity level of the usage. + /// , or is null. + internal PureStorageBillingUsageProperty(string propertyId, string propertyName, string currentValue, PureStorageBillingUsageSeverity severity) + { + Argument.AssertNotNull(propertyId, nameof(propertyId)); + Argument.AssertNotNull(propertyName, nameof(propertyName)); + Argument.AssertNotNull(currentValue, nameof(currentValue)); + + PropertyId = propertyId; + PropertyName = propertyName; + CurrentValue = currentValue; + Severity = severity; + SubProperties = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Unique identifier for the billing usage property. + /// Name of the billing usage property. + /// Current value of the billing usage property. + /// Previous value of the billing usage property. + /// Severity level of the usage. + /// Status message for the billing usage against a property. + /// Optional list of sub-properties providing additional details. + /// Keeps track of any properties unknown to the library. + internal PureStorageBillingUsageProperty(string propertyId, string propertyName, string currentValue, string previousValue, PureStorageBillingUsageSeverity severity, string statusMessage, IReadOnlyList subProperties, IDictionary serializedAdditionalRawData) + { + PropertyId = propertyId; + PropertyName = propertyName; + CurrentValue = currentValue; + PreviousValue = previousValue; + Severity = severity; + StatusMessage = statusMessage; + SubProperties = subProperties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageBillingUsageProperty() + { + } + + /// Unique identifier for the billing usage property. + public string PropertyId { get; } + /// Name of the billing usage property. + public string PropertyName { get; } + /// Current value of the billing usage property. + public string CurrentValue { get; } + /// Previous value of the billing usage property. + public string PreviousValue { get; } + /// Severity level of the usage. + public PureStorageBillingUsageSeverity Severity { get; } + /// Status message for the billing usage against a property. + public string StatusMessage { get; } + /// Optional list of sub-properties providing additional details. + public IReadOnlyList SubProperties { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageSeverity.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageSeverity.cs new file mode 100644 index 000000000000..e271d36a52d4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageBillingUsageSeverity.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.PureStorageBlock.Models +{ + /// Severity levels for billing usage properties. + public readonly partial struct PureStorageBillingUsageSeverity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageBillingUsageSeverity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ALERTValue = "alert"; + private const string INFORMATIONValue = "information"; + private const string WARNINGValue = "warning"; + private const string NONEValue = "none"; + + /// Indicates an alert condition. + public static PureStorageBillingUsageSeverity ALERT { get; } = new PureStorageBillingUsageSeverity(ALERTValue); + /// Provides informational details. + public static PureStorageBillingUsageSeverity INFORMATION { get; } = new PureStorageBillingUsageSeverity(INFORMATIONValue); + /// Indicates a warning condition. + public static PureStorageBillingUsageSeverity WARNING { get; } = new PureStorageBillingUsageSeverity(WARNINGValue); + /// Indicates no severity. + public static PureStorageBillingUsageSeverity NONE { get; } = new PureStorageBillingUsageSeverity(NONEValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageBillingUsageSeverity left, PureStorageBillingUsageSeverity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageBillingUsageSeverity left, PureStorageBillingUsageSeverity right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageBillingUsageSeverity(string value) => new PureStorageBillingUsageSeverity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageBillingUsageSeverity other && Equals(other); + /// + public bool Equals(PureStorageBillingUsageSeverity 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.Serialization.cs new file mode 100644 index 000000000000..265eeca940a1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.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.PureStorageBlock.Models +{ + public partial class PureStorageCompanyDetails : 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(PureStorageCompanyDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("companyName"u8); + writer.WriteStringValue(CompanyName); + if (Optional.IsDefined(Address)) + { + writer.WritePropertyName("address"u8); + writer.WriteObjectValue(Address, 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 + } + } + } + + PureStorageCompanyDetails 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(PureStorageCompanyDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageCompanyDetails(document.RootElement, options); + } + + internal static PureStorageCompanyDetails DeserializePureStorageCompanyDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string companyName = default; + PureStorageAddressDetails address = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("companyName"u8)) + { + companyName = property.Value.GetString(); + continue; + } + if (property.NameEquals("address"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + address = PureStorageAddressDetails.DeserializePureStorageAddressDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageCompanyDetails(companyName, address, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageCompanyDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageCompanyDetails 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 DeserializePureStorageCompanyDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageCompanyDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.cs new file mode 100644 index 000000000000..5cefe564afc1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageCompanyDetails.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.PureStorageBlock.Models +{ + /// Company details. + public partial class PureStorageCompanyDetails + { + /// + /// 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 . + /// Company name. + /// is null. + public PureStorageCompanyDetails(string companyName) + { + Argument.AssertNotNull(companyName, nameof(companyName)); + + CompanyName = companyName; + } + + /// Initializes a new instance of . + /// Company name. + /// Company address. + /// Keeps track of any properties unknown to the library. + internal PureStorageCompanyDetails(string companyName, PureStorageAddressDetails address, IDictionary serializedAdditionalRawData) + { + CompanyName = companyName; + Address = address; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageCompanyDetails() + { + } + + /// Company name. + public string CompanyName { get; set; } + /// Company address. + public PureStorageAddressDetails Address { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.Serialization.cs new file mode 100644 index 000000000000..dcf752c46b86 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.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.PureStorageBlock.Models +{ + public partial class PureStorageHealthAlert : 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(PureStorageHealthAlert)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level.ToString()); + 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 + } + } + } + + PureStorageHealthAlert 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(PureStorageHealthAlert)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageHealthAlert(document.RootElement, options); + } + + internal static PureStorageHealthAlert DeserializePureStorageHealthAlert(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageHealthAlertLevel level = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("level"u8)) + { + level = new PureStorageHealthAlertLevel(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 PureStorageHealthAlert(level, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageHealthAlert)} does not support writing '{options.Format}' format."); + } + } + + PureStorageHealthAlert 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 DeserializePureStorageHealthAlert(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageHealthAlert)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.cs new file mode 100644 index 000000000000..9ee4d1285365 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlert.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.PureStorageBlock.Models +{ + /// Health alerts. + public partial class PureStorageHealthAlert + { + /// + /// 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 . + /// Severity level. + /// A short description of the alert. + /// is null. + internal PureStorageHealthAlert(PureStorageHealthAlertLevel level, string message) + { + Argument.AssertNotNull(message, nameof(message)); + + Level = level; + Message = message; + } + + /// Initializes a new instance of . + /// Severity level. + /// A short description of the alert. + /// Keeps track of any properties unknown to the library. + internal PureStorageHealthAlert(PureStorageHealthAlertLevel level, string message, IDictionary serializedAdditionalRawData) + { + Level = level; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageHealthAlert() + { + } + + /// Severity level. + public PureStorageHealthAlertLevel Level { get; } + /// A short description of the alert. + public string Message { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlertLevel.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlertLevel.cs new file mode 100644 index 000000000000..ecd144b397c2 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthAlertLevel.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.PureStorageBlock.Models +{ + /// Severity level of the alert. + public readonly partial struct PureStorageHealthAlertLevel : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageHealthAlertLevel(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InfoValue = "info"; + private const string WarningValue = "warning"; + private const string ErrorValue = "error"; + + /// Information level. + public static PureStorageHealthAlertLevel Info { get; } = new PureStorageHealthAlertLevel(InfoValue); + /// Warning level. + public static PureStorageHealthAlertLevel Warning { get; } = new PureStorageHealthAlertLevel(WarningValue); + /// Error level. + public static PureStorageHealthAlertLevel Error { get; } = new PureStorageHealthAlertLevel(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageHealthAlertLevel left, PureStorageHealthAlertLevel right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageHealthAlertLevel left, PureStorageHealthAlertLevel right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageHealthAlertLevel(string value) => new PureStorageHealthAlertLevel(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageHealthAlertLevel other && Equals(other); + /// + public bool Equals(PureStorageHealthAlertLevel 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.Serialization.cs new file mode 100644 index 000000000000..7cb575faa2cd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.Serialization.cs @@ -0,0 +1,173 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public partial class PureStorageHealthDetails : 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(PureStorageHealthDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("usedCapacityPercentage"u8); + writer.WriteNumberValue(UsedCapacityPercentage); + writer.WritePropertyName("bandwidthUsage"u8); + writer.WriteObjectValue(BandwidthUsage, options); + writer.WritePropertyName("iopsUsage"u8); + writer.WriteObjectValue(IopsUsage, options); + writer.WritePropertyName("space"u8); + writer.WriteObjectValue(Space, options); + writer.WritePropertyName("dataReductionRatio"u8); + writer.WriteNumberValue(DataReductionRatio); + writer.WritePropertyName("estimatedMaxCapacity"u8); + writer.WriteNumberValue(EstimatedMaxCapacity); + 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 + } + } + } + + PureStorageHealthDetails 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(PureStorageHealthDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageHealthDetails(document.RootElement, options); + } + + internal static PureStorageHealthDetails DeserializePureStorageHealthDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + double usedCapacityPercentage = default; + PureStorageBandwidthUsage bandwidthUsage = default; + PureStorageIopsUsage iopsUsage = default; + PureStorageSpaceUsage space = default; + double dataReductionRatio = default; + long estimatedMaxCapacity = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("usedCapacityPercentage"u8)) + { + usedCapacityPercentage = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("bandwidthUsage"u8)) + { + bandwidthUsage = PureStorageBandwidthUsage.DeserializePureStorageBandwidthUsage(property.Value, options); + continue; + } + if (property.NameEquals("iopsUsage"u8)) + { + iopsUsage = PureStorageIopsUsage.DeserializePureStorageIopsUsage(property.Value, options); + continue; + } + if (property.NameEquals("space"u8)) + { + space = PureStorageSpaceUsage.DeserializePureStorageSpaceUsage(property.Value, options); + continue; + } + if (property.NameEquals("dataReductionRatio"u8)) + { + dataReductionRatio = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("estimatedMaxCapacity"u8)) + { + estimatedMaxCapacity = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageHealthDetails( + usedCapacityPercentage, + bandwidthUsage, + iopsUsage, + space, + dataReductionRatio, + estimatedMaxCapacity, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageHealthDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageHealthDetails 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 DeserializePureStorageHealthDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageHealthDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.cs new file mode 100644 index 000000000000..072027ee6d7c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageHealthDetails.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Health metrics for a storage pool. + public partial class PureStorageHealthDetails + { + /// + /// 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 . + /// How full the pool is right now, in %, compared to the maximum size it can grow to; estimated based on current usage and data reduction ratio. + /// Bandwidth usage metrics. + /// IOPS usage metrics. + /// Storage space usage. + /// Data reduction ratio achieved on this pool. + /// Estimated maximum capacity of the pool, in bytes, based on current usage and data reduction ratio. + /// , or is null. + internal PureStorageHealthDetails(double usedCapacityPercentage, PureStorageBandwidthUsage bandwidthUsage, PureStorageIopsUsage iopsUsage, PureStorageSpaceUsage space, double dataReductionRatio, long estimatedMaxCapacity) + { + Argument.AssertNotNull(bandwidthUsage, nameof(bandwidthUsage)); + Argument.AssertNotNull(iopsUsage, nameof(iopsUsage)); + Argument.AssertNotNull(space, nameof(space)); + + UsedCapacityPercentage = usedCapacityPercentage; + BandwidthUsage = bandwidthUsage; + IopsUsage = iopsUsage; + Space = space; + DataReductionRatio = dataReductionRatio; + EstimatedMaxCapacity = estimatedMaxCapacity; + } + + /// Initializes a new instance of . + /// How full the pool is right now, in %, compared to the maximum size it can grow to; estimated based on current usage and data reduction ratio. + /// Bandwidth usage metrics. + /// IOPS usage metrics. + /// Storage space usage. + /// Data reduction ratio achieved on this pool. + /// Estimated maximum capacity of the pool, in bytes, based on current usage and data reduction ratio. + /// Keeps track of any properties unknown to the library. + internal PureStorageHealthDetails(double usedCapacityPercentage, PureStorageBandwidthUsage bandwidthUsage, PureStorageIopsUsage iopsUsage, PureStorageSpaceUsage space, double dataReductionRatio, long estimatedMaxCapacity, IDictionary serializedAdditionalRawData) + { + UsedCapacityPercentage = usedCapacityPercentage; + BandwidthUsage = bandwidthUsage; + IopsUsage = iopsUsage; + Space = space; + DataReductionRatio = dataReductionRatio; + EstimatedMaxCapacity = estimatedMaxCapacity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageHealthDetails() + { + } + + /// How full the pool is right now, in %, compared to the maximum size it can grow to; estimated based on current usage and data reduction ratio. + public double UsedCapacityPercentage { get; } + /// Bandwidth usage metrics. + public PureStorageBandwidthUsage BandwidthUsage { get; } + /// IOPS usage metrics. + public PureStorageIopsUsage IopsUsage { get; } + /// Storage space usage. + public PureStorageSpaceUsage Space { get; } + /// Data reduction ratio achieved on this pool. + public double DataReductionRatio { get; } + /// Estimated maximum capacity of the pool, in bytes, based on current usage and data reduction ratio. + public long EstimatedMaxCapacity { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.Serialization.cs new file mode 100644 index 000000000000..fd8fc55012ad --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.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.PureStorageBlock.Models +{ + public partial class PureStorageIopsUsage : 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(PureStorageIopsUsage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("current"u8); + writer.WriteNumberValue(Current); + writer.WritePropertyName("provisioned"u8); + writer.WriteNumberValue(Provisioned); + writer.WritePropertyName("max"u8); + writer.WriteNumberValue(Max); + 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 + } + } + } + + PureStorageIopsUsage 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(PureStorageIopsUsage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageIopsUsage(document.RootElement, options); + } + + internal static PureStorageIopsUsage DeserializePureStorageIopsUsage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long current = default; + long provisioned = default; + long max = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("current"u8)) + { + current = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("provisioned"u8)) + { + provisioned = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("max"u8)) + { + max = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageIopsUsage(current, provisioned, max, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageIopsUsage)} does not support writing '{options.Format}' format."); + } + } + + PureStorageIopsUsage 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 DeserializePureStorageIopsUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageIopsUsage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.cs new file mode 100644 index 000000000000..e8d92052c03f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageIopsUsage.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// IOPS usage metrics. + public partial class PureStorageIopsUsage + { + /// + /// 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 . + /// Current number of IOPS (maximum value over the last 10 minutes). + /// IOPS value currently provisioned for the storage pool. + /// Maximum IOPS value that can be provisioned for the storage pool. + internal PureStorageIopsUsage(long current, long provisioned, long max) + { + Current = current; + Provisioned = provisioned; + Max = max; + } + + /// Initializes a new instance of . + /// Current number of IOPS (maximum value over the last 10 minutes). + /// IOPS value currently provisioned for the storage pool. + /// Maximum IOPS value that can be provisioned for the storage pool. + /// Keeps track of any properties unknown to the library. + internal PureStorageIopsUsage(long current, long provisioned, long max, IDictionary serializedAdditionalRawData) + { + Current = current; + Provisioned = provisioned; + Max = max; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageIopsUsage() + { + } + + /// Current number of IOPS (maximum value over the last 10 minutes). + public long Current { get; } + /// IOPS value currently provisioned for the storage pool. + public long Provisioned { get; } + /// Maximum IOPS value that can be provisioned for the storage pool. + public long Max { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.Serialization.cs new file mode 100644 index 000000000000..41b77f1a3a48 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.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.PureStorageBlock.Models +{ + public partial class PureStorageMarketplaceDetails : 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(PureStorageMarketplaceDetails)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(SubscriptionId)) + { + writer.WritePropertyName("subscriptionId"u8); + writer.WriteStringValue(SubscriptionId); + } + if (Optional.IsDefined(SubscriptionStatus)) + { + writer.WritePropertyName("subscriptionStatus"u8); + writer.WriteStringValue(SubscriptionStatus.Value.ToString()); + } + writer.WritePropertyName("offerDetails"u8); + writer.WriteObjectValue(OfferDetails, 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 + } + } + } + + PureStorageMarketplaceDetails 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(PureStorageMarketplaceDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageMarketplaceDetails(document.RootElement, options); + } + + internal static PureStorageMarketplaceDetails DeserializePureStorageMarketplaceDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string subscriptionId = default; + PureStorageMarketplaceSubscriptionStatus? subscriptionStatus = default; + PureStorageOfferDetails offerDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriptionId"u8)) + { + subscriptionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("subscriptionStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriptionStatus = new PureStorageMarketplaceSubscriptionStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("offerDetails"u8)) + { + offerDetails = PureStorageOfferDetails.DeserializePureStorageOfferDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageMarketplaceDetails(subscriptionId, subscriptionStatus, offerDetails, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageMarketplaceDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageMarketplaceDetails 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 DeserializePureStorageMarketplaceDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageMarketplaceDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.cs new file mode 100644 index 000000000000..ea262d7ce269 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceDetails.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.PureStorageBlock.Models +{ + /// Marketplace details. + public partial class PureStorageMarketplaceDetails + { + /// + /// 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 . + /// Offer details of the marketplace subscription. + /// is null. + public PureStorageMarketplaceDetails(PureStorageOfferDetails offerDetails) + { + Argument.AssertNotNull(offerDetails, nameof(offerDetails)); + + OfferDetails = offerDetails; + } + + /// Initializes a new instance of . + /// Marketplace subscription ID. + /// Marketplace subscription status. + /// Offer details of the marketplace subscription. + /// Keeps track of any properties unknown to the library. + internal PureStorageMarketplaceDetails(string subscriptionId, PureStorageMarketplaceSubscriptionStatus? subscriptionStatus, PureStorageOfferDetails offerDetails, IDictionary serializedAdditionalRawData) + { + SubscriptionId = subscriptionId; + SubscriptionStatus = subscriptionStatus; + OfferDetails = offerDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageMarketplaceDetails() + { + } + + /// Marketplace subscription ID. + public string SubscriptionId { get; } + /// Marketplace subscription status. + public PureStorageMarketplaceSubscriptionStatus? SubscriptionStatus { get; set; } + /// Offer details of the marketplace subscription. + public PureStorageOfferDetails OfferDetails { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceSubscriptionStatus.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceSubscriptionStatus.cs new file mode 100644 index 000000000000..015316ec56b5 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageMarketplaceSubscriptionStatus.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.PureStorageBlock.Models +{ + /// Marketplace subscription status. + public readonly partial struct PureStorageMarketplaceSubscriptionStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageMarketplaceSubscriptionStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PendingFulfillmentStartValue = "PendingFulfillmentStart"; + private const string SubscribedValue = "Subscribed"; + private const string SuspendedValue = "Suspended"; + private const string UnsubscribedValue = "Unsubscribed"; + + /// Marketplace subscription purchased but not yet activated. + public static PureStorageMarketplaceSubscriptionStatus PendingFulfillmentStart { get; } = new PureStorageMarketplaceSubscriptionStatus(PendingFulfillmentStartValue); + /// Marketplace subscription activated. + public static PureStorageMarketplaceSubscriptionStatus Subscribed { get; } = new PureStorageMarketplaceSubscriptionStatus(SubscribedValue); + /// Marketplace subscription suspended due to missing customer payment. + public static PureStorageMarketplaceSubscriptionStatus Suspended { get; } = new PureStorageMarketplaceSubscriptionStatus(SuspendedValue); + /// Marketplace subscription cancelled. + public static PureStorageMarketplaceSubscriptionStatus Unsubscribed { get; } = new PureStorageMarketplaceSubscriptionStatus(UnsubscribedValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageMarketplaceSubscriptionStatus left, PureStorageMarketplaceSubscriptionStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageMarketplaceSubscriptionStatus left, PureStorageMarketplaceSubscriptionStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageMarketplaceSubscriptionStatus(string value) => new PureStorageMarketplaceSubscriptionStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageMarketplaceSubscriptionStatus other && Equals(other); + /// + public bool Equals(PureStorageMarketplaceSubscriptionStatus 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.Serialization.cs new file mode 100644 index 000000000000..e5a78bb50747 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageOfferDetails : 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(PureStorageOfferDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("publisherId"u8); + writer.WriteStringValue(PublisherId); + writer.WritePropertyName("offerId"u8); + writer.WriteStringValue(OfferId); + writer.WritePropertyName("planId"u8); + writer.WriteStringValue(PlanId); + if (Optional.IsDefined(PlanName)) + { + writer.WritePropertyName("planName"u8); + writer.WriteStringValue(PlanName); + } + if (Optional.IsDefined(TermUnit)) + { + writer.WritePropertyName("termUnit"u8); + writer.WriteStringValue(TermUnit); + } + if (Optional.IsDefined(TermId)) + { + writer.WritePropertyName("termId"u8); + writer.WriteStringValue(TermId); + } + 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 + } + } + } + + PureStorageOfferDetails 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(PureStorageOfferDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageOfferDetails(document.RootElement, options); + } + + internal static PureStorageOfferDetails DeserializePureStorageOfferDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string publisherId = default; + string offerId = default; + string planId = default; + string planName = default; + string termUnit = default; + string termId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("publisherId"u8)) + { + publisherId = property.Value.GetString(); + continue; + } + if (property.NameEquals("offerId"u8)) + { + offerId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planId"u8)) + { + planId = property.Value.GetString(); + continue; + } + if (property.NameEquals("planName"u8)) + { + planName = property.Value.GetString(); + continue; + } + if (property.NameEquals("termUnit"u8)) + { + termUnit = property.Value.GetString(); + continue; + } + if (property.NameEquals("termId"u8)) + { + termId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageOfferDetails( + publisherId, + offerId, + planId, + planName, + termUnit, + termId, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageOfferDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageOfferDetails 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 DeserializePureStorageOfferDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageOfferDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.cs new file mode 100644 index 000000000000..edb5a24731ca --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageOfferDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Offer details for the marketplace that is selected by the user. + public partial class PureStorageOfferDetails + { + /// + /// 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 . + /// Publisher ID for the marketplace offer. + /// Offer ID for the marketplace offer. + /// Plan ID for the marketplace offer. + /// , or is null. + public PureStorageOfferDetails(string publisherId, string offerId, string planId) + { + Argument.AssertNotNull(publisherId, nameof(publisherId)); + Argument.AssertNotNull(offerId, nameof(offerId)); + Argument.AssertNotNull(planId, nameof(planId)); + + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + } + + /// Initializes a new instance of . + /// Publisher ID for the marketplace offer. + /// Offer ID for the marketplace offer. + /// Plan ID for the marketplace offer. + /// Plan Name for the marketplace offer. + /// Term Unit for the marketplace offer. + /// Term ID for the marketplace offer. + /// Keeps track of any properties unknown to the library. + internal PureStorageOfferDetails(string publisherId, string offerId, string planId, string planName, string termUnit, string termId, IDictionary serializedAdditionalRawData) + { + PublisherId = publisherId; + OfferId = offerId; + PlanId = planId; + PlanName = planName; + TermUnit = termUnit; + TermId = termId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageOfferDetails() + { + } + + /// Publisher ID for the marketplace offer. + public string PublisherId { get; set; } + /// Offer ID for the marketplace offer. + public string OfferId { get; set; } + /// Plan ID for the marketplace offer. + public string PlanId { get; set; } + /// Plan Name for the marketplace offer. + public string PlanName { get; set; } + /// Term Unit for the marketplace offer. + public string TermUnit { get; set; } + /// Term ID for the marketplace offer. + public string TermId { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.Serialization.cs new file mode 100644 index 000000000000..1da92fdeb1f5 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.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.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public partial class PureStoragePoolPatch : 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(PureStoragePoolPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + 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 + } + } + } + + PureStoragePoolPatch 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(PureStoragePoolPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStoragePoolPatch(document.RootElement, options); + } + + internal static PureStoragePoolPatch DeserializePureStoragePoolPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ManagedServiceIdentity identity = default; + IDictionary tags = default; + StoragePoolUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + 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("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = StoragePoolUpdateProperties.DeserializeStoragePoolUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStoragePoolPatch(identity, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStoragePoolPatch)} does not support writing '{options.Format}' format."); + } + } + + PureStoragePoolPatch 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 DeserializePureStoragePoolPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStoragePoolPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.cs new file mode 100644 index 000000000000..cbac8ab9bfd2 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolPatch.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.ResourceManager.Models; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// The type used for update operations of the StoragePool. + public partial class PureStoragePoolPatch + { + /// + /// 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 PureStoragePoolPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The managed service identities assigned to this resource. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal PureStoragePoolPatch(ManagedServiceIdentity identity, IDictionary tags, StoragePoolUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Identity = identity; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal StoragePoolUpdateProperties Properties { get; set; } + /// Total bandwidth provisioned for the pool, in MB/s. + public long? StoragePoolUpdateProvisionedBandwidthMbPerSec + { + get => Properties is null ? default : Properties.ProvisionedBandwidthMbPerSec; + set + { + if (Properties is null) + Properties = new StoragePoolUpdateProperties(); + Properties.ProvisionedBandwidthMbPerSec = value; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.Serialization.cs new file mode 100644 index 000000000000..d2f1612e54ba --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.Serialization.cs @@ -0,0 +1,231 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStoragePoolProperties : 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(PureStoragePoolProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(StoragePoolInternalId)) + { + writer.WritePropertyName("storagePoolInternalId"u8); + writer.WriteStringValue(StoragePoolInternalId); + } + writer.WritePropertyName("availabilityZone"u8); + writer.WriteStringValue(AvailabilityZone); + writer.WritePropertyName("vnetInjection"u8); + writer.WriteObjectValue(VnetInjection, options); + if (options.Format != "W" && Optional.IsDefined(DataRetentionPeriod)) + { + writer.WritePropertyName("dataRetentionPeriod"u8); + writer.WriteNumberValue(DataRetentionPeriod.Value); + } + writer.WritePropertyName("provisionedBandwidthMbPerSec"u8); + writer.WriteNumberValue(ProvisionedBandwidthMbPerSec); + if (options.Format != "W" && Optional.IsDefined(ProvisionedIops)) + { + writer.WritePropertyName("provisionedIops"u8); + writer.WriteNumberValue(ProvisionedIops.Value); + } + if (options.Format != "W" && Optional.IsDefined(Avs)) + { + writer.WritePropertyName("avs"u8); + writer.WriteObjectValue(Avs, options); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + writer.WritePropertyName("reservationResourceId"u8); + writer.WriteStringValue(ReservationResourceId); + 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 + } + } + } + + PureStoragePoolProperties 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(PureStoragePoolProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStoragePoolProperties(document.RootElement, options); + } + + internal static PureStoragePoolProperties DeserializePureStoragePoolProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string storagePoolInternalId = default; + string availabilityZone = default; + PureStoragePoolVnetInjection vnetInjection = default; + long? dataRetentionPeriod = default; + long provisionedBandwidthMbPerSec = default; + long? provisionedIops = default; + PureStorageAvs avs = default; + PureStorageProvisioningState? provisioningState = default; + ResourceIdentifier reservationResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storagePoolInternalId"u8)) + { + storagePoolInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("availabilityZone"u8)) + { + availabilityZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("vnetInjection"u8)) + { + vnetInjection = PureStoragePoolVnetInjection.DeserializePureStoragePoolVnetInjection(property.Value, options); + continue; + } + if (property.NameEquals("dataRetentionPeriod"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataRetentionPeriod = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("provisionedBandwidthMbPerSec"u8)) + { + provisionedBandwidthMbPerSec = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("provisionedIops"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisionedIops = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("avs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avs = PureStorageAvs.DeserializePureStorageAvs(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PureStorageProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("reservationResourceId"u8)) + { + reservationResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStoragePoolProperties( + storagePoolInternalId, + availabilityZone, + vnetInjection, + dataRetentionPeriod, + provisionedBandwidthMbPerSec, + provisionedIops, + avs, + provisioningState, + reservationResourceId, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStoragePoolProperties)} does not support writing '{options.Format}' format."); + } + } + + PureStoragePoolProperties 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 DeserializePureStoragePoolProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStoragePoolProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.cs new file mode 100644 index 000000000000..235de653b4e5 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolProperties.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.PureStorageBlock.Models +{ + /// Properties of a storage pool. + public partial class PureStoragePoolProperties + { + /// + /// 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 Availability Zone the Pool is located in. + /// Network properties of the storage pool. + /// Total bandwidth provisioned for the pool, in MB/s. + /// Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to. + /// , or is null. + public PureStoragePoolProperties(string availabilityZone, PureStoragePoolVnetInjection vnetInjection, long provisionedBandwidthMbPerSec, ResourceIdentifier reservationResourceId) + { + Argument.AssertNotNull(availabilityZone, nameof(availabilityZone)); + Argument.AssertNotNull(vnetInjection, nameof(vnetInjection)); + Argument.AssertNotNull(reservationResourceId, nameof(reservationResourceId)); + + AvailabilityZone = availabilityZone; + VnetInjection = vnetInjection; + ProvisionedBandwidthMbPerSec = provisionedBandwidthMbPerSec; + ReservationResourceId = reservationResourceId; + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID of the storage pool. + /// Azure Availability Zone the Pool is located in. + /// Network properties of the storage pool. + /// How long a destroyed object is kept before being eradicated, in seconds. + /// Total bandwidth provisioned for the pool, in MB/s. + /// Total I/O operations per second (IOPS) provisioned for the pool. + /// AVS connection state summary. + /// Provisioning state of the resource. + /// Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to. + /// Keeps track of any properties unknown to the library. + internal PureStoragePoolProperties(string storagePoolInternalId, string availabilityZone, PureStoragePoolVnetInjection vnetInjection, long? dataRetentionPeriod, long provisionedBandwidthMbPerSec, long? provisionedIops, PureStorageAvs avs, PureStorageProvisioningState? provisioningState, ResourceIdentifier reservationResourceId, IDictionary serializedAdditionalRawData) + { + StoragePoolInternalId = storagePoolInternalId; + AvailabilityZone = availabilityZone; + VnetInjection = vnetInjection; + DataRetentionPeriod = dataRetentionPeriod; + ProvisionedBandwidthMbPerSec = provisionedBandwidthMbPerSec; + ProvisionedIops = provisionedIops; + Avs = avs; + ProvisioningState = provisioningState; + ReservationResourceId = reservationResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStoragePoolProperties() + { + } + + /// Pure Storage's internal ID of the storage pool. + public string StoragePoolInternalId { get; } + /// Azure Availability Zone the Pool is located in. + public string AvailabilityZone { get; set; } + /// Network properties of the storage pool. + public PureStoragePoolVnetInjection VnetInjection { get; set; } + /// How long a destroyed object is kept before being eradicated, in seconds. + public long? DataRetentionPeriod { get; } + /// Total bandwidth provisioned for the pool, in MB/s. + public long ProvisionedBandwidthMbPerSec { get; set; } + /// Total I/O operations per second (IOPS) provisioned for the pool. + public long? ProvisionedIops { get; } + /// AVS connection state summary. + public PureStorageAvs Avs { get; } + /// Provisioning state of the resource. + public PureStorageProvisioningState? ProvisioningState { get; } + /// Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to. + public ResourceIdentifier ReservationResourceId { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.Serialization.cs new file mode 100644 index 000000000000..a21258c2c3fa --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.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.PureStorageBlock.Models +{ + public partial class PureStoragePoolVnetInjection : 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(PureStoragePoolVnetInjection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + writer.WritePropertyName("vnetId"u8); + writer.WriteStringValue(VnetId); + 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 + } + } + } + + PureStoragePoolVnetInjection 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(PureStoragePoolVnetInjection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStoragePoolVnetInjection(document.RootElement, options); + } + + internal static PureStoragePoolVnetInjection DeserializePureStoragePoolVnetInjection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subnetId"u8)) + { + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStoragePoolVnetInjection(subnetId, vnetId, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStoragePoolVnetInjection)} does not support writing '{options.Format}' format."); + } + } + + PureStoragePoolVnetInjection 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 DeserializePureStoragePoolVnetInjection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStoragePoolVnetInjection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.cs new file mode 100644 index 000000000000..731ee90b4b08 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStoragePoolVnetInjection.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.PureStorageBlock.Models +{ + /// Network in which the storage pool will be made available. + public partial class PureStoragePoolVnetInjection + { + /// + /// 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 of the Virtual Network subnet where the storage pool will be connected. + /// Azure resource ID of the Virtual Network in which the subnet is located. + /// or is null. + public PureStoragePoolVnetInjection(ResourceIdentifier subnetId, ResourceIdentifier vnetId) + { + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(vnetId, nameof(vnetId)); + + SubnetId = subnetId; + VnetId = vnetId; + } + + /// Initializes a new instance of . + /// Azure resource ID of the Virtual Network subnet where the storage pool will be connected. + /// Azure resource ID of the Virtual Network in which the subnet is located. + /// Keeps track of any properties unknown to the library. + internal PureStoragePoolVnetInjection(ResourceIdentifier subnetId, ResourceIdentifier vnetId, IDictionary serializedAdditionalRawData) + { + SubnetId = subnetId; + VnetId = vnetId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStoragePoolVnetInjection() + { + } + + /// Azure resource ID of the Virtual Network subnet where the storage pool will be connected. + public ResourceIdentifier SubnetId { get; set; } + /// Azure resource ID of the Virtual Network in which the subnet is located. + public ResourceIdentifier VnetId { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageProvisioningState.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageProvisioningState.cs new file mode 100644 index 000000000000..0ee59d80df1e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageProvisioningState.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// The status of the current operation. + public readonly partial struct PureStorageProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageProvisioningState(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"; + private const string AcceptedValue = "Accepted"; + + /// Resource has been created. + public static PureStorageProvisioningState Succeeded { get; } = new PureStorageProvisioningState(SucceededValue); + /// Resource creation failed. + public static PureStorageProvisioningState Failed { get; } = new PureStorageProvisioningState(FailedValue); + /// Resource creation was canceled. + public static PureStorageProvisioningState Canceled { get; } = new PureStorageProvisioningState(CanceledValue); + /// Deletion in progress. + public static PureStorageProvisioningState Deleting { get; } = new PureStorageProvisioningState(DeletingValue); + /// Change accepted for processing. + public static PureStorageProvisioningState Accepted { get; } = new PureStorageProvisioningState(AcceptedValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageProvisioningState left, PureStorageProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageProvisioningState left, PureStorageProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageProvisioningState(string value) => new PureStorageProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageProvisioningState other && Equals(other); + /// + public bool Equals(PureStorageProvisioningState 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.Serialization.cs new file mode 100644 index 000000000000..de0d617a8b59 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.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.PureStorageBlock.Models +{ + public partial class PureStorageReservationPatch : 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(PureStorageReservationPatch)} 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 + } + } + } + + PureStorageReservationPatch 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(PureStorageReservationPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageReservationPatch(document.RootElement, options); + } + + internal static PureStorageReservationPatch DeserializePureStorageReservationPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + ReservationUpdateProperties 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 = ReservationUpdateProperties.DeserializeReservationUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageReservationPatch(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageReservationPatch)} does not support writing '{options.Format}' format."); + } + } + + PureStorageReservationPatch 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 DeserializePureStorageReservationPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageReservationPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.cs new file mode 100644 index 000000000000..c5177c450126 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationPatch.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.PureStorageBlock.Models +{ + /// The type used for update operations of the Reservation. + public partial class PureStorageReservationPatch + { + /// + /// 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 PureStorageReservationPatch() + { + 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 PureStorageReservationPatch(IDictionary tags, ReservationUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal ReservationUpdateProperties Properties { get; set; } + /// User details. + public PureStorageUserDetails ReservationUpdateUser + { + get => Properties is null ? default : Properties.User; + set + { + if (Properties is null) + Properties = new ReservationUpdateProperties(); + Properties.User = value; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.Serialization.cs new file mode 100644 index 000000000000..99bbab6bd3b7 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.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.PureStorageBlock.Models +{ + public partial class PureStorageReservationProperties : 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(PureStorageReservationProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ReservationInternalId)) + { + writer.WritePropertyName("reservationInternalId"u8); + writer.WriteStringValue(ReservationInternalId); + } + writer.WritePropertyName("marketplace"u8); + writer.WriteObjectValue(Marketplace, options); + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, 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 + } + } + } + + PureStorageReservationProperties 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(PureStorageReservationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageReservationProperties(document.RootElement, options); + } + + internal static PureStorageReservationProperties DeserializePureStorageReservationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string reservationInternalId = default; + PureStorageMarketplaceDetails marketplace = default; + PureStorageUserDetails user = default; + PureStorageProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("reservationInternalId"u8)) + { + reservationInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("marketplace"u8)) + { + marketplace = PureStorageMarketplaceDetails.DeserializePureStorageMarketplaceDetails(property.Value, options); + continue; + } + if (property.NameEquals("user"u8)) + { + user = PureStorageUserDetails.DeserializePureStorageUserDetails(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PureStorageProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageReservationProperties(reservationInternalId, marketplace, user, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageReservationProperties)} does not support writing '{options.Format}' format."); + } + } + + PureStorageReservationProperties 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 DeserializePureStorageReservationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageReservationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.cs new file mode 100644 index 000000000000..9f7e8dc53448 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageReservationProperties.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.PureStorageBlock.Models +{ + /// Properties of a Reservation resource. + public partial class PureStorageReservationProperties + { + /// + /// 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 . + /// Marketplace details. + /// User details. + /// or is null. + public PureStorageReservationProperties(PureStorageMarketplaceDetails marketplace, PureStorageUserDetails user) + { + Argument.AssertNotNull(marketplace, nameof(marketplace)); + Argument.AssertNotNull(user, nameof(user)); + + Marketplace = marketplace; + User = user; + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the reservation. + /// Marketplace details. + /// User details. + /// Provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageReservationProperties(string reservationInternalId, PureStorageMarketplaceDetails marketplace, PureStorageUserDetails user, PureStorageProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ReservationInternalId = reservationInternalId; + Marketplace = marketplace; + User = user; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageReservationProperties() + { + } + + /// Pure Storage's internal ID for the reservation. + public string ReservationInternalId { get; } + /// Marketplace details. + public PureStorageMarketplaceDetails Marketplace { get; set; } + /// User details. + public PureStorageUserDetails User { get; set; } + /// Provisioning state of the resource. + public PureStorageProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.Serialization.cs new file mode 100644 index 000000000000..b5891207a8d9 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.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; +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public partial class PureStorageResourceLimitDetails : 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(PureStorageResourceLimitDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("storagePool"u8); + writer.WriteObjectValue(StoragePool, options); + writer.WritePropertyName("volume"u8); + writer.WriteObjectValue(Volume, options); + writer.WritePropertyName("protectionPolicy"u8); + writer.WriteObjectValue(ProtectionPolicy, options); + writer.WritePropertyName("performancePolicy"u8); + writer.WriteObjectValue(PerformancePolicy, 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 + } + } + } + + PureStorageResourceLimitDetails 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(PureStorageResourceLimitDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageResourceLimitDetails(document.RootElement, options); + } + + internal static PureStorageResourceLimitDetails DeserializePureStorageResourceLimitDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + StoragePoolLimits storagePool = default; + VolumeLimits volume = default; + ProtectionPolicyLimits protectionPolicy = default; + PerformancePolicyLimits performancePolicy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storagePool"u8)) + { + storagePool = StoragePoolLimits.DeserializeStoragePoolLimits(property.Value, options); + continue; + } + if (property.NameEquals("volume"u8)) + { + volume = VolumeLimits.DeserializeVolumeLimits(property.Value, options); + continue; + } + if (property.NameEquals("protectionPolicy"u8)) + { + protectionPolicy = ProtectionPolicyLimits.DeserializeProtectionPolicyLimits(property.Value, options); + continue; + } + if (property.NameEquals("performancePolicy"u8)) + { + performancePolicy = PerformancePolicyLimits.DeserializePerformancePolicyLimits(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageResourceLimitDetails(storagePool, volume, protectionPolicy, performancePolicy, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageResourceLimitDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageResourceLimitDetails 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 DeserializePureStorageResourceLimitDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageResourceLimitDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.cs new file mode 100644 index 000000000000..8439787795fe --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceLimitDetails.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Limits constraining certain resource properties. + public partial class PureStorageResourceLimitDetails + { + /// + /// 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 . + /// Limits used for storage pool resources. + /// Limits used for volume resources. + /// internal. + /// internal. + /// , , or is null. + internal PureStorageResourceLimitDetails(StoragePoolLimits storagePool, VolumeLimits volume, ProtectionPolicyLimits protectionPolicy, PerformancePolicyLimits performancePolicy) + { + Argument.AssertNotNull(storagePool, nameof(storagePool)); + Argument.AssertNotNull(volume, nameof(volume)); + Argument.AssertNotNull(protectionPolicy, nameof(protectionPolicy)); + Argument.AssertNotNull(performancePolicy, nameof(performancePolicy)); + + StoragePool = storagePool; + Volume = volume; + ProtectionPolicy = protectionPolicy; + PerformancePolicy = performancePolicy; + } + + /// Initializes a new instance of . + /// Limits used for storage pool resources. + /// Limits used for volume resources. + /// internal. + /// internal. + /// Keeps track of any properties unknown to the library. + internal PureStorageResourceLimitDetails(StoragePoolLimits storagePool, VolumeLimits volume, ProtectionPolicyLimits protectionPolicy, PerformancePolicyLimits performancePolicy, IDictionary serializedAdditionalRawData) + { + StoragePool = storagePool; + Volume = volume; + ProtectionPolicy = protectionPolicy; + PerformancePolicy = performancePolicy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageResourceLimitDetails() + { + } + + /// Limits used for storage pool resources. + public StoragePoolLimits StoragePool { get; } + /// Limits used for volume resources. + internal VolumeLimits Volume { get; } + /// Provisioned size limits for a volume, in bytes. + public PropertyValueRangeLimits VolumeProvisionedSize + { + get => Volume?.ProvisionedSize; + } + + /// internal. + public ProtectionPolicyLimits ProtectionPolicy { get; } + /// internal. + public PerformancePolicyLimits PerformancePolicy { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceProvisioningState.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceProvisioningState.cs new file mode 100644 index 000000000000..de618f96bf1d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageResourceProvisioningState.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.PureStorageBlock.Models +{ + /// The provisioning state of a resource type. + public readonly partial struct PureStorageResourceProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PureStorageResourceProvisioningState(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 PureStorageResourceProvisioningState Succeeded { get; } = new PureStorageResourceProvisioningState(SucceededValue); + /// Resource creation failed. + public static PureStorageResourceProvisioningState Failed { get; } = new PureStorageResourceProvisioningState(FailedValue); + /// Resource creation was canceled. + public static PureStorageResourceProvisioningState Canceled { get; } = new PureStorageResourceProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(PureStorageResourceProvisioningState left, PureStorageResourceProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PureStorageResourceProvisioningState left, PureStorageResourceProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PureStorageResourceProvisioningState(string value) => new PureStorageResourceProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PureStorageResourceProvisioningState other && Equals(other); + /// + public bool Equals(PureStorageResourceProvisioningState 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.Serialization.cs new file mode 100644 index 000000000000..3e51b5edfd08 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.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.PureStorageBlock.Models +{ + public partial class PureStorageSoftDeletionState : 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(PureStorageSoftDeletionState)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("destroyed"u8); + writer.WriteBooleanValue(IsDestroyed); + if (options.Format != "W" && Optional.IsDefined(EradicatedOn)) + { + writer.WritePropertyName("eradicationTimestamp"u8); + writer.WriteStringValue(EradicatedOn.Value, "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 + } + } + } + + PureStorageSoftDeletionState 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(PureStorageSoftDeletionState)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageSoftDeletionState(document.RootElement, options); + } + + internal static PureStorageSoftDeletionState DeserializePureStorageSoftDeletionState(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool destroyed = default; + DateTimeOffset? eradicationTimestamp = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destroyed"u8)) + { + destroyed = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("eradicationTimestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + eradicationTimestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageSoftDeletionState(destroyed, eradicationTimestamp, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageSoftDeletionState)} does not support writing '{options.Format}' format."); + } + } + + PureStorageSoftDeletionState 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 DeserializePureStorageSoftDeletionState(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageSoftDeletionState)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.cs new file mode 100644 index 000000000000..65b4f2676d41 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSoftDeletionState.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.PureStorageBlock.Models +{ + /// Soft-deletion state. + public partial class PureStorageSoftDeletionState + { + /// + /// 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 . + /// If false, the resource is active; if true, the resource has been destroyed; resources can be soft-deleted by setting destroyed to true, and recovered by setting it to false. + public PureStorageSoftDeletionState(bool isDestroyed) + { + IsDestroyed = isDestroyed; + } + + /// Initializes a new instance of . + /// If false, the resource is active; if true, the resource has been destroyed; resources can be soft-deleted by setting destroyed to true, and recovered by setting it to false. + /// Date at which the resource will be eradicated and impossible to recover, as an RFC 3339 timestamp; invalid if destroyed is false;. + /// Keeps track of any properties unknown to the library. + internal PureStorageSoftDeletionState(bool isDestroyed, DateTimeOffset? eradicatedOn, IDictionary serializedAdditionalRawData) + { + IsDestroyed = isDestroyed; + EradicatedOn = eradicatedOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageSoftDeletionState() + { + } + + /// If false, the resource is active; if true, the resource has been destroyed; resources can be soft-deleted by setting destroyed to true, and recovered by setting it to false. + public bool IsDestroyed { get; set; } + /// Date at which the resource will be eradicated and impossible to recover, as an RFC 3339 timestamp; invalid if destroyed is false;. + public DateTimeOffset? EradicatedOn { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.Serialization.cs new file mode 100644 index 000000000000..c4544592554c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.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; +using Azure.Core; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + public partial class PureStorageSpaceUsage : 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(PureStorageSpaceUsage)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalUsed"u8); + writer.WriteNumberValue(TotalUsed); + writer.WritePropertyName("unique"u8); + writer.WriteNumberValue(Unique); + writer.WritePropertyName("snapshots"u8); + writer.WriteNumberValue(Snapshots); + writer.WritePropertyName("shared"u8); + writer.WriteNumberValue(Shared); + 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 + } + } + } + + PureStorageSpaceUsage 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(PureStorageSpaceUsage)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageSpaceUsage(document.RootElement, options); + } + + internal static PureStorageSpaceUsage DeserializePureStorageSpaceUsage(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long totalUsed = default; + long unique = default; + long snapshots = default; + long shared = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalUsed"u8)) + { + totalUsed = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("unique"u8)) + { + unique = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("snapshots"u8)) + { + snapshots = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("shared"u8)) + { + shared = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageSpaceUsage(totalUsed, unique, snapshots, shared, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageSpaceUsage)} does not support writing '{options.Format}' format."); + } + } + + PureStorageSpaceUsage 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 DeserializePureStorageSpaceUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageSpaceUsage)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.cs new file mode 100644 index 000000000000..c79080ce2683 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageSpaceUsage.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.PureStorageBlock.Models +{ + /// Storage space usage. + public partial class PureStorageSpaceUsage + { + /// + /// 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 . + /// Total space occupied by customer data (i.e., being billed for), in bytes. + /// Unique space occupied by customer data, in bytes; for a volume, this is the amount of storage that would be freed by deleting the volume, since snapshot and shared data would be kept. + /// Space occupied by data unique to one or more snapshots, in bytes. + /// Space occupied by duplicated data, meaning data shared with other volumes and snapshots as a result of data deduplication, in bytes. + internal PureStorageSpaceUsage(long totalUsed, long unique, long snapshots, long shared) + { + TotalUsed = totalUsed; + Unique = unique; + Snapshots = snapshots; + Shared = shared; + } + + /// Initializes a new instance of . + /// Total space occupied by customer data (i.e., being billed for), in bytes. + /// Unique space occupied by customer data, in bytes; for a volume, this is the amount of storage that would be freed by deleting the volume, since snapshot and shared data would be kept. + /// Space occupied by data unique to one or more snapshots, in bytes. + /// Space occupied by duplicated data, meaning data shared with other volumes and snapshots as a result of data deduplication, in bytes. + /// Keeps track of any properties unknown to the library. + internal PureStorageSpaceUsage(long totalUsed, long unique, long snapshots, long shared, IDictionary serializedAdditionalRawData) + { + TotalUsed = totalUsed; + Unique = unique; + Snapshots = snapshots; + Shared = shared; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageSpaceUsage() + { + } + + /// Total space occupied by customer data (i.e., being billed for), in bytes. + public long TotalUsed { get; } + /// Unique space occupied by customer data, in bytes; for a volume, this is the amount of storage that would be freed by deleting the volume, since snapshot and shared data would be kept. + public long Unique { get; } + /// Space occupied by data unique to one or more snapshots, in bytes. + public long Snapshots { get; } + /// Space occupied by duplicated data, meaning data shared with other volumes and snapshots as a result of data deduplication, in bytes. + public long Shared { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.Serialization.cs new file mode 100644 index 000000000000..d61052040de7 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.Serialization.cs @@ -0,0 +1,186 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageUserDetails : 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(PureStorageUserDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("firstName"u8); + writer.WriteStringValue(FirstName); + writer.WritePropertyName("lastName"u8); + writer.WriteStringValue(LastName); + writer.WritePropertyName("emailAddress"u8); + writer.WriteStringValue(EmailAddress); + if (Optional.IsDefined(Upn)) + { + writer.WritePropertyName("upn"u8); + writer.WriteStringValue(Upn); + } + if (Optional.IsDefined(PhoneNumber)) + { + writer.WritePropertyName("phoneNumber"u8); + writer.WriteStringValue(PhoneNumber); + } + if (Optional.IsDefined(CompanyDetails)) + { + writer.WritePropertyName("companyDetails"u8); + writer.WriteObjectValue(CompanyDetails, 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 + } + } + } + + PureStorageUserDetails 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(PureStorageUserDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageUserDetails(document.RootElement, options); + } + + internal static PureStorageUserDetails DeserializePureStorageUserDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string firstName = default; + string lastName = default; + string emailAddress = default; + string upn = default; + string phoneNumber = default; + PureStorageCompanyDetails companyDetails = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("firstName"u8)) + { + firstName = property.Value.GetString(); + continue; + } + if (property.NameEquals("lastName"u8)) + { + lastName = property.Value.GetString(); + continue; + } + if (property.NameEquals("emailAddress"u8)) + { + emailAddress = property.Value.GetString(); + continue; + } + if (property.NameEquals("upn"u8)) + { + upn = property.Value.GetString(); + continue; + } + if (property.NameEquals("phoneNumber"u8)) + { + phoneNumber = property.Value.GetString(); + continue; + } + if (property.NameEquals("companyDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + companyDetails = PureStorageCompanyDetails.DeserializePureStorageCompanyDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageUserDetails( + firstName, + lastName, + emailAddress, + upn, + phoneNumber, + companyDetails, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageUserDetails)} does not support writing '{options.Format}' format."); + } + } + + PureStorageUserDetails 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 DeserializePureStorageUserDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageUserDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.cs new file mode 100644 index 000000000000..f3b7e97b3a0d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageUserDetails.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// User details. + public partial class PureStorageUserDetails + { + /// + /// 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 . + /// First name. + /// Last name. + /// Email address. + /// , or is null. + public PureStorageUserDetails(string firstName, string lastName, string emailAddress) + { + Argument.AssertNotNull(firstName, nameof(firstName)); + Argument.AssertNotNull(lastName, nameof(lastName)); + Argument.AssertNotNull(emailAddress, nameof(emailAddress)); + + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + } + + /// Initializes a new instance of . + /// First name. + /// Last name. + /// Email address. + /// Principal name. + /// Phone number. + /// Company details. + /// Keeps track of any properties unknown to the library. + internal PureStorageUserDetails(string firstName, string lastName, string emailAddress, string upn, string phoneNumber, PureStorageCompanyDetails companyDetails, IDictionary serializedAdditionalRawData) + { + FirstName = firstName; + LastName = lastName; + EmailAddress = emailAddress; + Upn = upn; + PhoneNumber = phoneNumber; + CompanyDetails = companyDetails; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageUserDetails() + { + } + + /// First name. + public string FirstName { get; set; } + /// Last name. + public string LastName { get; set; } + /// Email address. + public string EmailAddress { get; set; } + /// Principal name. + public string Upn { get; set; } + /// Phone number. + public string PhoneNumber { get; set; } + /// Company details. + public PureStorageCompanyDetails CompanyDetails { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.Serialization.cs new file mode 100644 index 000000000000..ff7519a2a74f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.Serialization.cs @@ -0,0 +1,272 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class PureStorageVolumeProperties : 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(PureStorageVolumeProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(StoragePoolInternalId)) + { + writer.WritePropertyName("storagePoolInternalId"u8); + writer.WriteStringValue(StoragePoolInternalId); + } + if (options.Format != "W" && Optional.IsDefined(StoragePoolResourceId)) + { + writer.WritePropertyName("storagePoolResourceId"u8); + writer.WriteStringValue(StoragePoolResourceId); + } + if (options.Format != "W" && Optional.IsDefined(VolumeInternalId)) + { + writer.WritePropertyName("volumeInternalId"u8); + writer.WriteStringValue(VolumeInternalId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (options.Format != "W" && Optional.IsDefined(Space)) + { + writer.WritePropertyName("space"u8); + writer.WriteObjectValue(Space, options); + } + writer.WritePropertyName("softDeletion"u8); + writer.WriteObjectValue(SoftDeletion, options); + if (options.Format != "W" && Optional.IsDefined(CreatedTimestamp)) + { + writer.WritePropertyName("createdTimestamp"u8); + writer.WriteStringValue(CreatedTimestamp); + } + if (options.Format != "W" && Optional.IsDefined(ProvisionedSize)) + { + writer.WritePropertyName("provisionedSize"u8); + writer.WriteNumberValue(ProvisionedSize.Value); + } + if (options.Format != "W" && Optional.IsDefined(VolumeType)) + { + writer.WritePropertyName("volumeType"u8); + writer.WriteStringValue(VolumeType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Avs)) + { + writer.WritePropertyName("avs"u8); + writer.WriteObjectValue(Avs, 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 + } + } + } + + PureStorageVolumeProperties 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(PureStorageVolumeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageVolumeProperties(document.RootElement, options); + } + + internal static PureStorageVolumeProperties DeserializePureStorageVolumeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string storagePoolInternalId = default; + ResourceIdentifier storagePoolResourceId = default; + string volumeInternalId = default; + string displayName = default; + PureStorageSpaceUsage space = default; + PureStorageSoftDeletionState softDeletion = default; + string createdTimestamp = default; + long? provisionedSize = default; + PureStorageAvsVmVolumeType? volumeType = default; + PureStorageAvsDiskDetails avs = default; + PureStorageResourceProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("storagePoolInternalId"u8)) + { + storagePoolInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("storagePoolResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + storagePoolResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("volumeInternalId"u8)) + { + volumeInternalId = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("space"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + space = PureStorageSpaceUsage.DeserializePureStorageSpaceUsage(property.Value, options); + continue; + } + if (property.NameEquals("softDeletion"u8)) + { + softDeletion = PureStorageSoftDeletionState.DeserializePureStorageSoftDeletionState(property.Value, options); + continue; + } + if (property.NameEquals("createdTimestamp"u8)) + { + createdTimestamp = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionedSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisionedSize = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("volumeType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + volumeType = new PureStorageAvsVmVolumeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("avs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + avs = PureStorageAvsDiskDetails.DeserializePureStorageAvsDiskDetails(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new PureStorageResourceProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageVolumeProperties( + storagePoolInternalId, + storagePoolResourceId, + volumeInternalId, + displayName, + space, + softDeletion, + createdTimestamp, + provisionedSize, + volumeType, + avs, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageVolumeProperties)} does not support writing '{options.Format}' format."); + } + } + + PureStorageVolumeProperties 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 DeserializePureStorageVolumeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageVolumeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.cs new file mode 100644 index 000000000000..8ca24a5fe2e7 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/PureStorageVolumeProperties.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.PureStorageBlock.Models +{ + /// Volume properties. + public partial class PureStorageVolumeProperties + { + /// + /// 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 . + /// Volume's soft-deletion state. + /// is null. + internal PureStorageVolumeProperties(PureStorageSoftDeletionState softDeletion) + { + Argument.AssertNotNull(softDeletion, nameof(softDeletion)); + + SoftDeletion = softDeletion; + } + + /// Initializes a new instance of . + /// Pure Storage's internal ID for the storage pool containing the volume. + /// Azure Resource ID of the storage pool containing this volume. + /// Pure Storage's internal ID for the volume. + /// Human-readable name of the volume. + /// Storage space usage. + /// Volume's soft-deletion state. + /// Volume creation date, as an RFC 3339 timestamp. + /// Currently provisioned size of the volume, in bytes. + /// Specify which control plane handles the lifecycle of the volume. + /// AVS-specific volume information. + /// Provisioning state of the resource. + /// Keeps track of any properties unknown to the library. + internal PureStorageVolumeProperties(string storagePoolInternalId, ResourceIdentifier storagePoolResourceId, string volumeInternalId, string displayName, PureStorageSpaceUsage space, PureStorageSoftDeletionState softDeletion, string createdTimestamp, long? provisionedSize, PureStorageAvsVmVolumeType? volumeType, PureStorageAvsDiskDetails avs, PureStorageResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + StoragePoolInternalId = storagePoolInternalId; + StoragePoolResourceId = storagePoolResourceId; + VolumeInternalId = volumeInternalId; + DisplayName = displayName; + Space = space; + SoftDeletion = softDeletion; + CreatedTimestamp = createdTimestamp; + ProvisionedSize = provisionedSize; + VolumeType = volumeType; + Avs = avs; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageVolumeProperties() + { + } + + /// Pure Storage's internal ID for the storage pool containing the volume. + public string StoragePoolInternalId { get; } + /// Azure Resource ID of the storage pool containing this volume. + public ResourceIdentifier StoragePoolResourceId { get; } + /// Pure Storage's internal ID for the volume. + public string VolumeInternalId { get; } + /// Human-readable name of the volume. + public string DisplayName { get; } + /// Storage space usage. + public PureStorageSpaceUsage Space { get; } + /// Volume's soft-deletion state. + public PureStorageSoftDeletionState SoftDeletion { get; } + /// Volume creation date, as an RFC 3339 timestamp. + public string CreatedTimestamp { get; } + /// Currently provisioned size of the volume, in bytes. + public long? ProvisionedSize { get; } + /// Specify which control plane handles the lifecycle of the volume. + public PureStorageAvsVmVolumeType? VolumeType { get; } + /// AVS-specific volume information. + public PureStorageAvsDiskDetails Avs { get; } + /// Provisioning state of the resource. + public PureStorageResourceProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.Serialization.cs new file mode 100644 index 000000000000..848028faf1f3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) 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.PureStorageBlock.Models +{ + public partial class ReservationBillingStatus : 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(ReservationBillingStatus)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp); + writer.WritePropertyName("totalUsedCapacityReported"u8); + writer.WriteNumberValue(TotalUsedCapacityReported); + writer.WritePropertyName("lowDrrPoolCount"u8); + writer.WriteNumberValue(LowDrrPoolCount); + writer.WritePropertyName("drrWeightedAverage"u8); + writer.WriteNumberValue(DrrWeightedAverage); + writer.WritePropertyName("totalNonReducibleReported"u8); + writer.WriteNumberValue(TotalNonReducibleReported); + writer.WritePropertyName("extraUsedCapacityNonReducible"u8); + writer.WriteNumberValue(ExtraUsedCapacityNonReducible); + writer.WritePropertyName("extraUsedCapacityLowUsageRounding"u8); + writer.WriteNumberValue(ExtraUsedCapacityLowUsageRounding); + writer.WritePropertyName("extraUsedCapacityNonReduciblePlanDiscount"u8); + writer.WriteNumberValue(ExtraUsedCapacityNonReduciblePlanDiscount); + writer.WritePropertyName("totalUsedCapacityBilled"u8); + writer.WriteNumberValue(TotalUsedCapacityBilled); + writer.WritePropertyName("totalUsedCapacityIncludedPlan"u8); + writer.WriteNumberValue(TotalUsedCapacityIncludedPlan); + writer.WritePropertyName("totalUsedCapacityOverage"u8); + writer.WriteNumberValue(TotalUsedCapacityOverage); + writer.WritePropertyName("totalPerformanceReported"u8); + writer.WriteNumberValue(TotalPerformanceReported); + writer.WritePropertyName("totalPerformanceIncludedPlan"u8); + writer.WriteNumberValue(TotalPerformanceIncludedPlan); + writer.WritePropertyName("totalPerformanceOverage"u8); + writer.WriteNumberValue(TotalPerformanceOverage); + 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 + } + } + } + + ReservationBillingStatus 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(ReservationBillingStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReservationBillingStatus(document.RootElement, options); + } + + internal static ReservationBillingStatus DeserializeReservationBillingStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string timestamp = default; + long totalUsedCapacityReported = default; + int lowDrrPoolCount = default; + double drrWeightedAverage = default; + long totalNonReducibleReported = default; + long extraUsedCapacityNonReducible = default; + long extraUsedCapacityLowUsageRounding = default; + long extraUsedCapacityNonReduciblePlanDiscount = default; + long totalUsedCapacityBilled = default; + long totalUsedCapacityIncludedPlan = default; + long totalUsedCapacityOverage = default; + long totalPerformanceReported = default; + long totalPerformanceIncludedPlan = default; + long totalPerformanceOverage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timestamp"u8)) + { + timestamp = property.Value.GetString(); + continue; + } + if (property.NameEquals("totalUsedCapacityReported"u8)) + { + totalUsedCapacityReported = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("lowDrrPoolCount"u8)) + { + lowDrrPoolCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("drrWeightedAverage"u8)) + { + drrWeightedAverage = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("totalNonReducibleReported"u8)) + { + totalNonReducibleReported = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("extraUsedCapacityNonReducible"u8)) + { + extraUsedCapacityNonReducible = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("extraUsedCapacityLowUsageRounding"u8)) + { + extraUsedCapacityLowUsageRounding = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("extraUsedCapacityNonReduciblePlanDiscount"u8)) + { + extraUsedCapacityNonReduciblePlanDiscount = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalUsedCapacityBilled"u8)) + { + totalUsedCapacityBilled = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalUsedCapacityIncludedPlan"u8)) + { + totalUsedCapacityIncludedPlan = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalUsedCapacityOverage"u8)) + { + totalUsedCapacityOverage = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalPerformanceReported"u8)) + { + totalPerformanceReported = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalPerformanceIncludedPlan"u8)) + { + totalPerformanceIncludedPlan = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("totalPerformanceOverage"u8)) + { + totalPerformanceOverage = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReservationBillingStatus( + timestamp, + totalUsedCapacityReported, + lowDrrPoolCount, + drrWeightedAverage, + totalNonReducibleReported, + extraUsedCapacityNonReducible, + extraUsedCapacityLowUsageRounding, + extraUsedCapacityNonReduciblePlanDiscount, + totalUsedCapacityBilled, + totalUsedCapacityIncludedPlan, + totalUsedCapacityOverage, + totalPerformanceReported, + totalPerformanceIncludedPlan, + totalPerformanceOverage, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ReservationBillingStatus)} does not support writing '{options.Format}' format."); + } + } + + ReservationBillingStatus 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 DeserializeReservationBillingStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReservationBillingStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.cs new file mode 100644 index 000000000000..1e1139f8e6c2 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingStatus.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.PureStorageBlock.Models +{ + /// Latest billing status for this reservation. + public partial class ReservationBillingStatus + { + /// + /// 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 . + /// Timestamp for the latest update of this billing status, in RFC 3339 format. + /// Total used capacity as reported by associated storage pools. In bytes. + /// How many associated storage pools reported low data reduction ratio (DRR). + /// Weighted average of the data-reduction ratio for all associated pools. + /// The sum of total used capacity for all pools with low DRR, if the DRR penalty applies. In bytes. + /// Extra capacity added because of low DRR storage pools; In bytes. + /// Extra capacity added when rounding up low-usage pools to 30TiB. In bytes. + /// Extra capacity discounted due to plan forgiving some low-DRR usage. In bytes. + /// Total used capacity actually billed. In bytes. + /// Total used capacity included in plan. In bytes. + /// Total used capacity reported at on-demand price. In bytes. + /// The sum of all performance settings across the pools under this reservation. In MB per second. + /// Total performance amount included in plan. In bytes per second. + /// Total performance amount reported at on-demand price. In MB per second. + /// is null. + internal ReservationBillingStatus(string timestamp, long totalUsedCapacityReported, int lowDrrPoolCount, double drrWeightedAverage, long totalNonReducibleReported, long extraUsedCapacityNonReducible, long extraUsedCapacityLowUsageRounding, long extraUsedCapacityNonReduciblePlanDiscount, long totalUsedCapacityBilled, long totalUsedCapacityIncludedPlan, long totalUsedCapacityOverage, long totalPerformanceReported, long totalPerformanceIncludedPlan, long totalPerformanceOverage) + { + Argument.AssertNotNull(timestamp, nameof(timestamp)); + + Timestamp = timestamp; + TotalUsedCapacityReported = totalUsedCapacityReported; + LowDrrPoolCount = lowDrrPoolCount; + DrrWeightedAverage = drrWeightedAverage; + TotalNonReducibleReported = totalNonReducibleReported; + ExtraUsedCapacityNonReducible = extraUsedCapacityNonReducible; + ExtraUsedCapacityLowUsageRounding = extraUsedCapacityLowUsageRounding; + ExtraUsedCapacityNonReduciblePlanDiscount = extraUsedCapacityNonReduciblePlanDiscount; + TotalUsedCapacityBilled = totalUsedCapacityBilled; + TotalUsedCapacityIncludedPlan = totalUsedCapacityIncludedPlan; + TotalUsedCapacityOverage = totalUsedCapacityOverage; + TotalPerformanceReported = totalPerformanceReported; + TotalPerformanceIncludedPlan = totalPerformanceIncludedPlan; + TotalPerformanceOverage = totalPerformanceOverage; + } + + /// Initializes a new instance of . + /// Timestamp for the latest update of this billing status, in RFC 3339 format. + /// Total used capacity as reported by associated storage pools. In bytes. + /// How many associated storage pools reported low data reduction ratio (DRR). + /// Weighted average of the data-reduction ratio for all associated pools. + /// The sum of total used capacity for all pools with low DRR, if the DRR penalty applies. In bytes. + /// Extra capacity added because of low DRR storage pools; In bytes. + /// Extra capacity added when rounding up low-usage pools to 30TiB. In bytes. + /// Extra capacity discounted due to plan forgiving some low-DRR usage. In bytes. + /// Total used capacity actually billed. In bytes. + /// Total used capacity included in plan. In bytes. + /// Total used capacity reported at on-demand price. In bytes. + /// The sum of all performance settings across the pools under this reservation. In MB per second. + /// Total performance amount included in plan. In bytes per second. + /// Total performance amount reported at on-demand price. In MB per second. + /// Keeps track of any properties unknown to the library. + internal ReservationBillingStatus(string timestamp, long totalUsedCapacityReported, int lowDrrPoolCount, double drrWeightedAverage, long totalNonReducibleReported, long extraUsedCapacityNonReducible, long extraUsedCapacityLowUsageRounding, long extraUsedCapacityNonReduciblePlanDiscount, long totalUsedCapacityBilled, long totalUsedCapacityIncludedPlan, long totalUsedCapacityOverage, long totalPerformanceReported, long totalPerformanceIncludedPlan, long totalPerformanceOverage, IDictionary serializedAdditionalRawData) + { + Timestamp = timestamp; + TotalUsedCapacityReported = totalUsedCapacityReported; + LowDrrPoolCount = lowDrrPoolCount; + DrrWeightedAverage = drrWeightedAverage; + TotalNonReducibleReported = totalNonReducibleReported; + ExtraUsedCapacityNonReducible = extraUsedCapacityNonReducible; + ExtraUsedCapacityLowUsageRounding = extraUsedCapacityLowUsageRounding; + ExtraUsedCapacityNonReduciblePlanDiscount = extraUsedCapacityNonReduciblePlanDiscount; + TotalUsedCapacityBilled = totalUsedCapacityBilled; + TotalUsedCapacityIncludedPlan = totalUsedCapacityIncludedPlan; + TotalUsedCapacityOverage = totalUsedCapacityOverage; + TotalPerformanceReported = totalPerformanceReported; + TotalPerformanceIncludedPlan = totalPerformanceIncludedPlan; + TotalPerformanceOverage = totalPerformanceOverage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReservationBillingStatus() + { + } + + /// Timestamp for the latest update of this billing status, in RFC 3339 format. + public string Timestamp { get; } + /// Total used capacity as reported by associated storage pools. In bytes. + public long TotalUsedCapacityReported { get; } + /// How many associated storage pools reported low data reduction ratio (DRR). + public int LowDrrPoolCount { get; } + /// Weighted average of the data-reduction ratio for all associated pools. + public double DrrWeightedAverage { get; } + /// The sum of total used capacity for all pools with low DRR, if the DRR penalty applies. In bytes. + public long TotalNonReducibleReported { get; } + /// Extra capacity added because of low DRR storage pools; In bytes. + public long ExtraUsedCapacityNonReducible { get; } + /// Extra capacity added when rounding up low-usage pools to 30TiB. In bytes. + public long ExtraUsedCapacityLowUsageRounding { get; } + /// Extra capacity discounted due to plan forgiving some low-DRR usage. In bytes. + public long ExtraUsedCapacityNonReduciblePlanDiscount { get; } + /// Total used capacity actually billed. In bytes. + public long TotalUsedCapacityBilled { get; } + /// Total used capacity included in plan. In bytes. + public long TotalUsedCapacityIncludedPlan { get; } + /// Total used capacity reported at on-demand price. In bytes. + public long TotalUsedCapacityOverage { get; } + /// The sum of all performance settings across the pools under this reservation. In MB per second. + public long TotalPerformanceReported { get; } + /// Total performance amount included in plan. In bytes per second. + public long TotalPerformanceIncludedPlan { get; } + /// Total performance amount reported at on-demand price. In MB per second. + public long TotalPerformanceOverage { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.Serialization.cs new file mode 100644 index 000000000000..8454ef409a91 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.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.PureStorageBlock.Models +{ + public partial class ReservationBillingUsageReport : 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(ReservationBillingUsageReport)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp); + writer.WritePropertyName("billingUsageProperties"u8); + writer.WriteStartArray(); + foreach (var item in BillingUsageProperties) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("overallStatusMessage"u8); + writer.WriteStringValue(OverallStatusMessage); + 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 + } + } + } + + ReservationBillingUsageReport 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(ReservationBillingUsageReport)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReservationBillingUsageReport(document.RootElement, options); + } + + internal static ReservationBillingUsageReport DeserializeReservationBillingUsageReport(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string timestamp = default; + IReadOnlyList billingUsageProperties = default; + string overallStatusMessage = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timestamp"u8)) + { + timestamp = property.Value.GetString(); + continue; + } + if (property.NameEquals("billingUsageProperties"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PureStorageBillingUsageProperty.DeserializePureStorageBillingUsageProperty(item, options)); + } + billingUsageProperties = array; + continue; + } + if (property.NameEquals("overallStatusMessage"u8)) + { + overallStatusMessage = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReservationBillingUsageReport(timestamp, billingUsageProperties, overallStatusMessage, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ReservationBillingUsageReport)} does not support writing '{options.Format}' format."); + } + } + + ReservationBillingUsageReport 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 DeserializeReservationBillingUsageReport(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReservationBillingUsageReport)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.cs new file mode 100644 index 000000000000..9df4f5c8a3a1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationBillingUsageReport.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Represents a billing usage report, including overall status and detailed properties. + public partial class ReservationBillingUsageReport + { + /// + /// 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 . + /// Latest formatted billing report for this reservation. + /// A list of detailed billing usage properties. + /// Overall status message of the billing usage report. + /// , or is null. + internal ReservationBillingUsageReport(string timestamp, IEnumerable billingUsageProperties, string overallStatusMessage) + { + Argument.AssertNotNull(timestamp, nameof(timestamp)); + Argument.AssertNotNull(billingUsageProperties, nameof(billingUsageProperties)); + Argument.AssertNotNull(overallStatusMessage, nameof(overallStatusMessage)); + + Timestamp = timestamp; + BillingUsageProperties = billingUsageProperties.ToList(); + OverallStatusMessage = overallStatusMessage; + } + + /// Initializes a new instance of . + /// Latest formatted billing report for this reservation. + /// A list of detailed billing usage properties. + /// Overall status message of the billing usage report. + /// Keeps track of any properties unknown to the library. + internal ReservationBillingUsageReport(string timestamp, IReadOnlyList billingUsageProperties, string overallStatusMessage, IDictionary serializedAdditionalRawData) + { + Timestamp = timestamp; + BillingUsageProperties = billingUsageProperties; + OverallStatusMessage = overallStatusMessage; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReservationBillingUsageReport() + { + } + + /// Latest formatted billing report for this reservation. + public string Timestamp { get; } + /// A list of detailed billing usage properties. + public IReadOnlyList BillingUsageProperties { get; } + /// Overall status message of the billing usage report. + public string OverallStatusMessage { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.Serialization.cs new file mode 100644 index 000000000000..9ea09c6d1ba8 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.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.PureStorageBlock.Models +{ + internal partial class ReservationListResult : 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(ReservationListResult)} 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 + } + } + } + + ReservationListResult 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(ReservationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReservationListResult(document.RootElement, options); + } + + internal static ReservationListResult DeserializeReservationListResult(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(PureStorageReservationData.DeserializePureStorageReservationData(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 ReservationListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ReservationListResult)} does not support writing '{options.Format}' format."); + } + } + + ReservationListResult 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 DeserializeReservationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReservationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.cs new file mode 100644 index 000000000000..440f0d52e106 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationListResult.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.PureStorageBlock.Models +{ + /// The response of a Reservation list operation. + internal partial class ReservationListResult + { + /// + /// 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 Reservation items on this page. + /// is null. + internal ReservationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Reservation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ReservationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ReservationListResult() + { + } + + /// The Reservation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..6ebf3d0f93a8 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.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.PureStorageBlock.Models +{ + internal partial class ReservationUpdateProperties : 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(ReservationUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(User)) + { + writer.WritePropertyName("user"u8); + writer.WriteObjectValue(User, 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 + } + } + } + + ReservationUpdateProperties 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(ReservationUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReservationUpdateProperties(document.RootElement, options); + } + + internal static ReservationUpdateProperties DeserializeReservationUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageUserDetails user = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = PureStorageUserDetails.DeserializePureStorageUserDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReservationUpdateProperties(user, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ReservationUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ReservationUpdateProperties 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 DeserializeReservationUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReservationUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.cs new file mode 100644 index 000000000000..6e16c7e4af6f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ReservationUpdateProperties.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.PureStorageBlock.Models +{ + /// The updatable properties of the Reservation. + internal partial class ReservationUpdateProperties + { + /// + /// 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 ReservationUpdateProperties() + { + } + + /// Initializes a new instance of . + /// User details. + /// Keeps track of any properties unknown to the library. + internal ReservationUpdateProperties(PureStorageUserDetails user, IDictionary serializedAdditionalRawData) + { + User = user; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// User details. + public PureStorageUserDetails User { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.Serialization.cs new file mode 100644 index 000000000000..eb453a3c7983 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.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.PureStorageBlock.Models +{ + public partial class ServiceInitializationHandle : 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(ServiceInitializationHandle)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClusterResourceId)) + { + writer.WritePropertyName("sddcResourceId"u8); + writer.WriteStringValue(ClusterResourceId); + } + if (Optional.IsDefined(ServiceAccountUsername)) + { + writer.WritePropertyName("serviceAccountUsername"u8); + writer.WriteStringValue(ServiceAccountUsername); + } + 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 + } + } + } + + ServiceInitializationHandle 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(ServiceInitializationHandle)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceInitializationHandle(document.RootElement, options); + } + + internal static ServiceInitializationHandle DeserializeServiceInitializationHandle(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier sddcResourceId = default; + string serviceAccountUsername = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sddcResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sddcResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceAccountUsername"u8)) + { + serviceAccountUsername = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceInitializationHandle(sddcResourceId, serviceAccountUsername, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ServiceInitializationHandle)} does not support writing '{options.Format}' format."); + } + } + + ServiceInitializationHandle 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 DeserializeServiceInitializationHandle(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceInitializationHandle)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.cs new file mode 100644 index 000000000000..8052d6c6d836 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationHandle.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.PureStorageBlock.Models +{ + /// Initialization handle used to configure the AVS SDDC to communicate with the storage pool. + public partial class ServiceInitializationHandle + { + /// + /// 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 ServiceInitializationHandle() + { + } + + /// Initializes a new instance of . + /// Azure resource ID of the AVS SDDC the pool is connecting to. + /// Requested service account username. + /// Keeps track of any properties unknown to the library. + internal ServiceInitializationHandle(ResourceIdentifier clusterResourceId, string serviceAccountUsername, IDictionary serializedAdditionalRawData) + { + ClusterResourceId = clusterResourceId; + ServiceAccountUsername = serviceAccountUsername; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure resource ID of the AVS SDDC the pool is connecting to. + public ResourceIdentifier ClusterResourceId { get; } + /// Requested service account username. + public string ServiceAccountUsername { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.Serialization.cs new file mode 100644 index 000000000000..2490f5623b6c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.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.PureStorageBlock.Models +{ + public partial class ServiceInitializationInfo : 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(ServiceInitializationInfo)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServiceAccountUsername)) + { + writer.WritePropertyName("serviceAccountUsername"u8); + writer.WriteStringValue(ServiceAccountUsername); + } + if (Optional.IsDefined(ServiceAccountPassword)) + { + writer.WritePropertyName("serviceAccountPassword"u8); + writer.WriteStringValue(ServiceAccountPassword); + } + if (Optional.IsDefined(VSphereIP)) + { + writer.WritePropertyName("vSphereIp"u8); + writer.WriteStringValue(VSphereIP); + } + if (Optional.IsDefined(VSphereCertificate)) + { + writer.WritePropertyName("vSphereCertificate"u8); + writer.WriteStringValue(VSphereCertificate); + } + 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 + } + } + } + + ServiceInitializationInfo 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(ServiceInitializationInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceInitializationInfo(document.RootElement, options); + } + + internal static ServiceInitializationInfo DeserializeServiceInitializationInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string serviceAccountUsername = default; + string serviceAccountPassword = default; + string vSphereIP = default; + string vSphereCertificate = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceAccountUsername"u8)) + { + serviceAccountUsername = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountPassword"u8)) + { + serviceAccountPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("vSphereIp"u8)) + { + vSphereIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("vSphereCertificate"u8)) + { + vSphereCertificate = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceInitializationInfo(serviceAccountUsername, serviceAccountPassword, vSphereIP, vSphereCertificate, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(ServiceInitializationInfo)} does not support writing '{options.Format}' format."); + } + } + + ServiceInitializationInfo 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 DeserializeServiceInitializationInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceInitializationInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.cs new file mode 100644 index 000000000000..141f80a9976c --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/ServiceInitializationInfo.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; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Explicit service initialization data. + public partial class ServiceInitializationInfo + { + /// + /// 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 ServiceInitializationInfo() + { + } + + /// Initializes a new instance of . + /// Service account username. + /// Service account password. + /// AVS instance's vSphere IP address. + /// AVS instance's vSphere certificate. + /// Keeps track of any properties unknown to the library. + internal ServiceInitializationInfo(string serviceAccountUsername, string serviceAccountPassword, string vSphereIP, string vSphereCertificate, IDictionary serializedAdditionalRawData) + { + ServiceAccountUsername = serviceAccountUsername; + ServiceAccountPassword = serviceAccountPassword; + VSphereIP = vSphereIP; + VSphereCertificate = vSphereCertificate; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Service account username. + public string ServiceAccountUsername { get; set; } + /// Service account password. + public string ServiceAccountPassword { get; set; } + /// AVS instance's vSphere IP address. + public string VSphereIP { get; set; } + /// AVS instance's vSphere certificate. + public string VSphereCertificate { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.Serialization.cs new file mode 100644 index 000000000000..7f195881ff08 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.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.PureStorageBlock.Models +{ + public partial class StoragePoolEnableAvsConnectionContent : 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(StoragePoolEnableAvsConnectionContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("sddcResourceId"u8); + writer.WriteStringValue(ClusterResourceId); + 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 + } + } + } + + StoragePoolEnableAvsConnectionContent 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(StoragePoolEnableAvsConnectionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolEnableAvsConnectionContent(document.RootElement, options); + } + + internal static StoragePoolEnableAvsConnectionContent DeserializeStoragePoolEnableAvsConnectionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier sddcResourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sddcResourceId"u8)) + { + sddcResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StoragePoolEnableAvsConnectionContent(sddcResourceId, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolEnableAvsConnectionContent)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolEnableAvsConnectionContent 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 DeserializeStoragePoolEnableAvsConnectionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolEnableAvsConnectionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.cs new file mode 100644 index 000000000000..7d889d42400f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolEnableAvsConnectionContent.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.PureStorageBlock.Models +{ + /// EnableAvsConnection payload information. + public partial class StoragePoolEnableAvsConnectionContent + { + /// + /// 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 of the AVS SDDC to connect to. + /// is null. + public StoragePoolEnableAvsConnectionContent(ResourceIdentifier clusterResourceId) + { + Argument.AssertNotNull(clusterResourceId, nameof(clusterResourceId)); + + ClusterResourceId = clusterResourceId; + } + + /// Initializes a new instance of . + /// Azure resource ID of the AVS SDDC to connect to. + /// Keeps track of any properties unknown to the library. + internal StoragePoolEnableAvsConnectionContent(ResourceIdentifier clusterResourceId, IDictionary serializedAdditionalRawData) + { + ClusterResourceId = clusterResourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StoragePoolEnableAvsConnectionContent() + { + } + + /// Azure resource ID of the AVS SDDC to connect to. + public ResourceIdentifier ClusterResourceId { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.Serialization.cs new file mode 100644 index 000000000000..4cabdd7f9b98 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.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.PureStorageBlock.Models +{ + public partial class StoragePoolFinalizeAvsConnectionContent : 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(StoragePoolFinalizeAvsConnectionContent)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ServiceInitializationDataEnc)) + { + writer.WritePropertyName("serviceInitializationDataEnc"u8); + writer.WriteStringValue(ServiceInitializationDataEnc); + } + if (Optional.IsDefined(ServiceInitializationData)) + { + writer.WritePropertyName("serviceInitializationData"u8); + writer.WriteObjectValue(ServiceInitializationData, 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 + } + } + } + + StoragePoolFinalizeAvsConnectionContent 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(StoragePoolFinalizeAvsConnectionContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolFinalizeAvsConnectionContent(document.RootElement, options); + } + + internal static StoragePoolFinalizeAvsConnectionContent DeserializeStoragePoolFinalizeAvsConnectionContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string serviceInitializationDataEnc = default; + ServiceInitializationInfo serviceInitializationData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceInitializationDataEnc"u8)) + { + serviceInitializationDataEnc = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceInitializationData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceInitializationData = ServiceInitializationInfo.DeserializeServiceInitializationInfo(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StoragePoolFinalizeAvsConnectionContent(serviceInitializationDataEnc, serviceInitializationData, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolFinalizeAvsConnectionContent)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolFinalizeAvsConnectionContent 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 DeserializeStoragePoolFinalizeAvsConnectionContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolFinalizeAvsConnectionContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.cs new file mode 100644 index 000000000000..6aa129bfe08b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolFinalizeAvsConnectionContent.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.PureStorageBlock.Models +{ + /// FinalizeAvsConnection payload information, either encoded or explicit. + public partial class StoragePoolFinalizeAvsConnectionContent + { + /// + /// 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 StoragePoolFinalizeAvsConnectionContent() + { + } + + /// Initializes a new instance of . + /// Encoded AVS connection information. + /// Explicit AVS connection information. + /// Keeps track of any properties unknown to the library. + internal StoragePoolFinalizeAvsConnectionContent(string serviceInitializationDataEnc, ServiceInitializationInfo serviceInitializationData, IDictionary serializedAdditionalRawData) + { + ServiceInitializationDataEnc = serviceInitializationDataEnc; + ServiceInitializationData = serviceInitializationData; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Encoded AVS connection information. + public string ServiceInitializationDataEnc { get; set; } + /// Explicit AVS connection information. + public ServiceInitializationInfo ServiceInitializationData { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.Serialization.cs new file mode 100644 index 000000000000..3fea5ff7ff1f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.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.PureStorageBlock.Models +{ + public partial class StoragePoolHealthInfo : 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(StoragePoolHealthInfo)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("health"u8); + writer.WriteObjectValue(Health, options); + writer.WritePropertyName("alerts"u8); + writer.WriteStartArray(); + foreach (var item in Alerts) + { + 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 + } + } + } + + StoragePoolHealthInfo 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(StoragePoolHealthInfo)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolHealthInfo(document.RootElement, options); + } + + internal static StoragePoolHealthInfo DeserializeStoragePoolHealthInfo(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageHealthDetails health = default; + IReadOnlyList alerts = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("health"u8)) + { + health = PureStorageHealthDetails.DeserializePureStorageHealthDetails(property.Value, options); + continue; + } + if (property.NameEquals("alerts"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(PureStorageHealthAlert.DeserializePureStorageHealthAlert(item, options)); + } + alerts = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StoragePoolHealthInfo(health, alerts, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolHealthInfo)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolHealthInfo 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 DeserializeStoragePoolHealthInfo(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolHealthInfo)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.cs new file mode 100644 index 000000000000..d3a84dd8717e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolHealthInfo.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.PureStorageBlock.Models +{ + /// Health information for a storage pool. + public partial class StoragePoolHealthInfo + { + /// + /// 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 . + /// Health metrics. + /// List of health alerts. + /// or is null. + internal StoragePoolHealthInfo(PureStorageHealthDetails health, IEnumerable alerts) + { + Argument.AssertNotNull(health, nameof(health)); + Argument.AssertNotNull(alerts, nameof(alerts)); + + Health = health; + Alerts = alerts.ToList(); + } + + /// Initializes a new instance of . + /// Health metrics. + /// List of health alerts. + /// Keeps track of any properties unknown to the library. + internal StoragePoolHealthInfo(PureStorageHealthDetails health, IReadOnlyList alerts, IDictionary serializedAdditionalRawData) + { + Health = health; + Alerts = alerts; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StoragePoolHealthInfo() + { + } + + /// Health metrics. + public PureStorageHealthDetails Health { get; } + /// List of health alerts. + public IReadOnlyList Alerts { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.Serialization.cs new file mode 100644 index 000000000000..f6b633c04ba0 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.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.PureStorageBlock.Models +{ + public partial class StoragePoolLimits : 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(StoragePoolLimits)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("provisionedBandwidthMbPerSec"u8); + writer.WriteObjectValue(ProvisionedBandwidthMbPerSec, options); + writer.WritePropertyName("provisionedIops"u8); + writer.WriteObjectValue(ProvisionedIops, options); + writer.WritePropertyName("physicalAvailabilityZones"u8); + writer.WriteStartArray(); + foreach (var item in PhysicalAvailabilityZones) + { + 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 + } + } + } + + StoragePoolLimits 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(StoragePoolLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolLimits(document.RootElement, options); + } + + internal static StoragePoolLimits DeserializeStoragePoolLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PropertyValueRangeLimits provisionedBandwidthMbPerSec = default; + PropertyValueRangeLimits provisionedIops = default; + IReadOnlyList physicalAvailabilityZones = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisionedBandwidthMbPerSec"u8)) + { + provisionedBandwidthMbPerSec = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (property.NameEquals("provisionedIops"u8)) + { + provisionedIops = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (property.NameEquals("physicalAvailabilityZones"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + physicalAvailabilityZones = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StoragePoolLimits(provisionedBandwidthMbPerSec, provisionedIops, physicalAvailabilityZones, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolLimits)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolLimits 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 DeserializeStoragePoolLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.cs new file mode 100644 index 000000000000..59fdbd1a1fa3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolLimits.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.PureStorageBlock.Models +{ + /// Limits used for storage pool creation. + public partial class StoragePoolLimits + { + /// + /// 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 . + /// Allowed provisioned bandwidth range for a storage pool, in MB/s. + /// Allowed provisioned IOPS range for a storage pool, as a number of operations. + /// List of physical availability zones in the region in which storage pools can be deployed; some Azure regions do not support the necessary resources in all availability zones. + /// , or is null. + internal StoragePoolLimits(PropertyValueRangeLimits provisionedBandwidthMbPerSec, PropertyValueRangeLimits provisionedIops, IEnumerable physicalAvailabilityZones) + { + Argument.AssertNotNull(provisionedBandwidthMbPerSec, nameof(provisionedBandwidthMbPerSec)); + Argument.AssertNotNull(provisionedIops, nameof(provisionedIops)); + Argument.AssertNotNull(physicalAvailabilityZones, nameof(physicalAvailabilityZones)); + + ProvisionedBandwidthMbPerSec = provisionedBandwidthMbPerSec; + ProvisionedIops = provisionedIops; + PhysicalAvailabilityZones = physicalAvailabilityZones.ToList(); + } + + /// Initializes a new instance of . + /// Allowed provisioned bandwidth range for a storage pool, in MB/s. + /// Allowed provisioned IOPS range for a storage pool, as a number of operations. + /// List of physical availability zones in the region in which storage pools can be deployed; some Azure regions do not support the necessary resources in all availability zones. + /// Keeps track of any properties unknown to the library. + internal StoragePoolLimits(PropertyValueRangeLimits provisionedBandwidthMbPerSec, PropertyValueRangeLimits provisionedIops, IReadOnlyList physicalAvailabilityZones, IDictionary serializedAdditionalRawData) + { + ProvisionedBandwidthMbPerSec = provisionedBandwidthMbPerSec; + ProvisionedIops = provisionedIops; + PhysicalAvailabilityZones = physicalAvailabilityZones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StoragePoolLimits() + { + } + + /// Allowed provisioned bandwidth range for a storage pool, in MB/s. + public PropertyValueRangeLimits ProvisionedBandwidthMbPerSec { get; } + /// Allowed provisioned IOPS range for a storage pool, as a number of operations. + public PropertyValueRangeLimits ProvisionedIops { get; } + /// List of physical availability zones in the region in which storage pools can be deployed; some Azure regions do not support the necessary resources in all availability zones. + public IReadOnlyList PhysicalAvailabilityZones { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.Serialization.cs new file mode 100644 index 000000000000..400149abfb93 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.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.PureStorageBlock.Models +{ + internal partial class StoragePoolListResult : 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(StoragePoolListResult)} 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 + } + } + } + + StoragePoolListResult 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(StoragePoolListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolListResult(document.RootElement, options); + } + + internal static StoragePoolListResult DeserializeStoragePoolListResult(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(PureStoragePoolData.DeserializePureStoragePoolData(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 StoragePoolListResult(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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolListResult)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolListResult 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 DeserializeStoragePoolListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.cs new file mode 100644 index 000000000000..c2621bc272f1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolListResult.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.PureStorageBlock.Models +{ + /// The response of a StoragePool list operation. + internal partial class StoragePoolListResult + { + /// + /// 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 StoragePool items on this page. + /// is null. + internal StoragePoolListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The StoragePool items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal StoragePoolListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal StoragePoolListResult() + { + } + + /// The StoragePool items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..660d42c27e3b --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.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.PureStorageBlock.Models +{ + internal partial class StoragePoolUpdateProperties : 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(StoragePoolUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ProvisionedBandwidthMbPerSec)) + { + writer.WritePropertyName("provisionedBandwidthMbPerSec"u8); + writer.WriteNumberValue(ProvisionedBandwidthMbPerSec.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 + } + } + } + + StoragePoolUpdateProperties 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(StoragePoolUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStoragePoolUpdateProperties(document.RootElement, options); + } + + internal static StoragePoolUpdateProperties DeserializeStoragePoolUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? provisionedBandwidthMbPerSec = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisionedBandwidthMbPerSec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisionedBandwidthMbPerSec = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StoragePoolUpdateProperties(provisionedBandwidthMbPerSec, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(StoragePoolUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + StoragePoolUpdateProperties 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 DeserializeStoragePoolUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StoragePoolUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.cs new file mode 100644 index 000000000000..fddde39eb0c4 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/StoragePoolUpdateProperties.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.PureStorageBlock.Models +{ + /// The updatable properties of the StoragePool. + internal partial class StoragePoolUpdateProperties + { + /// + /// 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 StoragePoolUpdateProperties() + { + } + + /// Initializes a new instance of . + /// Total bandwidth provisioned for the pool, in MB/s. + /// Keeps track of any properties unknown to the library. + internal StoragePoolUpdateProperties(long? provisionedBandwidthMbPerSec, IDictionary serializedAdditionalRawData) + { + ProvisionedBandwidthMbPerSec = provisionedBandwidthMbPerSec; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Total bandwidth provisioned for the pool, in MB/s. + public long? ProvisionedBandwidthMbPerSec { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.Serialization.cs new file mode 100644 index 000000000000..3cbed0049d37 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.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.PureStorageBlock.Models +{ + internal partial class VolumeLimits : 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(VolumeLimits)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("provisionedSize"u8); + writer.WriteObjectValue(ProvisionedSize, 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 + } + } + } + + VolumeLimits 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(VolumeLimits)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVolumeLimits(document.RootElement, options); + } + + internal static VolumeLimits DeserializeVolumeLimits(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PropertyValueRangeLimits provisionedSize = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisionedSize"u8)) + { + provisionedSize = PropertyValueRangeLimits.DeserializePropertyValueRangeLimits(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VolumeLimits(provisionedSize, 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(VolumeLimits)} does not support writing '{options.Format}' format."); + } + } + + VolumeLimits 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 DeserializeVolumeLimits(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VolumeLimits)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.cs new file mode 100644 index 000000000000..d34b625fe97d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/Models/VolumeLimits.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.PureStorageBlock.Models +{ + /// Limits used for volumes. + internal partial class VolumeLimits + { + /// + /// 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 . + /// Provisioned size limits for a volume, in bytes. + /// is null. + internal VolumeLimits(PropertyValueRangeLimits provisionedSize) + { + Argument.AssertNotNull(provisionedSize, nameof(provisionedSize)); + + ProvisionedSize = provisionedSize; + } + + /// Initializes a new instance of . + /// Provisioned size limits for a volume, in bytes. + /// Keeps track of any properties unknown to the library. + internal VolumeLimits(PropertyValueRangeLimits provisionedSize, IDictionary serializedAdditionalRawData) + { + ProvisionedSize = provisionedSize; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VolumeLimits() + { + } + + /// Provisioned size limits for a volume, in bytes. + public PropertyValueRangeLimits ProvisionedSize { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ProviderConstants.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..0cd43b19dca0 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerCollection.cs new file mode 100644 index 000000000000..7b87f3cfa441 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStorageAvsStorageContainers method from an instance of . + /// + public partial class PureStorageAvsStorageContainerCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics; + private readonly AvsStorageContainersRestOperations _pureStorageAvsStorageContainerAvsStorageContainersRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsStorageContainerCollection() + { + } + + /// 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 PureStorageAvsStorageContainerCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageAvsStorageContainerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStorageAvsStorageContainerResource.ResourceType, out string pureStorageAvsStorageContainerAvsStorageContainersApiVersion); + _pureStorageAvsStorageContainerAvsStorageContainersRestClient = new AvsStorageContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsStorageContainerAvsStorageContainersApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != PureStoragePoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PureStoragePoolResource.ResourceType), nameof(id)); + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerAvsStorageContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerAvsStorageContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AVS storage containers by storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers + /// + /// + /// Operation Id + /// AvsStorageContainer_ListByStoragePool + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsStorageContainerAvsStorageContainersRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsStorageContainerAvsStorageContainersRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsStorageContainerResource(Client, PureStorageAvsStorageContainerData.DeserializePureStorageAvsStorageContainerData(e)), _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics, Pipeline, "PureStorageAvsStorageContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AVS storage containers by storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers + /// + /// + /// Operation Id + /// AvsStorageContainer_ListByStoragePool + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsStorageContainerAvsStorageContainersRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsStorageContainerAvsStorageContainersRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsStorageContainerResource(Client, PureStorageAvsStorageContainerData.DeserializePureStorageAvsStorageContainerData(e)), _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics, Pipeline, "PureStorageAvsStorageContainerCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerAvsStorageContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.Exists"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerAvsStorageContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerAvsStorageContainersRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerAvsStorageContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, storageContainerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.Serialization.cs new file mode 100644 index 000000000000..f6f3d3ae62cd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStorageAvsStorageContainerData : 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(PureStorageAvsStorageContainerData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PureStorageAvsStorageContainerData 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(PureStorageAvsStorageContainerData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsStorageContainerData(document.RootElement, options); + } + + internal static PureStorageAvsStorageContainerData DeserializePureStorageAvsStorageContainerData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageAvsStorageContainerProperties 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 = PureStorageAvsStorageContainerProperties.DeserializePureStorageAvsStorageContainerProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsStorageContainerData( + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerData)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsStorageContainerData 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 DeserializePureStorageAvsStorageContainerData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.cs new file mode 100644 index 000000000000..3b188a064ba9 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStorageAvsStorageContainer data model. + /// AVS storage container resource type, representing a VMware storage container in a storage pool, which can be associated to and mounted as a datastore + /// + public partial class PureStorageAvsStorageContainerData : 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 PureStorageAvsStorageContainerData() + { + } + + /// 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 PureStorageAvsStorageContainerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PureStorageAvsStorageContainerProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public PureStorageAvsStorageContainerProperties Properties { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.Serialization.cs new file mode 100644 index 000000000000..0863bba62e6e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.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.PureStorageBlock +{ + public partial class PureStorageAvsStorageContainerResource : IJsonModel + { + private static PureStorageAvsStorageContainerData s_dataDeserializationInstance; + private static PureStorageAvsStorageContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStorageAvsStorageContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStorageAvsStorageContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.cs new file mode 100644 index 000000000000..d42bb4712479 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerResource.cs @@ -0,0 +1,324 @@ +// 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.PureStorageBlock +{ + /// + /// A Class representing a PureStorageAvsStorageContainer 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 GetPureStorageAvsStorageContainerResource method. + /// Otherwise you can get one from its parent resource using the GetPureStorageAvsStorageContainer method. + /// + public partial class PureStorageAvsStorageContainerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The storagePoolName. + /// The storageContainerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics; + private readonly AvsStorageContainersRestOperations _pureStorageAvsStorageContainerAvsStorageContainersRestClient; + private readonly PureStorageAvsStorageContainerData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsStorageContainers"; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsStorageContainerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStorageAvsStorageContainerResource(ArmClient client, PureStorageAvsStorageContainerData 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 PureStorageAvsStorageContainerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStorageAvsStorageContainerAvsStorageContainersApiVersion); + _pureStorageAvsStorageContainerAvsStorageContainersRestClient = new AvsStorageContainersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsStorageContainerAvsStorageContainersApiVersion); +#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 PureStorageAvsStorageContainerData 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 PureStorageAvsStorageContainerVolumeResources in the PureStorageAvsStorageContainer. + /// An object representing collection of PureStorageAvsStorageContainerVolumeResources and their operations over a PureStorageAvsStorageContainerVolumeResource. + public virtual PureStorageAvsStorageContainerVolumeCollection GetPureStorageAvsStorageContainerVolumes() + { + return GetCachedClient(client => new PureStorageAvsStorageContainerVolumeCollection(client, Id)); + } + + /// + /// Get a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStorageAvsStorageContainerVolumeAsync(string volumeId, CancellationToken cancellationToken = default) + { + return await GetPureStorageAvsStorageContainerVolumes().GetAsync(volumeId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStorageAvsStorageContainerVolume(string volumeId, CancellationToken cancellationToken = default) + { + return GetPureStorageAvsStorageContainerVolumes().Get(volumeId, cancellationToken); + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerResource.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerAvsStorageContainersRestClient.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 PureStorageAvsStorageContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerResource.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerAvsStorageContainersRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerResource.Delete"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerAvsStorageContainersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerAvsStorageContainersRestClient.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 an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics.CreateScope("PureStorageAvsStorageContainerResource.Delete"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerAvsStorageContainersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsStorageContainerAvsStorageContainersClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerAvsStorageContainersRestClient.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; + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeCollection.cs new file mode 100644 index 000000000000..213c7585bbcd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStorageAvsStorageContainerVolumes method from an instance of . + /// + public partial class PureStorageAvsStorageContainerVolumeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics; + private readonly AvsStorageContainerVolumesRestOperations _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsStorageContainerVolumeCollection() + { + } + + /// 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 PureStorageAvsStorageContainerVolumeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageAvsStorageContainerVolumeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStorageAvsStorageContainerVolumeResource.ResourceType, out string pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesApiVersion); + _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient = new AvsStorageContainerVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != PureStorageAvsStorageContainerResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PureStorageAvsStorageContainerResource.ResourceType), nameof(id)); + } + + /// + /// Get a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List volumes in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_ListByAvsStorageContainer + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateListByAvsStorageContainerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateListByAvsStorageContainerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsStorageContainerVolumeResource(Client, PureStorageAvsStorageContainerVolumeData.DeserializePureStorageAvsStorageContainerVolumeData(e)), _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, "PureStorageAvsStorageContainerVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List volumes in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_ListByAvsStorageContainer + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateListByAvsStorageContainerRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateListByAvsStorageContainerNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsStorageContainerVolumeResource(Client, PureStorageAvsStorageContainerVolumeData.DeserializePureStorageAvsStorageContainerVolumeData(e)), _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, "PureStorageAvsStorageContainerVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.Exists"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerVolumeResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the storage container. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsStorageContainerVolumeResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.Serialization.cs new file mode 100644 index 000000000000..dbec29f71404 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStorageAvsStorageContainerVolumeData : 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(PureStorageAvsStorageContainerVolumeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PureStorageAvsStorageContainerVolumeData 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(PureStorageAvsStorageContainerVolumeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsStorageContainerVolumeData(document.RootElement, options); + } + + internal static PureStorageAvsStorageContainerVolumeData DeserializePureStorageAvsStorageContainerVolumeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageVolumeProperties 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 = PureStorageVolumeProperties.DeserializePureStorageVolumeProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsStorageContainerVolumeData( + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerVolumeData)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsStorageContainerVolumeData 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 DeserializePureStorageAvsStorageContainerVolumeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsStorageContainerVolumeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.cs new file mode 100644 index 000000000000..c065efbb9d5e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStorageAvsStorageContainerVolume data model. + /// A volume contained in an AVS storage container + /// + public partial class PureStorageAvsStorageContainerVolumeData : 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 PureStorageAvsStorageContainerVolumeData() + { + } + + /// 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 PureStorageAvsStorageContainerVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PureStorageVolumeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public PureStorageVolumeProperties Properties { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.Serialization.cs new file mode 100644 index 000000000000..acd983534e01 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.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.PureStorageBlock +{ + public partial class PureStorageAvsStorageContainerVolumeResource : IJsonModel + { + private static PureStorageAvsStorageContainerVolumeData s_dataDeserializationInstance; + private static PureStorageAvsStorageContainerVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStorageAvsStorageContainerVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStorageAvsStorageContainerVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.cs new file mode 100644 index 000000000000..c6751cfe3049 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsStorageContainerVolumeResource.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; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A Class representing a PureStorageAvsStorageContainerVolume 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 GetPureStorageAvsStorageContainerVolumeResource method. + /// Otherwise you can get one from its parent resource using the GetPureStorageAvsStorageContainerVolume method. + /// + public partial class PureStorageAvsStorageContainerVolumeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The storagePoolName. + /// The storageContainerName. + /// The volumeId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics; + private readonly AvsStorageContainerVolumesRestOperations _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient; + private readonly PureStorageAvsStorageContainerVolumeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsStorageContainers/volumes"; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsStorageContainerVolumeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStorageAvsStorageContainerVolumeResource(ArmClient client, PureStorageAvsStorageContainerVolumeData 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 PureStorageAvsStorageContainerVolumeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesApiVersion); + _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient = new AvsStorageContainerVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesApiVersion); +#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 PureStorageAvsStorageContainerVolumeData 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 volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.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 PureStorageAvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.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 PureStorageAvsStorageContainerVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Delete"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.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 volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Delete"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.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 volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PureStorageAvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Update"); + scope.Start(); + try + { + var response = await _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsStorageContainerVolumeOperationSource(Client), _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 volume in an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName}/volumes/{volumeId} + /// + /// + /// Operation Id + /// AvsStorageContainerVolume_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PureStorageAvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics.CreateScope("PureStorageAvsStorageContainerVolumeResource.Update"); + scope.Start(); + try + { + var response = _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsStorageContainerVolumeOperationSource(Client), _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesClientDiagnostics, Pipeline, _pureStorageAvsStorageContainerVolumeAvsStorageContainerVolumesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmCollection.cs new file mode 100644 index 000000000000..edfb400eb0ec --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStorageAvsVms method from an instance of . + /// + public partial class PureStorageAvsVmCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStorageAvsVmAvsVmsClientDiagnostics; + private readonly AvsVmsRestOperations _pureStorageAvsVmAvsVmsRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsVmCollection() + { + } + + /// 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 PureStorageAvsVmCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsVmAvsVmsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageAvsVmResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStorageAvsVmResource.ResourceType, out string pureStorageAvsVmAvsVmsApiVersion); + _pureStorageAvsVmAvsVmsRestClient = new AvsVmsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsVmAvsVmsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != PureStoragePoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PureStoragePoolResource.ResourceType), nameof(id)); + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AVS VMs by storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms + /// + /// + /// Operation Id + /// AvsVm_ListByStoragePool + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsVmAvsVmsRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsVmAvsVmsRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsVmResource(Client, PureStorageAvsVmData.DeserializePureStorageAvsVmData(e)), _pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, "PureStorageAvsVmCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AVS VMs by storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms + /// + /// + /// Operation Id + /// AvsVm_ListByStoragePool + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsVmAvsVmsRestClient.CreateListByStoragePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsVmAvsVmsRestClient.CreateListByStoragePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsVmResource(Client, PureStorageAvsVmData.DeserializePureStorageAvsVmData(e)), _pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, "PureStorageAvsVmCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.Exists"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, avsVmId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.Serialization.cs new file mode 100644 index 000000000000..6ef9c08a5509 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStorageAvsVmData : 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(PureStorageAvsVmData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PureStorageAvsVmData 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(PureStorageAvsVmData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmData(document.RootElement, options); + } + + internal static PureStorageAvsVmData DeserializePureStorageAvsVmData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageAvsVmProperties 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 = PureStorageAvsVmProperties.DeserializePureStorageAvsVmProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmData( + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmData)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmData 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 DeserializePureStorageAvsVmData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.cs new file mode 100644 index 000000000000..6f3b789063ef --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStorageAvsVm data model. + /// AVS VM resource type, representing all the volumes associated to an AVS VM as defined by VMware + /// + public partial class PureStorageAvsVmData : 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 PureStorageAvsVmData() + { + } + + /// 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 PureStorageAvsVmData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PureStorageAvsVmProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public PureStorageAvsVmProperties Properties { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.Serialization.cs new file mode 100644 index 000000000000..d0b292218cc3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.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.PureStorageBlock +{ + public partial class PureStorageAvsVmResource : IJsonModel + { + private static PureStorageAvsVmData s_dataDeserializationInstance; + private static PureStorageAvsVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStorageAvsVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStorageAvsVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.cs new file mode 100644 index 000000000000..2a102ed73658 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmResource.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; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A Class representing a PureStorageAvsVm 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 GetPureStorageAvsVmResource method. + /// Otherwise you can get one from its parent resource using the GetPureStorageAvsVm method. + /// + public partial class PureStorageAvsVmResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The storagePoolName. + /// The avsVmId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStorageAvsVmAvsVmsClientDiagnostics; + private readonly AvsVmsRestOperations _pureStorageAvsVmAvsVmsRestClient; + private readonly PureStorageAvsVmData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsVms"; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsVmResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStorageAvsVmResource(ArmClient client, PureStorageAvsVmData 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 PureStorageAvsVmResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsVmAvsVmsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStorageAvsVmAvsVmsApiVersion); + _pureStorageAvsVmAvsVmsRestClient = new AvsVmsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsVmAvsVmsApiVersion); +#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 PureStorageAvsVmData 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 PureStorageAvsVmVolumeResources in the PureStorageAvsVm. + /// An object representing collection of PureStorageAvsVmVolumeResources and their operations over a PureStorageAvsVmVolumeResource. + public virtual PureStorageAvsVmVolumeCollection GetPureStorageAvsVmVolumes() + { + return GetCachedClient(client => new PureStorageAvsVmVolumeCollection(client, Id)); + } + + /// + /// Get a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStorageAvsVmVolumeAsync(string volumeId, CancellationToken cancellationToken = default) + { + return await GetPureStorageAvsVmVolumes().GetAsync(volumeId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStorageAvsVmVolume(string volumeId, CancellationToken cancellationToken = default) + { + return GetPureStorageAvsVmVolumes().Get(volumeId, cancellationToken); + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.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 PureStorageAvsVmResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Delete"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, _pureStorageAvsVmAvsVmsRestClient.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 an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Delete"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, _pureStorageAvsVmAvsVmsRestClient.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 an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PureStorageAvsVmPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Update"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmAvsVmsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsVmOperationSource(Client), _pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, _pureStorageAvsVmAvsVmsRestClient.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 an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PureStorageAvsVmPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsVmAvsVmsClientDiagnostics.CreateScope("PureStorageAvsVmResource.Update"); + scope.Start(); + try + { + var response = _pureStorageAvsVmAvsVmsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsVmOperationSource(Client), _pureStorageAvsVmAvsVmsClientDiagnostics, Pipeline, _pureStorageAvsVmAvsVmsRestClient.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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeCollection.cs new file mode 100644 index 000000000000..643a0c58e324 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStorageAvsVmVolumes method from an instance of . + /// + public partial class PureStorageAvsVmVolumeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics; + private readonly AvsVmVolumesRestOperations _pureStorageAvsVmVolumeAvsVmVolumesRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsVmVolumeCollection() + { + } + + /// 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 PureStorageAvsVmVolumeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageAvsVmVolumeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStorageAvsVmVolumeResource.ResourceType, out string pureStorageAvsVmVolumeAvsVmVolumesApiVersion); + _pureStorageAvsVmVolumeAvsVmVolumesRestClient = new AvsVmVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsVmVolumeAvsVmVolumesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != PureStorageAvsVmResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, PureStorageAvsVmResource.ResourceType), nameof(id)); + } + + /// + /// Get a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List volumes in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes + /// + /// + /// Operation Id + /// AvsVmVolume_ListByAvsVm + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateListByAvsVmRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateListByAvsVmNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsVmVolumeResource(Client, PureStorageAvsVmVolumeData.DeserializePureStorageAvsVmVolumeData(e)), _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, "PureStorageAvsVmVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List volumes in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes + /// + /// + /// Operation Id + /// AvsVmVolume_ListByAvsVm + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateListByAvsVmRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateListByAvsVmNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageAvsVmVolumeResource(Client, PureStorageAvsVmVolumeData.DeserializePureStorageAvsVmVolumeData(e)), _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, "PureStorageAvsVmVolumeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.Exists"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, 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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmVolumeResource(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/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the volume in the AVS VM. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, volumeId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageAvsVmVolumeResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.Serialization.cs new file mode 100644 index 000000000000..e9a3419a9cbd --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStorageAvsVmVolumeData : 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(PureStorageAvsVmVolumeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PureStorageAvsVmVolumeData 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(PureStorageAvsVmVolumeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageAvsVmVolumeData(document.RootElement, options); + } + + internal static PureStorageAvsVmVolumeData DeserializePureStorageAvsVmVolumeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageVolumeProperties 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 = PureStorageVolumeProperties.DeserializePureStorageVolumeProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageAvsVmVolumeData( + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmVolumeData)} does not support writing '{options.Format}' format."); + } + } + + PureStorageAvsVmVolumeData 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 DeserializePureStorageAvsVmVolumeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageAvsVmVolumeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.cs new file mode 100644 index 000000000000..264dd332864a --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStorageAvsVmVolume data model. + /// Any volume associated to a particular AVS VM + /// + public partial class PureStorageAvsVmVolumeData : 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 PureStorageAvsVmVolumeData() + { + } + + /// 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 PureStorageAvsVmVolumeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, PureStorageVolumeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public PureStorageVolumeProperties Properties { get; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.Serialization.cs new file mode 100644 index 000000000000..10e2a770bee3 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.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.PureStorageBlock +{ + public partial class PureStorageAvsVmVolumeResource : IJsonModel + { + private static PureStorageAvsVmVolumeData s_dataDeserializationInstance; + private static PureStorageAvsVmVolumeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStorageAvsVmVolumeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStorageAvsVmVolumeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.cs new file mode 100644 index 000000000000..a49d0ad3370f --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageAvsVmVolumeResource.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; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A Class representing a PureStorageAvsVmVolume 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 GetPureStorageAvsVmVolumeResource method. + /// Otherwise you can get one from its parent resource using the GetPureStorageAvsVmVolume method. + /// + public partial class PureStorageAvsVmVolumeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The storagePoolName. + /// The avsVmId. + /// The volumeId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics; + private readonly AvsVmVolumesRestOperations _pureStorageAvsVmVolumeAvsVmVolumesRestClient; + private readonly PureStorageAvsVmVolumeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools/avsVms/avsVmVolumes"; + + /// Initializes a new instance of the class for mocking. + protected PureStorageAvsVmVolumeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStorageAvsVmVolumeResource(ArmClient client, PureStorageAvsVmVolumeData 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 PureStorageAvsVmVolumeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStorageAvsVmVolumeAvsVmVolumesApiVersion); + _pureStorageAvsVmVolumeAvsVmVolumesRestClient = new AvsVmVolumesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageAvsVmVolumeAvsVmVolumesApiVersion); +#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 PureStorageAvsVmVolumeData 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 volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Get"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.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 PureStorageAvsVmVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Get"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.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 PureStorageAvsVmVolumeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Delete"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, _pureStorageAvsVmVolumeAvsVmVolumesRestClient.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 volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Delete"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, _pureStorageAvsVmVolumeAvsVmVolumesRestClient.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 volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PureStorageAvsVmVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Update"); + scope.Start(); + try + { + var response = await _pureStorageAvsVmVolumeAvsVmVolumesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsVmVolumeOperationSource(Client), _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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 volume in an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId}/avsVmVolumes/{volumeId} + /// + /// + /// Operation Id + /// AvsVmVolume_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PureStorageAvsVmVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics.CreateScope("PureStorageAvsVmVolumeResource.Update"); + scope.Start(); + try + { + var response = _pureStorageAvsVmVolumeAvsVmVolumesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, patch, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStorageAvsVmVolumeOperationSource(Client), _pureStorageAvsVmVolumeAvsVmVolumesClientDiagnostics, Pipeline, _pureStorageAvsVmVolumeAvsVmVolumesRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolCollection.cs new file mode 100644 index 000000000000..8fa620f10fbf --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStoragePools method from an instance of . + /// + public partial class PureStoragePoolCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStoragePoolStoragePoolsClientDiagnostics; + private readonly StoragePoolsRestOperations _pureStoragePoolStoragePoolsRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStoragePoolCollection() + { + } + + /// 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 PureStoragePoolCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStoragePoolStoragePoolsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStoragePoolResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStoragePoolResource.ResourceType, out string pureStoragePoolStoragePoolsApiVersion); + _pureStoragePoolStoragePoolsRestClient = new StoragePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStoragePoolStoragePoolsApiVersion); +#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 storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Create + /// + /// + /// Default Api Version + /// 2024-11-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 storage pool. + /// 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 storagePoolName, PureStoragePoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, data, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStoragePoolOperationSource(Client), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, 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 storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Create + /// + /// + /// Default Api Version + /// 2024-11-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 storage pool. + /// 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 storagePoolName, PureStoragePoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, data, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStoragePoolOperationSource(Client), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.Get"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.Get"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List storage pools by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStoragePoolStoragePoolsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStoragePoolStoragePoolsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStoragePoolResource(Client, PureStoragePoolData.DeserializePureStoragePoolData(e)), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, "PureStoragePoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List storage pools by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools + /// + /// + /// Operation Id + /// StoragePool_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStoragePoolStoragePoolsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStoragePoolStoragePoolsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStoragePoolResource(Client, PureStoragePoolData.DeserializePureStoragePoolData(e)), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, "PureStoragePoolCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.Exists"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage pool. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, storagePoolName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.Serialization.cs new file mode 100644 index 000000000000..06735923582e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStoragePoolData : 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(PureStoragePoolData)} 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(Identity)) + { + writer.WritePropertyName("identity"u8); + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + JsonSerializer.Serialize(writer, Identity, serializeOptions); + } + } + + PureStoragePoolData 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(PureStoragePoolData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStoragePoolData(document.RootElement, options); + } + + internal static PureStoragePoolData DeserializePureStoragePoolData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStoragePoolProperties properties = default; + ManagedServiceIdentity identity = 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 = PureStoragePoolProperties.DeserializePureStoragePoolProperties(property.Value, options); + continue; + } + if (property.NameEquals("identity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + var serializeOptions = new JsonSerializerOptions { Converters = { new ManagedServiceIdentityTypeV3Converter() } }; + identity = JsonSerializer.Deserialize(property.Value.GetRawText(), serializeOptions); + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStoragePoolData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + identity, + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStoragePoolData)} does not support writing '{options.Format}' format."); + } + } + + PureStoragePoolData 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 DeserializePureStoragePoolData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStoragePoolData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.cs new file mode 100644 index 000000000000..27110c892837 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStoragePool data model. + /// Storage pool resource + /// + public partial class PureStoragePoolData : 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 PureStoragePoolData(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. + /// The managed service identities assigned to this resource. + /// Keeps track of any properties unknown to the library. + internal PureStoragePoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PureStoragePoolProperties properties, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Identity = identity; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStoragePoolData() + { + } + + /// The resource-specific properties for this resource. + public PureStoragePoolProperties Properties { get; set; } + /// The managed service identities assigned to this resource. + public ManagedServiceIdentity Identity { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.Serialization.cs new file mode 100644 index 000000000000..d998d4b177be --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.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.PureStorageBlock +{ + public partial class PureStoragePoolResource : IJsonModel + { + private static PureStoragePoolData s_dataDeserializationInstance; + private static PureStoragePoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStoragePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStoragePoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.cs new file mode 100644 index 000000000000..b7b333a2a292 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStoragePoolResource.cs @@ -0,0 +1,1425 @@ +// 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.PureStorageBlock.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A Class representing a PureStoragePool 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 GetPureStoragePoolResource method. + /// Otherwise you can get one from its parent resource using the GetPureStoragePool method. + /// + public partial class PureStoragePoolResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The storagePoolName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStoragePoolStoragePoolsClientDiagnostics; + private readonly StoragePoolsRestOperations _pureStoragePoolStoragePoolsRestClient; + private readonly PureStoragePoolData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/storagePools"; + + /// Initializes a new instance of the class for mocking. + protected PureStoragePoolResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStoragePoolResource(ArmClient client, PureStoragePoolData 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 PureStoragePoolResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStoragePoolStoragePoolsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStoragePoolStoragePoolsApiVersion); + _pureStoragePoolStoragePoolsRestClient = new StoragePoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStoragePoolStoragePoolsApiVersion); +#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 PureStoragePoolData 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 PureStorageAvsStorageContainerResources in the PureStoragePool. + /// An object representing collection of PureStorageAvsStorageContainerResources and their operations over a PureStorageAvsStorageContainerResource. + public virtual PureStorageAvsStorageContainerCollection GetPureStorageAvsStorageContainers() + { + return GetCachedClient(client => new PureStorageAvsStorageContainerCollection(client, Id)); + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStorageAvsStorageContainerAsync(string storageContainerName, CancellationToken cancellationToken = default) + { + return await GetPureStorageAvsStorageContainers().GetAsync(storageContainerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get an AVS storage container + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsStorageContainers/{storageContainerName} + /// + /// + /// Operation Id + /// AvsStorageContainer_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the storage container. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStorageAvsStorageContainer(string storageContainerName, CancellationToken cancellationToken = default) + { + return GetPureStorageAvsStorageContainers().Get(storageContainerName, cancellationToken); + } + + /// Gets a collection of PureStorageAvsVmResources in the PureStoragePool. + /// An object representing collection of PureStorageAvsVmResources and their operations over a PureStorageAvsVmResource. + public virtual PureStorageAvsVmCollection GetPureStorageAvsVms() + { + return GetCachedClient(client => new PureStorageAvsVmCollection(client, Id)); + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetPureStorageAvsVmAsync(string avsVmId, CancellationToken cancellationToken = default) + { + return await GetPureStorageAvsVms().GetAsync(avsVmId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get an AVS VM + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/avsVms/{avsVmId} + /// + /// + /// Operation Id + /// AvsVm_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// ID of the AVS VM. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetPureStorageAvsVm(string avsVmId, CancellationToken cancellationToken = default) + { + return GetPureStorageAvsVms().Get(avsVmId, cancellationToken); + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Get"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Get"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStoragePoolResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Delete"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.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 storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Delete"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.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 storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PureStoragePoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Update"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStoragePoolOperationSource(Client), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.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 storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PureStoragePoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.Update"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStoragePoolOperationSource(Client), _pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.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; + } + } + + /// + /// Retrieve health metrics of a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getHealthStatus + /// + /// + /// Operation Id + /// StoragePools_GetHealthStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetHealthStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetHealthStatus"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetHealthStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve health metrics of a storage pool + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getHealthStatus + /// + /// + /// Operation Id + /// StoragePools_GetHealthStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetHealthStatus(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetHealthStatus"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.GetHealthStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns current information about an on-going connection to an AVS instance + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getAvsConnection + /// + /// + /// Operation Id + /// StoragePools_GetAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAvsConnectionAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetAvsConnection"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAvsConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns current information about an on-going connection to an AVS instance + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getAvsConnection + /// + /// + /// Operation Id + /// StoragePools_GetAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetAvsConnection(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetAvsConnection"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.GetAvsConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the status of the storage pool connection to AVS + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getAvsStatus + /// + /// + /// Operation Id + /// StoragePools_GetAvsStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAvsStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetAvsStatus"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.GetAvsStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Returns the status of the storage pool connection to AVS + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/getAvsStatus + /// + /// + /// Operation Id + /// StoragePools_GetAvsStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetAvsStatus(CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.GetAvsStatus"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.GetAvsStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Initiate a connection between the storage pool and a specified AVS SDDC resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/enableAvsConnection + /// + /// + /// Operation Id + /// StoragePools_EnableAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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. + /// Storage pool EnableAvsConnection properties. + /// The cancellation token to use. + /// is null. + public virtual async Task EnableAvsConnectionAsync(WaitUntil waitUntil, StoragePoolEnableAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.EnableAvsConnection"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.EnableAvsConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateEnableAvsConnectionRequest(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; + } + } + + /// + /// Initiate a connection between the storage pool and a specified AVS SDDC resource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/enableAvsConnection + /// + /// + /// Operation Id + /// StoragePools_EnableAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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. + /// Storage pool EnableAvsConnection properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation EnableAvsConnection(WaitUntil waitUntil, StoragePoolEnableAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.EnableAvsConnection"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.EnableAvsConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateEnableAvsConnectionRequest(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; + } + } + + /// + /// Disable the existing AVS connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/disableAvsConnection + /// + /// + /// Operation Id + /// StoragePools_DisableAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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 DisableAvsConnectionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.DisableAvsConnection"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.DisableAvsConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateDisableAvsConnectionRequest(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; + } + } + + /// + /// Disable the existing AVS connection + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/disableAvsConnection + /// + /// + /// Operation Id + /// StoragePools_DisableAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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 DisableAvsConnection(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.DisableAvsConnection"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.DisableAvsConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateDisableAvsConnectionRequest(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; + } + } + + /// + /// Finalize an already started AVS connection to a specific AVS SDDC + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/finalizeAvsConnection + /// + /// + /// Operation Id + /// StoragePools_FinalizeAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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. + /// Storage pool FinalizeAvsConnection properties. + /// The cancellation token to use. + /// is null. + public virtual async Task FinalizeAvsConnectionAsync(WaitUntil waitUntil, StoragePoolFinalizeAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.FinalizeAvsConnection"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.FinalizeAvsConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateFinalizeAvsConnectionRequest(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; + } + } + + /// + /// Finalize an already started AVS connection to a specific AVS SDDC + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/finalizeAvsConnection + /// + /// + /// Operation Id + /// StoragePools_FinalizeAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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. + /// Storage pool FinalizeAvsConnection properties. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation FinalizeAvsConnection(WaitUntil waitUntil, StoragePoolFinalizeAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.FinalizeAvsConnection"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.FinalizeAvsConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateFinalizeAvsConnectionRequest(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; + } + } + + /// + /// Test and repair, if needed, all configuration elements of the storage pool connection to the AVS instance + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/repairAvsConnection + /// + /// + /// Operation Id + /// StoragePools_RepairAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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 RepairAvsConnectionAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.RepairAvsConnection"); + scope.Start(); + try + { + var response = await _pureStoragePoolStoragePoolsRestClient.RepairAvsConnectionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateRepairAvsConnectionRequest(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; + } + } + + /// + /// Test and repair, if needed, all configuration elements of the storage pool connection to the AVS instance + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName}/repairAvsConnection + /// + /// + /// Operation Id + /// StoragePools_RepairAvsConnection + /// + /// + /// Default Api Version + /// 2024-11-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 RepairAvsConnection(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.RepairAvsConnection"); + scope.Start(); + try + { + var response = _pureStoragePoolStoragePoolsRestClient.RepairAvsConnection(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStoragePoolStoragePoolsClientDiagnostics, Pipeline, _pureStoragePoolStoragePoolsRestClient.CreateRepairAvsConnectionRequest(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; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 _pureStoragePoolStoragePoolsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/PureStorage.Block/storagePools/{storagePoolName} + /// + /// + /// Operation Id + /// StoragePool_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStoragePoolStoragePoolsClientDiagnostics.CreateScope("PureStoragePoolResource.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 = _pureStoragePoolStoragePoolsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStoragePoolResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStoragePoolPatch(); + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationCollection.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationCollection.cs new file mode 100644 index 000000000000..10dcab068096 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationCollection.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.PureStorageBlock +{ + /// + /// 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 GetPureStorageReservations method from an instance of . + /// + public partial class PureStorageReservationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _pureStorageReservationReservationsClientDiagnostics; + private readonly ReservationsRestOperations _pureStorageReservationReservationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected PureStorageReservationCollection() + { + } + + /// 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 PureStorageReservationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageReservationReservationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", PureStorageReservationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(PureStorageReservationResource.ResourceType, out string pureStorageReservationReservationsApiVersion); + _pureStorageReservationReservationsRestClient = new ReservationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageReservationReservationsApiVersion); +#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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Create + /// + /// + /// Default Api Version + /// 2024-11-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 reservation. + /// 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 reservationName, PureStorageReservationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, reservationName, data, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStorageReservationOperationSource(Client), _pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, reservationName, 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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Create + /// + /// + /// Default Api Version + /// 2024-11-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 reservation. + /// 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 reservationName, PureStorageReservationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, reservationName, data, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStorageReservationOperationSource(Client), _pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, reservationName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.Get"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, reservationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.Get"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, reservationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List reservations by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageReservationReservationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageReservationReservationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new PureStorageReservationResource(Client, PureStorageReservationData.DeserializePureStorageReservationData(e)), _pureStorageReservationReservationsClientDiagnostics, Pipeline, "PureStorageReservationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List reservations by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations + /// + /// + /// Operation Id + /// Reservation_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-11-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) => _pureStorageReservationReservationsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _pureStorageReservationReservationsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new PureStorageReservationResource(Client, PureStorageReservationData.DeserializePureStorageReservationData(e)), _pureStorageReservationReservationsClientDiagnostics, Pipeline, "PureStorageReservationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.Exists"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, reservationName, 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.Exists"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, reservationName, 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, reservationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the reservation. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, reservationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.Serialization.cs new file mode 100644 index 000000000000..c46a300cec45 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.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; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + public partial class PureStorageReservationData : 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(PureStorageReservationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + PureStorageReservationData 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(PureStorageReservationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePureStorageReservationData(document.RootElement, options); + } + + internal static PureStorageReservationData DeserializePureStorageReservationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + PureStorageReservationProperties 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 = PureStorageReservationProperties.DeserializePureStorageReservationProperties(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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new PureStorageReservationData( + 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, AzureResourceManagerPureStorageBlockContext.Default); + default: + throw new FormatException($"The model {nameof(PureStorageReservationData)} does not support writing '{options.Format}' format."); + } + } + + PureStorageReservationData 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 DeserializePureStorageReservationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PureStorageReservationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.cs new file mode 100644 index 000000000000..3f0855263c03 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationData.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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A class representing the PureStorageReservation data model. + /// Pure Storage cloud service resource type, also called reservation + /// + public partial class PureStorageReservationData : 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 PureStorageReservationData(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 PureStorageReservationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, PureStorageReservationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PureStorageReservationData() + { + } + + /// The resource-specific properties for this resource. + public PureStorageReservationProperties Properties { get; set; } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.Serialization.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.Serialization.cs new file mode 100644 index 000000000000..d7e0341851db --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.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.PureStorageBlock +{ + public partial class PureStorageReservationResource : IJsonModel + { + private static PureStorageReservationData s_dataDeserializationInstance; + private static PureStorageReservationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + PureStorageReservationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPureStorageBlockContext.Default); + + PureStorageReservationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPureStorageBlockContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.cs new file mode 100644 index 000000000000..4b5bc2b02d05 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/PureStorageReservationResource.cs @@ -0,0 +1,935 @@ +// 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.PureStorageBlock.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.PureStorageBlock +{ + /// + /// A Class representing a PureStorageReservation 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 GetPureStorageReservationResource method. + /// Otherwise you can get one from its parent resource using the GetPureStorageReservation method. + /// + public partial class PureStorageReservationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The reservationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string reservationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _pureStorageReservationReservationsClientDiagnostics; + private readonly ReservationsRestOperations _pureStorageReservationReservationsRestClient; + private readonly PureStorageReservationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "PureStorage.Block/reservations"; + + /// Initializes a new instance of the class for mocking. + protected PureStorageReservationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal PureStorageReservationResource(ArmClient client, PureStorageReservationData 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 PureStorageReservationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _pureStorageReservationReservationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.PureStorageBlock", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string pureStorageReservationReservationsApiVersion); + _pureStorageReservationReservationsRestClient = new ReservationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, pureStorageReservationReservationsApiVersion); +#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 PureStorageReservationData 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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Get"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Get"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new PureStorageReservationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Delete"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(_pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Delete + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Delete"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new PureStorageBlockArmOperation(_pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, PureStorageReservationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Update"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new PureStorageBlockArmOperation(new PureStorageReservationOperationSource(Client), _pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.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 reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Update + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, PureStorageReservationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.Update"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new PureStorageBlockArmOperation(new PureStorageReservationOperationSource(Client), _pureStorageReservationReservationsClientDiagnostics, Pipeline, _pureStorageReservationReservationsRestClient.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; + } + } + + /// + /// Limits constraining certain resource properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getResourceLimits + /// + /// + /// Operation Id + /// Reservations_GetResourceLimits + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetResourceLimitsAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetResourceLimits"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetResourceLimitsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Limits constraining certain resource properties. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getResourceLimits + /// + /// + /// Operation Id + /// Reservations_GetResourceLimits + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetResourceLimits(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetResourceLimits"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.GetResourceLimits(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Provides various statistics about resources billed via given reservation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getBillingStatus + /// + /// + /// Operation Id + /// Reservations_GetBillingStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBillingStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetBillingStatus"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetBillingStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Provides various statistics about resources billed via given reservation. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getBillingStatus + /// + /// + /// Operation Id + /// Reservations_GetBillingStatus + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBillingStatus(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetBillingStatus"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.GetBillingStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Provides a summarized report along with actions for resources billed via given reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getBillingReport + /// + /// + /// Operation Id + /// Reservations_GetBillingReport + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetBillingReportAsync(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetBillingReport"); + scope.Start(); + try + { + var response = await _pureStorageReservationReservationsRestClient.GetBillingReportAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Provides a summarized report along with actions for resources billed via given reservation + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PureStorage.Block/reservations/{reservationName}/getBillingReport + /// + /// + /// Operation Id + /// Reservations_GetBillingReport + /// + /// + /// Default Api Version + /// 2024-11-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetBillingReport(CancellationToken cancellationToken = default) + { + using var scope = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.GetBillingReport"); + scope.Start(); + try + { + var response = _pureStorageReservationReservationsRestClient.GetBillingReport(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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 _pureStorageReservationReservationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/PureStorage.Block/reservations/{reservationName} + /// + /// + /// Operation Id + /// Reservation_Get + /// + /// + /// Default Api Version + /// 2024-11-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 = _pureStorageReservationReservationsClientDiagnostics.CreateScope("PureStorageReservationResource.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 = _pureStorageReservationReservationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new PureStorageReservationResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PureStorageReservationPatch(); + 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/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainerVolumesRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainerVolumesRestOperations.cs new file mode 100644 index 000000000000..945eb5668f9d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainerVolumesRestOperations.cs @@ -0,0 +1,549 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class AvsStorageContainerVolumesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvsStorageContainerVolumesRestOperations. + /// 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 AvsStorageContainerVolumesRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId, PureStorageAvsStorageContainerVolumePatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId, PureStorageAvsStorageContainerVolumePatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, 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 volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, PureStorageAvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId, 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 volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, PureStorageAvsStorageContainerVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStorageContainerVolumeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsStorageContainerVolumeData.DeserializePureStorageAvsStorageContainerVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsStorageContainerVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStorageContainerVolumeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsStorageContainerVolumeData.DeserializePureStorageAvsStorageContainerVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsStorageContainerVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, string volumeId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + 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 volume in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// ID of the volume in the storage container. + /// 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 storagePoolName, string storageContainerName, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName, volumeId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAvsStorageContainerRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAvsStorageContainerRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendPath("/volumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List volumes in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAvsStorageContainerAsync(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateListByAvsStorageContainerRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsStorageContainerVolumeListResult.DeserializeAvsStorageContainerVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List volumes in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAvsStorageContainer(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateListByAvsStorageContainerRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsStorageContainerVolumeListResult.DeserializeAvsStorageContainerVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAvsStorageContainerNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAvsStorageContainerNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + 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 volumes in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAvsStorageContainerNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateListByAvsStorageContainerNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsStorageContainerVolumeListResult.DeserializeAvsStorageContainerVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List volumes in an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAvsStorageContainerNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateListByAvsStorageContainerNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsStorageContainerVolumeListResult.DeserializeAvsStorageContainerVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainersRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainersRestOperations.cs new file mode 100644 index 000000000000..1d249d41d2f1 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsStorageContainersRestOperations.cs @@ -0,0 +1,413 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class AvsStorageContainersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvsStorageContainersRestOperations. + /// 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 AvsStorageContainersRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// 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 storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStorageContainerData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsStorageContainerData.DeserializePureStorageAvsStorageContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsStorageContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// 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 storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStorageContainerData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsStorageContainerData.DeserializePureStorageAvsStorageContainerData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsStorageContainerData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string storageContainerName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers/", false); + uri.AppendPath(storageContainerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// 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 storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + 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 an AVS storage container. + /// 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 storage pool. + /// Name of the storage container. + /// 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 storagePoolName, string storageContainerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(storageContainerName, nameof(storageContainerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, storageContainerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByStoragePoolRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByStoragePoolRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsStorageContainers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AVS storage containers by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByStoragePoolAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsStorageContainerListResult.DeserializeAvsStorageContainerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AVS storage containers by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByStoragePool(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsStorageContainerListResult.DeserializeAvsStorageContainerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByStoragePoolNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByStoragePoolNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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 AVS storage containers by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByStoragePoolNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsStorageContainerListResult.DeserializeAvsStorageContainerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AVS storage containers by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByStoragePoolNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsStorageContainerListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsStorageContainerListResult.DeserializeAvsStorageContainerListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmVolumesRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmVolumesRestOperations.cs new file mode 100644 index 000000000000..9266747fb23d --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmVolumesRestOperations.cs @@ -0,0 +1,549 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class AvsVmVolumesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvsVmVolumesRestOperations. + /// 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 AvsVmVolumesRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId, PureStorageAvsVmVolumePatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId, PureStorageAvsVmVolumePatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, 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 volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, PureStorageAvsVmVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId, 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 volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, PureStorageAvsVmVolumePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsVmVolumeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsVmVolumeData.DeserializePureStorageAvsVmVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsVmVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsVmVolumeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsVmVolumeData.DeserializePureStorageAvsVmVolumeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsVmVolumeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, string volumeId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes/", false); + uri.AppendPath(volumeId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + 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 volume in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// ID of the volume in the AVS VM. + /// 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 storagePoolName, string avsVmId, string volumeId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNullOrEmpty(volumeId, nameof(volumeId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, volumeId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAvsVmRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByAvsVmRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendPath("/avsVmVolumes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List volumes in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAvsVmAsync(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateListByAvsVmRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsVmVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsVmVolumeListResult.DeserializeAvsVmVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List volumes in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAvsVm(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateListByAvsVmRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsVmVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsVmVolumeListResult.DeserializeAvsVmVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByAvsVmNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByAvsVmNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + 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 volumes in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByAvsVmNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateListByAvsVmNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName, avsVmId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsVmVolumeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsVmVolumeListResult.DeserializeAvsVmVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List volumes in an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByAvsVmNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateListByAvsVmNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName, avsVmId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsVmVolumeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsVmVolumeListResult.DeserializeAvsVmVolumeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmsRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmsRestOperations.cs new file mode 100644 index 000000000000..6f23e810d5a7 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/AvsVmsRestOperations.cs @@ -0,0 +1,513 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class AvsVmsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AvsVmsRestOperations. + /// 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 AvsVmsRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, PureStorageAvsVmPatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId, PureStorageAvsVmPatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, 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 AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, PureStorageAvsVmPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, 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 AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, PureStorageAvsVmPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsVmData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsVmData.DeserializePureStorageAvsVmData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsVmData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsVmData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsVmData.DeserializePureStorageAvsVmData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageAvsVmData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storagePoolName, string avsVmId) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms/", false); + uri.AppendPath(avsVmId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + 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 an AVS VM. + /// 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 storage pool. + /// ID of the AVS VM. + /// 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 storagePoolName, string avsVmId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNullOrEmpty(avsVmId, nameof(avsVmId)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName, avsVmId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByStoragePoolRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByStoragePoolRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/avsVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AVS VMs by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByStoragePoolAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsVmListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsVmListResult.DeserializeAvsVmListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AVS VMs by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByStoragePool(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsVmListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsVmListResult.DeserializeAvsVmListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByStoragePoolNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByStoragePoolNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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 AVS VMs by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByStoragePoolNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AvsVmListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AvsVmListResult.DeserializeAvsVmListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AVS VMs by storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByStoragePoolNextPage(string nextLink, string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateListByStoragePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AvsVmListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AvsVmListResult.DeserializeAvsVmListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/ReservationsRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/ReservationsRestOperations.cs new file mode 100644 index 000000000000..d3022a85e3a9 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/ReservationsRestOperations.cs @@ -0,0 +1,1005 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class ReservationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ReservationsRestOperations. + /// 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 ReservationsRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string reservationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string reservationName) + { + 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a reservation. + /// 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 reservation. + /// 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 reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, reservationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageReservationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageReservationData.DeserializePureStorageReservationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageReservationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a reservation. + /// 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 reservation. + /// 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 reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, reservationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageReservationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageReservationData.DeserializePureStorageReservationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStorageReservationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string reservationName, PureStorageReservationData 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string reservationName, PureStorageReservationData 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, 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 reservation. + /// 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 reservation. + /// 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 CreateAsync(string subscriptionId, string resourceGroupName, string reservationName, PureStorageReservationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, reservationName, 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 reservation. + /// 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 reservation. + /// 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 Create(string subscriptionId, string resourceGroupName, string reservationName, PureStorageReservationData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, reservationName, 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 reservationName, PureStorageReservationPatch 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string reservationName, PureStorageReservationPatch 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, 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 reservation. + /// 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 reservation. + /// 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 reservationName, PureStorageReservationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, reservationName, 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 reservation. + /// 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 reservation. + /// 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 reservationName, PureStorageReservationPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, reservationName, 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 reservationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string reservationName) + { + 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a reservation. + /// 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 reservation. + /// 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 reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, reservationName); + 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 reservation. + /// 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 reservation. + /// 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 reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, reservationName); + _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/PureStorage.Block/reservations", 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/PureStorage.Block/reservations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List reservations 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: + { + ReservationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List reservations 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: + { + ReservationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationListResult.DeserializeReservationListResult(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/PureStorage.Block/reservations", 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/PureStorage.Block/reservations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List reservations by Azure 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: + { + ReservationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List reservations by Azure 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: + { + ReservationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetResourceLimitsRequestUri(string subscriptionId, string resourceGroupName, string reservationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getResourceLimits", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetResourceLimitsRequest(string subscriptionId, string resourceGroupName, string reservationName) + { + 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getResourceLimits", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Limits constraining certain resource properties. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetResourceLimitsAsync(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetResourceLimitsRequest(subscriptionId, resourceGroupName, reservationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageResourceLimitDetails value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageResourceLimitDetails.DeserializePureStorageResourceLimitDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Limits constraining certain resource properties. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetResourceLimits(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetResourceLimitsRequest(subscriptionId, resourceGroupName, reservationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageResourceLimitDetails value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageResourceLimitDetails.DeserializePureStorageResourceLimitDetails(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBillingStatusRequestUri(string subscriptionId, string resourceGroupName, string reservationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getBillingStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetBillingStatusRequest(string subscriptionId, string resourceGroupName, string reservationName) + { + 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getBillingStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Provides various statistics about resources billed via given reservation. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetBillingStatusAsync(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetBillingStatusRequest(subscriptionId, resourceGroupName, reservationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ReservationBillingStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationBillingStatus.DeserializeReservationBillingStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Provides various statistics about resources billed via given reservation. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetBillingStatus(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetBillingStatusRequest(subscriptionId, resourceGroupName, reservationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ReservationBillingStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationBillingStatus.DeserializeReservationBillingStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetBillingReportRequestUri(string subscriptionId, string resourceGroupName, string reservationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getBillingReport", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetBillingReportRequest(string subscriptionId, string resourceGroupName, string reservationName) + { + 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/PureStorage.Block/reservations/", false); + uri.AppendPath(reservationName, true); + uri.AppendPath("/getBillingReport", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Provides a summarized report along with actions for resources billed via given reservation. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetBillingReportAsync(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetBillingReportRequest(subscriptionId, resourceGroupName, reservationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ReservationBillingUsageReport value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationBillingUsageReport.DeserializeReservationBillingUsageReport(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Provides a summarized report along with actions for resources billed via given reservation. + /// 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 reservation. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetBillingReport(string subscriptionId, string resourceGroupName, string reservationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(reservationName, nameof(reservationName)); + + using var message = CreateGetBillingReportRequest(subscriptionId, resourceGroupName, reservationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ReservationBillingUsageReport value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationBillingUsageReport.DeserializeReservationBillingUsageReport(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 reservations 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: + { + ReservationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List reservations 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: + { + ReservationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationListResult.DeserializeReservationListResult(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 reservations by Azure 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: + { + ReservationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List reservations by Azure 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: + { + ReservationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ReservationListResult.DeserializeReservationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/StoragePoolsRestOperations.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/StoragePoolsRestOperations.cs new file mode 100644 index 000000000000..6b47bade990a --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Generated/RestOperations/StoragePoolsRestOperations.cs @@ -0,0 +1,1357 @@ +// 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.PureStorageBlock.Models; + +namespace Azure.ResourceManager.PureStorageBlock +{ + internal partial class StoragePoolsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of StoragePoolsRestOperations. + /// 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 StoragePoolsRestOperations(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-11-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a storage pool. + /// 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 storage pool. + /// 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 storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStoragePoolData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStoragePoolData.DeserializePureStoragePoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStoragePoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a storage pool. + /// 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 storage pool. + /// 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 storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStoragePoolData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStoragePoolData.DeserializePureStoragePoolData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((PureStoragePoolData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, PureStoragePoolData 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string storagePoolName, PureStoragePoolData 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, 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 storage pool. + /// 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 storage pool. + /// 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 CreateAsync(string subscriptionId, string resourceGroupName, string storagePoolName, PureStoragePoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, storagePoolName, 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 storage pool. + /// 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 storage pool. + /// 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 Create(string subscriptionId, string resourceGroupName, string storagePoolName, PureStoragePoolData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, storagePoolName, 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 storagePoolName, PureStoragePoolPatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string storagePoolName, PureStoragePoolPatch 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, 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 storage pool. + /// 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 storage pool. + /// 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 storagePoolName, PureStoragePoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, 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 storage pool. + /// 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 storage pool. + /// 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 storagePoolName, PureStoragePoolPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, storagePoolName, 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 storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a storage pool. + /// 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 storage pool. + /// 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 storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName); + 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 storage pool. + /// 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 storage pool. + /// 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 storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, storagePoolName); + _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/PureStorage.Block/storagePools", 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/PureStorage.Block/storagePools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List storage pools 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: + { + StoragePoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List storage pools 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: + { + StoragePoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StoragePoolListResult.DeserializeStoragePoolListResult(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/PureStorage.Block/storagePools", 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/PureStorage.Block/storagePools", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List storage pools by Azure 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: + { + StoragePoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List storage pools by Azure 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: + { + StoragePoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetHealthStatusRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getHealthStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetHealthStatusRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getHealthStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve health metrics of a storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetHealthStatusAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetHealthStatusRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + StoragePoolHealthInfo value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StoragePoolHealthInfo.DeserializeStoragePoolHealthInfo(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve health metrics of a storage pool. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetHealthStatus(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetHealthStatusRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + StoragePoolHealthInfo value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StoragePoolHealthInfo.DeserializeStoragePoolHealthInfo(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvsConnectionRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvsConnectionRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns current information about an on-going connection to an AVS instance. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAvsConnectionAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsConnection value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsConnection.DeserializePureStorageAvsConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns current information about an on-going connection to an AVS instance. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAvsConnection(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsConnection value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsConnection.DeserializePureStorageAvsConnection(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvsStatusRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getAvsStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvsStatusRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/getAvsStatus", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Returns the status of the storage pool connection to AVS. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAvsStatusAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetAvsStatusRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStatus value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PureStorageAvsStatus.DeserializePureStorageAvsStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Returns the status of the storage pool connection to AVS. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAvsStatus(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateGetAvsStatusRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PureStorageAvsStatus value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PureStorageAvsStatus.DeserializePureStorageAvsStatus(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateEnableAvsConnectionRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolEnableAvsConnectionContent 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/enableAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateEnableAvsConnectionRequest(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolEnableAvsConnectionContent 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/enableAvsConnection", 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; + } + + /// Initiate a connection between the storage pool and a specified AVS SDDC 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 storage pool. + /// Storage pool EnableAvsConnection properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task EnableAvsConnectionAsync(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolEnableAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateEnableAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Initiate a connection between the storage pool and a specified AVS SDDC 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 storage pool. + /// Storage pool EnableAvsConnection properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response EnableAvsConnection(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolEnableAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateEnableAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDisableAvsConnectionRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/disableAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDisableAvsConnectionRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/disableAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Disable the existing AVS connection. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task DisableAvsConnectionAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateDisableAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Disable the existing AVS connection. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response DisableAvsConnection(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateDisableAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateFinalizeAvsConnectionRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolFinalizeAvsConnectionContent 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/finalizeAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateFinalizeAvsConnectionRequest(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolFinalizeAvsConnectionContent 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/finalizeAvsConnection", 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; + } + + /// Finalize an already started AVS connection to a specific AVS SDDC. + /// 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 storage pool. + /// Storage pool FinalizeAvsConnection properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task FinalizeAvsConnectionAsync(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolFinalizeAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateFinalizeAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Finalize an already started AVS connection to a specific AVS SDDC. + /// 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 storage pool. + /// Storage pool FinalizeAvsConnection properties. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response FinalizeAvsConnection(string subscriptionId, string resourceGroupName, string storagePoolName, StoragePoolFinalizeAvsConnectionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateFinalizeAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRepairAvsConnectionRequestUri(string subscriptionId, string resourceGroupName, string storagePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/repairAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRepairAvsConnectionRequest(string subscriptionId, string resourceGroupName, string storagePoolName) + { + 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/PureStorage.Block/storagePools/", false); + uri.AppendPath(storagePoolName, true); + uri.AppendPath("/repairAvsConnection", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Test and repair, if needed, all configuration elements of the storage pool connection to the AVS instance. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RepairAvsConnectionAsync(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateRepairAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Test and repair, if needed, all configuration elements of the storage pool connection to the AVS instance. + /// 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 storage pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RepairAvsConnection(string subscriptionId, string resourceGroupName, string storagePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(storagePoolName, nameof(storagePoolName)); + + using var message = CreateRepairAvsConnectionRequest(subscriptionId, resourceGroupName, storagePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + 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 storage pools 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: + { + StoragePoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List storage pools 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: + { + StoragePoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StoragePoolListResult.DeserializeStoragePoolListResult(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 storage pools by Azure 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: + { + StoragePoolListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List storage pools by Azure 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: + { + StoragePoolListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = StoragePoolListResult.DeserializeStoragePoolListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Properties/AssemblyInfo.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..66966b37c945 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/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.PureStorageBlock.Tests, PublicKey = 0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] + +// Replace Microsoft.Test with the correct resource provider namepace for your service and uncomment. +// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-services-resource-providers +// for the list of possible values. +[assembly: Azure.Core.AzureResourceProviderNamespace("PureStorage.Block")] diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Azure.ResourceManager.PureStorageBlock.Tests.csproj b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Azure.ResourceManager.PureStorageBlock.Tests.csproj new file mode 100644 index 000000000000..330a81396e6a --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/Azure.ResourceManager.PureStorageBlock.Tests.csproj @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestBase.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestBase.cs new file mode 100644 index 000000000000..55b22d9186af --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestBase.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.PureStorageBlock.Tests +{ + public class PureStorageBlockManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + protected PureStorageBlockManagementTestBase(bool isAsync, RecordedTestMode mode) + : base(isAsync, mode) + { + } + + protected PureStorageBlockManagementTestBase(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/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestEnvironment.cs b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestEnvironment.cs new file mode 100644 index 000000000000..005766e8068e --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tests/PureStorageBlockManagementTestEnvironment.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.PureStorageBlock.Tests +{ + public class PureStorageBlockManagementTestEnvironment : TestEnvironment + { + } +} diff --git a/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tsp-location.yaml b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tsp-location.yaml new file mode 100644 index 000000000000..0ccb95a80889 --- /dev/null +++ b/sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/purestorage/PureStorage.Block.Management +commit: c58fa033619b12c7cfa8a0ec5a9bf03bb18869ab +repo: Azure/azure-rest-api-specs diff --git a/sdk/purestorageblock/ci.mgmt.yml b/sdk/purestorageblock/ci.mgmt.yml new file mode 100644 index 000000000000..e60f1ee22625 --- /dev/null +++ b/sdk/purestorageblock/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/purestorageblock/ci.mgmt.yml + - sdk/purestorageblock/Azure.ResourceManager.PureStorageBlock/ + + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: purestorageblock + ArtifactName: packages + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.PureStorageBlock + safeName: AzureResourceManagerPureStorageBlock diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountResource.Serialization.cs index 8d48ca0a670d..be28aa9af082 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Purview { public partial class PurviewAccountResource : IJsonModel { + private static PurviewAccountData s_dataDeserializationInstance; + private static PurviewAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PurviewAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PurviewAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPurviewContext.Default); PurviewAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPurviewContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationResource.Serialization.cs index 19c37538deec..219a2015e89d 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewKafkaConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Purview { public partial class PurviewKafkaConfigurationResource : IJsonModel { + private static PurviewKafkaConfigurationData s_dataDeserializationInstance; + private static PurviewKafkaConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PurviewKafkaConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PurviewKafkaConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPurviewContext.Default); PurviewKafkaConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPurviewContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionResource.Serialization.cs index 624d2824c3b2..a667e28f129d 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Purview { public partial class PurviewPrivateEndpointConnectionResource : IJsonModel { + private static PurviewPrivateEndpointConnectionData s_dataDeserializationInstance; + private static PurviewPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PurviewPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PurviewPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPurviewContext.Default); PurviewPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPurviewContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResource.Serialization.cs b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResource.Serialization.cs index d1bc110969e1..5f62631a3a36 100644 --- a/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResource.Serialization.cs +++ b/sdk/purview/Azure.ResourceManager.Purview/src/Generated/PurviewPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Purview { public partial class PurviewPrivateLinkResource : IJsonModel { + private static PurviewPrivateLinkResourceData s_dataDeserializationInstance; + private static PurviewPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PurviewPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PurviewPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerPurviewContext.Default); PurviewPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerPurviewContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quantum/Azure.ResourceManager.Quantum/src/Generated/QuantumWorkspaceResource.Serialization.cs b/sdk/quantum/Azure.ResourceManager.Quantum/src/Generated/QuantumWorkspaceResource.Serialization.cs index cf6b477efa54..966b6f4674df 100644 --- a/sdk/quantum/Azure.ResourceManager.Quantum/src/Generated/QuantumWorkspaceResource.Serialization.cs +++ b/sdk/quantum/Azure.ResourceManager.Quantum/src/Generated/QuantumWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quantum { public partial class QuantumWorkspaceResource : IJsonModel { + private static QuantumWorkspaceData s_dataDeserializationInstance; + private static QuantumWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QuantumWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QuantumWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuantumContext.Default); QuantumWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuantumContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/qumulo/Azure.ResourceManager.Qumulo/src/Generated/QumuloFileSystemResource.Serialization.cs b/sdk/qumulo/Azure.ResourceManager.Qumulo/src/Generated/QumuloFileSystemResource.Serialization.cs index 768e7a12ecfd..b8f8d2badefc 100644 --- a/sdk/qumulo/Azure.ResourceManager.Qumulo/src/Generated/QumuloFileSystemResource.Serialization.cs +++ b/sdk/qumulo/Azure.ResourceManager.Qumulo/src/Generated/QumuloFileSystemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Qumulo { public partial class QumuloFileSystemResource : IJsonModel { + private static QumuloFileSystemResourceData s_dataDeserializationInstance; + private static QumuloFileSystemResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QumuloFileSystemResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QumuloFileSystemResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQumuloContext.Default); QumuloFileSystemResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQumuloContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentQuotaLimitBaseResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentQuotaLimitBaseResource.Serialization.cs index 2aea77d18901..545448e32ab6 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentQuotaLimitBaseResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentQuotaLimitBaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class CurrentQuotaLimitBaseResource : IJsonModel { + private static CurrentQuotaLimitBaseData s_dataDeserializationInstance; + private static CurrentQuotaLimitBaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CurrentQuotaLimitBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CurrentQuotaLimitBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); CurrentQuotaLimitBaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentUsagesBaseResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentUsagesBaseResource.Serialization.cs index 3b6b4648bfc4..fb2f06e0c6d5 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentUsagesBaseResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/CurrentUsagesBaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class CurrentUsagesBaseResource : IJsonModel { + private static CurrentUsagesBaseData s_dataDeserializationInstance; + private static CurrentUsagesBaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CurrentUsagesBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CurrentUsagesBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); CurrentUsagesBaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.Serialization.cs index e9a749eade8c..a7114b810087 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaEntityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class GroupQuotaEntityResource : IJsonModel { + private static GroupQuotaEntityData s_dataDeserializationInstance; + private static GroupQuotaEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GroupQuotaEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GroupQuotaEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); GroupQuotaEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaLimitListResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaLimitListResource.Serialization.cs index db084a4c3847..e5f5040dfc36 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaLimitListResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaLimitListResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class GroupQuotaLimitListResource : IJsonModel { + private static GroupQuotaLimitListData s_dataDeserializationInstance; + private static GroupQuotaLimitListData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GroupQuotaLimitListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GroupQuotaLimitListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); GroupQuotaLimitListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaRequestStatusResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaRequestStatusResource.Serialization.cs index 25e7c3204740..a9955c21ce04 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaRequestStatusResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaRequestStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class GroupQuotaRequestStatusResource : IJsonModel { + private static GroupQuotaRequestStatusData s_dataDeserializationInstance; + private static GroupQuotaRequestStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GroupQuotaRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GroupQuotaRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); GroupQuotaRequestStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionRequestStatusResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionRequestStatusResource.Serialization.cs index 0d93ac607bd0..3244d5980c8e 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionRequestStatusResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionRequestStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class GroupQuotaSubscriptionRequestStatusResource : IJsonModel { + private static GroupQuotaSubscriptionRequestStatusData s_dataDeserializationInstance; + private static GroupQuotaSubscriptionRequestStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GroupQuotaSubscriptionRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GroupQuotaSubscriptionRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); GroupQuotaSubscriptionRequestStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionResource.Serialization.cs index 46dd1b5111d7..1dcf7e2c7330 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/GroupQuotaSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class GroupQuotaSubscriptionResource : IJsonModel { + private static GroupQuotaSubscriptionData s_dataDeserializationInstance; + private static GroupQuotaSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GroupQuotaSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GroupQuotaSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); GroupQuotaSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusResource.Serialization.cs index 8ffef23d26de..1fed30a0b3c9 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaAllocationRequestStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class QuotaAllocationRequestStatusResource : IJsonModel { + private static QuotaAllocationRequestStatusData s_dataDeserializationInstance; + private static QuotaAllocationRequestStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QuotaAllocationRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QuotaAllocationRequestStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); QuotaAllocationRequestStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaRequestDetailResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaRequestDetailResource.Serialization.cs index faafa7b2e40e..49c78879f509 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaRequestDetailResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/QuotaRequestDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class QuotaRequestDetailResource : IJsonModel { + private static QuotaRequestDetailData s_dataDeserializationInstance; + private static QuotaRequestDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QuotaRequestDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QuotaRequestDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); QuotaRequestDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListResource.Serialization.cs b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListResource.Serialization.cs index a4b499ac3c89..6618e1c30508 100644 --- a/sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListResource.Serialization.cs +++ b/sdk/quota/Azure.ResourceManager.Quota/src/Generated/SubscriptionQuotaAllocationsListResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Quota { public partial class SubscriptionQuotaAllocationsListResource : IJsonModel { + private static SubscriptionQuotaAllocationsListData s_dataDeserializationInstance; + private static SubscriptionQuotaAllocationsListData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionQuotaAllocationsListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionQuotaAllocationsListData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerQuotaContext.Default); SubscriptionQuotaAllocationsListData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerQuotaContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.Serialization.cs index 0cd0dc1197d6..dc47f75cd9e7 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupEngineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupEngineResource : IJsonModel { + private static BackupEngineData s_dataDeserializationInstance; + private static BackupEngineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupEngineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupEngineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.Serialization.cs index dc311cb75bce..2ffb8fbe0577 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupJobResource : IJsonModel { + private static BackupJobData s_dataDeserializationInstance; + private static BackupJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.Serialization.cs index 72d8dea379a4..4fb857a6a94f 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupPrivateEndpointConnectionResource : IJsonModel { + private static BackupPrivateEndpointConnectionData s_dataDeserializationInstance; + private static BackupPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.Serialization.cs index 750163bfd7b9..0d280f0b4075 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectedItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupProtectedItemResource : IJsonModel { + private static BackupProtectedItemData s_dataDeserializationInstance; + private static BackupProtectedItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupProtectedItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.Serialization.cs index 2b3b46207282..81fe5903df44 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupProtectionContainerResource : IJsonModel { + private static BackupProtectionContainerData s_dataDeserializationInstance; + private static BackupProtectionContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupProtectionContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.Serialization.cs index 5a58762767f1..cf603d342575 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionIntentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupProtectionIntentResource : IJsonModel { + private static BackupProtectionIntentData s_dataDeserializationInstance; + private static BackupProtectionIntentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupProtectionIntentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.Serialization.cs index a499488a479d..0e4ad87dceb4 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupProtectionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupProtectionPolicyResource : IJsonModel { + private static BackupProtectionPolicyData s_dataDeserializationInstance; + private static BackupProtectionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupProtectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupProtectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupProtectionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.Serialization.cs index f96d413a220b..208e0f08e97b 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupRecoveryPointResource : IJsonModel { + private static BackupRecoveryPointData s_dataDeserializationInstance; + private static BackupRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.Serialization.cs index 1f251886be5a..489cf691ce4e 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupResourceConfigResource : IJsonModel { + private static BackupResourceConfigData s_dataDeserializationInstance; + private static BackupResourceConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupResourceConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupResourceConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupResourceConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.Serialization.cs index 8a4013dd7d77..077188946f15 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceEncryptionConfigExtendedResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupResourceEncryptionConfigExtendedResource : IJsonModel { + private static BackupResourceEncryptionConfigExtendedData s_dataDeserializationInstance; + private static BackupResourceEncryptionConfigExtendedData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupResourceEncryptionConfigExtendedData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupResourceEncryptionConfigExtendedData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupResourceEncryptionConfigExtendedData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.Serialization.cs index 402eaeb6c798..95871e990ecb 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/BackupResourceVaultConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class BackupResourceVaultConfigResource : IJsonModel { + private static BackupResourceVaultConfigData s_dataDeserializationInstance; + private static BackupResourceVaultConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupResourceVaultConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupResourceVaultConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); BackupResourceVaultConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.Serialization.cs b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.Serialization.cs index 10c8c9296943..218e0e32e50a 100644 --- a/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.Serialization.cs +++ b/sdk/recoveryservices-backup/Azure.ResourceManager.RecoveryServicesBackup/src/Generated/ResourceGuardProxyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesBackup { public partial class ResourceGuardProxyResource : IJsonModel { + private static ResourceGuardProxyData s_dataDeserializationInstance; + private static ResourceGuardProxyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceGuardProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceGuardProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); ResourceGuardProxyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesBackupContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs index 94507090c95f..a45979f48dbe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEmailConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationEmailConfigurationResource : IJsonModel { + private static DataReplicationEmailConfigurationData s_dataDeserializationInstance; + private static DataReplicationEmailConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationEmailConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationEmailConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationEmailConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs index b5026b63dd88..68a68d4a90fa 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationEventResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationEventResource : IJsonModel { + private static DataReplicationEventData s_dataDeserializationInstance; + private static DataReplicationEventData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs index 8f2cee87af62..74707dbcaa0f 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationExtensionResource : IJsonModel { + private static DataReplicationExtensionData s_dataDeserializationInstance; + private static DataReplicationExtensionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationExtensionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationExtensionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs index e4030e8929ec..72dd0ed56304 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationFabricAgentResource : IJsonModel { + private static DataReplicationFabricAgentData s_dataDeserializationInstance; + private static DataReplicationFabricAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationFabricAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationFabricAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationFabricAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs index fe9c63293abd..029d543f6d63 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationFabricResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationFabricResource : IJsonModel { + private static DataReplicationFabricData s_dataDeserializationInstance; + private static DataReplicationFabricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs index 7a4c0ee0e90c..bb4416908a88 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationJobResource : IJsonModel { + private static DataReplicationJobData s_dataDeserializationInstance; + private static DataReplicationJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs index 585c75b9f878..19db468db9f2 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationPolicyResource : IJsonModel { + private static DataReplicationPolicyData s_dataDeserializationInstance; + private static DataReplicationPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs index 25dea4384794..1f69f35f537c 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionProxyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationPrivateEndpointConnectionProxyResource : IJsonModel { + private static DataReplicationPrivateEndpointConnectionProxyData s_dataDeserializationInstance; + private static DataReplicationPrivateEndpointConnectionProxyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationPrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationPrivateEndpointConnectionProxyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationPrivateEndpointConnectionProxyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs index 1363afaa58b7..4bf166e58fee 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationPrivateEndpointConnectionResource : IJsonModel { + private static DataReplicationPrivateEndpointConnectionData s_dataDeserializationInstance; + private static DataReplicationPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs index 57bf0cbd19c6..8f5bed934517 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationPrivateLinkResource : IJsonModel { + private static DataReplicationPrivateLinkResourceData s_dataDeserializationInstance; + private static DataReplicationPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs index b423075e2953..6495c524cf21 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationProtectedItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationProtectedItemResource : IJsonModel { + private static DataReplicationProtectedItemData s_dataDeserializationInstance; + private static DataReplicationProtectedItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationProtectedItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs index 4d8e79b1f9e8..9e1687b6dcfe 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationRecoveryPointResource : IJsonModel { + private static DataReplicationRecoveryPointData s_dataDeserializationInstance; + private static DataReplicationRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs index 55a01b42873d..016cb7df49aa 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/DataReplicationVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication { public partial class DataReplicationVaultResource : IJsonModel { + private static DataReplicationVaultData s_dataDeserializationInstance; + private static DataReplicationVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataReplicationVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataReplicationVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); DataReplicationVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesDataReplicationContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AffectedObjectDetailsType.cs b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AffectedObjectDetailsType.cs index 96e802a4d02a..c1631ea3f23b 100644 --- a/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AffectedObjectDetailsType.cs +++ b/sdk/recoveryservices-datareplication/Azure.ResourceManager.RecoveryServicesDataReplication/src/Generated/Models/AffectedObjectDetailsType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.RecoveryServicesDataReplication.Models { - /// The JobModelCustomPropertiesAffectedObjectDetails_type. + /// The JobModelCustomPropertiesAffectedObjectDetailsType. public readonly partial struct AffectedObjectDetailsType : IEquatable { private readonly string _value; diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/MigrationRecoveryPointResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/MigrationRecoveryPointResource.Serialization.cs index 839e9bcb9cb4..59e90e5b1a5a 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/MigrationRecoveryPointResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/MigrationRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class MigrationRecoveryPointResource : IJsonModel { + private static MigrationRecoveryPointData s_dataDeserializationInstance; + private static MigrationRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); MigrationRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ProtectionContainerMappingResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ProtectionContainerMappingResource.Serialization.cs index 437ed5d8f032..7db7e8aad2c3 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ProtectionContainerMappingResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ProtectionContainerMappingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class ProtectionContainerMappingResource : IJsonModel { + private static ProtectionContainerMappingData s_dataDeserializationInstance; + private static ProtectionContainerMappingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProtectionContainerMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProtectionContainerMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); ProtectionContainerMappingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationEligibilityResultResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationEligibilityResultResource.Serialization.cs index edd344a4a3b3..42c5f82b5255 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationEligibilityResultResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationEligibilityResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class ReplicationEligibilityResultResource : IJsonModel { + private static ReplicationEligibilityResultData s_dataDeserializationInstance; + private static ReplicationEligibilityResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReplicationEligibilityResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReplicationEligibilityResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); ReplicationEligibilityResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectedItemResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectedItemResource.Serialization.cs index 61716d426f35..4278aa9d9833 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectedItemResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectedItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class ReplicationProtectedItemResource : IJsonModel { + private static ReplicationProtectedItemData s_dataDeserializationInstance; + private static ReplicationProtectedItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReplicationProtectedItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); ReplicationProtectedItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectionIntentResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectionIntentResource.Serialization.cs index 3b1653aaa085..1367eac42e61 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectionIntentResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/ReplicationProtectionIntentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class ReplicationProtectionIntentResource : IJsonModel { + private static ReplicationProtectionIntentData s_dataDeserializationInstance; + private static ReplicationProtectionIntentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReplicationProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReplicationProtectionIntentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); ReplicationProtectionIntentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryAlertResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryAlertResource.Serialization.cs index 79fde68f3e93..cee9add89cf8 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryAlertResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryAlertResource : IJsonModel { + private static SiteRecoveryAlertData s_dataDeserializationInstance; + private static SiteRecoveryAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryClusterRecoveryPointResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryClusterRecoveryPointResource.Serialization.cs index 1090b95811b9..802cae7387e1 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryClusterRecoveryPointResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryClusterRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryClusterRecoveryPointResource : IJsonModel { + private static SiteRecoveryClusterRecoveryPointData s_dataDeserializationInstance; + private static SiteRecoveryClusterRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryClusterRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryClusterRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryClusterRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryEventResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryEventResource.Serialization.cs index d428b1499e9c..64d89767d9c8 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryEventResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryEventResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryEventResource : IJsonModel { + private static SiteRecoveryEventData s_dataDeserializationInstance; + private static SiteRecoveryEventData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryFabricResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryFabricResource.Serialization.cs index 873cc409f59c..77b6fa6b3ce1 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryFabricResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryFabricResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryFabricResource : IJsonModel { + private static SiteRecoveryFabricData s_dataDeserializationInstance; + private static SiteRecoveryFabricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryFabricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryFabricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryJobResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryJobResource.Serialization.cs index cef793a08240..b8e6ee0a88ef 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryJobResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryJobResource : IJsonModel { + private static SiteRecoveryJobData s_dataDeserializationInstance; + private static SiteRecoveryJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryLogicalNetworkResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryLogicalNetworkResource.Serialization.cs index bcaefdf2ba7d..f4beac161c82 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryLogicalNetworkResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryLogicalNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryLogicalNetworkResource : IJsonModel { + private static SiteRecoveryLogicalNetworkData s_dataDeserializationInstance; + private static SiteRecoveryLogicalNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryLogicalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryLogicalNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryLogicalNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryMigrationItemResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryMigrationItemResource.Serialization.cs index b916b75799b8..7663008e8efa 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryMigrationItemResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryMigrationItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryMigrationItemResource : IJsonModel { + private static SiteRecoveryMigrationItemData s_dataDeserializationInstance; + private static SiteRecoveryMigrationItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryMigrationItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryMigrationItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryMigrationItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkMappingResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkMappingResource.Serialization.cs index f397d0d1fd5b..12e47c5090c3 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkMappingResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkMappingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryNetworkMappingResource : IJsonModel { + private static SiteRecoveryNetworkMappingData s_dataDeserializationInstance; + private static SiteRecoveryNetworkMappingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryNetworkMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryNetworkMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryNetworkMappingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkResource.Serialization.cs index 0d0c61237a27..160424d2b69b 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryNetworkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryNetworkResource : IJsonModel { + private static SiteRecoveryNetworkData s_dataDeserializationInstance; + private static SiteRecoveryNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPointResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPointResource.Serialization.cs index 05f59a401f5c..b9ddd895e3ad 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPointResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryPointResource : IJsonModel { + private static SiteRecoveryPointData s_dataDeserializationInstance; + private static SiteRecoveryPointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryPointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryPointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPolicyResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPolicyResource.Serialization.cs index d0aa9f369a48..54bbda1f303d 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPolicyResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryPolicyResource : IJsonModel { + private static SiteRecoveryPolicyData s_dataDeserializationInstance; + private static SiteRecoveryPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectableItemResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectableItemResource.Serialization.cs index 253296b1e2be..247f22cbdc2b 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectableItemResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectableItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryProtectableItemResource : IJsonModel { + private static SiteRecoveryProtectableItemData s_dataDeserializationInstance; + private static SiteRecoveryProtectableItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryProtectableItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryProtectableItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryProtectableItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectionContainerResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectionContainerResource.Serialization.cs index aeb571c9d541..fe9f50e03650 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectionContainerResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryProtectionContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryProtectionContainerResource : IJsonModel { + private static SiteRecoveryProtectionContainerData s_dataDeserializationInstance; + private static SiteRecoveryProtectionContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryProtectionContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryProtectionContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryRecoveryPlanResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryRecoveryPlanResource.Serialization.cs index 0aab00a0e53f..9f968f08b2c0 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryRecoveryPlanResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryRecoveryPlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryRecoveryPlanResource : IJsonModel { + private static SiteRecoveryRecoveryPlanData s_dataDeserializationInstance; + private static SiteRecoveryRecoveryPlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryRecoveryPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryRecoveryPlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryRecoveryPlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryReplicationProtectionClusterResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryReplicationProtectionClusterResource.Serialization.cs index a8886600a540..1e907eaf7872 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryReplicationProtectionClusterResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryReplicationProtectionClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryReplicationProtectionClusterResource : IJsonModel { + private static SiteRecoveryReplicationProtectionClusterData s_dataDeserializationInstance; + private static SiteRecoveryReplicationProtectionClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryReplicationProtectionClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryReplicationProtectionClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryReplicationProtectionClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryServicesProviderResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryServicesProviderResource.Serialization.cs index 6bbcc2c2cdb9..a38a411f35dd 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryServicesProviderResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryServicesProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryServicesProviderResource : IJsonModel { + private static SiteRecoveryServicesProviderData s_dataDeserializationInstance; + private static SiteRecoveryServicesProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryServicesProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryServicesProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryServicesProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVCenterResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVCenterResource.Serialization.cs index 0f3b8969ca78..26308bbfd1bd 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVCenterResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVCenterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryVCenterResource : IJsonModel { + private static SiteRecoveryVCenterData s_dataDeserializationInstance; + private static SiteRecoveryVCenterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryVCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryVCenterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryVCenterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVaultSettingResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVaultSettingResource.Serialization.cs index abe4273fc02b..ac1da5620c5f 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVaultSettingResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/SiteRecoveryVaultSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class SiteRecoveryVaultSettingResource : IJsonModel { + private static SiteRecoveryVaultSettingData s_dataDeserializationInstance; + private static SiteRecoveryVaultSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteRecoveryVaultSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteRecoveryVaultSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); SiteRecoveryVaultSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationMappingResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationMappingResource.Serialization.cs index fedb9740db4e..7b053dab3fe6 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationMappingResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationMappingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class StorageClassificationMappingResource : IJsonModel { + private static StorageClassificationMappingData s_dataDeserializationInstance; + private static StorageClassificationMappingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageClassificationMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageClassificationMappingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); StorageClassificationMappingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationResource.Serialization.cs b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationResource.Serialization.cs index c90bb94aa26b..ae36eda387a8 100644 --- a/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationResource.Serialization.cs +++ b/sdk/recoveryservices-siterecovery/Azure.ResourceManager.RecoveryServicesSiteRecovery/src/Generated/StorageClassificationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServicesSiteRecovery { public partial class StorageClassificationResource : IJsonModel { + private static StorageClassificationData s_dataDeserializationInstance; + private static StorageClassificationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageClassificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageClassificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); StorageClassificationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesSiteRecoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResource.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResource.Serialization.cs index b729e4d73c9b..bd8846e1687a 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResource.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServices { public partial class RecoveryServicesPrivateLinkResource : IJsonModel { + private static RecoveryServicesPrivateLinkResourceData s_dataDeserializationInstance; + private static RecoveryServicesPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecoveryServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecoveryServicesPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesContext.Default); RecoveryServicesPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoResource.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoResource.Serialization.cs index a7bfeba44207..a561da871e5a 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoResource.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultExtendedInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServices { public partial class RecoveryServicesVaultExtendedInfoResource : IJsonModel { + private static RecoveryServicesVaultExtendedInfoData s_dataDeserializationInstance; + private static RecoveryServicesVaultExtendedInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecoveryServicesVaultExtendedInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecoveryServicesVaultExtendedInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesContext.Default); RecoveryServicesVaultExtendedInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultResource.Serialization.cs b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultResource.Serialization.cs index 035c2b30d25a..a3eca70f9420 100644 --- a/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultResource.Serialization.cs +++ b/sdk/recoveryservices/Azure.ResourceManager.RecoveryServices/src/Generated/RecoveryServicesVaultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RecoveryServices { public partial class RecoveryServicesVaultResource : IJsonModel { + private static RecoveryServicesVaultData s_dataDeserializationInstance; + private static RecoveryServicesVaultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecoveryServicesVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecoveryServicesVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRecoveryServicesContext.Default); RecoveryServicesVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRecoveryServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.Serialization.cs index 32eb5436b256..cb915ca67b90 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisCacheAccessPolicyAssignmentResource : IJsonModel { + private static RedisCacheAccessPolicyAssignmentData s_dataDeserializationInstance; + private static RedisCacheAccessPolicyAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisCacheAccessPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisCacheAccessPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisCacheAccessPolicyAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.Serialization.cs index 758db7938cf2..384e94d86a6f 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisCacheAccessPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisCacheAccessPolicyResource : IJsonModel { + private static RedisCacheAccessPolicyData s_dataDeserializationInstance; + private static RedisCacheAccessPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisCacheAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisCacheAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisCacheAccessPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.Serialization.cs index 8bd050750667..4f707d2409a3 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisFirewallRuleResource : IJsonModel { + private static RedisFirewallRuleData s_dataDeserializationInstance; + private static RedisFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.Serialization.cs index 55f5177d1e8c..a1d25a09e425 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisLinkedServerWithPropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisLinkedServerWithPropertyResource : IJsonModel { + private static RedisLinkedServerWithPropertyData s_dataDeserializationInstance; + private static RedisLinkedServerWithPropertyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisLinkedServerWithPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisLinkedServerWithPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisLinkedServerWithPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.Serialization.cs index 9ac7b30bb070..d99beea41769 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPatchScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisPatchScheduleResource : IJsonModel { + private static RedisPatchScheduleData s_dataDeserializationInstance; + private static RedisPatchScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisPatchScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisPatchScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisPatchScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.Serialization.cs index e497e5774e3d..576584c17911 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisPrivateEndpointConnectionResource : IJsonModel { + private static RedisPrivateEndpointConnectionData s_dataDeserializationInstance; + private static RedisPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.Serialization.cs b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.Serialization.cs index db0d7b667653..55f69a4f7802 100644 --- a/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.Serialization.cs +++ b/sdk/redis/Azure.ResourceManager.Redis/src/Generated/RedisResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Redis { public partial class RedisResource : IJsonModel { + private static RedisData s_dataDeserializationInstance; + private static RedisData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisContext.Default); RedisData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.Serialization.cs index 1ab275d24482..ac7727f81829 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/AccessPolicyAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RedisEnterprise { public partial class AccessPolicyAssignmentResource : IJsonModel { + private static AccessPolicyAssignmentData s_dataDeserializationInstance; + private static AccessPolicyAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AccessPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AccessPolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisEnterpriseContext.Default); AccessPolicyAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisEnterpriseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.Serialization.cs index ea7806a90ec9..fc122a4185c9 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RedisEnterprise { public partial class RedisEnterpriseClusterResource : IJsonModel { + private static RedisEnterpriseClusterData s_dataDeserializationInstance; + private static RedisEnterpriseClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisEnterpriseClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisEnterpriseClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisEnterpriseContext.Default); RedisEnterpriseClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisEnterpriseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.Serialization.cs index c58051c62d47..c19810fb0152 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterpriseDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RedisEnterprise { public partial class RedisEnterpriseDatabaseResource : IJsonModel { + private static RedisEnterpriseDatabaseData s_dataDeserializationInstance; + private static RedisEnterpriseDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisEnterpriseDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisEnterpriseDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisEnterpriseContext.Default); RedisEnterpriseDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisEnterpriseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.Serialization.cs b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.Serialization.cs index 6508ea72f7e0..f682f4afe7f4 100644 --- a/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/redisenterprise/Azure.ResourceManager.RedisEnterprise/src/Generated/RedisEnterprisePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.RedisEnterprise { public partial class RedisEnterprisePrivateEndpointConnectionResource : IJsonModel { + private static RedisEnterprisePrivateEndpointConnectionData s_dataDeserializationInstance; + private static RedisEnterprisePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RedisEnterprisePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RedisEnterprisePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRedisEnterpriseContext.Default); RedisEnterprisePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRedisEnterpriseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionAuthorizationRuleResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionAuthorizationRuleResource.Serialization.cs index 57466b408bd0..bd2d473c61c7 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionAuthorizationRuleResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayHybridConnectionAuthorizationRuleResource : IJsonModel { + private static RelayAuthorizationRuleData s_dataDeserializationInstance; + private static RelayAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionResource.Serialization.cs index 64b9c127848e..e36f5638c9f7 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayHybridConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayHybridConnectionResource : IJsonModel { + private static RelayHybridConnectionData s_dataDeserializationInstance; + private static RelayHybridConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayHybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayHybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayHybridConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceAuthorizationRuleResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceAuthorizationRuleResource.Serialization.cs index d9a816aee395..beaa4f8a9fab 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceAuthorizationRuleResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayNamespaceAuthorizationRuleResource : IJsonModel { + private static RelayAuthorizationRuleData s_dataDeserializationInstance; + private static RelayAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceResource.Serialization.cs index 85c6c9e63d23..5b87d674d531 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayNamespaceResource : IJsonModel { + private static RelayNamespaceData s_dataDeserializationInstance; + private static RelayNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNetworkRuleSetResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNetworkRuleSetResource.Serialization.cs index b6973f8f2969..8556e3131f9f 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNetworkRuleSetResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayNetworkRuleSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayNetworkRuleSetResource : IJsonModel { + private static RelayNetworkRuleSetData s_dataDeserializationInstance; + private static RelayNetworkRuleSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayNetworkRuleSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateEndpointConnectionResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateEndpointConnectionResource.Serialization.cs index a6918ca922c0..8ec0c7d96ac8 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayPrivateEndpointConnectionResource : IJsonModel { + private static RelayPrivateEndpointConnectionData s_dataDeserializationInstance; + private static RelayPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateLinkResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateLinkResource.Serialization.cs index 560edf2f7011..414104340c4b 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateLinkResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/RelayPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class RelayPrivateLinkResource : IJsonModel { + private static RelayPrivateLinkResourceData s_dataDeserializationInstance; + private static RelayPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayAuthorizationRuleResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayAuthorizationRuleResource.Serialization.cs index 1d28509974fc..8c4b6940dad7 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayAuthorizationRuleResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class WcfRelayAuthorizationRuleResource : IJsonModel { + private static RelayAuthorizationRuleData s_dataDeserializationInstance; + private static RelayAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); RelayAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayResource.Serialization.cs b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayResource.Serialization.cs index ae47911758d7..6b637224e898 100644 --- a/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayResource.Serialization.cs +++ b/sdk/relay/Azure.ResourceManager.Relay/src/Generated/WcfRelayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Relay { public partial class WcfRelayResource : IJsonModel { + private static WcfRelayData s_dataDeserializationInstance; + private static WcfRelayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WcfRelayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WcfRelayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerRelayContext.Default); WcfRelayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerRelayContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/QuotaRequestDetailResource.Serialization.cs b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/QuotaRequestDetailResource.Serialization.cs index 7e214c30f081..25773617fd23 100644 --- a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/QuotaRequestDetailResource.Serialization.cs +++ b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/QuotaRequestDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Reservations { public partial class QuotaRequestDetailResource : IJsonModel { + private static QuotaRequestDetailData s_dataDeserializationInstance; + private static QuotaRequestDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QuotaRequestDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QuotaRequestDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerReservationsContext.Default); QuotaRequestDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerReservationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationDetailResource.Serialization.cs b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationDetailResource.Serialization.cs index 06af9b878b57..ff697019b3d4 100644 --- a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationDetailResource.Serialization.cs +++ b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Reservations { public partial class ReservationDetailResource : IJsonModel { + private static ReservationDetailData s_dataDeserializationInstance; + private static ReservationDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReservationDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReservationDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerReservationsContext.Default); ReservationDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerReservationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationOrderResource.Serialization.cs b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationOrderResource.Serialization.cs index ac960ed86a4d..e883f9a82c58 100644 --- a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationOrderResource.Serialization.cs +++ b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Reservations { public partial class ReservationOrderResource : IJsonModel { + private static ReservationOrderData s_dataDeserializationInstance; + private static ReservationOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReservationOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReservationOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerReservationsContext.Default); ReservationOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerReservationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationQuotaResource.Serialization.cs b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationQuotaResource.Serialization.cs index 7b894cfc81e5..aef32d5f87cd 100644 --- a/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationQuotaResource.Serialization.cs +++ b/sdk/reservations/Azure.ResourceManager.Reservations/src/Generated/ReservationQuotaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Reservations { public partial class ReservationQuotaResource : IJsonModel { + private static ReservationQuotaData s_dataDeserializationInstance; + private static ReservationQuotaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ReservationQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ReservationQuotaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerReservationsContext.Default); ReservationQuotaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerReservationsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/src/Generated/ResourceConnectorApplianceResource.Serialization.cs b/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/src/Generated/ResourceConnectorApplianceResource.Serialization.cs index eff1c0937d7f..33435b2a5112 100644 --- a/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/src/Generated/ResourceConnectorApplianceResource.Serialization.cs +++ b/sdk/resourceconnector/Azure.ResourceManager.ResourceConnector/src/Generated/ResourceConnectorApplianceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceConnector { public partial class ResourceConnectorApplianceResource : IJsonModel { + private static ResourceConnectorApplianceData s_dataDeserializationInstance; + private static ResourceConnectorApplianceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceConnectorApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceConnectorApplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceConnectorContext.Default); ResourceConnectorApplianceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceConnectorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventImpactedResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventImpactedResource.Serialization.cs index 2f976f37b1d0..edb2c7167079 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventImpactedResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventImpactedResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class ResourceHealthEventImpactedResource : IJsonModel { + private static ResourceHealthEventImpactedResourceData s_dataDeserializationInstance; + private static ResourceHealthEventImpactedResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthEventImpactedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthEventImpactedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ResourceHealthEventImpactedResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventResource.Serialization.cs index dbf28a2bfae6..608a68e2d3f5 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthEventResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class ResourceHealthEventResource : IJsonModel { + private static ResourceHealthEventData s_dataDeserializationInstance; + private static ResourceHealthEventData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ResourceHealthEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthMetadataEntityResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthMetadataEntityResource.Serialization.cs index 568bb1c4c135..b46991082eb4 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthMetadataEntityResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ResourceHealthMetadataEntityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class ResourceHealthMetadataEntityResource : IJsonModel { + private static ResourceHealthMetadataEntityData s_dataDeserializationInstance; + private static ResourceHealthMetadataEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthMetadataEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthMetadataEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ResourceHealthMetadataEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ServiceEmergingIssueResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ServiceEmergingIssueResource.Serialization.cs index cc4224c540a9..70fb31a8c71b 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ServiceEmergingIssueResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/ServiceEmergingIssueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class ServiceEmergingIssueResource : IJsonModel { + private static ServiceEmergingIssueData s_dataDeserializationInstance; + private static ServiceEmergingIssueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceEmergingIssueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceEmergingIssueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ServiceEmergingIssueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventImpactedResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventImpactedResource.Serialization.cs index 3c70860f53ae..d977a6292720 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventImpactedResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventImpactedResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class TenantResourceHealthEventImpactedResource : IJsonModel { + private static ResourceHealthEventImpactedResourceData s_dataDeserializationInstance; + private static ResourceHealthEventImpactedResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthEventImpactedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthEventImpactedResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ResourceHealthEventImpactedResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventResource.Serialization.cs b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventResource.Serialization.cs index c9c4fe068bcd..19badf3b728b 100644 --- a/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventResource.Serialization.cs +++ b/sdk/resourcehealth/Azure.ResourceManager.ResourceHealth/src/Generated/TenantResourceHealthEventResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceHealth { public partial class TenantResourceHealthEventResource : IJsonModel { + private static ResourceHealthEventData s_dataDeserializationInstance; + private static ResourceHealthEventData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthEventData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceHealthContext.Default); ResourceHealthEventData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceHealthContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupResource.Serialization.cs index 885eb9f6c179..daf7ad847873 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagementGroups { public partial class ManagementGroupResource : IJsonModel { + private static ManagementGroupData s_dataDeserializationInstance; + private static ManagementGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagementGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); ManagementGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupSubscriptionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupSubscriptionResource.Serialization.cs index 5362c13a26a6..27395325f3ed 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupSubscriptionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/ManagementGroup/Generated/ManagementGroupSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ManagementGroups { public partial class ManagementGroupSubscriptionResource : IJsonModel { + private static ManagementGroupSubscriptionData s_dataDeserializationInstance; + private static ManagementGroupSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagementGroupSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagementGroupSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); ManagementGroupSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/DataPolicyManifestResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/DataPolicyManifestResource.Serialization.cs index 422ac185fa22..6c713c5dfefa 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/DataPolicyManifestResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/DataPolicyManifestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class DataPolicyManifestResource : IJsonModel { + private static DataPolicyManifestData s_dataDeserializationInstance; + private static DataPolicyManifestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataPolicyManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataPolicyManifestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); DataPolicyManifestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/FeatureResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/FeatureResource.Serialization.cs index 92689ee00632..264d1675fcd7 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/FeatureResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/FeatureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class FeatureResource : IJsonModel { + private static FeatureData s_dataDeserializationInstance; + private static FeatureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); FeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicyDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicyDefinitionResource.Serialization.cs index dac8d383cfab..867c4198383c 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicyDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicyDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ManagementGroupPolicyDefinitionResource : IJsonModel { + private static PolicyDefinitionData s_dataDeserializationInstance; + private static PolicyDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicyDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicySetDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicySetDefinitionResource.Serialization.cs index bd885ee80252..60c244d59e84 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicySetDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementGroupPolicySetDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ManagementGroupPolicySetDefinitionResource : IJsonModel { + private static PolicySetDefinitionData s_dataDeserializationInstance; + private static PolicySetDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicySetDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementLockResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementLockResource.Serialization.cs index 8202d34ca789..3dfbf0b23b84 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementLockResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ManagementLockResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ManagementLockResource : IJsonModel { + private static ManagementLockData s_dataDeserializationInstance; + private static ManagementLockData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagementLockData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagementLockData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); ManagementLockData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/PolicyAssignmentResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/PolicyAssignmentResource.Serialization.cs index 5c8ffa43ab1f..407fb6014fb6 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/PolicyAssignmentResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/PolicyAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class PolicyAssignmentResource : IJsonModel { + private static PolicyAssignmentData s_dataDeserializationInstance; + private static PolicyAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicyAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceGroupResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceGroupResource.Serialization.cs index 06a3552d4dfb..65a084b9bc70 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceGroupResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ResourceGroupResource : IJsonModel { + private static ResourceGroupData s_dataDeserializationInstance; + private static ResourceGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); ResourceGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceProviderResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceProviderResource.Serialization.cs index 61d9d8de7e4b..cff873e5debb 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceProviderResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/ResourceProviderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ResourceProviderResource : IJsonModel { + private static ResourceProviderData s_dataDeserializationInstance; + private static ResourceProviderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceProviderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); ResourceProviderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicyDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicyDefinitionResource.Serialization.cs index f296e7c49440..d98f9066c147 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicyDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicyDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class SubscriptionPolicyDefinitionResource : IJsonModel { + private static PolicyDefinitionData s_dataDeserializationInstance; + private static PolicyDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicyDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicySetDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicySetDefinitionResource.Serialization.cs index 0e47af152cfc..2c9efcff842c 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicySetDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionPolicySetDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class SubscriptionPolicySetDefinitionResource : IJsonModel { + private static PolicySetDefinitionData s_dataDeserializationInstance; + private static PolicySetDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicySetDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionResource.Serialization.cs index 627f84ef32df..138601640e17 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/SubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class SubscriptionResource : IJsonModel { + private static SubscriptionData s_dataDeserializationInstance; + private static SubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); SubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TagResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TagResource.Serialization.cs index 148f1f3b1b6e..14b43eb7c42f 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TagResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TagResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TagResource : IJsonModel { + private static TagResourceData s_dataDeserializationInstance; + private static TagResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TagResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TagResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); TagResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicyDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicyDefinitionResource.Serialization.cs index 3ddc47295668..6d08620cc8d7 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicyDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicyDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TenantPolicyDefinitionResource : IJsonModel { + private static PolicyDefinitionData s_dataDeserializationInstance; + private static PolicyDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicyDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicyDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicySetDefinitionResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicySetDefinitionResource.Serialization.cs index 3346c08f1650..e2e25a534c5d 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicySetDefinitionResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantPolicySetDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TenantPolicySetDefinitionResource : IJsonModel { + private static PolicySetDefinitionData s_dataDeserializationInstance; + private static PolicySetDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PolicySetDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); PolicySetDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.Serialization.cs b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.Serialization.cs index bc3849a1132e..7b9b360a83c5 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.Serialization.cs +++ b/sdk/resourcemanager/Azure.ResourceManager/src/Resources/Generated/TenantResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TenantResource : IJsonModel { + private static TenantData s_dataDeserializationInstance; + private static TenantData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TenantData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TenantData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerContext.Default); TenantData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemanager/ci.mgmt.yml b/sdk/resourcemanager/ci.mgmt.yml index 48f5ec6af73e..3628e1a48f62 100644 --- a/sdk/resourcemanager/ci.mgmt.yml +++ b/sdk/resourcemanager/ci.mgmt.yml @@ -85,6 +85,7 @@ trigger: - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -138,6 +139,7 @@ trigger: - 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 @@ -163,6 +165,7 @@ trigger: - 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 @@ -303,6 +306,7 @@ pr: - sdk/durabletask/Azure.ResourceManager.DurableTask - sdk/dynatrace/Azure.ResourceManager.Dynatrace - sdk/edgeorder/Azure.ResourceManager.EdgeOrder + - sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension - sdk/edgezones/Azure.ResourceManager.EdgeZones - sdk/elastic/Azure.ResourceManager.Elastic - sdk/elasticsan/Azure.ResourceManager.ElasticSan @@ -356,6 +360,7 @@ pr: - 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 @@ -381,6 +386,7 @@ pr: - 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 diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResource.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResource.Serialization.cs index d209a71d1b42..3f7705228ca5 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResource.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceMover { public partial class MoverResource : IJsonModel { + private static MoverResourceData s_dataDeserializationInstance; + private static MoverResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MoverResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MoverResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceMoverContext.Default); MoverResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetResource.Serialization.cs b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetResource.Serialization.cs index b5ba4ebe980c..135169569b75 100644 --- a/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetResource.Serialization.cs +++ b/sdk/resourcemover/Azure.ResourceManager.ResourceMover/src/Generated/MoverResourceSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ResourceMover { public partial class MoverResourceSetResource : IJsonModel { + private static MoverResourceSetData s_dataDeserializationInstance; + private static MoverResourceSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MoverResourceSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MoverResourceSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourceMoverContext.Default); MoverResourceSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourceMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationDefinitionResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationDefinitionResource.Serialization.cs index b46aa4806f7d..34ffa0e9d149 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationDefinitionResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ArmApplicationDefinitionResource : IJsonModel { + private static ArmApplicationDefinitionData s_dataDeserializationInstance; + private static ArmApplicationDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArmApplicationDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArmApplicationDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); ArmApplicationDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationResource.Serialization.cs index ac3070907f0a..db165f0a79fe 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ArmApplicationResource : IJsonModel { + private static ArmApplicationData s_dataDeserializationInstance; + private static ArmApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArmApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArmApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); ArmApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.Serialization.cs index 640eef9ee5eb..6016c39c2153 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ArmDeploymentResource : IJsonModel { + private static ArmDeploymentData s_dataDeserializationInstance; + private static ArmDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArmDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArmDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); ArmDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentScriptResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentScriptResource.Serialization.cs index 4b9de1cbf7d1..12cfd17c381e 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentScriptResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ArmDeploymentScriptResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ArmDeploymentScriptResource : IJsonModel { + private static ArmDeploymentScriptData s_dataDeserializationInstance; + private static ArmDeploymentScriptData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ArmDeploymentScriptData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ArmDeploymentScriptData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); ArmDeploymentScriptData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DataBoundaryResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DataBoundaryResource.Serialization.cs index 77b4f89c25d8..74408d84f1ae 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DataBoundaryResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DataBoundaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class DataBoundaryResource : IJsonModel { + private static DataBoundaryData s_dataDeserializationInstance; + private static DataBoundaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoundaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoundaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); DataBoundaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs index 419c489bb783..f5575620f789 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/DeploymentStackResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class DeploymentStackResource : IJsonModel { + private static DeploymentStackData s_dataDeserializationInstance; + private static DeploymentStackData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeploymentStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeploymentStackData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); DeploymentStackData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestResource.Serialization.cs index ff8aac52f310..36f722ab57e5 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class JitRequestResource : IJsonModel { + private static JitRequestData s_dataDeserializationInstance; + private static JitRequestData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - JitRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + JitRequestData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); JitRequestData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ScriptLogResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ScriptLogResource.Serialization.cs index d438c4007744..e1acabfb38e6 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ScriptLogResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/ScriptLogResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class ScriptLogResource : IJsonModel { + private static ScriptLogData s_dataDeserializationInstance; + private static ScriptLogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ScriptLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ScriptLogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); ScriptLogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecResource.Serialization.cs index d1ac7c276e2c..07d0d801c929 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TemplateSpecResource : IJsonModel { + private static TemplateSpecData s_dataDeserializationInstance; + private static TemplateSpecData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TemplateSpecData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TemplateSpecData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); TemplateSpecData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecVersionResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecVersionResource.Serialization.cs index ed77a2a2007a..b005fd2b4114 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecVersionResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TemplateSpecVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TemplateSpecVersionResource : IJsonModel { + private static TemplateSpecVersionData s_dataDeserializationInstance; + private static TemplateSpecVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TemplateSpecVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TemplateSpecVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); TemplateSpecVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TenantDataBoundaryResource.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TenantDataBoundaryResource.Serialization.cs index 0ebd1d376669..f9c41286d554 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TenantDataBoundaryResource.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/TenantDataBoundaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Resources { public partial class TenantDataBoundaryResource : IJsonModel { + private static DataBoundaryData s_dataDeserializationInstance; + private static DataBoundaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataBoundaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataBoundaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerResourcesContext.Default); DataBoundaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerResourcesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index 239245f4fe1d..439e9e72b978 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Search { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSearchContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSearchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.Serialization.cs index 8a37a0e618a6..75086aa21d1a 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Search { public partial class SearchPrivateEndpointConnectionResource : IJsonModel { + private static SearchPrivateEndpointConnectionData s_dataDeserializationInstance; + private static SearchPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SearchPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SearchPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSearchContext.Default); SearchPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSearchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.Serialization.cs index 6bb268603809..a84a59f14271 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SearchServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Search { public partial class SearchServiceResource : IJsonModel { + private static SearchServiceData s_dataDeserializationInstance; + private static SearchServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SearchServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SearchServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSearchContext.Default); SearchServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSearchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.Serialization.cs b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.Serialization.cs index efa91157f1bb..577d4e0619f4 100644 --- a/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.Serialization.cs +++ b/sdk/search/Azure.ResourceManager.Search/src/Generated/SharedSearchServicePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Search { public partial class SharedSearchServicePrivateLinkResource : IJsonModel { + private static SharedSearchServicePrivateLinkResourceData s_dataDeserializationInstance; + private static SharedSearchServicePrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SharedSearchServicePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SharedSearchServicePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSearchContext.Default); SharedSearchServicePrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSearchContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/search/Azure.Search.Documents/CHANGELOG.md b/sdk/search/Azure.Search.Documents/CHANGELOG.md index 6f775a185224..a522d6571e76 100644 --- a/sdk/search/Azure.Search.Documents/CHANGELOG.md +++ b/sdk/search/Azure.Search.Documents/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 11.7.0-beta.4 (Unreleased) +## 11.7.0-beta.5 (Unreleased) ### Features Added @@ -10,6 +10,20 @@ ### Other Changes +## 11.7.0-beta.4 (2025-05-14) + +### Features Added +- Added new `KnowledgeAgent` resource APIs in `SearchIndexClient` and introduced `KnowledgeAgentRetrievalClient` for managing and querying KnowledgeAgents, enabling multi-index grounding for agentic retrieval. +- Added a method overload for search query to include the `QuerySourceAuthorization` parameter to enforce per-user filtering in queries. +- Added `Resync` method in `SearchIndexerClient` to resync selective options from the data source to be re-ingested by the indexer. +- Added `PermissionFilter` to `SearchField`, `SimpleField`, and `SimpleFieldAttribute`, indicating whether the field should be used as a permission filter. +- Added `PermissionFilterOption` to `SearchIndex`, indicating whether permission filtering is enabled for the index. +- Added `RerankerBoostedScore` to `SemanticSearchResult` and updated `SemanticConfiguration` with a new `RankingOrder` property. +- Introduced new skill `ChatCompletionSkill` that integrates with Azure AI Foundry. +- Enhanced `DocumentIntelligenceLayoutSkill` with new properties: `ChunkingProperties`, `ExtractionOptions`, and `OutputFormat`. +- Added `IndexerPermissionOptions` to `SearchIndexerDataSourceConnection` to support ingestion of various types of permission data. +- Introduced sub-field vector support (multi-vectors) via `VectorQuery.Fields`, and added new query option `VectorQuery.PerDocumentVectorLimit`. + ## 11.7.0-beta.3 (2025-03-25) ### Features Added diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs index b91d8c51e387..c15f5b11fec9 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.net8.0.cs @@ -65,9 +65,11 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede public virtual System.Threading.Tasks.Task> DeleteDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, string querySourceAuthorization, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocumentCount(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentCountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocument(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDocument(string key, string querySourceAuthorization, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IndexDocumentsAsync(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response IndexDocuments(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MergeDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -76,8 +78,10 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede public virtual Azure.Response MergeOrUploadDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(Azure.Search.Documents.SearchOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, string querySourceAuthorization, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Search(Azure.Search.Documents.SearchOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Search(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> Search(string searchText, string querySourceAuthorization, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SuggestAsync(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Suggest(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UploadDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -85,7 +89,7 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede } public partial class SearchClientOptions : Azure.Core.ClientOptions { - public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2025_03_01_Preview) { } + public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2025_05_01_Preview) { } public Azure.Search.Documents.SearchAudience? Audience { get { throw null; } set { } } public Azure.Core.Serialization.ObjectSerializer Serializer { get { throw null; } set { } } public Azure.Search.Documents.SearchClientOptions.ServiceVersion Version { get { throw null; } } @@ -94,7 +98,7 @@ public enum ServiceVersion V2020_06_30 = 1, V2023_11_01 = 2, V2024_07_01 = 3, - V2025_03_01_Preview = 4, + V2025_05_01_Preview = 4, } } public static partial class SearchExtensions @@ -197,6 +201,124 @@ public SuggestOptions() { } public bool? UseFuzzyMatching { get { throw null; } set { } } } } +namespace Azure.Search.Documents.Agents +{ + public partial class KnowledgeAgentRetrievalClient + { + protected KnowledgeAgentRetrievalClient() { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.AzureKeyCredential credential) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.AzureKeyCredential credential, Azure.Search.Documents.SearchClientOptions options) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.Core.TokenCredential tokenCredential) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.Core.TokenCredential tokenCredential, Azure.Search.Documents.SearchClientOptions options) { } + public virtual string AgentName { get { throw null; } } + public virtual System.Uri Endpoint { get { throw null; } } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Retrieve(Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.Search.Documents.Agents.Models +{ + public abstract partial class KnowledgeAgentActivityRecord + { + protected KnowledgeAgentActivityRecord(int id) { } + public int Id { get { throw null; } } + } + public partial class KnowledgeAgentAzureSearchDocReference : Azure.Search.Documents.Agents.Models.KnowledgeAgentReference + { + internal KnowledgeAgentAzureSearchDocReference() : base (default(string), default(int)) { } + public string DocKey { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary SourceData { get { throw null; } } + } + public partial class KnowledgeAgentIndexParams + { + public KnowledgeAgentIndexParams() { } + public string FilterAddOn { get { throw null; } set { } } + public bool? IncludeReferenceSourceData { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + public int? MaxDocsForReranker { get { throw null; } set { } } + public float? RerankerThreshold { get { throw null; } set { } } + } + public partial class KnowledgeAgentMessage + { + public KnowledgeAgentMessage(string role, System.Collections.Generic.IEnumerable content) { } + public System.Collections.Generic.IList Content { get { throw null; } } + public string Role { get { throw null; } set { } } + } + public abstract partial class KnowledgeAgentMessageContent + { + protected KnowledgeAgentMessageContent() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KnowledgeAgentMessageContentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KnowledgeAgentMessageContentType(string value) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType Image { get { throw null; } } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType 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.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType left, Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType right) { throw null; } + public static implicit operator Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType left, Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KnowledgeAgentMessageImageContent : Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContent + { + public KnowledgeAgentMessageImageContent(Azure.Search.Documents.Models.KnowledgeAgentMessageImageContentImage image) { } + public Azure.Search.Documents.Models.KnowledgeAgentMessageImageContentImage Image { get { throw null; } set { } } + } + public partial class KnowledgeAgentMessageTextContent : Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContent + { + public KnowledgeAgentMessageTextContent(string text) { } + public string Text { get { throw null; } set { } } + } + public partial class KnowledgeAgentModelQueryPlanningActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentModelQueryPlanningActivityRecord() : base (default(int)) { } + public int? ElapsedMs { get { throw null; } } + public int? InputTokens { get { throw null; } } + public int? OutputTokens { get { throw null; } } + } + public abstract partial class KnowledgeAgentReference + { + protected KnowledgeAgentReference(string id, int activitySource) { } + public int ActivitySource { get { throw null; } } + public string Id { get { throw null; } } + } + public partial class KnowledgeAgentRetrievalRequest + { + public KnowledgeAgentRetrievalRequest(System.Collections.Generic.IEnumerable messages) { } + public System.Collections.Generic.IList Messages { get { throw null; } } + public System.Collections.Generic.IList TargetIndexParams { get { throw null; } } + } + public partial class KnowledgeAgentRetrievalResponse + { + internal KnowledgeAgentRetrievalResponse() { } + public System.Collections.Generic.IReadOnlyList Activity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList References { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Response { get { throw null; } } + } + public partial class KnowledgeAgentSearchActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentSearchActivityRecord() : base (default(int)) { } + public int? Count { get { throw null; } } + public int? ElapsedMs { get { throw null; } } + public Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery Query { get { throw null; } } + public System.DateTimeOffset? QueryTime { get { throw null; } } + public string TargetIndex { get { throw null; } } + } + public partial class KnowledgeAgentSemanticRankerActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentSemanticRankerActivityRecord() : base (default(int)) { } + public int? ElapsedMs { get { throw null; } } + public int? InputTokens { get { throw null; } } + } +} namespace Azure.Search.Documents.Indexes { public partial class FieldBuilder @@ -235,10 +357,14 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual System.Threading.Tasks.Task> CreateAliasAsync(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateAlias(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateAliasAsync(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -249,6 +375,10 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual Azure.Response DeleteIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteKnowledgeAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteKnowledgeAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteSynonymMap(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -267,6 +397,10 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual System.Threading.Tasks.Task> GetIndexStatisticsAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndexStatsSummary(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexStatsSummaryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetKnowledgeAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetKnowledgeAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetKnowledgeAgents(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetKnowledgeAgentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Search.Documents.SearchClient GetSearchClient(string indexName) { throw null; } public virtual Azure.Response GetServiceStatistics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceStatisticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -357,6 +491,8 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task ResetIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetSkills(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetSkillsAsync(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Resync(string indexerName, Azure.Search.Documents.Models.IndexerResyncBody indexerResync, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResyncAsync(string indexerName, Azure.Search.Documents.Models.IndexerResyncBody indexerResync, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RunIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RunIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -370,6 +506,7 @@ public SimpleFieldAttribute() { } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } public string NormalizerName { get { throw null; } set { } } + public string PermissionFilter { get { throw null; } set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public partial class VectorSearchFieldAttribute : System.Attribute @@ -392,6 +529,7 @@ namespace Azure.Search.Documents.Indexes.Models public AIFoundryModelCatalogName(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV3English { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV3Multilingual { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV4 { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get { throw null; } } @@ -499,6 +637,11 @@ public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChatCompletionExtraParametersBehavior(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior Drop { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior Error { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior PassThrough { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior 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.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior left, Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior left, Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ChatCompletionResponseFormat + { + public ChatCompletionResponseFormat() { } + public Azure.Search.Documents.Models.ChatCompletionResponseFormatJsonSchemaProperties ChatCompletionSchemaProperties { get { throw null; } set { } } + public Azure.Search.Documents.Models.ChatCompletionResponseFormatType? Type { get { throw null; } set { } } + } + public partial class ChatCompletionSchema + { + public ChatCompletionSchema() { } + public bool? AdditionalProperties { get { throw null; } set { } } + public string Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Required { get { throw null; } } + public string Type { get { throw null; } set { } } + } + public partial class ChatCompletionSkill : Azure.Search.Documents.Indexes.Models.WebApiSkill + { + public ChatCompletionSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, string uri) : base (default(System.Collections.Generic.IEnumerable), default(System.Collections.Generic.IEnumerable), default(string)) { } + public string ApiKey { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.CommonModelParameters CommonModelParameters { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ExtraParameters { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior? ExtraParametersBehavior { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionResponseFormat ResponseFormat { get { throw null; } set { } } + } public partial class CjkBigramTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public CjkBigramTokenFilter(string name) { } @@ -682,6 +867,17 @@ public CommonGramTokenFilter(string name, System.Collections.Generic.IEnumerable public bool? IgnoreCase { get { throw null; } set { } } public bool? UseQueryMode { get { throw null; } set { } } } + public partial class CommonModelParameters + { + public CommonModelParameters() { } + public float? FrequencyPenalty { get { throw null; } set { } } + public int? MaxTokens { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public float? PresencePenalty { get { throw null; } set { } } + public int? Seed { get { throw null; } set { } } + public System.Collections.Generic.IList Stop { get { throw null; } set { } } + public float? Temperature { get { throw null; } set { } } + } public partial class ComplexField : Azure.Search.Documents.Indexes.Models.SearchFieldTemplate { public ComplexField(string name, bool collection = false) { } @@ -811,9 +1007,54 @@ public DocumentExtractionSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingProperties ChunkingProperties { get { throw null; } set { } } + public System.Collections.Generic.IList ExtractionOptions { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? MarkdownHeaderDepth { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat? OutputFormat { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputMode? OutputMode { get { throw null; } set { } } } + public partial class DocumentIntelligenceLayoutSkillChunkingProperties + { + public DocumentIntelligenceLayoutSkillChunkingProperties() { } + public int? MaximumLength { get { throw null; } set { } } + public int? OverlapLength { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit? Unit { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentIntelligenceLayoutSkillChunkingUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillChunkingUnit(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit Characters { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentIntelligenceLayoutSkillExtractionOptions : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillExtractionOptions(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions Images { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions LocationMetadata { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DocumentIntelligenceLayoutSkillMarkdownHeaderDepth : System.IEquatable { @@ -837,6 +1078,24 @@ public DocumentIntelligenceLayoutSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillOutputFormat(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat Markdown { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DocumentIntelligenceLayoutSkillOutputMode : System.IEquatable { private readonly object _dummy; @@ -1152,7 +1411,6 @@ internal IndexerChangeTrackingState() { } public partial class IndexerExecutionResult { internal IndexerExecutionResult() { } - public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.DateTimeOffset? EndTime { get { throw null; } } public string ErrorMessage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } @@ -1160,6 +1418,7 @@ internal IndexerExecutionResult() { } public string FinalTrackingState { get { throw null; } } public string InitialTrackingState { get { throw null; } } public int ItemCount { get { throw null; } } + public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus Status { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? StatusDetail { get { throw null; } } @@ -1179,6 +1438,7 @@ public enum IndexerExecutionStatus private readonly int _dummyPrimitive; public IndexerExecutionStatusDetail(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail ResetDocs { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail Resync { get { throw null; } } public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1189,13 +1449,55 @@ public enum IndexerExecutionStatus public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IndexerPermissionOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IndexerPermissionOption(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption GroupIds { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption RbacScope { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption UserIds { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerPermissionOption 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.Search.Documents.Indexes.Models.IndexerPermissionOption left, Azure.Search.Documents.Indexes.Models.IndexerPermissionOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerPermissionOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerPermissionOption left, Azure.Search.Documents.Indexes.Models.IndexerPermissionOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IndexerResyncOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IndexerResyncOption(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerResyncOption Permissions { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerResyncOption 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.Search.Documents.Indexes.Models.IndexerResyncOption left, Azure.Search.Documents.Indexes.Models.IndexerResyncOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerResyncOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerResyncOption left, Azure.Search.Documents.Indexes.Models.IndexerResyncOption right) { throw null; } + public override string ToString() { throw null; } + } public partial class IndexerState { internal IndexerState() { } + public string AllDocsFinalTrackingState { get { throw null; } } + public string AllDocsInitialTrackingState { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState ChangeTrackingState { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResetDataSourceDocumentIds { get { throw null; } } + public string ResetDocsFinalTrackingState { get { throw null; } } + public string ResetDocsInitialTrackingState { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResetDocumentKeys { get { throw null; } } + public string ResyncFinalTrackingState { get { throw null; } } + public string ResyncInitialTrackingState { get { throw null; } } } public enum IndexerStatus { @@ -1210,6 +1512,7 @@ public enum IndexerStatus private readonly int _dummyPrimitive; public IndexingMode(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexingMode AllDocuments { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexingMode IndexingResync { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.IndexingMode ResetDocuments { get { throw null; } } public bool Equals(Azure.Search.Documents.Indexes.Models.IndexingMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1365,6 +1668,57 @@ public KeywordTokenizer(string name) { } public int? BufferSize { get { throw null; } set { } } public int? MaxTokenLength { get { throw null; } set { } } } + public partial class KnowledgeAgent + { + public KnowledgeAgent(string name, System.Collections.Generic.IEnumerable models, System.Collections.Generic.IEnumerable targetIndexes) { } + public string Description { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } set { } } + public System.Collections.Generic.IList Models { get { throw null; } } + public string Name { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.KnowledgeAgentRequestLimits RequestLimits { get { throw null; } set { } } + public System.Collections.Generic.IList TargetIndexes { get { throw null; } } + } + public partial class KnowledgeAgentAzureOpenAIModel : Azure.Search.Documents.Indexes.Models.KnowledgeAgentModel + { + public KnowledgeAgentAzureOpenAIModel(Azure.Search.Documents.Indexes.Models.AzureOpenAIVectorizerParameters azureOpenAIParameters) { } + public Azure.Search.Documents.Indexes.Models.AzureOpenAIVectorizerParameters AzureOpenAIParameters { get { throw null; } set { } } + } + public abstract partial class KnowledgeAgentModel + { + protected KnowledgeAgentModel() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KnowledgeAgentModelKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KnowledgeAgentModelKind(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind 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.Search.Documents.Indexes.Models.KnowledgeAgentModelKind left, Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind left, Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KnowledgeAgentRequestLimits + { + public KnowledgeAgentRequestLimits() { } + public int? MaxOutputSize { get { throw null; } set { } } + public int? MaxRuntimeInSeconds { get { throw null; } set { } } + } + public partial class KnowledgeAgentTargetIndex + { + public KnowledgeAgentTargetIndex(string indexName) { } + public bool? DefaultIncludeReferenceSourceData { get { throw null; } set { } } + public int? DefaultMaxDocsForReranker { get { throw null; } set { } } + public float? DefaultRerankerThreshold { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + } public partial class KnowledgeStore { public KnowledgeStore(string storageConnectionString, System.Collections.Generic.IEnumerable projections) { } @@ -2166,6 +2520,31 @@ public PatternTokenizer(string name) { } public int? Group { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PermissionFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PermissionFilter(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter GroupIds { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter RbacScope { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter UserIds { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.PermissionFilter 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.Search.Documents.Indexes.Models.PermissionFilter left, Azure.Search.Documents.Indexes.Models.PermissionFilter right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.PermissionFilter (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.PermissionFilter left, Azure.Search.Documents.Indexes.Models.PermissionFilter right) { throw null; } + public override string ToString() { throw null; } + public static partial class Values + { + public const string GroupIds = "groupIds"; + public const string RbacScope = "rbacScope"; + public const string UserIds = "userIds"; + } + } public enum PhoneticEncoder { Metaphone = 0, @@ -2216,6 +2595,24 @@ public PiiDetectionSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RankingOrder(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.RankingOrder BoostedRerankerScore { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.RankingOrder ReRankerScore { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.RankingOrder 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.Search.Documents.Indexes.Models.RankingOrder left, Azure.Search.Documents.Indexes.Models.RankingOrder right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.RankingOrder (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.RankingOrder left, Azure.Search.Documents.Indexes.Models.RankingOrder right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RegexFlag : System.IEquatable { private readonly object _dummy; @@ -2317,6 +2714,7 @@ public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool? IsStored { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.PermissionFilter? PermissionFilter { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? SearchAnalyzerName { get { throw null; } set { } } public System.Collections.Generic.IList SynonymMapNames { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchFieldDataType Type { get { throw null; } } @@ -2371,11 +2769,13 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable CharFilters { get { throw null; } } public Azure.Search.Documents.Indexes.Models.CorsOptions CorsOptions { get { throw null; } set { } } public string DefaultScoringProfile { get { throw null; } set { } } + public string Description { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } public System.Collections.Generic.IList Fields { get { throw null; } set { } } public string Name { get { throw null; } } public System.Collections.Generic.IList Normalizers { get { throw null; } } + public Azure.Search.Documents.Models.SearchIndexPermissionFilterOption? PermissionFilterOption { get { throw null; } set { } } public System.Collections.Generic.IList ScoringProfiles { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SemanticSearch SemanticSearch { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm Similarity { get { throw null; } set { } } @@ -2434,6 +2834,7 @@ public SearchIndexerDataSourceConnection(string name, Azure.Search.Documents.Ind public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IList IndexerPermissionOptions { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType Type { get { throw null; } set { } } } @@ -2532,6 +2933,7 @@ public SearchIndexerSkillset(string name, System.Collections.Generic.IEnumerable public partial class SearchIndexerStatus { internal SearchIndexerStatus() { } + public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExecutionHistory { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionResult LastResult { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchIndexerLimits Limits { get { throw null; } } @@ -2610,6 +3012,7 @@ public SemanticConfiguration(string name, Azure.Search.Documents.Indexes.Models. public bool? FlightingOptIn { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SemanticPrioritizedFields PrioritizedFields { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.RankingOrder? RankingOrder { get { throw null; } set { } } } public partial class SemanticField { @@ -2718,6 +3121,7 @@ public SimpleField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.PermissionFilter? PermissionFilter { get { throw null; } set { } } } public partial class SnowballTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { @@ -3403,6 +3807,33 @@ internal AutocompleteResults() { } public double? Coverage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } + public partial class ChatCompletionResponseFormatJsonSchemaProperties + { + public ChatCompletionResponseFormatJsonSchemaProperties() { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionSchema Schema { get { throw null; } set { } } + public bool? Strict { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ChatCompletionResponseFormatType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChatCompletionResponseFormatType(string value) { throw null; } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType JsonObject { get { throw null; } } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType JsonSchema { get { throw null; } } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Models.ChatCompletionResponseFormatType 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.Search.Documents.Models.ChatCompletionResponseFormatType left, Azure.Search.Documents.Models.ChatCompletionResponseFormatType right) { throw null; } + public static implicit operator Azure.Search.Documents.Models.ChatCompletionResponseFormatType (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Models.ChatCompletionResponseFormatType left, Azure.Search.Documents.Models.ChatCompletionResponseFormatType right) { throw null; } + public override string ToString() { throw null; } + } public partial class DebugInfo { internal DebugInfo() { } @@ -3411,6 +3842,7 @@ internal DebugInfo() { } public partial class DocumentDebugInfo { internal DocumentDebugInfo() { } + public System.Collections.Generic.IReadOnlyDictionary> InnerHits { get { throw null; } } public Azure.Search.Documents.Models.SemanticDebugInfo Semantic { get { throw null; } } public Azure.Search.Documents.Models.VectorsDebugInfo Vectors { get { throw null; } } } @@ -3521,6 +3953,11 @@ public partial class IndexDocumentsResult internal IndexDocumentsResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } + public partial class IndexerResyncBody + { + public IndexerResyncBody() { } + public System.Collections.Generic.IList Options { get { throw null; } set { } } + } public partial class IndexingResult { internal IndexingResult() { } @@ -3529,6 +3966,17 @@ internal IndexingResult() { } public int Status { get { throw null; } } public bool Succeeded { get { throw null; } } } + public partial class KnowledgeAgentMessageImageContentImage + { + public KnowledgeAgentMessageImageContentImage(string url) { } + public string Url { get { throw null; } set { } } + } + public partial class KnowledgeAgentSearchActivityRecordQuery + { + internal KnowledgeAgentSearchActivityRecordQuery() { } + public string Filter { get { throw null; } } + public string Search { get { throw null; } } + } public partial class QueryAnswer { public QueryAnswer(Azure.Search.Documents.Models.QueryAnswerType answerType) { } @@ -3604,6 +4052,7 @@ internal QueryCaptionResult() { } public QueryDebugMode(string value) { throw null; } public static Azure.Search.Documents.Models.QueryDebugMode All { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Disabled { get { throw null; } } + public static Azure.Search.Documents.Models.QueryDebugMode InnerHits { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode QueryRewrites { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Semantic { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Vector { get { throw null; } } @@ -3705,6 +4154,12 @@ internal QueryCaptionResult() { } public static bool operator !=(Azure.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } public override string ToString() { throw null; } } + public partial class QueryResultDocumentInnerHit + { + internal QueryResultDocumentInnerHit() { } + public long? Ordinal { get { throw null; } } + public System.Collections.Generic.IReadOnlyList> Vectors { get { throw null; } } + } public partial class QueryResultDocumentRerankerInput { internal QueryResultDocumentRerankerInput() { } @@ -3840,6 +4295,24 @@ public void Clear() { } public override string ToString() { throw null; } public bool TryGetValue(string key, out object value) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SearchIndexPermissionFilterOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SearchIndexPermissionFilterOption(string value) { throw null; } + public static Azure.Search.Documents.Models.SearchIndexPermissionFilterOption Disabled { get { throw null; } } + public static Azure.Search.Documents.Models.SearchIndexPermissionFilterOption Enabled { get { throw null; } } + public bool Equals(Azure.Search.Documents.Models.SearchIndexPermissionFilterOption 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.Search.Documents.Models.SearchIndexPermissionFilterOption left, Azure.Search.Documents.Models.SearchIndexPermissionFilterOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Models.SearchIndexPermissionFilterOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Models.SearchIndexPermissionFilterOption left, Azure.Search.Documents.Models.SearchIndexPermissionFilterOption right) { throw null; } + public override string ToString() { throw null; } + } public enum SearchMode { Any = 0, @@ -3857,25 +4330,35 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.DataChangeDetectionPolicy DataChangeDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy DataDeletionDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Models.DebugInfo DebugInfo(Azure.Search.Documents.Models.QueryRewritesDebugInfo queryRewrites = null) { throw null; } - public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null, Azure.Search.Documents.Models.VectorsDebugInfo vectors = null) { throw null; } + public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null, Azure.Search.Documents.Models.VectorsDebugInfo vectors = null, System.Collections.Generic.IReadOnlyDictionary> innerHits = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), double? sum = default(double?), System.Collections.Generic.IReadOnlyDictionary> facets = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable results) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexerState currentState = null, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList errors, System.Collections.Generic.IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialChangeTrackingState = null, string allDocumentsFinalChangeTrackingState = null, string resetDocumentsInitialChangeTrackingState = null, string resetDocumentsFinalChangeTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocsInitialTrackingState = null, string allDocsFinalTrackingState = null, string resetDocsInitialTrackingState = null, string resetDocsFinalTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null, string resyncInitialTrackingState = null, string resyncFinalTrackingState = null) { throw null; } public static Azure.Search.Documents.Models.IndexingResult IndexingResult(string key, string errorMessage, bool succeeded, int status) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexStatisticsSummary IndexStatisticsSummary(string name = null, long documentCount = (long)0, long storageSize = (long)0, long vectorIndexSize = (long)0) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord KnowledgeAgentActivityRecord(int id = 0, string type = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentAzureSearchDocReference KnowledgeAgentAzureSearchDocReference(string id = null, int activitySource = 0, string docKey = null, System.Collections.Generic.IReadOnlyDictionary sourceData = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentModelQueryPlanningActivityRecord KnowledgeAgentModelQueryPlanningActivityRecord(int id = 0, int? inputTokens = default(int?), int? outputTokens = default(int?), int? elapsedMs = default(int?)) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentReference KnowledgeAgentReference(string type = null, string id = null, int activitySource = 0) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalResponse KnowledgeAgentRetrievalResponse(System.Collections.Generic.IEnumerable response = null, System.Collections.Generic.IEnumerable activity = null, System.Collections.Generic.IEnumerable references = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentSearchActivityRecord KnowledgeAgentSearchActivityRecord(int id = 0, string targetIndex = null, Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery query = null, System.DateTimeOffset? queryTime = default(System.DateTimeOffset?), int? count = default(int?), int? elapsedMs = default(int?)) { throw null; } + public static Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery KnowledgeAgentSearchActivityRecordQuery(string search = null, string filter = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentSemanticRankerActivityRecord KnowledgeAgentSemanticRankerActivityRecord(int id = 0, int? inputTokens = default(int?), int? elapsedMs = default(int?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalAnalyzer LexicalAnalyzer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalTokenizer LexicalTokenizer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.ListIndexStatsSummary ListIndexStatsSummary(System.Collections.Generic.IEnumerable indexesStatistics = null) { throw null; } public static Azure.Search.Documents.Models.QueryAnswerResult QueryAnswerResult(double? score = default(double?), string key = null, string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.Search.Documents.Models.QueryResultDocumentInnerHit QueryResultDocumentInnerHit(long? ordinal = default(long?), System.Collections.Generic.IEnumerable> vectors = null) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, Azure.Search.Documents.Models.SemanticFieldState? state = default(Azure.Search.Documents.Models.SemanticFieldState?)) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentSubscores QueryResultDocumentSubscores(Azure.Search.Documents.Models.TextResult text = null, System.Collections.Generic.IEnumerable> vectors = null, double? documentBoost = default(double?)) { throw null; } @@ -3885,7 +4368,9 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchIndexerError SearchIndexerError(string key, string errorMessage, int statusCode, string name, string details, string documentationLink) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerLimits SearchIndexerLimits(System.TimeSpan? maxRunTime, long? maxDocumentExtractionSize, long? maxDocumentContentCharactersToExtract) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerSkill SearchIndexerSkill(string oDataType, string name, string description, string context, System.Collections.Generic.IList inputs, System.Collections.Generic.IList outputs) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status = Azure.Search.Documents.Indexes.Models.IndexerStatus.Unknown, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult = null, System.Collections.Generic.IEnumerable executionHistory = null, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status = Azure.Search.Documents.Indexes.Models.IndexerStatus.Unknown, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult = null, System.Collections.Generic.IEnumerable executionHistory = null, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits = null, Azure.Search.Documents.Indexes.Models.IndexerState currentState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult, System.Collections.Generic.IReadOnlyList executionHistory, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerWarning SearchIndexerWarning(string key, string message, string name, string details, string documentationLink) { throw null; } @@ -3917,7 +4402,9 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchServiceStatistics SearchServiceStatistics(Azure.Search.Documents.Indexes.Models.SearchServiceCounters counters, Azure.Search.Documents.Indexes.Models.SearchServiceLimits limits) { throw null; } public static Azure.Search.Documents.Models.SearchSuggestion SearchSuggestion(T document, string text) { throw null; } public static Azure.Search.Documents.Models.SemanticDebugInfo SemanticDebugInfo(Azure.Search.Documents.Models.QueryResultDocumentSemanticField titleField = null, System.Collections.Generic.IEnumerable contentFields = null, System.Collections.Generic.IEnumerable keywordFields = null, Azure.Search.Documents.Models.QueryResultDocumentRerankerInput rerankerInput = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } + public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, double? rerankerBoostedScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType, Azure.Search.Documents.Models.SemanticQueryRewritesResultType? semanticQueryRewritesResultType) { throw null; } @@ -4075,6 +4562,7 @@ public partial class SemanticSearchResult { public SemanticSearchResult() { } public System.Collections.Generic.IReadOnlyList Captions { get { throw null; } } + public double? RerankerBoostedScore { get { throw null; } } public double? RerankerScore { get { throw null; } } } public partial class SemanticSearchResults @@ -4173,6 +4661,7 @@ protected VectorQuery() { } public string FilterOverride { get { throw null; } set { } } public int? KNearestNeighborsCount { get { throw null; } set { } } public double? Oversampling { get { throw null; } set { } } + public int? PerDocumentVectorLimit { get { throw null; } set { } } public Azure.Search.Documents.Models.VectorThreshold Threshold { get { throw null; } set { } } public float? Weight { get { throw null; } set { } } } diff --git a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs index b91d8c51e387..c15f5b11fec9 100644 --- a/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs +++ b/sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs @@ -65,9 +65,11 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede public virtual System.Threading.Tasks.Task> DeleteDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDocumentAsync(string key, string querySourceAuthorization, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocumentCount(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetDocumentCountAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetDocument(string key, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDocument(string key, string querySourceAuthorization, Azure.Search.Documents.GetDocumentOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> IndexDocumentsAsync(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response IndexDocuments(Azure.Search.Documents.Models.IndexDocumentsBatch batch, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> MergeDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -76,8 +78,10 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede public virtual Azure.Response MergeOrUploadDocuments(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(Azure.Search.Documents.SearchOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task>> SearchAsync(string searchText, string querySourceAuthorization, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Search(Azure.Search.Documents.SearchOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Search(string searchText, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response> Search(string searchText, string querySourceAuthorization, Azure.Search.Documents.SearchOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task>> SuggestAsync(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response> Suggest(string searchText, string suggesterName, Azure.Search.Documents.SuggestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UploadDocumentsAsync(System.Collections.Generic.IEnumerable documents, Azure.Search.Documents.IndexDocumentsOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -85,7 +89,7 @@ public SearchClient(System.Uri endpoint, string indexName, Azure.Core.TokenCrede } public partial class SearchClientOptions : Azure.Core.ClientOptions { - public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2025_03_01_Preview) { } + public SearchClientOptions(Azure.Search.Documents.SearchClientOptions.ServiceVersion version = Azure.Search.Documents.SearchClientOptions.ServiceVersion.V2025_05_01_Preview) { } public Azure.Search.Documents.SearchAudience? Audience { get { throw null; } set { } } public Azure.Core.Serialization.ObjectSerializer Serializer { get { throw null; } set { } } public Azure.Search.Documents.SearchClientOptions.ServiceVersion Version { get { throw null; } } @@ -94,7 +98,7 @@ public enum ServiceVersion V2020_06_30 = 1, V2023_11_01 = 2, V2024_07_01 = 3, - V2025_03_01_Preview = 4, + V2025_05_01_Preview = 4, } } public static partial class SearchExtensions @@ -197,6 +201,124 @@ public SuggestOptions() { } public bool? UseFuzzyMatching { get { throw null; } set { } } } } +namespace Azure.Search.Documents.Agents +{ + public partial class KnowledgeAgentRetrievalClient + { + protected KnowledgeAgentRetrievalClient() { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.AzureKeyCredential credential) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.AzureKeyCredential credential, Azure.Search.Documents.SearchClientOptions options) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.Core.TokenCredential tokenCredential) { } + public KnowledgeAgentRetrievalClient(System.Uri endpoint, string agentName, Azure.Core.TokenCredential tokenCredential, Azure.Search.Documents.SearchClientOptions options) { } + public virtual string AgentName { get { throw null; } } + public virtual System.Uri Endpoint { get { throw null; } } + public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } + public virtual Azure.Response Retrieve(Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RetrieveAsync(Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.Search.Documents.Agents.Models +{ + public abstract partial class KnowledgeAgentActivityRecord + { + protected KnowledgeAgentActivityRecord(int id) { } + public int Id { get { throw null; } } + } + public partial class KnowledgeAgentAzureSearchDocReference : Azure.Search.Documents.Agents.Models.KnowledgeAgentReference + { + internal KnowledgeAgentAzureSearchDocReference() : base (default(string), default(int)) { } + public string DocKey { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary SourceData { get { throw null; } } + } + public partial class KnowledgeAgentIndexParams + { + public KnowledgeAgentIndexParams() { } + public string FilterAddOn { get { throw null; } set { } } + public bool? IncludeReferenceSourceData { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + public int? MaxDocsForReranker { get { throw null; } set { } } + public float? RerankerThreshold { get { throw null; } set { } } + } + public partial class KnowledgeAgentMessage + { + public KnowledgeAgentMessage(string role, System.Collections.Generic.IEnumerable content) { } + public System.Collections.Generic.IList Content { get { throw null; } } + public string Role { get { throw null; } set { } } + } + public abstract partial class KnowledgeAgentMessageContent + { + protected KnowledgeAgentMessageContent() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KnowledgeAgentMessageContentType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KnowledgeAgentMessageContentType(string value) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType Image { get { throw null; } } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType 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.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType left, Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType right) { throw null; } + public static implicit operator Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType left, Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContentType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KnowledgeAgentMessageImageContent : Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContent + { + public KnowledgeAgentMessageImageContent(Azure.Search.Documents.Models.KnowledgeAgentMessageImageContentImage image) { } + public Azure.Search.Documents.Models.KnowledgeAgentMessageImageContentImage Image { get { throw null; } set { } } + } + public partial class KnowledgeAgentMessageTextContent : Azure.Search.Documents.Agents.Models.KnowledgeAgentMessageContent + { + public KnowledgeAgentMessageTextContent(string text) { } + public string Text { get { throw null; } set { } } + } + public partial class KnowledgeAgentModelQueryPlanningActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentModelQueryPlanningActivityRecord() : base (default(int)) { } + public int? ElapsedMs { get { throw null; } } + public int? InputTokens { get { throw null; } } + public int? OutputTokens { get { throw null; } } + } + public abstract partial class KnowledgeAgentReference + { + protected KnowledgeAgentReference(string id, int activitySource) { } + public int ActivitySource { get { throw null; } } + public string Id { get { throw null; } } + } + public partial class KnowledgeAgentRetrievalRequest + { + public KnowledgeAgentRetrievalRequest(System.Collections.Generic.IEnumerable messages) { } + public System.Collections.Generic.IList Messages { get { throw null; } } + public System.Collections.Generic.IList TargetIndexParams { get { throw null; } } + } + public partial class KnowledgeAgentRetrievalResponse + { + internal KnowledgeAgentRetrievalResponse() { } + public System.Collections.Generic.IReadOnlyList Activity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList References { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Response { get { throw null; } } + } + public partial class KnowledgeAgentSearchActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentSearchActivityRecord() : base (default(int)) { } + public int? Count { get { throw null; } } + public int? ElapsedMs { get { throw null; } } + public Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery Query { get { throw null; } } + public System.DateTimeOffset? QueryTime { get { throw null; } } + public string TargetIndex { get { throw null; } } + } + public partial class KnowledgeAgentSemanticRankerActivityRecord : Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord + { + internal KnowledgeAgentSemanticRankerActivityRecord() : base (default(int)) { } + public int? ElapsedMs { get { throw null; } } + public int? InputTokens { get { throw null; } } + } +} namespace Azure.Search.Documents.Indexes { public partial class FieldBuilder @@ -235,10 +357,14 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual System.Threading.Tasks.Task> CreateAliasAsync(Azure.Search.Documents.Indexes.Models.SearchAlias alias, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateAlias(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateAliasAsync(string aliasName, Azure.Search.Documents.Indexes.Models.SearchAlias alias, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateIndex(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool allowIndexDowntime = false, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response CreateOrUpdateKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateOrUpdateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CreateOrUpdateSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response CreateSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -249,6 +375,10 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual Azure.Response DeleteIndex(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(Azure.Search.Documents.Indexes.Models.SearchIndex index, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteKnowledgeAgent(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteKnowledgeAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteKnowledgeAgentAsync(Azure.Search.Documents.Indexes.Models.KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteKnowledgeAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteSynonymMap(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response DeleteSynonymMap(string synonymMapName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteSynonymMapAsync(Azure.Search.Documents.Indexes.Models.SynonymMap synonymMap, bool onlyIfUnchanged = false, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -267,6 +397,10 @@ public SearchIndexClient(System.Uri endpoint, Azure.Core.TokenCredential tokenCr public virtual System.Threading.Tasks.Task> GetIndexStatisticsAsync(string indexName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIndexStatsSummary(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIndexStatsSummaryAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetKnowledgeAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetKnowledgeAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetKnowledgeAgents(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetKnowledgeAgentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Search.Documents.SearchClient GetSearchClient(string indexName) { throw null; } public virtual Azure.Response GetServiceStatistics(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetServiceStatisticsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -357,6 +491,8 @@ public SearchIndexerClient(System.Uri endpoint, Azure.Core.TokenCredential token public virtual System.Threading.Tasks.Task ResetIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response ResetSkills(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task ResetSkillsAsync(string skillsetName, Azure.Search.Documents.Models.ResetSkillsOptions resetSkillsOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Resync(string indexerName, Azure.Search.Documents.Models.IndexerResyncBody indexerResync, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task ResyncAsync(string indexerName, Azure.Search.Documents.Models.IndexerResyncBody indexerResync, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RunIndexer(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task RunIndexerAsync(string indexerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -370,6 +506,7 @@ public SimpleFieldAttribute() { } public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } public string NormalizerName { get { throw null; } set { } } + public string PermissionFilter { get { throw null; } set { } } } [System.AttributeUsageAttribute(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)] public partial class VectorSearchFieldAttribute : System.Attribute @@ -392,6 +529,7 @@ namespace Azure.Search.Documents.Indexes.Models public AIFoundryModelCatalogName(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV3English { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV3Multilingual { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName CohereEmbedV4 { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTBase { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName FacebookDinoV2ImageEmbeddingsViTGiant { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.AIFoundryModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get { throw null; } } @@ -499,6 +637,11 @@ public AzureOpenAIEmbeddingSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChatCompletionExtraParametersBehavior(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior Drop { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior Error { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior PassThrough { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior 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.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior left, Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior left, Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior right) { throw null; } + public override string ToString() { throw null; } + } + public partial class ChatCompletionResponseFormat + { + public ChatCompletionResponseFormat() { } + public Azure.Search.Documents.Models.ChatCompletionResponseFormatJsonSchemaProperties ChatCompletionSchemaProperties { get { throw null; } set { } } + public Azure.Search.Documents.Models.ChatCompletionResponseFormatType? Type { get { throw null; } set { } } + } + public partial class ChatCompletionSchema + { + public ChatCompletionSchema() { } + public bool? AdditionalProperties { get { throw null; } set { } } + public string Properties { get { throw null; } set { } } + public System.Collections.Generic.IList Required { get { throw null; } } + public string Type { get { throw null; } set { } } + } + public partial class ChatCompletionSkill : Azure.Search.Documents.Indexes.Models.WebApiSkill + { + public ChatCompletionSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs, string uri) : base (default(System.Collections.Generic.IEnumerable), default(System.Collections.Generic.IEnumerable), default(string)) { } + public string ApiKey { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.CommonModelParameters CommonModelParameters { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ExtraParameters { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionExtraParametersBehavior? ExtraParametersBehavior { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionResponseFormat ResponseFormat { get { throw null; } set { } } + } public partial class CjkBigramTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { public CjkBigramTokenFilter(string name) { } @@ -682,6 +867,17 @@ public CommonGramTokenFilter(string name, System.Collections.Generic.IEnumerable public bool? IgnoreCase { get { throw null; } set { } } public bool? UseQueryMode { get { throw null; } set { } } } + public partial class CommonModelParameters + { + public CommonModelParameters() { } + public float? FrequencyPenalty { get { throw null; } set { } } + public int? MaxTokens { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public float? PresencePenalty { get { throw null; } set { } } + public int? Seed { get { throw null; } set { } } + public System.Collections.Generic.IList Stop { get { throw null; } set { } } + public float? Temperature { get { throw null; } set { } } + } public partial class ComplexField : Azure.Search.Documents.Indexes.Models.SearchFieldTemplate { public ComplexField(string name, bool collection = false) { } @@ -811,9 +1007,54 @@ public DocumentExtractionSkill(System.Collections.Generic.IEnumerable inputs, System.Collections.Generic.IEnumerable outputs) { } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingProperties ChunkingProperties { get { throw null; } set { } } + public System.Collections.Generic.IList ExtractionOptions { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? MarkdownHeaderDepth { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat? OutputFormat { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputMode? OutputMode { get { throw null; } set { } } } + public partial class DocumentIntelligenceLayoutSkillChunkingProperties + { + public DocumentIntelligenceLayoutSkillChunkingProperties() { } + public int? MaximumLength { get { throw null; } set { } } + public int? OverlapLength { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit? Unit { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentIntelligenceLayoutSkillChunkingUnit : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillChunkingUnit(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit Characters { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillChunkingUnit right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DocumentIntelligenceLayoutSkillExtractionOptions : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillExtractionOptions(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions Images { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions LocationMetadata { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillExtractionOptions right) { throw null; } + public override string ToString() { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DocumentIntelligenceLayoutSkillMarkdownHeaderDepth : System.IEquatable { @@ -837,6 +1078,24 @@ public DocumentIntelligenceLayoutSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DocumentIntelligenceLayoutSkillOutputFormat(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat Markdown { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat 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.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat left, Azure.Search.Documents.Indexes.Models.DocumentIntelligenceLayoutSkillOutputFormat right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DocumentIntelligenceLayoutSkillOutputMode : System.IEquatable { private readonly object _dummy; @@ -1152,7 +1411,6 @@ internal IndexerChangeTrackingState() { } public partial class IndexerExecutionResult { internal IndexerExecutionResult() { } - public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.DateTimeOffset? EndTime { get { throw null; } } public string ErrorMessage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Errors { get { throw null; } } @@ -1160,6 +1418,7 @@ internal IndexerExecutionResult() { } public string FinalTrackingState { get { throw null; } } public string InitialTrackingState { get { throw null; } } public int ItemCount { get { throw null; } } + public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } public System.DateTimeOffset? StartTime { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus Status { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? StatusDetail { get { throw null; } } @@ -1179,6 +1438,7 @@ public enum IndexerExecutionStatus private readonly int _dummyPrimitive; public IndexerExecutionStatusDetail(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail ResetDocs { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail Resync { get { throw null; } } public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1189,13 +1449,55 @@ public enum IndexerExecutionStatus public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail left, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IndexerPermissionOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IndexerPermissionOption(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption GroupIds { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption RbacScope { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexerPermissionOption UserIds { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerPermissionOption 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.Search.Documents.Indexes.Models.IndexerPermissionOption left, Azure.Search.Documents.Indexes.Models.IndexerPermissionOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerPermissionOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerPermissionOption left, Azure.Search.Documents.Indexes.Models.IndexerPermissionOption right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct IndexerResyncOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public IndexerResyncOption(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerResyncOption Permissions { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.IndexerResyncOption 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.Search.Documents.Indexes.Models.IndexerResyncOption left, Azure.Search.Documents.Indexes.Models.IndexerResyncOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.IndexerResyncOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.IndexerResyncOption left, Azure.Search.Documents.Indexes.Models.IndexerResyncOption right) { throw null; } + public override string ToString() { throw null; } + } public partial class IndexerState { internal IndexerState() { } + public string AllDocsFinalTrackingState { get { throw null; } } + public string AllDocsInitialTrackingState { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState ChangeTrackingState { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResetDataSourceDocumentIds { get { throw null; } } + public string ResetDocsFinalTrackingState { get { throw null; } } + public string ResetDocsInitialTrackingState { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResetDocumentKeys { get { throw null; } } + public string ResyncFinalTrackingState { get { throw null; } } + public string ResyncInitialTrackingState { get { throw null; } } } public enum IndexerStatus { @@ -1210,6 +1512,7 @@ public enum IndexerStatus private readonly int _dummyPrimitive; public IndexingMode(string value) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexingMode AllDocuments { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.IndexingMode IndexingResync { get { throw null; } } public static Azure.Search.Documents.Indexes.Models.IndexingMode ResetDocuments { get { throw null; } } public bool Equals(Azure.Search.Documents.Indexes.Models.IndexingMode other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -1365,6 +1668,57 @@ public KeywordTokenizer(string name) { } public int? BufferSize { get { throw null; } set { } } public int? MaxTokenLength { get { throw null; } set { } } } + public partial class KnowledgeAgent + { + public KnowledgeAgent(string name, System.Collections.Generic.IEnumerable models, System.Collections.Generic.IEnumerable targetIndexes) { } + public string Description { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } + public Azure.ETag? ETag { get { throw null; } set { } } + public System.Collections.Generic.IList Models { get { throw null; } } + public string Name { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.KnowledgeAgentRequestLimits RequestLimits { get { throw null; } set { } } + public System.Collections.Generic.IList TargetIndexes { get { throw null; } } + } + public partial class KnowledgeAgentAzureOpenAIModel : Azure.Search.Documents.Indexes.Models.KnowledgeAgentModel + { + public KnowledgeAgentAzureOpenAIModel(Azure.Search.Documents.Indexes.Models.AzureOpenAIVectorizerParameters azureOpenAIParameters) { } + public Azure.Search.Documents.Indexes.Models.AzureOpenAIVectorizerParameters AzureOpenAIParameters { get { throw null; } set { } } + } + public abstract partial class KnowledgeAgentModel + { + protected KnowledgeAgentModel() { } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct KnowledgeAgentModelKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KnowledgeAgentModelKind(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind AzureOpenAI { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind 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.Search.Documents.Indexes.Models.KnowledgeAgentModelKind left, Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind left, Azure.Search.Documents.Indexes.Models.KnowledgeAgentModelKind right) { throw null; } + public override string ToString() { throw null; } + } + public partial class KnowledgeAgentRequestLimits + { + public KnowledgeAgentRequestLimits() { } + public int? MaxOutputSize { get { throw null; } set { } } + public int? MaxRuntimeInSeconds { get { throw null; } set { } } + } + public partial class KnowledgeAgentTargetIndex + { + public KnowledgeAgentTargetIndex(string indexName) { } + public bool? DefaultIncludeReferenceSourceData { get { throw null; } set { } } + public int? DefaultMaxDocsForReranker { get { throw null; } set { } } + public float? DefaultRerankerThreshold { get { throw null; } set { } } + public string IndexName { get { throw null; } set { } } + } public partial class KnowledgeStore { public KnowledgeStore(string storageConnectionString, System.Collections.Generic.IEnumerable projections) { } @@ -2166,6 +2520,31 @@ public PatternTokenizer(string name) { } public int? Group { get { throw null; } set { } } public string Pattern { get { throw null; } set { } } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct PermissionFilter : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public PermissionFilter(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter GroupIds { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter RbacScope { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.PermissionFilter UserIds { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.PermissionFilter 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.Search.Documents.Indexes.Models.PermissionFilter left, Azure.Search.Documents.Indexes.Models.PermissionFilter right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.PermissionFilter (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.PermissionFilter left, Azure.Search.Documents.Indexes.Models.PermissionFilter right) { throw null; } + public override string ToString() { throw null; } + public static partial class Values + { + public const string GroupIds = "groupIds"; + public const string RbacScope = "rbacScope"; + public const string UserIds = "userIds"; + } + } public enum PhoneticEncoder { Metaphone = 0, @@ -2216,6 +2595,24 @@ public PiiDetectionSkill(System.Collections.Generic.IEnumerable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RankingOrder(string value) { throw null; } + public static Azure.Search.Documents.Indexes.Models.RankingOrder BoostedRerankerScore { get { throw null; } } + public static Azure.Search.Documents.Indexes.Models.RankingOrder ReRankerScore { get { throw null; } } + public bool Equals(Azure.Search.Documents.Indexes.Models.RankingOrder 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.Search.Documents.Indexes.Models.RankingOrder left, Azure.Search.Documents.Indexes.Models.RankingOrder right) { throw null; } + public static implicit operator Azure.Search.Documents.Indexes.Models.RankingOrder (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Indexes.Models.RankingOrder left, Azure.Search.Documents.Indexes.Models.RankingOrder right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct RegexFlag : System.IEquatable { private readonly object _dummy; @@ -2317,6 +2714,7 @@ public SearchField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool? IsStored { get { throw null; } set { } } public string Name { get { throw null; } } public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.PermissionFilter? PermissionFilter { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalAnalyzerName? SearchAnalyzerName { get { throw null; } set { } } public System.Collections.Generic.IList SynonymMapNames { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchFieldDataType Type { get { throw null; } } @@ -2371,11 +2769,13 @@ public SearchIndex(string name, System.Collections.Generic.IEnumerable CharFilters { get { throw null; } } public Azure.Search.Documents.Indexes.Models.CorsOptions CorsOptions { get { throw null; } set { } } public string DefaultScoringProfile { get { throw null; } set { } } + public string Description { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } public System.Collections.Generic.IList Fields { get { throw null; } set { } } public string Name { get { throw null; } } public System.Collections.Generic.IList Normalizers { get { throw null; } } + public Azure.Search.Documents.Models.SearchIndexPermissionFilterOption? PermissionFilterOption { get { throw null; } set { } } public System.Collections.Generic.IList ScoringProfiles { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SemanticSearch SemanticSearch { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SimilarityAlgorithm Similarity { get { throw null; } set { } } @@ -2434,6 +2834,7 @@ public SearchIndexerDataSourceConnection(string name, Azure.Search.Documents.Ind public Azure.Search.Documents.Indexes.Models.SearchResourceEncryptionKey EncryptionKey { get { throw null; } set { } } public Azure.ETag? ETag { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchIndexerDataIdentity Identity { get { throw null; } set { } } + public System.Collections.Generic.IList IndexerPermissionOptions { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SearchIndexerDataSourceType Type { get { throw null; } set { } } } @@ -2532,6 +2933,7 @@ public SearchIndexerSkillset(string name, System.Collections.Generic.IEnumerable public partial class SearchIndexerStatus { internal SearchIndexerStatus() { } + public Azure.Search.Documents.Indexes.Models.IndexerState CurrentState { get { throw null; } } public System.Collections.Generic.IReadOnlyList ExecutionHistory { get { throw null; } } public Azure.Search.Documents.Indexes.Models.IndexerExecutionResult LastResult { get { throw null; } } public Azure.Search.Documents.Indexes.Models.SearchIndexerLimits Limits { get { throw null; } } @@ -2610,6 +3012,7 @@ public SemanticConfiguration(string name, Azure.Search.Documents.Indexes.Models. public bool? FlightingOptIn { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.SemanticPrioritizedFields PrioritizedFields { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.RankingOrder? RankingOrder { get { throw null; } set { } } } public partial class SemanticField { @@ -2718,6 +3121,7 @@ public SimpleField(string name, Azure.Search.Documents.Indexes.Models.SearchFiel public bool IsKey { get { throw null; } set { } } public bool IsSortable { get { throw null; } set { } } public Azure.Search.Documents.Indexes.Models.LexicalNormalizerName? NormalizerName { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.PermissionFilter? PermissionFilter { get { throw null; } set { } } } public partial class SnowballTokenFilter : Azure.Search.Documents.Indexes.Models.TokenFilter { @@ -3403,6 +3807,33 @@ internal AutocompleteResults() { } public double? Coverage { get { throw null; } } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } + public partial class ChatCompletionResponseFormatJsonSchemaProperties + { + public ChatCompletionResponseFormatJsonSchemaProperties() { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.Search.Documents.Indexes.Models.ChatCompletionSchema Schema { get { throw null; } set { } } + public bool? Strict { get { throw null; } set { } } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ChatCompletionResponseFormatType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ChatCompletionResponseFormatType(string value) { throw null; } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType JsonObject { get { throw null; } } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType JsonSchema { get { throw null; } } + public static Azure.Search.Documents.Models.ChatCompletionResponseFormatType Text { get { throw null; } } + public bool Equals(Azure.Search.Documents.Models.ChatCompletionResponseFormatType 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.Search.Documents.Models.ChatCompletionResponseFormatType left, Azure.Search.Documents.Models.ChatCompletionResponseFormatType right) { throw null; } + public static implicit operator Azure.Search.Documents.Models.ChatCompletionResponseFormatType (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Models.ChatCompletionResponseFormatType left, Azure.Search.Documents.Models.ChatCompletionResponseFormatType right) { throw null; } + public override string ToString() { throw null; } + } public partial class DebugInfo { internal DebugInfo() { } @@ -3411,6 +3842,7 @@ internal DebugInfo() { } public partial class DocumentDebugInfo { internal DocumentDebugInfo() { } + public System.Collections.Generic.IReadOnlyDictionary> InnerHits { get { throw null; } } public Azure.Search.Documents.Models.SemanticDebugInfo Semantic { get { throw null; } } public Azure.Search.Documents.Models.VectorsDebugInfo Vectors { get { throw null; } } } @@ -3521,6 +3953,11 @@ public partial class IndexDocumentsResult internal IndexDocumentsResult() { } public System.Collections.Generic.IReadOnlyList Results { get { throw null; } } } + public partial class IndexerResyncBody + { + public IndexerResyncBody() { } + public System.Collections.Generic.IList Options { get { throw null; } set { } } + } public partial class IndexingResult { internal IndexingResult() { } @@ -3529,6 +3966,17 @@ internal IndexingResult() { } public int Status { get { throw null; } } public bool Succeeded { get { throw null; } } } + public partial class KnowledgeAgentMessageImageContentImage + { + public KnowledgeAgentMessageImageContentImage(string url) { } + public string Url { get { throw null; } set { } } + } + public partial class KnowledgeAgentSearchActivityRecordQuery + { + internal KnowledgeAgentSearchActivityRecordQuery() { } + public string Filter { get { throw null; } } + public string Search { get { throw null; } } + } public partial class QueryAnswer { public QueryAnswer(Azure.Search.Documents.Models.QueryAnswerType answerType) { } @@ -3604,6 +4052,7 @@ internal QueryCaptionResult() { } public QueryDebugMode(string value) { throw null; } public static Azure.Search.Documents.Models.QueryDebugMode All { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Disabled { get { throw null; } } + public static Azure.Search.Documents.Models.QueryDebugMode InnerHits { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode QueryRewrites { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Semantic { get { throw null; } } public static Azure.Search.Documents.Models.QueryDebugMode Vector { get { throw null; } } @@ -3705,6 +4154,12 @@ internal QueryCaptionResult() { } public static bool operator !=(Azure.Search.Documents.Models.QueryLanguage left, Azure.Search.Documents.Models.QueryLanguage right) { throw null; } public override string ToString() { throw null; } } + public partial class QueryResultDocumentInnerHit + { + internal QueryResultDocumentInnerHit() { } + public long? Ordinal { get { throw null; } } + public System.Collections.Generic.IReadOnlyList> Vectors { get { throw null; } } + } public partial class QueryResultDocumentRerankerInput { internal QueryResultDocumentRerankerInput() { } @@ -3840,6 +4295,24 @@ public void Clear() { } public override string ToString() { throw null; } public bool TryGetValue(string key, out object value) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SearchIndexPermissionFilterOption : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SearchIndexPermissionFilterOption(string value) { throw null; } + public static Azure.Search.Documents.Models.SearchIndexPermissionFilterOption Disabled { get { throw null; } } + public static Azure.Search.Documents.Models.SearchIndexPermissionFilterOption Enabled { get { throw null; } } + public bool Equals(Azure.Search.Documents.Models.SearchIndexPermissionFilterOption 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.Search.Documents.Models.SearchIndexPermissionFilterOption left, Azure.Search.Documents.Models.SearchIndexPermissionFilterOption right) { throw null; } + public static implicit operator Azure.Search.Documents.Models.SearchIndexPermissionFilterOption (string value) { throw null; } + public static bool operator !=(Azure.Search.Documents.Models.SearchIndexPermissionFilterOption left, Azure.Search.Documents.Models.SearchIndexPermissionFilterOption right) { throw null; } + public override string ToString() { throw null; } + } public enum SearchMode { Any = 0, @@ -3857,25 +4330,35 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.DataChangeDetectionPolicy DataChangeDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy DataDeletionDetectionPolicy(string oDataType) { throw null; } public static Azure.Search.Documents.Models.DebugInfo DebugInfo(Azure.Search.Documents.Models.QueryRewritesDebugInfo queryRewrites = null) { throw null; } - public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null, Azure.Search.Documents.Models.VectorsDebugInfo vectors = null) { throw null; } + public static Azure.Search.Documents.Models.DocumentDebugInfo DocumentDebugInfo(Azure.Search.Documents.Models.SemanticDebugInfo semantic = null, Azure.Search.Documents.Models.VectorsDebugInfo vectors = null, System.Collections.Generic.IReadOnlyDictionary> innerHits = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count = default(long?), double? sum = default(double?), System.Collections.Generic.IReadOnlyDictionary> facets = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable results) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) { throw null; } - public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexerState currentState = null, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable errors = null, System.Collections.Generic.IEnumerable warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList errors, System.Collections.Generic.IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialChangeTrackingState = null, string allDocumentsFinalChangeTrackingState = null, string resetDocumentsInitialChangeTrackingState = null, string resetDocumentsFinalChangeTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocsInitialTrackingState = null, string allDocsFinalTrackingState = null, string resetDocsInitialTrackingState = null, string resetDocsFinalTrackingState = null, System.Collections.Generic.IEnumerable resetDocumentKeys = null, System.Collections.Generic.IEnumerable resetDataSourceDocumentIds = null, string resyncInitialTrackingState = null, string resyncFinalTrackingState = null) { throw null; } public static Azure.Search.Documents.Models.IndexingResult IndexingResult(string key, string errorMessage, bool succeeded, int status) { throw null; } public static Azure.Search.Documents.Indexes.Models.IndexStatisticsSummary IndexStatisticsSummary(string name = null, long documentCount = (long)0, long storageSize = (long)0, long vectorIndexSize = (long)0) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentActivityRecord KnowledgeAgentActivityRecord(int id = 0, string type = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentAzureSearchDocReference KnowledgeAgentAzureSearchDocReference(string id = null, int activitySource = 0, string docKey = null, System.Collections.Generic.IReadOnlyDictionary sourceData = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentModelQueryPlanningActivityRecord KnowledgeAgentModelQueryPlanningActivityRecord(int id = 0, int? inputTokens = default(int?), int? outputTokens = default(int?), int? elapsedMs = default(int?)) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentReference KnowledgeAgentReference(string type = null, string id = null, int activitySource = 0) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentRetrievalResponse KnowledgeAgentRetrievalResponse(System.Collections.Generic.IEnumerable response = null, System.Collections.Generic.IEnumerable activity = null, System.Collections.Generic.IEnumerable references = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentSearchActivityRecord KnowledgeAgentSearchActivityRecord(int id = 0, string targetIndex = null, Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery query = null, System.DateTimeOffset? queryTime = default(System.DateTimeOffset?), int? count = default(int?), int? elapsedMs = default(int?)) { throw null; } + public static Azure.Search.Documents.Models.KnowledgeAgentSearchActivityRecordQuery KnowledgeAgentSearchActivityRecordQuery(string search = null, string filter = null) { throw null; } + public static Azure.Search.Documents.Agents.Models.KnowledgeAgentSemanticRankerActivityRecord KnowledgeAgentSemanticRankerActivityRecord(int id = 0, int? inputTokens = default(int?), int? elapsedMs = default(int?)) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalAnalyzer LexicalAnalyzer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.LexicalTokenizer LexicalTokenizer(string oDataType, string name) { throw null; } public static Azure.Search.Documents.Indexes.Models.ListIndexStatsSummary ListIndexStatsSummary(System.Collections.Generic.IEnumerable indexesStatistics = null) { throw null; } public static Azure.Search.Documents.Models.QueryAnswerResult QueryAnswerResult(double? score = default(double?), string key = null, string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } public static Azure.Search.Documents.Models.QueryCaptionResult QueryCaptionResult(string text = null, string highlights = null, System.Collections.Generic.IReadOnlyDictionary additionalProperties = null) { throw null; } + public static Azure.Search.Documents.Models.QueryResultDocumentInnerHit QueryResultDocumentInnerHit(long? ordinal = default(long?), System.Collections.Generic.IEnumerable> vectors = null) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentRerankerInput QueryResultDocumentRerankerInput(string title = null, string content = null, string keywords = null) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentSemanticField QueryResultDocumentSemanticField(string name = null, Azure.Search.Documents.Models.SemanticFieldState? state = default(Azure.Search.Documents.Models.SemanticFieldState?)) { throw null; } public static Azure.Search.Documents.Models.QueryResultDocumentSubscores QueryResultDocumentSubscores(Azure.Search.Documents.Models.TextResult text = null, System.Collections.Generic.IEnumerable> vectors = null, double? documentBoost = default(double?)) { throw null; } @@ -3885,7 +4368,9 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchIndexerError SearchIndexerError(string key, string errorMessage, int statusCode, string name, string details, string documentationLink) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerLimits SearchIndexerLimits(System.TimeSpan? maxRunTime, long? maxDocumentExtractionSize, long? maxDocumentContentCharactersToExtract) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerSkill SearchIndexerSkill(string oDataType, string name, string description, string context, System.Collections.Generic.IList inputs, System.Collections.Generic.IList outputs) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status = Azure.Search.Documents.Indexes.Models.IndexerStatus.Unknown, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult = null, System.Collections.Generic.IEnumerable executionHistory = null, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits = null) { throw null; } + public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status = Azure.Search.Documents.Indexes.Models.IndexerStatus.Unknown, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult = null, System.Collections.Generic.IEnumerable executionHistory = null, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits = null, Azure.Search.Documents.Indexes.Models.IndexerState currentState = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Indexes.Models.SearchIndexerStatus SearchIndexerStatus(Azure.Search.Documents.Indexes.Models.IndexerStatus status, Azure.Search.Documents.Indexes.Models.IndexerExecutionResult lastResult, System.Collections.Generic.IReadOnlyList executionHistory, Azure.Search.Documents.Indexes.Models.SearchIndexerLimits limits) { throw null; } public static Azure.Search.Documents.Indexes.Models.SearchIndexerWarning SearchIndexerWarning(string key, string message, string name, string details, string documentationLink) { throw null; } @@ -3917,7 +4402,9 @@ public static partial class SearchModelFactory public static Azure.Search.Documents.Indexes.Models.SearchServiceStatistics SearchServiceStatistics(Azure.Search.Documents.Indexes.Models.SearchServiceCounters counters, Azure.Search.Documents.Indexes.Models.SearchServiceLimits limits) { throw null; } public static Azure.Search.Documents.Models.SearchSuggestion SearchSuggestion(T document, string text) { throw null; } public static Azure.Search.Documents.Models.SemanticDebugInfo SemanticDebugInfo(Azure.Search.Documents.Models.QueryResultDocumentSemanticField titleField = null, System.Collections.Generic.IEnumerable contentFields = null, System.Collections.Generic.IEnumerable keywordFields = null, Azure.Search.Documents.Models.QueryResultDocumentRerankerInput rerankerInput = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } + public static Azure.Search.Documents.Models.SemanticSearchResult SemanticSearchResult(double? rerankerScore, double? rerankerBoostedScore, System.Collections.Generic.IReadOnlyList captions) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType) { throw null; } public static Azure.Search.Documents.Models.SemanticSearchResults SemanticSearchResults(System.Collections.Generic.IReadOnlyList answers, Azure.Search.Documents.Models.SemanticErrorReason? errorReason, Azure.Search.Documents.Models.SemanticSearchResultsType? resultsType, Azure.Search.Documents.Models.SemanticQueryRewritesResultType? semanticQueryRewritesResultType) { throw null; } @@ -4075,6 +4562,7 @@ public partial class SemanticSearchResult { public SemanticSearchResult() { } public System.Collections.Generic.IReadOnlyList Captions { get { throw null; } } + public double? RerankerBoostedScore { get { throw null; } } public double? RerankerScore { get { throw null; } } } public partial class SemanticSearchResults @@ -4173,6 +4661,7 @@ protected VectorQuery() { } public string FilterOverride { get { throw null; } set { } } public int? KNearestNeighborsCount { get { throw null; } set { } } public double? Oversampling { get { throw null; } set { } } + public int? PerDocumentVectorLimit { get { throw null; } set { } } public Azure.Search.Documents.Models.VectorThreshold Threshold { get { throw null; } set { } } public float? Weight { get { throw null; } set { } } } diff --git a/sdk/search/Azure.Search.Documents/assets.json b/sdk/search/Azure.Search.Documents/assets.json index 6c15fdf8caf5..2372ba805207 100644 --- a/sdk/search/Azure.Search.Documents/assets.json +++ b/sdk/search/Azure.Search.Documents/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/search/Azure.Search.Documents", - "Tag": "net/search/Azure.Search.Documents_d95b07f81b" + "Tag": "net/search/Azure.Search.Documents_8d2795091f" } diff --git a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj index 0a0ce3553ab0..3ccb2963eb33 100644 --- a/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj +++ b/sdk/search/Azure.Search.Documents/src/Azure.Search.Documents.csproj @@ -1,7 +1,7 @@ Microsoft Azure.Search.Documents client library - 11.7.0-beta.4 + 11.7.0-beta.5 11.6.0 diff --git a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs index e6da67e60f81..ec780f5f0bf1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/AliasesRestClient.cs @@ -32,7 +32,7 @@ internal partial class AliasesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public AliasesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs index 8e2fe902a54b..20bc6f8950ac 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DataSourcesRestClient.cs @@ -32,7 +32,7 @@ internal partial class DataSourcesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public DataSourcesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs index d7c476be46ac..483078516be9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/DocumentsRestClient.cs @@ -36,7 +36,7 @@ internal partial class DocumentsRestClient /// Api Version. /// , , , or is null. /// is an empty string, and was expected to be non-empty. - public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public DocumentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string indexName, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -103,7 +103,7 @@ public Response Count(CancellationToken cancellationToken = default) } } - internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) + internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions, string xMsQuerySourceAuthorization) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -116,6 +116,10 @@ internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) uri.AppendPath("/docs/search.post.search", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsQuerySourceAuthorization != null) + { + request.Headers.Add("x-ms-query-source-authorization", xMsQuerySourceAuthorization); + } request.Headers.Add("Accept", "application/json; odata.metadata=none"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); @@ -126,20 +130,22 @@ internal HttpMessage CreateSearchPostRequest(SearchOptions searchOptions) /// Searches for documents in the index. /// The definition of the Search request. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public async Task> SearchPostAsync(SearchOptions searchOptions, CancellationToken cancellationToken = default) + public async Task> SearchPostAsync(SearchOptions searchOptions, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (searchOptions == null) { throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchOptions); + using var message = CreateSearchPostRequest(searchOptions, xMsQuerySourceAuthorization); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: + case 206: { SearchDocumentsResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); @@ -153,20 +159,22 @@ public async Task> SearchPostAsync(SearchOptions /// Searches for documents in the index. /// The definition of the Search request. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public Response SearchPost(SearchOptions searchOptions, CancellationToken cancellationToken = default) + public Response SearchPost(SearchOptions searchOptions, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (searchOptions == null) { throw new ArgumentNullException(nameof(searchOptions)); } - using var message = CreateSearchPostRequest(searchOptions); + using var message = CreateSearchPostRequest(searchOptions, xMsQuerySourceAuthorization); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: + case 206: { SearchDocumentsResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); @@ -178,7 +186,7 @@ public Response SearchPost(SearchOptions searchOptions, C } } - internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFields) + internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFields, string xMsQuerySourceAuthorization) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -197,6 +205,10 @@ internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFi } uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (xMsQuerySourceAuthorization != null) + { + request.Headers.Add("x-ms-query-source-authorization", xMsQuerySourceAuthorization); + } request.Headers.Add("Accept", "application/json; odata.metadata=none"); return message; } @@ -204,16 +216,17 @@ internal HttpMessage CreateGetRequest(string key, IEnumerable selectedFi /// Retrieves a document from the index. /// The key of the document to retrieve. /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public async Task>> GetAsync(string key, IEnumerable selectedFields = null, CancellationToken cancellationToken = default) + public async Task>> GetAsync(string key, IEnumerable selectedFields = null, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - using var message = CreateGetRequest(key, selectedFields); + using var message = CreateGetRequest(key, selectedFields, xMsQuerySourceAuthorization); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -244,16 +257,17 @@ public async Task>> GetAsync(string /// Retrieves a document from the index. /// The key of the document to retrieve. /// List of field names to retrieve for the document; Any field not retrieved will be missing from the returned document. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. /// The cancellation token to use. /// is null. - public Response> Get(string key, IEnumerable selectedFields = null, CancellationToken cancellationToken = default) + public Response> Get(string key, IEnumerable selectedFields = null, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) { if (key == null) { throw new ArgumentNullException(nameof(key)); } - using var message = CreateGetRequest(key, selectedFields); + using var message = CreateGetRequest(key, selectedFields, xMsQuerySourceAuthorization); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs index d021cb826a9a..4022d2ba40db 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexersRestClient.cs @@ -33,7 +33,7 @@ internal partial class IndexersRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public IndexersRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); @@ -177,6 +177,80 @@ public Response ResetDocs(string indexerName, bool? overwrite = null, ResetDocum } } + internal HttpMessage CreateResyncRequest(string indexerName, IndexerResyncBody indexerResync) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/indexers('", false); + uri.AppendPath(indexerName, true); + uri.AppendPath("')/search.resync", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(indexerResync); + request.Content = content; + return message; + } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The to use. + /// The cancellation token to use. + /// or is null. + public async Task ResyncAsync(string indexerName, IndexerResyncBody indexerResync, CancellationToken cancellationToken = default) + { + if (indexerName == null) + { + throw new ArgumentNullException(nameof(indexerName)); + } + if (indexerResync == null) + { + throw new ArgumentNullException(nameof(indexerResync)); + } + + using var message = CreateResyncRequest(indexerName, indexerResync); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The to use. + /// The cancellation token to use. + /// or is null. + public Response Resync(string indexerName, IndexerResyncBody indexerResync, CancellationToken cancellationToken = default) + { + if (indexerName == null) + { + throw new ArgumentNullException(nameof(indexerName)); + } + if (indexerResync == null) + { + throw new ArgumentNullException(nameof(indexerResync)); + } + + using var message = CreateResyncRequest(indexerName, indexerResync); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal HttpMessage CreateRunRequest(string indexerName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs index edf5d4c0b39f..70116991cd95 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/IndexesRestClient.cs @@ -32,7 +32,7 @@ internal partial class IndexesRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public IndexesRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs new file mode 100644 index 000000000000..a52eba2cb6ec --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeAgentsRestClient.cs @@ -0,0 +1,413 @@ +// 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.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents +{ + internal partial class KnowledgeAgentsRestClient + { + private readonly HttpPipeline _pipeline; + private readonly string _endpoint; + private readonly Guid? _xMsClientRequestId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of KnowledgeAgentsRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The endpoint URL of the search service. + /// The tracking ID sent with the request to help with debugging. + /// Api Version. + /// , , or is null. + public KnowledgeAgentsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _xMsClientRequestId = xMsClientRequestId; + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateCreateOrUpdateRequest(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Prefer", "return=representation"); + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(knowledgeAgent); + request.Content = content; + return message; + } + + /// Creates a new agent or updates an agent if it already exists. + /// The name of the agent to create or update. + /// The definition of the agent to create or update. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// or is null. + public async Task> CreateOrUpdateAsync(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateOrUpdateRequest(agentName, knowledgeAgent, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new agent or updates an agent if it already exists. + /// The name of the agent to create or update. + /// The definition of the agent to create or update. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// or is null. + public Response CreateOrUpdate(string agentName, KnowledgeAgent knowledgeAgent, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateOrUpdateRequest(agentName, knowledgeAgent, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateDeleteRequest(string agentName, string ifMatch, string ifNoneMatch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("If-Match", ifMatch); + } + if (ifNoneMatch != null) + { + request.Headers.Add("If-None-Match", ifNoneMatch); + } + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Deletes an existing agent. + /// The name of the agent to delete. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// is null. + public async Task DeleteAsync(string agentName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateDeleteRequest(agentName, ifMatch, ifNoneMatch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 204: + case 404: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes an existing agent. + /// The name of the agent to delete. + /// Defines the If-Match condition. The operation will be performed only if the ETag on the server matches this value. + /// Defines the If-None-Match condition. The operation will be performed only if the ETag on the server does not match this value. + /// The cancellation token to use. + /// is null. + public Response Delete(string agentName, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateDeleteRequest(agentName, ifMatch, ifNoneMatch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 204: + case 404: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string agentName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/agents('", false); + uri.AppendPath(agentName, true); + uri.AppendPath("')", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public async Task> GetAsync(string agentName, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateGetRequest(agentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public Response Get(string agentName, CancellationToken cancellationToken = default) + { + if (agentName == null) + { + throw new ArgumentNullException(nameof(agentName)); + } + + using var message = CreateGetRequest(agentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/agents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + return message; + } + + /// Lists all agents available for a search service. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ListKnowledgeAgentsResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ListKnowledgeAgentsResult.DeserializeListKnowledgeAgentsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists all agents available for a search service. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ListKnowledgeAgentsResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ListKnowledgeAgentsResult.DeserializeListKnowledgeAgentsResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateRequest(KnowledgeAgent knowledgeAgent) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendPath("/agents", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(knowledgeAgent); + request.Content = content; + return message; + } + + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public async Task> CreateAsync(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateRequest(knowledgeAgent); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 201: + { + KnowledgeAgent value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public Response Create(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + if (knowledgeAgent == null) + { + throw new ArgumentNullException(nameof(knowledgeAgent)); + } + + using var message = CreateCreateRequest(knowledgeAgent); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 201: + { + KnowledgeAgent value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgent.DeserializeKnowledgeAgent(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs new file mode 100644 index 000000000000..4afaac30b025 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/KnowledgeRetrievalRestClient.cs @@ -0,0 +1,129 @@ +// 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.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents +{ + internal partial class KnowledgeRetrievalRestClient + { + private readonly HttpPipeline _pipeline; + private readonly string _endpoint; + private readonly string _agentName; + private readonly Guid? _xMsClientRequestId; + private readonly string _apiVersion; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// Initializes a new instance of KnowledgeRetrievalRestClient. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The endpoint URL of the search service. + /// The name of the agent. + /// The tracking ID sent with the request to help with debugging. + /// Api Version. + /// , , , or is null. + /// is an empty string, and was expected to be non-empty. + public KnowledgeRetrievalRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, string agentName, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") + { + ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint)); + _agentName = agentName ?? throw new ArgumentNullException(nameof(agentName)); + _xMsClientRequestId = xMsClientRequestId; + _apiVersion = apiVersion ?? throw new ArgumentNullException(nameof(apiVersion)); + } + + internal HttpMessage CreateRetrieveRequest(KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.AppendRaw(_endpoint, false); + uri.AppendRaw("/agents('", false); + uri.AppendRaw(_agentName, true); + uri.AppendRaw("')", false); + uri.AppendPath("/retrieve", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + if (xMsQuerySourceAuthorization != null) + { + request.Headers.Add("x-ms-query-source-authorization", xMsQuerySourceAuthorization); + } + request.Headers.Add("Accept", "application/json; odata.metadata=minimal"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(retrievalRequest); + request.Content = content; + return message; + } + + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. + /// The cancellation token to use. + /// is null. + public async Task> RetrieveAsync(KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) + { + if (retrievalRequest == null) + { + throw new ArgumentNullException(nameof(retrievalRequest)); + } + + using var message = CreateRetrieveRequest(retrievalRequest, xMsQuerySourceAuthorization); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgentRetrievalResponse value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KnowledgeAgentRetrievalResponse.DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. + /// The cancellation token to use. + /// is null. + public Response Retrieve(KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) + { + if (retrievalRequest == null) + { + throw new ArgumentNullException(nameof(retrievalRequest)); + } + + using var message = CreateRetrieveRequest(retrievalRequest, xMsQuerySourceAuthorization); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KnowledgeAgentRetrievalResponse value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KnowledgeAgentRetrievalResponse.DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs index d65745f5b56d..c5dbf1343bc9 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AIFoundryModelCatalogName.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// The name of the embedding model from the Azure AI Studio Catalog that will be called. + /// The name of the embedding model from the Azure AI Foundry Catalog that will be called. public readonly partial struct AIFoundryModelCatalogName : IEquatable { private readonly string _value; @@ -28,6 +28,7 @@ public AIFoundryModelCatalogName(string value) private const string FacebookDinoV2ImageEmbeddingsViTGiantValue = "Facebook-DinoV2-Image-Embeddings-ViT-Giant"; private const string CohereEmbedV3EnglishValue = "Cohere-embed-v3-english"; private const string CohereEmbedV3MultilingualValue = "Cohere-embed-v3-multilingual"; + private const string CohereEmbedV4Value = "Cohere-embed-v4"; /// OpenAI-CLIP-Image-Text-Embeddings-vit-base-patch32. public static AIFoundryModelCatalogName OpenAIClipImageTextEmbeddingsVitBasePatch32 { get; } = new AIFoundryModelCatalogName(OpenAIClipImageTextEmbeddingsVitBasePatch32Value); @@ -41,6 +42,8 @@ public AIFoundryModelCatalogName(string value) public static AIFoundryModelCatalogName CohereEmbedV3English { get; } = new AIFoundryModelCatalogName(CohereEmbedV3EnglishValue); /// Cohere-embed-v3-multilingual. public static AIFoundryModelCatalogName CohereEmbedV3Multilingual { get; } = new AIFoundryModelCatalogName(CohereEmbedV3MultilingualValue); + /// Cohere embed v4 model for generating embeddings from both text and images. + public static AIFoundryModelCatalogName CohereEmbedV4 { get; } = new AIFoundryModelCatalogName(CohereEmbedV4Value); /// Determines if two values are the same. public static bool operator ==(AIFoundryModelCatalogName left, AIFoundryModelCatalogName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs index 933ce5586932..899f99a9246b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningParameters.cs @@ -25,7 +25,7 @@ public AzureMachineLearningParameters(Uri scoringUri) /// (Required for token authentication). The Azure Resource Manager resource ID of the AML service. It should be in the format subscriptions/{guid}/resourceGroups/{resource-group-name}/Microsoft.MachineLearningServices/workspaces/{workspace-name}/services/{service_name}. /// (Optional) When specified, indicates the timeout for the http client making the API call. /// (Optional for token authentication). The region the AML service is deployed in. - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey, string resourceId, TimeSpan? timeout, string region, AIFoundryModelCatalogName? modelName) { ScoringUri = scoringUri; @@ -46,7 +46,7 @@ internal AzureMachineLearningParameters(Uri scoringUri, string authenticationKey public TimeSpan? Timeout { get; set; } /// (Optional for token authentication). The region the AML service is deployed in. public string Region { get; set; } - /// The name of the embedding model from the Azure AI Studio Catalog that is deployed at the provided endpoint. + /// The name of the embedding model from the Azure AI Foundry Catalog that is deployed at the provided endpoint. public AIFoundryModelCatalogName? ModelName { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs index 7aef8e982c11..a459785ad47d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureMachineLearningVectorizer.cs @@ -9,7 +9,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog for generating the vector embedding of a query string. + /// Specifies an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog for generating the vector embedding of a query string. public partial class AzureMachineLearningVectorizer : VectorSearchVectorizer { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs index 24bd4068aa82..2058c258f233 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/AzureOpenAIModelName.cs @@ -25,6 +25,11 @@ public AzureOpenAIModelName(string value) private const string TextEmbeddingAda002Value = "text-embedding-ada-002"; private const string TextEmbedding3LargeValue = "text-embedding-3-large"; private const string TextEmbedding3SmallValue = "text-embedding-3-small"; + private const string Gpt4OValue = "gpt-4o"; + private const string Gpt4OMiniValue = "gpt-4o-mini"; + private const string Gpt41Value = "gpt-4.1"; + private const string Gpt41MiniValue = "gpt-4.1-mini"; + private const string Gpt41NanoValue = "gpt-4.1-nano"; /// text-embedding-ada-002. public static AzureOpenAIModelName TextEmbeddingAda002 { get; } = new AzureOpenAIModelName(TextEmbeddingAda002Value); @@ -32,6 +37,16 @@ public AzureOpenAIModelName(string value) public static AzureOpenAIModelName TextEmbedding3Large { get; } = new AzureOpenAIModelName(TextEmbedding3LargeValue); /// text-embedding-3-small. public static AzureOpenAIModelName TextEmbedding3Small { get; } = new AzureOpenAIModelName(TextEmbedding3SmallValue); + /// gpt-4o. + public static AzureOpenAIModelName Gpt4O { get; } = new AzureOpenAIModelName(Gpt4OValue); + /// gpt-4o-mini. + public static AzureOpenAIModelName Gpt4OMini { get; } = new AzureOpenAIModelName(Gpt4OMiniValue); + /// gpt-4.1. + public static AzureOpenAIModelName Gpt41 { get; } = new AzureOpenAIModelName(Gpt41Value); + /// gpt-4.1-mini. + public static AzureOpenAIModelName Gpt41Mini { get; } = new AzureOpenAIModelName(Gpt41MiniValue); + /// gpt-4.1-nano. + public static AzureOpenAIModelName Gpt41Nano { get; } = new AzureOpenAIModelName(Gpt41NanoValue); /// Determines if two values are the same. public static bool operator ==(AzureOpenAIModelName left, AzureOpenAIModelName right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.cs new file mode 100644 index 000000000000..326bc420aa3d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionExtraParametersBehavior.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.Search.Documents.Indexes.Models +{ + /// Specifies how 'extraParameters' should be handled by Azure AI Foundry. Defaults to 'error'. + public readonly partial struct ChatCompletionExtraParametersBehavior : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ChatCompletionExtraParametersBehavior(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PassThroughValue = "passThrough"; + private const string DropValue = "drop"; + private const string ErrorValue = "error"; + + /// Passes any extra parameters directly to the model. + public static ChatCompletionExtraParametersBehavior PassThrough { get; } = new ChatCompletionExtraParametersBehavior(PassThroughValue); + /// Drops all extra parameters. + public static ChatCompletionExtraParametersBehavior Drop { get; } = new ChatCompletionExtraParametersBehavior(DropValue); + /// Raises an error if any extra parameter is present. + public static ChatCompletionExtraParametersBehavior Error { get; } = new ChatCompletionExtraParametersBehavior(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(ChatCompletionExtraParametersBehavior left, ChatCompletionExtraParametersBehavior right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ChatCompletionExtraParametersBehavior left, ChatCompletionExtraParametersBehavior right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ChatCompletionExtraParametersBehavior(string value) => new ChatCompletionExtraParametersBehavior(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ChatCompletionExtraParametersBehavior other && Equals(other); + /// + public bool Equals(ChatCompletionExtraParametersBehavior 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/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs new file mode 100644 index 000000000000..9eccc2a587d4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.Serialization.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionResponseFormat : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.Value.ToString()); + } + if (Optional.IsDefined(ChatCompletionSchemaProperties)) + { + if (ChatCompletionSchemaProperties != null) + { + writer.WritePropertyName("jsonSchemaProperties"u8); + writer.WriteObjectValue(ChatCompletionSchemaProperties); + } + else + { + writer.WriteNull("jsonSchemaProperties"); + } + } + writer.WriteEndObject(); + } + + internal static ChatCompletionResponseFormat DeserializeChatCompletionResponseFormat(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ChatCompletionResponseFormatType? type = default; + ChatCompletionResponseFormatJsonSchemaProperties jsonSchemaProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new ChatCompletionResponseFormatType(property.Value.GetString()); + continue; + } + if (property.NameEquals("jsonSchemaProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + jsonSchemaProperties = null; + continue; + } + jsonSchemaProperties = ChatCompletionResponseFormatJsonSchemaProperties.DeserializeChatCompletionResponseFormatJsonSchemaProperties(property.Value); + continue; + } + } + return new ChatCompletionResponseFormat(type, jsonSchemaProperties); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionResponseFormat FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionResponseFormat(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs new file mode 100644 index 000000000000..69b584b748b0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormat.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Determines how the language model's response should be serialized. Defaults to 'text'. + public partial class ChatCompletionResponseFormat + { + /// Initializes a new instance of . + public ChatCompletionResponseFormat() + { + } + + /// Initializes a new instance of . + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + internal ChatCompletionResponseFormat(ChatCompletionResponseFormatType? type, ChatCompletionResponseFormatJsonSchemaProperties chatCompletionSchemaProperties) + { + Type = type; + ChatCompletionSchemaProperties = chatCompletionSchemaProperties; + } + + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + public ChatCompletionResponseFormatType? Type { get; set; } + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + public ChatCompletionResponseFormatJsonSchemaProperties ChatCompletionSchemaProperties { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs new file mode 100644 index 000000000000..9b4cd8bfc4c4 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + public partial class ChatCompletionResponseFormatJsonSchemaProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + if (Name != null) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + else + { + writer.WriteNull("name"); + } + } + if (Optional.IsDefined(Description)) + { + if (Description != null) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + else + { + writer.WriteNull("description"); + } + } + if (Optional.IsDefined(Strict)) + { + writer.WritePropertyName("strict"u8); + writer.WriteBooleanValue(Strict.Value); + } + if (Optional.IsDefined(Schema)) + { + if (Schema != null) + { + writer.WritePropertyName("schema"u8); + writer.WriteObjectValue(Schema); + } + else + { + writer.WriteNull("schema"); + } + } + writer.WriteEndObject(); + } + + internal static ChatCompletionResponseFormatJsonSchemaProperties DeserializeChatCompletionResponseFormatJsonSchemaProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + bool? strict = default; + ChatCompletionSchema schema = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + name = null; + continue; + } + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + description = null; + continue; + } + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("strict"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + strict = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("schema"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + schema = null; + continue; + } + schema = ChatCompletionSchema.DeserializeChatCompletionSchema(property.Value); + continue; + } + } + return new ChatCompletionResponseFormatJsonSchemaProperties(name, description, strict, schema); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionResponseFormatJsonSchemaProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionResponseFormatJsonSchemaProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs new file mode 100644 index 000000000000..ee2a8100b60c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatJsonSchemaProperties.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + /// An open dictionary for extended properties. Required if 'type' == 'json_schema'. + public partial class ChatCompletionResponseFormatJsonSchemaProperties + { + /// Initializes a new instance of . + public ChatCompletionResponseFormatJsonSchemaProperties() + { + } + + /// Initializes a new instance of . + /// Name of the json schema the model will adhere to. + /// Description of the json schema the model will adhere to. + /// Whether or not the model's response should use structured outputs. Default is true. + /// Object defining the custom schema the model will use to structure its output. + internal ChatCompletionResponseFormatJsonSchemaProperties(string name, string description, bool? strict, ChatCompletionSchema schema) + { + Name = name; + Description = description; + Strict = strict; + Schema = schema; + } + + /// Name of the json schema the model will adhere to. + public string Name { get; set; } + /// Description of the json schema the model will adhere to. + public string Description { get; set; } + /// Whether or not the model's response should use structured outputs. Default is true. + public bool? Strict { get; set; } + /// Object defining the custom schema the model will use to structure its output. + public ChatCompletionSchema Schema { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.cs new file mode 100644 index 000000000000..849d3b79137a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionResponseFormatType.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.Search.Documents.Models +{ + /// Specifies how the LLM should format the response. Possible values: 'text' (plain string), 'json_object' (arbitrary JSON), or 'json_schema' (adheres to provided schema). + public readonly partial struct ChatCompletionResponseFormatType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ChatCompletionResponseFormatType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string JsonObjectValue = "jsonObject"; + private const string JsonSchemaValue = "jsonSchema"; + + /// text. + public static ChatCompletionResponseFormatType Text { get; } = new ChatCompletionResponseFormatType(TextValue); + /// jsonObject. + public static ChatCompletionResponseFormatType JsonObject { get; } = new ChatCompletionResponseFormatType(JsonObjectValue); + /// jsonSchema. + public static ChatCompletionResponseFormatType JsonSchema { get; } = new ChatCompletionResponseFormatType(JsonSchemaValue); + /// Determines if two values are the same. + public static bool operator ==(ChatCompletionResponseFormatType left, ChatCompletionResponseFormatType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ChatCompletionResponseFormatType left, ChatCompletionResponseFormatType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ChatCompletionResponseFormatType(string value) => new ChatCompletionResponseFormatType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ChatCompletionResponseFormatType other && Equals(other); + /// + public bool Equals(ChatCompletionResponseFormatType 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/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs new file mode 100644 index 000000000000..9078adc11e52 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionSchema : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Type)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteStringValue(Properties); + } + if (Optional.IsCollectionDefined(Required)) + { + writer.WritePropertyName("required"u8); + writer.WriteStartArray(); + foreach (var item in Required) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(AdditionalProperties)) + { + writer.WritePropertyName("additionalProperties"u8); + writer.WriteBooleanValue(AdditionalProperties.Value); + } + writer.WriteEndObject(); + } + + internal static ChatCompletionSchema DeserializeChatCompletionSchema(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = default; + string properties = default; + IList required = default; + bool? additionalProperties = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + properties = property.Value.GetString(); + continue; + } + if (property.NameEquals("required"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + required = array; + continue; + } + if (property.NameEquals("additionalProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalProperties = property.Value.GetBoolean(); + continue; + } + } + return new ChatCompletionSchema(type, properties, required ?? new ChangeTrackingList(), additionalProperties); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ChatCompletionSchema FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionSchema(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs new file mode 100644 index 000000000000..a5216aa5d7d0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSchema.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Object defining the custom schema the model will use to structure its output. + public partial class ChatCompletionSchema + { + /// Initializes a new instance of . + public ChatCompletionSchema() + { + Required = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of schema representation. Usually 'object'. Default is 'object'. + /// A JSON-formatted string that defines the output schema's properties and constraints for the model. + /// An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs. + /// Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false. + internal ChatCompletionSchema(string type, string properties, IList required, bool? additionalProperties) + { + Type = type; + Properties = properties; + Required = required; + AdditionalProperties = additionalProperties; + } + + /// Type of schema representation. Usually 'object'. Default is 'object'. + public string Type { get; set; } + /// A JSON-formatted string that defines the output schema's properties and constraints for the model. + public string Properties { get; set; } + /// An array of the property names that are required to be part of the model's response. All properties must be included for structured outputs. + public IList Required { get; } + /// Controls whether it is allowable for an object to contain additional keys / values that were not defined in the JSON Schema. Default is false. + public bool? AdditionalProperties { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs new file mode 100644 index 000000000000..712aefac920a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.Serialization.cs @@ -0,0 +1,417 @@ +// 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 Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class ChatCompletionSkill : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(ApiKey)) + { + writer.WritePropertyName("apiKey"u8); + writer.WriteStringValue(ApiKey); + } + if (Optional.IsDefined(CommonModelParameters)) + { + writer.WritePropertyName("commonModelParameters"u8); + writer.WriteObjectValue(CommonModelParameters); + } + if (Optional.IsCollectionDefined(ExtraParameters)) + { + if (ExtraParameters != null) + { + writer.WritePropertyName("extraParameters"u8); + writer.WriteStartObject(); + foreach (var item in ExtraParameters) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteObjectValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("extraParameters"); + } + } + if (Optional.IsDefined(ExtraParametersBehavior)) + { + writer.WritePropertyName("extraParametersBehavior"u8); + writer.WriteStringValue(ExtraParametersBehavior.Value.ToString()); + } + if (Optional.IsDefined(ResponseFormat)) + { + writer.WritePropertyName("responseFormat"u8); + writer.WriteObjectValue(ResponseFormat); + } + writer.WritePropertyName("uri"u8); + writer.WriteStringValue(Uri); + if (Optional.IsCollectionDefined(HttpHeaders)) + { + if (HttpHeaders != null) + { + writer.WritePropertyName("httpHeaders"u8); + writer.WriteStartObject(); + foreach (var item in HttpHeaders) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + else + { + writer.WriteNull("httpHeaders"); + } + } + if (Optional.IsDefined(HttpMethod)) + { + writer.WritePropertyName("httpMethod"u8); + writer.WriteStringValue(HttpMethod); + } + if (Optional.IsDefined(Timeout)) + { + if (Timeout != null) + { + writer.WritePropertyName("timeout"u8); + writer.WriteStringValue(Timeout.Value, "P"); + } + else + { + writer.WriteNull("timeout"); + } + } + if (Optional.IsDefined(BatchSize)) + { + if (BatchSize != null) + { + writer.WritePropertyName("batchSize"u8); + writer.WriteNumberValue(BatchSize.Value); + } + else + { + writer.WriteNull("batchSize"); + } + } + if (Optional.IsDefined(DegreeOfParallelism)) + { + if (DegreeOfParallelism != null) + { + writer.WritePropertyName("degreeOfParallelism"u8); + writer.WriteNumberValue(DegreeOfParallelism.Value); + } + else + { + writer.WriteNull("degreeOfParallelism"); + } + } + if (Optional.IsDefined(AuthResourceId)) + { + if (AuthResourceId != null) + { + writer.WritePropertyName("authResourceId"u8); + writer.WriteStringValue(AuthResourceId); + } + else + { + writer.WriteNull("authResourceId"); + } + } + if (Optional.IsDefined(AuthIdentity)) + { + if (AuthIdentity != null) + { + writer.WritePropertyName("authIdentity"u8); + writer.WriteObjectValue(AuthIdentity); + } + else + { + writer.WriteNull("authIdentity"); + } + } + writer.WritePropertyName("@odata.type"u8); + writer.WriteStringValue(ODataType); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Context)) + { + writer.WritePropertyName("context"u8); + writer.WriteStringValue(Context); + } + writer.WritePropertyName("inputs"u8); + writer.WriteStartArray(); + foreach (var item in Inputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("outputs"u8); + writer.WriteStartArray(); + foreach (var item in Outputs) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static ChatCompletionSkill DeserializeChatCompletionSkill(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string apiKey = default; + CommonModelParameters commonModelParameters = default; + IDictionary extraParameters = default; + ChatCompletionExtraParametersBehavior? extraParametersBehavior = default; + ChatCompletionResponseFormat responseFormat = default; + string uri = default; + IDictionary httpHeaders = default; + string httpMethod = default; + TimeSpan? timeout = default; + int? batchSize = default; + int? degreeOfParallelism = default; + ResourceIdentifier authResourceId = default; + SearchIndexerDataIdentity authIdentity = default; + string odataType = default; + string name = default; + string description = default; + string context = default; + IList inputs = default; + IList outputs = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("apiKey"u8)) + { + apiKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("commonModelParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + commonModelParameters = CommonModelParameters.DeserializeCommonModelParameters(property.Value); + continue; + } + if (property.NameEquals("extraParameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + extraParameters = 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, property0.Value.GetObject()); + } + } + extraParameters = dictionary; + continue; + } + if (property.NameEquals("extraParametersBehavior"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extraParametersBehavior = new ChatCompletionExtraParametersBehavior(property.Value.GetString()); + continue; + } + if (property.NameEquals("responseFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + responseFormat = ChatCompletionResponseFormat.DeserializeChatCompletionResponseFormat(property.Value); + continue; + } + if (property.NameEquals("uri"u8)) + { + uri = property.Value.GetString(); + continue; + } + if (property.NameEquals("httpHeaders"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + httpHeaders = null; + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + httpHeaders = dictionary; + continue; + } + if (property.NameEquals("httpMethod"u8)) + { + httpMethod = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + timeout = null; + continue; + } + timeout = property.Value.GetTimeSpan("P"); + continue; + } + if (property.NameEquals("batchSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + batchSize = null; + continue; + } + batchSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("degreeOfParallelism"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + degreeOfParallelism = null; + continue; + } + degreeOfParallelism = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("authResourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authResourceId = null; + continue; + } + authResourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("authIdentity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + authIdentity = null; + continue; + } + authIdentity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); + continue; + } + if (property.NameEquals("@odata.type"u8)) + { + odataType = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("context"u8)) + { + context = property.Value.GetString(); + continue; + } + if (property.NameEquals("inputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(InputFieldMappingEntry.DeserializeInputFieldMappingEntry(item)); + } + inputs = array; + continue; + } + if (property.NameEquals("outputs"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OutputFieldMappingEntry.DeserializeOutputFieldMappingEntry(item)); + } + outputs = array; + continue; + } + } + return new ChatCompletionSkill( + odataType, + name, + description, + context, + inputs, + outputs, + uri, + httpHeaders ?? new ChangeTrackingDictionary(), + httpMethod, + timeout, + batchSize, + degreeOfParallelism, + authResourceId, + authIdentity, + apiKey, + commonModelParameters, + extraParameters ?? new ChangeTrackingDictionary(), + extraParametersBehavior, + responseFormat); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ChatCompletionSkill FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeChatCompletionSkill(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs new file mode 100644 index 000000000000..2f2d564ac4c0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ChatCompletionSkill.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A skill that calls a language model via Azure AI Foundry's Chat Completions endpoint. + public partial class ChatCompletionSkill : WebApiSkill + { + /// Initializes a new instance of . + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// , or is null. + public ChatCompletionSkill(IEnumerable inputs, IEnumerable outputs, string uri) : base(inputs, outputs, uri) + { + Argument.AssertNotNull(inputs, nameof(inputs)); + Argument.AssertNotNull(outputs, nameof(outputs)); + Argument.AssertNotNull(uri, nameof(uri)); + + ExtraParameters = new ChangeTrackingDictionary(); + ODataType = "#Microsoft.Skills.Custom.ChatCompletionSkill"; + } + + /// Initializes a new instance of . + /// A URI fragment specifying the type of skill. + /// The name of the skill which uniquely identifies it within the skillset. A skill with no name defined will be given a default name of its 1-based index in the skills array, prefixed with the character '#'. + /// The description of the skill which describes the inputs, outputs, and usage of the skill. + /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. + /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. + /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// The url for the Web API. + /// The headers required to make the http request. + /// The method for the http request. + /// The desired timeout for the request. Default is 30 seconds. + /// The desired batch size which indicates number of documents. + /// If set, the number of parallel calls that can be made to the Web API. + /// Applies to custom skills that connect to external code in an Azure function or some other application that provides the transformations. This value should be the application ID created for the function or app when it was registered with Azure Active Directory. When specified, the custom skill connects to the function or app using a managed ID (either system or user-assigned) of the search service and the access token of the function or app, using this value as the resource id for creating the scope of the access token. + /// + /// The user-assigned managed identity used for outbound connections. If an authResourceId is provided and it's not specified, the system-assigned managed identity is used. On updates to the indexer, if the identity is unspecified, the value remains unchanged. If set to "none", the value of this property is cleared. + /// 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 . + /// + /// API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time. + /// Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied. + /// Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry’s extensibility pattern. + /// How extra parameters are handled by Azure AI Foundry. Default is 'error'. + /// Determines how the LLM should format its response. Defaults to 'text' response type. + internal ChatCompletionSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, string uri, IDictionary httpHeaders, string httpMethod, TimeSpan? timeout, int? batchSize, int? degreeOfParallelism, ResourceIdentifier authResourceId, SearchIndexerDataIdentity authIdentity, string apiKey, CommonModelParameters commonModelParameters, IDictionary extraParameters, ChatCompletionExtraParametersBehavior? extraParametersBehavior, ChatCompletionResponseFormat responseFormat) : base(oDataType, name, description, context, inputs, outputs, uri, httpHeaders, httpMethod, timeout, batchSize, degreeOfParallelism, authResourceId, authIdentity) + { + ApiKey = apiKey; + CommonModelParameters = commonModelParameters; + ExtraParameters = extraParameters; + ExtraParametersBehavior = extraParametersBehavior; + ResponseFormat = responseFormat; + ODataType = oDataType ?? "#Microsoft.Skills.Custom.ChatCompletionSkill"; + } + + /// API key for authenticating to the model. Both apiKey and authIdentity cannot be specified at the same time. + public string ApiKey { get; set; } + /// Common language model parameters that customers can tweak. If omitted, reasonable defaults will be applied. + public CommonModelParameters CommonModelParameters { get; set; } + /// Open-type dictionary for model-specific parameters that should be appended to the chat completions call. Follows Azure AI Foundry’s extensibility pattern. + public IDictionary ExtraParameters { get; set; } + /// How extra parameters are handled by Azure AI Foundry. Default is 'error'. + public ChatCompletionExtraParametersBehavior? ExtraParametersBehavior { get; set; } + /// Determines how the LLM should format its response. Defaults to 'text' response type. + public ChatCompletionResponseFormat ResponseFormat { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs new file mode 100644 index 000000000000..6a62321c194a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.Serialization.cs @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class CommonModelParameters : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Model)) + { + if (Model != null) + { + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + } + else + { + writer.WriteNull("model"); + } + } + if (Optional.IsDefined(FrequencyPenalty)) + { + if (FrequencyPenalty != null) + { + writer.WritePropertyName("frequencyPenalty"u8); + writer.WriteNumberValue(FrequencyPenalty.Value); + } + else + { + writer.WriteNull("frequencyPenalty"); + } + } + if (Optional.IsDefined(PresencePenalty)) + { + if (PresencePenalty != null) + { + writer.WritePropertyName("presencePenalty"u8); + writer.WriteNumberValue(PresencePenalty.Value); + } + else + { + writer.WriteNull("presencePenalty"); + } + } + if (Optional.IsDefined(MaxTokens)) + { + if (MaxTokens != null) + { + writer.WritePropertyName("maxTokens"u8); + writer.WriteNumberValue(MaxTokens.Value); + } + else + { + writer.WriteNull("maxTokens"); + } + } + if (Optional.IsDefined(Temperature)) + { + if (Temperature != null) + { + writer.WritePropertyName("temperature"u8); + writer.WriteNumberValue(Temperature.Value); + } + else + { + writer.WriteNull("temperature"); + } + } + if (Optional.IsDefined(Seed)) + { + if (Seed != null) + { + writer.WritePropertyName("seed"u8); + writer.WriteNumberValue(Seed.Value); + } + else + { + writer.WriteNull("seed"); + } + } + if (Optional.IsCollectionDefined(Stop)) + { + if (Stop != null) + { + writer.WritePropertyName("stop"u8); + writer.WriteStartArray(); + foreach (var item in Stop) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("stop"); + } + } + writer.WriteEndObject(); + } + + internal static CommonModelParameters DeserializeCommonModelParameters(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string model = default; + float? frequencyPenalty = default; + float? presencePenalty = default; + int? maxTokens = default; + float? temperature = default; + int? seed = default; + IList stop = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("model"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + model = null; + continue; + } + model = property.Value.GetString(); + continue; + } + if (property.NameEquals("frequencyPenalty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + frequencyPenalty = null; + continue; + } + frequencyPenalty = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("presencePenalty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + presencePenalty = null; + continue; + } + presencePenalty = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("maxTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maxTokens = null; + continue; + } + maxTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("temperature"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + temperature = null; + continue; + } + temperature = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("seed"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + seed = null; + continue; + } + seed = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("stop"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + stop = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + stop = array; + continue; + } + } + return new CommonModelParameters( + model, + frequencyPenalty, + presencePenalty, + maxTokens, + temperature, + seed, + stop ?? new ChangeTrackingList()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static CommonModelParameters FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeCommonModelParameters(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs new file mode 100644 index 000000000000..4285af207e3d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/CommonModelParameters.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Common language model parameters for Chat Completions. If omitted, default values are used. + public partial class CommonModelParameters + { + /// Initializes a new instance of . + public CommonModelParameters() + { + Stop = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified. + /// A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0. + /// A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0. + /// Maximum number of tokens to generate. + /// Sampling temperature. Default is 0.7. + /// Random seed for controlling deterministic outputs. If omitted, randomization is used. + /// List of stop sequences that will cut off text generation. Default is none. + internal CommonModelParameters(string model, float? frequencyPenalty, float? presencePenalty, int? maxTokens, float? temperature, int? seed, IList stop) + { + Model = model; + FrequencyPenalty = frequencyPenalty; + PresencePenalty = presencePenalty; + MaxTokens = maxTokens; + Temperature = temperature; + Seed = seed; + Stop = stop; + } + + /// The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified. + public string Model { get; set; } + /// A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0. + public float? FrequencyPenalty { get; set; } + /// A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0. + public float? PresencePenalty { get; set; } + /// Maximum number of tokens to generate. + public int? MaxTokens { get; set; } + /// Sampling temperature. Default is 0.7. + public float? Temperature { get; set; } + /// Random seed for controlling deterministic outputs. If omitted, randomization is used. + public int? Seed { get; set; } + /// List of stop sequences that will cut off text generation. Default is none. + public IList Stop { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs index dcee507c5a2c..44fd64673c2a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; namespace Azure.Search.Documents.Models @@ -19,6 +20,7 @@ internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement eleme } SemanticDebugInfo semantic = default; VectorsDebugInfo vectors = default; + IReadOnlyDictionary> innerHits = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("semantic"u8)) @@ -39,8 +41,34 @@ internal static DocumentDebugInfo DeserializeDocumentDebugInfo(JsonElement eleme vectors = VectorsDebugInfo.DeserializeVectorsDebugInfo(property.Value); continue; } + if (property.NameEquals("innerHits"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 + { + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(QueryResultDocumentInnerHit.DeserializeQueryResultDocumentInnerHit(item)); + } + dictionary.Add(property0.Name, array); + } + } + innerHits = dictionary; + continue; + } } - return new DocumentDebugInfo(semantic, vectors); + return new DocumentDebugInfo(semantic, vectors, innerHits ?? new ChangeTrackingDictionary>()); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs index ca41ce4d1962..aab3ce66c7e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentDebugInfo.cs @@ -5,6 +5,8 @@ #nullable disable +using System.Collections.Generic; + namespace Azure.Search.Documents.Models { /// Contains debugging information that can be used to further explore your search results. @@ -13,20 +15,25 @@ public partial class DocumentDebugInfo /// Initializes a new instance of . internal DocumentDebugInfo() { + InnerHits = new ChangeTrackingDictionary>(); } /// Initializes a new instance of . /// Contains debugging information specific to semantic ranking requests. /// Contains debugging information specific to vector and hybrid search. - internal DocumentDebugInfo(SemanticDebugInfo semantic, VectorsDebugInfo vectors) + /// Contains debugging information specific to vectors matched within a collection of complex types. + internal DocumentDebugInfo(SemanticDebugInfo semantic, VectorsDebugInfo vectors, IReadOnlyDictionary> innerHits) { Semantic = semantic; Vectors = vectors; + InnerHits = innerHits; } /// Contains debugging information specific to semantic ranking requests. public SemanticDebugInfo Semantic { get; } /// Contains debugging information specific to vector and hybrid search. public VectorsDebugInfo Vectors { get; } + /// Contains debugging information specific to vectors matched within a collection of complex types. + public IReadOnlyDictionary> InnerHits { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs index 91f1e56a192c..4611eb4fe308 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.Serialization.cs @@ -16,6 +16,18 @@ public partial class DocumentIntelligenceLayoutSkill : IUtf8JsonSerializable void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); + if (Optional.IsDefined(OutputFormat)) + { + if (OutputFormat != null) + { + writer.WritePropertyName("outputFormat"u8); + writer.WriteStringValue(OutputFormat.Value.ToString()); + } + else + { + writer.WriteNull("outputFormat"); + } + } if (Optional.IsDefined(OutputMode)) { if (OutputMode != null) @@ -40,6 +52,35 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("markdownHeaderDepth"); } } + if (Optional.IsCollectionDefined(ExtractionOptions)) + { + if (ExtractionOptions != null) + { + writer.WritePropertyName("extractionOptions"u8); + writer.WriteStartArray(); + foreach (var item in ExtractionOptions) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("extractionOptions"); + } + } + if (Optional.IsDefined(ChunkingProperties)) + { + if (ChunkingProperties != null) + { + writer.WritePropertyName("chunkingProperties"u8); + writer.WriteObjectValue(ChunkingProperties); + } + else + { + writer.WriteNull("chunkingProperties"); + } + } writer.WritePropertyName("@odata.type"u8); writer.WriteStringValue(ODataType); if (Optional.IsDefined(Name)) @@ -80,8 +121,11 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL { return null; } + DocumentIntelligenceLayoutSkillOutputFormat? outputFormat = default; DocumentIntelligenceLayoutSkillOutputMode? outputMode = default; DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth = default; + IList extractionOptions = default; + DocumentIntelligenceLayoutSkillChunkingProperties chunkingProperties = default; string odataType = default; string name = default; string description = default; @@ -90,6 +134,16 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL IList outputs = default; foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("outputFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + outputFormat = null; + continue; + } + outputFormat = new DocumentIntelligenceLayoutSkillOutputFormat(property.Value.GetString()); + continue; + } if (property.NameEquals("outputMode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -110,6 +164,31 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL markdownHeaderDepth = new DocumentIntelligenceLayoutSkillMarkdownHeaderDepth(property.Value.GetString()); continue; } + if (property.NameEquals("extractionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + extractionOptions = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new DocumentIntelligenceLayoutSkillExtractionOptions(item.GetString())); + } + extractionOptions = array; + continue; + } + if (property.NameEquals("chunkingProperties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + chunkingProperties = null; + continue; + } + chunkingProperties = DocumentIntelligenceLayoutSkillChunkingProperties.DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(property.Value); + continue; + } if (property.NameEquals("@odata.type"u8)) { odataType = property.Value.GetString(); @@ -158,8 +237,11 @@ internal static DocumentIntelligenceLayoutSkill DeserializeDocumentIntelligenceL context, inputs, outputs, + outputFormat, outputMode, - markdownHeaderDepth); + markdownHeaderDepth, + extractionOptions ?? new ChangeTrackingList(), + chunkingProperties); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs index 75eafce1323a..2a491c492f5b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkill.cs @@ -10,7 +10,7 @@ namespace Azure.Search.Documents.Indexes.Models { - /// A skill that extracts content and layout information (as markdown), via Azure AI Services, from files within the enrichment pipeline. + /// A skill that extracts content and layout information, via Azure AI Services, from files within the enrichment pipeline. public partial class DocumentIntelligenceLayoutSkill : SearchIndexerSkill { /// Initializes a new instance of . @@ -22,6 +22,7 @@ public DocumentIntelligenceLayoutSkill(IEnumerable input Argument.AssertNotNull(inputs, nameof(inputs)); Argument.AssertNotNull(outputs, nameof(outputs)); + ExtractionOptions = new ChangeTrackingList(); ODataType = "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; } @@ -32,18 +33,30 @@ public DocumentIntelligenceLayoutSkill(IEnumerable input /// Represents the level at which operations take place, such as the document root or document content (for example, /document or /document/content). The default is /document. /// Inputs of the skills could be a column in the source data set, or the output of an upstream skill. /// The output of a skill is either a field in a search index, or a value that can be consumed as an input by another skill. + /// Controls the cardinality of the output format. Default is 'markdown'. /// Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. /// The depth of headers in the markdown output. Default is h6. - internal DocumentIntelligenceLayoutSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, DocumentIntelligenceLayoutSkillOutputMode? outputMode, DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth) : base(oDataType, name, description, context, inputs, outputs) + /// Controls the cardinality of the content extracted from the document by the skill. + /// Controls the cardinality for chunking the content. + internal DocumentIntelligenceLayoutSkill(string oDataType, string name, string description, string context, IList inputs, IList outputs, DocumentIntelligenceLayoutSkillOutputFormat? outputFormat, DocumentIntelligenceLayoutSkillOutputMode? outputMode, DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? markdownHeaderDepth, IList extractionOptions, DocumentIntelligenceLayoutSkillChunkingProperties chunkingProperties) : base(oDataType, name, description, context, inputs, outputs) { + OutputFormat = outputFormat; OutputMode = outputMode; MarkdownHeaderDepth = markdownHeaderDepth; + ExtractionOptions = extractionOptions; + ChunkingProperties = chunkingProperties; ODataType = oDataType ?? "#Microsoft.Skills.Util.DocumentIntelligenceLayoutSkill"; } + /// Controls the cardinality of the output format. Default is 'markdown'. + public DocumentIntelligenceLayoutSkillOutputFormat? OutputFormat { get; set; } /// Controls the cardinality of the output produced by the skill. Default is 'oneToMany'. public DocumentIntelligenceLayoutSkillOutputMode? OutputMode { get; set; } /// The depth of headers in the markdown output. Default is h6. public DocumentIntelligenceLayoutSkillMarkdownHeaderDepth? MarkdownHeaderDepth { get; set; } + /// Controls the cardinality of the content extracted from the document by the skill. + public IList ExtractionOptions { get; set; } + /// Controls the cardinality for chunking the content. + public DocumentIntelligenceLayoutSkillChunkingProperties ChunkingProperties { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs new file mode 100644 index 000000000000..62f50c8ccfd5 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class DocumentIntelligenceLayoutSkillChunkingProperties : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Unit)) + { + if (Unit != null) + { + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit.Value.ToString()); + } + else + { + writer.WriteNull("unit"); + } + } + if (Optional.IsDefined(MaximumLength)) + { + if (MaximumLength != null) + { + writer.WritePropertyName("maximumLength"u8); + writer.WriteNumberValue(MaximumLength.Value); + } + else + { + writer.WriteNull("maximumLength"); + } + } + if (Optional.IsDefined(OverlapLength)) + { + if (OverlapLength != null) + { + writer.WritePropertyName("overlapLength"u8); + writer.WriteNumberValue(OverlapLength.Value); + } + else + { + writer.WriteNull("overlapLength"); + } + } + writer.WriteEndObject(); + } + + internal static DocumentIntelligenceLayoutSkillChunkingProperties DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DocumentIntelligenceLayoutSkillChunkingUnit? unit = default; + int? maximumLength = default; + int? overlapLength = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("unit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + unit = null; + continue; + } + unit = new DocumentIntelligenceLayoutSkillChunkingUnit(property.Value.GetString()); + continue; + } + if (property.NameEquals("maximumLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + maximumLength = null; + continue; + } + maximumLength = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("overlapLength"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + overlapLength = null; + continue; + } + overlapLength = property.Value.GetInt32(); + continue; + } + } + return new DocumentIntelligenceLayoutSkillChunkingProperties(unit, maximumLength, overlapLength); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static DocumentIntelligenceLayoutSkillChunkingProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDocumentIntelligenceLayoutSkillChunkingProperties(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs new file mode 100644 index 000000000000..d87cfc89a2a7 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Controls the cardinality for chunking the content. + public partial class DocumentIntelligenceLayoutSkillChunkingProperties + { + /// Initializes a new instance of . + public DocumentIntelligenceLayoutSkillChunkingProperties() + { + } + + /// Initializes a new instance of . + /// The unit of the chunk. + /// The maximum chunk length in characters. Default is 500. + /// The length of overlap provided between two text chunks. Default is 0. + internal DocumentIntelligenceLayoutSkillChunkingProperties(DocumentIntelligenceLayoutSkillChunkingUnit? unit, int? maximumLength, int? overlapLength) + { + Unit = unit; + MaximumLength = maximumLength; + OverlapLength = overlapLength; + } + + /// The unit of the chunk. + public DocumentIntelligenceLayoutSkillChunkingUnit? Unit { get; set; } + /// The maximum chunk length in characters. Default is 500. + public int? MaximumLength { get; set; } + /// The length of overlap provided between two text chunks. Default is 0. + public int? OverlapLength { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.cs new file mode 100644 index 000000000000..beae9ab3a252 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillChunkingUnit.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.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the chunk unit. Default is 'characters'. + public readonly partial struct DocumentIntelligenceLayoutSkillChunkingUnit : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillChunkingUnit(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CharactersValue = "characters"; + + /// Specifies chunk by characters. + public static DocumentIntelligenceLayoutSkillChunkingUnit Characters { get; } = new DocumentIntelligenceLayoutSkillChunkingUnit(CharactersValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillChunkingUnit left, DocumentIntelligenceLayoutSkillChunkingUnit right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillChunkingUnit left, DocumentIntelligenceLayoutSkillChunkingUnit right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillChunkingUnit(string value) => new DocumentIntelligenceLayoutSkillChunkingUnit(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillChunkingUnit other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillChunkingUnit 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.cs new file mode 100644 index 000000000000..d21d930ae891 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillExtractionOptions.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.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the content extracted from the document by the skill. + public readonly partial struct DocumentIntelligenceLayoutSkillExtractionOptions : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillExtractionOptions(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImagesValue = "images"; + private const string LocationMetadataValue = "locationMetadata"; + + /// Specify that image content should be extracted from the document. + public static DocumentIntelligenceLayoutSkillExtractionOptions Images { get; } = new DocumentIntelligenceLayoutSkillExtractionOptions(ImagesValue); + /// Specify that location metadata should be extracted from the document. + public static DocumentIntelligenceLayoutSkillExtractionOptions LocationMetadata { get; } = new DocumentIntelligenceLayoutSkillExtractionOptions(LocationMetadataValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillExtractionOptions left, DocumentIntelligenceLayoutSkillExtractionOptions right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillExtractionOptions left, DocumentIntelligenceLayoutSkillExtractionOptions right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillExtractionOptions(string value) => new DocumentIntelligenceLayoutSkillExtractionOptions(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillExtractionOptions other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillExtractionOptions 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.cs new file mode 100644 index 000000000000..4d1ee1179571 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputFormat.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.Search.Documents.Indexes.Models +{ + /// Controls the cardinality of the output format. Default is 'markdown'. + public readonly partial struct DocumentIntelligenceLayoutSkillOutputFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DocumentIntelligenceLayoutSkillOutputFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string MarkdownValue = "markdown"; + + /// Specify the format of the output as text. + public static DocumentIntelligenceLayoutSkillOutputFormat Text { get; } = new DocumentIntelligenceLayoutSkillOutputFormat(TextValue); + /// Specify the format of the output as markdown. + public static DocumentIntelligenceLayoutSkillOutputFormat Markdown { get; } = new DocumentIntelligenceLayoutSkillOutputFormat(MarkdownValue); + /// Determines if two values are the same. + public static bool operator ==(DocumentIntelligenceLayoutSkillOutputFormat left, DocumentIntelligenceLayoutSkillOutputFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DocumentIntelligenceLayoutSkillOutputFormat left, DocumentIntelligenceLayoutSkillOutputFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DocumentIntelligenceLayoutSkillOutputFormat(string value) => new DocumentIntelligenceLayoutSkillOutputFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DocumentIntelligenceLayoutSkillOutputFormat other && Equals(other); + /// + public bool Equals(DocumentIntelligenceLayoutSkillOutputFormat 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/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs index 50559c358b55..536498a0ab24 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/DocumentIntelligenceLayoutSkillOutputMode.cs @@ -24,7 +24,7 @@ public DocumentIntelligenceLayoutSkillOutputMode(string value) private const string OneToManyValue = "oneToMany"; - /// Specify the deepest markdown header section to parse. + /// Specify that the output should be parsed as 'oneToMany'. public static DocumentIntelligenceLayoutSkillOutputMode OneToMany { get; } = new DocumentIntelligenceLayoutSkillOutputMode(OneToManyValue); /// Determines if two values are the same. public static bool operator ==(DocumentIntelligenceLayoutSkillOutputMode left, DocumentIntelligenceLayoutSkillOutputMode right) => left.Equals(right); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs index 6cd00f2b438b..97365b663f5e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.Serialization.cs @@ -21,7 +21,7 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle } IndexerExecutionStatus status = default; IndexerExecutionStatusDetail? statusDetail = default; - IndexerState currentState = default; + IndexingMode? mode = default; string errorMessage = default; DateTimeOffset? startTime = default; DateTimeOffset? endTime = default; @@ -48,13 +48,13 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle statusDetail = new IndexerExecutionStatusDetail(property.Value.GetString()); continue; } - if (property.NameEquals("currentState"u8)) + if (property.NameEquals("mode"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - currentState = IndexerState.DeserializeIndexerState(property.Value); + mode = new IndexingMode(property.Value.GetString()); continue; } if (property.NameEquals("errorMessage"u8)) @@ -125,7 +125,7 @@ internal static IndexerExecutionResult DeserializeIndexerExecutionResult(JsonEle return new IndexerExecutionResult( status, statusDetail, - currentState, + mode, errorMessage, startTime, endTime, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs index 16d5530e3ad3..d56dae6ba704 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionResult.cs @@ -32,7 +32,7 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable Initializes a new instance of . /// The outcome of this indexer execution. /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. + /// The mode the indexer is running in. /// The error message indicating the top-level error, if any. /// The start time of this indexer execution. /// The end time of this indexer execution, if the execution has already completed. @@ -42,11 +42,11 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IEnumerable The number of items that failed to be indexed during this indexer execution. /// Change tracking state with which an indexer execution started. /// Change tracking state with which an indexer execution finished. - internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexerState currentState, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) + internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionStatusDetail? statusDetail, IndexingMode? mode, string errorMessage, DateTimeOffset? startTime, DateTimeOffset? endTime, IReadOnlyList errors, IReadOnlyList warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { Status = status; StatusDetail = statusDetail; - CurrentState = currentState; + Mode = mode; ErrorMessage = errorMessage; StartTime = startTime; EndTime = endTime; @@ -62,8 +62,8 @@ internal IndexerExecutionResult(IndexerExecutionStatus status, IndexerExecutionS public IndexerExecutionStatus Status { get; } /// The outcome of this indexer execution. public IndexerExecutionStatusDetail? StatusDetail { get; } - /// All of the state that defines and dictates the indexer's current execution. - public IndexerState CurrentState { get; } + /// The mode the indexer is running in. + public IndexingMode? Mode { get; } /// The error message indicating the top-level error, if any. public string ErrorMessage { get; } /// The start time of this indexer execution. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs index b66b5527d807..9f79f6207aaa 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerExecutionStatusDetail.cs @@ -23,9 +23,12 @@ public IndexerExecutionStatusDetail(string value) } private const string ResetDocsValue = "resetDocs"; + private const string ResyncValue = "resync"; /// Indicates that the reset that occurred was for a call to ResetDocs. public static IndexerExecutionStatusDetail ResetDocs { get; } = new IndexerExecutionStatusDetail(ResetDocsValue); + /// Indicates to selectively resync based on option(s) from data source. + public static IndexerExecutionStatusDetail Resync { get; } = new IndexerExecutionStatusDetail(ResyncValue); /// Determines if two values are the same. public static bool operator ==(IndexerExecutionStatusDetail left, IndexerExecutionStatusDetail right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.cs new file mode 100644 index 000000000000..8710b88cc598 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerPermissionOption.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.Search.Documents.Indexes.Models +{ + /// Options with various types of permission data to index. + public readonly partial struct IndexerPermissionOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IndexerPermissionOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserIdsValue = "userIds"; + private const string GroupIdsValue = "groupIds"; + private const string RbacScopeValue = "rbacScope"; + + /// Indexer to ingest ACL userIds from data source to index. + public static IndexerPermissionOption UserIds { get; } = new IndexerPermissionOption(UserIdsValue); + /// Indexer to ingest ACL groupIds from data source to index. + public static IndexerPermissionOption GroupIds { get; } = new IndexerPermissionOption(GroupIdsValue); + /// Indexer to ingest Azure RBAC scope from data source to index. + public static IndexerPermissionOption RbacScope { get; } = new IndexerPermissionOption(RbacScopeValue); + /// Determines if two values are the same. + public static bool operator ==(IndexerPermissionOption left, IndexerPermissionOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IndexerPermissionOption left, IndexerPermissionOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IndexerPermissionOption(string value) => new IndexerPermissionOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IndexerPermissionOption other && Equals(other); + /// + public bool Equals(IndexerPermissionOption 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/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.Serialization.cs new file mode 100644 index 000000000000..2dde11b541c7 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class IndexerResyncBody : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(Options)) + { + if (Options != null) + { + writer.WritePropertyName("options"u8); + writer.WriteStartArray(); + foreach (var item in Options) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("options"); + } + } + writer.WriteEndObject(); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.cs new file mode 100644 index 000000000000..74fd00e15f9e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncBody.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + /// The IndexerResyncBody. + public partial class IndexerResyncBody + { + /// Initializes a new instance of . + public IndexerResyncBody() + { + Options = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Re-sync options that have been pre-defined from data source. + internal IndexerResyncBody(IList options) + { + Options = options; + } + + /// Re-sync options that have been pre-defined from data source. + public IList Options { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.cs new file mode 100644 index 000000000000..b70cdddbeb6d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerResyncOption.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.Search.Documents.Indexes.Models +{ + /// Options with various types of permission data to index. + public readonly partial struct IndexerResyncOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public IndexerResyncOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PermissionsValue = "permissions"; + + /// Indexer to re-ingest pre-selected permissions data from data source to index. + public static IndexerResyncOption Permissions { get; } = new IndexerResyncOption(PermissionsValue); + /// Determines if two values are the same. + public static bool operator ==(IndexerResyncOption left, IndexerResyncOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(IndexerResyncOption left, IndexerResyncOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator IndexerResyncOption(string value) => new IndexerResyncOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IndexerResyncOption other && Equals(other); + /// + public bool Equals(IndexerResyncOption 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/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs index 52b14853ef52..561f28ed5854 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.Serialization.cs @@ -19,12 +19,14 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) return null; } IndexingMode? mode = default; - string allDocsInitialChangeTrackingState = default; - string allDocsFinalChangeTrackingState = default; - string resetDocsInitialChangeTrackingState = default; - string resetDocsFinalChangeTrackingState = default; + string allDocsInitialTrackingState = default; + string allDocsFinalTrackingState = default; + string resetDocsInitialTrackingState = default; + string resetDocsFinalTrackingState = default; IReadOnlyList resetDocumentKeys = default; IReadOnlyList resetDatasourceDocumentIds = default; + string resyncInitialTrackingState = default; + string resyncFinalTrackingState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("mode"u8)) @@ -36,24 +38,24 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) mode = new IndexingMode(property.Value.GetString()); continue; } - if (property.NameEquals("allDocsInitialChangeTrackingState"u8)) + if (property.NameEquals("allDocsInitialTrackingState"u8)) { - allDocsInitialChangeTrackingState = property.Value.GetString(); + allDocsInitialTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("allDocsFinalChangeTrackingState"u8)) + if (property.NameEquals("allDocsFinalTrackingState"u8)) { - allDocsFinalChangeTrackingState = property.Value.GetString(); + allDocsFinalTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("resetDocsInitialChangeTrackingState"u8)) + if (property.NameEquals("resetDocsInitialTrackingState"u8)) { - resetDocsInitialChangeTrackingState = property.Value.GetString(); + resetDocsInitialTrackingState = property.Value.GetString(); continue; } - if (property.NameEquals("resetDocsFinalChangeTrackingState"u8)) + if (property.NameEquals("resetDocsFinalTrackingState"u8)) { - resetDocsFinalChangeTrackingState = property.Value.GetString(); + resetDocsFinalTrackingState = property.Value.GetString(); continue; } if (property.NameEquals("resetDocumentKeys"u8)) @@ -84,15 +86,27 @@ internal static IndexerState DeserializeIndexerState(JsonElement element) resetDatasourceDocumentIds = array; continue; } + if (property.NameEquals("resyncInitialTrackingState"u8)) + { + resyncInitialTrackingState = property.Value.GetString(); + continue; + } + if (property.NameEquals("resyncFinalTrackingState"u8)) + { + resyncFinalTrackingState = property.Value.GetString(); + continue; + } } return new IndexerState( mode, - allDocsInitialChangeTrackingState, - allDocsFinalChangeTrackingState, - resetDocsInitialChangeTrackingState, - resetDocsFinalChangeTrackingState, + allDocsInitialTrackingState, + allDocsFinalTrackingState, + resetDocsInitialTrackingState, + resetDocsFinalTrackingState, resetDocumentKeys ?? new ChangeTrackingList(), - resetDatasourceDocumentIds ?? new ChangeTrackingList()); + resetDatasourceDocumentIds ?? new ChangeTrackingList(), + resyncInitialTrackingState, + resyncFinalTrackingState); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs index 8047262f3e4f..6678d5f11c6b 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexerState.cs @@ -19,9 +19,44 @@ internal IndexerState() ResetDataSourceDocumentIds = new ChangeTrackingList(); } + /// Initializes a new instance of . + /// The mode the indexer is running in. + /// Change tracking state used when indexing starts on all documents in the datasource. + /// Change tracking state value when indexing finishes on all documents in the datasource. + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. + /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. + /// Change tracking state used when indexing starts on selective options from the datasource. + /// Change tracking state value when indexing finishes on selective options from the datasource. + internal IndexerState(IndexingMode? mode, string allDocsInitialTrackingState, string allDocsFinalTrackingState, string resetDocsInitialTrackingState, string resetDocsFinalTrackingState, IReadOnlyList resetDocumentKeys, IReadOnlyList resetDataSourceDocumentIds, string resyncInitialTrackingState, string resyncFinalTrackingState) + { + Mode = mode; + AllDocsInitialTrackingState = allDocsInitialTrackingState; + AllDocsFinalTrackingState = allDocsFinalTrackingState; + ResetDocsInitialTrackingState = resetDocsInitialTrackingState; + ResetDocsFinalTrackingState = resetDocsFinalTrackingState; + ResetDocumentKeys = resetDocumentKeys; + ResetDataSourceDocumentIds = resetDataSourceDocumentIds; + ResyncInitialTrackingState = resyncInitialTrackingState; + ResyncFinalTrackingState = resyncFinalTrackingState; + } + /// The mode the indexer is running in. public IndexingMode? Mode { get; } + /// Change tracking state used when indexing starts on all documents in the datasource. + public string AllDocsInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on all documents in the datasource. + public string AllDocsFinalTrackingState { get; } + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + public string ResetDocsInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + public string ResetDocsFinalTrackingState { get; } /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. public IReadOnlyList ResetDocumentKeys { get; } + /// Change tracking state used when indexing starts on selective options from the datasource. + public string ResyncInitialTrackingState { get; } + /// Change tracking state value when indexing finishes on selective options from the datasource. + public string ResyncFinalTrackingState { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs index d06c75c206b1..df0a050db730 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/IndexingMode.cs @@ -24,6 +24,9 @@ public IndexingMode(string value) private const string AllDocumentsValue = "indexingAllDocs"; private const string ResetDocumentsValue = "indexingResetDocs"; + private const string IndexingResyncValue = "indexingResync"; + /// The indexer is resyncing and indexing selective option(s) from the datasource. + public static IndexingMode IndexingResync { get; } = new IndexingMode(IndexingResyncValue); /// Determines if two values are the same. public static bool operator ==(IndexingMode left, IndexingMode right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs new file mode 100644 index 000000000000..6f1be5a83d72 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.Serialization.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("models"u8); + writer.WriteStartArray(); + foreach (var item in Models) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("targetIndexes"u8); + writer.WriteStartArray(); + foreach (var item in TargetIndexes) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(RequestLimits)) + { + writer.WritePropertyName("requestLimits"u8); + writer.WriteObjectValue(RequestLimits); + } + if (Optional.IsDefined(_eTag)) + { + writer.WritePropertyName("@odata.etag"u8); + writer.WriteStringValue(_eTag); + } + if (Optional.IsDefined(EncryptionKey)) + { + if (EncryptionKey != null) + { + writer.WritePropertyName("encryptionKey"u8); + writer.WriteObjectValue(EncryptionKey); + } + else + { + writer.WriteNull("encryptionKey"); + } + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgent DeserializeKnowledgeAgent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList models = default; + IList targetIndexes = default; + KnowledgeAgentRequestLimits requestLimits = default; + string odataEtag = default; + SearchResourceEncryptionKey encryptionKey = default; + string description = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("models"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentModel.DeserializeKnowledgeAgentModel(item)); + } + models = array; + continue; + } + if (property.NameEquals("targetIndexes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentTargetIndex.DeserializeKnowledgeAgentTargetIndex(item)); + } + targetIndexes = array; + continue; + } + if (property.NameEquals("requestLimits"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestLimits = KnowledgeAgentRequestLimits.DeserializeKnowledgeAgentRequestLimits(property.Value); + continue; + } + if (property.NameEquals("@odata.etag"u8)) + { + odataEtag = property.Value.GetString(); + continue; + } + if (property.NameEquals("encryptionKey"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + encryptionKey = null; + continue; + } + encryptionKey = SearchResourceEncryptionKey.DeserializeSearchResourceEncryptionKey(property.Value); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgent( + name, + models, + targetIndexes, + requestLimits, + odataEtag, + encryptionKey, + description); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.cs new file mode 100644 index 000000000000..4c2fcc41022d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgent.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; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The KnowledgeAgent. + public partial class KnowledgeAgent + { + /// Initializes a new instance of . + /// The name of the knowledge agent. + /// + /// Contains configuration options on how to connect to AI models. + /// 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 . + /// + /// + /// , or is null. + public KnowledgeAgent(string name, IEnumerable models, IEnumerable targetIndexes) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(models, nameof(models)); + Argument.AssertNotNull(targetIndexes, nameof(targetIndexes)); + + Name = name; + Models = models.ToList(); + TargetIndexes = targetIndexes.ToList(); + } + + /// Initializes a new instance of . + /// The name of the knowledge agent. + /// + /// Contains configuration options on how to connect to AI models. + /// 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 . + /// + /// + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + /// The ETag of the agent. + /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your agent definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your agent definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your agent definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. + /// The description of the agent. + internal KnowledgeAgent(string name, IList models, IList targetIndexes, KnowledgeAgentRequestLimits requestLimits, string eTag, SearchResourceEncryptionKey encryptionKey, string description) + { + Name = name; + Models = models; + TargetIndexes = targetIndexes; + RequestLimits = requestLimits; + _eTag = eTag; + EncryptionKey = encryptionKey; + Description = description; + } + + /// The name of the knowledge agent. + public string Name { get; set; } + /// + /// Contains configuration options on how to connect to AI models. + /// 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 IList Models { get; } + /// Gets the target indexes. + public IList TargetIndexes { get; } + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + public KnowledgeAgentRequestLimits RequestLimits { get; set; } + /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your agent definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your agent definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your agent definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. + public SearchResourceEncryptionKey EncryptionKey { get; set; } + /// The description of the agent. + public string Description { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs new file mode 100644 index 000000000000..cb25308ce549 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentActivityRecord + { + internal static KnowledgeAgentActivityRecord DeserializeKnowledgeAgentActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureSearchQuery": return KnowledgeAgentSearchActivityRecord.DeserializeKnowledgeAgentSearchActivityRecord(element); + case "AzureSearchSemanticRanker": return KnowledgeAgentSemanticRankerActivityRecord.DeserializeKnowledgeAgentSemanticRankerActivityRecord(element); + case "ModelQueryPlanning": return KnowledgeAgentModelQueryPlanningActivityRecord.DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(element); + } + } + return UnknownKnowledgeAgentActivityRecord.DeserializeUnknownKnowledgeAgentActivityRecord(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs new file mode 100644 index 000000000000..325559b9edaf --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentActivityRecord.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Agents.Models +{ + /// + /// Base type for activity records. + /// 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 abstract partial class KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + protected KnowledgeAgentActivityRecord(int id) + { + Id = id; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + internal KnowledgeAgentActivityRecord(int id, string type) + { + Id = id; + Type = type; + } + + /// The ID of the activity record. + public int Id { get; } + /// The type of the activity record. + internal string Type { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs new file mode 100644 index 000000000000..2bbd56492835 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentAzureOpenAIModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("azureOpenAIParameters"u8); + writer.WriteObjectValue(AzureOpenAIParameters); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentAzureOpenAIModel DeserializeKnowledgeAgentAzureOpenAIModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureOpenAIVectorizerParameters azureOpenAIParameters = default; + KnowledgeAgentModelKind kind = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureOpenAIParameters"u8)) + { + azureOpenAIParameters = AzureOpenAIVectorizerParameters.DeserializeAzureOpenAIVectorizerParameters(property.Value); + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new KnowledgeAgentModelKind(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentAzureOpenAIModel(kind, azureOpenAIParameters); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentAzureOpenAIModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentAzureOpenAIModel(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs new file mode 100644 index 000000000000..dbb8dafc79d0 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureOpenAIModel.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Specifies the Azure OpenAI resource used to do query planning. + public partial class KnowledgeAgentAzureOpenAIModel : KnowledgeAgentModel + { + /// Initializes a new instance of . + /// Contains the parameters specific to Azure OpenAI model endpoint. + /// is null. + public KnowledgeAgentAzureOpenAIModel(AzureOpenAIVectorizerParameters azureOpenAIParameters) + { + Argument.AssertNotNull(azureOpenAIParameters, nameof(azureOpenAIParameters)); + + AzureOpenAIParameters = azureOpenAIParameters; + Kind = KnowledgeAgentModelKind.AzureOpenAI; + } + + /// Initializes a new instance of . + /// The type of AI model. + /// Contains the parameters specific to Azure OpenAI model endpoint. + internal KnowledgeAgentAzureOpenAIModel(KnowledgeAgentModelKind kind, AzureOpenAIVectorizerParameters azureOpenAIParameters) : base(kind) + { + AzureOpenAIParameters = azureOpenAIParameters; + Kind = kind; + } + + /// Contains the parameters specific to Azure OpenAI model endpoint. + public AzureOpenAIVectorizerParameters AzureOpenAIParameters { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs new file mode 100644 index 000000000000..c38f7245790a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.Serialization.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentAzureSearchDocReference + { + internal static KnowledgeAgentAzureSearchDocReference DeserializeKnowledgeAgentAzureSearchDocReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string docKey = default; + IReadOnlyDictionary sourceData = default; + string type = default; + string id = default; + int activitySource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("docKey"u8)) + { + docKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceData"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, property0.Value.GetObject()); + } + } + sourceData = dictionary; + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("activitySource"u8)) + { + activitySource = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentAzureSearchDocReference(type, id, activitySource, docKey, sourceData ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentAzureSearchDocReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentAzureSearchDocReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs new file mode 100644 index 000000000000..b9ae6cf71e89 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentAzureSearchDocReference.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Search.Documents.Agents.Models +{ + /// Represents an Azure Search document reference. + public partial class KnowledgeAgentAzureSearchDocReference : KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// is null. + internal KnowledgeAgentAzureSearchDocReference(string id, int activitySource) : base(id, activitySource) + { + Argument.AssertNotNull(id, nameof(id)); + + SourceData = new ChangeTrackingDictionary(); + Type = "AzureSearchDoc"; + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + /// The document key for the reference. + /// Dictionary of <any>. + internal KnowledgeAgentAzureSearchDocReference(string type, string id, int activitySource, string docKey, IReadOnlyDictionary sourceData) : base(type, id, activitySource) + { + DocKey = docKey; + SourceData = sourceData; + Type = type ?? "AzureSearchDoc"; + } + + /// The document key for the reference. + public string DocKey { get; } + /// Dictionary of <any>. + public IReadOnlyDictionary SourceData { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs new file mode 100644 index 000000000000..0d47ea5ff8a3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.Serialization.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentIndexParams : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(IndexName)) + { + writer.WritePropertyName("indexName"u8); + writer.WriteStringValue(IndexName); + } + if (Optional.IsDefined(FilterAddOn)) + { + writer.WritePropertyName("filterAddOn"u8); + writer.WriteStringValue(FilterAddOn); + } + if (Optional.IsDefined(MaxDocsForReranker)) + { + writer.WritePropertyName("maxDocsForReranker"u8); + writer.WriteNumberValue(MaxDocsForReranker.Value); + } + if (Optional.IsDefined(RerankerThreshold)) + { + writer.WritePropertyName("rerankerThreshold"u8); + writer.WriteNumberValue(RerankerThreshold.Value); + } + if (Optional.IsDefined(IncludeReferenceSourceData)) + { + writer.WritePropertyName("includeReferenceSourceData"u8); + writer.WriteBooleanValue(IncludeReferenceSourceData.Value); + } + writer.WriteEndObject(); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs new file mode 100644 index 000000000000..0a8932bd36a3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentIndexParams.cs @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Agents.Models +{ + /// The KnowledgeAgentIndexParams. + public partial class KnowledgeAgentIndexParams + { + /// Initializes a new instance of . + public KnowledgeAgentIndexParams() + { + } + + /// Initializes a new instance of . + /// The name of the index the params apply to. + /// A filter condition applied to the index (e.g., 'State eq VA'). + /// Limits the number of documents considered for ranking. + /// A threshold for reranking results (range: 0-4). + /// Indicates whether reference source data should be included. + internal KnowledgeAgentIndexParams(string indexName, string filterAddOn, int? maxDocsForReranker, float? rerankerThreshold, bool? includeReferenceSourceData) + { + IndexName = indexName; + FilterAddOn = filterAddOn; + MaxDocsForReranker = maxDocsForReranker; + RerankerThreshold = rerankerThreshold; + IncludeReferenceSourceData = includeReferenceSourceData; + } + + /// The name of the index the params apply to. + public string IndexName { get; set; } + /// A filter condition applied to the index (e.g., 'State eq VA'). + public string FilterAddOn { get; set; } + /// Limits the number of documents considered for ranking. + public int? MaxDocsForReranker { get; set; } + /// A threshold for reranking results (range: 0-4). + public float? RerankerThreshold { get; set; } + /// Indicates whether reference source data should be included. + public bool? IncludeReferenceSourceData { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs new file mode 100644 index 000000000000..d7d1f9a1f004 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentMessage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("role"u8); + writer.WriteStringValue(Role); + writer.WritePropertyName("content"u8); + writer.WriteStartArray(); + foreach (var item in Content) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessage DeserializeKnowledgeAgentMessage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string role = default; + IList content = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + role = property.Value.GetString(); + continue; + } + if (property.NameEquals("content"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentMessageContent.DeserializeKnowledgeAgentMessageContent(item)); + } + content = array; + continue; + } + } + return new KnowledgeAgentMessage(role, content); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs new file mode 100644 index 000000000000..fd4139aff8d5 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessage.cs @@ -0,0 +1,54 @@ +// 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.Search.Documents.Agents.Models +{ + /// The natural language message style object. + public partial class KnowledgeAgentMessage + { + /// Initializes a new instance of . + /// The role of the tool response. + /// + /// 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 KnowledgeAgentMessage(string role, IEnumerable content) + { + Argument.AssertNotNull(role, nameof(role)); + Argument.AssertNotNull(content, nameof(content)); + + Role = role; + Content = content.ToList(); + } + + /// Initializes a new instance of . + /// The role of the tool response. + /// + /// 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 KnowledgeAgentMessage(string role, IList content) + { + Role = role; + Content = content; + } + + /// The role of the tool response. + public string Role { get; set; } + /// + /// Gets the content + /// 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 IList Content { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs new file mode 100644 index 000000000000..905520d5af84 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentMessageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageContent DeserializeKnowledgeAgentMessageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "image": return KnowledgeAgentMessageImageContent.DeserializeKnowledgeAgentMessageImageContent(element); + case "text": return KnowledgeAgentMessageTextContent.DeserializeKnowledgeAgentMessageTextContent(element); + } + } + return UnknownKnowledgeAgentMessageContent.DeserializeUnknownKnowledgeAgentMessageContent(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageContent(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs new file mode 100644 index 000000000000..f56a0c4647bf --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContent.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Agents.Models +{ + /// + /// Specifies the type of the message content. + /// 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 abstract partial class KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + protected KnowledgeAgentMessageContent() + { + } + + /// Initializes a new instance of . + /// The type of the message. + internal KnowledgeAgentMessageContent(KnowledgeAgentMessageContentType type) + { + Type = type; + } + + /// The type of the message. + internal KnowledgeAgentMessageContentType Type { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.cs new file mode 100644 index 000000000000..32b526ea8c5d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageContentType.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.Search.Documents.Agents.Models +{ + /// The type of message content. + public readonly partial struct KnowledgeAgentMessageContentType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KnowledgeAgentMessageContentType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TextValue = "text"; + private const string ImageValue = "image"; + + /// Text message content kind. + public static KnowledgeAgentMessageContentType Text { get; } = new KnowledgeAgentMessageContentType(TextValue); + /// Image message content kind. + public static KnowledgeAgentMessageContentType Image { get; } = new KnowledgeAgentMessageContentType(ImageValue); + /// Determines if two values are the same. + public static bool operator ==(KnowledgeAgentMessageContentType left, KnowledgeAgentMessageContentType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KnowledgeAgentMessageContentType left, KnowledgeAgentMessageContentType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KnowledgeAgentMessageContentType(string value) => new KnowledgeAgentMessageContentType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KnowledgeAgentMessageContentType other && Equals(other); + /// + public bool Equals(KnowledgeAgentMessageContentType 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/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs new file mode 100644 index 000000000000..b4611e80f498 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentMessageImageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("image"u8); + writer.WriteObjectValue(Image); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageImageContent DeserializeKnowledgeAgentMessageImageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentMessageImageContentImage image = default; + KnowledgeAgentMessageContentType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("image"u8)) + { + image = KnowledgeAgentMessageImageContentImage.DeserializeKnowledgeAgentMessageImageContentImage(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentMessageImageContent(type, image); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentMessageImageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageImageContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs new file mode 100644 index 000000000000..1f166c47adcf --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContent.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + /// Text message type. + public partial class KnowledgeAgentMessageImageContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentMessageImageContent(KnowledgeAgentMessageImageContentImage image) + { + Argument.AssertNotNull(image, nameof(image)); + + Image = image; + Type = KnowledgeAgentMessageContentType.Image; + } + + /// Initializes a new instance of . + /// The type of the message. + /// + internal KnowledgeAgentMessageImageContent(KnowledgeAgentMessageContentType type, KnowledgeAgentMessageImageContentImage image) : base(type) + { + Image = image; + Type = type; + } + + /// Gets or sets the image. + public KnowledgeAgentMessageImageContentImage Image { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs new file mode 100644 index 000000000000..d1261a203fb1 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentMessageImageContentImage : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("url"u8); + writer.WriteStringValue(Url); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageImageContentImage DeserializeKnowledgeAgentMessageImageContentImage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string url = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("url"u8)) + { + url = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentMessageImageContentImage(url); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentMessageImageContentImage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageImageContentImage(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs new file mode 100644 index 000000000000..ffdddfb52ad2 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageImageContentImage.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Models +{ + /// The KnowledgeAgentMessageImageContentImage. + public partial class KnowledgeAgentMessageImageContentImage + { + /// Initializes a new instance of . + /// The url of the image. + /// is null. + public KnowledgeAgentMessageImageContentImage(string url) + { + Argument.AssertNotNull(url, nameof(url)); + + Url = url; + } + + /// The url of the image. + public string Url { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs new file mode 100644 index 000000000000..fd3cd315c255 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.Serialization.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentMessageTextContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("text"u8); + writer.WriteStringValue(Text); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentMessageTextContent DeserializeKnowledgeAgentMessageTextContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string text = default; + KnowledgeAgentMessageContentType type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("text"u8)) + { + text = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new KnowledgeAgentMessageTextContent(type, text); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentMessageTextContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentMessageTextContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs new file mode 100644 index 000000000000..de36565521d1 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentMessageTextContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Agents.Models +{ + /// Text message type. + public partial class KnowledgeAgentMessageTextContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentMessageTextContent(string text) + { + Argument.AssertNotNull(text, nameof(text)); + + Text = text; + Type = KnowledgeAgentMessageContentType.Text; + } + + /// Initializes a new instance of . + /// The type of the message. + /// + internal KnowledgeAgentMessageTextContent(KnowledgeAgentMessageContentType type, string text) : base(type) + { + Text = text; + Type = type; + } + + /// Gets or sets the text. + public string Text { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs new file mode 100644 index 000000000000..ad6ba573114a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.Serialization.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static KnowledgeAgentModel DeserializeKnowledgeAgentModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "azureOpenAI": return KnowledgeAgentAzureOpenAIModel.DeserializeKnowledgeAgentAzureOpenAIModel(element); + } + } + return UnknownKnowledgeAgentModel.DeserializeUnknownKnowledgeAgentModel(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentModel(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs new file mode 100644 index 000000000000..4fac0859d0c8 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModel.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// + /// Specifies the connection parameters for the model to use for query planning. + /// 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 KnowledgeAgentModel + { + /// Initializes a new instance of . + protected KnowledgeAgentModel() + { + } + + /// Initializes a new instance of . + /// The type of AI model. + internal KnowledgeAgentModel(KnowledgeAgentModelKind kind) + { + Kind = kind; + } + + /// The type of AI model. + internal KnowledgeAgentModelKind Kind { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.cs new file mode 100644 index 000000000000..7b06357ba598 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelKind.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.Search.Documents.Indexes.Models +{ + /// The AI model to be used for query planning. + public readonly partial struct KnowledgeAgentModelKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KnowledgeAgentModelKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AzureOpenAIValue = "azureOpenAI"; + + /// Use Azure Open AI models for query planning. + public static KnowledgeAgentModelKind AzureOpenAI { get; } = new KnowledgeAgentModelKind(AzureOpenAIValue); + /// Determines if two values are the same. + public static bool operator ==(KnowledgeAgentModelKind left, KnowledgeAgentModelKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KnowledgeAgentModelKind left, KnowledgeAgentModelKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KnowledgeAgentModelKind(string value) => new KnowledgeAgentModelKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KnowledgeAgentModelKind other && Equals(other); + /// + public bool Equals(KnowledgeAgentModelKind 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/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs new file mode 100644 index 000000000000..8b9bd4b57d50 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.Serialization.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentModelQueryPlanningActivityRecord + { + internal static KnowledgeAgentModelQueryPlanningActivityRecord DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? inputTokens = default; + int? outputTokens = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("outputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentModelQueryPlanningActivityRecord(id, type, inputTokens, outputTokens, elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentModelQueryPlanningActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentModelQueryPlanningActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs new file mode 100644 index 000000000000..dfd8afb4c465 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentModelQueryPlanningActivityRecord.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Agents.Models +{ + /// Represents an LLM query planning activity record. + public partial class KnowledgeAgentModelQueryPlanningActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentModelQueryPlanningActivityRecord(int id) : base(id) + { + Type = "ModelQueryPlanning"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The number of input tokens for the LLM query planning activity. + /// The number of output tokens for the LLM query planning activity. + /// The elapsed time in milliseconds for the model activity. + internal KnowledgeAgentModelQueryPlanningActivityRecord(int id, string type, int? inputTokens, int? outputTokens, int? elapsedMs) : base(id, type) + { + InputTokens = inputTokens; + OutputTokens = outputTokens; + ElapsedMs = elapsedMs; + Type = type ?? "ModelQueryPlanning"; + } + + /// The number of input tokens for the LLM query planning activity. + public int? InputTokens { get; } + /// The number of output tokens for the LLM query planning activity. + public int? OutputTokens { get; } + /// The elapsed time in milliseconds for the model activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs new file mode 100644 index 000000000000..47c9fe95c28f --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.Serialization.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentReference + { + internal static KnowledgeAgentReference DeserializeKnowledgeAgentReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "AzureSearchDoc": return KnowledgeAgentAzureSearchDocReference.DeserializeKnowledgeAgentAzureSearchDocReference(element); + } + } + return UnknownKnowledgeAgentReference.DeserializeUnknownKnowledgeAgentReference(element); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs new file mode 100644 index 000000000000..85117dd5da5f --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentReference.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Agents.Models +{ + /// + /// Base type for references. + /// 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 KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// is null. + protected KnowledgeAgentReference(string id, int activitySource) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + ActivitySource = activitySource; + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + internal KnowledgeAgentReference(string type, string id, int activitySource) + { + Type = type; + Id = id; + ActivitySource = activitySource; + } + + /// The type of the reference. + internal string Type { get; set; } + /// The ID of the reference. + public string Id { get; } + /// The source activity ID for the reference. + public int ActivitySource { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs new file mode 100644 index 000000000000..583082a52b4e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.Serialization.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentRequestLimits : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + if (Optional.IsDefined(MaxRuntimeInSeconds)) + { + writer.WritePropertyName("maxRuntimeInSeconds"u8); + writer.WriteNumberValue(MaxRuntimeInSeconds.Value); + } + if (Optional.IsDefined(MaxOutputSize)) + { + writer.WritePropertyName("maxOutputSize"u8); + writer.WriteNumberValue(MaxOutputSize.Value); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgentRequestLimits DeserializeKnowledgeAgentRequestLimits(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? maxRuntimeInSeconds = default; + int? maxOutputSize = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("maxRuntimeInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxRuntimeInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxOutputSize"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxOutputSize = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentRequestLimits(maxRuntimeInSeconds, maxOutputSize); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentRequestLimits FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentRequestLimits(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs new file mode 100644 index 000000000000..2806f1d859f5 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRequestLimits.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Indexes.Models +{ + /// Guardrails to limit how much resources are utilized for a single agent retrieval request. + public partial class KnowledgeAgentRequestLimits + { + /// Initializes a new instance of . + public KnowledgeAgentRequestLimits() + { + } + + /// Initializes a new instance of . + /// The maximum runtime in seconds. + /// Limits the maximum size of the content in the output. + internal KnowledgeAgentRequestLimits(int? maxRuntimeInSeconds, int? maxOutputSize) + { + MaxRuntimeInSeconds = maxRuntimeInSeconds; + MaxOutputSize = maxOutputSize; + } + + /// The maximum runtime in seconds. + public int? MaxRuntimeInSeconds { get; set; } + /// Limits the maximum size of the content in the output. + public int? MaxOutputSize { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs new file mode 100644 index 000000000000..bc868831ab3c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentRetrievalRequest : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("messages"u8); + writer.WriteStartArray(); + foreach (var item in Messages) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + if (Optional.IsCollectionDefined(TargetIndexParams)) + { + writer.WritePropertyName("targetIndexParams"u8); + writer.WriteStartArray(); + foreach (var item in TargetIndexParams) + { + writer.WriteObjectValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.cs new file mode 100644 index 000000000000..61c12da71cf3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalRequest.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 System.Linq; + +namespace Azure.Search.Documents.Agents.Models +{ + /// The input contract for the retrieval request. + public partial class KnowledgeAgentRetrievalRequest + { + /// Initializes a new instance of . + /// + /// is null. + public KnowledgeAgentRetrievalRequest(IEnumerable messages) + { + Argument.AssertNotNull(messages, nameof(messages)); + + Messages = messages.ToList(); + TargetIndexParams = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + internal KnowledgeAgentRetrievalRequest(IList messages, IList targetIndexParams) + { + Messages = messages; + TargetIndexParams = targetIndexParams; + } + + /// Gets the messages. + public IList Messages { get; } + /// Gets the target index params. + public IList TargetIndexParams { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs new file mode 100644 index 000000000000..e8730a91c75a --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.Serialization.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentRetrievalResponse + { + internal static KnowledgeAgentRetrievalResponse DeserializeKnowledgeAgentRetrievalResponse(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList response = default; + IReadOnlyList activity = default; + IReadOnlyList references = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("response"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentMessage.DeserializeKnowledgeAgentMessage(item)); + } + response = array; + continue; + } + if (property.NameEquals("activity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentActivityRecord.DeserializeKnowledgeAgentActivityRecord(item)); + } + activity = array; + continue; + } + if (property.NameEquals("references"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgentReference.DeserializeKnowledgeAgentReference(item)); + } + references = array; + continue; + } + } + return new KnowledgeAgentRetrievalResponse(response ?? new ChangeTrackingList(), activity ?? new ChangeTrackingList(), references ?? new ChangeTrackingList()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentRetrievalResponse FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentRetrievalResponse(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs new file mode 100644 index 000000000000..5dfc42000900 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentRetrievalResponse.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Agents.Models +{ + /// The output contract for the retrieval response. + public partial class KnowledgeAgentRetrievalResponse + { + /// Initializes a new instance of . + internal KnowledgeAgentRetrievalResponse() + { + Response = new ChangeTrackingList(); + Activity = new ChangeTrackingList(); + References = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// The activity records for tracking progress and billing implications. + /// 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 references for the retrieval data used in the response. + /// 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 . + /// + internal KnowledgeAgentRetrievalResponse(IReadOnlyList response, IReadOnlyList activity, IReadOnlyList references) + { + Response = response; + Activity = activity; + References = references; + } + + /// Gets the response. + public IReadOnlyList Response { get; } + /// + /// The activity records for tracking progress and billing implications. + /// 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 IReadOnlyList Activity { get; } + /// + /// The references for the retrieval data used in the response. + /// 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 IReadOnlyList References { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs new file mode 100644 index 000000000000..508754202082 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.Serialization.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentSearchActivityRecord + { + internal static KnowledgeAgentSearchActivityRecord DeserializeKnowledgeAgentSearchActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string targetIndex = default; + KnowledgeAgentSearchActivityRecordQuery query = default; + DateTimeOffset? queryTime = default; + int? count = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("targetIndex"u8)) + { + targetIndex = property.Value.GetString(); + continue; + } + if (property.NameEquals("query"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + query = KnowledgeAgentSearchActivityRecordQuery.DeserializeKnowledgeAgentSearchActivityRecordQuery(property.Value); + continue; + } + if (property.NameEquals("queryTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + queryTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("count"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSearchActivityRecord( + id, + type, + targetIndex, + query, + queryTime, + count, + elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentSearchActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSearchActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs new file mode 100644 index 000000000000..0175f2e5fd3e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecord.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Search.Documents.Models; + +namespace Azure.Search.Documents.Agents.Models +{ + /// Represents a retrieval activity record. + public partial class KnowledgeAgentSearchActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentSearchActivityRecord(int id) : base(id) + { + Type = "AzureSearchQuery"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The target index for the retrieval activity. + /// The query details for the retrieval activity. + /// The query time for this retrieval activity. + /// The count of documents retrieved. + /// The elapsed time in milliseconds for the retrieval activity. + internal KnowledgeAgentSearchActivityRecord(int id, string type, string targetIndex, KnowledgeAgentSearchActivityRecordQuery query, DateTimeOffset? queryTime, int? count, int? elapsedMs) : base(id, type) + { + TargetIndex = targetIndex; + Query = query; + QueryTime = queryTime; + Count = count; + ElapsedMs = elapsedMs; + Type = type ?? "AzureSearchQuery"; + } + + /// The target index for the retrieval activity. + public string TargetIndex { get; } + /// The query details for the retrieval activity. + public KnowledgeAgentSearchActivityRecordQuery Query { get; } + /// The query time for this retrieval activity. + public DateTimeOffset? QueryTime { get; } + /// The count of documents retrieved. + public int? Count { get; } + /// The elapsed time in milliseconds for the retrieval activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs new file mode 100644 index 000000000000..e77cb3f28c2e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class KnowledgeAgentSearchActivityRecordQuery + { + internal static KnowledgeAgentSearchActivityRecordQuery DeserializeKnowledgeAgentSearchActivityRecordQuery(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string search = default; + string filter = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("search"u8)) + { + search = property.Value.GetString(); + continue; + } + if (property.NameEquals("filter"u8)) + { + filter = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSearchActivityRecordQuery(search, filter); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentSearchActivityRecordQuery FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSearchActivityRecordQuery(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs new file mode 100644 index 000000000000..5018dd3c2608 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSearchActivityRecordQuery.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Models +{ + /// The query details for the retrieval activity. + public partial class KnowledgeAgentSearchActivityRecordQuery + { + /// Initializes a new instance of . + internal KnowledgeAgentSearchActivityRecordQuery() + { + } + + /// Initializes a new instance of . + /// The search string. + /// The filter string. + internal KnowledgeAgentSearchActivityRecordQuery(string search, string filter) + { + Search = search; + Filter = filter; + } + + /// The search string. + public string Search { get; } + /// The filter string. + public string Filter { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs new file mode 100644 index 000000000000..2ef70f86fb9f --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.Serialization.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Agents.Models +{ + public partial class KnowledgeAgentSemanticRankerActivityRecord + { + internal static KnowledgeAgentSemanticRankerActivityRecord DeserializeKnowledgeAgentSemanticRankerActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? inputTokens = default; + int? elapsedMs = default; + int id = default; + string type = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("inputTokens"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputTokens = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("elapsedMs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + elapsedMs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new KnowledgeAgentSemanticRankerActivityRecord(id, type, inputTokens, elapsedMs); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new KnowledgeAgentSemanticRankerActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentSemanticRankerActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs new file mode 100644 index 000000000000..af0c8b254be3 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentSemanticRankerActivityRecord.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Search.Documents.Agents.Models +{ + /// Represents a semantic ranker activity record. + public partial class KnowledgeAgentSemanticRankerActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + internal KnowledgeAgentSemanticRankerActivityRecord(int id) : base(id) + { + Type = "AzureSearchSemanticRanker"; + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// The number of input tokens for the semantic ranker activity. + /// The elapsed time in milliseconds for the model activity. + internal KnowledgeAgentSemanticRankerActivityRecord(int id, string type, int? inputTokens, int? elapsedMs) : base(id, type) + { + InputTokens = inputTokens; + ElapsedMs = elapsedMs; + Type = type ?? "AzureSearchSemanticRanker"; + } + + /// The number of input tokens for the semantic ranker activity. + public int? InputTokens { get; } + /// The elapsed time in milliseconds for the model activity. + public int? ElapsedMs { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs new file mode 100644 index 000000000000..5a7b5d33c61e --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.Serialization.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + public partial class KnowledgeAgentTargetIndex : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("indexName"u8); + writer.WriteStringValue(IndexName); + if (Optional.IsDefined(DefaultRerankerThreshold)) + { + writer.WritePropertyName("defaultRerankerThreshold"u8); + writer.WriteNumberValue(DefaultRerankerThreshold.Value); + } + if (Optional.IsDefined(DefaultIncludeReferenceSourceData)) + { + writer.WritePropertyName("defaultIncludeReferenceSourceData"u8); + writer.WriteBooleanValue(DefaultIncludeReferenceSourceData.Value); + } + if (Optional.IsDefined(DefaultMaxDocsForReranker)) + { + writer.WritePropertyName("defaultMaxDocsForReranker"u8); + writer.WriteNumberValue(DefaultMaxDocsForReranker.Value); + } + writer.WriteEndObject(); + } + + internal static KnowledgeAgentTargetIndex DeserializeKnowledgeAgentTargetIndex(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string indexName = default; + float? defaultRerankerThreshold = default; + bool? defaultIncludeReferenceSourceData = default; + int? defaultMaxDocsForReranker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("indexName"u8)) + { + indexName = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultRerankerThreshold"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultRerankerThreshold = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("defaultIncludeReferenceSourceData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultIncludeReferenceSourceData = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("defaultMaxDocsForReranker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultMaxDocsForReranker = property.Value.GetInt32(); + continue; + } + } + return new KnowledgeAgentTargetIndex(indexName, defaultRerankerThreshold, defaultIncludeReferenceSourceData, defaultMaxDocsForReranker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static KnowledgeAgentTargetIndex FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeKnowledgeAgentTargetIndex(document.RootElement); + } + + /// Convert into a . + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs new file mode 100644 index 000000000000..c4824d90658b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/KnowledgeAgentTargetIndex.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// The KnowledgeAgentTargetIndex. + public partial class KnowledgeAgentTargetIndex + { + /// Initializes a new instance of . + /// The name of the target index. + /// is null. + public KnowledgeAgentTargetIndex(string indexName) + { + Argument.AssertNotNull(indexName, nameof(indexName)); + + IndexName = indexName; + } + + /// Initializes a new instance of . + /// The name of the target index. + /// A threshold for reranking results (range: 0-4). + /// Indicates whether reference source data should be included. + /// Limits the number of documents considered for ranking. + internal KnowledgeAgentTargetIndex(string indexName, float? defaultRerankerThreshold, bool? defaultIncludeReferenceSourceData, int? defaultMaxDocsForReranker) + { + IndexName = indexName; + DefaultRerankerThreshold = defaultRerankerThreshold; + DefaultIncludeReferenceSourceData = defaultIncludeReferenceSourceData; + DefaultMaxDocsForReranker = defaultMaxDocsForReranker; + } + + /// The name of the target index. + public string IndexName { get; set; } + /// A threshold for reranking results (range: 0-4). + public float? DefaultRerankerThreshold { get; set; } + /// Indicates whether reference source data should be included. + public bool? DefaultIncludeReferenceSourceData { get; set; } + /// Limits the number of documents considered for ranking. + public int? DefaultMaxDocsForReranker { get; set; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs new file mode 100644 index 000000000000..385c76c7feca --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Indexes.Models +{ + internal partial class ListKnowledgeAgentsResult + { + internal static ListKnowledgeAgentsResult DeserializeListKnowledgeAgentsResult(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KnowledgeAgent.DeserializeKnowledgeAgent(item)); + } + value = array; + continue; + } + } + return new ListKnowledgeAgentsResult(value); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ListKnowledgeAgentsResult FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeListKnowledgeAgentsResult(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.cs new file mode 100644 index 000000000000..c1900d566b28 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/ListKnowledgeAgentsResult.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.Search.Documents.Indexes.Models +{ + /// The ListKnowledgeAgentsResult. + internal partial class ListKnowledgeAgentsResult + { + /// Initializes a new instance of . + /// + /// is null. + internal ListKnowledgeAgentsResult(IEnumerable knowledgeAgents) + { + Argument.AssertNotNull(knowledgeAgents, nameof(knowledgeAgents)); + + KnowledgeAgents = knowledgeAgents.ToList(); + } + + /// Initializes a new instance of . + /// + internal ListKnowledgeAgentsResult(IReadOnlyList knowledgeAgents) + { + KnowledgeAgents = knowledgeAgents; + } + + /// Gets the knowledge agents. + public IReadOnlyList KnowledgeAgents { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.cs new file mode 100644 index 000000000000..75babc6f097d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/PermissionFilter.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.Search.Documents.Indexes.Models +{ + /// A value indicating whether the field should be used as a permission filter. + public readonly partial struct PermissionFilter : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public PermissionFilter(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string UserIdsValue = "userIds"; + private const string GroupIdsValue = "groupIds"; + private const string RbacScopeValue = "rbacScope"; + + /// Field represents user IDs that should be used to filter document access on queries. + public static PermissionFilter UserIds { get; } = new PermissionFilter(UserIdsValue); + /// Field represents group IDs that should be used to filter document access on queries. + public static PermissionFilter GroupIds { get; } = new PermissionFilter(GroupIdsValue); + /// Field represents an RBAC scope that should be used to filter document access on queries. + public static PermissionFilter RbacScope { get; } = new PermissionFilter(RbacScopeValue); + /// Determines if two values are the same. + public static bool operator ==(PermissionFilter left, PermissionFilter right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(PermissionFilter left, PermissionFilter right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator PermissionFilter(string value) => new PermissionFilter(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is PermissionFilter other && Equals(other); + /// + public bool Equals(PermissionFilter 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/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs index 28bc67685efc..49563992980a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryDebugMode.cs @@ -26,6 +26,7 @@ public QueryDebugMode(string value) private const string SemanticValue = "semantic"; private const string VectorValue = "vector"; private const string QueryRewritesValue = "queryRewrites"; + private const string InnerHitsValue = "innerHits"; private const string AllValue = "all"; /// No query debugging information will be returned. @@ -36,6 +37,8 @@ public QueryDebugMode(string value) public static QueryDebugMode Vector { get; } = new QueryDebugMode(VectorValue); /// Allows the user to explore the list of query rewrites generated for their search request. public static QueryDebugMode QueryRewrites { get; } = new QueryDebugMode(QueryRewritesValue); + /// Allows the user to retrieve scoring information regarding vectors matched within a collection of complex types. + public static QueryDebugMode InnerHits { get; } = new QueryDebugMode(InnerHitsValue); /// Turn on all debug options. public static QueryDebugMode All { get; } = new QueryDebugMode(AllValue); /// Determines if two values are the same. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs new file mode 100644 index 000000000000..fea2233a9271 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.Serialization.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + public partial class QueryResultDocumentInnerHit + { + internal static QueryResultDocumentInnerHit DeserializeQueryResultDocumentInnerHit(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long? ordinal = default; + IReadOnlyList> vectors = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ordinal"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ordinal = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("vectors"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()) + { + dictionary.Add(property0.Name, SingleVectorFieldResult.DeserializeSingleVectorFieldResult(property0.Value)); + } + array.Add(dictionary); + } + } + vectors = array; + continue; + } + } + return new QueryResultDocumentInnerHit(ordinal, vectors ?? new ChangeTrackingList>()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static QueryResultDocumentInnerHit FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeQueryResultDocumentInnerHit(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs new file mode 100644 index 000000000000..153a06f76870 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/QueryResultDocumentInnerHit.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Search.Documents.Models +{ + /// Detailed scoring information for an individual element of a complex collection. + public partial class QueryResultDocumentInnerHit + { + /// Initializes a new instance of . + internal QueryResultDocumentInnerHit() + { + Vectors = new ChangeTrackingList>(); + } + + /// Initializes a new instance of . + /// Position of this specific matching element within it's original collection. Position starts at 0. + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + internal QueryResultDocumentInnerHit(long? ordinal, IReadOnlyList> vectors) + { + Ordinal = ordinal; + Vectors = vectors; + } + + /// Position of this specific matching element within it's original collection. Position starts at 0. + public long? Ordinal { get; } + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + public IReadOnlyList> Vectors { get; } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.cs new file mode 100644 index 000000000000..01c5b759b091 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/RankingOrder.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.Search.Documents.Indexes.Models +{ + /// Represents score to use for sort order of documents. + public readonly partial struct RankingOrder : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RankingOrder(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BoostedRerankerScoreValue = "BoostedRerankerScore"; + private const string ReRankerScoreValue = "RerankerScore"; + + /// Sets sort order as BoostedRerankerScore. + public static RankingOrder BoostedRerankerScore { get; } = new RankingOrder(BoostedRerankerScoreValue); + /// Sets sort order as ReRankerScore. + public static RankingOrder ReRankerScore { get; } = new RankingOrder(ReRankerScoreValue); + /// Determines if two values are the same. + public static bool operator ==(RankingOrder left, RankingOrder right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RankingOrder left, RankingOrder right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RankingOrder(string value) => new RankingOrder(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RankingOrder other && Equals(other); + /// + public bool Equals(RankingOrder 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/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs index d8edd0e7d8f5..84b2d49928f8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.Serialization.cs @@ -55,6 +55,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("facetable"u8); writer.WriteBooleanValue(IsFacetable.Value); } + if (Optional.IsDefined(PermissionFilter)) + { + if (PermissionFilter != null) + { + writer.WritePropertyName("permissionFilter"u8); + writer.WriteStringValue(PermissionFilter.Value.ToString()); + } + else + { + writer.WriteNull("permissionFilter"); + } + } if (Optional.IsDefined(AnalyzerName)) { if (AnalyzerName != null) @@ -177,6 +189,7 @@ internal static SearchField DeserializeSearchField(JsonElement element) bool? filterable = default; bool? sortable = default; bool? facetable = default; + PermissionFilter? permissionFilter = default; LexicalAnalyzerName? analyzer = default; LexicalAnalyzerName? searchAnalyzer = default; LexicalAnalyzerName? indexAnalyzer = default; @@ -261,6 +274,16 @@ internal static SearchField DeserializeSearchField(JsonElement element) facetable = property.Value.GetBoolean(); continue; } + if (property.NameEquals("permissionFilter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + permissionFilter = null; + continue; + } + permissionFilter = new PermissionFilter(property.Value.GetString()); + continue; + } if (property.NameEquals("analyzer"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -370,6 +393,7 @@ internal static SearchField DeserializeSearchField(JsonElement element) filterable, sortable, facetable, + permissionFilter, analyzer, searchAnalyzer, indexAnalyzer, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs index 4bbad7499be6..a27a2ad1f2dd 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchField.cs @@ -23,6 +23,7 @@ public partial class SearchField /// A value indicating whether to enable the field to be referenced in $filter queries. filterable differs from searchable in how strings are handled. Fields of type Edm.String or Collection(Edm.String) that are filterable do not undergo word-breaking, so comparisons are for exact matches only. For example, if you set such a field f to "sunny day", $filter=f eq 'sunny' will find no matches, but $filter=f eq 'sunny day' will. This property must be null for complex fields. Default is true for simple fields and null for complex fields. /// A value indicating whether to enable the field to be referenced in $orderby expressions. By default, the search engine sorts results by score, but in many experiences users will want to sort by fields in the documents. A simple field can be sortable only if it is single-valued (it has a single value in the scope of the parent document). Simple collection fields cannot be sortable, since they are multi-valued. Simple sub-fields of complex collections are also multi-valued, and therefore cannot be sortable. This is true whether it's an immediate parent field, or an ancestor field, that's the complex collection. Complex fields cannot be sortable and the sortable property must be null for such fields. The default for sortable is true for single-valued simple fields, false for multi-valued simple fields, and null for complex fields. /// A value indicating whether to enable the field to be referenced in facet queries. Typically used in a presentation of search results that includes hit count by category (for example, search for digital cameras and see hits by brand, by megapixels, by price, and so on). This property must be null for complex fields. Fields of type Edm.GeographyPoint or Collection(Edm.GeographyPoint) cannot be facetable. Default is true for all other simple fields. + /// A value indicating whether the field should be used as a permission filter. /// The name of the analyzer to use for the field. This option can be used only with searchable fields and it can't be set together with either searchAnalyzer or indexAnalyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. /// The name of the analyzer used at search time for the field. This option can be used only with searchable fields. It must be set together with indexAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. This analyzer can be updated on an existing field. Must be null for complex fields. /// The name of the analyzer used at indexing time for the field. This option can be used only with searchable fields. It must be set together with searchAnalyzer and it cannot be set together with the analyzer option. This property cannot be set to the name of a language analyzer; use the analyzer property instead if you need a language analyzer. Once the analyzer is chosen, it cannot be changed for the field. Must be null for complex fields. @@ -32,7 +33,7 @@ public partial class SearchField /// The encoding format to interpret the field contents. /// A list of the names of synonym maps to associate with this field. This option can be used only with searchable fields. Currently only one synonym map per field is supported. Assigning a synonym map to a field ensures that query terms targeting that field are expanded at query-time using the rules in the synonym map. This attribute can be changed on existing fields. Must be null or an empty collection for complex fields. /// A list of sub-fields if this is a field of type Edm.ComplexType or Collection(Edm.ComplexType). Must be null or empty for simple fields. - internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) + internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? isRetrievable, bool? isStored, bool? isSearchable, bool? isFilterable, bool? isSortable, bool? isFacetable, PermissionFilter? permissionFilter, LexicalAnalyzerName? analyzerName, LexicalAnalyzerName? searchAnalyzerName, LexicalAnalyzerName? indexAnalyzerName, LexicalNormalizerName? normalizerName, int? vectorSearchDimensions, string vectorSearchProfileName, VectorEncodingFormat? vectorEncodingFormat, IList synonymMapNames, IList fields) { Name = name; Type = type; @@ -43,6 +44,7 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i IsFilterable = isFilterable; IsSortable = isSortable; IsFacetable = isFacetable; + PermissionFilter = permissionFilter; AnalyzerName = analyzerName; SearchAnalyzerName = searchAnalyzerName; IndexAnalyzerName = indexAnalyzerName; @@ -53,6 +55,8 @@ internal SearchField(string name, SearchFieldDataType type, bool? isKey, bool? i SynonymMapNames = synonymMapNames; Fields = fields; } + /// A value indicating whether the field should be used as a permission filter. + public PermissionFilter? PermissionFilter { get; set; } /// The dimensionality of the vector field. public int? VectorSearchDimensions { get; set; } /// The name of the vector search profile that specifies the algorithm and vectorizer to use when searching the vector field. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs index 44028bd8351e..18fb1a7a9b9a 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.Serialization.cs @@ -8,6 +8,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -18,6 +19,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStartObject(); writer.WritePropertyName("name"u8); writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } writer.WritePropertyName("fields"u8); writer.WriteStartArray(); foreach (var item in _fields) @@ -153,6 +159,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("vectorSearch"); } } + if (Optional.IsDefined(PermissionFilterOption)) + { + if (PermissionFilterOption != null) + { + writer.WritePropertyName("permissionFilterOption"u8); + writer.WriteStringValue(PermissionFilterOption.Value.ToString()); + } + else + { + writer.WriteNull("permissionFilterOption"); + } + } if (Optional.IsDefined(_etag)) { writer.WritePropertyName("@odata.etag"u8); @@ -168,6 +186,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) return null; } string name = default; + string description = default; IList fields = default; IList scoringProfiles = default; string defaultScoringProfile = default; @@ -182,6 +201,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) SimilarityAlgorithm similarity = default; SemanticSearch semantic = default; VectorSearch vectorSearch = default; + SearchIndexPermissionFilterOption? permissionFilterOption = default; string odataEtag = default; foreach (var property in element.EnumerateObject()) { @@ -190,6 +210,11 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) name = property.Value.GetString(); continue; } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } if (property.NameEquals("fields"u8)) { List array = new List(); @@ -352,6 +377,16 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) vectorSearch = VectorSearch.DeserializeVectorSearch(property.Value); continue; } + if (property.NameEquals("permissionFilterOption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + permissionFilterOption = null; + continue; + } + permissionFilterOption = new SearchIndexPermissionFilterOption(property.Value.GetString()); + continue; + } if (property.NameEquals("@odata.etag"u8)) { odataEtag = property.Value.GetString(); @@ -360,6 +395,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) } return new SearchIndex( name, + description, fields, scoringProfiles ?? new ChangeTrackingList(), defaultScoringProfile, @@ -374,6 +410,7 @@ internal static SearchIndex DeserializeSearchIndex(JsonElement element) similarity, semantic, vectorSearch, + permissionFilterOption, odataEtag); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs index dfaafc2d2553..3b4e9386b210 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndex.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Search.Documents.Models; namespace Azure.Search.Documents.Indexes.Models { @@ -16,6 +17,7 @@ public partial class SearchIndex { /// Initializes a new instance of . /// The name of the index. + /// The description of the index. /// The fields of the index. /// The scoring profiles for the index. /// The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. @@ -54,10 +56,12 @@ public partial class SearchIndex /// /// Defines parameters for a search index that influence semantic capabilities. /// Contains configuration options related to vector search. + /// A value indicating whether permission filtering is enabled for the index. /// The ETag of the index. - internal SearchIndex(string name, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, string etag) + internal SearchIndex(string name, string description, IList fields, IList scoringProfiles, string defaultScoringProfile, CorsOptions corsOptions, IList suggesters, IList analyzers, IList tokenizers, IList tokenFilters, IList charFilters, IList normalizers, SearchResourceEncryptionKey encryptionKey, SimilarityAlgorithm similarity, SemanticSearch semanticSearch, VectorSearch vectorSearch, SearchIndexPermissionFilterOption? permissionFilterOption, string etag) { Name = name; + Description = description; _fields = fields; ScoringProfiles = scoringProfiles; DefaultScoringProfile = defaultScoringProfile; @@ -72,8 +76,11 @@ internal SearchIndex(string name, IList fields, IList The description of the index. + public string Description { get; set; } /// The name of the scoring profile to use if none is specified in the query. If this property is not set and no scoring profile is specified in the query, then default scoring (tf-idf) will be used. public string DefaultScoringProfile { get; set; } /// Options to control Cross-Origin Resource Sharing (CORS) for the index. @@ -90,5 +97,7 @@ internal SearchIndex(string name, IList fields, IList Contains configuration options related to vector search. public VectorSearch VectorSearch { get; set; } + /// A value indicating whether permission filtering is enabled for the index. + public SearchIndexPermissionFilterOption? PermissionFilterOption { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.cs new file mode 100644 index 000000000000..dfa62813545b --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexPermissionFilterOption.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.Search.Documents.Models +{ + /// A value indicating whether permission filtering is enabled for the index. + public readonly partial struct SearchIndexPermissionFilterOption : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SearchIndexPermissionFilterOption(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnabledValue = "enabled"; + private const string DisabledValue = "disabled"; + + /// enabled. + public static SearchIndexPermissionFilterOption Enabled { get; } = new SearchIndexPermissionFilterOption(EnabledValue); + /// disabled. + public static SearchIndexPermissionFilterOption Disabled { get; } = new SearchIndexPermissionFilterOption(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(SearchIndexPermissionFilterOption left, SearchIndexPermissionFilterOption right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SearchIndexPermissionFilterOption left, SearchIndexPermissionFilterOption right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SearchIndexPermissionFilterOption(string value) => new SearchIndexPermissionFilterOption(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SearchIndexPermissionFilterOption other && Equals(other); + /// + public bool Equals(SearchIndexPermissionFilterOption 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/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs index 6ee8a098669e..35dffb9163ec 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.Serialization.cs @@ -5,6 +5,7 @@ #nullable disable +using System.Collections.Generic; using System.Text.Json; using Azure.Core; @@ -40,6 +41,23 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteNull("identity"); } } + if (Optional.IsCollectionDefined(IndexerPermissionOptions)) + { + if (IndexerPermissionOptions != null) + { + writer.WritePropertyName("indexerPermissionOptions"u8); + writer.WriteStartArray(); + foreach (var item in IndexerPermissionOptions) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull("indexerPermissionOptions"); + } + } if (Optional.IsDefined(DataChangeDetectionPolicy)) { if (DataChangeDetectionPolicy != null) @@ -96,6 +114,7 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo DataSourceCredentials credentials = default; SearchIndexerDataContainer container = default; SearchIndexerDataIdentity identity = default; + IList indexerPermissionOptions = default; DataChangeDetectionPolicy dataChangeDetectionPolicy = default; DataDeletionDetectionPolicy dataDeletionDetectionPolicy = default; string odataEtag = default; @@ -137,6 +156,21 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo identity = SearchIndexerDataIdentity.DeserializeSearchIndexerDataIdentity(property.Value); continue; } + if (property.NameEquals("indexerPermissionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + indexerPermissionOptions = null; + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new IndexerPermissionOption(item.GetString())); + } + indexerPermissionOptions = array; + continue; + } if (property.NameEquals("dataChangeDetectionPolicy"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -180,6 +214,7 @@ internal static SearchIndexerDataSourceConnection DeserializeSearchIndexerDataSo credentials, container, identity, + indexerPermissionOptions ?? new ChangeTrackingList(), dataChangeDetectionPolicy, dataDeletionDetectionPolicy, odataEtag, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs index 675a4a69a7bf..c6bf579a0b53 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerDataSourceConnection.cs @@ -6,6 +6,7 @@ #nullable disable using System; +using System.Collections.Generic; namespace Azure.Search.Documents.Indexes.Models { @@ -23,6 +24,7 @@ public partial class SearchIndexerDataSourceConnection /// 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 . /// + /// Ingestion options with various types of permission data. /// /// The data change detection policy for the datasource. /// 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. @@ -35,7 +37,7 @@ public partial class SearchIndexerDataSourceConnection /// /// The ETag of the data source. /// A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your datasource definition when you want full assurance that no one, not even Microsoft, can decrypt your data source definition. Once you have encrypted your data source definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your datasource definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019. - internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) + internal SearchIndexerDataSourceConnection(string name, string description, SearchIndexerDataSourceType type, DataSourceCredentials credentialsInternal, SearchIndexerDataContainer container, SearchIndexerDataIdentity identity, IList indexerPermissionOptions, DataChangeDetectionPolicy dataChangeDetectionPolicy, DataDeletionDetectionPolicy dataDeletionDetectionPolicy, string etag, SearchResourceEncryptionKey encryptionKey) { Name = name; Description = description; @@ -43,6 +45,7 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear CredentialsInternal = credentialsInternal; Container = container; Identity = identity; + IndexerPermissionOptions = indexerPermissionOptions; DataChangeDetectionPolicy = dataChangeDetectionPolicy; DataDeletionDetectionPolicy = dataDeletionDetectionPolicy; _etag = etag; @@ -63,6 +66,8 @@ internal SearchIndexerDataSourceConnection(string name, string description, Sear /// The available derived classes include and . /// public SearchIndexerDataIdentity Identity { get; set; } + /// Ingestion options with various types of permission data. + public IList IndexerPermissionOptions { get; set; } /// /// The data change detection policy for the datasource. /// 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/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs index e70066d747d8..1e17380885a3 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.Serialization.cs @@ -61,6 +61,7 @@ internal static SearchIndexerSkill DeserializeSearchIndexerSkill(JsonElement ele switch (discriminator.GetString()) { case "#Microsoft.Skills.Custom.AmlSkill": return AzureMachineLearningSkill.DeserializeAzureMachineLearningSkill(element); + case "#Microsoft.Skills.Custom.ChatCompletionSkill": return ChatCompletionSkill.DeserializeChatCompletionSkill(element); case "#Microsoft.Skills.Custom.WebApiSkill": return WebApiSkill.DeserializeWebApiSkill(element); case "#Microsoft.Skills.Text.AzureOpenAIEmbeddingSkill": return AzureOpenAIEmbeddingSkill.DeserializeAzureOpenAIEmbeddingSkill(element); case "#Microsoft.Skills.Text.CustomEntityLookupSkill": return CustomEntityLookupSkill.DeserializeCustomEntityLookupSkill(element); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs index bf57982dd95d..fbecf5239a35 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkill.cs @@ -14,7 +14,7 @@ namespace Azure.Search.Documents.Indexes.Models /// /// Base type for skills. /// 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 partial class SearchIndexerSkill { diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs index 764d79fd01c7..c53829ce63db 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerSkillset.cs @@ -19,7 +19,7 @@ public partial class SearchIndexerSkillset /// /// A list of skills in the skillset. /// 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 . /// /// or is null. public SearchIndexerSkillset(string name, IEnumerable skills) @@ -37,7 +37,7 @@ public SearchIndexerSkillset(string name, IEnumerable skills /// /// A list of skills in the skillset. /// 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 . /// /// /// Details about the Azure AI service to be used when running skills. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs index 65e6164e6f21..7cf3f9a0c5f7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.Serialization.cs @@ -22,6 +22,7 @@ internal static SearchIndexerStatus DeserializeSearchIndexerStatus(JsonElement e IndexerExecutionResult lastResult = default; IReadOnlyList executionHistory = default; SearchIndexerLimits limits = default; + IndexerState currentState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("status"u8)) @@ -54,8 +55,17 @@ internal static SearchIndexerStatus DeserializeSearchIndexerStatus(JsonElement e limits = SearchIndexerLimits.DeserializeSearchIndexerLimits(property.Value); continue; } + if (property.NameEquals("currentState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + currentState = IndexerState.DeserializeIndexerState(property.Value); + continue; + } } - return new SearchIndexerStatus(status, lastResult, executionHistory, limits); + return new SearchIndexerStatus(status, lastResult, executionHistory, limits, currentState); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs index 3d58b1f940b8..570e3f4b6486 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchIndexerStatus.cs @@ -29,12 +29,14 @@ internal SearchIndexerStatus(IndexerStatus status, IEnumerable The result of the most recent or an in-progress indexer execution. /// History of the recent indexer executions, sorted in reverse chronological order. /// The execution limits for the indexer. - internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastResult, IReadOnlyList executionHistory, SearchIndexerLimits limits) + /// All of the state that defines and dictates the indexer's current execution. + internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastResult, IReadOnlyList executionHistory, SearchIndexerLimits limits, IndexerState currentState) { Status = status; LastResult = lastResult; ExecutionHistory = executionHistory; Limits = limits; + CurrentState = currentState; } /// Overall indexer status. @@ -45,5 +47,7 @@ internal SearchIndexerStatus(IndexerStatus status, IndexerExecutionResult lastRe public IReadOnlyList ExecutionHistory { get; } /// The execution limits for the indexer. public SearchIndexerLimits Limits { get; } + /// All of the state that defines and dictates the indexer's current execution. + public IndexerState CurrentState { get; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs index ef439e06e95e..49d0e3f94357 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.Serialization.cs @@ -20,6 +20,7 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) } double searchScore = default; double? searchRerankerScore = default; + double? searchRerankerBoostedScore = default; IReadOnlyDictionary> searchHighlights = default; IReadOnlyList searchCaptions = default; DocumentDebugInfo searchDocumentDebugInfo = default; @@ -42,6 +43,16 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) searchRerankerScore = property.Value.GetDouble(); continue; } + if (property.NameEquals("@search.rerankerBoostedScore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + searchRerankerBoostedScore = null; + continue; + } + searchRerankerBoostedScore = property.Value.GetDouble(); + continue; + } if (property.NameEquals("@search.highlights"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -99,6 +110,7 @@ internal static SearchResult DeserializeSearchResult(JsonElement element) return new SearchResult( searchScore, searchRerankerScore, + searchRerankerBoostedScore, searchHighlights ?? new ChangeTrackingDictionary>(), searchCaptions ?? new ChangeTrackingList(), searchDocumentDebugInfo, diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs index dc3fd651496e..55cde1b732e1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SearchResult.cs @@ -25,14 +25,16 @@ internal SearchResult(double score) /// Initializes a new instance of . /// The relevance score of the document compared to other documents returned by the query. /// The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic'. /// Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. /// Contains debugging information that can be used to further explore your search results. /// Additional Properties. - internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, DocumentDebugInfo documentDebugInfo, IReadOnlyDictionary additionalProperties) + internal SearchResult(double score, double? rerankerScore, double? rerankerBoostedScore, IReadOnlyDictionary> highlights, IReadOnlyList captions, DocumentDebugInfo documentDebugInfo, IReadOnlyDictionary additionalProperties) { Score = score; RerankerScore = rerankerScore; + RerankerBoostedScore = rerankerBoostedScore; Highlights = highlights; Captions = captions; DocumentDebugInfo = documentDebugInfo; @@ -43,6 +45,8 @@ internal SearchResult(double score, double? rerankerScore, IReadOnlyDictionary The relevance score computed by the semantic ranker for the top search results. Search results are sorted by the RerankerScore first and then by the Score. RerankerScore is only returned for queries of type 'semantic'. public double? RerankerScore { get; } + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. RerankerBoostedScore is only returned for queries of type 'semantic'. + public double? RerankerBoostedScore { get; } /// Text fragments from the document that indicate the matching search terms, organized by each applicable field; null if hit highlighting was not enabled for the query. public IReadOnlyDictionary> Highlights { get; } /// Captions are the most representative passages from the document relatively to the search query. They are often used as document summary. Captions are only returned for queries of type 'semantic'. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs index c6cbc8142492..8a943b7b9c30 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.Serialization.cs @@ -19,6 +19,18 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Name); writer.WritePropertyName("prioritizedFields"u8); writer.WriteObjectValue(PrioritizedFields); + if (Optional.IsDefined(RankingOrder)) + { + if (RankingOrder != null) + { + writer.WritePropertyName("rankingOrder"u8); + writer.WriteStringValue(RankingOrder.Value.ToString()); + } + else + { + writer.WriteNull("rankingOrder"); + } + } if (Optional.IsDefined(FlightingOptIn)) { writer.WritePropertyName("flightingOptIn"u8); @@ -35,6 +47,7 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme } string name = default; SemanticPrioritizedFields prioritizedFields = default; + RankingOrder? rankingOrder = default; bool? flightingOptIn = default; foreach (var property in element.EnumerateObject()) { @@ -48,6 +61,16 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme prioritizedFields = SemanticPrioritizedFields.DeserializeSemanticPrioritizedFields(property.Value); continue; } + if (property.NameEquals("rankingOrder"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + rankingOrder = null; + continue; + } + rankingOrder = new RankingOrder(property.Value.GetString()); + continue; + } if (property.NameEquals("flightingOptIn"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -58,7 +81,7 @@ internal static SemanticConfiguration DeserializeSemanticConfiguration(JsonEleme continue; } } - return new SemanticConfiguration(name, prioritizedFields, flightingOptIn); + return new SemanticConfiguration(name, prioritizedFields, rankingOrder, flightingOptIn); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs index cc03bf762248..d14b81359622 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/SemanticConfiguration.cs @@ -28,11 +28,13 @@ public SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedF /// Initializes a new instance of . /// The name of the semantic configuration. /// Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. - /// Determines how which semantic or query rewrite models to use during model flighting/upgrades. - internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedFields, bool? flightingOptIn) + /// Specifies the score type to be used for the sort order of the search results. + /// Determines which semantic or query rewrite models to use during model flighting/upgrades. + internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritizedFields, RankingOrder? rankingOrder, bool? flightingOptIn) { Name = name; PrioritizedFields = prioritizedFields; + RankingOrder = rankingOrder; FlightingOptIn = flightingOptIn; } @@ -40,7 +42,9 @@ internal SemanticConfiguration(string name, SemanticPrioritizedFields prioritize public string Name { get; set; } /// Describes the title, content, and keyword fields to be used for semantic ranking, captions, highlights, and answers. At least one of the three sub properties (titleField, prioritizedKeywordsFields and prioritizedContentFields) need to be set. public SemanticPrioritizedFields PrioritizedFields { get; set; } - /// Determines how which semantic or query rewrite models to use during model flighting/upgrades. + /// Specifies the score type to be used for the sort order of the search results. + public RankingOrder? RankingOrder { get; set; } + /// Determines which semantic or query rewrite models to use during model flighting/upgrades. public bool? FlightingOptIn { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs new file mode 100644 index 000000000000..6687b76388e6 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentActivityRecord + { + internal static UnknownKnowledgeAgentActivityRecord DeserializeUnknownKnowledgeAgentActivityRecord(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int id = default; + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownKnowledgeAgentActivityRecord(id, type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentActivityRecord FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentActivityRecord(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs new file mode 100644 index 000000000000..93c1c992b98d --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentActivityRecord.cs @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentActivityRecord. + internal partial class UnknownKnowledgeAgentActivityRecord : KnowledgeAgentActivityRecord + { + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + internal UnknownKnowledgeAgentActivityRecord(int id, string type) : base(id, type) + { + Type = type ?? "Unknown"; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs new file mode 100644 index 000000000000..f44255a1c849 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentMessageContent : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownKnowledgeAgentMessageContent DeserializeUnknownKnowledgeAgentMessageContent(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentMessageContentType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new KnowledgeAgentMessageContentType(property.Value.GetString()); + continue; + } + } + return new UnknownKnowledgeAgentMessageContent(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentMessageContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentMessageContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs new file mode 100644 index 000000000000..d57b678fa6fc --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentMessageContent.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentMessageContent. + internal partial class UnknownKnowledgeAgentMessageContent : KnowledgeAgentMessageContent + { + /// Initializes a new instance of . + /// The type of the message. + internal UnknownKnowledgeAgentMessageContent(KnowledgeAgentMessageContentType type) : base(type) + { + Type = type; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs new file mode 100644 index 000000000000..7da206b0aa59 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.Serialization.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentModel : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + writer.WriteEndObject(); + } + + internal static UnknownKnowledgeAgentModel DeserializeUnknownKnowledgeAgentModel(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KnowledgeAgentModelKind kind = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("kind"u8)) + { + kind = new KnowledgeAgentModelKind(property.Value.GetString()); + continue; + } + } + return new UnknownKnowledgeAgentModel(kind); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentModel FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentModel(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs new file mode 100644 index 000000000000..5f4cdeb0df76 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentModel.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentModel. + internal partial class UnknownKnowledgeAgentModel : KnowledgeAgentModel + { + /// Initializes a new instance of . + /// The type of AI model. + internal UnknownKnowledgeAgentModel(KnowledgeAgentModelKind kind) : base(kind) + { + Kind = kind; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs new file mode 100644 index 000000000000..3f2a59a6108f --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.Serialization.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Search.Documents.Models +{ + internal partial class UnknownKnowledgeAgentReference + { + internal static UnknownKnowledgeAgentReference DeserializeUnknownKnowledgeAgentReference(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + string id = default; + int activitySource = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("activitySource"u8)) + { + activitySource = property.Value.GetInt32(); + continue; + } + } + return new UnknownKnowledgeAgentReference(type, id, activitySource); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new UnknownKnowledgeAgentReference FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeUnknownKnowledgeAgentReference(document.RootElement); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs new file mode 100644 index 000000000000..5574f4776164 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownKnowledgeAgentReference.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents.Models +{ + /// Unknown version of KnowledgeAgentReference. + internal partial class UnknownKnowledgeAgentReference : KnowledgeAgentReference + { + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + internal UnknownKnowledgeAgentReference(string type, string id, int activitySource) : base(type, id, activitySource) + { + Type = type ?? "Unknown"; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs index d63f388ad166..e51b467b59ed 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.Serialization.cs @@ -52,6 +52,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -69,6 +74,7 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("kind"u8)) @@ -131,6 +137,15 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new UnknownVectorQuery( kind, @@ -140,7 +155,8 @@ internal static UnknownVectorQuery DeserializeUnknownVectorQuery(JsonElement ele oversampling, weight, threshold, - filterOverride); + filterOverride, + perDocumentVectorLimit); } /// Deserializes the model from a raw response. diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs index e9909cf5d413..f547eb43c949 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/UnknownVectorQuery.cs @@ -23,7 +23,8 @@ internal partial class UnknownVectorQuery : VectorQuery /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. - internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + internal UnknownVectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Kind = kind; } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs index ac3e6b6903c9..dbf46e12cfb7 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.Serialization.cs @@ -52,6 +52,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs index 94a1b9283bef..12a485032f17 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorQuery.cs @@ -32,7 +32,8 @@ protected VectorQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. - internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride) + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit) { Kind = kind; KNearestNeighborsCount = kNearestNeighborsCount; @@ -42,6 +43,7 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f Weight = weight; Threshold = threshold; FilterOverride = filterOverride; + PerDocumentVectorLimit = perDocumentVectorLimit; } /// The kind of vector query being performed. @@ -62,5 +64,7 @@ internal VectorQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string f public VectorThreshold Threshold { get; set; } /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. public string FilterOverride { get; set; } + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. + public int? PerDocumentVectorLimit { get; set; } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs index bef6730ac985..7443589ba5fc 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorSearchVectorizerKind.cs @@ -33,7 +33,7 @@ public VectorSearchVectorizerKind(string value) public static VectorSearchVectorizerKind CustomWebApi { get; } = new VectorSearchVectorizerKind(CustomWebApiValue); /// Generate embeddings for an image or text input at query time using the Azure AI Services Vision Vectorize API. public static VectorSearchVectorizerKind AIServicesVision { get; } = new VectorSearchVectorizerKind(AIServicesVisionValue); - /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Studio Model Catalog at query time. + /// Generate embeddings using an Azure Machine Learning endpoint deployed via the Azure AI Foundry Model Catalog at query time. public static VectorSearchVectorizerKind AML { get; } = new VectorSearchVectorizerKind(AMLValue); /// Determines if two values are the same. public static bool operator ==(VectorSearchVectorizerKind left, VectorSearchVectorizerKind right) => left.Equals(right); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs index f33b607a7b13..da22d72fba54 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.Serialization.cs @@ -57,6 +57,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -75,6 +80,7 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("base64Image"u8)) @@ -142,6 +148,15 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableImageBinaryQuery( kind, @@ -152,6 +167,7 @@ internal static VectorizableImageBinaryQuery DeserializeVectorizableImageBinaryQ weight, threshold, filterOverride, + perDocumentVectorLimit, base64Image); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs index 2bd927d67b15..47abdc7c1932 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageBinaryQuery.cs @@ -29,8 +29,9 @@ public VectorizableImageBinaryQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The base 64 encoded binary of an image to be vectorized to perform a vector search query. - internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableImageBinaryQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, string base64Image) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Base64Image = base64Image; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs index d950d85484b8..87a9acbe2fa6 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.Serialization.cs @@ -58,6 +58,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -76,6 +81,7 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("url"u8)) @@ -147,6 +153,15 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableImageUrlQuery( kind, @@ -157,6 +172,7 @@ internal static VectorizableImageUrlQuery DeserializeVectorizableImageUrlQuery(J weight, threshold, filterOverride, + perDocumentVectorLimit, url); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs index 38d5b710e388..f5e9a7c00bdb 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableImageUrlQuery.cs @@ -31,8 +31,9 @@ public VectorizableImageUrlQuery() /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The URL of an image to be vectorized to perform a vector search query. - internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableImageUrlQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, Uri url) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Url = url; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs index 4143ea131796..4d7ad6ab77a4 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.Serialization.cs @@ -59,6 +59,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -78,6 +83,7 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("text"u8)) @@ -154,6 +160,15 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizableTextQuery( kind, @@ -164,6 +179,7 @@ internal static VectorizableTextQuery DeserializeVectorizableTextQuery(JsonEleme weight, threshold, filterOverride, + perDocumentVectorLimit, text, queryRewrites); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs index c72e86c1ceb3..18757ddd83b8 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizableTextQuery.cs @@ -36,9 +36,10 @@ public VectorizableTextQuery(string text) /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The text to be vectorized to perform a vector search query. /// Can be configured to let a generative model rewrite the query before sending it to be vectorized. - internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, string text, QueryRewritesType? queryRewrites) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizableTextQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, string text, QueryRewritesType? queryRewrites) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Text = text; QueryRewrites = queryRewrites; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs index 0bd9a870d967..71ffbe9ab06d 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.Serialization.cs @@ -60,6 +60,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WritePropertyName("filterOverride"u8); writer.WriteStringValue(FilterOverride); } + if (Optional.IsDefined(PerDocumentVectorLimit)) + { + writer.WritePropertyName("perDocumentVectorLimit"u8); + writer.WriteNumberValue(PerDocumentVectorLimit.Value); + } writer.WriteEndObject(); } @@ -78,6 +83,7 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) float? weight = default; VectorThreshold threshold = default; string filterOverride = default; + int? perDocumentVectorLimit = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("vector"u8)) @@ -156,6 +162,15 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) filterOverride = property.Value.GetString(); continue; } + if (property.NameEquals("perDocumentVectorLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + perDocumentVectorLimit = property.Value.GetInt32(); + continue; + } } return new VectorizedQuery( kind, @@ -166,6 +181,7 @@ internal static VectorizedQuery DeserializeVectorizedQuery(JsonElement element) weight, threshold, filterOverride, + perDocumentVectorLimit, vector); } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs index 60236c73dfd9..744734be2a75 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/VectorizedQuery.cs @@ -33,8 +33,9 @@ public VectorizedQuery(ReadOnlyMemory vector) /// The available derived classes include and . /// /// The OData filter expression to apply to this specific vector query. If no filter expression is defined at the vector level, the expression defined in the top level filter parameter is used instead. + /// Controls how many vectors can be matched from each document in a vector search query. Setting it to 1 ensures at most one vector per document is matched, guaranteeing results come from distinct documents. Setting it to 0 (unlimited) allows multiple relevant vectors from the same document to be matched. Default is 0. /// The vector representation of a search query. - internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride) + internal VectorizedQuery(VectorQueryKind kind, int? kNearestNeighborsCount, string fieldsRaw, bool? exhaustive, double? oversampling, float? weight, VectorThreshold threshold, string filterOverride, int? perDocumentVectorLimit, ReadOnlyMemory vector) : base(kind, kNearestNeighborsCount, fieldsRaw, exhaustive, oversampling, weight, threshold, filterOverride, perDocumentVectorLimit) { Vector = vector; Kind = kind; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs index 5c0503004795..ca055241b0f0 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.Serialization.cs @@ -142,6 +142,13 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) { return null; } + if (element.TryGetProperty("@odata.type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "#Microsoft.Skills.Custom.ChatCompletionSkill": return ChatCompletionSkill.DeserializeChatCompletionSkill(element); + } + } string uri = default; IDictionary httpHeaders = default; string httpMethod = default; @@ -150,7 +157,7 @@ internal static WebApiSkill DeserializeWebApiSkill(JsonElement element) int? degreeOfParallelism = default; ResourceIdentifier authResourceId = default; SearchIndexerDataIdentity authIdentity = default; - string odataType = default; + string odataType = "#Microsoft.Skills.Custom.WebApiSkill"; string name = default; string description = default; string context = default; diff --git a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs index 61734865b71d..8855c8fc8ef1 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/Models/WebApiSkill.cs @@ -11,7 +11,11 @@ namespace Azure.Search.Documents.Indexes.Models { - /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. + /// + /// A skill that can call a Web API endpoint, allowing you to extend a skillset by having it call your custom code. + /// 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 partial class WebApiSkill : SearchIndexerSkill { /// Initializes a new instance of . diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs index 35935eb9ddb3..a77fe0f7149e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Search.Documents.Agents.Models; using Azure.Search.Documents.Indexes.Models; namespace Azure.Search.Documents.Models @@ -88,10 +89,13 @@ public static QueryCaptionResult QueryCaptionResult(string text = null, string h /// Initializes a new instance of . /// Contains debugging information specific to semantic ranking requests. /// Contains debugging information specific to vector and hybrid search. + /// Contains debugging information specific to vectors matched within a collection of complex types. /// A new instance for mocking. - public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null) + public static DocumentDebugInfo DocumentDebugInfo(SemanticDebugInfo semantic = null, VectorsDebugInfo vectors = null, IReadOnlyDictionary> innerHits = null) { - return new DocumentDebugInfo(semantic, vectors); + innerHits ??= new Dictionary>(); + + return new DocumentDebugInfo(semantic, vectors, innerHits); } /// Initializes a new instance of . @@ -164,6 +168,17 @@ public static SingleVectorFieldResult SingleVectorFieldResult(double? searchScor return new SingleVectorFieldResult(searchScore, vectorSimilarity); } + /// Initializes a new instance of . + /// Position of this specific matching element within it's original collection. Position starts at 0. + /// Detailed scoring information for an individual element of a complex collection that matched a vector query. + /// A new instance for mocking. + public static QueryResultDocumentInnerHit QueryResultDocumentInnerHit(long? ordinal = null, IEnumerable> vectors = null) + { + vectors ??= new List>(); + + return new QueryResultDocumentInnerHit(ordinal, vectors?.ToList()); + } + /// Initializes a new instance of . /// A value indicating the percentage of the index that was considered by the autocomplete request, or null if minimumCoverage was not specified in the request. /// The list of returned Autocompleted items. @@ -180,18 +195,19 @@ public static AutocompleteResults AutocompleteResults(double? coverage = null, I /// The result of the most recent or an in-progress indexer execution. /// History of the recent indexer executions, sorted in reverse chronological order. /// The execution limits for the indexer. + /// All of the state that defines and dictates the indexer's current execution. /// A new instance for mocking. - public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = default, IndexerExecutionResult lastResult = null, IEnumerable executionHistory = null, SearchIndexerLimits limits = null) + public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = default, IndexerExecutionResult lastResult = null, IEnumerable executionHistory = null, SearchIndexerLimits limits = null, IndexerState currentState = null) { executionHistory ??= new List(); - return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits); + return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits, currentState); } /// Initializes a new instance of . /// The outcome of this indexer execution. /// The outcome of this indexer execution. - /// All of the state that defines and dictates the indexer's current execution. + /// The mode the indexer is running in. /// The error message indicating the top-level error, if any. /// The start time of this indexer execution. /// The end time of this indexer execution, if the execution has already completed. @@ -202,7 +218,7 @@ public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = def /// Change tracking state with which an indexer execution started. /// Change tracking state with which an indexer execution finished. /// A new instance for mocking. - public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexerState currentState = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) + public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStatus status = default, IndexerExecutionStatusDetail? statusDetail = null, IndexingMode? mode = null, string errorMessage = null, DateTimeOffset? startTime = null, DateTimeOffset? endTime = null, IEnumerable errors = null, IEnumerable warnings = null, int itemCount = default, int failedItemCount = default, string initialTrackingState = null, string finalTrackingState = null) { errors ??= new List(); warnings ??= new List(); @@ -210,7 +226,7 @@ public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStat return new IndexerExecutionResult( status, statusDetail, - currentState, + mode, errorMessage, startTime, endTime, @@ -222,6 +238,34 @@ public static IndexerExecutionResult IndexerExecutionResult(IndexerExecutionStat finalTrackingState); } + /// Initializes a new instance of . + /// The mode the indexer is running in. + /// Change tracking state used when indexing starts on all documents in the datasource. + /// Change tracking state value when indexing finishes on all documents in the datasource. + /// Change tracking state used when indexing starts on select, reset documents in the datasource. + /// Change tracking state value when indexing finishes on select, reset documents in the datasource. + /// The list of document keys that have been reset. The document key is the document's unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. + /// The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. + /// Change tracking state used when indexing starts on selective options from the datasource. + /// Change tracking state value when indexing finishes on selective options from the datasource. + /// A new instance for mocking. + public static IndexerState IndexerState(IndexingMode? mode = null, string allDocsInitialTrackingState = null, string allDocsFinalTrackingState = null, string resetDocsInitialTrackingState = null, string resetDocsFinalTrackingState = null, IEnumerable resetDocumentKeys = null, IEnumerable resetDataSourceDocumentIds = null, string resyncInitialTrackingState = null, string resyncFinalTrackingState = null) + { + resetDocumentKeys ??= new List(); + resetDataSourceDocumentIds ??= new List(); + + return new IndexerState( + mode, + allDocsInitialTrackingState, + allDocsFinalTrackingState, + resetDocsInitialTrackingState, + resetDocsFinalTrackingState, + resetDocumentKeys?.ToList(), + resetDataSourceDocumentIds?.ToList(), + resyncInitialTrackingState, + resyncFinalTrackingState); + } + /// Initializes a new instance of . /// The number of documents in the index. /// The amount of storage in bytes consumed by the index. @@ -333,5 +377,109 @@ public static IndexStatisticsSummary IndexStatisticsSummary(string name = null, return new IndexStatisticsSummary(name, documentCount, storageSize, vectorIndexSize); } + + /// Initializes a new instance of . + /// + /// + /// The activity records for tracking progress and billing implications. + /// 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 references for the retrieval data used in the response. + /// 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 . + /// + /// A new instance for mocking. + public static KnowledgeAgentRetrievalResponse KnowledgeAgentRetrievalResponse(IEnumerable response = null, IEnumerable activity = null, IEnumerable references = null) + { + response ??= new List(); + activity ??= new List(); + references ??= new List(); + + return new KnowledgeAgentRetrievalResponse(response?.ToList(), activity?.ToList(), references?.ToList()); + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The type of the activity record. + /// A new instance for mocking. + public static KnowledgeAgentActivityRecord KnowledgeAgentActivityRecord(int id = default, string type = null) + { + return new UnknownKnowledgeAgentActivityRecord(id, type); + } + + /// Initializes a new instance of . + /// The type of the reference. + /// The ID of the reference. + /// The source activity ID for the reference. + /// A new instance for mocking. + public static KnowledgeAgentReference KnowledgeAgentReference(string type = null, string id = null, int activitySource = default) + { + return new UnknownKnowledgeAgentReference(type, id, activitySource); + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The target index for the retrieval activity. + /// The query details for the retrieval activity. + /// The query time for this retrieval activity. + /// The count of documents retrieved. + /// The elapsed time in milliseconds for the retrieval activity. + /// A new instance for mocking. + public static KnowledgeAgentSearchActivityRecord KnowledgeAgentSearchActivityRecord(int id = default, string targetIndex = null, KnowledgeAgentSearchActivityRecordQuery query = null, DateTimeOffset? queryTime = null, int? count = null, int? elapsedMs = null) + { + return new KnowledgeAgentSearchActivityRecord( + id, + "AzureSearchQuery", + targetIndex, + query, + queryTime, + count, + elapsedMs); + } + + /// Initializes a new instance of . + /// The search string. + /// The filter string. + /// A new instance for mocking. + public static KnowledgeAgentSearchActivityRecordQuery KnowledgeAgentSearchActivityRecordQuery(string search = null, string filter = null) + { + return new KnowledgeAgentSearchActivityRecordQuery(search, filter); + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The number of input tokens for the LLM query planning activity. + /// The number of output tokens for the LLM query planning activity. + /// The elapsed time in milliseconds for the model activity. + /// A new instance for mocking. + public static KnowledgeAgentModelQueryPlanningActivityRecord KnowledgeAgentModelQueryPlanningActivityRecord(int id = default, int? inputTokens = null, int? outputTokens = null, int? elapsedMs = null) + { + return new KnowledgeAgentModelQueryPlanningActivityRecord(id, "ModelQueryPlanning", inputTokens, outputTokens, elapsedMs); + } + + /// Initializes a new instance of . + /// The ID of the activity record. + /// The number of input tokens for the semantic ranker activity. + /// The elapsed time in milliseconds for the model activity. + /// A new instance for mocking. + public static KnowledgeAgentSemanticRankerActivityRecord KnowledgeAgentSemanticRankerActivityRecord(int id = default, int? inputTokens = null, int? elapsedMs = null) + { + return new KnowledgeAgentSemanticRankerActivityRecord(id, "AzureSearchSemanticRanker", inputTokens, elapsedMs); + } + + /// Initializes a new instance of . + /// The ID of the reference. + /// The source activity ID for the reference. + /// The document key for the reference. + /// Dictionary of <any>. + /// A new instance for mocking. + public static KnowledgeAgentAzureSearchDocReference KnowledgeAgentAzureSearchDocReference(string id = null, int activitySource = default, string docKey = null, IReadOnlyDictionary sourceData = null) + { + sourceData ??= new Dictionary(); + + return new KnowledgeAgentAzureSearchDocReference("AzureSearchDoc", id, activitySource, docKey, sourceData); + } } } diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs index 29fc4d3efd08..bf9a8a9eee96 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SearchServiceRestClient.cs @@ -32,7 +32,7 @@ internal partial class SearchServiceRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SearchServiceRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs index f9c5d975e2ce..7c47f025bf6e 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SkillsetsRestClient.cs @@ -33,7 +33,7 @@ internal partial class SkillsetsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SkillsetsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs index 27411a284510..5497a46e74bd 100644 --- a/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Generated/SynonymMapsRestClient.cs @@ -32,7 +32,7 @@ internal partial class SynonymMapsRestClient /// The tracking ID sent with the request to help with debugging. /// Api Version. /// , , or is null. - public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-03-01-preview") + public SynonymMapsRestClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string endpoint, Guid? xMsClientRequestId = null, string apiVersion = "2025-05-01-preview") { ClientDiagnostics = clientDiagnostics ?? throw new ArgumentNullException(nameof(clientDiagnostics)); _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/PermissionFilter.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/PermissionFilter.cs new file mode 100644 index 000000000000..3ea6b85b81ac --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/PermissionFilter.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core; + +namespace Azure.Search.Documents.Indexes.Models +{ + /// A value indicating whether the field should be used as a permission filter. + [CodeGenModel("PermissionFilter")] + public readonly partial struct PermissionFilter + { +#pragma warning disable CA1034 // Nested types should not be visible + /// + /// The values of all declared properties as string constants. + /// These can be used in , and anywhere else constants are required. + /// + public static class Values + { + /// Field represents user IDs that should be used to filter document access on queries. + public const string UserIds = PermissionFilter.UserIdsValue; + /// Field represents group IDs that should be used to filter document access on queries. + public const string GroupIds = PermissionFilter.GroupIdsValue; + /// Field represents an RBAC scope that should be used to filter document access on queries. + public const string RbacScope = PermissionFilter.RbacScopeValue; + } +#pragma warning restore CA1034 // Nested types should not be visible + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs index ac2120761254..34ccf24d5f1c 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/Models/SimpleField.cs @@ -66,6 +66,9 @@ public SimpleField(string name, SearchFieldDataType type) : base(name, type) /// public LexicalNormalizerName? NormalizerName { get; set; } + /// A value indicating whether the field should be used as a permission filter. + public PermissionFilter? PermissionFilter { get; set; } + /// private protected override void Save(SearchField field) { @@ -75,6 +78,7 @@ private protected override void Save(SearchField field) field.IsFacetable = IsFacetable; field.IsSortable = IsSortable; field.NormalizerName = NormalizerName; + field.PermissionFilter = PermissionFilter; // Use a SearchableField instead, which will override this property. // The service will return Searchable == false for all non-searchable simple types. diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.KnowledgeAgent.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.KnowledgeAgent.cs new file mode 100644 index 000000000000..c89d1d74096c --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexClient.KnowledgeAgent.cs @@ -0,0 +1,323 @@ +// 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.Core.Pipeline; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Indexes +{ + /// + /// Azure Cognitive Search client that can be used to manage indexes on a Search service. + /// + public partial class SearchIndexClient + { + private KnowledgeAgentsRestClient _knowledgeAgentsRestClient; + + /// + /// Gets the generated to make requests. + /// + private KnowledgeAgentsRestClient KnowledgeAgentsClient => LazyInitializer.EnsureInitialized(ref _knowledgeAgentsRestClient, () => new KnowledgeAgentsRestClient( + _clientDiagnostics, + _pipeline, + Endpoint.AbsoluteUri, + null, + _version.ToVersionString()) + ); + + #region KnowledgeAgents Operations + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public virtual Response CreateKnowledgeAgent(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateKnowledgeAgent)}"); + scope.Start(); + try + { + return KnowledgeAgentsClient.Create(knowledgeAgent, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Creates a new agent. + /// The definition of the agent to create. + /// The cancellation token to use. + /// is null. + public virtual async Task> CreateKnowledgeAgentAsync(KnowledgeAgent knowledgeAgent, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateKnowledgeAgent)}"); + scope.Start(); + try + { + return await KnowledgeAgentsClient.CreateAsync(knowledgeAgent, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Creates a new agent or updates an agent if it already exists. + /// The definition of the agent to create or update. + /// + /// True to throw a if the does not match the current service version; + /// otherwise, the current service version will be overwritten. + /// + /// Optional to propagate notifications that the operation should be canceled. + /// is null. + public virtual Response CreateOrUpdateKnowledgeAgent(KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(knowledgeAgent, nameof(knowledgeAgent)); + + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateKnowledgeAgent)}"); + scope.Start(); + try + { + return KnowledgeAgentsClient.CreateOrUpdate( + knowledgeAgent?.Name, + knowledgeAgent, + onlyIfUnchanged ? knowledgeAgent?.ETag?.ToString() : null, + null, + cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Creates a new agent or updates an agent if it already exists. + /// The definition of the agent to create or update. + /// + /// True to throw a if the does not match the current service version; + /// otherwise, the current service version will be overwritten. + /// + /// Optional to propagate notifications that the operation should be canceled. + /// is null. + public virtual async Task> CreateOrUpdateKnowledgeAgentAsync(KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(knowledgeAgent, nameof(knowledgeAgent)); + + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(CreateOrUpdateKnowledgeAgent)}"); + scope.Start(); + try + { + return await KnowledgeAgentsClient.CreateOrUpdateAsync( + knowledgeAgent?.Name, + knowledgeAgent, + onlyIfUnchanged ? knowledgeAgent?.ETag?.ToString() : null, + null, + cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Deletes an existing agent. + /// The name of the agent to delete. + /// The cancellation token to use. + /// The from the server. + /// is null. + public virtual Response DeleteKnowledgeAgent(string agentName, CancellationToken cancellationToken = default) => + DeleteKnowledgeAgent(agentName, null, false, cancellationToken); + + //// Deletes an existing agent. + /// The name of the agent to delete. + /// The cancellation token to use. + /// The from the server. + /// is null. + public virtual async Task DeleteKnowledgeAgentAsync(string agentName, CancellationToken cancellationToken = default) => + await DeleteKnowledgeAgentAsync(agentName, null, false, cancellationToken).ConfigureAwait(false); + + /// Deletes an existing agent. + /// The definition of the agent to create or update. + /// + /// True to throw a if the does not match the current service version; + /// otherwise, the current service version will be overwritten. + /// + /// Optional to propagate notifications that the operation should be canceled. + /// The from the server. + /// is null. + public virtual Response DeleteKnowledgeAgent(KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(knowledgeAgent, nameof(knowledgeAgent)); + + return DeleteKnowledgeAgent( + knowledgeAgent?.Name, + knowledgeAgent?.ETag, + onlyIfUnchanged, + cancellationToken); + } + + /// Deletes an existing agent. + /// The definition of the agent to create or update. + /// + /// True to throw a if the does not match the current service version; + /// otherwise, the current service version will be overwritten. + /// + /// Optional to propagate notifications that the operation should be canceled. + /// The from the server. + /// is null. + public virtual async Task DeleteKnowledgeAgentAsync(KnowledgeAgent knowledgeAgent, bool onlyIfUnchanged = false, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(knowledgeAgent, nameof(knowledgeAgent)); + + return await DeleteKnowledgeAgentAsync( + knowledgeAgent?.Name, + knowledgeAgent?.ETag, + onlyIfUnchanged, + cancellationToken) + .ConfigureAwait(false); + } + + private Response DeleteKnowledgeAgent(string agentName, ETag? etag, bool onlyIfUnchanged, CancellationToken cancellationToken) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteKnowledgeAgent)}"); + scope.Start(); + try + { + return KnowledgeAgentsClient.Delete( + agentName, + onlyIfUnchanged ? etag?.ToString() : null, + null, + cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + private async Task DeleteKnowledgeAgentAsync(string agentName, ETag? etag, bool onlyIfUnchanged, CancellationToken cancellationToken) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(DeleteKnowledgeAgent)}"); + scope.Start(); + try + { + return await KnowledgeAgentsClient.DeleteAsync( + agentName, + onlyIfUnchanged ? etag?.ToString() : null, + null, + cancellationToken) + .ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public virtual Response GetKnowledgeAgent(string agentName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetKnowledgeAgent)}"); + scope.Start(); + try + { + return KnowledgeAgentsClient.Get(agentName, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Retrieves an agent definition. + /// The name of the agent to retrieve. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetKnowledgeAgentAsync(string agentName, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetKnowledgeAgent)}"); + scope.Start(); + try + { + return await KnowledgeAgentsClient.GetAsync(agentName, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Lists all agents available for a search service. + /// Optional to propagate notifications that the operation should be canceled. + /// The from the server containing a list of . + /// Thrown when a failure is returned by the Search service. + public virtual Pageable GetKnowledgeAgents(CancellationToken cancellationToken = default) + { + return PageResponseEnumerator.CreateEnumerable((continuationToken) => + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetKnowledgeAgents)}"); + scope.Start(); + try + { + if (continuationToken != null) + { + throw new NotSupportedException("A continuation token is unsupported."); + } + + Response result = KnowledgeAgentsClient.List(cancellationToken); + + return Page.FromValues(result.Value.KnowledgeAgents, null, result.GetRawResponse()); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + }); + } + + /// Lists all agents available for a search service. + /// Optional to propagate notifications that the operation should be canceled. + /// The from the server containing a list of . + /// Thrown when a failure is returned by the Search service. + public virtual AsyncPageable GetKnowledgeAgentsAsync(CancellationToken cancellationToken = default) + { + return PageResponseEnumerator.CreateAsyncEnumerable(async (continuationToken) => + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexClient)}.{nameof(GetKnowledgeAgents)}"); + scope.Start(); + try + { + if (continuationToken != null) + { + throw new NotSupportedException("A continuation token is unsupported."); + } + + Response result = await KnowledgeAgentsClient.ListAsync(cancellationToken).ConfigureAwait(false); + + return Page.FromValues(result.Value.KnowledgeAgents, null, result.GetRawResponse()); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + }); + } + #endregion + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs index ca68395ea1a5..0f75f5175b97 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SearchIndexerClient.cs @@ -960,5 +960,52 @@ public virtual async Task ResetDocumentsAsync( throw; } } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The to use. + /// The cancellation token to use. + /// or is null. + public virtual Response Resync(string indexerName, IndexerResyncBody indexerResync, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(Resync)}"); + scope.Start(); + try + { + return IndexersClient.Resync( + indexerName, + indexerResync, + cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// Resync selective options from the datasource to be re-ingested by the indexer. + /// The name of the indexer to resync for. + /// The to use. + /// The cancellation token to use. + /// or is null. + public virtual async Task ResyncAsync(string indexerName, IndexerResyncBody indexerResync, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(SearchIndexerClient)}.{nameof(Resync)}"); + scope.Start(); + try + { + return await IndexersClient.ResyncAsync( + indexerName, + indexerResync, + cancellationToken) + .ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } } } diff --git a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs index eb9ba4d387fb..9fc7c15b75d2 100644 --- a/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs +++ b/sdk/search/Azure.Search.Documents/src/Indexes/SimpleFieldAttribute.cs @@ -58,6 +58,10 @@ public class SimpleFieldAttribute : Attribute, ISearchFieldAttribute /// String values from LexicalAnalyzerName. public string NormalizerName { get; set; } + /// A value indicating whether the field should be used as a permission filter. + /// String values from PermissionFilter. + public string PermissionFilter { get; set; } + /// void ISearchFieldAttribute.SetField(SearchField field) => SetField(field); @@ -81,6 +85,11 @@ private protected void SetField(SearchField field) { field.NormalizerName = NormalizerName; } + + if (PermissionFilter != null) + { + field.PermissionFilter = PermissionFilter; + } } } } diff --git a/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgent.cs b/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgent.cs new file mode 100644 index 000000000000..c34c23e312ce --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgent.cs @@ -0,0 +1,30 @@ +// 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.Search.Documents.Indexes.Models +{ + /// The KnowledgeAgent. + public partial class KnowledgeAgent + { + [CodeGenMember("ETag")] + private string _eTag; + + /// + /// The of the . + /// + public ETag? ETag + { + get => _eTag is null ? (ETag?)null : new ETag(_eTag); + set => _eTag = value?.ToString(); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgentRetrievalClient.cs b/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgentRetrievalClient.cs new file mode 100644 index 000000000000..9123c32bc1c2 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/src/KnowledgeAgent/KnowledgeAgentRetrievalClient.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core.Pipeline; +using Azure.Core; +using Azure.Search.Documents.Agents.Models; + +namespace Azure.Search.Documents.Agents +{ + /// + /// Azure Cognitive Search client that can be used to query an agent. + /// + public partial class KnowledgeAgentRetrievalClient + { + private readonly HttpPipeline _pipeline; + private readonly ClientDiagnostics _clientDiagnostics; + private readonly SearchClientOptions.ServiceVersion _version; + + /// + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// + public virtual HttpPipeline Pipeline => _pipeline; + + /// + /// Gets the URI endpoint of the Search service. This is likely + /// to be similar to "https://{search_service}.search.windows.net". + /// + public virtual Uri Endpoint { get; } + + /// + /// Gets the name of the agent. + /// + public virtual string AgentName { get; } + + /// + /// Gets the generated document operations to make requests. + /// + private KnowledgeRetrievalRestClient RestClient { get; } + + #region ctors + /// + /// Initializes a new instance of the SearchClient class for + /// mocking. + /// + protected KnowledgeAgentRetrievalClient() { } + + /// + /// Initializes a new instance of the class. + /// + /// Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS. + /// The name of the agent. + /// + /// Required. The API key credential used to authenticate requests against the Search service. + /// You need to use an admin key to perform any operations on the SearchIndexClient. + /// See Create and manage api-keys for an Azure Cognitive Search service for more information about API keys in Azure Cognitive Search. + /// + /// Thrown when the or is null. + /// Thrown when the is not using HTTPS. + public KnowledgeAgentRetrievalClient(Uri endpoint, string agentName, AzureKeyCredential credential) : + this(endpoint, agentName, credential, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS. + /// The name of the agent. + /// + /// Required. The token credential used to authenticate requests against the Search service. + /// See Use role-based authorization in Azure Cognitive Search for more information about role-based authorization in Azure Cognitive Search. + /// + /// Thrown when the or is null. + /// Thrown when the is not using HTTPS. + public KnowledgeAgentRetrievalClient(Uri endpoint, string agentName, TokenCredential tokenCredential) : + this(endpoint, agentName, tokenCredential, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS. + /// The name of the agent. + /// + /// Required. The API key credential used to authenticate requests against the Search service. + /// You need to use an admin key to perform any operations on the SearchIndexClient. + /// See Create and manage api-keys for an Azure Cognitive Search service for more information about API keys in Azure Cognitive Search. + /// + /// Client configuration options for connecting to Azure Cognitive Search. + /// Thrown when the or is null. + /// Thrown when the is not using HTTPS. + public KnowledgeAgentRetrievalClient(Uri endpoint, string agentName, AzureKeyCredential credential, SearchClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + endpoint.AssertHttpsScheme(nameof(endpoint)); + Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); + Argument.AssertNotNull(credential, nameof(credential)); + + options ??= new SearchClientOptions(); + Endpoint = endpoint; + AgentName = agentName; + _clientDiagnostics = new ClientDiagnostics(options); + _pipeline = options.Build(credential); + _version = options.Version; + + RestClient = new KnowledgeRetrievalRestClient( + _clientDiagnostics, + _pipeline, + endpoint.AbsoluteUri, + AgentName, + null, + _version.ToVersionString()); + } + + /// + /// Initializes a new instance of the class. + /// + /// Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS. + /// The name of the agent. + /// + /// Required. The token credential used to authenticate requests against the Search service. + /// See Use role-based authorization in Azure Cognitive Search for more information about role-based authorization in Azure Cognitive Search. + /// + /// Client configuration options for connecting to Azure Cognitive Search. + /// Thrown when the or is null. + /// Thrown when the is not using HTTPS. + public KnowledgeAgentRetrievalClient(Uri endpoint, string agentName, TokenCredential tokenCredential, SearchClientOptions options) + { + Argument.AssertNotNull(endpoint, nameof(endpoint)); + endpoint.AssertHttpsScheme(nameof(endpoint)); + Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); + Argument.AssertNotNull(tokenCredential, nameof(tokenCredential)); + + options ??= new SearchClientOptions(); + Endpoint = endpoint; + AgentName = agentName; + _clientDiagnostics = new ClientDiagnostics(options); + _pipeline = options.Build(tokenCredential); + _version = options.Version; + + RestClient = new KnowledgeRetrievalRestClient( + _clientDiagnostics, + _pipeline, + endpoint.AbsoluteUri, + agentName, + null, + _version.ToVersionString()); + } + #endregion ctors + + #region Service operations + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. + /// The cancellation token to use. + /// is null. + public virtual Response Retrieve(KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(KnowledgeAgentRetrievalClient)}.{nameof(Retrieve)}"); + scope.Start(); + try + { + return RestClient.Retrieve(retrievalRequest, xMsQuerySourceAuthorization, cancellationToken); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + + /// KnowledgeAgent retrieves relevant data from backing stores. + /// The retrieval request to process. + /// Token identifying the user for which the query is being executed. This token is used to enforce security restrictions on documents. + /// The cancellation token to use. + /// is null. + public virtual async Task> RetrieveAsync(KnowledgeAgentRetrievalRequest retrievalRequest, string xMsQuerySourceAuthorization = null, CancellationToken cancellationToken = default) + { + using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(KnowledgeAgentRetrievalClient)}.{nameof(Retrieve)}"); + scope.Start(); + try + { + return await RestClient.RetrieveAsync(retrievalRequest, xMsQuerySourceAuthorization, cancellationToken).ConfigureAwait(false); + } + catch (Exception ex) + { + scope.Failed(ex); + throw; + } + } + #endregion Service operations + } +} diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs index e2d5b1fe0d72..3fda2a696d8f 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchModelFactory.cs @@ -199,7 +199,21 @@ public static SearchIndexerStatus SearchIndexerStatus( IndexerExecutionResult lastResult, IReadOnlyList executionHistory, SearchIndexerLimits limits) => - new SearchIndexerStatus(status, lastResult, executionHistory, limits); + new SearchIndexerStatus(status, lastResult, executionHistory, limits, default); + + /// Initializes a new instance of . + /// Overall indexer status. + /// The result of the most recent or an in-progress indexer execution. + /// History of the recent indexer executions, sorted in reverse chronological order. + /// The execution limits for the indexer. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SearchIndexerStatus SearchIndexerStatus(IndexerStatus status = default, IndexerExecutionResult lastResult = null, IEnumerable executionHistory = null, SearchIndexerLimits limits = null) + { + executionHistory ??= new List(); + + return new SearchIndexerStatus(status, lastResult, executionHistory?.ToList(), limits, default); + } /// Initializes a new instance of SearchIndexerWarning. /// The key of the item which generated a warning. diff --git a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs index 6fe5c0d26032..6341cdc28048 100644 --- a/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs +++ b/sdk/search/Azure.Search.Documents/src/Models/SearchResult.cs @@ -114,6 +114,11 @@ internal static async Task> DeserializeAsync( { result.SemanticSearch.RerankerScore = prop.Value.GetDouble(); } + else if (prop.NameEquals(Constants.SearchRerankerBoostedScoreKeyJson.EncodedUtf8Bytes) && + prop.Value.ValueKind != JsonValueKind.Null) + { + result.SemanticSearch.RerankerBoostedScore = prop.Value.GetDouble(); + } else if (prop.NameEquals(Constants.SearchCaptionsKeyJson.EncodedUtf8Bytes) && prop.Value.ValueKind != JsonValueKind.Null) { @@ -171,6 +176,13 @@ public class SemanticSearchResult /// public double? RerankerScore { get; internal set; } + /// + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the + /// RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. + /// RerankerBoostedScore is only returned for queries of type 'semantic'. + /// + public double? RerankerBoostedScore { get; internal set; } + /// /// Captions are the most representative passages from the document relatively to the search query. /// They are often used as document summary. are only returned for queries of type . @@ -273,16 +285,33 @@ public static SearchResult SearchResult( DocumentDebugInfo = documentDebugInfo }; - /// Initializes a new instance of . + /// Initializes a new instance of SemanticSearchResult. + /// The relevance score computed by the semantic ranker for the top search results. + /// Captions are the most representative passages from the document relatively to the search query. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SemanticSearchResult SemanticSearchResult( + double? rerankerScore, + IReadOnlyList captions) => + new SemanticSearchResult() + { + RerankerScore = rerankerScore, + Captions = captions + }; + + /// Initializes a new instance of SemanticSearchResult. /// The relevance score computed by the semantic ranker for the top search results. + /// The relevance score computed by boosting the Reranker Score. Search results are sorted by the RerankerScore/RerankerBoostedScore based on useScoringProfileBoostedRanking in the Semantic Config. /// Captions are the most representative passages from the document relatively to the search query. /// A new instance for mocking. public static SemanticSearchResult SemanticSearchResult( double? rerankerScore, + double? rerankerBoostedScore, IReadOnlyList captions) => new SemanticSearchResult() { RerankerScore = rerankerScore, + RerankerBoostedScore = rerankerBoostedScore, Captions = captions }; } diff --git a/sdk/search/Azure.Search.Documents/src/Options/GetDocumentOptions.cs b/sdk/search/Azure.Search.Documents/src/Options/GetDocumentOptions.cs index 8062cb6c21af..1144cb8bacc1 100644 --- a/sdk/search/Azure.Search.Documents/src/Options/GetDocumentOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/Options/GetDocumentOptions.cs @@ -7,7 +7,7 @@ namespace Azure.Search.Documents { /// - /// Options for . + /// Options for . /// public class GetDocumentOptions { diff --git a/sdk/search/Azure.Search.Documents/src/SearchClient.cs b/sdk/search/Azure.Search.Documents/src/SearchClient.cs index 3177a6e99568..e1bbfa21295d 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClient.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClient.cs @@ -434,8 +434,8 @@ public virtual async Task> GetDocumentCountAsync( /// Thrown when a failure is returned by the Search Service. /// /// - /// The generic overloads of the and - /// methods support mapping of Azure + /// The generic overloads of the and + /// methods support mapping of Azure /// Search field types to .NET types via the type parameter /// . Note that all search field types except /// collections are nullable, so we recommend using nullable types for @@ -449,6 +449,280 @@ public virtual Response GetDocument( CancellationToken cancellationToken = default) => GetDocumentInternal( key, + null, + options, + async: false, + cancellationToken) + .EnsureCompleted(); + + /// + /// Retrieves a document from Azure Cognitive Search. This is useful + /// when a user clicks on a specific search result, and you want to + /// look up specific details about that document. You can only get one + /// document at a time. Use Search to get multiple documents in a + /// single request. + /// Lookup Document + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// + /// Required. An string value that uniquely identifies each document + /// in the index. The key is sometimes referred to as a document ID. + /// See + /// Naming rules + /// for the rules for constructing valid document keys. + /// + /// + /// Options to customize the operation's behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// The document corresponding to the . + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// The and + /// methods support mapping of Azure Search field types to .NET types + /// via the type parameter . Note that all + /// search field types except collections are nullable, so we recommend + /// using nullable types for the properties of . + /// The type mapping is as follows: + /// + /// + /// Search field type + /// .NET type + /// + /// + /// Edm.String + /// (string in C# and F#) + /// + /// + /// Edm.Boolean + /// (bool? in C#,\ + /// Nullable<bool> in F#) + /// + /// + /// Edm.Double + /// (double? in C#, + /// Nullable<float> in F#) + /// + /// + /// Edm.Int32 + /// (int? in C#, + /// Nullable<int> in F#) + /// + /// + /// Edm.Int64 + /// (long? in C#, + /// Nullable<int64> in F#) + /// + /// + /// Edm.DateTimeOffset + /// + /// (DateTimeOffset? in + /// C#, Nullable<DateTimeOffset> in F#) or + /// System.Nullable<System.DateTime> (DateTime? in C#, + /// Nullable<DateTime> in F#). Both types work, although we + /// recommend using DateTimeOffset. When retrieving documents, + /// DateTime values will always be in UTC. When indexing documents, + /// DateTime values are interpreted as follows: + /// + /// + /// UTC DateTime + /// Sent as-is to the index. + /// + /// + /// Local DateTime + /// Converted to UTC before being sent to the index. + /// + /// + /// + /// DateTime with unspecified time zone + /// Assumed to be UTC and sent as-is to the index. + /// + /// + /// + /// + /// + /// + /// Edm.GeographyPoint + /// Azure.Core.GeoJson.GeoPoint + /// + /// + /// + /// Edm.ComplexType + /// + /// Any type that can be deserialized from the JSON objects in the + /// complex field. This can be a value type or a reference type, but + /// we recommend using a reference type since complex fields are + /// nullable in Azure Cognitive Search. + /// + /// + /// + /// Collection(Edm.String) + /// (seq<string> + /// in F#) + /// + /// + /// Collection(Edm.Boolean) + /// (seq<bool> in + /// F#) + /// + /// + /// Collection(Edm.Double) + /// (seq<float> in + /// F#) + /// + /// + /// Collection(Edm.Int32) + /// (seq<int> in + /// F#) + /// + /// + /// Collection(Edm.Int64) + /// (seq<int64> in + /// F#) + /// + /// + /// Collection(Edm.DateTimeOffset) + /// + /// or + /// (seq<DateTimeOffset> or + /// seq<DateTime> in F#). Both types work, although we recommend + /// using . See the notes + /// above on Edm.DateTimeOffset for details. + /// + /// + /// + /// Collection(Edm.GeographyPoint) + /// sequence of Azure.Core.GeoJson.GeoPoint + /// (seq<GeoPoint> in F#) + /// + /// + /// Collection(Edm.ComplexType) + /// + /// (seq<T> in F#) where T is any + /// type that can be deserialized from the JSON objects in the complex + /// collection field. This can be a value type or a reference type. + /// + /// + /// + /// You can also use the dynamic as your + /// and we will attempt to map JSON types in + /// the response payload to .NET types. This mapping does not + /// have the benefit of precise type information from the index, so the + /// mapping is not always correct. In particular, be aware of the + /// following cases: + /// + /// + /// + /// Any numeric value without a decimal point will be deserialized to + /// a (int in C#, int32 in F#) if it can be + /// converted or a (long in C#, int64 in F#) + /// otherwise. + /// + /// + /// + /// + /// Special double-precision floating point values such as NaN and + /// Infinity will be deserialized as type rather + /// than , even if they are in arrays with regular + /// floating point values. + /// + /// + /// + /// + /// Any Edm.DateTimeOffset field will be deserialized as a + /// , not . + /// + /// + /// + /// + /// Any empty JSON array will be deserialized as an array of + /// (object[] in C#, obj[] in F#). + /// + /// + /// + /// + /// Complex fields will be recursively deserialized into instances of + /// type . Similarly, complex collection + /// fields will be deserialized into arrays of such instances. + /// + /// + /// + /// + public virtual async Task> GetDocumentAsync( + string key, + GetDocumentOptions options = null, + CancellationToken cancellationToken = default) => + await GetDocumentInternal( + key, + null, + options, + async: true, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Retrieves a document from Azure Cognitive Search. This is useful + /// when a user clicks on a specific search result, and you want to + /// look up specific details about that document. You can only get one + /// document at a time. Use Search to get multiple documents in a + /// single request. + /// Lookup Document + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// + /// Required. An string value that uniquely identifies each document + /// in the index. The key is sometimes referred to as a document ID. + /// See + /// Naming rules + /// for the rules for constructing valid document keys. + /// + /// Token identifying the user for which the query is being executed. + /// This token is used to enforce security restrictions on documents. + /// + /// + /// Options to customize the operation's behavior. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// The document corresponding to the . + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// The generic overloads of the and + /// methods support mapping of Azure + /// Search field types to .NET types via the type parameter + /// . Note that all search field types except + /// collections are nullable, so we recommend using nullable types for + /// the properties of . See + /// + /// for more information. + /// + public virtual Response GetDocument( + string key, + string querySourceAuthorization, + GetDocumentOptions options = null, + CancellationToken cancellationToken = default) => + GetDocumentInternal( + key, + querySourceAuthorization, options, async: false, cancellationToken) @@ -473,6 +747,9 @@ public virtual Response GetDocument( /// Naming rules /// for the rules for constructing valid document keys. /// + /// Token identifying the user for which the query is being executed. + /// This token is used to enforce security restrictions on documents. + /// /// /// Options to customize the operation's behavior. /// @@ -487,7 +764,7 @@ public virtual Response GetDocument( /// Thrown when a failure is returned by the Search Service. /// /// - /// The and + /// The and /// methods support mapping of Azure Search field types to .NET types /// via the type parameter . Note that all /// search field types except collections are nullable, so we recommend @@ -659,10 +936,12 @@ public virtual Response GetDocument( /// public virtual async Task> GetDocumentAsync( string key, + string querySourceAuthorization, GetDocumentOptions options = null, CancellationToken cancellationToken = default) => await GetDocumentInternal( key, + querySourceAuthorization, options, async: true, cancellationToken) @@ -670,6 +949,7 @@ await GetDocumentInternal( private async Task> GetDocumentInternal( string key, + string querySourceAuthorization, GetDocumentOptions options, bool async, CancellationToken cancellationToken) @@ -680,7 +960,7 @@ private async Task> GetDocumentInternal( scope.Start(); try { - using HttpMessage message = Protocol.CreateGetRequest(key, options?.SelectedFieldsOrNull); + using HttpMessage message = Protocol.CreateGetRequest(key, options?.SelectedFieldsOrNull, querySourceAuthorization); if (async) { await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -765,6 +1045,7 @@ public virtual Response> Search( CancellationToken cancellationToken = default) => SearchInternal( searchText, + null, options, async: false, cancellationToken) @@ -822,6 +1103,133 @@ public async virtual Task>> SearchAsync( CancellationToken cancellationToken = default) => await SearchInternal( searchText, + null, + options, + async: true, + cancellationToken) + .ConfigureAwait(false); + + /// + /// Searches for documents in the search index. + /// Search Documents + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// + /// A full-text search query expression; Use "*" or omit this + /// parameter to match all documents. See + /// Simple query syntax in Azure Cognitive Search + /// for more information about search query syntax. + /// + /// + /// Token identifying the user for which the query is being executed. + /// This token is used to enforce security restrictions on documents. + /// + /// + /// Options that allow specifying filtering, sorting, faceting, paging, + /// and other search query behaviors. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the documents matching the query. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// Search and SearchAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// + /// for more details on the type mapping. + /// + /// + /// Azure Cognitive Search might not be able to include all results in + /// a single response in which case + /// will automatically continue making additional requests as you + /// enumerate through the results. You can also process the results a + /// page at a time with the + /// method. + /// + /// + public virtual Response> Search( + string searchText, + string querySourceAuthorization, + SearchOptions options = null, + CancellationToken cancellationToken = default) => + SearchInternal( + searchText, + querySourceAuthorization, + options, + async: false, + cancellationToken) + .EnsureCompleted(); + + /// + /// Searches for documents in the search index. + /// Search Documents + /// + /// + /// The .NET type that maps to the index schema. Instances of this type + /// can be retrieved as documents from the index. + /// + /// + /// A full-text search query expression; Use "*" or omit this + /// parameter to match all documents. See + /// Simple query syntax in Azure Cognitive Search + /// for more information about search query syntax. + /// + /// + /// Token identifying the user for which the query is being executed. + /// This token is used to enforce security restrictions on documents. + /// + /// + /// Options that allow specifying filtering, sorting, faceting, paging, + /// and other search query behaviors. + /// + /// + /// Optional to propagate notifications + /// that the operation should be canceled. + /// + /// + /// Response containing the documents matching the query. + /// + /// + /// Thrown when a failure is returned by the Search Service. + /// + /// + /// + /// Search and SearchAsync methods support mapping of search field + /// types to .NET types via the type parameter T. You can provide your + /// own type or use the dynamic + /// . See + /// + /// for more details on the type mapping. + /// + /// + /// Azure Cognitive Search might not be able to include all results in + /// a single response in which case + /// will automatically + /// continue making additional requests as you enumerate through the + /// results. You can also process the results a page at a time with + /// the method. + /// + /// + public async virtual Task>> SearchAsync( + string searchText, + string querySourceAuthorization, + SearchOptions options = null, + CancellationToken cancellationToken = default) => + await SearchInternal( + searchText, + querySourceAuthorization, options, async: true, cancellationToken) @@ -874,6 +1282,7 @@ public virtual Response> Search( Argument.AssertNotNull(options, nameof(options)); return SearchInternal( + null, null, options, async: false, @@ -928,6 +1337,7 @@ public async virtual Task>> SearchAsync( Argument.AssertNotNull(options, nameof(options)); return await SearchInternal( + null, null, options, async: true, @@ -937,6 +1347,7 @@ public async virtual Task>> SearchAsync( private async Task>> SearchInternal( string searchText, + string querySourceAuthorization, SearchOptions options, bool async, CancellationToken cancellationToken = default) @@ -951,6 +1362,7 @@ private async Task>> SearchInternal( options = new SearchOptions() { SearchText = searchText }; } return await SearchInternal( + querySourceAuthorization, options, $"{nameof(SearchClient)}.{nameof(Search)}", async, @@ -959,6 +1371,7 @@ private async Task>> SearchInternal( } private async Task>> SearchInternal( + string querySourceAuthorization, SearchOptions options, string operationName, bool async, @@ -969,7 +1382,7 @@ private async Task>> SearchInternal( scope.Start(); try { - using HttpMessage message = Protocol.CreateSearchPostRequest(options); + using HttpMessage message = Protocol.CreateSearchPostRequest(options, querySourceAuthorization); if (async) { await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); diff --git a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs index e7e2bfdf6e0a..b63cd47a88df 100644 --- a/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs +++ b/sdk/search/Azure.Search.Documents/src/SearchClientOptions.cs @@ -42,16 +42,16 @@ public enum ServiceVersion V2024_07_01 = 3, /// - /// The 2025-03-01-preview version of the Azure Cognitive Search service. + /// The 2025-05-01-preview version of the Azure Cognitive Search service. /// - V2025_03_01_Preview = 4, + V2025_05_01_Preview = 4, #pragma warning restore CA1707 } /// /// The Latest service version supported by this client library. /// - internal const ServiceVersion LatestVersion = ServiceVersion.V2025_03_01_Preview; + internal const ServiceVersion LatestVersion = ServiceVersion.V2025_05_01_Preview; /// /// The service version to use when creating continuation tokens that @@ -206,7 +206,7 @@ public static SearchClientOptions.ServiceVersion Validate(this SearchClientOptio SearchClientOptions.ServiceVersion.V2020_06_30 => version, SearchClientOptions.ServiceVersion.V2023_11_01 => version, SearchClientOptions.ServiceVersion.V2024_07_01 => version, - SearchClientOptions.ServiceVersion.V2025_03_01_Preview => version, + SearchClientOptions.ServiceVersion.V2025_05_01_Preview => version, _ => throw CreateInvalidVersionException(version) }; @@ -231,7 +231,7 @@ public static string ToVersionString(this SearchClientOptions.ServiceVersion ver SearchClientOptions.ServiceVersion.V2020_06_30 => "2020-06-30", SearchClientOptions.ServiceVersion.V2023_11_01 => "2023-11-01", SearchClientOptions.ServiceVersion.V2024_07_01 => "2024-07-01", - SearchClientOptions.ServiceVersion.V2025_03_01_Preview => "2025-03-01-preview", + SearchClientOptions.ServiceVersion.V2025_05_01_Preview => "2025-05-01-preview", _ => throw CreateInvalidVersionException(version) }; diff --git a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs index 144a78d67c47..b65f98ab4e20 100644 --- a/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs +++ b/sdk/search/Azure.Search.Documents/src/Utilities/Constants.cs @@ -101,6 +101,11 @@ internal static class Constants /// public static readonly JsonEncodedText SearchRerankerScoreKeyJson = JsonEncodedText.Encode("@search.rerankerScore"); + /// + /// The @search.rerankerBoostedScore key. + /// + public static readonly JsonEncodedText SearchRerankerBoostedScoreKeyJson = JsonEncodedText.Encode("@search.rerankerBoostedScore"); + /// /// The @search.captions key. /// diff --git a/sdk/search/Azure.Search.Documents/src/autorest.md b/sdk/search/Azure.Search.Documents/src/autorest.md index 689c9034ba14..9c0f9c773e89 100644 --- a/sdk/search/Azure.Search.Documents/src/autorest.md +++ b/sdk/search/Azure.Search.Documents/src/autorest.md @@ -11,8 +11,9 @@ See the [Contributing guidelines](https://github.com/Azure/azure-sdk-for-net/blo ```yaml title: SearchServiceClient input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/8c53aa7023e66a9ec24ede6a9fad0ed730d62515/specification/search/data-plane/Azure.Search/preview/2025-03-01-preview/searchindex.json - - https://github.com/Azure/azure-rest-api-specs/blob/8c53aa7023e66a9ec24ede6a9fad0ed730d62515/specification/search/data-plane/Azure.Search/preview/2025-03-01-preview/searchservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/1755004c92eefdc7a66b4cd90df27d0af4cb0456/specification/search/data-plane/Azure.Search/preview/2025-05-01-preview/searchindex.json + - https://github.com/Azure/azure-rest-api-specs/blob/1755004c92eefdc7a66b4cd90df27d0af4cb0456/specification/search/data-plane/Azure.Search/preview/2025-05-01-preview/searchservice.json + - https://github.com/Azure/azure-rest-api-specs/blob/1755004c92eefdc7a66b4cd90df27d0af4cb0456/specification/search/data-plane/Azure.Search/preview/2025-05-01-preview/knowledgeagent.json generation1-convenience-client: true deserialize-null-collection-as-null-value: true ``` @@ -58,6 +59,18 @@ directive: $["discriminator"] = "@odata.type"; ``` +### Move KnowledgeAgent models to Azure.Search.Documents.Agents.Models + +Models in knowledgeagent.json should be moved to Azure.Search.Documents.Agents.Models. + +```yaml +directive: + from: knowledgeagent.json + where: $.definitions.* + transform: > + $["x-namespace"] = "Azure.Search.Documents.Agents.Models" +``` + ## Renaming models after the AI Studio rebrand to AI Foundry These should eventually be fixed in the swagger files. ```yaml diff --git a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs index a23847ef0d8c..b3c3e5ba120d 100644 --- a/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/DocumentOperations/VectorSearchTests.cs @@ -13,7 +13,7 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public partial class VectorSearchTests : SearchTestBase { public VectorSearchTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs index 37d687c9f8b9..dc53322054a9 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/DataSourceTests.cs @@ -13,7 +13,7 @@ public class DataSourceTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, null, value, null); + SearchIndexerDataSourceConnection sut = new(null, null, SearchIndexerDataSourceType.AzureBlob, null, null, null, null, null, null, value, null); Assert.AreEqual(expected, sut.ETag?.ToString()); } } diff --git a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs index b71ad556d129..df9bb86a9044 100644 --- a/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/Models/SearchIndexTests.cs @@ -14,7 +14,7 @@ public class SearchIndexTests [TestCase("\"0123abcd\"", "\"0123abcd\"")] public void ParsesETag(string value, string expected) { - SearchIndex sut = new SearchIndex(null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, null, value); + SearchIndex sut = new SearchIndex(null, null, new SearchField[0], null, null, null, null, null, null, null, null, null, null, null, null, null, null, value); Assert.AreEqual(expected, sut.ETag?.ToString()); } diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs index f549cbcb6fae..c1d45d99eb44 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample01_HelloWorld.cs @@ -18,7 +18,7 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_03_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public partial class HelloWorld : SearchTestBase { public HelloWorld(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs index 91590b7da204..69163b99e849 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample07_VectorSearch_SemanticHybridSearch.cs @@ -13,7 +13,7 @@ namespace Azure.Search.Documents.Tests.Samples.VectorSearch { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_03_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public partial class VectorSemanticHybridSearch : SearchTestBase { public VectorSemanticHybridSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs index 9137f20cb867..c5c22f8e69cc 100644 --- a/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs +++ b/sdk/search/Azure.Search.Documents/tests/Samples/Sample08_SemanticSearch.cs @@ -12,7 +12,7 @@ namespace Azure.Search.Documents.Tests.Samples { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_03_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2025_05_01_Preview), ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public partial class SemanticSearch : SearchTestBase { public SemanticSearch(bool async, SearchClientOptions.ServiceVersion serviceVersion) diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs index 80bf4e7dff4c..5225fe96c5ea 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexClientTests.cs @@ -15,7 +15,7 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public class SearchIndexClientTests : SearchTestBase { public SearchIndexClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -109,7 +109,7 @@ static string GetDuplicates(IEnumerable values) } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public async Task GetServiceStatistics() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -132,7 +132,7 @@ public async Task GetServiceStatistics() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public async Task GetIndexStatsSummary() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -161,7 +161,7 @@ public void CreateIndexParameterValidation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public async Task CreateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -196,7 +196,7 @@ public void UpdateIndexParameterValidation() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public async Task UpdateIndex() { await using SearchResources resources = SearchResources.CreateWithNoIndexes(this); @@ -468,7 +468,7 @@ public async Task AnalyzeText() } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public async Task AnalyzeTextWithNormalizer() { await using SearchResources resources = await SearchResources.GetSharedHotelsIndexAsync(this); @@ -531,5 +531,133 @@ public async Task SetScoringProfile() Assert.AreEqual(1, createdIndex.ScoringProfiles.Count); Assert.AreEqual(scoringProfileName, createdIndex.ScoringProfiles[0].Name); } + + [Test] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] + [PlaybackOnly("Running it in the playback mode, eliminating the need for pipelines to create OpenAI resources.")] + public async Task CreateKnowledgeAgent() + { + await using SearchResources resources = await SearchResources.CreateWithHotelsIndexAsync(this); + + string deploymentName = "gpt-4.1"; + SearchIndexClient client = resources.GetIndexClient(); + var knowledgeAgentName = Recording.Random.GetName(8); + + var knowledgeAgent = new KnowledgeAgent( + knowledgeAgentName, + new List{ + new KnowledgeAgentAzureOpenAIModel( + new AzureOpenAIVectorizerParameters + { + ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), + ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), + DeploymentName = deploymentName, + ModelName = AzureOpenAIModelName.Gpt41 + }) + }, + new List + { + new KnowledgeAgentTargetIndex(resources.IndexName), + }); + + KnowledgeAgent actualAgent = await client.CreateKnowledgeAgentAsync(knowledgeAgent); + KnowledgeAgent expectedAgent = knowledgeAgent; + + Assert.AreEqual(expectedAgent.Name, actualAgent.Name); + Assert.That(actualAgent.Models, Is.EqualTo(expectedAgent.Models).Using(KnowledgeAgentModelComparer.Instance)); + Assert.That(actualAgent.TargetIndexes, Is.EqualTo(expectedAgent.TargetIndexes).Using(KnowledgeAgentTargetIndexComparer.Instance)); + + await client.DeleteKnowledgeAgentAsync(knowledgeAgentName); + } + + [Test] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] + [PlaybackOnly("Running it in the playback mode, eliminating the need for pipelines to create OpenAI resources.")] + public async Task DeleteKnowledgeAgent() + { + await using SearchResources resources = await SearchResources.CreateWithknowledgeAgentAsync(this); + SearchIndexClient client = resources.GetIndexClient(); + + await client.DeleteKnowledgeAgentAsync(resources.KnowledgeAgentName); + + var ex = Assert.ThrowsAsync(async () => + { + await client.GetKnowledgeAgentAsync(resources.KnowledgeAgentName); + }); + + Assert.AreEqual(404, ex.Status); + } + + [Test] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] + [PlaybackOnly("Running it in the playback mode, eliminating the need for pipelines to create OpenAI resources.")] + public async Task UpdateKnowledgeAgent() + { + await using SearchResources resources = await SearchResources.CreateWithHotelsIndexAsync(this); + + string deploymentName = "gpt-4.1"; + SearchIndexClient client = resources.GetIndexClient(); + var knowledgeAgentName = Recording.Random.GetName(8); + + var knowledgeAgent = new KnowledgeAgent( + knowledgeAgentName, + new List{ + new KnowledgeAgentAzureOpenAIModel( + new AzureOpenAIVectorizerParameters + { + ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), + ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), + DeploymentName = deploymentName, + ModelName = AzureOpenAIModelName.Gpt41 + }) + }, + new List + { + new KnowledgeAgentTargetIndex(resources.IndexName), + } + ); + + KnowledgeAgent createdAgent = await client.CreateKnowledgeAgentAsync(knowledgeAgent); + createdAgent.Description = "Updated description"; + KnowledgeAgent updatedAgent = await client.CreateOrUpdateKnowledgeAgentAsync(createdAgent); + + Assert.AreEqual(createdAgent.Name, updatedAgent.Name); + Assert.AreEqual(createdAgent.Description, updatedAgent.Description); + Assert.That(createdAgent.Models, Is.EqualTo(updatedAgent.Models).Using(KnowledgeAgentModelComparer.Instance)); + Assert.That(createdAgent.TargetIndexes, Is.EqualTo(updatedAgent.TargetIndexes).Using(KnowledgeAgentTargetIndexComparer.Instance)); + + await client.DeleteKnowledgeAgentAsync(updatedAgent.Name); + } + + [Test] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] + [PlaybackOnly("Running it in the playback mode, eliminating the need for pipelines to create OpenAI resources.")] + public async Task GetKnowledgeAgent() + { + await using SearchResources resources = await SearchResources.CreateWithknowledgeAgentAsync(this); + + SearchIndexClient client = resources.GetIndexClient(); + KnowledgeAgent agent = await client.GetKnowledgeAgentAsync(resources.KnowledgeAgentName); + + Assert.AreEqual(resources.KnowledgeAgentName, agent.Name); + } + + [Test] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] + [PlaybackOnly("Running it in the playback mode, eliminating the need for pipelines to create OpenAI resources.")] + public async Task GetKnowledgeAgents() + { + await using SearchResources resources = await SearchResources.CreateWithknowledgeAgentAsync(this); + + SearchIndexClient client = resources.GetIndexClient(); + + bool found = false; + await foreach (KnowledgeAgent agent in client.GetKnowledgeAgentsAsync()) + { + found |= string.Equals(resources.KnowledgeAgentName, agent.Name, StringComparison.InvariantCultureIgnoreCase); + } + + Assert.IsTrue(found, "Knowledge agent not found"); + } } } diff --git a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs index 3ec91a32b739..d92647407dd8 100644 --- a/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs +++ b/sdk/search/Azure.Search.Documents/tests/SearchIndexerClientTests.cs @@ -13,7 +13,7 @@ namespace Azure.Search.Documents.Tests { - [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ClientTestFixture(SearchClientOptions.ServiceVersion.V2024_07_01, SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] public class SearchIndexerClientTests : SearchTestBase { public SearchIndexerClientTests(bool async, SearchClientOptions.ServiceVersion serviceVersion) @@ -632,7 +632,7 @@ private async Task TestSkillsetAsync(SearchIndexerClient client, SearchIndexerSk } [Test] - [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_03_01_Preview)] + [ServiceVersion(Min = SearchClientOptions.ServiceVersion.V2025_05_01_Preview)] [LiveOnly(Reason = "https://github.com/Azure/azure-sdk-for-net/issues/48588")] public async Task RoundtripAllSkills() { diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentModelComparer.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentModelComparer.cs new file mode 100644 index 000000000000..f8a7f3db1761 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentModelComparer.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Tests +{ + public class KnowledgeAgentModelComparer : IEqualityComparer + { + public static KnowledgeAgentModelComparer Instance { get; } = new KnowledgeAgentModelComparer(); + + private KnowledgeAgentModelComparer() + { + } + + public bool Equals(KnowledgeAgentModel x, KnowledgeAgentModel y) + { + if (ReferenceEquals(x, y)) + { + return true; + } + else if (x is null || y is null) + { + return false; + } + + if (x is KnowledgeAgentAzureOpenAIModel xModel && + y is KnowledgeAgentAzureOpenAIModel yModel) + { + var xParams = xModel.AzureOpenAIParameters; + var yParams = yModel.AzureOpenAIParameters; + + return xParams.DeploymentName == yParams.DeploymentName && + xParams.ModelName == yParams.ModelName; + } + + return false; + } + + public int GetHashCode(KnowledgeAgentModel obj) + { + if (obj is null) + { + return 0; + } + + if (obj is KnowledgeAgentAzureOpenAIModel model) + { + var parameters = model.AzureOpenAIParameters; + var builder = new HashCodeBuilder(); + + builder.Add(parameters.DeploymentName); + builder.Add(parameters.ModelName); + + return builder.ToHashCode(); + } + + return 0; + } + } +} diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentTargetIndexComparer.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentTargetIndexComparer.cs new file mode 100644 index 000000000000..159e22afa000 --- /dev/null +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/KnowledgeAgentTargetIndexComparer.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using Azure.Core; +using Azure.Search.Documents.Indexes.Models; + +namespace Azure.Search.Documents.Tests +{ + public class KnowledgeAgentTargetIndexComparer : IEqualityComparer + { + public static KnowledgeAgentTargetIndexComparer Instance { get; } = new KnowledgeAgentTargetIndexComparer(); + + private KnowledgeAgentTargetIndexComparer() + { + } + + public bool Equals(KnowledgeAgentTargetIndex x, KnowledgeAgentTargetIndex y) + { + if (ReferenceEquals(x, y)) + { + return true; + } + else if (x is null || y is null) + { + return false; + } + + return x.IndexName == y.IndexName; + } + + public int GetHashCode(KnowledgeAgentTargetIndex obj) + { + if (obj is null) + { + return 0; + } + + HashCodeBuilder builder = new HashCodeBuilder(); + builder.Add(obj.IndexName); + + return builder.ToHashCode(); + } + } +} diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs index df40a91bdc53..eb08e9a58852 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.Data.cs @@ -87,6 +87,7 @@ internal static SearchIndex GetHotelIndex(string name) => }, SemanticSearch = new() { + DefaultConfigurationName = "my-semantic-config", Configurations = { new SemanticConfiguration("my-semantic-config", new() diff --git a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs index e9249b9de9a7..555a64610c3a 100644 --- a/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs +++ b/sdk/search/Azure.Search.Documents/tests/Utilities/SearchResources.cs @@ -98,6 +98,20 @@ public string IndexName } private string _indexName = null; + /// + /// The name of the knowledge agent created for test data. + /// + public string KnowledgeAgentName + { + get => TestFixture.Recording.GetVariable("KnowledgeAgentName", _agentName); + set + { + TestFixture.Recording.SetVariable("KnowledgeAgentName", value); + _agentName = value; + } + } + private string _agentName = null; + /// /// The search endpoint suffix. /// @@ -125,6 +139,12 @@ public string IndexName /// public bool RequiresCleanup { get; private set; } + /// + /// Flag indicating whether these knowledge agent resources need to be cleaned up. + /// This is true for any knowledge agent resources that we created. + /// + public bool RequiresKnowledgeAgentCleanup { get; private set; } + /// /// Flag indicating whether these storage resources need to be cleaned up. /// This is true for any storage resources that we created. @@ -219,6 +239,23 @@ public static async Task CreateWithHotelsIndexAsync(SearchTestB return resources; } + /// + /// Creates a new Search Service resource, including a Hotel index and sample data set. + /// The index schema and data are defined in TestResources.Data.cs. + /// The created index is used in knowledge agent creation. + /// + /// + /// The TestFixture with context about our current test run, + /// recordings, instrumentation, etc. + /// + /// A new TestResources context. + public static async Task CreateWithknowledgeAgentAsync(SearchTestBase fixture, bool isSample = false) + { + var resources = new SearchResources(fixture); + await resources.CreateKnowledgeAgentAsync(); + return resources; + } + /// /// Creates a new Search service resources with sample data /// loaded into a new blob container but no index. @@ -394,6 +431,7 @@ public SearchClient GetQueryClient(SearchClientOptions options = null) /// longer needed. /// public async ValueTask DisposeAsync() => await Task.WhenAll( + DeleteKnowledgeAgentAsync(), DeleteIndexAsync(), DeleteBlobContainerAsync()); @@ -413,6 +451,22 @@ private async Task DeleteIndexAsync() } } + /// + /// Deletes the knowledge agent created as a test resource. + /// + /// + private async Task DeleteKnowledgeAgentAsync() + { + if (RequiresKnowledgeAgentCleanup && !string.IsNullOrEmpty(KnowledgeAgentName)) + { + SearchIndexClient client = GetIndexClient(); + await client.DeleteKnowledgeAgentAsync(KnowledgeAgentName); + RequiresKnowledgeAgentCleanup = false; + + await WaitForKnowledgeAgentDeletionAsync(); + } + } + /// /// Delete the Storage blob container created as a test resource. /// @@ -489,6 +543,50 @@ private async Task CreateSearchServiceIndexAndDocumentsAsync(bo return this; } + /// + /// Create a new index and knowledge agent. + /// + /// This TestResources context. + private async Task CreateKnowledgeAgentAsync(bool isSample = false) + { + // Create index and upload documents + await CreateSearchServiceIndexAndDocumentsAsync(isSample); + + // Create the knowledge agent + if (TestFixture.Mode != RecordedTestMode.Playback) + { + // Generate a random knowledge agent Name + KnowledgeAgentName = Random.GetName(8); + string deploymentName = "gpt-4.1"; + + var knowledgeAgent = new KnowledgeAgent( + KnowledgeAgentName, + new List{ + new KnowledgeAgentAzureOpenAIModel( + new AzureOpenAIVectorizerParameters + { + ResourceUri = new Uri(Environment.GetEnvironmentVariable("OPENAI_ENDPOINT")), + ApiKey = Environment.GetEnvironmentVariable("OPENAI_KEY"), + DeploymentName = deploymentName, + ModelName = AzureOpenAIModelName.Gpt41 + }) + }, + new List + { + new KnowledgeAgentTargetIndex(IndexName), + }); + + SearchIndexClient client = new SearchIndexClient(Endpoint, new AzureKeyCredential(PrimaryApiKey)); + await client.CreateKnowledgeAgentAsync(knowledgeAgent); + RequiresKnowledgeAgentCleanup = true; + + // Give the knowledge agent time to stabilize before running tests. + await WaitForKnowledgeAgentCreationAsync(); + } + + return this; + } + /// /// Upload to a new blob storage container identified by . /// @@ -607,6 +705,20 @@ public async Task WaitForBlobContainerDeletionAsync() => public async Task WaitForIndexingAsync() => await TestFixture.DelayAsync(TimeSpan.FromSeconds(2)); + /// + /// Wait for knowledge agent creation. + /// + /// A Task to await. + public async Task WaitForKnowledgeAgentCreationAsync() => + await TestFixture.DelayAsync(TimeSpan.FromSeconds(2)); + + /// + /// Wait for the knowledge agent to be deleted. + /// + /// A Task to await. + public async Task WaitForKnowledgeAgentDeletionAsync() => + await TestFixture.DelayAsync(TimeSpan.FromSeconds(5)); + /// /// Wait for the synonym map to be updated. /// diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln new file mode 100644 index 000000000000..317677ff72eb --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Azure.ResourceManager.SecretsStoreExtension.sln @@ -0,0 +1,65 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30309.148 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.SecretsStoreExtension", "src\Azure.ResourceManager.SecretsStoreExtension.csproj", "{C793426F-B111-483F-8E86-155DBEA4CDA1}" +EndProject +Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.SecretsStoreExtension.Tests", "tests\Azure.ResourceManager.SecretsStoreExtension.Tests.csproj", "{B47075CB-602A-4CD4-A474-1E21D0A295DA}" +EndProject +Project("{D0FBE41C-560C-4177-BE60-69FED9C45138}") = "Azure.ResourceManager.SecretsStoreExtension.Samples", "samples\Azure.ResourceManager.SecretsStoreExtension.Samples.csproj", "{CFC694E3-252D-4AC4-A53C-107ED087F500}" +EndProject +Global + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6CD688A0-647E-4FCE-8F68-2C1EF662EAF9} + 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 + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|x64.ActiveCfg = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|x64.Build.0 = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|x86.ActiveCfg = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Debug|x86.Build.0 = Debug|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|Any CPU.Build.0 = Release|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|x64.ActiveCfg = Release|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|x64.Build.0 = Release|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|x86.ActiveCfg = Release|Any CPU + {C793426F-B111-483F-8E86-155DBEA4CDA1}.Release|x86.Build.0 = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|x64.ActiveCfg = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|x64.Build.0 = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|x86.ActiveCfg = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Debug|x86.Build.0 = Debug|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|Any CPU.Build.0 = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|x64.ActiveCfg = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|x64.Build.0 = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|x86.ActiveCfg = Release|Any CPU + {B47075CB-602A-4CD4-A474-1E21D0A295DA}.Release|x86.Build.0 = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|x64.ActiveCfg = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|x64.Build.0 = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|x86.ActiveCfg = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Debug|x86.Build.0 = Debug|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|Any CPU.Build.0 = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|x64.ActiveCfg = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|x64.Build.0 = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|x86.ActiveCfg = Release|Any CPU + {CFC694E3-252D-4AC4-A53C-107ED087F500}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/CHANGELOG.md b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/CHANGELOG.md new file mode 100644 index 000000000000..c09f967ba331 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/CHANGELOG.md @@ -0,0 +1,27 @@ +# Release History + +## 1.0.0-beta.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0-beta.1 (2025-05-22) + +### 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). diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Directory.Build.props b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Directory.Build.props new file mode 100644 index 000000000000..1a9611bd4924 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/Directory.Build.props @@ -0,0 +1,6 @@ + + + + diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/README.md b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/README.md new file mode 100644 index 000000000000..4dc5795fdf22 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/README.md @@ -0,0 +1,80 @@ +# Microsoft Azure Secrets Store Extension management client library for .NET + +The Azure Key Vault Secret Store extension for Kubernetes ("SSE") automatically synchronizes secrets from an Azure Key Vault to an Azure Arc-enabled Kubernetes cluster for offline access. + +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 Secrets Store Extension management library for .NET with [NuGet](https://www.nuget.org/): + +```dotnetcli +dotnet add package Azure.ResourceManager.SecretsStoreExtension --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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.net8.0.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.net8.0.cs new file mode 100644 index 000000000000..479a47d73e5a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.net8.0.cs @@ -0,0 +1,352 @@ +namespace Azure.ResourceManager.SecretsStoreExtension +{ + public partial class AzureResourceManagerSecretsStoreExtensionContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerSecretsStoreExtensionContext() { } + public static Azure.ResourceManager.SecretsStoreExtension.AzureResourceManagerSecretsStoreExtensionContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class KeyVaultSecretProviderClassCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected KeyVaultSecretProviderClassCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string azureKeyVaultSecretProviderClassName, Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string azureKeyVaultSecretProviderClassName, Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string azureKeyVaultSecretProviderClassName, 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 azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string azureKeyVaultSecretProviderClassName, 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 KeyVaultSecretProviderClassData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected KeyVaultSecretProviderClassResource() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData 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 azureKeyVaultSecretProviderClassName) { 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.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class SecretsStoreExtensionExtensions + { + public static Azure.Response GetKeyVaultSecretProviderClass(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetKeyVaultSecretProviderClassAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetKeyVaultSecretProviderClasses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetKeyVaultSecretProviderClassesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetSecretSync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSecretSyncAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncResource GetSecretSyncResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncCollection GetSecretSyncs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSecretSyncs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSecretSyncsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SecretSyncCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SecretSyncCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string secretSyncName, Azure.ResourceManager.SecretsStoreExtension.SecretSyncData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string secretSyncName, Azure.ResourceManager.SecretsStoreExtension.SecretSyncData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string secretSyncName, 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 secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string secretSyncName, 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 SecretSyncData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SecretSyncResource() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncData 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 secretSyncName) { 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.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.SecretsStoreExtension.Models.SecretSyncPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SecretsStoreExtension.Mocking +{ + public partial class MockableSecretsStoreExtensionArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionArmClient() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncResource GetSecretSyncResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSecretsStoreExtensionResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionResourceGroupResource() { } + public virtual Azure.Response GetKeyVaultSecretProviderClass(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetKeyVaultSecretProviderClassAsync(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses() { throw null; } + public virtual Azure.Response GetSecretSync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSecretSyncAsync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncCollection GetSecretSyncs() { throw null; } + } + public partial class MockableSecretsStoreExtensionSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionSubscriptionResource() { } + public virtual Azure.Pageable GetKeyVaultSecretProviderClasses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetKeyVaultSecretProviderClassesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSecretSyncs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSecretSyncsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public static partial class ArmSecretsStoreExtensionModelFactory + { + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData KeyVaultSecretProviderClassData(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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties KeyVaultSecretProviderClassProperties(string keyvaultName = null, System.Guid clientId = default(System.Guid), System.Guid tenantId = default(System.Guid), string objects = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? provisioningState = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncCondition SecretSyncCondition(System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), string message = null, long? observedGeneration = default(long?), string reason = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType status = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType), string type = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncData SecretSyncData(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.SecretsStoreExtension.Models.SecretSyncProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties SecretSyncProperties(string secretProviderClassName = null, string serviceAccountName = null, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType kubernetesSecretType = default(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType), string forceSynchronization = null, System.Collections.Generic.IEnumerable objectSecretMapping = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus status = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? provisioningState = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus SecretSyncStatus(System.DateTimeOffset? lastSuccessfulSyncOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable conditions = null) { throw null; } + } + public partial class AzureKeyVaultSecretProviderClassUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureKeyVaultSecretProviderClassUpdateProperties() { } + public System.Guid? ClientId { get { throw null; } set { } } + public string KeyvaultName { get { throw null; } set { } } + public string Objects { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassPatch() { } + public Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties 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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassProperties(string keyvaultName, System.Guid clientId, System.Guid tenantId) { } + public System.Guid ClientId { get { throw null; } set { } } + public string KeyvaultName { get { throw null; } set { } } + public string Objects { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? ProvisioningState { get { throw null; } } + public System.Guid TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KubernetesSecretObjectMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KubernetesSecretObjectMapping(string sourcePath, string targetKey) { } + public string SourcePath { get { throw null; } set { } } + public string TargetKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretObjectMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretObjectMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 KubernetesSecretType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesSecretType(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType Opaque { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType Tls { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType 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.SecretsStoreExtension.Models.KubernetesSecretType left, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType left, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecretsStoreExtensionProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecretsStoreExtensionProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState 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.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SecretSyncCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretSyncCondition() { } + public System.DateTimeOffset? LastTransitionOn { get { throw null; } } + public string Message { get { throw null; } } + public long? ObservedGeneration { get { throw null; } } + public string Reason { get { throw null; } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType Status { 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.SecretsStoreExtension.Models.SecretSyncCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 SecretSyncConditionStatusType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecretSyncConditionStatusType(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType False { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType True { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType 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.SecretsStoreExtension.Models.SecretSyncConditionStatusType left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SecretSyncPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncPatch() { } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties 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.SecretsStoreExtension.Models.SecretSyncPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncProperties(string secretProviderClassName, string serviceAccountName, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType kubernetesSecretType, System.Collections.Generic.IEnumerable objectSecretMapping) { } + public string ForceSynchronization { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType KubernetesSecretType { get { throw null; } set { } } + public System.Collections.Generic.IList ObjectSecretMapping { get { throw null; } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? ProvisioningState { get { throw null; } } + public string SecretProviderClassName { get { throw null; } set { } } + public string ServiceAccountName { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretSyncStatus() { } + public System.Collections.Generic.IReadOnlyList Conditions { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulSyncOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncUpdateProperties() { } + public string ForceSynchronization { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType? KubernetesSecretType { get { throw null; } set { } } + public System.Collections.Generic.IList ObjectSecretMapping { get { throw null; } } + public string SecretProviderClassName { get { throw null; } set { } } + public string ServiceAccountName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.netstandard2.0.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.netstandard2.0.cs new file mode 100644 index 000000000000..479a47d73e5a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/api/Azure.ResourceManager.SecretsStoreExtension.netstandard2.0.cs @@ -0,0 +1,352 @@ +namespace Azure.ResourceManager.SecretsStoreExtension +{ + public partial class AzureResourceManagerSecretsStoreExtensionContext : System.ClientModel.Primitives.ModelReaderWriterContext + { + internal AzureResourceManagerSecretsStoreExtensionContext() { } + public static Azure.ResourceManager.SecretsStoreExtension.AzureResourceManagerSecretsStoreExtensionContext Default { get { throw null; } } + protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } + } + public partial class KeyVaultSecretProviderClassCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected KeyVaultSecretProviderClassCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string azureKeyVaultSecretProviderClassName, Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string azureKeyVaultSecretProviderClassName, Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string azureKeyVaultSecretProviderClassName, 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 azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string azureKeyVaultSecretProviderClassName, 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 KeyVaultSecretProviderClassData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected KeyVaultSecretProviderClassResource() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData 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 azureKeyVaultSecretProviderClassName) { 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.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public static partial class SecretsStoreExtensionExtensions + { + public static Azure.Response GetKeyVaultSecretProviderClass(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetKeyVaultSecretProviderClassAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetKeyVaultSecretProviderClasses(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetKeyVaultSecretProviderClassesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.Response GetSecretSync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> GetSecretSyncAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncResource GetSecretSyncResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncCollection GetSecretSyncs(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } + public static Azure.Pageable GetSecretSyncs(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetSecretSyncsAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class SecretSyncCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SecretSyncCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string secretSyncName, Azure.ResourceManager.SecretsStoreExtension.SecretSyncData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string secretSyncName, Azure.ResourceManager.SecretsStoreExtension.SecretSyncData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string secretSyncName, 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 secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string secretSyncName, 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 SecretSyncData : Azure.ResourceManager.Models.TrackedResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncData(Azure.Core.AzureLocation location) { } + public Azure.ResourceManager.Resources.Models.ExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SecretSyncResource() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncData 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 secretSyncName) { 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.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.SecretSyncData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.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.SecretsStoreExtension.Models.SecretSyncPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SecretsStoreExtension.Mocking +{ + public partial class MockableSecretsStoreExtensionArmClient : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionArmClient() { } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncResource GetSecretSyncResource(Azure.Core.ResourceIdentifier id) { throw null; } + } + public partial class MockableSecretsStoreExtensionResourceGroupResource : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionResourceGroupResource() { } + public virtual Azure.Response GetKeyVaultSecretProviderClass(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetKeyVaultSecretProviderClassAsync(string azureKeyVaultSecretProviderClassName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses() { throw null; } + public virtual Azure.Response GetSecretSync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSecretSyncAsync(string secretSyncName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.SecretsStoreExtension.SecretSyncCollection GetSecretSyncs() { throw null; } + } + public partial class MockableSecretsStoreExtensionSubscriptionResource : Azure.ResourceManager.ArmResource + { + protected MockableSecretsStoreExtensionSubscriptionResource() { } + public virtual Azure.Pageable GetKeyVaultSecretProviderClasses(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetKeyVaultSecretProviderClassesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetSecretSyncs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetSecretSyncsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } +} +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public static partial class ArmSecretsStoreExtensionModelFactory + { + public static Azure.ResourceManager.SecretsStoreExtension.KeyVaultSecretProviderClassData KeyVaultSecretProviderClassData(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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties KeyVaultSecretProviderClassProperties(string keyvaultName = null, System.Guid clientId = default(System.Guid), System.Guid tenantId = default(System.Guid), string objects = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? provisioningState = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncCondition SecretSyncCondition(System.DateTimeOffset? lastTransitionOn = default(System.DateTimeOffset?), string message = null, long? observedGeneration = default(long?), string reason = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType status = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType), string type = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.SecretSyncData SecretSyncData(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.SecretsStoreExtension.Models.SecretSyncProperties properties = null, Azure.ResourceManager.Resources.Models.ExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties SecretSyncProperties(string secretProviderClassName = null, string serviceAccountName = null, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType kubernetesSecretType = default(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType), string forceSynchronization = null, System.Collections.Generic.IEnumerable objectSecretMapping = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus status = null, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? provisioningState = default(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState?)) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus SecretSyncStatus(System.DateTimeOffset? lastSuccessfulSyncOn = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable conditions = null) { throw null; } + } + public partial class AzureKeyVaultSecretProviderClassUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AzureKeyVaultSecretProviderClassUpdateProperties() { } + public System.Guid? ClientId { get { throw null; } set { } } + public string KeyvaultName { get { throw null; } set { } } + public string Objects { get { throw null; } set { } } + public System.Guid? TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassPatch() { } + public Azure.ResourceManager.SecretsStoreExtension.Models.AzureKeyVaultSecretProviderClassUpdateProperties 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.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KeyVaultSecretProviderClassProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KeyVaultSecretProviderClassProperties(string keyvaultName, System.Guid clientId, System.Guid tenantId) { } + public System.Guid ClientId { get { throw null; } set { } } + public string KeyvaultName { get { throw null; } set { } } + public string Objects { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? ProvisioningState { get { throw null; } } + public System.Guid TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KeyVaultSecretProviderClassProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class KubernetesSecretObjectMapping : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public KubernetesSecretObjectMapping(string sourcePath, string targetKey) { } + public string SourcePath { get { throw null; } set { } } + public string TargetKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretObjectMapping System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretObjectMapping System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 KubernetesSecretType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public KubernetesSecretType(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType Opaque { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType Tls { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType 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.SecretsStoreExtension.Models.KubernetesSecretType left, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType left, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SecretsStoreExtensionProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecretsStoreExtensionProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Canceled { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState Succeeded { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState 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.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SecretSyncCondition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretSyncCondition() { } + public System.DateTimeOffset? LastTransitionOn { get { throw null; } } + public string Message { get { throw null; } } + public long? ObservedGeneration { get { throw null; } } + public string Reason { get { throw null; } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType Status { 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.SecretsStoreExtension.Models.SecretSyncCondition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncCondition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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 SecretSyncConditionStatusType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SecretSyncConditionStatusType(string value) { throw null; } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType False { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType True { get { throw null; } } + public static Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType Unknown { get { throw null; } } + public bool Equals(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType 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.SecretsStoreExtension.Models.SecretSyncConditionStatusType left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType right) { throw null; } + public static implicit operator Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType left, Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncConditionStatusType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class SecretSyncPatch : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncPatch() { } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties 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.SecretsStoreExtension.Models.SecretSyncPatch System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncPatch System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncProperties(string secretProviderClassName, string serviceAccountName, Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType kubernetesSecretType, System.Collections.Generic.IEnumerable objectSecretMapping) { } + public string ForceSynchronization { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType KubernetesSecretType { get { throw null; } set { } } + public System.Collections.Generic.IList ObjectSecretMapping { get { throw null; } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretsStoreExtensionProvisioningState? ProvisioningState { get { throw null; } } + public string SecretProviderClassName { get { throw null; } set { } } + public string ServiceAccountName { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus Status { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncStatus : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal SecretSyncStatus() { } + public System.Collections.Generic.IReadOnlyList Conditions { get { throw null; } } + public System.DateTimeOffset? LastSuccessfulSyncOn { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncStatus System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SecretSyncUpdateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SecretSyncUpdateProperties() { } + public string ForceSynchronization { get { throw null; } set { } } + public Azure.ResourceManager.SecretsStoreExtension.Models.KubernetesSecretType? KubernetesSecretType { get { throw null; } set { } } + public System.Collections.Generic.IList ObjectSecretMapping { get { throw null; } } + public string SecretProviderClassName { get { throw null; } set { } } + public string ServiceAccountName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.SecretsStoreExtension.Models.SecretSyncUpdateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/assets.json b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/assets.json new file mode 100644 index 000000000000..09ae9d3d17b0 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/assets.json @@ -0,0 +1,6 @@ +{ + "AssetsRepo": "Azure/azure-sdk-assets", + "AssetsRepoPrefixPath": "net", + "TagPrefix": "net/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension", + "Tag": "net/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension_c20d94f6bc" +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj new file mode 100644 index 000000000000..398d1d482aec --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Azure.ResourceManager.SecretsStoreExtension.Samples.csproj @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs new file mode 100644 index 000000000000..02753c4d267f --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassCollection.cs @@ -0,0 +1,208 @@ +// 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 Azure.ResourceManager.SecretsStoreExtension.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Samples +{ + public partial class Sample_KeyVaultSecretProviderClassCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AzureKeyVaultSecretProviderClassesCreateOrUpdate() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this KeyVaultSecretProviderClassResource + KeyVaultSecretProviderClassCollection collection = resourceGroupResource.GetKeyVaultSecretProviderClasses(); + + // invoke the operation + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + KeyVaultSecretProviderClassData data = new KeyVaultSecretProviderClassData(new AzureLocation("eastus")) + { + Properties = new KeyVaultSecretProviderClassProperties("example-ssc-key-vault", Guid.Parse("00000000-0000-0000-0000-000000000000"), Guid.Parse("00000000-0000-0000-0000-000000000000")) + { + Objects = "array: |\n - |\n objectName: my-secret-object\n objectType: secret\n objectVersionHistory: 1", + }, + ExtendedLocation = new ExtendedLocation + { + Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-ssc-example/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location", + }, + Tags = +{ +["example-tag"] = "example-tag-value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, azureKeyVaultSecretProviderClassName, data); + KeyVaultSecretProviderClassResource 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 + KeyVaultSecretProviderClassData 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_AzureKeyVaultSecretProviderClassesGet() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this KeyVaultSecretProviderClassResource + KeyVaultSecretProviderClassCollection collection = resourceGroupResource.GetKeyVaultSecretProviderClasses(); + + // invoke the operation + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + KeyVaultSecretProviderClassResource result = await collection.GetAsync(azureKeyVaultSecretProviderClassName); + + // 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 + KeyVaultSecretProviderClassData 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_AzureKeyVaultSecretProviderClassesListByResourceGroup() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this KeyVaultSecretProviderClassResource + KeyVaultSecretProviderClassCollection collection = resourceGroupResource.GetKeyVaultSecretProviderClasses(); + + // invoke the operation and iterate over the result + await foreach (KeyVaultSecretProviderClassResource 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 + KeyVaultSecretProviderClassData 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_AzureKeyVaultSecretProviderClassesGet() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this KeyVaultSecretProviderClassResource + KeyVaultSecretProviderClassCollection collection = resourceGroupResource.GetKeyVaultSecretProviderClasses(); + + // invoke the operation + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + bool result = await collection.ExistsAsync(azureKeyVaultSecretProviderClassName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AzureKeyVaultSecretProviderClassesGet() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this KeyVaultSecretProviderClassResource + KeyVaultSecretProviderClassCollection collection = resourceGroupResource.GetKeyVaultSecretProviderClasses(); + + // invoke the operation + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + NullableResponse response = await collection.GetIfExistsAsync(azureKeyVaultSecretProviderClassName); + KeyVaultSecretProviderClassResource 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 + KeyVaultSecretProviderClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs new file mode 100644 index 000000000000..a83ead68c7ee --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_KeyVaultSecretProviderClassResource.cs @@ -0,0 +1,120 @@ +// 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.SecretsStoreExtension.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Samples +{ + public partial class Sample_KeyVaultSecretProviderClassResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AzureKeyVaultSecretProviderClassesGet() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this KeyVaultSecretProviderClassResource created on azure + // for more information of creating KeyVaultSecretProviderClassResource, please refer to the document of KeyVaultSecretProviderClassResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + ResourceIdentifier keyVaultSecretProviderClassResourceId = KeyVaultSecretProviderClassResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + KeyVaultSecretProviderClassResource keyVaultSecretProviderClass = client.GetKeyVaultSecretProviderClassResource(keyVaultSecretProviderClassResourceId); + + // invoke the operation + KeyVaultSecretProviderClassResource result = await keyVaultSecretProviderClass.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 + KeyVaultSecretProviderClassData 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_AzureKeyVaultSecretProviderClassesDelete() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_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 KeyVaultSecretProviderClassResource created on azure + // for more information of creating KeyVaultSecretProviderClassResource, please refer to the document of KeyVaultSecretProviderClassResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + ResourceIdentifier keyVaultSecretProviderClassResourceId = KeyVaultSecretProviderClassResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + KeyVaultSecretProviderClassResource keyVaultSecretProviderClass = client.GetKeyVaultSecretProviderClassResource(keyVaultSecretProviderClassResourceId); + + // invoke the operation + await keyVaultSecretProviderClass.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AzureKeyVaultSecretProviderClassesUpdate() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_Update_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_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 KeyVaultSecretProviderClassResource created on azure + // for more information of creating KeyVaultSecretProviderClassResource, please refer to the document of KeyVaultSecretProviderClassResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string azureKeyVaultSecretProviderClassName = "akvspc-ssc-example"; + ResourceIdentifier keyVaultSecretProviderClassResourceId = KeyVaultSecretProviderClassResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + KeyVaultSecretProviderClassResource keyVaultSecretProviderClass = client.GetKeyVaultSecretProviderClassResource(keyVaultSecretProviderClassResourceId); + + // invoke the operation + KeyVaultSecretProviderClassPatch patch = new KeyVaultSecretProviderClassPatch + { + Tags = +{ +["example-tag"] = "example-tag-value" +}, + Properties = new AzureKeyVaultSecretProviderClassUpdateProperties + { + KeyvaultName = "example-ssc-key-vault", + ClientId = Guid.Parse("00000000-0000-0000-0000-000000000000"), + TenantId = Guid.Parse("00000000-0000-0000-0000-000000000000"), + Objects = "array: |\n - |\n objectName: my-secret-object\n objectType: secret\n objectVersionHistory: 1", + }, + }; + ArmOperation lro = await keyVaultSecretProviderClass.UpdateAsync(WaitUntil.Completed, patch); + KeyVaultSecretProviderClassResource 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 + KeyVaultSecretProviderClassData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncCollection.cs new file mode 100644 index 000000000000..d778174dd80a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncCollection.cs @@ -0,0 +1,208 @@ +// 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 Azure.ResourceManager.SecretsStoreExtension.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Samples +{ + public partial class Sample_SecretSyncCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_SecretSyncsCreateOrUpdate() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SecretSyncResource + SecretSyncCollection collection = resourceGroupResource.GetSecretSyncs(); + + // invoke the operation + string secretSyncName = "secretsync-ssc-example"; + SecretSyncData data = new SecretSyncData(new AzureLocation("eastus")) + { + Properties = new SecretSyncProperties("akvspc-ssc-example", "example-k8s-sa-name", KubernetesSecretType.Opaque, new KubernetesSecretObjectMapping[] + { +new KubernetesSecretObjectMapping("kv-secret-name/0", "kv-secret-name/0") + }), + ExtendedLocation = new ExtendedLocation + { + Name = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg-ssc-example/providers/Microsoft.ExtendedLocation/customLocations/example-custom-location", + }, + Tags = +{ +["example-tag"] = "example-tag-value" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, secretSyncName, data); + SecretSyncResource 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 + SecretSyncData 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_SecretSyncsGet() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SecretSyncResource + SecretSyncCollection collection = resourceGroupResource.GetSecretSyncs(); + + // invoke the operation + string secretSyncName = "secretsync-ssc-example"; + SecretSyncResource result = await collection.GetAsync(secretSyncName); + + // 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 + SecretSyncData 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_SecretSyncsListByResourceGroup() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_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 = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SecretSyncResource + SecretSyncCollection collection = resourceGroupResource.GetSecretSyncs(); + + // invoke the operation and iterate over the result + await foreach (SecretSyncResource 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 + SecretSyncData 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_SecretSyncsGet() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SecretSyncResource + SecretSyncCollection collection = resourceGroupResource.GetSecretSyncs(); + + // invoke the operation + string secretSyncName = "secretsync-ssc-example"; + bool result = await collection.ExistsAsync(secretSyncName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_SecretSyncsGet() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/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 = "rg-ssc-example"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this SecretSyncResource + SecretSyncCollection collection = resourceGroupResource.GetSecretSyncs(); + + // invoke the operation + string secretSyncName = "secretsync-ssc-example"; + NullableResponse response = await collection.GetIfExistsAsync(secretSyncName); + SecretSyncResource 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 + SecretSyncData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncResource.cs new file mode 100644 index 000000000000..91beb50cc454 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SecretSyncResource.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.SecretsStoreExtension.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Samples +{ + public partial class Sample_SecretSyncResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_SecretSyncsGet() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Get_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SecretSyncResource created on azure + // for more information of creating SecretSyncResource, please refer to the document of SecretSyncResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string secretSyncName = "secretsync-ssc-example"; + ResourceIdentifier secretSyncResourceId = SecretSyncResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, secretSyncName); + SecretSyncResource secretSync = client.GetSecretSyncResource(secretSyncResourceId); + + // invoke the operation + SecretSyncResource result = await secretSync.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 + SecretSyncData 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_SecretSyncsDelete() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_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 SecretSyncResource created on azure + // for more information of creating SecretSyncResource, please refer to the document of SecretSyncResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string secretSyncName = "secretsync-ssc-example"; + ResourceIdentifier secretSyncResourceId = SecretSyncResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, secretSyncName); + SecretSyncResource secretSync = client.GetSecretSyncResource(secretSyncResourceId); + + // invoke the operation + await secretSync.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_SecretSyncsUpdate() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_Update_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_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 SecretSyncResource created on azure + // for more information of creating SecretSyncResource, please refer to the document of SecretSyncResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg-ssc-example"; + string secretSyncName = "secretsync-ssc-example"; + ResourceIdentifier secretSyncResourceId = SecretSyncResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, secretSyncName); + SecretSyncResource secretSync = client.GetSecretSyncResource(secretSyncResourceId); + + // invoke the operation + SecretSyncPatch patch = new SecretSyncPatch + { + Tags = +{ +["example-tag"] = "example-tag-value" +}, + Properties = new SecretSyncUpdateProperties + { + SecretProviderClassName = "jttlpenhtpxfrrlxdsmqqvmvtmgqrficvqngkggjwciilrexenlstxncyvkqcydxrivkioujssncoaiysdklfouukczzdbxniipbyiqsarqaespuqrbbydwtdaulllostoomntkadklihemfpeffvuyvyilequiqewzspaootvkibrynbqrsbiptjdhywynvydaadprdc", + ServiceAccountName = "fcldqfdfpktndlntuoxicsftelhefevovmlycflfwzckvamiqjnjugandqaqqeccsbzztfmmeunvhsafgerbcsdbnmsyqivygornebbkusuvphwghgouxvcbvmbydqjzoxextnyowsnyymadniwdrrxtogeveldpejixmsrzzfqkquaxdpzwvecevqwasxgxxchrfa", + KubernetesSecretType = KubernetesSecretType.Opaque, + ForceSynchronization = "arbitrarystring", + ObjectSecretMapping = { new KubernetesSecretObjectMapping("ssrzmbvdiomkvzrdsyilwlfzicfydnbjwjsnohrppkukjddrunfslkrnexunuckmghixdssposvndpiqchpqrkjuqbapoisvqdvgstvdonsmlpsmticfvuhqlofpaxfdg", "lojegeqiqfjxyblfxhxloccqzwgpgcelrwqwsbsltcjvjvceejgdrmxhenokxrylhynkltvqntjcvujjrppzvcxyivxeksgmzhifrcklizbpntdepzdl") }, + }, + }; + ArmOperation lro = await secretSync.UpdateAsync(WaitUntil.Completed, patch); + SecretSyncResource 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 + SecretSyncData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..94ce9f0cd1d5 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,81 @@ +// 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.SecretsStoreExtension.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetKeyVaultSecretProviderClasses_AzureKeyVaultSecretProviderClassesListBySubscription() + { + // Generated from example definition: 2024-08-21-preview/AzureKeyVaultSecretProviderClasses_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "AzureKeyVaultSecretProviderClass_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); + + // invoke the operation and iterate over the result + await foreach (KeyVaultSecretProviderClassResource item in subscriptionResource.GetKeyVaultSecretProviderClassesAsync()) + { + // 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 + KeyVaultSecretProviderClassData 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 GetSecretSyncs_SecretSyncsListBySubscription() + { + // Generated from example definition: 2024-08-21-preview/SecretSyncs_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "SecretSync_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); + + // invoke the operation and iterate over the result + await foreach (SecretSyncResource item in subscriptionResource.GetSecretSyncsAsync()) + { + // 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 + SecretSyncData 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Azure.ResourceManager.SecretsStoreExtension.csproj b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Azure.ResourceManager.SecretsStoreExtension.csproj new file mode 100644 index 000000000000..233af5ac2224 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Azure.ResourceManager.SecretsStoreExtension.csproj @@ -0,0 +1,8 @@ + + + 1.0.0-beta.2 + Azure.ResourceManager.SecretsStoreExtension + Azure Resource Manager client SDK for Azure resource provider SecretsStoreExtension. + azure;management;arm;resource manager;secretsstoreextension + + diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/ArmSecretsStoreExtensionModelFactory.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/ArmSecretsStoreExtensionModelFactory.cs new file mode 100644 index 000000000000..e11bfbdd1f47 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/ArmSecretsStoreExtensionModelFactory.cs @@ -0,0 +1,145 @@ +// 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.SecretsStoreExtension.Models +{ + /// Model factory for models. + public static partial class ArmSecretsStoreExtensionModelFactory + { + /// 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 KeyVaultSecretProviderClassData KeyVaultSecretProviderClassData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, KeyVaultSecretProviderClassProperties properties = null, ExtendedLocation extendedLocation = null) + { + tags ??= new Dictionary(); + + return new KeyVaultSecretProviderClassData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the Azure Key Vault to sync secrets from. + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + /// Objects defines the desired state of synced K8s secret objects. + /// Provisioning state of the AzureKeyVaultSecretProviderClass instance. + /// A new instance for mocking. + public static KeyVaultSecretProviderClassProperties KeyVaultSecretProviderClassProperties(string keyvaultName = null, Guid clientId = default, Guid tenantId = default, string objects = null, SecretsStoreExtensionProvisioningState? provisioningState = null) + { + return new KeyVaultSecretProviderClassProperties( + keyvaultName, + clientId, + tenantId, + objects, + 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. + /// + /// A new instance for mocking. + public static SecretSyncData SecretSyncData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, SecretSyncProperties properties = null, ExtendedLocation extendedLocation = null) + { + tags ??= new Dictionary(); + + return new SecretSyncData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + /// ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts. + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + /// SecretSyncStatus defines the observed state of the secret synchronization process. + /// Provisioning state of the SecretSync instance. + /// A new instance for mocking. + public static SecretSyncProperties SecretSyncProperties(string secretProviderClassName = null, string serviceAccountName = null, KubernetesSecretType kubernetesSecretType = default, string forceSynchronization = null, IEnumerable objectSecretMapping = null, SecretSyncStatus status = null, SecretsStoreExtensionProvisioningState? provisioningState = null) + { + objectSecretMapping ??= new List(); + + return new SecretSyncProperties( + secretProviderClassName, + serviceAccountName, + kubernetesSecretType, + forceSynchronization, + objectSecretMapping?.ToList(), + status, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// LastSuccessfulSyncTime represents the last time the secret was retrieved from the Provider and updated. + /// Conditions represent the status of the secret create and update processes. The status can be True, False, or Unknown with various reasons and messages explaining the state. Examples of reasons include CreateSucceeded, ProviderError, InvalidClusterSecretLabelError, InvalidClusterSecretAnnotationError, UnknownError, ValidatingAdmissionPolicyCheckFailed, UserInputValidationFailed, ControllerSpcError, ControllerInternalError, NoValueChange, and ValueChangeOrForceUpdateDetected. + /// A new instance for mocking. + public static SecretSyncStatus SecretSyncStatus(DateTimeOffset? lastSuccessfulSyncOn = null, IEnumerable conditions = null) + { + conditions ??= new List(); + + return new SecretSyncStatus(lastSuccessfulSyncOn, conditions?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// LastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + /// Message is a human readable message indicating details about the transition. This may be an empty string. + /// ObservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + /// Reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + /// Status of the condition, one of True, False, Unknown. + /// Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to de-conflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt). + /// A new instance for mocking. + public static SecretSyncCondition SecretSyncCondition(DateTimeOffset? lastTransitionOn = null, string message = null, long? observedGeneration = null, string reason = null, SecretSyncConditionStatusType status = default, string type = null) + { + return new SecretSyncCondition( + lastTransitionOn, + message, + observedGeneration, + reason, + status, + type, + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionArmClient.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionArmClient.cs new file mode 100644 index 000000000000..2a734d1af04b --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionArmClient.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Core; + +namespace Azure.ResourceManager.SecretsStoreExtension.Mocking +{ + /// A class to add extension methods to ArmClient. + public partial class MockableSecretsStoreExtensionArmClient : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSecretsStoreExtensionArmClient() + { + } + + /// 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 MockableSecretsStoreExtensionArmClient(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + internal MockableSecretsStoreExtensionArmClient(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 KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(ResourceIdentifier id) + { + KeyVaultSecretProviderClassResource.ValidateResourceId(id); + return new KeyVaultSecretProviderClassResource(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 SecretSyncResource GetSecretSyncResource(ResourceIdentifier id) + { + SecretSyncResource.ValidateResourceId(id); + return new SecretSyncResource(Client, id); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionResourceGroupResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionResourceGroupResource.cs new file mode 100644 index 000000000000..00facdb5e297 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionResourceGroupResource.cs @@ -0,0 +1,174 @@ +// 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.SecretsStoreExtension.Mocking +{ + /// A class to add extension methods to ResourceGroupResource. + public partial class MockableSecretsStoreExtensionResourceGroupResource : ArmResource + { + /// Initializes a new instance of the class for mocking. + protected MockableSecretsStoreExtensionResourceGroupResource() + { + } + + /// 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 MockableSecretsStoreExtensionResourceGroupResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// Gets a collection of KeyVaultSecretProviderClassResources in the ResourceGroupResource. + /// An object representing collection of KeyVaultSecretProviderClassResources and their operations over a KeyVaultSecretProviderClassResource. + public virtual KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses() + { + return GetCachedClient(client => new KeyVaultSecretProviderClassCollection(client, Id)); + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetKeyVaultSecretProviderClassAsync(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + return await GetKeyVaultSecretProviderClasses().GetAsync(azureKeyVaultSecretProviderClassName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetKeyVaultSecretProviderClass(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + return GetKeyVaultSecretProviderClasses().Get(azureKeyVaultSecretProviderClassName, cancellationToken); + } + + /// Gets a collection of SecretSyncResources in the ResourceGroupResource. + /// An object representing collection of SecretSyncResources and their operations over a SecretSyncResource. + public virtual SecretSyncCollection GetSecretSyncs() + { + return GetCachedClient(client => new SecretSyncCollection(client, Id)); + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetSecretSyncAsync(string secretSyncName, CancellationToken cancellationToken = default) + { + return await GetSecretSyncs().GetAsync(secretSyncName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetSecretSync(string secretSyncName, CancellationToken cancellationToken = default) + { + return GetSecretSyncs().Get(secretSyncName, cancellationToken); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionSubscriptionResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionSubscriptionResource.cs new file mode 100644 index 000000000000..f3956674a01d --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/MockableSecretsStoreExtensionSubscriptionResource.cs @@ -0,0 +1,166 @@ +// 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.SecretsStoreExtension.Mocking +{ + /// A class to add extension methods to SubscriptionResource. + public partial class MockableSecretsStoreExtensionSubscriptionResource : ArmResource + { + private ClientDiagnostics _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics; + private AzureKeyVaultSecretProviderClassesRestOperations _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient; + private ClientDiagnostics _secretSyncClientDiagnostics; + private SecretSyncsRestOperations _secretSyncRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableSecretsStoreExtensionSubscriptionResource() + { + } + + /// 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 MockableSecretsStoreExtensionSubscriptionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", KeyVaultSecretProviderClassResource.ResourceType.Namespace, Diagnostics); + private AzureKeyVaultSecretProviderClassesRestOperations KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient ??= new AzureKeyVaultSecretProviderClassesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(KeyVaultSecretProviderClassResource.ResourceType)); + private ClientDiagnostics SecretSyncClientDiagnostics => _secretSyncClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", SecretSyncResource.ResourceType.Namespace, Diagnostics); + private SecretSyncsRestOperations SecretSyncRestClient => _secretSyncRestClient ??= new SecretSyncsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SecretSyncResource.ResourceType)); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetKeyVaultSecretProviderClassesAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new KeyVaultSecretProviderClassResource(Client, KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(e)), KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, "MockableSecretsStoreExtensionSubscriptionResource.GetKeyVaultSecretProviderClasses", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetKeyVaultSecretProviderClasses(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new KeyVaultSecretProviderClassResource(Client, KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(e)), KeyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, "MockableSecretsStoreExtensionSubscriptionResource.GetKeyVaultSecretProviderClasses", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SecretSync instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSecretSyncsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SecretSyncRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SecretSyncRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SecretSyncResource(Client, SecretSyncData.DeserializeSecretSyncData(e)), SecretSyncClientDiagnostics, Pipeline, "MockableSecretsStoreExtensionSubscriptionResource.GetSecretSyncs", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SecretSync instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSecretSyncs(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => SecretSyncRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => SecretSyncRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SecretSyncResource(Client, SecretSyncData.DeserializeSecretSyncData(e)), SecretSyncClientDiagnostics, Pipeline, "MockableSecretsStoreExtensionSubscriptionResource.GetSecretSyncs", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/SecretsStoreExtensionExtensions.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/SecretsStoreExtensionExtensions.cs new file mode 100644 index 000000000000..6b6c7e86f7f4 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Extensions/SecretsStoreExtensionExtensions.cs @@ -0,0 +1,403 @@ +// 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.SecretsStoreExtension.Mocking; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// A class to add extension methods to Azure.ResourceManager.SecretsStoreExtension. + public static partial class SecretsStoreExtensionExtensions + { + private static MockableSecretsStoreExtensionArmClient GetMockableSecretsStoreExtensionArmClient(ArmClient client) + { + return client.GetCachedClient(client0 => new MockableSecretsStoreExtensionArmClient(client0)); + } + + private static MockableSecretsStoreExtensionResourceGroupResource GetMockableSecretsStoreExtensionResourceGroupResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSecretsStoreExtensionResourceGroupResource(client, resource.Id)); + } + + private static MockableSecretsStoreExtensionSubscriptionResource GetMockableSecretsStoreExtensionSubscriptionResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableSecretsStoreExtensionSubscriptionResource(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 KeyVaultSecretProviderClassResource GetKeyVaultSecretProviderClassResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecretsStoreExtensionArmClient(client).GetKeyVaultSecretProviderClassResource(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 SecretSyncResource GetSecretSyncResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSecretsStoreExtensionArmClient(client).GetSecretSyncResource(id); + } + + /// + /// Gets a collection of KeyVaultSecretProviderClassResources 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 KeyVaultSecretProviderClassResources and their operations over a KeyVaultSecretProviderClassResource. + public static KeyVaultSecretProviderClassCollection GetKeyVaultSecretProviderClasses(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetKeyVaultSecretProviderClasses(); + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetKeyVaultSecretProviderClassAsync(this ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetKeyVaultSecretProviderClassAsync(azureKeyVaultSecretProviderClassName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetKeyVaultSecretProviderClass(this ResourceGroupResource resourceGroupResource, string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetKeyVaultSecretProviderClass(azureKeyVaultSecretProviderClassName, cancellationToken); + } + + /// + /// Gets a collection of SecretSyncResources 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 SecretSyncResources and their operations over a SecretSyncResource. + public static SecretSyncCollection GetSecretSyncs(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetSecretSyncs(); + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the SecretSync. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetSecretSyncAsync(this ResourceGroupResource resourceGroupResource, string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetSecretSyncAsync(secretSyncName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the SecretSync. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetSecretSync(this ResourceGroupResource resourceGroupResource, string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableSecretsStoreExtensionResourceGroupResource(resourceGroupResource).GetSecretSync(secretSyncName, cancellationToken); + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-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 GetKeyVaultSecretProviderClassesAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSecretsStoreExtensionSubscriptionResource(subscriptionResource).GetKeyVaultSecretProviderClassesAsync(cancellationToken); + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-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 GetKeyVaultSecretProviderClasses(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSecretsStoreExtensionSubscriptionResource(subscriptionResource).GetKeyVaultSecretProviderClasses(cancellationToken); + } + + /// + /// Lists the SecretSync instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-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 GetSecretSyncsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSecretsStoreExtensionSubscriptionResource(subscriptionResource).GetSecretSyncsAsync(cancellationToken); + } + + /// + /// Lists the SecretSync instances within an Azure subscription. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListBySubscription + /// + /// + /// Default Api Version + /// 2024-08-21-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 GetSecretSyncs(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSecretsStoreExtensionSubscriptionResource(subscriptionResource).GetSecretSyncs(cancellationToken); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Argument.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Argument.cs new file mode 100644 index 000000000000..6cdd3b1396e5 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ChangeTrackingDictionary.cs new file mode 100644 index 000000000000..5192ce1963d5 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ChangeTrackingList.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ChangeTrackingList.cs new file mode 100644 index 000000000000..c7dafad335d0 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ModelSerializationExtensions.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ModelSerializationExtensions.cs new file mode 100644 index 000000000000..5bbf5bd95bd7 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/ModelSerializationExtensions.cs @@ -0,0 +1,407 @@ +// Copyright (c) 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.SecretsStoreExtension +{ + internal static class ModelSerializationExtensions + { + internal static readonly JsonDocumentOptions JsonDocumentOptions = new JsonDocumentOptions { MaxDepth = 256 }; + internal static readonly ModelReaderWriterOptions WireOptions = new ModelReaderWriterOptions("W"); + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Optional.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Optional.cs new file mode 100644 index 000000000000..644b867699a9 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Utf8JsonRequestContent.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Internal/Utf8JsonRequestContent.cs new file mode 100644 index 000000000000..22b3c476099e --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassCollection.cs new file mode 100644 index 000000000000..592a33069f12 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassCollection.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.SecretsStoreExtension +{ + /// + /// 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 GetKeyVaultSecretProviderClasses method from an instance of . + /// + public partial class KeyVaultSecretProviderClassCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics; + private readonly AzureKeyVaultSecretProviderClassesRestOperations _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient; + + /// Initializes a new instance of the class for mocking. + protected KeyVaultSecretProviderClassCollection() + { + } + + /// 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 KeyVaultSecretProviderClassCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", KeyVaultSecretProviderClassResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(KeyVaultSecretProviderClassResource.ResourceType, out string keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesApiVersion); + _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient = new AzureKeyVaultSecretProviderClassesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesApiVersion); +#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, or updates, an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-08-21-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 AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, data, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(new KeyVaultSecretProviderClassOperationSource(Client), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, 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, or updates, an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-08-21-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 AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, data, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(new KeyVaultSecretProviderClassOperationSource(Client), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.Get"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.Get"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-08-21-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) => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new KeyVaultSecretProviderClassResource(Client, KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(e)), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, "KeyVaultSecretProviderClassCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the AzureKeyVaultSecretProviderClass instances within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-08-21-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) => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new KeyVaultSecretProviderClassResource(Client, KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(e)), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, "KeyVaultSecretProviderClassCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.Exists"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.Exists"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the AzureKeyVaultSecretProviderClass. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassCollection.GetIfExists"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, azureKeyVaultSecretProviderClassName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.Serialization.cs new file mode 100644 index 000000000000..f9f4f0ea88ee --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.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.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + public partial class KeyVaultSecretProviderClassData : 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(KeyVaultSecretProviderClassData)} 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); + JsonSerializer.Serialize(writer, ExtendedLocation); + } + } + + KeyVaultSecretProviderClassData 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(KeyVaultSecretProviderClassData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKeyVaultSecretProviderClassData(document.RootElement, options); + } + + internal static KeyVaultSecretProviderClassData DeserializeKeyVaultSecretProviderClassData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + KeyVaultSecretProviderClassProperties properties = 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 = KeyVaultSecretProviderClassProperties.DeserializeKeyVaultSecretProviderClassProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KeyVaultSecretProviderClassData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassData)} does not support writing '{options.Format}' format."); + } + } + + KeyVaultSecretProviderClassData 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 DeserializeKeyVaultSecretProviderClassData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.cs new file mode 100644 index 000000000000..ac98e15ce2d6 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// + /// A class representing the KeyVaultSecretProviderClass data model. + /// The AzureKeyVaultSecretProviderClass resource. + /// + public partial class KeyVaultSecretProviderClassData : 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 KeyVaultSecretProviderClassData(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 KeyVaultSecretProviderClassData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, KeyVaultSecretProviderClassProperties properties, ExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal KeyVaultSecretProviderClassData() + { + } + + /// The resource-specific properties for this resource. + public KeyVaultSecretProviderClassProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.Serialization.cs new file mode 100644 index 000000000000..8bdc7167ea87 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.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.SecretsStoreExtension +{ + public partial class KeyVaultSecretProviderClassResource : IJsonModel + { + private static KeyVaultSecretProviderClassData s_dataDeserializationInstance; + private static KeyVaultSecretProviderClassData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + KeyVaultSecretProviderClassData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecretsStoreExtensionContext.Default); + + KeyVaultSecretProviderClassData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecretsStoreExtensionContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.cs new file mode 100644 index 000000000000..ed48a120ec81 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/KeyVaultSecretProviderClassResource.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.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// + /// A Class representing a KeyVaultSecretProviderClass 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 GetKeyVaultSecretProviderClassResource method. + /// Otherwise you can get one from its parent resource using the GetKeyVaultSecretProviderClass method. + /// + public partial class KeyVaultSecretProviderClassResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The azureKeyVaultSecretProviderClassName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics; + private readonly AzureKeyVaultSecretProviderClassesRestOperations _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient; + private readonly KeyVaultSecretProviderClassData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses"; + + /// Initializes a new instance of the class for mocking. + protected KeyVaultSecretProviderClassResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal KeyVaultSecretProviderClassResource(ArmClient client, KeyVaultSecretProviderClassData 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 KeyVaultSecretProviderClassResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesApiVersion); + _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient = new AzureKeyVaultSecretProviderClassesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesApiVersion); +#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 KeyVaultSecretProviderClassData 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 the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Get"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Get"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Delete + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Delete"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(_keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.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 an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Delete + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Delete"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(_keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.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 an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Update + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, KeyVaultSecretProviderClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Update"); + scope.Start(); + try + { + var response = await _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(new KeyVaultSecretProviderClassOperationSource(Client), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.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 an AzureKeyVaultSecretProviderClass instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Update + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, KeyVaultSecretProviderClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.Update"); + scope.Start(); + try + { + var response = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(new KeyVaultSecretProviderClassOperationSource(Client), _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics, Pipeline, _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/{azureKeyVaultSecretProviderClassName} + /// + /// + /// Operation Id + /// AzureKeyVaultSecretProviderClass_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesClientDiagnostics.CreateScope("KeyVaultSecretProviderClassResource.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 = _keyVaultSecretProviderClassAzureKeyVaultSecretProviderClassesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new KeyVaultSecretProviderClassResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new KeyVaultSecretProviderClassPatch(); + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/KeyVaultSecretProviderClassOperationSource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/KeyVaultSecretProviderClassOperationSource.cs new file mode 100644 index 000000000000..f6c2fe86cc2e --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/KeyVaultSecretProviderClassOperationSource.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.SecretsStoreExtension +{ + internal class KeyVaultSecretProviderClassOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal KeyVaultSecretProviderClassOperationSource(ArmClient client) + { + _client = client; + } + + KeyVaultSecretProviderClassResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default); + return new KeyVaultSecretProviderClassResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default); + return await Task.FromResult(new KeyVaultSecretProviderClassResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretSyncOperationSource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretSyncOperationSource.cs new file mode 100644 index 000000000000..6d2ed638e3a9 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretSyncOperationSource.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.SecretsStoreExtension +{ + internal class SecretSyncOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal SecretSyncOperationSource(ArmClient client) + { + _client = client; + } + + SecretSyncResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default); + return new SecretSyncResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default); + return await Task.FromResult(new SecretSyncResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperation.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperation.cs new file mode 100644 index 000000000000..60ac14225a97 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperation.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SecretsStoreExtensionArmOperation : 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 SecretsStoreExtensionArmOperation for mocking. + protected SecretsStoreExtensionArmOperation() + { + } + + internal SecretsStoreExtensionArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SecretsStoreExtensionArmOperation(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, "SecretsStoreExtensionArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + public override string Id => _operationId ?? NextLinkOperationImplementation.NotSet; + + /// + public override RehydrationToken? GetRehydrationToken() => _nextLinkOperation?.GetRehydrationToken() ?? _completeRehydrationToken; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override Response GetRawResponse() => _operation.RawResponse; + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override Response WaitForCompletionResponse(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(cancellationToken); + + /// + public override Response WaitForCompletionResponse(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponse(pollingInterval, cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(cancellationToken); + + /// + public override ValueTask WaitForCompletionResponseAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionResponseAsync(pollingInterval, cancellationToken); + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperationOfT.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperationOfT.cs new file mode 100644 index 000000000000..63bcd65207bd --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/LongRunningOperation/SecretsStoreExtensionArmOperationOfT.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ +#pragma warning disable SA1649 // File name should match first type name + internal class SecretsStoreExtensionArmOperation : 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 SecretsStoreExtensionArmOperation for mocking. + protected SecretsStoreExtensionArmOperation() + { + } + + internal SecretsStoreExtensionArmOperation(Response response, RehydrationToken? rehydrationToken = null) + { + _operation = OperationInternal.Succeeded(response.GetRawResponse(), response.Value); + _completeRehydrationToken = rehydrationToken; + _operationId = GetOperationId(rehydrationToken); + } + + internal SecretsStoreExtensionArmOperation(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, "SecretsStoreExtensionArmOperation", fallbackStrategy: new SequentialDelayStrategy()); + } + + private string GetOperationId(RehydrationToken? rehydrationToken) + { + if (rehydrationToken is null) + { + return null; + } + var lroDetails = ModelReaderWriter.Write(rehydrationToken, ModelReaderWriterOptions.Json, AzureResourceManagerSecretsStoreExtensionContext.Default).ToObjectFromJson>(); + return lroDetails["id"]; + } + /// + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.Serialization.cs new file mode 100644 index 000000000000..b125853a66de --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.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.SecretsStoreExtension.Models +{ + internal partial class AzureKeyVaultSecretProviderClassListResult : 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(AzureKeyVaultSecretProviderClassListResult)} 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 + } + } + } + + AzureKeyVaultSecretProviderClassListResult 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(AzureKeyVaultSecretProviderClassListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement, options); + } + + internal static AzureKeyVaultSecretProviderClassListResult DeserializeAzureKeyVaultSecretProviderClassListResult(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(KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(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 AzureKeyVaultSecretProviderClassListResult(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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(AzureKeyVaultSecretProviderClassListResult)} does not support writing '{options.Format}' format."); + } + } + + AzureKeyVaultSecretProviderClassListResult 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 DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureKeyVaultSecretProviderClassListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.cs new file mode 100644 index 000000000000..73dda59dc324 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassListResult.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.SecretsStoreExtension.Models +{ + /// The response of a AzureKeyVaultSecretProviderClass list operation. + internal partial class AzureKeyVaultSecretProviderClassListResult + { + /// + /// 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 AzureKeyVaultSecretProviderClass items on this page. + /// is null. + internal AzureKeyVaultSecretProviderClassListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AzureKeyVaultSecretProviderClass items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AzureKeyVaultSecretProviderClassListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureKeyVaultSecretProviderClassListResult() + { + } + + /// The AzureKeyVaultSecretProviderClass items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..ebe282f0d39a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.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.SecretsStoreExtension.Models +{ + public partial class AzureKeyVaultSecretProviderClassUpdateProperties : 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(AzureKeyVaultSecretProviderClassUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(KeyvaultName)) + { + writer.WritePropertyName("keyvaultName"u8); + writer.WriteStringValue(KeyvaultName); + } + if (Optional.IsDefined(ClientId)) + { + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId.Value); + } + if (Optional.IsDefined(TenantId)) + { + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId.Value); + } + if (Optional.IsDefined(Objects)) + { + writer.WritePropertyName("objects"u8); + writer.WriteStringValue(Objects); + } + 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 + } + } + } + + AzureKeyVaultSecretProviderClassUpdateProperties 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(AzureKeyVaultSecretProviderClassUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureKeyVaultSecretProviderClassUpdateProperties(document.RootElement, options); + } + + internal static AzureKeyVaultSecretProviderClassUpdateProperties DeserializeAzureKeyVaultSecretProviderClassUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyvaultName = default; + Guid? clientId = default; + Guid? tenantId = default; + string objects = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyvaultName"u8)) + { + keyvaultName = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("objects"u8)) + { + objects = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureKeyVaultSecretProviderClassUpdateProperties(keyvaultName, clientId, tenantId, objects, 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(AzureKeyVaultSecretProviderClassUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + AzureKeyVaultSecretProviderClassUpdateProperties 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 DeserializeAzureKeyVaultSecretProviderClassUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureKeyVaultSecretProviderClassUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.cs new file mode 100644 index 000000000000..7755d3498179 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureKeyVaultSecretProviderClassUpdateProperties.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; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + /// The updatable properties of the AzureKeyVaultSecretProviderClass. + public partial class AzureKeyVaultSecretProviderClassUpdateProperties + { + /// + /// 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 AzureKeyVaultSecretProviderClassUpdateProperties() + { + } + + /// Initializes a new instance of . + /// The name of the Azure Key Vault to sync secrets from. + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + /// Objects defines the desired state of synced K8s secret objects. + /// Keeps track of any properties unknown to the library. + internal AzureKeyVaultSecretProviderClassUpdateProperties(string keyvaultName, Guid? clientId, Guid? tenantId, string objects, IDictionary serializedAdditionalRawData) + { + KeyvaultName = keyvaultName; + ClientId = clientId; + TenantId = tenantId; + Objects = objects; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the Azure Key Vault to sync secrets from. + public string KeyvaultName { get; set; } + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + public Guid? ClientId { get; set; } + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + public Guid? TenantId { get; set; } + /// Objects defines the desired state of synced K8s secret objects. + public string Objects { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureResourceManagerSecretsStoreExtensionContext.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureResourceManagerSecretsStoreExtensionContext.cs new file mode 100644 index 000000000000..d892c60d6465 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/AzureResourceManagerSecretsStoreExtensionContext.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// + /// 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' + /// + public partial class AzureResourceManagerSecretsStoreExtensionContext : ModelReaderWriterContext + { + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.Serialization.cs new file mode 100644 index 000000000000..43dd1fc61f4f --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.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.SecretsStoreExtension.Models +{ + public partial class KeyVaultSecretProviderClassPatch : 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(KeyVaultSecretProviderClassPatch)} 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 + } + } + } + + KeyVaultSecretProviderClassPatch 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(KeyVaultSecretProviderClassPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKeyVaultSecretProviderClassPatch(document.RootElement, options); + } + + internal static KeyVaultSecretProviderClassPatch DeserializeKeyVaultSecretProviderClassPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + AzureKeyVaultSecretProviderClassUpdateProperties 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 = AzureKeyVaultSecretProviderClassUpdateProperties.DeserializeAzureKeyVaultSecretProviderClassUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KeyVaultSecretProviderClassPatch(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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassPatch)} does not support writing '{options.Format}' format."); + } + } + + KeyVaultSecretProviderClassPatch 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 DeserializeKeyVaultSecretProviderClassPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.cs new file mode 100644 index 000000000000..fd611df8ecf9 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassPatch.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.SecretsStoreExtension.Models +{ + /// The type used for update operations of the AzureKeyVaultSecretProviderClass. + public partial class KeyVaultSecretProviderClassPatch + { + /// + /// 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 KeyVaultSecretProviderClassPatch() + { + 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 KeyVaultSecretProviderClassPatch(IDictionary tags, AzureKeyVaultSecretProviderClassUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public AzureKeyVaultSecretProviderClassUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.Serialization.cs new file mode 100644 index 000000000000..7aaa7ec80b8f --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.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.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public partial class KeyVaultSecretProviderClassProperties : 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(KeyVaultSecretProviderClassProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("keyvaultName"u8); + writer.WriteStringValue(KeyvaultName); + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + if (Optional.IsDefined(Objects)) + { + writer.WritePropertyName("objects"u8); + writer.WriteStringValue(Objects); + } + 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 + } + } + } + + KeyVaultSecretProviderClassProperties 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(KeyVaultSecretProviderClassProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKeyVaultSecretProviderClassProperties(document.RootElement, options); + } + + internal static KeyVaultSecretProviderClassProperties DeserializeKeyVaultSecretProviderClassProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string keyvaultName = default; + Guid clientId = default; + Guid tenantId = default; + string objects = default; + SecretsStoreExtensionProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyvaultName"u8)) + { + keyvaultName = property.Value.GetString(); + continue; + } + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("objects"u8)) + { + objects = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SecretsStoreExtensionProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KeyVaultSecretProviderClassProperties( + keyvaultName, + clientId, + tenantId, + objects, + 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassProperties)} does not support writing '{options.Format}' format."); + } + } + + KeyVaultSecretProviderClassProperties 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 DeserializeKeyVaultSecretProviderClassProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KeyVaultSecretProviderClassProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.cs new file mode 100644 index 000000000000..4d3aab99f97d --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KeyVaultSecretProviderClassProperties.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; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + /// The properties of the AzureKeyVaultSecretProviderClass. + public partial class KeyVaultSecretProviderClassProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the Azure Key Vault to sync secrets from. + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + /// is null. + public KeyVaultSecretProviderClassProperties(string keyvaultName, Guid clientId, Guid tenantId) + { + Argument.AssertNotNull(keyvaultName, nameof(keyvaultName)); + + KeyvaultName = keyvaultName; + ClientId = clientId; + TenantId = tenantId; + } + + /// Initializes a new instance of . + /// The name of the Azure Key Vault to sync secrets from. + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + /// Objects defines the desired state of synced K8s secret objects. + /// Provisioning state of the AzureKeyVaultSecretProviderClass instance. + /// Keeps track of any properties unknown to the library. + internal KeyVaultSecretProviderClassProperties(string keyvaultName, Guid clientId, Guid tenantId, string objects, SecretsStoreExtensionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + KeyvaultName = keyvaultName; + ClientId = clientId; + TenantId = tenantId; + Objects = objects; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal KeyVaultSecretProviderClassProperties() + { + } + + /// The name of the Azure Key Vault to sync secrets from. + public string KeyvaultName { get; set; } + /// The user assigned managed identity client ID that should be used to access the Azure Key Vault. + public Guid ClientId { get; set; } + /// The Azure Active Directory tenant ID that should be used for authenticating requests to the Azure Key Vault. + public Guid TenantId { get; set; } + /// Objects defines the desired state of synced K8s secret objects. + public string Objects { get; set; } + /// Provisioning state of the AzureKeyVaultSecretProviderClass instance. + public SecretsStoreExtensionProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.Serialization.cs new file mode 100644 index 000000000000..a880f2ebfb21 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.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.SecretsStoreExtension.Models +{ + public partial class KubernetesSecretObjectMapping : 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(KubernetesSecretObjectMapping)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("sourcePath"u8); + writer.WriteStringValue(SourcePath); + writer.WritePropertyName("targetKey"u8); + writer.WriteStringValue(TargetKey); + 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 + } + } + } + + KubernetesSecretObjectMapping 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(KubernetesSecretObjectMapping)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeKubernetesSecretObjectMapping(document.RootElement, options); + } + + internal static KubernetesSecretObjectMapping DeserializeKubernetesSecretObjectMapping(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string sourcePath = default; + string targetKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourcePath"u8)) + { + sourcePath = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetKey"u8)) + { + targetKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new KubernetesSecretObjectMapping(sourcePath, targetKey, 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(KubernetesSecretObjectMapping)} does not support writing '{options.Format}' format."); + } + } + + KubernetesSecretObjectMapping 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 DeserializeKubernetesSecretObjectMapping(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(KubernetesSecretObjectMapping)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.cs new file mode 100644 index 000000000000..6215cee11c1b --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretObjectMapping.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.SecretsStoreExtension.Models +{ + /// Properties defining the mapping between a cloud secret store object and a Kubernetes Secret. + public partial class KubernetesSecretObjectMapping + { + /// + /// 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 . + /// SourcePath is the identifier for the secret data as defined by the external secret provider. This is the key or path to the secret in the provider's system, which gets mounted to a specific path in the pod. The value should match the name of the secret as specified in the SecretProviderClass's objects array. + /// TargetKey is the key in the Kubernetes secret's data field where the secret value will be stored. This key is used to reference the secret data within Kubernetes, and it should be unique within the secret. + /// or is null. + public KubernetesSecretObjectMapping(string sourcePath, string targetKey) + { + Argument.AssertNotNull(sourcePath, nameof(sourcePath)); + Argument.AssertNotNull(targetKey, nameof(targetKey)); + + SourcePath = sourcePath; + TargetKey = targetKey; + } + + /// Initializes a new instance of . + /// SourcePath is the identifier for the secret data as defined by the external secret provider. This is the key or path to the secret in the provider's system, which gets mounted to a specific path in the pod. The value should match the name of the secret as specified in the SecretProviderClass's objects array. + /// TargetKey is the key in the Kubernetes secret's data field where the secret value will be stored. This key is used to reference the secret data within Kubernetes, and it should be unique within the secret. + /// Keeps track of any properties unknown to the library. + internal KubernetesSecretObjectMapping(string sourcePath, string targetKey, IDictionary serializedAdditionalRawData) + { + SourcePath = sourcePath; + TargetKey = targetKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal KubernetesSecretObjectMapping() + { + } + + /// SourcePath is the identifier for the secret data as defined by the external secret provider. This is the key or path to the secret in the provider's system, which gets mounted to a specific path in the pod. The value should match the name of the secret as specified in the SecretProviderClass's objects array. + public string SourcePath { get; set; } + /// TargetKey is the key in the Kubernetes secret's data field where the secret value will be stored. This key is used to reference the secret data within Kubernetes, and it should be unique within the secret. + public string TargetKey { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretType.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretType.cs new file mode 100644 index 000000000000..44a8f0b0c321 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/KubernetesSecretType.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.SecretsStoreExtension.Models +{ + /// Supported Kubernetes secret types. + public readonly partial struct KubernetesSecretType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public KubernetesSecretType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string OpaqueValue = "Opaque"; + private const string TlsValue = "kubernetes.io/tls"; + + /// Opaque is the default secret type. + public static KubernetesSecretType Opaque { get; } = new KubernetesSecretType(OpaqueValue); + /// The kubernetes.io/tls secret type is for storing a certificate and its associated key that are typically used for TLS. + public static KubernetesSecretType Tls { get; } = new KubernetesSecretType(TlsValue); + /// Determines if two values are the same. + public static bool operator ==(KubernetesSecretType left, KubernetesSecretType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(KubernetesSecretType left, KubernetesSecretType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator KubernetesSecretType(string value) => new KubernetesSecretType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is KubernetesSecretType other && Equals(other); + /// + public bool Equals(KubernetesSecretType 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.Serialization.cs new file mode 100644 index 000000000000..393461568793 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public partial class SecretSyncCondition : 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(SecretSyncCondition)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(LastTransitionOn)) + { + writer.WritePropertyName("lastTransitionTime"u8); + writer.WriteStringValue(LastTransitionOn.Value, "O"); + } + if (options.Format != "W") + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + if (options.Format != "W" && Optional.IsDefined(ObservedGeneration)) + { + writer.WritePropertyName("observedGeneration"u8); + writer.WriteNumberValue(ObservedGeneration.Value); + } + if (options.Format != "W") + { + writer.WritePropertyName("reason"u8); + writer.WriteStringValue(Reason); + } + if (options.Format != "W") + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + } + if (options.Format != "W") + { + 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 + } + } + } + + SecretSyncCondition 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(SecretSyncCondition)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncCondition(document.RootElement, options); + } + + internal static SecretSyncCondition DeserializeSecretSyncCondition(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? lastTransitionTime = default; + string message = default; + long? observedGeneration = default; + string reason = default; + SecretSyncConditionStatusType status = default; + string type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lastTransitionTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastTransitionTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (property.NameEquals("observedGeneration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + observedGeneration = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("reason"u8)) + { + reason = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = new SecretSyncConditionStatusType(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 SecretSyncCondition( + lastTransitionTime, + message, + observedGeneration, + reason, + status, + 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncCondition)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncCondition 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 DeserializeSecretSyncCondition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncCondition)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.cs new file mode 100644 index 000000000000..e5c90dc0021b --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncCondition.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.SecretsStoreExtension.Models +{ + /// A condition represents the status of the secret create and update processes. + public partial class SecretSyncCondition + { + /// + /// 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 . + /// Message is a human readable message indicating details about the transition. This may be an empty string. + /// Reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + /// Status of the condition, one of True, False, Unknown. + /// Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to de-conflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt). + internal SecretSyncCondition(string message, string reason, SecretSyncConditionStatusType status, string type) + { + Message = message; + Reason = reason; + Status = status; + Type = type; + } + + /// Initializes a new instance of . + /// LastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + /// Message is a human readable message indicating details about the transition. This may be an empty string. + /// ObservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + /// Reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + /// Status of the condition, one of True, False, Unknown. + /// Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to de-conflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt). + /// Keeps track of any properties unknown to the library. + internal SecretSyncCondition(DateTimeOffset? lastTransitionOn, string message, long? observedGeneration, string reason, SecretSyncConditionStatusType status, string type, IDictionary serializedAdditionalRawData) + { + LastTransitionOn = lastTransitionOn; + Message = message; + ObservedGeneration = observedGeneration; + Reason = reason; + Status = status; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretSyncCondition() + { + } + + /// LastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + public DateTimeOffset? LastTransitionOn { get; } + /// Message is a human readable message indicating details about the transition. This may be an empty string. + public string Message { get; } + /// ObservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. + public long? ObservedGeneration { get; } + /// Reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty. + public string Reason { get; } + /// Status of the condition, one of True, False, Unknown. + public SecretSyncConditionStatusType Status { get; } + /// Type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to de-conflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt). + public string Type { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncConditionStatusType.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncConditionStatusType.cs new file mode 100644 index 000000000000..274cb0ff51df --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncConditionStatusType.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.SecretsStoreExtension.Models +{ + /// Status conditions types. + public readonly partial struct SecretSyncConditionStatusType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecretSyncConditionStatusType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TrueValue = "True"; + private const string FalseValue = "False"; + private const string UnknownValue = "Unknown"; + + /// The status is true. + public static SecretSyncConditionStatusType True { get; } = new SecretSyncConditionStatusType(TrueValue); + /// The status is false. + public static SecretSyncConditionStatusType False { get; } = new SecretSyncConditionStatusType(FalseValue); + /// The status is unknown. + public static SecretSyncConditionStatusType Unknown { get; } = new SecretSyncConditionStatusType(UnknownValue); + /// Determines if two values are the same. + public static bool operator ==(SecretSyncConditionStatusType left, SecretSyncConditionStatusType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecretSyncConditionStatusType left, SecretSyncConditionStatusType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SecretSyncConditionStatusType(string value) => new SecretSyncConditionStatusType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecretSyncConditionStatusType other && Equals(other); + /// + public bool Equals(SecretSyncConditionStatusType 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.Serialization.cs new file mode 100644 index 000000000000..98306133817c --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.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.SecretsStoreExtension.Models +{ + internal partial class SecretSyncListResult : 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(SecretSyncListResult)} 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 + } + } + } + + SecretSyncListResult 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(SecretSyncListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncListResult(document.RootElement, options); + } + + internal static SecretSyncListResult DeserializeSecretSyncListResult(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(SecretSyncData.DeserializeSecretSyncData(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 SecretSyncListResult(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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncListResult)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncListResult 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 DeserializeSecretSyncListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.cs new file mode 100644 index 000000000000..e127d189a9ab --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncListResult.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.SecretsStoreExtension.Models +{ + /// The response of a SecretSync list operation. + internal partial class SecretSyncListResult + { + /// + /// 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 SecretSync items on this page. + /// is null. + internal SecretSyncListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The SecretSync items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal SecretSyncListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretSyncListResult() + { + } + + /// The SecretSync items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.Serialization.cs new file mode 100644 index 000000000000..8fe86821175a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.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.SecretsStoreExtension.Models +{ + public partial class SecretSyncPatch : 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(SecretSyncPatch)} 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 + } + } + } + + SecretSyncPatch 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(SecretSyncPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncPatch(document.RootElement, options); + } + + internal static SecretSyncPatch DeserializeSecretSyncPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + SecretSyncUpdateProperties 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 = SecretSyncUpdateProperties.DeserializeSecretSyncUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretSyncPatch(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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncPatch)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncPatch 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 DeserializeSecretSyncPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.cs new file mode 100644 index 000000000000..01b1a16a1242 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncPatch.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.SecretsStoreExtension.Models +{ + /// The type used for update operations of the SecretSync. + public partial class SecretSyncPatch + { + /// + /// 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 SecretSyncPatch() + { + 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 SecretSyncPatch(IDictionary tags, SecretSyncUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + public SecretSyncUpdateProperties Properties { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.Serialization.cs new file mode 100644 index 000000000000..38c34d8cfebd --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.Serialization.cs @@ -0,0 +1,209 @@ +// Copyright (c) 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.SecretsStoreExtension.Models +{ + public partial class SecretSyncProperties : 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(SecretSyncProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("secretProviderClassName"u8); + writer.WriteStringValue(SecretProviderClassName); + writer.WritePropertyName("serviceAccountName"u8); + writer.WriteStringValue(ServiceAccountName); + writer.WritePropertyName("kubernetesSecretType"u8); + writer.WriteStringValue(KubernetesSecretType.ToString()); + if (Optional.IsDefined(ForceSynchronization)) + { + writer.WritePropertyName("forceSynchronization"u8); + writer.WriteStringValue(ForceSynchronization); + } + writer.WritePropertyName("objectSecretMapping"u8); + writer.WriteStartArray(); + foreach (var item in ObjectSecretMapping) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + 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 + } + } + } + + SecretSyncProperties 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(SecretSyncProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncProperties(document.RootElement, options); + } + + internal static SecretSyncProperties DeserializeSecretSyncProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretProviderClassName = default; + string serviceAccountName = default; + KubernetesSecretType kubernetesSecretType = default; + string forceSynchronization = default; + IList objectSecretMapping = default; + SecretSyncStatus status = default; + SecretsStoreExtensionProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretProviderClassName"u8)) + { + secretProviderClassName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountName"u8)) + { + serviceAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kubernetesSecretType"u8)) + { + kubernetesSecretType = new KubernetesSecretType(property.Value.GetString()); + continue; + } + if (property.NameEquals("forceSynchronization"u8)) + { + forceSynchronization = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectSecretMapping"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KubernetesSecretObjectMapping.DeserializeKubernetesSecretObjectMapping(item, options)); + } + objectSecretMapping = array; + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = SecretSyncStatus.DeserializeSecretSyncStatus(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new SecretsStoreExtensionProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretSyncProperties( + secretProviderClassName, + serviceAccountName, + kubernetesSecretType, + forceSynchronization, + objectSecretMapping, + 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncProperties)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncProperties 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 DeserializeSecretSyncProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.cs new file mode 100644 index 000000000000..42b52f76a42a --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncProperties.cs @@ -0,0 +1,108 @@ +// 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.SecretsStoreExtension.Models +{ + /// The properties of the SecretSync instance. + public partial class SecretSyncProperties + { + /// + /// 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 . + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + /// , or is null. + public SecretSyncProperties(string secretProviderClassName, string serviceAccountName, KubernetesSecretType kubernetesSecretType, IEnumerable objectSecretMapping) + { + Argument.AssertNotNull(secretProviderClassName, nameof(secretProviderClassName)); + Argument.AssertNotNull(serviceAccountName, nameof(serviceAccountName)); + Argument.AssertNotNull(objectSecretMapping, nameof(objectSecretMapping)); + + SecretProviderClassName = secretProviderClassName; + ServiceAccountName = serviceAccountName; + KubernetesSecretType = kubernetesSecretType; + ObjectSecretMapping = objectSecretMapping.ToList(); + } + + /// Initializes a new instance of . + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + /// ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts. + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + /// SecretSyncStatus defines the observed state of the secret synchronization process. + /// Provisioning state of the SecretSync instance. + /// Keeps track of any properties unknown to the library. + internal SecretSyncProperties(string secretProviderClassName, string serviceAccountName, KubernetesSecretType kubernetesSecretType, string forceSynchronization, IList objectSecretMapping, SecretSyncStatus status, SecretsStoreExtensionProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + SecretProviderClassName = secretProviderClassName; + ServiceAccountName = serviceAccountName; + KubernetesSecretType = kubernetesSecretType; + ForceSynchronization = forceSynchronization; + ObjectSecretMapping = objectSecretMapping; + Status = status; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretSyncProperties() + { + } + + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + public string SecretProviderClassName { get; set; } + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + public string ServiceAccountName { get; set; } + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + public KubernetesSecretType KubernetesSecretType { get; set; } + /// ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts. + public string ForceSynchronization { get; set; } + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + public IList ObjectSecretMapping { get; } + /// SecretSyncStatus defines the observed state of the secret synchronization process. + public SecretSyncStatus Status { get; } + /// Provisioning state of the SecretSync instance. + public SecretsStoreExtensionProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.Serialization.cs new file mode 100644 index 000000000000..3a908ec78693 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public partial class SecretSyncStatus : 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(SecretSyncStatus)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(LastSuccessfulSyncOn)) + { + writer.WritePropertyName("lastSuccessfulSyncTime"u8); + writer.WriteStringValue(LastSuccessfulSyncOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Conditions)) + { + writer.WritePropertyName("conditions"u8); + writer.WriteStartArray(); + foreach (var item in Conditions) + { + 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 + } + } + } + + SecretSyncStatus 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(SecretSyncStatus)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncStatus(document.RootElement, options); + } + + internal static SecretSyncStatus DeserializeSecretSyncStatus(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? lastSuccessfulSyncTime = default; + IReadOnlyList conditions = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("lastSuccessfulSyncTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lastSuccessfulSyncTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("conditions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(SecretSyncCondition.DeserializeSecretSyncCondition(item, options)); + } + conditions = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretSyncStatus(lastSuccessfulSyncTime, conditions ?? 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncStatus)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncStatus 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 DeserializeSecretSyncStatus(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncStatus)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.cs new file mode 100644 index 000000000000..66e1646e429b --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncStatus.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.SecretsStoreExtension.Models +{ + /// SecretSyncStatus defines the observed state of the secret synchronization process. + public partial class SecretSyncStatus + { + /// + /// 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 SecretSyncStatus() + { + Conditions = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// LastSuccessfulSyncTime represents the last time the secret was retrieved from the Provider and updated. + /// Conditions represent the status of the secret create and update processes. The status can be True, False, or Unknown with various reasons and messages explaining the state. Examples of reasons include CreateSucceeded, ProviderError, InvalidClusterSecretLabelError, InvalidClusterSecretAnnotationError, UnknownError, ValidatingAdmissionPolicyCheckFailed, UserInputValidationFailed, ControllerSpcError, ControllerInternalError, NoValueChange, and ValueChangeOrForceUpdateDetected. + /// Keeps track of any properties unknown to the library. + internal SecretSyncStatus(DateTimeOffset? lastSuccessfulSyncOn, IReadOnlyList conditions, IDictionary serializedAdditionalRawData) + { + LastSuccessfulSyncOn = lastSuccessfulSyncOn; + Conditions = conditions; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// LastSuccessfulSyncTime represents the last time the secret was retrieved from the Provider and updated. + public DateTimeOffset? LastSuccessfulSyncOn { get; } + /// Conditions represent the status of the secret create and update processes. The status can be True, False, or Unknown with various reasons and messages explaining the state. Examples of reasons include CreateSucceeded, ProviderError, InvalidClusterSecretLabelError, InvalidClusterSecretAnnotationError, UnknownError, ValidatingAdmissionPolicyCheckFailed, UserInputValidationFailed, ControllerSpcError, ControllerInternalError, NoValueChange, and ValueChangeOrForceUpdateDetected. + public IReadOnlyList Conditions { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..7c2df5e2a7aa --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.Serialization.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.SecretsStoreExtension.Models +{ + public partial class SecretSyncUpdateProperties : 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(SecretSyncUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SecretProviderClassName)) + { + writer.WritePropertyName("secretProviderClassName"u8); + writer.WriteStringValue(SecretProviderClassName); + } + if (Optional.IsDefined(ServiceAccountName)) + { + writer.WritePropertyName("serviceAccountName"u8); + writer.WriteStringValue(ServiceAccountName); + } + if (Optional.IsDefined(KubernetesSecretType)) + { + writer.WritePropertyName("kubernetesSecretType"u8); + writer.WriteStringValue(KubernetesSecretType.Value.ToString()); + } + if (Optional.IsDefined(ForceSynchronization)) + { + writer.WritePropertyName("forceSynchronization"u8); + writer.WriteStringValue(ForceSynchronization); + } + if (Optional.IsCollectionDefined(ObjectSecretMapping)) + { + writer.WritePropertyName("objectSecretMapping"u8); + writer.WriteStartArray(); + foreach (var item in ObjectSecretMapping) + { + 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 + } + } + } + + SecretSyncUpdateProperties 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(SecretSyncUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncUpdateProperties(document.RootElement, options); + } + + internal static SecretSyncUpdateProperties DeserializeSecretSyncUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretProviderClassName = default; + string serviceAccountName = default; + KubernetesSecretType? kubernetesSecretType = default; + string forceSynchronization = default; + IList objectSecretMapping = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretProviderClassName"u8)) + { + secretProviderClassName = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceAccountName"u8)) + { + serviceAccountName = property.Value.GetString(); + continue; + } + if (property.NameEquals("kubernetesSecretType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + kubernetesSecretType = new KubernetesSecretType(property.Value.GetString()); + continue; + } + if (property.NameEquals("forceSynchronization"u8)) + { + forceSynchronization = property.Value.GetString(); + continue; + } + if (property.NameEquals("objectSecretMapping"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(KubernetesSecretObjectMapping.DeserializeKubernetesSecretObjectMapping(item, options)); + } + objectSecretMapping = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretSyncUpdateProperties( + secretProviderClassName, + serviceAccountName, + kubernetesSecretType, + forceSynchronization, + objectSecretMapping ?? 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncUpdateProperties 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 DeserializeSecretSyncUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.cs new file mode 100644 index 000000000000..7efa6c10509f --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretSyncUpdateProperties.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.SecretsStoreExtension.Models +{ + /// The updatable properties of the SecretSync. + public partial class SecretSyncUpdateProperties + { + /// + /// 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 SecretSyncUpdateProperties() + { + ObjectSecretMapping = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + /// ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts. + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + /// Keeps track of any properties unknown to the library. + internal SecretSyncUpdateProperties(string secretProviderClassName, string serviceAccountName, KubernetesSecretType? kubernetesSecretType, string forceSynchronization, IList objectSecretMapping, IDictionary serializedAdditionalRawData) + { + SecretProviderClassName = secretProviderClassName; + ServiceAccountName = serviceAccountName; + KubernetesSecretType = kubernetesSecretType; + ForceSynchronization = forceSynchronization; + ObjectSecretMapping = objectSecretMapping; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// SecretProviderClassName specifies the name of the SecretProviderClass resource, which contains the information needed to access the cloud provider secret store. + public string SecretProviderClassName { get; set; } + /// ServiceAccountName specifies the name of the service account used to access the cloud provider secret store. The audience field in the service account token must be passed as parameter in the controller configuration. The audience is used when requesting a token from the API server for the service account; the supported audiences are defined by each provider. + public string ServiceAccountName { get; set; } + /// Type specifies the type of the Kubernetes secret object, e.g. "Opaque" or"kubernetes.io/tls". The controller must have permission to create secrets of the specified type. + public KubernetesSecretType? KubernetesSecretType { get; set; } + /// ForceSynchronization can be used to force the secret synchronization. The secret synchronization is triggered by changing the value in this field. This field is not used to resolve synchronization conflicts. + public string ForceSynchronization { get; set; } + /// An array of SecretObjectData that maps secret data from the external secret provider to the Kubernetes secret. Each entry specifies the source secret in the external provider and the corresponding key in the Kubernetes secret. + public IList ObjectSecretMapping { get; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretsStoreExtensionProvisioningState.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretsStoreExtensionProvisioningState.cs new file mode 100644 index 000000000000..38b3831cf302 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/Models/SecretsStoreExtensionProvisioningState.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.SecretsStoreExtension.Models +{ + /// Provisioning state of the resource. + public readonly partial struct SecretsStoreExtensionProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecretsStoreExtensionProvisioningState(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 SecretsStoreExtensionProvisioningState Succeeded { get; } = new SecretsStoreExtensionProvisioningState(SucceededValue); + /// Resource creation failed. + public static SecretsStoreExtensionProvisioningState Failed { get; } = new SecretsStoreExtensionProvisioningState(FailedValue); + /// Resource creation was canceled. + public static SecretsStoreExtensionProvisioningState Canceled { get; } = new SecretsStoreExtensionProvisioningState(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SecretsStoreExtensionProvisioningState left, SecretsStoreExtensionProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecretsStoreExtensionProvisioningState left, SecretsStoreExtensionProvisioningState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SecretsStoreExtensionProvisioningState(string value) => new SecretsStoreExtensionProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecretsStoreExtensionProvisioningState other && Equals(other); + /// + public bool Equals(SecretsStoreExtensionProvisioningState 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/ProviderConstants.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/ProviderConstants.cs new file mode 100644 index 000000000000..1b9edbef5fd9 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretsStoreExtension +{ + internal static class ProviderConstants + { + public static string DefaultProviderNamespace { get; } = ClientDiagnostics.GetResourceProviderNamespace(typeof(ProviderConstants).Assembly); + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/AzureKeyVaultSecretProviderClassesRestOperations.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/AzureKeyVaultSecretProviderClassesRestOperations.cs new file mode 100644 index 000000000000..12d1f9f831cf --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/AzureKeyVaultSecretProviderClassesRestOperations.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.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + internal partial class AzureKeyVaultSecretProviderClassesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AzureKeyVaultSecretProviderClassesRestOperations. + /// 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 AzureKeyVaultSecretProviderClassesRestOperations(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-08-21-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName) + { + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + KeyVaultSecretProviderClassData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((KeyVaultSecretProviderClassData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the properties of an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + KeyVaultSecretProviderClassData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = KeyVaultSecretProviderClassData.DeserializeKeyVaultSecretProviderClassData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((KeyVaultSecretProviderClassData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Creates, or updates, an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName, 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, or updates, an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName, 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassPatch 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassPatch 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, 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 an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName, 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 an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, KeyVaultSecretProviderClassPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName, 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 azureKeyVaultSecretProviderClassName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string azureKeyVaultSecretProviderClassName) + { + 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.SecretSyncController/azureKeyVaultSecretProviderClasses/", false); + uri.AppendPath(azureKeyVaultSecretProviderClassName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + 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 an AzureKeyVaultSecretProviderClass instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the AzureKeyVaultSecretProviderClass. + /// 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 azureKeyVaultSecretProviderClassName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(azureKeyVaultSecretProviderClassName, nameof(azureKeyVaultSecretProviderClassName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, azureKeyVaultSecretProviderClassName); + _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.SecretSyncController/azureKeyVaultSecretProviderClasses", 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.SecretSyncController/azureKeyVaultSecretProviderClasses", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the AzureKeyVaultSecretProviderClass instances within a 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the AzureKeyVaultSecretProviderClass instances within a 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(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.SecretSyncController/azureKeyVaultSecretProviderClasses", 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.SecretSyncController/azureKeyVaultSecretProviderClasses", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the AzureKeyVaultSecretProviderClass instances 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the AzureKeyVaultSecretProviderClass instances 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(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; + } + + /// Lists the AzureKeyVaultSecretProviderClass instances within a 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the AzureKeyVaultSecretProviderClass instances within a 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(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 the AzureKeyVaultSecretProviderClass instances 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the AzureKeyVaultSecretProviderClass instances 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: + { + AzureKeyVaultSecretProviderClassListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AzureKeyVaultSecretProviderClassListResult.DeserializeAzureKeyVaultSecretProviderClassListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/SecretSyncsRestOperations.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/SecretSyncsRestOperations.cs new file mode 100644 index 000000000000..dbc1198406d5 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/RestOperations/SecretSyncsRestOperations.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.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + internal partial class SecretSyncsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of SecretSyncsRestOperations. + /// 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 SecretSyncsRestOperations(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-08-21-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string secretSyncName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string secretSyncName) + { + 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the properties of a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, secretSyncName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SecretSyncData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SecretSyncData.DeserializeSecretSyncData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SecretSyncData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the properties of a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, secretSyncName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SecretSyncData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SecretSyncData.DeserializeSecretSyncData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SecretSyncData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string secretSyncName, SecretSyncData 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string secretSyncName, SecretSyncData 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, 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 a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, SecretSyncData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, secretSyncName, 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 a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, SecretSyncData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, secretSyncName, 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 secretSyncName, SecretSyncPatch 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string secretSyncName, SecretSyncPatch 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Updates a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, SecretSyncPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, secretSyncName, 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 a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, SecretSyncPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, secretSyncName, 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 secretSyncName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string secretSyncName) + { + 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.SecretSyncController/secretSyncs/", false); + uri.AppendPath(secretSyncName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Deletes a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, secretSyncName); + 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 a SecretSync instance. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the SecretSync. + /// 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 secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, secretSyncName); + _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.SecretSyncController/secretSyncs", 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.SecretSyncController/secretSyncs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SecretSync instances within a 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: + { + SecretSyncListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SecretSyncListResult.DeserializeSecretSyncListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SecretSync instances within a 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: + { + SecretSyncListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SecretSyncListResult.DeserializeSecretSyncListResult(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.SecretSyncController/secretSyncs", 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.SecretSyncController/secretSyncs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Lists the SecretSync instances 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: + { + SecretSyncListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SecretSyncListResult.DeserializeSecretSyncListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SecretSync instances 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: + { + SecretSyncListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SecretSyncListResult.DeserializeSecretSyncListResult(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; + } + + /// Lists the SecretSync instances within a 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: + { + SecretSyncListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SecretSyncListResult.DeserializeSecretSyncListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SecretSync instances within a 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: + { + SecretSyncListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SecretSyncListResult.DeserializeSecretSyncListResult(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 the SecretSync instances 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: + { + SecretSyncListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SecretSyncListResult.DeserializeSecretSyncListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Lists the SecretSync instances 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: + { + SecretSyncListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SecretSyncListResult.DeserializeSecretSyncListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncCollection.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncCollection.cs new file mode 100644 index 000000000000..90636837d6f8 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncCollection.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.SecretsStoreExtension +{ + /// + /// 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 GetSecretSyncs method from an instance of . + /// + public partial class SecretSyncCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _secretSyncClientDiagnostics; + private readonly SecretSyncsRestOperations _secretSyncRestClient; + + /// Initializes a new instance of the class for mocking. + protected SecretSyncCollection() + { + } + + /// 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 SecretSyncCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _secretSyncClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", SecretSyncResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SecretSyncResource.ResourceType, out string secretSyncApiVersion); + _secretSyncRestClient = new SecretSyncsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, secretSyncApiVersion); +#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 a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-08-21-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 SecretSync. + /// 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 secretSyncName, SecretSyncData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, data, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(new SecretSyncOperationSource(Client), _secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, 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 a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2024-08-21-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 SecretSync. + /// 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 secretSyncName, SecretSyncData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _secretSyncRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, data, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(new SecretSyncOperationSource(Client), _secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.Get"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.Get"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Lists the SecretSync instances within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-08-21-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) => _secretSyncRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _secretSyncRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SecretSyncResource(Client, SecretSyncData.DeserializeSecretSyncData(e)), _secretSyncClientDiagnostics, Pipeline, "SecretSyncCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Lists the SecretSync instances within a resource group. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs + /// + /// + /// Operation Id + /// SecretSync_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2024-08-21-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) => _secretSyncRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _secretSyncRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SecretSyncResource(Client, SecretSyncData.DeserializeSecretSyncData(e)), _secretSyncClientDiagnostics, Pipeline, "SecretSyncCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.Exists"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.Exists"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the SecretSync. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string secretSyncName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(secretSyncName, nameof(secretSyncName)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncCollection.GetIfExists"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, secretSyncName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.Serialization.cs new file mode 100644 index 000000000000..592a0f235644 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.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.Json; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + public partial class SecretSyncData : 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(SecretSyncData)} 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); + JsonSerializer.Serialize(writer, ExtendedLocation); + } + } + + SecretSyncData 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(SecretSyncData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretSyncData(document.RootElement, options); + } + + internal static SecretSyncData DeserializeSecretSyncData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + SecretSyncProperties properties = 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 = SecretSyncProperties.DeserializeSecretSyncProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = JsonSerializer.Deserialize(property.Value.GetRawText()); + 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 = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretSyncData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + 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, AzureResourceManagerSecretsStoreExtensionContext.Default); + default: + throw new FormatException($"The model {nameof(SecretSyncData)} does not support writing '{options.Format}' format."); + } + } + + SecretSyncData 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 DeserializeSecretSyncData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretSyncData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.cs new file mode 100644 index 000000000000..7e2eef8e5d51 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncData.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// + /// A class representing the SecretSync data model. + /// The SecretSync resource. + /// + public partial class SecretSyncData : 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 SecretSyncData(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 SecretSyncData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, SecretSyncProperties properties, ExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretSyncData() + { + } + + /// The resource-specific properties for this resource. + public SecretSyncProperties Properties { get; set; } + /// Gets or sets the extended location. + public ExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.Serialization.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.Serialization.cs new file mode 100644 index 000000000000..a384d86a8d73 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.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.SecretsStoreExtension +{ + public partial class SecretSyncResource : IJsonModel + { + private static SecretSyncData s_dataDeserializationInstance; + private static SecretSyncData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SecretSyncData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecretsStoreExtensionContext.Default); + + SecretSyncData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecretsStoreExtensionContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.cs new file mode 100644 index 000000000000..b93aa29c7797 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Generated/SecretSyncResource.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.SecretsStoreExtension.Models; + +namespace Azure.ResourceManager.SecretsStoreExtension +{ + /// + /// A Class representing a SecretSync 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 GetSecretSyncResource method. + /// Otherwise you can get one from its parent resource using the GetSecretSync method. + /// + public partial class SecretSyncResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The secretSyncName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string secretSyncName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _secretSyncClientDiagnostics; + private readonly SecretSyncsRestOperations _secretSyncRestClient; + private readonly SecretSyncData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.SecretSyncController/secretSyncs"; + + /// Initializes a new instance of the class for mocking. + protected SecretSyncResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SecretSyncResource(ArmClient client, SecretSyncData 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 SecretSyncResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _secretSyncClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.SecretsStoreExtension", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string secretSyncApiVersion); + _secretSyncRestClient = new SecretSyncsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, secretSyncApiVersion); +#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 SecretSyncData 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 the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Get"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the properties of a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Get"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SecretSyncResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Delete + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Delete"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(_secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.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 a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Delete + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Delete"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(_secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.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 a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Update + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, SecretSyncPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Update"); + scope.Start(); + try + { + var response = await _secretSyncRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new SecretsStoreExtensionArmOperation(new SecretSyncOperationSource(Client), _secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.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 a SecretSync instance. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Update + /// + /// + /// Default Api Version + /// 2024-08-21-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, SecretSyncPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.Update"); + scope.Start(); + try + { + var response = _secretSyncRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new SecretsStoreExtensionArmOperation(new SecretSyncOperationSource(Client), _secretSyncClientDiagnostics, Pipeline, _secretSyncRestClient.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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SecretSyncPatch(); + 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SecretSyncPatch(); + 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SecretSyncPatch(); + 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SecretSyncPatch(); + 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 _secretSyncRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new SecretSyncPatch(); + 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.SecretSyncController/secretSyncs/{secretSyncName} + /// + /// + /// Operation Id + /// SecretSync_Get + /// + /// + /// Default Api Version + /// 2024-08-21-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 = _secretSyncClientDiagnostics.CreateScope("SecretSyncResource.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 = _secretSyncRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new SecretSyncResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new SecretSyncPatch(); + 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/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Properties/AssemblyInfo.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/src/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..5209dbba0fd8 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/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.SecretSyncController")] + +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] +[assembly: InternalsVisibleTo("Azure.ResourceManager.SecretsStoreExtension.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100d15ddcb29688295338af4b7686603fe614abd555e09efba8fb88ee09e1f7b1ccaeed2e8f823fa9eef3fdd60217fc012ea67d2479751a0b8c087a4185541b851bd8b16f8d91b840e51b1cb0ba6fe647997e57429265e85ef62d565db50a69ae1647d54d7bd855e4db3d8a91510e5bcbd0edfbbecaa20a7bd9ae74593daa7b11b4")] diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Azure.ResourceManager.SecretsStoreExtension.Tests.csproj b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Azure.ResourceManager.SecretsStoreExtension.Tests.csproj new file mode 100644 index 000000000000..ca5c999b0a61 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/Azure.ResourceManager.SecretsStoreExtension.Tests.csproj @@ -0,0 +1,5 @@ + + + + + diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretProviderClassTests.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretProviderClassTests.cs new file mode 100644 index 000000000000..56a62e25d6da --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretProviderClassTests.cs @@ -0,0 +1,239 @@ +// 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.Resources; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; +using NUnit.Framework; + +using static Azure.ResourceManager.SecretsStoreExtension.Tests.SseTestData; + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + // Primary constructor takes objects which are used to manage RP objects. + internal class SecretProviderClassTests( + ArmClient client, SubscriptionResource subscription, + ResourceGroupResource rg, KeyVaultSecretProviderClassCollection akvspcc, + SecretsStoreExtensionManagementTestEnvironment te, Func delay) + { + internal async Task TestCreateAsync() + { + await CreateAsync(); + await TestExistsAndGetAsync(true); + } + + internal async Task TestDeleteAsync() + { + await DeleteAsync(); + await TestExistsAndGetAsync(false); + } + + // Create the SPC via the RP API. + private async Task CreateAsync() + { + var location = new AzureLocation(te.SpcLocation); + + KeyVaultSecretProviderClassData data = new(location) + { + ExtendedLocation = new ExtendedLocation() + { + Name = $"/subscriptions/{te.SpcSubscriptionId}/resourceGroups/{te.ClusterResourceGroup}/providers/microsoft.extendedlocation/customLocations/{CustomLocationName}", + ExtendedLocationType = new("CustomLocation") + }, + Properties = new KeyVaultSecretProviderClassProperties(te.SpcKeyVaultName, te.SpcClientId, te.SpcTenantId) + { + Objects = CreateObjectString(RpSecretName1, RpSecretName2) + }, + Tags = { } + }; + + // AzureKeyVaultSecretProviderClassCollection.CreateOrUpdateAsync + await akvspcc.CreateOrUpdateAsync(WaitUntil.Completed, SpcName, data); + } + + // Tests whether the SPC exists and, if so, that it can be retrieved via various APIs + // and contains the expected data. + private async Task TestExistsAndGetAsync(bool shouldExist) + { + // AzureKeyVaultSecretProviderClassCollection.ExistsAsync + var exists = (await akvspcc.ExistsAsync(SpcName)).Value; + Assert.AreEqual(exists, shouldExist); + + // AzureKeyVaultSecretProviderClassCollection.GetAsync + if (shouldExist) + { + KeyVaultSecretProviderClassResource spc = (await akvspcc.GetAsync(SpcName)).Value; + CheckContents(spc); + } + + // AzureKeyVaultSecretProviderClassCollection.GetIfExistsAsync + NullableResponse nr = await akvspcc.GetIfExistsAsync(SpcName); + Assert.AreEqual(nr.HasValue, shouldExist); + if (shouldExist) + { + CheckContents(nr.Value); + // KeyVaultSecretProviderClassResource.GetAsync + KeyVaultSecretProviderClassResource spc = (await nr.Value.GetAsync()).Value; + CheckContents(spc); + } + + // AzureKeyVaultSecretProviderClassCollection.GetAllAsync + List spcs = await akvspcc.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(spcs.Any(), shouldExist); + if (shouldExist) + { + Assert.AreEqual(spcs.Count, 1); + CheckContents(spcs[0]); + } + } + + // Exercise the update API by changing which AKV secrets are listed in the SPC. + internal async Task TestUpdateAsync() + { + await SetSecretNamesAsync(RpSecretName3, RpSecretName4); + await SetSecretNamesAsync(RpSecretName1, RpSecretName2); + } + + // Helper function for UpdateSecretName sets secret names in the SPC, to test update API. + private async Task SetSecretNamesAsync(string secretNameA, string secretNameB) + { + KeyVaultSecretProviderClassResource spc = await GetSpcAsync(); + + var patch = new KeyVaultSecretProviderClassPatch() + { + Properties = new AzureKeyVaultSecretProviderClassUpdateProperties() + { + Objects = CreateObjectString(secretNameA, secretNameB) + } + }; + + // KeyVaultSecretProviderClassResource.UpdateAsync + await spc.UpdateAsync(WaitUntil.Completed, patch); + await GetAndCheckContentsAsync(expectedSecretName1: secretNameA, expectedSecretName2: secretNameB); + } + + // Add, remove, and replace tags. + internal async Task TestTagsAsync() + { + KeyVaultSecretProviderClassResource spc = await GetSpcAsync(); + + // SecretSyncResource.SetTagsAsync + var expectedTags = new Dictionary(); + await spc.SetTagsAsync(expectedTags); + spc = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // KeyVaultSecretProviderClassResource.AddTagAsync + expectedTags = new Dictionary { { Tag1Name, Tag1Value } }; + await spc.AddTagAsync(Tag1Name, Tag1Value); + spc = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // KeyVaultSecretProviderClassResource.AddTagAsync + expectedTags.Add(Tag2Name, Tag2Value); + await spc.AddTagAsync(Tag2Name, Tag2Value); + spc = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // KeyVaultSecretProviderClassResource.RemoveTagAsync + expectedTags.Remove(Tag1Name); + await spc.RemoveTagAsync(Tag1Name); + spc = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // KeyVaultSecretProviderClassResource.SetTagsAsync + expectedTags = new Dictionary { { Tag3Name, Tag3Value }, { Tag4Name, Tag4Value } }; + await spc.SetTagsAsync(expectedTags); + await GetAndCheckContentsAsync(expectedTags: expectedTags); + } + + // Test extension APIs which are defined in SecretsStoreExtensionExtensions. + internal async Task TestExtensionsAsync() + { + // SecretsStoreExtensionExtensions.GetAzureKeyVaultSecretProviderClasses (extends ResourceGroupResource) + // is already called from DoSecretProviderClassTestAsync. + + // SecretsStoreExtensionExtensions.GetAzureKeyVaultSecretProviderClassAsync (extends ResourceGroupResource). + KeyVaultSecretProviderClassResource spc = (await rg.GetKeyVaultSecretProviderClassAsync(SpcName)).Value; + CheckContents(spc); + + // SecretsStoreExtensionExtensions.GetAzureKeyVaultSecretProviderClassResource (extends ArmClient). + spc = client.GetKeyVaultSecretProviderClassResource(spc.Id); + spc = (await spc.GetAsync()).Value; + CheckContents(spc); + + // SecretsStoreExtensionExtensions.GetAzureKeyVaultSecretProviderClassesAsync (extends SubscriptionResource). + List spcsAsync = await subscription.GetKeyVaultSecretProviderClassesAsync().ToEnumerableAsync(); + Assert.AreEqual(spcsAsync.Count, 1); + CheckContents(spcsAsync[0]); + } + + // Delete the SPC via the RP API. + private async Task DeleteAsync() + { + KeyVaultSecretProviderClassResource spc = await GetSpcAsync(); + await spc.DeleteAsync(WaitUntil.Completed); + + var exists = (await akvspcc.ExistsAsync(spc.Id.Name)).Value; + Assert.IsFalse(exists); + } + + // Retrieve the latest version of the SPC. + private async Task GetSpcAsync() + { + return (await rg.GetKeyVaultSecretProviderClassAsync(SpcName)).Value; + } + + // Retrieve the latest version of the SPC and optionally check whether certain fields + // contain the supplied expected values. + private async Task GetAndCheckContentsAsync( + string expectedSecretName1 = null, string expectedSecretName2 = null, + Dictionary expectedTags = null) + { + await delay(4); + + KeyVaultSecretProviderClassResource spc = await GetSpcAsync(); + CheckContents(spc, expectedSecretName1, expectedSecretName2, expectedTags); + return spc; + } + + // Ensure the supplied SPC contains the expected data. + private void CheckContents( + KeyVaultSecretProviderClassResource spc, + string expectedSecretName1 = null, string expectedSecretName2 = null, + Dictionary expectedTags = null) + { + Assert.AreEqual(SpcName, spc.Data.Name); + Assert.AreEqual(te.SpcKeyVaultName, spc.Data.Properties.KeyvaultName); + + Assert.AreEqual(te.SpcClientId, spc.Data.Properties.ClientId); + Assert.AreEqual(te.SpcTenantId, spc.Data.Properties.TenantId); + + // Ensure the supplied object has the expected secret name. + if (expectedSecretName1 is not null && expectedSecretName2 is not null) + { + string expectedObjects = CreateObjectString(expectedSecretName1, expectedSecretName2); + Assert.AreEqual(spc.Data.Properties.Objects, expectedObjects); + } + + // Ensure the supplied object has the expected tags. + if (expectedTags is not null) + { + Assert.AreEqual(expectedTags.Count, spc.Data.Tags.Count); + foreach (KeyValuePair kv in spc.Data.Tags) + { + Assert.IsTrue(expectedTags.ContainsKey(kv.Key)); + Assert.AreEqual(expectedTags[kv.Key], kv.Value); + } + } + } + + // Generate the string value for the objects field, which contains the secret names and types. + private static string CreateObjectString(string secretName1, string secretName2) + { + return $"array:\n - |\n objectName: {secretName1}\n objectType: secret\n - |\n objectName: {secretName2}\n objectType: secret\n"; + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretSyncTests.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretSyncTests.cs new file mode 100644 index 000000000000..ac6c9b4bbf11 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretSyncTests.cs @@ -0,0 +1,236 @@ +// 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.TestFramework; +using Azure.ResourceManager.Resources; +using NUnit.Framework; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; +using Azure.ResourceManager.SecretsStoreExtension.Models; + +using static Azure.ResourceManager.SecretsStoreExtension.Tests.SseTestData; + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + // Primary constructor takes objects which are used to manage RP objects. + internal class SecretSyncTests( + ArmClient client, SubscriptionResource subscription, + ResourceGroupResource rg, SecretSyncCollection ssc, + SecretsStoreExtensionManagementTestEnvironment te, Func delay) + { + internal async Task TestCreateAsync() + { + await CreateAsync(); + await TestExistsAndGetAsync(true); + } + + internal async Task TestDeleteAsync() + { + await DeleteAsync(); + await TestExistsAndGetAsync(false); + } + + // Create a SecretSync via the RP API. + private async Task CreateAsync() + { + var location = new AzureLocation(te.SpcLocation); + var secretType = new KubernetesSecretType("Opaque"); + KubernetesSecretObjectMapping[] oms = { + new(sourcePath: RpSecretName1, targetKey: RpSecretName1) + }; + + var ssData = new SecretSyncData(location) + { + ExtendedLocation = new ExtendedLocation() + { + Name = $"/subscriptions/{te.SpcSubscriptionId}/resourceGroups/{te.ClusterResourceGroup}/providers/microsoft.extendedlocation/customLocations/{CustomLocationName}", + ExtendedLocationType = new("CustomLocation") + }, + Properties = new SecretSyncProperties(SpcName, ServiceAccountName, secretType, oms) + }; + + await ssc.CreateOrUpdateAsync(WaitUntil.Completed, SsName, ssData); + } + + // Tests whether the SecretSync exists and, if so, that it can be retrieved via various APIs + // and contains the expected data. + private async Task TestExistsAndGetAsync(bool shouldExist) + { + // SecretSyncCollection.ExistsAsync + var exists = (await ssc.ExistsAsync(SsName)).Value; + Assert.AreEqual(exists, shouldExist); + + // SecretSyncCollection.GetAsync + if (shouldExist) + { + SecretSyncResource ss = (await ssc.GetAsync(SsName)).Value; + CheckContents(ss); + } + + // SecretSyncCollection.GetIfExistsAsync + NullableResponse nr = await ssc.GetIfExistsAsync(SsName); + Assert.AreEqual(nr.HasValue, shouldExist); + if (shouldExist) + { + CheckContents(nr.Value); + // SecretSyncResource.GetAsync + SecretSyncResource ss = (await nr.Value.GetAsync()).Value; + CheckContents(ss); + } + + // SecretSyncCollection.GetAllAsync + List secretSyncs = await ssc.GetAllAsync().ToEnumerableAsync(); + Assert.AreEqual(secretSyncs.Any(), shouldExist); + if (shouldExist) + { + Assert.AreEqual(secretSyncs.Count, 1); + CheckContents(secretSyncs[0]); + } + } + + // Test the update API by changing the source path and target key. + internal async Task TestUpdateAsync() + { + await SetSecretMappingAsync(RpSecretName2, RpSecretName2); + await SetSecretMappingAsync(RpSecretName1, RpSecretName1); + } + + // Helper function for TestUpdate updates the source path and target key, + // and then tests the object contains the expected values. + private async Task SetSecretMappingAsync(string sourcePath, string targetKey) + { + SecretSyncResource ss = await GetSecretSyncAsync(); + + SecretSyncProperties props = ss.Data.Properties; + KubernetesSecretObjectMapping[] oms = { + new(sourcePath: sourcePath, targetKey: targetKey) + }; + + var patch = new SecretSyncPatch() + { + Properties = new SecretSyncUpdateProperties( + secretProviderClassName: props.SecretProviderClassName, + serviceAccountName: props.ServiceAccountName, + kubernetesSecretType: props.KubernetesSecretType, + forceSynchronization: props.ForceSynchronization, + objectSecretMapping: oms, + serializedAdditionalRawData: null) + }; + + await ss.UpdateAsync(WaitUntil.Completed, patch); + await GetAndCheckContentsAsync(expectedSourcePath: sourcePath, expectedTargetKey: targetKey); + } + + // Add, remove, and replace tags. + internal async Task TestTagsAsync() + { + SecretSyncResource ss = await GetSecretSyncAsync(); + + // SecretSyncResource.SetTagsAsync + var expectedTags = new Dictionary(); + await ss.SetTagsAsync(expectedTags); + ss = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // SecretSyncResource.AddTagAsync + expectedTags.Add(Tag1Name, Tag1Value); + await ss.AddTagAsync(Tag1Name, Tag1Value); + ss = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // SecretSyncResource.AddTagAsync + expectedTags.Add(Tag2Name, Tag2Value); + await ss.AddTagAsync(Tag2Name, Tag2Value); + ss = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // SecretSyncResource.RemoveTagAsync + expectedTags.Remove(Tag1Name); + await ss.RemoveTagAsync(Tag1Name); + ss = await GetAndCheckContentsAsync(expectedTags: expectedTags); + + // SecretSyncResource.SetTagsAsync + expectedTags = new Dictionary { { Tag3Name, Tag3Value }, { Tag4Name, Tag4Value } }; + await ss.SetTagsAsync(expectedTags); + await GetAndCheckContentsAsync(expectedTags: expectedTags); + } + + // Test extension APIs which are defined in SecretsStoreExtensionExtensions. + internal async Task TestExtensionsAsync() + { + // SecretsStoreExtensionExtensions.GetSecretSyncs (extends ResourceGroupResource) + // is already called from DoTestSecretSyncCrudAsync. + + SecretSyncResource ss = await GetSecretSyncAsync(); + + // SecretsStoreExtensionExtensions.GetSecretSyncResource (extends ArmClient). + ss = client.GetSecretSyncResource(ss.Id); + ss = (await ss.GetAsync()).Value; + CheckContents(ss); + + // SecretsStoreExtensionExtensions.GetSecretSyncsAsync (extends ResourceGroupResource) + ss = (await rg.GetSecretSyncAsync(SsName)).Value; + CheckContents(ss); + + // SecretsStoreExtensionExtensions.GetSecretSyncsAsync (extends SubscriptionResource) + List secretSyncsAsync = await subscription.GetSecretSyncsAsync().ToEnumerableAsync(); + Assert.AreEqual(secretSyncsAsync.Count, 1); + CheckContents(secretSyncsAsync[0]); + } + + // Delete the SecretSync via the RP API. + private async Task DeleteAsync() + { + SecretSyncResource ss = await GetSecretSyncAsync(); + await ss.DeleteAsync(WaitUntil.Completed); + } + + // Retrieve the latest version of the SecretSync. + private async Task GetSecretSyncAsync() + { + return (await rg.GetSecretSyncAsync(SsName)).Value; + } + + // Retrieve the latest version of the SecretSync and optionally check whether certain fields + // contain the supplied expected values. + private async Task GetAndCheckContentsAsync( + string expectedSourcePath = null, string expectedTargetKey = null, Dictionary expectedTags = null) + { + await delay(3); + + SecretSyncResource ss = await GetSecretSyncAsync(); + CheckContents(ss, expectedSourcePath, expectedTargetKey, expectedTags); + return ss; + } + + // Ensure the supplied SecretSync contains the expected data. + private static void CheckContents( + SecretSyncResource ss, + string expectedSourcePath = null, string expectedTargetPath = null, + Dictionary expectedTags = null) + { + Assert.AreEqual(ss.Data.Name, SsName); + Assert.AreEqual(ss.Data.Properties.SecretProviderClassName, SpcName); + Assert.AreEqual(ss.Data.Properties.ServiceAccountName, ServiceAccountName); + + if (expectedSourcePath is not null && expectedTargetPath is not null) + { + var osm = ss.Data.Properties.ObjectSecretMapping; + Assert.AreEqual(osm.Count, 1); + Assert.AreEqual(osm[0].SourcePath, expectedSourcePath); + Assert.AreEqual(osm[0].TargetKey, expectedTargetPath); + } + + if (expectedTags is not null) + { + Assert.AreEqual(expectedTags.Count, ss.Data.Tags.Count); + foreach (KeyValuePair kv in ss.Data.Tags) + { + Assert.IsTrue(expectedTags.ContainsKey(kv.Key)); + Assert.AreEqual(expectedTags[kv.Key], kv.Value); + } + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestBase.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestBase.cs new file mode 100644 index 000000000000..b7b7c9a58bb1 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestBase.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using Azure.Core.TestFramework.Models; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.TestFramework; +using System; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + public class SecretsStoreExtensionManagementTestBase : ManagementRecordedTestBase + { + protected ArmClient Client { get; private set; } + protected SubscriptionResource DefaultSubscription { get; private set; } + + private const string GuidRegex = @"[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"; + private const string SanitizedSubscriptionId = SecretsStoreExtensionManagementTestEnvironment.NullGuid; + + protected SecretsStoreExtensionManagementTestBase(bool isAsync) + : base(isAsync) + { + SanitizeTenant(); + SanitizeDisplayName(); + SanitizeSubscriptionId(); + SanitizeLocation(); + SanitizeKeyVault(); + } + + // Sanitizes the tenant ID. + private void SanitizeTenant() + { + HeaderRegexSanitizers.Add(new HeaderRegexSanitizer("x-ms-operation-identifier") + { + Regex = "^.*$", + Value = "Sanitized" + }); + } + + // Sanitizes the tenant display name. + private void SanitizeDisplayName() + { + const string SanitizedDisplayName = "Sanitized"; + BodyKeySanitizers.Add(new BodyKeySanitizer("displayName") + { + Value = SanitizedDisplayName + }); + } + + // Prevent the subscription ID from appearing in the log files. + private void SanitizeSubscriptionId() + { + // Replace subscription ID subpath in URI with sanitized version. + const string subscriptionRegex = $@"/subscriptions/(?{GuidRegex})"; + UriRegexSanitizers.Add(new UriRegexSanitizer(subscriptionRegex) + { + Value = SanitizedSubscriptionId, + GroupForReplace = "subscription" + }); + + // Replace subscription ID in Location header. + HeaderRegexSanitizers.Add(new HeaderRegexSanitizer("Location") + { + Regex = subscriptionRegex, + Value = SanitizedSubscriptionId, + GroupForReplace = "subscription" + }); + + // Replace subscription ID field in response body with sanitized version. + BodyKeySanitizers.Add(new BodyKeySanitizer("subscriptionId") + { + Value = SanitizedSubscriptionId + }); + + // Replace subscription ID subpath in response body with sanitized version. + BodyRegexSanitizers.Add(new BodyRegexSanitizer(subscriptionRegex) + { + Value = SanitizedSubscriptionId, + GroupForReplace = "subscription" + }); + + // Replace subscription ID in Azure-AsyncOperation header. + HeaderRegexSanitizers.Add(new HeaderRegexSanitizer("Azure-AsyncOperation") + { + Regex = subscriptionRegex, + Value = SanitizedSubscriptionId, + GroupForReplace = "subscription" + }); + } + + // Prevent the geographical location from appearing in the log files. + private void SanitizeLocation() + { + // Replace location in URIs. + const string locationRegex = $@"/subscriptions/{GuidRegex}/providers/Microsoft.SecretSyncController/locations/(?[^/]+)/"; + const string SanitizedLocation = "Sanitized"; + UriRegexSanitizers.Add(new UriRegexSanitizer(locationRegex) + { + Value = SanitizedLocation, + GroupForReplace = "location" + }); + + // Replace location in response headers. + HeaderRegexSanitizers.Add(new HeaderRegexSanitizer("Location") + { + Regex = locationRegex, + Value = SanitizedLocation, + GroupForReplace = "location" + }); + + // Replace location in response bodies. + BodyKeySanitizers.Add(new BodyKeySanitizer("location") + { + Value = SanitizedLocation + }); + + BodyKeySanitizers.Add(new BodyKeySanitizer("value[*].location") + { + Value = SanitizedLocation + }); + + // Replace location in response body + BodyRegexSanitizers.Add(new BodyRegexSanitizer(locationRegex) + { + Value = SanitizedLocation, + GroupForReplace = "location" + }); + + // Replace location in Azure-AsyncOperation header value. + HeaderRegexSanitizers.Add(new HeaderRegexSanitizer("Azure-AsyncOperation") + { + Regex = locationRegex, + Value = SanitizedLocation, + GroupForReplace = "location" + }); + } + + // Prevent the key vault name from appearing in the log files. + private void SanitizeKeyVault() + { + // Sanitize keyvault name. + JsonPathSanitizers.Add("$..keyvaultName"); + } + + protected async Task CreateCommonClient() + { + Client = GetArmClient(subscriptionId: TestEnvironment.SpcSubscriptionId); + DefaultSubscription = await Client.GetSubscriptions().GetAsync(TestEnvironment.SpcSubscriptionId); + } + + // The tag tests take around 30 seconds in playback mode. + private readonly TimeSpan _maxTimeout = TimeSpan.FromSeconds(60); + + public override void GlobalTimeoutTearDown() + { + var duration = DateTime.UtcNow - TestStartTime; + if (duration > _maxTimeout) { + base.GlobalTimeoutTearDown(); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestEnvironment.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestEnvironment.cs new file mode 100644 index 000000000000..7adb77378150 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTestEnvironment.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using Azure.Core.TestFramework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + // Provides access to environment variables which are used during test run. + // Constant values are defined in SseTestData. + public class SecretsStoreExtensionManagementTestEnvironment : TestEnvironment + { + // Used to sanitize GUIDs in the log files. + public const string NullGuid = "00000000-0000-0000-0000-000000000000"; + + // Resource group in which the cluster, key vault, custom locations, and UAMI are defined. + public string ClusterResourceGroup => GetRecordedVariable("CLUSTER_RESOURCE_GROUP"); + // Geographical location. + public string SpcLocation => GetRecordedVariable("SPC_LOCATION", options => options.IsSecret()); + + // Tenant which contains the cluster subscription. The tests must be run while logged into this tenant. + public Guid SpcTenantId => Guid.Parse(GetRecordedVariable("SPC_TENANT_ID", options => options.IsSecret(NullGuid))); + // Subscription which contains the cluster resource group. + public string SpcSubscriptionId => GetRecordedVariable("SPC_SUBSCRIPTION_ID", options => options.IsSecret(NullGuid)); + + // UAMI which is used to retrieve the secrets from AKV. + public Guid SpcClientId => Guid.Parse(GetRecordedVariable("SPC_CLIENT_ID", options => options.IsSecret(NullGuid))); + // Key vault which stores the secrets to be synchronized to the cluster. + public string SpcKeyVaultName => GetRecordedVariable("SPC_KEYVAULT_NAME", options => options.IsSecret()); + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTests.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTests.cs new file mode 100644 index 000000000000..471cbdfe26d6 --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SecretsStoreExtensionManagementTests.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + public class SecretsStoreExtensionManagementTests : SecretsStoreExtensionManagementTestBase + { + private SecretProviderClassTests _spct; + private SecretSyncTests _sst; + private ResourceGroupResource _rg; + + public SecretsStoreExtensionManagementTests(bool isAsync) : base(isAsync) + { + } + + [SetUp] + public async Task ClearAndInitialize() + { + if (Mode == RecordedTestMode.Record || Mode == RecordedTestMode.Playback) + { + await CreateCommonClient(); + } + _rg = await GetResourceGroupResourceAsync(); + + KeyVaultSecretProviderClassCollection akvspcc = _rg.GetKeyVaultSecretProviderClasses(); + _spct = new SecretProviderClassTests(Client, DefaultSubscription, _rg, akvspcc, TestEnvironment, Delay); + + SecretSyncCollection ssc = _rg.GetSecretSyncs(); + _sst = new SecretSyncTests(Client, DefaultSubscription, _rg, ssc, TestEnvironment, Delay); + } + + [Test, Order(1000)] + public async Task SpcTestCreate() + { + await _spct.TestCreateAsync(); + } + + [Test, Order(1100)] + public async Task SpcTestUpdate() + { + await _spct.TestUpdateAsync(); + } + + [Test, Order(1200)] + public async Task SpcTestTags() + { + await _spct.TestTagsAsync(); + } + + [Test, Order(1300)] + public async Task SpcTestExtensions() + { + await _spct.TestExtensionsAsync(); + } + + [Test, Order(2000)] + public async Task SsTestCreate() + { + await _sst.TestCreateAsync(); + } + + [Test, Order(2100)] + public async Task SsTestUpdate() + { + await _sst.TestUpdateAsync(); + } + + [Test, Order(2200)] + public async Task SsTestTags() + { + await _sst.TestTagsAsync(); + } + + [Test, Order(2300)] + public async Task SsTestExtensions() + { + await _sst.TestExtensionsAsync(); + } + + [Test, Order(2400)] + public async Task SsTestDelete() + { + await _sst.TestDeleteAsync(); + } + + [Test, Order(3000)] + public async Task SpcTestDelete() + { + await _spct.TestDeleteAsync(); + } + + // Helper function returns the resource group which is used to manage the SPC and SS objects. + private async Task GetResourceGroupResourceAsync() + { + ResourceGroupCollection rgs = DefaultSubscription.GetResourceGroups(); + Response rgrResponse = await rgs.GetAsync(TestEnvironment.ClusterResourceGroup); + Assert.IsTrue(rgrResponse.HasValue); + return rgrResponse.Value; + } + + // Short delay to allow server-side resources to update. Does nothing during playback. + private async Task Delay(int seconds) + { + if (Mode != RecordedTestMode.Playback) + { + var t = TimeSpan.FromSeconds(seconds); + await Task.Delay(t).ConfigureAwait(false); + } + } + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SseTestData.cs b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SseTestData.cs new file mode 100644 index 000000000000..65fb3aa1082d --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tests/SseTestData.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.ResourceManager.SecretsStoreExtension.Tests +{ + // Constant data which is used for the test. Non-constant data should be + // supplied via environment variables and accessed via SecretsStoreExtensionManagementTestEnvironment. + internal static class SseTestData + { + // Name of Kubernetes SPC object. + internal const string SpcName = "sdk-test-spc"; + // Name of Kubernetes SecretSync object. + internal const string SsName = "sdk-test-ss"; + // This custom location must already exist on the cluster. + internal const string CustomLocationName = "sdk-test-custloc"; + // This service account must have already been created and federated with the UAMI. + internal const string ServiceAccountName = "sdk-test-sa"; + // This secret must already exist in the keyvault + internal const string RpSecretName1 = "sdk-test-secret-1"; + // This secret must already exist in the keyvault. + internal const string RpSecretName2 = "sdk-test-secret-2"; + // This secret must already exist in the keyvault. + internal const string RpSecretName3 = "sdk-test-secret-3"; + // This secret must already exist in the keyvault. + internal const string RpSecretName4 = "sdk-test-secret-4"; + + // Values used to test tagging and untagging objects in Azure. + internal const string Tag1Name = "tag-1", Tag1Value = "value-1"; + // Values used to test tagging and untagging objects in Azure. + internal const string Tag2Name = "tag-2", Tag2Value = "value-2"; + // Values used to test tagging and untagging objects in Azure. + internal const string Tag3Name = "tag-3", Tag3Value = "value-3"; + // Values used to test tagging and untagging objects in Azure. + internal const string Tag4Name = "tag-4", Tag4Value = "value-4"; + // Values used to test tagging and untagging objects in Azure. + } +} diff --git a/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tsp-location.yaml b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tsp-location.yaml new file mode 100644 index 000000000000..fd3e9fe2e81b --- /dev/null +++ b/sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/tsp-location.yaml @@ -0,0 +1,3 @@ +directory: specification/ews/SecretSyncController.Management +commit: 54d955f05392c6d680023dd8fb6fde882ec41e56 +repo: Azure/azure-rest-api-specs diff --git a/sdk/secretsstoreextension/ci.mgmt.yml b/sdk/secretsstoreextension/ci.mgmt.yml new file mode 100644 index 000000000000..c595d1fb50b2 --- /dev/null +++ b/sdk/secretsstoreextension/ci.mgmt.yml @@ -0,0 +1,23 @@ +# 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/secretsstoreextension/ci.mgmt.yml + - sdk/secretsstoreextension/Azure.ResourceManager.SecretsStoreExtension/ + +extends: + template: /eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: secretsstoreextension + LimitForPullRequest: true + Artifacts: + - name: Azure.ResourceManager.SecretsStoreExtension + safeName: AzureResourceManagerSecretsStoreExtension diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs index f7a2564b054f..8a73ab43425a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveApplicationControlGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class AdaptiveApplicationControlGroupResource : IJsonModel { + private static AdaptiveApplicationControlGroupData s_dataDeserializationInstance; + private static AdaptiveApplicationControlGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AdaptiveApplicationControlGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); AdaptiveApplicationControlGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs index a486657b917f..b85539ea4d01 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdaptiveNetworkHardeningResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class AdaptiveNetworkHardeningResource : IJsonModel { + private static AdaptiveNetworkHardeningData s_dataDeserializationInstance; + private static AdaptiveNetworkHardeningData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AdaptiveNetworkHardeningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); AdaptiveNetworkHardeningData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingResource.Serialization.cs index 7ba029212d10..16e5ef414dfb 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AdvancedThreatProtectionSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class AdvancedThreatProtectionSettingResource : IJsonModel { + private static AdvancedThreatProtectionSettingData s_dataDeserializationInstance; + private static AdvancedThreatProtectionSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AdvancedThreatProtectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AdvancedThreatProtectionSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); AdvancedThreatProtectionSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingResource.Serialization.cs index 9cd21833d551..5be2b11e6ebf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/AutoProvisioningSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class AutoProvisioningSettingResource : IJsonModel { + private static AutoProvisioningSettingData s_dataDeserializationInstance; + private static AutoProvisioningSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AutoProvisioningSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AutoProvisioningSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); AutoProvisioningSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultResource.Serialization.cs index cae39731ee5d..a941097af4bf 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ComplianceResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class ComplianceResultResource : IJsonModel { + private static ComplianceResultData s_dataDeserializationInstance; + private static ComplianceResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ComplianceResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ComplianceResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); ComplianceResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs index 3e4a7133f316..1835c58b3371 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomAssessmentAutomationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class CustomAssessmentAutomationResource : IJsonModel { + private static CustomAssessmentAutomationData s_dataDeserializationInstance; + private static CustomAssessmentAutomationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomAssessmentAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); CustomAssessmentAutomationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs index 84ddf6084756..df1a8250be97 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/CustomEntityStoreAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class CustomEntityStoreAssignmentResource : IJsonModel { + private static CustomEntityStoreAssignmentData s_dataDeserializationInstance; + private static CustomEntityStoreAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomEntityStoreAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); CustomEntityStoreAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingResource.Serialization.cs index ab1393bca9f8..b8706572a4b0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DefenderForStorageSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DefenderForStorageSettingResource : IJsonModel { + private static DefenderForStorageSettingData s_dataDeserializationInstance; + private static DefenderForStorageSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DefenderForStorageSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DefenderForStorageSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DefenderForStorageSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.Serialization.cs index 93c5a8271ae1..dea782901521 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DevOpsConfigurationResource : IJsonModel { + private static DevOpsConfigurationData s_dataDeserializationInstance; + private static DevOpsConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevOpsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevOpsConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DevOpsConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.Serialization.cs index 31c7ffce3031..442d134455ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsOrgResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DevOpsOrgResource : IJsonModel { + private static DevOpsOrgData s_dataDeserializationInstance; + private static DevOpsOrgData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DevOpsOrgData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.Serialization.cs index 9f108097a092..0d34bd753057 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DevOpsProjectResource : IJsonModel { + private static DevOpsProjectData s_dataDeserializationInstance; + private static DevOpsProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DevOpsProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.Serialization.cs index feaec0bbf1d1..adad9838eaf2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DevOpsRepositoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DevOpsRepositoryResource : IJsonModel { + private static DevOpsRepositoryData s_dataDeserializationInstance; + private static DevOpsRepositoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DevOpsRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DevOpsRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DevOpsRepositoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupResource.Serialization.cs index b9fb08d93ab4..5a0489d5508d 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/DeviceSecurityGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class DeviceSecurityGroupResource : IJsonModel { + private static DeviceSecurityGroupData s_dataDeserializationInstance; + private static DeviceSecurityGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeviceSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeviceSecurityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); DeviceSecurityGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentResource.Serialization.cs index 564b728f1d9c..4013f0a963f1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class GovernanceAssignmentResource : IJsonModel { + private static GovernanceAssignmentData s_dataDeserializationInstance; + private static GovernanceAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GovernanceAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GovernanceAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); GovernanceAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleResource.Serialization.cs index ff73cddba7cb..39df93d93360 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/GovernanceRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class GovernanceRuleResource : IJsonModel { + private static GovernanceRuleData s_dataDeserializationInstance; + private static GovernanceRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GovernanceRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GovernanceRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); GovernanceRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertResource.Serialization.cs index 0c0808757c4e..7dde9860c657 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class IotSecurityAggregatedAlertResource : IJsonModel { + private static IotSecurityAggregatedAlertData s_dataDeserializationInstance; + private static IotSecurityAggregatedAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotSecurityAggregatedAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotSecurityAggregatedAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); IotSecurityAggregatedAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationResource.Serialization.cs index e5784f28f7c2..f5db8feaa690 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecurityAggregatedRecommendationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class IotSecurityAggregatedRecommendationResource : IJsonModel { + private static IotSecurityAggregatedRecommendationData s_dataDeserializationInstance; + private static IotSecurityAggregatedRecommendationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotSecurityAggregatedRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotSecurityAggregatedRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); IotSecurityAggregatedRecommendationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelResource.Serialization.cs index 1f0a4b6c425d..7c6f9c058b5c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionAnalyticsModelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class IotSecuritySolutionAnalyticsModelResource : IJsonModel { + private static IotSecuritySolutionAnalyticsModelData s_dataDeserializationInstance; + private static IotSecuritySolutionAnalyticsModelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotSecuritySolutionAnalyticsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotSecuritySolutionAnalyticsModelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); IotSecuritySolutionAnalyticsModelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionResource.Serialization.cs index 356c484ba5ad..f53a92ae1b96 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/IotSecuritySolutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class IotSecuritySolutionResource : IJsonModel { + private static IotSecuritySolutionData s_dataDeserializationInstance; + private static IotSecuritySolutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IotSecuritySolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IotSecuritySolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); IotSecuritySolutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyResource.Serialization.cs index c1d862a1a149..848e80cb4ba2 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/JitNetworkAccessPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class JitNetworkAccessPolicyResource : IJsonModel { + private static JitNetworkAccessPolicyData s_dataDeserializationInstance; + private static JitNetworkAccessPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - JitNetworkAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + JitNetworkAccessPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); JitNetworkAccessPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentResource.Serialization.cs index 7d1b3f666783..749cc46de84a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class RegulatoryComplianceAssessmentResource : IJsonModel { + private static RegulatoryComplianceAssessmentData s_dataDeserializationInstance; + private static RegulatoryComplianceAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RegulatoryComplianceAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RegulatoryComplianceAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); RegulatoryComplianceAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlResource.Serialization.cs index 19de31aa3fd3..719c6cb6a46a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class RegulatoryComplianceControlResource : IJsonModel { + private static RegulatoryComplianceControlData s_dataDeserializationInstance; + private static RegulatoryComplianceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RegulatoryComplianceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RegulatoryComplianceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); RegulatoryComplianceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardResource.Serialization.cs index 02eb42491c99..62924d221d2e 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/RegulatoryComplianceStandardResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class RegulatoryComplianceStandardResource : IJsonModel { + private static RegulatoryComplianceStandardData s_dataDeserializationInstance; + private static RegulatoryComplianceStandardData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RegulatoryComplianceStandardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RegulatoryComplianceStandardData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); RegulatoryComplianceStandardData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityAlertResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityAlertResource.Serialization.cs index cb7f2f8e246e..5e5dccb88b48 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityAlertResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class ResourceGroupSecurityAlertResource : IJsonModel { + private static SecurityAlertData s_dataDeserializationInstance; + private static SecurityAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityTaskResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityTaskResource.Serialization.cs index 65da1fd5a81b..e2c198074776 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityTaskResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ResourceGroupSecurityTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class ResourceGroupSecurityTaskResource : IJsonModel { + private static SecurityTaskData s_dataDeserializationInstance; + private static SecurityTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreResource.Serialization.cs index d37222f372dc..a97b995a0a1c 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecureScoreResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecureScoreResource : IJsonModel { + private static SecureScoreData s_dataDeserializationInstance; + private static SecureScoreData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecureScoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecureScoreData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecureScoreData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleResource.Serialization.cs index 12b6a0180e70..2c7359e9c9ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAlertsSuppressionRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityAlertsSuppressionRuleResource : IJsonModel { + private static SecurityAlertsSuppressionRuleData s_dataDeserializationInstance; + private static SecurityAlertsSuppressionRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAlertsSuppressionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAlertsSuppressionRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAlertsSuppressionRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentResource.Serialization.cs index 6702fe0f0b22..5d37c9cdc56f 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityAssessmentResource : IJsonModel { + private static SecurityAssessmentData s_dataDeserializationInstance; + private static SecurityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationResource.Serialization.cs index d8cb1eb480de..a845e4aaeaf7 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityAutomationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityAutomationResource : IJsonModel { + private static SecurityAutomationData s_dataDeserializationInstance; + private static SecurityAutomationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAutomationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAutomationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionResource.Serialization.cs index 47114178085b..311151169322 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterApiCollectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityCenterApiCollectionResource : IJsonModel { + private static SecurityCenterApiCollectionData s_dataDeserializationInstance; + private static SecurityCenterApiCollectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityCenterApiCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityCenterApiCollectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityCenterApiCollectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.Serialization.cs index aed1c57a3493..44559c864043 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterLocationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityCenterLocationResource : IJsonModel { + private static SecurityCenterLocationData s_dataDeserializationInstance; + private static SecurityCenterLocationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityCenterLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityCenterLocationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityCenterLocationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingResource.Serialization.cs index cf4c10d2fea4..e83c79858ce9 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCenterPricingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityCenterPricingResource : IJsonModel { + private static SecurityCenterPricingData s_dataDeserializationInstance; + private static SecurityCenterPricingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityCenterPricingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityCenterPricingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityCenterPricingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorResource.Serialization.cs index 326c58e3b93c..54417821e2a5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityCloudConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityCloudConnectorResource : IJsonModel { + private static SecurityCloudConnectorData s_dataDeserializationInstance; + private static SecurityCloudConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityCloudConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityCloudConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceResource.Serialization.cs index d5ec2e1559e8..4814cbd9c748 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityComplianceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityComplianceResource : IJsonModel { + private static SecurityComplianceData s_dataDeserializationInstance; + private static SecurityComplianceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityComplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityComplianceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityComplianceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorApplicationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorApplicationResource.Serialization.cs index 3f802ba7cebe..10fc3c056fb1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorApplicationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorApplicationResource : IJsonModel { + private static SecurityApplicationData s_dataDeserializationInstance; + private static SecurityApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.Serialization.cs index 92fd5273aa00..006ea67c67f0 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubOwnerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorGitHubOwnerResource : IJsonModel { + private static SecurityConnectorGitHubOwnerData s_dataDeserializationInstance; + private static SecurityConnectorGitHubOwnerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityConnectorGitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityConnectorGitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityConnectorGitHubOwnerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.Serialization.cs index f46b1e0c749d..21b3cb578a27 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitHubRepositoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorGitHubRepositoryResource : IJsonModel { + private static SecurityConnectorGitHubRepositoryData s_dataDeserializationInstance; + private static SecurityConnectorGitHubRepositoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityConnectorGitHubRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityConnectorGitHubRepositoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityConnectorGitHubRepositoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.Serialization.cs index 4fff492b3e30..bebe561d28ad 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorGitLabGroupResource : IJsonModel { + private static SecurityConnectorGitLabGroupData s_dataDeserializationInstance; + private static SecurityConnectorGitLabGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityConnectorGitLabGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityConnectorGitLabGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityConnectorGitLabGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.Serialization.cs index 31658c6fa5d5..f47817c3282a 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorGitLabProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorGitLabProjectResource : IJsonModel { + private static SecurityConnectorGitLabProjectData s_dataDeserializationInstance; + private static SecurityConnectorGitLabProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityConnectorGitLabProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityConnectorGitLabProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityConnectorGitLabProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorResource.Serialization.cs index d58591eb2496..5ec5f2d419aa 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityConnectorResource : IJsonModel { + private static SecurityConnectorData s_dataDeserializationInstance; + private static SecurityConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactResource.Serialization.cs index 9e3088291ddd..558ec71e8945 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityContactResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityContactResource : IJsonModel { + private static SecurityContactData s_dataDeserializationInstance; + private static SecurityContactData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityContactData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityContactData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportResource.Serialization.cs index 12f697b88ea0..b4be9ac628d1 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityHealthReportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityHealthReportResource : IJsonModel { + private static SecurityHealthReportData s_dataDeserializationInstance; + private static SecurityHealthReportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityHealthReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityHealthReportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityHealthReportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorResource.Serialization.cs index ff32de9f1fb7..6235adcef918 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityOperatorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityOperatorResource : IJsonModel { + private static SecurityOperatorData s_dataDeserializationInstance; + private static SecurityOperatorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityOperatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityOperatorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityOperatorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingResource.Serialization.cs index 6bb29c1c0581..b2f6a971a217 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecuritySettingResource : IJsonModel { + private static SecuritySettingData s_dataDeserializationInstance; + private static SecuritySettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecuritySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecuritySettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentResource.Serialization.cs index c4a9298a3584..bea847d16a88 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecuritySubAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecuritySubAssessmentResource : IJsonModel { + private static SecuritySubAssessmentData s_dataDeserializationInstance; + private static SecuritySubAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecuritySubAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecuritySubAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecuritySubAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingResource.Serialization.cs index 6f4d7f2d3ae9..38fb3d2050e5 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SecurityWorkspaceSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SecurityWorkspaceSettingResource : IJsonModel { + private static SecurityWorkspaceSettingData s_dataDeserializationInstance; + private static SecurityWorkspaceSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityWorkspaceSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityWorkspaceSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityWorkspaceSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.Serialization.cs index 4cf1d963c77e..4810fd6b9276 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SensitivitySettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SensitivitySettingResource : IJsonModel { + private static SensitivitySettingData s_dataDeserializationInstance; + private static SensitivitySettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SensitivitySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SensitivitySettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SensitivitySettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentResource.Serialization.cs index 73a0354e7e11..a24dfafdc8f3 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class ServerVulnerabilityAssessmentResource : IJsonModel { + private static ServerVulnerabilityAssessmentData s_dataDeserializationInstance; + private static ServerVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); ServerVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingResource.Serialization.cs index bc5abe0f4197..365547e97620 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/ServerVulnerabilityAssessmentsSettingResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityCenter.Models; namespace Azure.ResourceManager.SecurityCenter { public partial class ServerVulnerabilityAssessmentsSettingResource : IJsonModel { + private static UnknownServerVulnerabilityAssessmentsSetting s_dataDeserializationInstance; + private static UnknownServerVulnerabilityAssessmentsSetting DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServerVulnerabilityAssessmentsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); ServerVulnerabilityAssessmentsSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryResource.Serialization.cs index c92ffb1a69b3..3ff11362d233 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SoftwareInventoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SoftwareInventoryResource : IJsonModel { + private static SoftwareInventoryData s_dataDeserializationInstance; + private static SoftwareInventoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SoftwareInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SoftwareInventoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SoftwareInventoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs index f9607a36fbc8..e8a09ace1f56 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SqlVulnerabilityAssessmentBaselineRuleResource : IJsonModel { + private static SqlVulnerabilityAssessmentBaselineRuleData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentBaselineRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SqlVulnerabilityAssessmentBaselineRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanResource.Serialization.cs index 33e362c0bced..3ec4e7341c74 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SqlVulnerabilityAssessmentScanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SqlVulnerabilityAssessmentScanResource : IJsonModel { + private static SqlVulnerabilityAssessmentScanData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentScanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SqlVulnerabilityAssessmentScanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionAssessmentMetadataResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionAssessmentMetadataResource.Serialization.cs index cbf309082945..3b17e609e745 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionAssessmentMetadataResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionAssessmentMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SubscriptionAssessmentMetadataResource : IJsonModel { + private static SecurityAssessmentMetadataData s_dataDeserializationInstance; + private static SecurityAssessmentMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAssessmentMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityAlertResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityAlertResource.Serialization.cs index 907b0801da48..2e085eadf6e4 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityAlertResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityAlertResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SubscriptionSecurityAlertResource : IJsonModel { + private static SecurityAlertData s_dataDeserializationInstance; + private static SecurityAlertData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAlertData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAlertData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityApplicationResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityApplicationResource.Serialization.cs index 821a11c341d3..a2f418fe5242 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityApplicationResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SubscriptionSecurityApplicationResource : IJsonModel { + private static SecurityApplicationData s_dataDeserializationInstance; + private static SecurityApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityTaskResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityTaskResource.Serialization.cs index 8bdbc6ef90df..e811539ffb19 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityTaskResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/SubscriptionSecurityTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class SubscriptionSecurityTaskResource : IJsonModel { + private static SecurityTaskData s_dataDeserializationInstance; + private static SecurityTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/TenantAssessmentMetadataResource.Serialization.cs b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/TenantAssessmentMetadataResource.Serialization.cs index a0606953de6c..39e0e480dc61 100644 --- a/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/TenantAssessmentMetadataResource.Serialization.cs +++ b/sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/TenantAssessmentMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityCenter { public partial class TenantAssessmentMetadataResource : IJsonModel { + private static SecurityAssessmentMetadataData s_dataDeserializationInstance; + private static SecurityAssessmentMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityAssessmentMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityCenterContext.Default); SecurityAssessmentMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityCenterContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsConnectorResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsConnectorResource.Serialization.cs index c62a2604efc9..34f6c55728e6 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsConnectorResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class AzureDevOpsConnectorResource : IJsonModel { + private static AzureDevOpsConnectorData s_dataDeserializationInstance; + private static AzureDevOpsConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureDevOpsConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureDevOpsConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); AzureDevOpsConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsOrgResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsOrgResource.Serialization.cs index dd27e3ae4cbe..8ba32c2555f5 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsOrgResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsOrgResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class AzureDevOpsOrgResource : IJsonModel { + private static AzureDevOpsOrgData s_dataDeserializationInstance; + private static AzureDevOpsOrgData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureDevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureDevOpsOrgData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); AzureDevOpsOrgData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsProjectResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsProjectResource.Serialization.cs index 1805c63de530..3727fb606c52 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsProjectResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class AzureDevOpsProjectResource : IJsonModel { + private static AzureDevOpsProjectData s_dataDeserializationInstance; + private static AzureDevOpsProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureDevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureDevOpsProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); AzureDevOpsProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsRepoResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsRepoResource.Serialization.cs index 9d6c35f52e25..195fab452363 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsRepoResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/AzureDevOpsRepoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class AzureDevOpsRepoResource : IJsonModel { + private static AzureDevOpsRepoData s_dataDeserializationInstance; + private static AzureDevOpsRepoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AzureDevOpsRepoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AzureDevOpsRepoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); AzureDevOpsRepoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubConnectorResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubConnectorResource.Serialization.cs index 45ca21fe7e53..6470e3270d7b 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubConnectorResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class GitHubConnectorResource : IJsonModel { + private static GitHubConnectorData s_dataDeserializationInstance; + private static GitHubConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GitHubConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GitHubConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); GitHubConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubOwnerResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubOwnerResource.Serialization.cs index f32a702b0f44..d04c7cac555b 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubOwnerResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubOwnerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class GitHubOwnerResource : IJsonModel { + private static GitHubOwnerData s_dataDeserializationInstance; + private static GitHubOwnerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GitHubOwnerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); GitHubOwnerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubRepoResource.Serialization.cs b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubRepoResource.Serialization.cs index ce7f61628fad..65786c980fb8 100644 --- a/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubRepoResource.Serialization.cs +++ b/sdk/securitydevops/Azure.ResourceManager.SecurityDevOps/src/Generated/GitHubRepoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityDevOps { public partial class GitHubRepoResource : IJsonModel { + private static GitHubRepoData s_dataDeserializationInstance; + private static GitHubRepoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GitHubRepoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GitHubRepoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityDevOpsContext.Default); GitHubRepoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityDevOpsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleActionResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleActionResource.Serialization.cs index 3eda1e47a5df..4173c04bc8af 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleActionResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsAlertRuleActionResource : IJsonModel { + private static SecurityInsightsAlertRuleActionData s_dataDeserializationInstance; + private static SecurityInsightsAlertRuleActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsAlertRuleActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsAlertRuleActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsAlertRuleActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleResource.Serialization.cs index 213efc370a02..56bc5d737500 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsAlertRuleResource : IJsonModel { + private static SecurityInsightsAlertRuleData s_dataDeserializationInstance; + private static SecurityInsightsAlertRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsAlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsAlertRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsAlertRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleTemplateResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleTemplateResource.Serialization.cs index c1e7ce5937bb..ba3481147908 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleTemplateResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAlertRuleTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsAlertRuleTemplateResource : IJsonModel { + private static SecurityInsightsAlertRuleTemplateData s_dataDeserializationInstance; + private static SecurityInsightsAlertRuleTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsAlertRuleTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsAlertRuleTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsAlertRuleTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAutomationRuleResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAutomationRuleResource.Serialization.cs index 605447974fda..214f320fe4fb 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAutomationRuleResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsAutomationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsAutomationRuleResource : IJsonModel { + private static SecurityInsightsAutomationRuleData s_dataDeserializationInstance; + private static SecurityInsightsAutomationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsAutomationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsAutomationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsAutomationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBillingStatisticResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBillingStatisticResource.Serialization.cs index ab1b1b041387..0d30d94b0602 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBillingStatisticResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBillingStatisticResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityInsights.Models; namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsBillingStatisticResource : IJsonModel { + private static UnknownBillingStatistic s_dataDeserializationInstance; + private static UnknownBillingStatistic DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsBillingStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsBillingStatisticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsBillingStatisticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkRelationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkRelationResource.Serialization.cs index 017a9f725ae3..eda198a211c9 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkRelationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkRelationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsBookmarkRelationResource : IJsonModel { + private static SecurityInsightsIncidentRelationData s_dataDeserializationInstance; + private static SecurityInsightsIncidentRelationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentRelationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkResource.Serialization.cs index df60cb48a54f..b1149b730b70 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsBookmarkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsBookmarkResource : IJsonModel { + private static SecurityInsightsBookmarkData s_dataDeserializationInstance; + private static SecurityInsightsBookmarkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsBookmarkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsBookmarkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsBookmarkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorDefinitionResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorDefinitionResource.Serialization.cs index f8b524625c15..aa3fbd257e3a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorDefinitionResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorDefinitionResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityInsights.Models; namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsDataConnectorDefinitionResource : IJsonModel { + private static UnknownDataConnectorDefinition s_dataDeserializationInstance; + private static UnknownDataConnectorDefinition DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsDataConnectorDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsDataConnectorDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsDataConnectorDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorResource.Serialization.cs index 3801dd7a2c1e..2d13ea221c0d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsDataConnectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsDataConnectorResource : IJsonModel { + private static SecurityInsightsDataConnectorData s_dataDeserializationInstance; + private static SecurityInsightsDataConnectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsDataConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsDataConnectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsDataConnectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryResource.Serialization.cs index c49bcc66c1b0..2ccc0acf1971 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityInsights.Models; namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsEntityQueryResource : IJsonModel { + private static UnknownEntityQuery s_dataDeserializationInstance; + private static UnknownEntityQuery DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsEntityQueryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsEntityQueryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsEntityQueryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryTemplateResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryTemplateResource.Serialization.cs index 2c7d6703e27e..d07fe3a7ad00 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryTemplateResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityQueryTemplateResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityInsights.Models; namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsEntityQueryTemplateResource : IJsonModel { + private static UnknownEntityQueryTemplate s_dataDeserializationInstance; + private static UnknownEntityQueryTemplate DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsEntityQueryTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsEntityQueryTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsEntityQueryTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityRelationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityRelationResource.Serialization.cs index e3f8af5a44f2..0949636b3f6b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityRelationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityRelationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsEntityRelationResource : IJsonModel { + private static SecurityInsightsIncidentRelationData s_dataDeserializationInstance; + private static SecurityInsightsIncidentRelationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentRelationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityResource.Serialization.cs index 1d21b012dd2c..aca9c984d9e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsEntityResource.Serialization.cs @@ -14,14 +14,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsEntityResource : IJsonModel { + private static SecurityInsightsEntity s_dataDeserializationInstance; + private static SecurityInsightsEntity DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsEntity IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsEntity IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsFileImportResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsFileImportResource.Serialization.cs index eedd6f50dd75..9ab917dbd8e8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsFileImportResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsFileImportResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsFileImportResource : IJsonModel { + private static SecurityInsightsFileImportData s_dataDeserializationInstance; + private static SecurityInsightsFileImportData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsFileImportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsFileImportData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsFileImportData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntCommentResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntCommentResource.Serialization.cs index 0c09e5606592..822c4c48229d 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntCommentResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntCommentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsHuntCommentResource : IJsonModel { + private static SecurityInsightsHuntCommentData s_dataDeserializationInstance; + private static SecurityInsightsHuntCommentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsHuntCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsHuntCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsHuntCommentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntRelationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntRelationResource.Serialization.cs index 4042ff31750b..faa6074cf169 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntRelationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntRelationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsHuntRelationResource : IJsonModel { + private static SecurityInsightsHuntRelationData s_dataDeserializationInstance; + private static SecurityInsightsHuntRelationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsHuntRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsHuntRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsHuntRelationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntResource.Serialization.cs index 7f0d5076c5f4..66da2bdfba38 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsHuntResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsHuntResource : IJsonModel { + private static SecurityInsightsHuntData s_dataDeserializationInstance; + private static SecurityInsightsHuntData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsHuntData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsHuntData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsHuntData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentCommentResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentCommentResource.Serialization.cs index f79b22bc04c2..cef53955a71f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentCommentResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentCommentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsIncidentCommentResource : IJsonModel { + private static SecurityInsightsIncidentCommentData s_dataDeserializationInstance; + private static SecurityInsightsIncidentCommentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentCommentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentCommentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentRelationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentRelationResource.Serialization.cs index e1caf17c27b1..d3b9bf5eee72 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentRelationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentRelationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsIncidentRelationResource : IJsonModel { + private static SecurityInsightsIncidentRelationData s_dataDeserializationInstance; + private static SecurityInsightsIncidentRelationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentRelationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentRelationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentResource.Serialization.cs index c0017663f506..3ef1cee6bd2e 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsIncidentResource : IJsonModel { + private static SecurityInsightsIncidentData s_dataDeserializationInstance; + private static SecurityInsightsIncidentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentTaskResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentTaskResource.Serialization.cs index b1f0e35587f4..e0353359b4d6 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentTaskResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsIncidentTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsIncidentTaskResource : IJsonModel { + private static SecurityInsightsIncidentTaskData s_dataDeserializationInstance; + private static SecurityInsightsIncidentTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsIncidentTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsIncidentTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsIncidentTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsMetadataResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsMetadataResource.Serialization.cs index 797ed925cfd0..70c95f24d19a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsMetadataResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsMetadataResource : IJsonModel { + private static SecurityInsightsMetadataData s_dataDeserializationInstance; + private static SecurityInsightsMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsOfficeConsentResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsOfficeConsentResource.Serialization.cs index 826b6d7e1d68..fdb88bf9245b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsOfficeConsentResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsOfficeConsentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsOfficeConsentResource : IJsonModel { + private static SecurityInsightsOfficeConsentData s_dataDeserializationInstance; + private static SecurityInsightsOfficeConsentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsOfficeConsentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsOfficeConsentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsOfficeConsentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsPackageResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsPackageResource.Serialization.cs index 92fff0a2d07d..febffc33e0a8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsPackageResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsPackageResource : IJsonModel { + private static SecurityInsightsPackageData s_dataDeserializationInstance; + private static SecurityInsightsPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductPackageResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductPackageResource.Serialization.cs index c9932d41a38a..647c7f937442 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductPackageResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductPackageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsProductPackageResource : IJsonModel { + private static SecurityInsightsProductPackageData s_dataDeserializationInstance; + private static SecurityInsightsProductPackageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsProductPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsProductPackageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsProductPackageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductTemplateResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductTemplateResource.Serialization.cs index 4ba7aa2e5a44..42ff3a683282 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductTemplateResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsProductTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsProductTemplateResource : IJsonModel { + private static SecurityInsightsProductTemplateData s_dataDeserializationInstance; + private static SecurityInsightsProductTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsProductTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsProductTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsProductTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsRecommendationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsRecommendationResource.Serialization.cs index b65d8ebc65b8..b8f9bfe9a2be 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsRecommendationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsRecommendationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsRecommendationResource : IJsonModel { + private static SecurityInsightsRecommendationData s_dataDeserializationInstance; + private static SecurityInsightsRecommendationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsRecommendationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsRecommendationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSentinelOnboardingStateResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSentinelOnboardingStateResource.Serialization.cs index 86f620d79c80..9f69a02f70f0 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSentinelOnboardingStateResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSentinelOnboardingStateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsSentinelOnboardingStateResource : IJsonModel { + private static SecurityInsightsSentinelOnboardingStateData s_dataDeserializationInstance; + private static SecurityInsightsSentinelOnboardingStateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsSentinelOnboardingStateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsSentinelOnboardingStateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsSentinelOnboardingStateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSettingResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSettingResource.Serialization.cs index 9e512ae1997d..b8a201d28a70 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSettingResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSettingResource.Serialization.cs @@ -8,19 +8,23 @@ using System; using System.ClientModel.Primitives; using System.Text.Json; +using Azure.ResourceManager.SecurityInsights.Models; namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsSettingResource : IJsonModel { + private static UnknownSettings s_dataDeserializationInstance; + private static UnknownSettings DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSourceControlResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSourceControlResource.Serialization.cs index 1fc586b1d3f7..e28130f5b146 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSourceControlResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsSourceControlResource : IJsonModel { + private static SecurityInsightsSourceControlData s_dataDeserializationInstance; + private static SecurityInsightsSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsTemplateResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsTemplateResource.Serialization.cs index 3ae53618fe30..4e9a4daba73b 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsTemplateResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsTemplateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsTemplateResource : IJsonModel { + private static SecurityInsightsTemplateData s_dataDeserializationInstance; + private static SecurityInsightsTemplateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsTemplateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsTemplateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsThreatIntelligenceIndicatorResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsThreatIntelligenceIndicatorResource.Serialization.cs index 2f5ad51314a0..e34e5269c10a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsThreatIntelligenceIndicatorResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsThreatIntelligenceIndicatorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsThreatIntelligenceIndicatorResource : IJsonModel { + private static SecurityInsightsThreatIntelligenceIndicatorBaseData s_dataDeserializationInstance; + private static SecurityInsightsThreatIntelligenceIndicatorBaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsThreatIntelligenceIndicatorBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsThreatIntelligenceIndicatorBaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsThreatIntelligenceIndicatorBaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistItemResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistItemResource.Serialization.cs index 690e5fdb3d70..a8ad814edd0f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistItemResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistItemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsWatchlistItemResource : IJsonModel { + private static SecurityInsightsWatchlistItemData s_dataDeserializationInstance; + private static SecurityInsightsWatchlistItemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsWatchlistItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsWatchlistItemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsWatchlistItemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistResource.Serialization.cs index a118139bb991..c6774e6bf88f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityInsightsWatchlistResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityInsightsWatchlistResource : IJsonModel { + private static SecurityInsightsWatchlistData s_dataDeserializationInstance; + private static SecurityInsightsWatchlistData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityInsightsWatchlistData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityInsightsWatchlistData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityInsightsWatchlistData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingResource.Serialization.cs index 54e70d1c7e94..040b969f961a 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/SecurityMLAnalyticsSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class SecurityMLAnalyticsSettingResource : IJsonModel { + private static SecurityMLAnalyticsSettingData s_dataDeserializationInstance; + private static SecurityMLAnalyticsSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SecurityMLAnalyticsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SecurityMLAnalyticsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); SecurityMLAnalyticsSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/TriggeredAnalyticsRuleRunResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/TriggeredAnalyticsRuleRunResource.Serialization.cs index df8060d1b486..48943abdd9d2 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/TriggeredAnalyticsRuleRunResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/TriggeredAnalyticsRuleRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class TriggeredAnalyticsRuleRunResource : IJsonModel { + private static TriggeredAnalyticsRuleRunData s_dataDeserializationInstance; + private static TriggeredAnalyticsRuleRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TriggeredAnalyticsRuleRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TriggeredAnalyticsRuleRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); TriggeredAnalyticsRuleRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentJobResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentJobResource.Serialization.cs index c3fd4e048f98..48ab4c5a1691 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentJobResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class WorkspaceManagerAssignmentJobResource : IJsonModel { + private static WorkspaceManagerAssignmentJobData s_dataDeserializationInstance; + private static WorkspaceManagerAssignmentJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceManagerAssignmentJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceManagerAssignmentJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); WorkspaceManagerAssignmentJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentResource.Serialization.cs index ec4d27e8c9f6..39f1eccaf62f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class WorkspaceManagerAssignmentResource : IJsonModel { + private static WorkspaceManagerAssignmentData s_dataDeserializationInstance; + private static WorkspaceManagerAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceManagerAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceManagerAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); WorkspaceManagerAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerConfigurationResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerConfigurationResource.Serialization.cs index 590a5d44f1cb..6dd5ea0074a8 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerConfigurationResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class WorkspaceManagerConfigurationResource : IJsonModel { + private static WorkspaceManagerConfigurationData s_dataDeserializationInstance; + private static WorkspaceManagerConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceManagerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceManagerConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); WorkspaceManagerConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerGroupResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerGroupResource.Serialization.cs index 12082f20bcec..e5a7706b3a9f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerGroupResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class WorkspaceManagerGroupResource : IJsonModel { + private static WorkspaceManagerGroupData s_dataDeserializationInstance; + private static WorkspaceManagerGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceManagerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceManagerGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); WorkspaceManagerGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerMemberResource.Serialization.cs b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerMemberResource.Serialization.cs index d7145eec809f..7c9b58659c1f 100644 --- a/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerMemberResource.Serialization.cs +++ b/sdk/securityinsights/Azure.ResourceManager.SecurityInsights/src/Generated/WorkspaceManagerMemberResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SecurityInsights { public partial class WorkspaceManagerMemberResource : IJsonModel { + private static WorkspaceManagerMemberData s_dataDeserializationInstance; + private static WorkspaceManagerMemberData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkspaceManagerMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkspaceManagerMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSecurityInsightsContext.Default); WorkspaceManagerMemberData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSecurityInsightsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpDiagnosticResource.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpDiagnosticResource.Serialization.cs index 2fcf4f5e1d35..c785a62c113d 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpDiagnosticResource.Serialization.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpDiagnosticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SelfHelp { public partial class SelfHelpDiagnosticResource : IJsonModel { + private static SelfHelpDiagnosticData s_dataDeserializationInstance; + private static SelfHelpDiagnosticData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SelfHelpDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SelfHelpDiagnosticData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSelfHelpContext.Default); SelfHelpDiagnosticData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSelfHelpContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSimplifiedSolutionResource.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSimplifiedSolutionResource.Serialization.cs index 883ad168389f..4e916436618d 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSimplifiedSolutionResource.Serialization.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSimplifiedSolutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SelfHelp { public partial class SelfHelpSimplifiedSolutionResource : IJsonModel { + private static SelfHelpSimplifiedSolutionData s_dataDeserializationInstance; + private static SelfHelpSimplifiedSolutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SelfHelpSimplifiedSolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SelfHelpSimplifiedSolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSelfHelpContext.Default); SelfHelpSimplifiedSolutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSelfHelpContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSolutionResource.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSolutionResource.Serialization.cs index 92c6940530aa..12e75212e068 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSolutionResource.Serialization.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpSolutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SelfHelp { public partial class SelfHelpSolutionResource : IJsonModel { + private static SelfHelpSolutionData s_dataDeserializationInstance; + private static SelfHelpSolutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SelfHelpSolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SelfHelpSolutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSelfHelpContext.Default); SelfHelpSolutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSelfHelpContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpTroubleshooterResource.Serialization.cs b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpTroubleshooterResource.Serialization.cs index 878153a0eaff..2f06180a7368 100644 --- a/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpTroubleshooterResource.Serialization.cs +++ b/sdk/selfhelp/Azure.ResourceManager.SelfHelp/src/Generated/SelfHelpTroubleshooterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SelfHelp { public partial class SelfHelpTroubleshooterResource : IJsonModel { + private static SelfHelpTroubleshooterData s_dataDeserializationInstance; + private static SelfHelpTroubleshooterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SelfHelpTroubleshooterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SelfHelpTroubleshooterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSelfHelpContext.Default); SelfHelpTroubleshooterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSelfHelpContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index 9af49f31ef78..7fed00b3d7ee 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -24,6 +24,8 @@ - Enhanced retry logic to consider additional cases for web socket-based failures. In many cases, a `WebSocketException` is triggered which wraps a `SocketException` with the details for the specific network conditions. Retry decisions are now based on the internal exception, if present, to ensure retries are correctly applied. +- Updated the `Microsoft.Azure.Amqp` dependency to 2.6.11, which contains several bug fixes. _(see: [commits](https://github.com/Azure/azure-amqp/commits/hotfix/))_ + ## 7.18.4 (2025-02-11) ### Bugs Fixed diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs index 012319cd4d6a..76f65ca2bc1a 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Receiver/ServiceBusReceiver.cs @@ -35,7 +35,7 @@ namespace Azure.Messaging.ServiceBus public class ServiceBusReceiver : IAsyncDisposable { /// The maximum number of messages to delete in a single batch. This cap is established and enforced by the service. - internal const int MaxDeleteMessageCount = 4000; + internal const int MaxDeleteMessageCount = 500; /// The set of default options to use for initialization when no explicit options were provided. private static ServiceBusReceiverOptions s_defaultOptions; diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Receiver/ReceiverTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Receiver/ReceiverTests.cs index 921ad64b355e..c3481c06f863 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Receiver/ReceiverTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Receiver/ReceiverTests.cs @@ -648,7 +648,7 @@ public async Task PurgeMessagesForDateEvaluatesReturnedCount() [Test] public async Task DeleteMessagesForCountPassesTheCurrentDate() { - var expectedCount = 2000; + var expectedCount = 400; var mockConnection = ServiceBusTestUtilities.CreateMockConnection(); var mockTransportReceiver = new Mock(); @@ -696,8 +696,8 @@ public async Task DeleteMessagesPassesParametersToTransport() { using var cancellationSource = new CancellationTokenSource(); - var requestedCount = 2500; - var expectedCount = 2000; + var requestedCount = 500; + var expectedCount = 400; var expectedDate = new DateTimeOffset(2015, 10, 27, 0, 0, 0, 0, TimeSpan.Zero); var mockConnection = ServiceBusTestUtilities.CreateMockConnection(); var mockTransportReceiver = new Mock(); diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/MigrationConfigurationResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/MigrationConfigurationResource.Serialization.cs index 3887ea3a4ff4..630d868ee03a 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/MigrationConfigurationResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/MigrationConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class MigrationConfigurationResource : IJsonModel { + private static MigrationConfigurationData s_dataDeserializationInstance; + private static MigrationConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrationConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrationConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); MigrationConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryAuthorizationRuleResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryAuthorizationRuleResource.Serialization.cs index c3db3bc3e8ee..4d2bedf25b1a 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryAuthorizationRuleResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusDisasterRecoveryAuthorizationRuleResource : IJsonModel { + private static ServiceBusAuthorizationRuleData s_dataDeserializationInstance; + private static ServiceBusAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryResource.Serialization.cs index 970a7add4411..855a45d4569f 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusDisasterRecoveryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusDisasterRecoveryResource : IJsonModel { + private static ServiceBusDisasterRecoveryData s_dataDeserializationInstance; + private static ServiceBusDisasterRecoveryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusDisasterRecoveryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusDisasterRecoveryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusDisasterRecoveryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRuleResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRuleResource.Serialization.cs index 2c377bea6568..0074870107d6 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRuleResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusNamespaceAuthorizationRuleResource : IJsonModel { + private static ServiceBusAuthorizationRuleData s_dataDeserializationInstance; + private static ServiceBusAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceResource.Serialization.cs index f21589c16245..6c2b0fdf6472 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNamespaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusNamespaceResource : IJsonModel { + private static ServiceBusNamespaceData s_dataDeserializationInstance; + private static ServiceBusNamespaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusNamespaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNetworkRuleSetResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNetworkRuleSetResource.Serialization.cs index c8f3026affed..787f21af9835 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNetworkRuleSetResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusNetworkRuleSetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusNetworkRuleSetResource : IJsonModel { + private static ServiceBusNetworkRuleSetData s_dataDeserializationInstance; + private static ServiceBusNetworkRuleSetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusNetworkRuleSetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusNetworkRuleSetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnectionResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnectionResource.Serialization.cs index 44f33f26b282..5d20aaa4b1a8 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusPrivateEndpointConnectionResource : IJsonModel { + private static ServiceBusPrivateEndpointConnectionData s_dataDeserializationInstance; + private static ServiceBusPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRuleResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRuleResource.Serialization.cs index bf787716157e..ad8a525fd14d 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRuleResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusQueueAuthorizationRuleResource : IJsonModel { + private static ServiceBusAuthorizationRuleData s_dataDeserializationInstance; + private static ServiceBusAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueResource.Serialization.cs index 13bf40067c68..14e1fe1204fb 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusQueueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusQueueResource : IJsonModel { + private static ServiceBusQueueData s_dataDeserializationInstance; + private static ServiceBusQueueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusQueueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusQueueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusQueueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusRuleResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusRuleResource.Serialization.cs index e9fa93c301e3..3cb0ec3aa5bf 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusRuleResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusRuleResource : IJsonModel { + private static ServiceBusRuleData s_dataDeserializationInstance; + private static ServiceBusRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusSubscriptionResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusSubscriptionResource.Serialization.cs index 5c15795b698e..369867f40c82 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusSubscriptionResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusSubscriptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusSubscriptionResource : IJsonModel { + private static ServiceBusSubscriptionData s_dataDeserializationInstance; + private static ServiceBusSubscriptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusSubscriptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusSubscriptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRuleResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRuleResource.Serialization.cs index 226cef4390bf..3d0c16465c12 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRuleResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicAuthorizationRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusTopicAuthorizationRuleResource : IJsonModel { + private static ServiceBusAuthorizationRuleData s_dataDeserializationInstance; + private static ServiceBusAuthorizationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusAuthorizationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusAuthorizationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicResource.Serialization.cs b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicResource.Serialization.cs index 895ec0e2d841..09ddf00ba259 100644 --- a/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicResource.Serialization.cs +++ b/sdk/servicebus/Azure.ResourceManager.ServiceBus/src/Generated/ServiceBusTopicResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceBus { public partial class ServiceBusTopicResource : IJsonModel { + private static ServiceBusTopicData s_dataDeserializationInstance; + private static ServiceBusTopicData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceBusTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceBusTopicData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceBusContext.Default); ServiceBusTopicData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceBusContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/CHANGELOG.md b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/CHANGELOG.md index 5889170da43e..9c91fea37597 100644 --- a/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- Updated the `Microsoft.Azure.Amqp` dependency to 2.6.11, which contains several bug fixes. _(see: [commits](https://github.com/Azure/azure-amqp/commits/hotfix/))_ + ## 5.16.6 (2025-04-08) ### Other Changes diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationResource.Serialization.cs index 80f2e8b08d35..cb683a811bd6 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricApplicationResource : IJsonModel { + private static ServiceFabricApplicationData s_dataDeserializationInstance; + private static ServiceFabricApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeResource.Serialization.cs index 25229ea21e5e..cc38f8864feb 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricApplicationTypeResource : IJsonModel { + private static ServiceFabricApplicationTypeData s_dataDeserializationInstance; + private static ServiceFabricApplicationTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricApplicationTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricApplicationTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricApplicationTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeVersionResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeVersionResource.Serialization.cs index 66224e4bf886..340d65d76924 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeVersionResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricApplicationTypeVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricApplicationTypeVersionResource : IJsonModel { + private static ServiceFabricApplicationTypeVersionData s_dataDeserializationInstance; + private static ServiceFabricApplicationTypeVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricApplicationTypeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricApplicationTypeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricApplicationTypeVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricClusterResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricClusterResource.Serialization.cs index 4e5ab8a5d3c9..ae4134f4a79a 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricClusterResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricClusterResource : IJsonModel { + private static ServiceFabricClusterData s_dataDeserializationInstance; + private static ServiceFabricClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricServiceResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricServiceResource.Serialization.cs index 64756f5a774e..eea9c0d7e4a3 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricServiceResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricServiceResource : IJsonModel { + private static ServiceFabricServiceData s_dataDeserializationInstance; + private static ServiceFabricServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricVmSizeResource.Serialization.cs b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricVmSizeResource.Serialization.cs index 3eff228e0705..67a18bfc5292 100644 --- a/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricVmSizeResource.Serialization.cs +++ b/sdk/servicefabric/Azure.ResourceManager.ServiceFabric/src/Generated/ServiceFabricVmSizeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabric { public partial class ServiceFabricVmSizeResource : IJsonModel { + private static ServiceFabricVmSizeResourceData s_dataDeserializationInstance; + private static ServiceFabricVmSizeResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricVmSizeResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricVmSizeResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricContext.Default); ServiceFabricVmSizeResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.Serialization.cs index c039dae4d7a7..62714ad87db4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedApplicationResource : IJsonModel { + private static ServiceFabricManagedApplicationData s_dataDeserializationInstance; + private static ServiceFabricManagedApplicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedApplicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedApplicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.Serialization.cs index c1963729fff5..ba3056b9e985 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedApplicationTypeResource : IJsonModel { + private static ServiceFabricManagedApplicationTypeData s_dataDeserializationInstance; + private static ServiceFabricManagedApplicationTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedApplicationTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedApplicationTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedApplicationTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.Serialization.cs index 1f6d8dd1dcb3..f61ca678facb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedApplicationTypeVersionResource : IJsonModel { + private static ServiceFabricManagedApplicationTypeVersionData s_dataDeserializationInstance; + private static ServiceFabricManagedApplicationTypeVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedApplicationTypeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedApplicationTypeVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedApplicationTypeVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.Serialization.cs index 140f30c759f7..a130de7ebc76 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedClusterResource : IJsonModel { + private static ServiceFabricManagedClusterData s_dataDeserializationInstance; + private static ServiceFabricManagedClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.Serialization.cs index 7dd48a7bd4e8..ae48d42b49a8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedNodeTypeResource : IJsonModel { + private static ServiceFabricManagedNodeTypeData s_dataDeserializationInstance; + private static ServiceFabricManagedNodeTypeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedNodeTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedNodeTypeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedNodeTypeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.Serialization.cs index 31cf9802221f..0c55d73d9d88 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters { public partial class ServiceFabricManagedServiceResource : IJsonModel { + private static ServiceFabricManagedServiceData s_dataDeserializationInstance; + private static ServiceFabricManagedServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServiceFabricManagedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServiceFabricManagedServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); ServiceFabricManagedServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.Serialization.cs b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.Serialization.cs index 0ab229e455f7..e6ebeb44c9ca 100644 --- a/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.Serialization.cs +++ b/sdk/servicelinker/Azure.ResourceManager.ServiceLinker/src/Generated/LinkerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceLinker { public partial class LinkerResource : IJsonModel { + private static LinkerResourceData s_dataDeserializationInstance; + private static LinkerResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LinkerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LinkerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceLinkerContext.Default); LinkerResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceLinkerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.Serialization.cs index d6dd93c0fbc5..94faea671968 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/ApplicationGatewayForContainersSecurityPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceNetworking { public partial class ApplicationGatewayForContainersSecurityPolicyResource : IJsonModel { + private static ApplicationGatewayForContainersSecurityPolicyData s_dataDeserializationInstance; + private static ApplicationGatewayForContainersSecurityPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApplicationGatewayForContainersSecurityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApplicationGatewayForContainersSecurityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceNetworkingContext.Default); ApplicationGatewayForContainersSecurityPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceNetworkingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs index 580834e146cf..8082b2d49526 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerAssociationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceNetworking { public partial class TrafficControllerAssociationResource : IJsonModel { + private static TrafficControllerAssociationData s_dataDeserializationInstance; + private static TrafficControllerAssociationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficControllerAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficControllerAssociationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceNetworkingContext.Default); TrafficControllerAssociationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceNetworkingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs index f1bc30eba02b..b33c786b8120 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerFrontendResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceNetworking { public partial class TrafficControllerFrontendResource : IJsonModel { + private static TrafficControllerFrontendData s_dataDeserializationInstance; + private static TrafficControllerFrontendData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficControllerFrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficControllerFrontendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceNetworkingContext.Default); TrafficControllerFrontendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceNetworkingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.Serialization.cs b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.Serialization.cs index c313f1de060f..f33cb6c76ba4 100644 --- a/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.Serialization.cs +++ b/sdk/servicenetworking/Azure.ResourceManager.ServiceNetworking/src/Generated/TrafficControllerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.ServiceNetworking { public partial class TrafficControllerResource : IJsonModel { + private static TrafficControllerData s_dataDeserializationInstance; + private static TrafficControllerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficControllerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerServiceNetworkingContext.Default); TrafficControllerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerServiceNetworkingContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomCertificateResource.Serialization.cs b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomCertificateResource.Serialization.cs index cdcea4ef3a0a..d34234df674e 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomCertificateResource.Serialization.cs +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SignalR { public partial class SignalRCustomCertificateResource : IJsonModel { + private static SignalRCustomCertificateData s_dataDeserializationInstance; + private static SignalRCustomCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SignalRCustomCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SignalRCustomCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSignalRContext.Default); SignalRCustomCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSignalRContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomDomainResource.Serialization.cs b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomDomainResource.Serialization.cs index b01f87799f16..5ff9f7fdcdca 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomDomainResource.Serialization.cs +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRCustomDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SignalR { public partial class SignalRCustomDomainResource : IJsonModel { + private static SignalRCustomDomainData s_dataDeserializationInstance; + private static SignalRCustomDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SignalRCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SignalRCustomDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSignalRContext.Default); SignalRCustomDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSignalRContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRPrivateEndpointConnectionResource.Serialization.cs b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRPrivateEndpointConnectionResource.Serialization.cs index b359da591d35..0aca2beacbff 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SignalR { public partial class SignalRPrivateEndpointConnectionResource : IJsonModel { + private static SignalRPrivateEndpointConnectionData s_dataDeserializationInstance; + private static SignalRPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SignalRPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SignalRPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSignalRContext.Default); SignalRPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSignalRContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRResource.Serialization.cs b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRResource.Serialization.cs index 0960d4636fd0..fa4129497fec 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRResource.Serialization.cs +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SignalR { public partial class SignalRResource : IJsonModel { + private static SignalRData s_dataDeserializationInstance; + private static SignalRData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SignalRData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SignalRData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSignalRContext.Default); SignalRData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSignalRContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRSharedPrivateLinkResource.Serialization.cs b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRSharedPrivateLinkResource.Serialization.cs index 00034811abd3..8d8c49cc3609 100644 --- a/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRSharedPrivateLinkResource.Serialization.cs +++ b/sdk/signalr/Azure.ResourceManager.SignalR/src/Generated/SignalRSharedPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SignalR { public partial class SignalRSharedPrivateLinkResource : IJsonModel { + private static SignalRSharedPrivateLinkResourceData s_dataDeserializationInstance; + private static SignalRSharedPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SignalRSharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SignalRSharedPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSignalRContext.Default); SignalRSharedPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSignalRContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCatalogResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCatalogResource.Serialization.cs index 7d0b9b03203e..6639778e5300 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCatalogResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCatalogResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereCatalogResource : IJsonModel { + private static SphereCatalogData s_dataDeserializationInstance; + private static SphereCatalogData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereCatalogData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereCatalogData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCertificateResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCertificateResource.Serialization.cs index 2d271acdfba4..b70f11546133 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCertificateResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereCertificateResource : IJsonModel { + private static SphereCertificateData s_dataDeserializationInstance; + private static SphereCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeploymentResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeploymentResource.Serialization.cs index 06778766d8ed..a0b582d47b43 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeploymentResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereDeploymentResource : IJsonModel { + private static SphereDeploymentData s_dataDeserializationInstance; + private static SphereDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceGroupResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceGroupResource.Serialization.cs index f29125f69aed..1c14e0caecdb 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceGroupResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereDeviceGroupResource : IJsonModel { + private static SphereDeviceGroupData s_dataDeserializationInstance; + private static SphereDeviceGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereDeviceGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereDeviceGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereDeviceGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceResource.Serialization.cs index f4e2dab58d66..4ba9617b701c 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereDeviceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereDeviceResource : IJsonModel { + private static SphereDeviceData s_dataDeserializationInstance; + private static SphereDeviceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereDeviceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereDeviceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereImageResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereImageResource.Serialization.cs index d41b194fa81c..0c7e4eb0f9a0 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereImageResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereImageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereImageResource : IJsonModel { + private static SphereImageData s_dataDeserializationInstance; + private static SphereImageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereImageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereImageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereProductResource.Serialization.cs b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereProductResource.Serialization.cs index 7ca415e632a1..1d61af64a04a 100644 --- a/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereProductResource.Serialization.cs +++ b/sdk/sphere/Azure.ResourceManager.Sphere/src/Generated/SphereProductResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sphere { public partial class SphereProductResource : IJsonModel { + private static SphereProductData s_dataDeserializationInstance; + private static SphereProductData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SphereProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SphereProductData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSphereContext.Default); SphereProductData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSphereContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppResource.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppResource.Serialization.cs index fd619d7bcfc8..570c83a2e72a 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppResource.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SpringAppDiscovery { public partial class SpringBootAppResource : IJsonModel { + private static SpringBootAppData s_dataDeserializationInstance; + private static SpringBootAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpringBootAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpringBootAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); SpringBootAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerResource.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerResource.Serialization.cs index bec881a8b31d..3d44ee45b33f 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerResource.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SpringAppDiscovery { public partial class SpringBootServerResource : IJsonModel { + private static SpringBootServerData s_dataDeserializationInstance; + private static SpringBootServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpringBootServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpringBootServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); SpringBootServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryResource.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryResource.Serialization.cs index 81cc040851e6..f530ba863531 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryResource.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteErrorSummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SpringAppDiscovery { public partial class SpringBootSiteErrorSummaryResource : IJsonModel { + private static SpringBootSiteErrorSummaryData s_dataDeserializationInstance; + private static SpringBootSiteErrorSummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpringBootSiteErrorSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpringBootSiteErrorSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); SpringBootSiteErrorSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteResource.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteResource.Serialization.cs index 209042ac7180..917967fed4bb 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteResource.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SpringAppDiscovery { public partial class SpringBootSiteResource : IJsonModel { + private static SpringBootSiteData s_dataDeserializationInstance; + private static SpringBootSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpringBootSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpringBootSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); SpringBootSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryResource.Serialization.cs b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryResource.Serialization.cs index 4ac9b6c8c9d1..f6ad3f103d41 100644 --- a/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryResource.Serialization.cs +++ b/sdk/springappdiscovery/Azure.ResourceManager.SpringAppDiscovery/src/Generated/SpringBootSiteSummaryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SpringAppDiscovery { public partial class SpringBootSiteSummaryResource : IJsonModel { + private static SpringBootSiteSummaryData s_dataDeserializationInstance; + private static SpringBootSiteSummaryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SpringBootSiteSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SpringBootSiteSummaryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); SpringBootSiteSummaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSpringAppDiscoveryContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md index 316f9026085d..1a4d92eec850 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.0-beta.1 (Unreleased) +## 1.4.0-beta.2 (Unreleased) ### Features Added @@ -10,6 +10,12 @@ ### Other Changes +## 1.4.0-beta.1 (2025-05-14) + +### Features Added + +- Upgraded api-version tag to 'package-preview-2024-05'. Tag detail available at https://github.com/Azure/azure-rest-api-specs/blob/8c2c4da647cc9dbe6317a5961138fd058ed78401/specification/sql/resource-manager/readme.md. + ## 1.3.0 (2025-05-01) ### Features Added diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs index 9383be19a782..4e7ca9af5229 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.net8.0.cs @@ -893,6 +893,9 @@ protected InstancePoolResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedInstances(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedInstancesAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSqlInstancePoolOperation(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlInstancePoolOperationAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationCollection GetSqlInstancePoolOperations() { throw null; } public virtual Azure.Pageable GetUsages(bool? expandChildren = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetUsagesAsync(bool? expandChildren = default(bool?), 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; } @@ -1961,6 +1964,7 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public string TimezoneId { get { throw null; } set { } } + public int? TotalMemoryInMB { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualClusterId { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2932,6 +2936,7 @@ protected RecommendedActionCollection() { } public partial class RecommendedActionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecommendedActionData() { } + public System.Collections.Generic.IReadOnlyDictionary ActionDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary AdditionalDetails { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } @@ -4509,6 +4514,7 @@ public static partial class SqlExtensions public static Azure.ResourceManager.Sql.SqlDatabaseVulnerabilityAssessmentScanResource GetSqlDatabaseVulnerabilityAssessmentScanResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupResource GetSqlDistributedAvailabilityGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlFirewallRuleResource GetSqlFirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Sql.SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationResource GetSqlNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionResource GetSqlPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlPrivateLinkResource GetSqlPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -4630,6 +4636,59 @@ protected SqlFirewallRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SqlInstancePoolOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SqlInstancePoolOperationCollection() { } + public virtual Azure.Response Exists(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Guid operationId, 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(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(System.Guid operationId, 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 SqlInstancePoolOperationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlInstancePoolOperationData() { } + public string Description { get { throw null; } } + public int? ErrorCode { get { throw null; } } + public string ErrorDescription { get { throw null; } } + public int? ErrorSeverity { get { throw null; } } + public Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType? ErrorType { get { throw null; } } + public System.DateTimeOffset? EstimatedCompleteOn { get { throw null; } } + public string InstancePoolName { get { throw null; } } + public bool? IsCancellable { get { throw null; } } + public string Operation { get { throw null; } } + public string OperationFriendlyName { get { throw null; } } + public int? PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagementOperationState? State { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlInstancePoolOperationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SqlInstancePoolOperationResource() { } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instancePoolName, System.Guid operationId) { 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.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SqlNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SqlNetworkSecurityPerimeterConfigurationCollection() { } @@ -4651,7 +4710,7 @@ public SqlNetworkSecurityPerimeterConfigurationData() { } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigPerimeter NetworkSecurityPerimeter { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigProfile Profile { get { throw null; } set { } } public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } - public string ProvisioningState { get { throw null; } } + public string ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigAssociation ResourceAssociation { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7096,6 +7155,7 @@ protected MockableSqlArmClient() { } public virtual Azure.ResourceManager.Sql.SqlDatabaseVulnerabilityAssessmentScanResource GetSqlDatabaseVulnerabilityAssessmentScanResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupResource GetSqlDistributedAvailabilityGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlFirewallRuleResource GetSqlFirewallRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationResource GetSqlNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionResource GetSqlPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlPrivateLinkResource GetSqlPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -7389,7 +7449,9 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceAdministratorData ManagedInstanceAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType? administratorType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType?), string login = null, System.Guid? sid = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAzureADOnlyAuthenticationData ManagedInstanceAzureADOnlyAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureADOnlyAuthenticationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), int? totalMemoryInMB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Sql.Models.SqlSku sku, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState, Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, Azure.Core.ResourceIdentifier subnetId, string state, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, Azure.Core.ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, Azure.Core.ResourceIdentifier sourceManagedInstanceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride, string timezoneId, Azure.Core.ResourceIdentifier instancePoolId, Azure.Core.ResourceIdentifier maintenanceConfigurationId, System.Collections.Generic.IEnumerable privateEndpointConnections, string minimalTlsVersion, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId, System.Uri keyId, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal, Azure.Core.ResourceIdentifier virtualClusterId, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus, Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel, System.DateTimeOffset? createOn, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceDtcData ManagedInstanceDtcData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? dtcEnabled = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceDtcSecuritySettings securitySettings = null, System.Collections.Generic.IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceEditionCapability ManagedInstanceEditionCapability(string name = null, bool? isGeneralPurposeV2 = default(bool?), System.Collections.Generic.IEnumerable supportedFamilies = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceEncryptionProtectorData ManagedInstanceEncryptionProtectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, string serverKeyName = null, Azure.ResourceManager.Sql.Models.SqlServerKeyType? serverKeyType = default(Azure.ResourceManager.Sql.Models.SqlServerKeyType?), System.Uri uri = null, string thumbprint = null, bool? isAutoRotationEnabled = default(bool?)) { throw null; } @@ -7403,7 +7465,9 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceOperationData ManagedInstanceOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string managedInstanceName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair operationParameters = null, Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps operationSteps = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair ManagedInstanceOperationParametersPair(Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters currentParameters = null, Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters requestedParameters = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps ManagedInstanceOperationSteps(string totalSteps = null, int? currentStep = default(int?), System.Collections.Generic.IEnumerable stepsList = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), int? totalMemoryInMB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState, Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, Azure.Core.ResourceIdentifier subnetId, string state, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, Azure.Core.ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, Azure.Core.ResourceIdentifier sourceManagedInstanceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride, string timezoneId, Azure.Core.ResourceIdentifier instancePoolId, Azure.Core.ResourceIdentifier maintenanceConfigurationId, System.Collections.Generic.IEnumerable privateEndpointConnections, string minimalTlsVersion, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId, System.Uri keyId, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal, Azure.Core.ResourceIdentifier virtualClusterId, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus, Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel, System.DateTimeOffset? createOn, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePecProperty ManagedInstancePecProperty(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstancePrivateEndpointConnectionData ManagedInstancePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty connectionState = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties ManagedInstancePrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = null, string provisioningState = null) { throw null; } @@ -7437,6 +7501,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.QueryStatistics QueryStatistics(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ReadScaleCapability ReadScaleCapability(int? maxNumberOfReplicas = default(int?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } + public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary actionDetails = null) { throw null; } public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary additionalDetails = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo RecommendedActionErrorInfo(string errorCode = null, Azure.ResourceManager.Sql.Models.ActionRetryableState? isRetryable = default(Azure.ResourceManager.Sql.Models.ActionRetryableState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionImpactRecord RecommendedActionImpactRecord(string dimensionName = null, string unit = null, double? absoluteValue = default(double?), double? changeValueAbsolute = default(double?), double? changeValueRelative = default(double?)) { throw null; } @@ -7470,6 +7535,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlDatabaseSecurityAlertPolicyData SqlDatabaseSecurityAlertPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState? state = default(Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState?), System.Collections.Generic.IEnumerable disabledAlerts = null, System.Collections.Generic.IEnumerable emailAddresses = null, bool? sendToEmailAccountAdmins = default(bool?), string storageEndpoint = null, string storageAccountAccessKey = null, int? retentionDays = default(int?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupData SqlDistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string distributedAvailabilityGroupName = null, System.Guid? distributedAvailabilityGroupId = default(System.Guid?), Azure.ResourceManager.Sql.Models.SqlReplicationModeType? replicationMode = default(Azure.ResourceManager.Sql.Models.SqlReplicationModeType?), Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole? partnerLinkRole = default(Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole?), string partnerAvailabilityGroupName = null, string partnerEndpoint = null, Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole? instanceLinkRole = default(Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole?), string instanceAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.SqlServerFailoverModeType? failoverMode = default(Azure.ResourceManager.Sql.Models.SqlServerFailoverModeType?), Azure.ResourceManager.Sql.Models.SeedingModeType? seedingMode = default(Azure.ResourceManager.Sql.Models.SeedingModeType?), System.Collections.Generic.IEnumerable databases = null) { throw null; } public static Azure.ResourceManager.Sql.SqlFirewallRuleData SqlFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string startIPAddress = null, string endIPAddress = null) { throw null; } + public static Azure.ResourceManager.Sql.SqlInstancePoolOperationData SqlInstancePoolOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string instancePoolName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType? errorType = default(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlLocationCapabilities SqlLocationCapabilities(string name = null, System.Collections.Generic.IEnumerable supportedServerVersions = null, System.Collections.Generic.IEnumerable supportedManagedInstanceVersions = null, System.Collections.Generic.IEnumerable supportedJobAgentVersions = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlManagedInstanceRefreshExternalGovernanceStatusOperationResult SqlManagedInstanceRefreshExternalGovernanceStatusOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string managedInstanceName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlNameAvailabilityContent SqlNameAvailabilityContent(string name = null, Azure.ResourceManager.Sql.Models.SqlNameAvailabilityResourceType resourceType = default(Azure.ResourceManager.Sql.Models.SqlNameAvailabilityResourceType)) { throw null; } @@ -7811,9 +7877,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class DatabaseExportDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.NetworkIsolationSettings NetworkIsolation { get { throw null; } set { } } public string StorageKey { get { throw null; } } @@ -7878,9 +7946,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class DatabaseImportDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public DatabaseImportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } public DatabaseImportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } public string Edition { get { throw null; } set { } } @@ -8746,9 +8815,11 @@ public enum ImplementationMethod } public partial class ImportExistingDatabaseDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ImportExistingDatabaseDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ImportExistingDatabaseDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.NetworkIsolationSettings NetworkIsolation { get { throw null; } set { } } public string StorageKey { get { throw null; } } @@ -9786,6 +9857,7 @@ public ManagedInstancePatch() { } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string TimezoneId { get { throw null; } set { } } + public int? TotalMemoryInMB { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualClusterId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -11499,6 +11571,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Sql.Models.SqlDayOfWeek left, Azure.ResourceManager.Sql.Models.SqlDayOfWeek right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlInstancePoolOperationErrorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlInstancePoolOperationErrorType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType None { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType User { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType 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.Sql.Models.SqlInstancePoolOperationErrorType left, Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType left, Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SqlLocationCapabilities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SqlLocationCapabilities() { } @@ -12695,6 +12785,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public StorageKeyType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.StorageKeyType ManagedIdentity { get { throw null; } } public static Azure.ResourceManager.Sql.Models.StorageKeyType SharedAccessKey { get { throw null; } } public static Azure.ResourceManager.Sql.Models.StorageKeyType StorageAccessKey { get { throw null; } } public bool Equals(Azure.ResourceManager.Sql.Models.StorageKeyType other) { throw null; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs index 9383be19a782..4e7ca9af5229 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/api/Azure.ResourceManager.Sql.netstandard2.0.cs @@ -893,6 +893,9 @@ protected InstancePoolResource() { } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetManagedInstances(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetManagedInstancesAsync(string expand = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetSqlInstancePoolOperation(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSqlInstancePoolOperationAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationCollection GetSqlInstancePoolOperations() { throw null; } public virtual Azure.Pageable GetUsages(bool? expandChildren = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetUsagesAsync(bool? expandChildren = default(bool?), 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; } @@ -1961,6 +1964,7 @@ public ManagedInstanceData(Azure.Core.AzureLocation location) { } public int? StorageThroughputMBps { get { throw null; } set { } } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public string TimezoneId { get { throw null; } set { } } + public int? TotalMemoryInMB { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualClusterId { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2932,6 +2936,7 @@ protected RecommendedActionCollection() { } public partial class RecommendedActionData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public RecommendedActionData() { } + public System.Collections.Generic.IReadOnlyDictionary ActionDetails { get { throw null; } } public System.Collections.Generic.IReadOnlyDictionary AdditionalDetails { get { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IReadOnlyDictionary Details { get { throw null; } } @@ -4509,6 +4514,7 @@ public static partial class SqlExtensions public static Azure.ResourceManager.Sql.SqlDatabaseVulnerabilityAssessmentScanResource GetSqlDatabaseVulnerabilityAssessmentScanResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupResource GetSqlDistributedAvailabilityGroupResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlFirewallRuleResource GetSqlFirewallRuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Sql.SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationResource GetSqlNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionResource GetSqlPrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Sql.SqlPrivateLinkResource GetSqlPrivateLinkResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -4630,6 +4636,59 @@ protected SqlFirewallRuleResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.SqlFirewallRuleData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class SqlInstancePoolOperationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected SqlInstancePoolOperationCollection() { } + public virtual Azure.Response Exists(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Guid operationId, 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(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(System.Guid operationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(System.Guid operationId, 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 SqlInstancePoolOperationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SqlInstancePoolOperationData() { } + public string Description { get { throw null; } } + public int? ErrorCode { get { throw null; } } + public string ErrorDescription { get { throw null; } } + public int? ErrorSeverity { get { throw null; } } + public Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType? ErrorType { get { throw null; } } + public System.DateTimeOffset? EstimatedCompleteOn { get { throw null; } } + public string InstancePoolName { get { throw null; } } + public bool? IsCancellable { get { throw null; } } + public string Operation { get { throw null; } } + public string OperationFriendlyName { get { throw null; } } + public int? PercentComplete { get { throw null; } } + public System.DateTimeOffset? StartOn { get { throw null; } } + public Azure.ResourceManager.Sql.Models.ManagementOperationState? State { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SqlInstancePoolOperationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected SqlInstancePoolOperationResource() { } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instancePoolName, System.Guid operationId) { 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.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Sql.SqlInstancePoolOperationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SqlNetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected SqlNetworkSecurityPerimeterConfigurationCollection() { } @@ -4651,7 +4710,7 @@ public SqlNetworkSecurityPerimeterConfigurationData() { } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigPerimeter NetworkSecurityPerimeter { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigProfile Profile { get { throw null; } set { } } public System.Collections.Generic.IList ProvisioningIssues { get { throw null; } } - public string ProvisioningState { get { throw null; } } + public string ProvisioningState { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.SqlNetworkSecurityPerimeterConfigAssociation ResourceAssociation { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -7096,6 +7155,7 @@ protected MockableSqlArmClient() { } public virtual Azure.ResourceManager.Sql.SqlDatabaseVulnerabilityAssessmentScanResource GetSqlDatabaseVulnerabilityAssessmentScanResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupResource GetSqlDistributedAvailabilityGroupResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlFirewallRuleResource GetSqlFirewallRuleResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.Sql.SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlNetworkSecurityPerimeterConfigurationResource GetSqlNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlPrivateEndpointConnectionResource GetSqlPrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.Sql.SqlPrivateLinkResource GetSqlPrivateLinkResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -7389,7 +7449,9 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceAdministratorData ManagedInstanceAdministratorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType? administratorType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceAdministratorType?), string login = null, System.Guid? sid = default(System.Guid?), System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAdvancedThreatProtectionData ManagedInstanceAdvancedThreatProtectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState? state = default(Azure.ResourceManager.Sql.Models.AdvancedThreatProtectionState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceAzureADOnlyAuthenticationData ManagedInstanceAzureADOnlyAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? isAzureADOnlyAuthenticationEnabled = default(bool?)) { throw null; } - public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(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.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), int? totalMemoryInMB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Sql.ManagedInstanceData ManagedInstanceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, System.Collections.Generic.IDictionary tags, Azure.Core.AzureLocation location, Azure.ResourceManager.Models.ManagedServiceIdentity identity, Azure.ResourceManager.Sql.Models.SqlSku sku, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState, Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, Azure.Core.ResourceIdentifier subnetId, string state, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, Azure.Core.ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, Azure.Core.ResourceIdentifier sourceManagedInstanceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride, string timezoneId, Azure.Core.ResourceIdentifier instancePoolId, Azure.Core.ResourceIdentifier maintenanceConfigurationId, System.Collections.Generic.IEnumerable privateEndpointConnections, string minimalTlsVersion, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId, System.Uri keyId, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal, Azure.Core.ResourceIdentifier virtualClusterId, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus, Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel, System.DateTimeOffset? createOn, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceDtcData ManagedInstanceDtcData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, bool? dtcEnabled = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceDtcSecuritySettings securitySettings = null, System.Collections.Generic.IEnumerable externalDnsSuffixSearchList = null, string dtcHostNameDnsSuffix = null, Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.JobExecutionProvisioningState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceEditionCapability ManagedInstanceEditionCapability(string name = null, bool? isGeneralPurposeV2 = default(bool?), System.Collections.Generic.IEnumerable supportedFamilies = null, System.Collections.Generic.IEnumerable supportedStorageCapabilities = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstanceEncryptionProtectorData ManagedInstanceEncryptionProtectorData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, string serverKeyName = null, Azure.ResourceManager.Sql.Models.SqlServerKeyType? serverKeyType = default(Azure.ResourceManager.Sql.Models.SqlServerKeyType?), System.Uri uri = null, string thumbprint = null, bool? isAutoRotationEnabled = default(bool?)) { throw null; } @@ -7403,7 +7465,9 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.ManagedInstanceOperationData ManagedInstanceOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string managedInstanceName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), bool? isUserError = default(bool?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?), Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair operationParameters = null, Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps operationSteps = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationParametersPair ManagedInstanceOperationParametersPair(Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters currentParameters = null, Azure.ResourceManager.Sql.Models.UpsertManagedServerOperationParameters requestedParameters = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstanceOperationSteps ManagedInstanceOperationSteps(string totalSteps = null, int? currentStep = default(int?), System.Collections.Generic.IEnumerable stepsList = null) { throw null; } - public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, System.Collections.Generic.IDictionary tags = null, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState = default(Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState?), Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode = default(Azure.ResourceManager.Sql.Models.ManagedServerCreateMode?), string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = default(bool?), string administratorLogin = null, string administratorLoginPassword = null, Azure.Core.ResourceIdentifier subnetId = null, string state = null, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType = default(Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsage?), Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = default(Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected?), int? vCores = default(int?), int? storageSizeInGB = default(int?), int? storageIOps = default(int?), int? storageThroughputMBps = default(int?), int? totalMemoryInMB = default(int?), string collation = null, string dnsZone = null, Azure.Core.ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = default(bool?), Azure.Core.ResourceIdentifier sourceManagedInstanceId = null, System.DateTimeOffset? restorePointInTime = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride = default(Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride?), string timezoneId = null, Azure.Core.ResourceIdentifier instancePoolId = null, Azure.Core.ResourceIdentifier maintenanceConfigurationId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = default(Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy?), bool? isZoneRedundant = default(bool?), Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId = null, System.Uri keyId = null, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators = null, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal = null, Azure.Core.ResourceIdentifier virtualClusterId = null, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus = default(Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus?), Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel = default(Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel?), System.DateTimeOffset? createOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata = default(Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode?), Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat = default(Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat?)) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Sql.Models.ManagedInstancePatch ManagedInstancePatch(Azure.ResourceManager.Sql.Models.SqlSku sku, Azure.ResourceManager.Models.ManagedServiceIdentity identity, System.Collections.Generic.IDictionary tags, Azure.ResourceManager.Sql.Models.ManagedInstancePropertiesProvisioningState? provisioningState, Azure.ResourceManager.Sql.Models.ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, Azure.Core.ResourceIdentifier subnetId, string state, Azure.ResourceManager.Sql.Models.ManagedInstanceLicenseType? licenseType, Azure.ResourceManager.Sql.Models.HybridSecondaryUsage? hybridSecondaryUsage, Azure.ResourceManager.Sql.Models.HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, Azure.Core.ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, Azure.Core.ResourceIdentifier sourceManagedInstanceId, System.DateTimeOffset? restorePointInTime, Azure.ResourceManager.Sql.Models.ManagedInstanceProxyOverride? proxyOverride, string timezoneId, Azure.Core.ResourceIdentifier instancePoolId, Azure.Core.ResourceIdentifier maintenanceConfigurationId, System.Collections.Generic.IEnumerable privateEndpointConnections, string minimalTlsVersion, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? currentBackupStorageRedundancy, Azure.ResourceManager.Sql.Models.SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, Azure.Core.ResourceIdentifier primaryUserAssignedIdentityId, System.Uri keyId, Azure.ResourceManager.Sql.Models.ManagedInstanceExternalAdministrator administrators, Azure.ResourceManager.Sql.Models.SqlServicePrincipal servicePrincipal, Azure.Core.ResourceIdentifier virtualClusterId, Azure.ResourceManager.Sql.Models.ExternalGovernanceStatus? externalGovernanceStatus, Azure.ResourceManager.Sql.Models.SqlManagedInstancePricingModel? pricingModel, System.DateTimeOffset? createOn, Azure.ResourceManager.Sql.Models.AuthMetadataLookupMode? authenticationMetadata, Azure.ResourceManager.Sql.Models.ManagedInstanceDatabaseFormat? databaseFormat) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePecProperty ManagedInstancePecProperty(Azure.Core.ResourceIdentifier id = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties properties = null) { throw null; } public static Azure.ResourceManager.Sql.ManagedInstancePrivateEndpointConnectionData ManagedInstancePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty connectionState = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ManagedInstancePrivateEndpointConnectionProperties ManagedInstancePrivateEndpointConnectionProperties(Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.Sql.Models.ManagedInstancePrivateLinkServiceConnectionStateProperty privateLinkServiceConnectionState = null, string provisioningState = null) { throw null; } @@ -7437,6 +7501,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.Models.QueryStatistics QueryStatistics(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.QueryStatisticsProperties QueryStatisticsProperties(string databaseName = null, string queryId = null, string startTime = null, string endTime = null, System.Collections.Generic.IEnumerable intervals = null) { throw null; } public static Azure.ResourceManager.Sql.Models.ReadScaleCapability ReadScaleCapability(int? maxNumberOfReplicas = default(int?), Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } + public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary actionDetails = null) { throw null; } public static Azure.ResourceManager.Sql.RecommendedActionData RecommendedActionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string kind = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), string recommendationReason = null, System.DateTimeOffset? validSince = default(System.DateTimeOffset?), System.DateTimeOffset? lastRefresh = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionStateInfo state = null, bool? isExecutableAction = default(bool?), bool? isRevertableAction = default(bool?), bool? isArchivedAction = default(bool?), System.DateTimeOffset? executeActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? executeActionDuration = default(System.TimeSpan?), System.DateTimeOffset? revertActionStartOn = default(System.DateTimeOffset?), System.TimeSpan? revertActionDuration = default(System.TimeSpan?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? executeActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? executeActionInitiatedOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy? revertActionInitiatedBy = default(Azure.ResourceManager.Sql.Models.RecommendedActionInitiatedBy?), System.DateTimeOffset? revertActionInitiatedOn = default(System.DateTimeOffset?), int? score = default(int?), Azure.ResourceManager.Sql.Models.RecommendedActionImplementationInfo implementationDetails = null, Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo errorDetails = null, System.Collections.Generic.IEnumerable estimatedImpact = null, System.Collections.Generic.IEnumerable observedImpact = null, System.Collections.Generic.IEnumerable timeSeries = null, System.Collections.Generic.IEnumerable linkedObjects = null, System.Collections.Generic.IReadOnlyDictionary additionalDetails = null) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionErrorInfo RecommendedActionErrorInfo(string errorCode = null, Azure.ResourceManager.Sql.Models.ActionRetryableState? isRetryable = default(Azure.ResourceManager.Sql.Models.ActionRetryableState?)) { throw null; } public static Azure.ResourceManager.Sql.Models.RecommendedActionImpactRecord RecommendedActionImpactRecord(string dimensionName = null, string unit = null, double? absoluteValue = default(double?), double? changeValueAbsolute = default(double?), double? changeValueRelative = default(double?)) { throw null; } @@ -7470,6 +7535,7 @@ public static partial class ArmSqlModelFactory public static Azure.ResourceManager.Sql.SqlDatabaseSecurityAlertPolicyData SqlDatabaseSecurityAlertPolicyData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState? state = default(Azure.ResourceManager.Sql.Models.SecurityAlertsPolicyState?), System.Collections.Generic.IEnumerable disabledAlerts = null, System.Collections.Generic.IEnumerable emailAddresses = null, bool? sendToEmailAccountAdmins = default(bool?), string storageEndpoint = null, string storageAccountAccessKey = null, int? retentionDays = default(int?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Sql.SqlDistributedAvailabilityGroupData SqlDistributedAvailabilityGroupData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string distributedAvailabilityGroupName = null, System.Guid? distributedAvailabilityGroupId = default(System.Guid?), Azure.ResourceManager.Sql.Models.SqlReplicationModeType? replicationMode = default(Azure.ResourceManager.Sql.Models.SqlReplicationModeType?), Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole? partnerLinkRole = default(Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole?), string partnerAvailabilityGroupName = null, string partnerEndpoint = null, Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole? instanceLinkRole = default(Azure.ResourceManager.Sql.Models.SqlServerSideLinkRole?), string instanceAvailabilityGroupName = null, Azure.ResourceManager.Sql.Models.SqlServerFailoverModeType? failoverMode = default(Azure.ResourceManager.Sql.Models.SqlServerFailoverModeType?), Azure.ResourceManager.Sql.Models.SeedingModeType? seedingMode = default(Azure.ResourceManager.Sql.Models.SeedingModeType?), System.Collections.Generic.IEnumerable databases = null) { throw null; } public static Azure.ResourceManager.Sql.SqlFirewallRuleData SqlFirewallRuleData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType? resourceType = default(Azure.Core.ResourceType?), string startIPAddress = null, string endIPAddress = null) { throw null; } + public static Azure.ResourceManager.Sql.SqlInstancePoolOperationData SqlInstancePoolOperationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string instancePoolName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = default(int?), System.DateTimeOffset? startOn = default(System.DateTimeOffset?), Azure.ResourceManager.Sql.Models.ManagementOperationState? state = default(Azure.ResourceManager.Sql.Models.ManagementOperationState?), int? errorCode = default(int?), string errorDescription = null, int? errorSeverity = default(int?), Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType? errorType = default(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType?), System.DateTimeOffset? estimatedCompleteOn = default(System.DateTimeOffset?), string description = null, bool? isCancellable = default(bool?)) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlLocationCapabilities SqlLocationCapabilities(string name = null, System.Collections.Generic.IEnumerable supportedServerVersions = null, System.Collections.Generic.IEnumerable supportedManagedInstanceVersions = null, System.Collections.Generic.IEnumerable supportedJobAgentVersions = null, Azure.ResourceManager.Sql.Models.SqlCapabilityStatus? status = default(Azure.ResourceManager.Sql.Models.SqlCapabilityStatus?), string reason = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlManagedInstanceRefreshExternalGovernanceStatusOperationResult SqlManagedInstanceRefreshExternalGovernanceStatusOperationResult(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Guid? requestId = default(System.Guid?), string requestType = null, string queuedTime = null, string managedInstanceName = null, string status = null, string errorMessage = null) { throw null; } public static Azure.ResourceManager.Sql.Models.SqlNameAvailabilityContent SqlNameAvailabilityContent(string name = null, Azure.ResourceManager.Sql.Models.SqlNameAvailabilityResourceType resourceType = default(Azure.ResourceManager.Sql.Models.SqlNameAvailabilityResourceType)) { throw null; } @@ -7811,9 +7877,11 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class DatabaseExportDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public DatabaseExportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.NetworkIsolationSettings NetworkIsolation { get { throw null; } set { } } public string StorageKey { get { throw null; } } @@ -7878,9 +7946,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class DatabaseImportDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public DatabaseImportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } public DatabaseImportDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public string DatabaseName { get { throw null; } set { } } public string Edition { get { throw null; } set { } } @@ -8746,9 +8815,11 @@ public enum ImplementationMethod } public partial class ImportExistingDatabaseDefinition : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { + public ImportExistingDatabaseDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public ImportExistingDatabaseDefinition(Azure.ResourceManager.Sql.Models.StorageKeyType storageKeyType, string storageKey, System.Uri storageUri, string administratorLogin, string administratorLoginPassword) { } public string AdministratorLogin { get { throw null; } } - public string AdministratorLoginPassword { get { throw null; } } + public string AdministratorLoginPassword { get { throw null; } set { } } public string AuthenticationType { get { throw null; } set { } } public Azure.ResourceManager.Sql.Models.NetworkIsolationSettings NetworkIsolation { get { throw null; } set { } } public string StorageKey { get { throw null; } } @@ -9786,6 +9857,7 @@ public ManagedInstancePatch() { } public Azure.Core.ResourceIdentifier SubnetId { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } public string TimezoneId { get { throw null; } set { } } + public int? TotalMemoryInMB { get { throw null; } set { } } public int? VCores { get { throw null; } set { } } public Azure.Core.ResourceIdentifier VirtualClusterId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -11499,6 +11571,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Sql.Models.SqlDayOfWeek left, Azure.ResourceManager.Sql.Models.SqlDayOfWeek right) { throw null; } public override string ToString() { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SqlInstancePoolOperationErrorType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SqlInstancePoolOperationErrorType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType None { get { throw null; } } + public static Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType User { get { throw null; } } + public bool Equals(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType 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.Sql.Models.SqlInstancePoolOperationErrorType left, Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType right) { throw null; } + public static implicit operator Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType left, Azure.ResourceManager.Sql.Models.SqlInstancePoolOperationErrorType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SqlLocationCapabilities : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SqlLocationCapabilities() { } @@ -12695,6 +12785,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public StorageKeyType(string value) { throw null; } + public static Azure.ResourceManager.Sql.Models.StorageKeyType ManagedIdentity { get { throw null; } } public static Azure.ResourceManager.Sql.Models.StorageKeyType SharedAccessKey { get { throw null; } } public static Azure.ResourceManager.Sql.Models.StorageKeyType StorageAccessKey { get { throw null; } } public bool Equals(Azure.ResourceManager.Sql.Models.StorageKeyType other) { throw null; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyCollection.cs index bcab9e0e421c..e998b866c632 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupShortTermRetentionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateTheShortTermRetentionPolicyForTheDatabase [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListShortTermRetentionPoliciesByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListShortTermRetentionPoliciesByDatabase.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyResource.cs index 758b4dad16ab..bf0fb663825d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_BackupShortTermRetentionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BackupShortTermRetentionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateShortTermRetentionPolicy.json // this example is just showing the usage of "BackupShortTermRetentionPolicies_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyCollection.cs index 39ca22c64ff9..883a9e396d7b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DataMaskingPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDataMaskingPolicyMax() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMax.json // this example is just showing the usage of "DataMaskingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateDataMaskingPolicyMax() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateDataMaskingPolicyMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMin.json // this example is just showing the usage of "DataMaskingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateOrUpdateDataMaskingPolicyMin() [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDatabaseDataMaskingPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyGet.json // this example is just showing the usage of "DataMaskingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheDatabaseDataMaskingPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheDatabaseDataMaskingPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyGet.json // this example is just showing the usage of "DataMaskingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheDatabaseDataMaskingPolicies() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheDatabaseDataMaskingPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyGet.json // this example is just showing the usage of "DataMaskingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyResource.cs index abd503d4b017..9493ddee593f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataMaskingPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DataMaskingPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDatabaseDataMaskingPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyGet.json // this example is just showing the usage of "DataMaskingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheDatabaseDataMaskingPolicies() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDataMaskingPolicyMax() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMax.json // this example is just showing the usage of "DataMaskingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateDataMaskingPolicyMax() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateDataMaskingPolicyMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingPolicyCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingPolicyCreateOrUpdateMin.json // this example is just showing the usage of "DataMaskingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateDataMaskingPolicyMin() [Ignore("Only validating compilation of examples")] public async Task GetDataMaskingRules_GetsAListOfDatabaseDataMaskingRules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingRuleListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingRuleListByDatabase.json // this example is just showing the usage of "DataMaskingRules_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 @@ -158,7 +158,7 @@ public async Task GetDataMaskingRules_GetsAListOfDatabaseDataMaskingRules() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForDefaultMax() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json // this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForDe [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForDefaultMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json // this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForDe [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForNumbers() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingRuleCreateOrUpdateNumber.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingRuleCreateOrUpdateNumber.json // this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForNu [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDataMaskingRule_CreateUpdateDataMaskingRuleForText() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataMaskingRuleCreateOrUpdateText.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataMaskingRuleCreateOrUpdateText.json // this example is just showing the usage of "DataMaskingRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityCollection.cs index a77ee0a4ae1e..7b6900b726f7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DataWarehouseUserActivityCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetTheListOfTheUserActivitiesOfADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDataWarehouseUserActivities.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDataWarehouseUserActivities.json // this example is just showing the usage of "DataWarehouseUserActivities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheListOfTheUserActivitiesOfADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfTheUserActivitiesOfADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListDataWarehouseUserActivities.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListDataWarehouseUserActivities.json // this example is just showing the usage of "DataWarehouseUserActivities_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListOfTheUserActivitiesOfADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheListOfTheUserActivitiesOfADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDataWarehouseUserActivities.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDataWarehouseUserActivities.json // this example is just showing the usage of "DataWarehouseUserActivities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheListOfTheUserActivitiesOfADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheListOfTheUserActivitiesOfADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDataWarehouseUserActivities.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDataWarehouseUserActivities.json // this example is just showing the usage of "DataWarehouseUserActivities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityResource.cs index fe700bdee51f..5972614487a5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DataWarehouseUserActivityResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DataWarehouseUserActivityResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheListOfTheUserActivitiesOfADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDataWarehouseUserActivities.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDataWarehouseUserActivities.json // this example is just showing the usage of "DataWarehouseUserActivities_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionCollection.cs index 10a65dc9b0c9..12712f7546cf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DatabaseAdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSAdvancedThreatProtectionSetting [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSAdvancedThreatProtectionSetting [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsTheDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsListByDatabase.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListsTheDatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetADatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionResource.cs index 9d2f1555ae30..06235c3c29b6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DatabaseAdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_DatabaseAdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateADatabaseSAdvancedThreatProtectionSettingsWithAll [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "DatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerCollection.cs index 91539c120789..cdc0d3052906 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_DeletedServerCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDeletedServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerGet.json // this example is just showing the usage of "DeletedServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDeletedServer() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDeletedServers() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerList.json // this example is just showing the usage of "DeletedServers_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListDeletedServers() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDeletedServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerGet.json // this example is just showing the usage of "DeletedServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetDeletedServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDeletedServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerGet.json // this example is just showing the usage of "DeletedServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerResource.cs index 5141a8d7d277..8303aa8284d9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_DeletedServerResource.cs @@ -19,7 +19,7 @@ public partial class Sample_DeletedServerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDeletedServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerGet.json // this example is just showing the usage of "DeletedServers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDeletedServer() [Ignore("Only validating compilation of examples")] public async Task Recover_RecoverDeletedServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerRecover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerRecover.json // this example is just showing the usage of "DeletedServers_Recover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs index 283b0699838f..be05bf7f16b0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticPoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnElasticPoolWithAvailabilityZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateElasticPoolWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateElasticPoolWithAvailabilityZone.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAnElasticPoolWithAvailabilityZone [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateOrUpdateServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateOrUpdateServerlessProperties.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateOrUpdateAnElasticPoolWithServerlessProper [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateHyperscaleElasticPoolWithHighAvailabilityReplicaCountParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolCreateOrUpdateSetHighAvailabilityReplicaCount.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task CreateOrUpdate_CreateOrUpdateHyperscaleElasticPoolWithHighAvai [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithAllParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateOrUpdateMax.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithAllParameter() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMaintenanceConfigurationParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateOrUpdateSetMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateElasticPoolWithMaintenanceConfigu [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMinimumParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateOrUpdateMin.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -280,7 +280,7 @@ public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithMinimumParameters( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsDefault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateWithDefaultPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTy [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTypeParameterAsVBS() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolCreateWithVBSPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateOrUpdateElasticPoolWithPreferredEnclaveTy [Ignore("Only validating compilation of examples")] public async Task Get_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -394,7 +394,7 @@ public async Task Get_GetAHyperscaleElasticPool() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithAvailabilityZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -462,7 +462,7 @@ public async Task Get_GetAnElasticPoolWithAvailabilityZone() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithPreferredEnclaveTypeParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGetWithPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -496,7 +496,7 @@ public async Task Get_GetAnElasticPoolWithPreferredEnclaveTypeParameter() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAnElasticPoolWithServerlessProperties() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllElasticPoolsInAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolListByServer.json // this example is just showing the usage of "ElasticPools_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -566,7 +566,7 @@ public async Task GetAll_GetAllElasticPoolsInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -596,7 +596,7 @@ public async Task Exists_GetAHyperscaleElasticPool() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -626,7 +626,7 @@ public async Task Exists_GetAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnElasticPoolWithAvailabilityZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -656,7 +656,7 @@ public async Task Exists_GetAnElasticPoolWithAvailabilityZone() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnElasticPoolWithPreferredEnclaveTypeParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGetWithPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -686,7 +686,7 @@ public async Task Exists_GetAnElasticPoolWithPreferredEnclaveTypeParameter() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -716,7 +716,7 @@ public async Task Exists_GetAnElasticPoolWithServerlessProperties() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -758,7 +758,7 @@ public async Task GetIfExists_GetAHyperscaleElasticPool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -800,7 +800,7 @@ public async Task GetIfExists_GetAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnElasticPoolWithAvailabilityZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -842,7 +842,7 @@ public async Task GetIfExists_GetAnElasticPoolWithAvailabilityZone() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnElasticPoolWithPreferredEnclaveTypeParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGetWithPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -884,7 +884,7 @@ public async Task GetIfExists_GetAnElasticPoolWithPreferredEnclaveTypeParameter( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs index 32ca54ec8aa4..6fc081ca7005 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ElasticPoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ElasticPoolResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAHyperscaleElasticPool() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGet.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithAvailabilityZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithAvailabilityZone.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnElasticPoolWithAvailabilityZone() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithPreferredEnclaveTypeParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolGetWithPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolGetWithPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnElasticPoolWithPreferredEnclaveTypeParameter() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetElasticPoolWithServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetElasticPoolWithServerlessProperties.json // this example is just showing the usage of "ElasticPools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAnElasticPoolWithServerlessProperties() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolDelete.json // this example is just showing the usage of "ElasticPools_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 @@ -202,7 +202,7 @@ public async Task Delete_DeleteAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task Update_AssignsMaintenanceConfigurationToAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateAssignMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_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 @@ -238,7 +238,7 @@ public async Task Update_AssignsMaintenanceConfigurationToAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task Update_ResetsMaintenanceConfigurationOfAnElasticPoolToDefault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateResetMaintenanceConfiguration.json // this example is just showing the usage of "ElasticPools_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 @@ -274,7 +274,7 @@ public async Task Update_ResetsMaintenanceConfigurationOfAnElasticPoolToDefault( [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnElasticPoolWithAllParameter() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateMax.json // this example is just showing the usage of "ElasticPools_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 @@ -321,7 +321,7 @@ public async Task Update_UpdateAnElasticPoolWithAllParameter() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnElasticPoolWithMinimumParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateMin.json // this example is just showing the usage of "ElasticPools_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 @@ -354,7 +354,7 @@ public async Task Update_UpdateAnElasticPoolWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnElasticPoolWithPreferredEnclaveTypeParameterAsDefault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateWithDefaultPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_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 @@ -391,7 +391,7 @@ public async Task Update_UpdateAnElasticPoolWithPreferredEnclaveTypeParameterAsD [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnElasticPoolWithPreferredEnclaveTypeParameterAsVBS() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateWithVBSPreferredEnclaveType.json // this example is just showing the usage of "ElasticPools_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 @@ -428,7 +428,7 @@ public async Task Update_UpdateAnElasticPoolWithPreferredEnclaveTypeParameterAsV [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnElasticPoolWithServerlessProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ElasticPoolUpdateServerlessProperties.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ElasticPoolUpdateServerlessProperties.json // this example is just showing the usage of "ElasticPools_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 @@ -476,7 +476,7 @@ public async Task Update_UpdateAnElasticPoolWithServerlessProperties() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/HyperscaleElasticPoolUpdateSetHighAvailabilityReplicaCount.json // this example is just showing the usage of "ElasticPools_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 @@ -512,7 +512,7 @@ public async Task Update_UpdateHighAvailabilityReplicaCountOfAHyperscaleElasticP [Ignore("Only validating compilation of examples")] public async Task GetDatabases_GetsAListOfDatabasesInAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListDatabasesByElasticPool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListDatabasesByElasticPool.json // this example is just showing the usage of "Databases_ListByElasticPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -546,7 +546,7 @@ public async Task GetDatabases_GetsAListOfDatabasesInAnElasticPool() [Ignore("Only validating compilation of examples")] public async Task GetElasticPoolOperations_ListTheElasticPoolManagementOperations() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListElasticPoolOperations.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListElasticPoolOperations.json // this example is just showing the usage of "ElasticPoolOperations_ListByElasticPool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -576,7 +576,7 @@ public async Task GetElasticPoolOperations_ListTheElasticPoolManagementOperation [Ignore("Only validating compilation of examples")] public async Task CancelElasticPoolOperation_CancelTheElasticPoolManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CancelElasticPoolOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CancelElasticPoolOperation.json // this example is just showing the usage of "ElasticPoolOperations_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 @@ -604,7 +604,7 @@ public async Task CancelElasticPoolOperation_CancelTheElasticPoolManagementOpera [Ignore("Only validating compilation of examples")] public async Task Failover_FailoverAnElasticPool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverElasticPool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverElasticPool.json // this example is just showing the usage of "ElasticPools_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorCollection.cs index d7d0915f9048..08227f91e88e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_EncryptionProtectorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheEncryptionProtectorToKeyVault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorCreateOrUpdateKeyVault.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json // this example is just showing the usage of "EncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateTheEncryptionProtectorToKeyVault() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheEncryptionProtectorToServiceManaged() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json // this example is just showing the usage of "EncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateTheEncryptionProtectorToServiceManaged() [Ignore("Only validating compilation of examples")] public async Task Get_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorGet.json // this example is just showing the usage of "EncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEncryptionProtectorsByServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorList.json // this example is just showing the usage of "EncryptionProtectors_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task GetAll_ListEncryptionProtectorsByServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorGet.json // this example is just showing the usage of "EncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorGet.json // this example is just showing the usage of "EncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorResource.cs index 7bedec888cca..bae87faf1ef0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EncryptionProtectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_EncryptionProtectorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorGet.json // this example is just showing the usage of "EncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheEncryptionProtectorToKeyVault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorCreateOrUpdateKeyVault.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorCreateOrUpdateKeyVault.json // this example is just showing the usage of "EncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateTheEncryptionProtectorToKeyVault() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheEncryptionProtectorToServiceManaged() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorCreateOrUpdateServiceManaged.json // this example is just showing the usage of "EncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateTheEncryptionProtectorToServiceManaged() [Ignore("Only validating compilation of examples")] public async Task Revalidate_RevalidatesTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EncryptionProtectorRevalidate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EncryptionProtectorRevalidate.json // this example is just showing the usage of "EncryptionProtectors_Revalidate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateCollection.cs index d9a640302942..38f47703fedf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_EndpointCertificateCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsAnEndpointCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EndpointCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EndpointCertificatesGet.json // this example is just showing the usage of "EndpointCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAnEndpointCertificate() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfEndpointCertificates() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EndpointCertificatesListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EndpointCertificatesListByInstance.json // this example is just showing the usage of "EndpointCertificates_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 @@ -89,7 +89,7 @@ public async Task GetAll_GetAListOfEndpointCertificates() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAnEndpointCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EndpointCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EndpointCertificatesGet.json // this example is just showing the usage of "EndpointCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAnEndpointCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAnEndpointCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EndpointCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EndpointCertificatesGet.json // this example is just showing the usage of "EndpointCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateResource.cs index 1a6c75c7d110..8b2bc0e94fb8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_EndpointCertificateResource.cs @@ -19,7 +19,7 @@ public partial class Sample_EndpointCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAnEndpointCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/EndpointCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/EndpointCertificatesGet.json // this example is just showing the usage of "EndpointCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyCollection.cs index 7794c2714689..a35df8f92094 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExtendedDatabaseBlobAuditingPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAnExtendedDatabaseSAzureMonitorAu [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPo [Ignore("Only validating compilation of examples")] public async Task Get_GetAnExtendedDatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task Get_GetAnExtendedDatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExtendedAuditingSettingsOfADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseExtendedAuditingSettingsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseExtendedAuditingSettingsList.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListExtendedAuditingSettingsOfADatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnExtendedDatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAnExtendedDatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnExtendedDatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyResource.cs index cbbeb2bb937c..7c538531a924 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedDatabaseBlobAuditingPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExtendedDatabaseBlobAuditingPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnExtendedDatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingGet.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnExtendedDatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseAzureMonitorAuditingCreateMin.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAnExtendedDatabaseSAzureMonitorAuditingPo [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMax.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWith [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAnExtendedDatabaseSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedDatabaseBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedDatabaseBlobAuditingCreateMin.json // this example is just showing the usage of "ExtendedDatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyCollection.cs index 7f480791828d..f60223b5d4f6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ExtendedServerBlobAuditingPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSExtendedBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSExtendedBlobAuditingPolicyWithAll [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSExtendedBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSExtendedBlobAuditingPolicyWithMin [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSBlobExtendedAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingGet.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSBlobExtendedAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExtendedAuditingSettingsOfAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerExtendedAuditingSettingsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerExtendedAuditingSettingsList.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,7 +179,7 @@ public async Task GetAll_ListExtendedAuditingSettingsOfAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSBlobExtendedAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingGet.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSBlobExtendedAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSBlobExtendedAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingGet.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyResource.cs index eaa1bbe2d35f..7c3109dd4f64 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ExtendedServerBlobAuditingPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ExtendedServerBlobAuditingPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSBlobExtendedAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingGet.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSBlobExtendedAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSExtendedBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingCreateMax.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAServerSExtendedBlobAuditingPolicyWithAllParamete [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSExtendedBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExtendedServerBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExtendedServerBlobAuditingCreateMin.json // this example is just showing the usage of "ExtendedServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs index 4b8d8df43ca6..43a9874be62a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_FailoverGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupCreateOrUpdate.json // this example is just showing the usage of "FailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFailoverGroupWithStandbySecondaryDatabaseOnPartnerServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupCreateOrUpdateStandbySecondary.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupCreateOrUpdateStandbySecondary.json // this example is just showing the usage of "FailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateFailoverGroupWithStandbySecondaryDatabase [Ignore("Only validating compilation of examples")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupList.json // this example is just showing the usage of "FailoverGroups_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -187,7 +187,7 @@ public async Task GetAll_ListFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs index bc609a761521..0af16571a08d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_FailoverGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FailoverGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupGet.json // this example is just showing the usage of "FailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupDelete.json // this example is just showing the usage of "FailoverGroups_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_DeleteFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Update_AddDatabaseToFailoverGroupWithStandbySecondaryOnPartnerServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupUpdateStandbySecondary.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupUpdateStandbySecondary.json // this example is just showing the usage of "FailoverGroups_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 @@ -119,7 +119,7 @@ public async Task Update_AddDatabaseToFailoverGroupWithStandbySecondaryOnPartner [Ignore("Only validating compilation of examples")] public async Task Update_UpdateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupUpdate.json // this example is just showing the usage of "FailoverGroups_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 @@ -159,7 +159,7 @@ public async Task Update_UpdateFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Failover_PlannedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupFailover.json // this example is just showing the usage of "FailoverGroups_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Failover_PlannedFailoverOfAFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllowingDataLoss() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupForceFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupForceFailoverAllowDataLoss.json // this example is just showing the usage of "FailoverGroups_ForceFailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllow [Ignore("Only validating compilation of examples")] public async Task TryPlannedBeforeForcedFailover_TryPlannedBeforeForcedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverGroupTryPlannedBeforeForcedFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverGroupTryPlannedBeforeForcedFailover.json // this example is just showing the usage of "FailoverGroups_TryPlannedBeforeForcedFailover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyCollection.cs index 688dbf28fd01..bdb0ab39d485 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_GeoBackupPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateADatabaseDefaultGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesCreateOrUpdate.json // this example is just showing the usage of "GeoBackupPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateADatabaseDefaultGeoBackupPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSpecifiedGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesGet.json // this example is just showing the usage of "GeoBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheSpecifiedGeoBackupPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListGeoBackupPoliciesForTheGivenDatabaseResource() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesList.json // this example is just showing the usage of "GeoBackupPolicies_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_ListGeoBackupPoliciesForTheGivenDatabaseResource() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheSpecifiedGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesGet.json // this example is just showing the usage of "GeoBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheSpecifiedGeoBackupPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheSpecifiedGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesGet.json // this example is just showing the usage of "GeoBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyResource.cs index 20710c98d0b1..3bc59e83f120 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_GeoBackupPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_GeoBackupPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSpecifiedGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesGet.json // this example is just showing the usage of "GeoBackupPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheSpecifiedGeoBackupPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateADatabaseDefaultGeoBackupPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GeoBackupPoliciesCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GeoBackupPoliciesCreateOrUpdate.json // this example is just showing the usage of "GeoBackupPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs index ad86f316e648..c821526000fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_IPv6FirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleCreate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAnIPv6FirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleUpdate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateAnIPv6FirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task Get_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetIPv6FirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListIPv6FirewallRules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleList.json // this example is just showing the usage of "IPv6FirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetAll_ListIPv6FirewallRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task Exists_GetIPv6FirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs index 3986279309f7..6a205630bb5f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_IPv6FirewallRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_IPv6FirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleGet.json // this example is just showing the usage of "IPv6FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetIPv6FirewallRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnIPv6FirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleDelete.json // this example is just showing the usage of "IPv6FirewallRules_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_DeleteAnIPv6FirewallRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleCreate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAnIPv6FirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnIPv6FirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/IPv6FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/IPv6FirewallRuleUpdate.json // this example is just showing the usage of "IPv6FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupCollection.cs index 07636d348ef7..01b096bcf208 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_InstanceFailoverGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json // this example is just showing the usage of "InstanceFailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupGet.json // this example is just showing the usage of "InstanceFailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupList.json // this example is just showing the usage of "InstanceFailoverGroups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupGet.json // this example is just showing the usage of "InstanceFailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupGet.json // this example is just showing the usage of "InstanceFailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupResource.cs index 6d3539af5615..368391bb2b93 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstanceFailoverGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InstanceFailoverGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupGet.json // this example is just showing the usage of "InstanceFailoverGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupDelete.json // this example is just showing the usage of "InstanceFailoverGroups_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_DeleteFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupCreateOrUpdate.json // this example is just showing the usage of "InstanceFailoverGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task Failover_PlannedFailoverOfAFailoverGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupFailover.json // this example is just showing the usage of "InstanceFailoverGroups_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Failover_PlannedFailoverOfAFailoverGroup() [Ignore("Only validating compilation of examples")] public async Task ForceFailoverAllowDataLoss_ForcedFailoverOfAFailoverGroupAllowingDataLoss() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InstanceFailoverGroupForceFailoverAllowDataLoss.json // this example is just showing the usage of "InstanceFailoverGroups_ForceFailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolCollection.cs index 3ba6ba608ad8..e13f3ee8acb8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_InstancePoolCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnInstancePoolWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateInstancePoolMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateInstancePoolMax.json // this example is just showing the usage of "InstancePools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAnInstancePoolWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAnInstancePoolWithMinProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateInstancePoolMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateInstancePoolMin.json // this example is just showing the usage of "InstancePools_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAnInstancePoolWithMinProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePool.json // this example is just showing the usage of "InstancePools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnInstancePool() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListInstancePoolsByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListInstancePoolsByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolsByResourceGroup.json // this example is just showing the usage of "InstancePools_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_ListInstancePoolsByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePool.json // this example is just showing the usage of "InstancePools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnInstancePool() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePool.json // this example is just showing the usage of "InstancePools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationCollection.cs new file mode 100644 index 000000000000..7dca38d1de77 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationCollection.cs @@ -0,0 +1,196 @@ +// 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.Sql.Samples +{ + public partial class Sample_InstancePoolOperationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this InstancePoolOperationResource + InstancePoolOperationCollection collection = instancePool.GetInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + InstancePoolOperationResource result = await collection.GetAsync(operationId); + + // 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 + InstancePoolOperationData 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_ListTheInstancePoolManagementOperationsWithNoResults() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json + // this example is just showing the usage of "InstancePoolOperations_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this InstancePoolOperationResource + InstancePoolOperationCollection collection = instancePool.GetInstancePoolOperations(); + + // invoke the operation and iterate over the result + await foreach (InstancePoolOperationResource 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 + InstancePoolOperationData 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_ListTheInstancePoolManagementOperationsWithSomeResults() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json + // this example is just showing the usage of "InstancePoolOperations_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this InstancePoolOperationResource + InstancePoolOperationCollection collection = instancePool.GetInstancePoolOperations(); + + // invoke the operation and iterate over the result + await foreach (InstancePoolOperationResource 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 + InstancePoolOperationData 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_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this InstancePoolOperationResource + InstancePoolOperationCollection collection = instancePool.GetInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + bool result = await collection.ExistsAsync(operationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this InstancePoolOperationResource + InstancePoolOperationCollection collection = instancePool.GetInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + NullableResponse response = await collection.GetIfExistsAsync(operationId); + InstancePoolOperationResource 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 + InstancePoolOperationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationResource.cs new file mode 100644 index 000000000000..ccf5a3fe3d64 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolOperationResource.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.Sql.Samples +{ + public partial class Sample_InstancePoolOperationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolOperationResource created on azure + // for more information of creating InstancePoolOperationResource, please refer to the document of InstancePoolOperationResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + ResourceIdentifier instancePoolOperationResourceId = InstancePoolOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName, operationId); + InstancePoolOperationResource instancePoolOperation = client.GetInstancePoolOperationResource(instancePoolOperationResourceId); + + // invoke the operation + InstancePoolOperationResource result = await instancePoolOperation.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 + InstancePoolOperationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs index ad6d92267f68..be553e47de34 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_InstancePoolResource.cs @@ -20,7 +20,7 @@ public partial class Sample_InstancePoolResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePool.json // this example is just showing the usage of "InstancePools_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnInstancePool() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteInstancePool.json // this example is just showing the usage of "InstancePools_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_DeleteAnInstancePool() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchInstancePool.json // this example is just showing the usage of "InstancePools_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_PatchAnInstancePool() [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstancesByInstancePool() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceListByInstancePool.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceListByInstancePool.json // this example is just showing the usage of "ManagedInstances_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetManagedInstances_ListManagedInstancesByInstancePool() [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstancesByInstancePoolWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceListByInstancePoolWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetManagedInstances_ListManagedInstancesByInstancePoolWithExpa [Ignore("Only validating compilation of examples")] public async Task GetUsages_ListInstancePoolUsagesExpandedWithChildren() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListInstancePoolUsageExpanded.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolUsageExpanded.json // this example is just showing the usage of "Usages_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetUsages_ListInstancePoolUsagesExpandedWithChildren() [Ignore("Only validating compilation of examples")] public async Task GetUsages_ListInstancePoolUsages() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListInstancePoolUsage.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolUsage.json // this example is just showing the usage of "Usages_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadCollection.cs index f80e3405586a..3163328dd910 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_LedgerDigestUploadCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnablesLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsEnable.json // this example is just showing the usage of "LedgerDigestUploads_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EnablesLedgerDigestUploadConfigurationForADatab [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsGet.json // this example is just showing the usage of "LedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase( [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfLedgerDigestUploadSettingsOnADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsList.json // this example is just showing the usage of "LedgerDigestUploads_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsListOfLedgerDigestUploadSettingsOnADatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsGet.json // this example is just showing the usage of "LedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADataba [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsGet.json // this example is just showing the usage of "LedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadResource.cs index fa238fe88b1a..bd6fb80b780d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LedgerDigestUploadResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LedgerDigestUploadResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsGet.json // this example is just showing the usage of "LedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase( [Ignore("Only validating compilation of examples")] public async Task Update_EnablesLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsEnable.json // this example is just showing the usage of "LedgerDigestUploads_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_EnablesLedgerDigestUploadConfigurationForADatabase() [Ignore("Only validating compilation of examples")] public async Task Disable_DisablesUploadingLedgerDigestsForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LedgerDigestUploadsDisable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LedgerDigestUploadsDisable.json // this example is just showing the usage of "LedgerDigestUploads_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 diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionCollection.cs index 53d8bddaba93..a56f2a0f6c06 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_LogicalDatabaseTransparentDataEncryptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSTransparentDataEncryptionStateWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionUpdate.json // this example is just showing the usage of "TransparentDataEncryptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSTransparentDataEncryptionStateW [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionGet.json // this example is just showing the usage of "TransparentDataEncryptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfTheDatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionList.json // this example is just showing the usage of "TransparentDataEncryptions_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAListOfTheDatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionGet.json // this example is just showing the usage of "TransparentDataEncryptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionGet.json // this example is just showing the usage of "TransparentDataEncryptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionResource.cs index c3032dafcad5..775da5f07829 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LogicalDatabaseTransparentDataEncryptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LogicalDatabaseTransparentDataEncryptionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionGet.json // this example is just showing the usage of "TransparentDataEncryptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSTransparentDataEncryptionStateWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/TransparentDataEncryptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/TransparentDataEncryptionUpdate.json // this example is just showing the usage of "TransparentDataEncryptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs index 6e501bc3bd87..a7a83a37bf76 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_LongTermRetentionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json // this example is just showing the usage of "LongTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateTheLongTermRetentionPolicyForTheD [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyGet.json // this example is just showing the usage of "LongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyListByDatabase.json // this example is just showing the usage of "LongTermRetentionPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyGet.json // this example is just showing the usage of "LongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyGet.json // this example is just showing the usage of "LongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs index 98b1a44eb4d5..a17e4f43ed0e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_LongTermRetentionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_LongTermRetentionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyGet.json // this example is just showing the usage of "LongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateTheLongTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionPolicyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionPolicyCreateOrUpdate.json // this example is just showing the usage of "LongTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowOptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowOptionResource.cs index fe6c3e7abe50..3816a921f131 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowOptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowOptionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_MaintenanceWindowOptionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAListOfAvailableMaintenanceWindowsForASelectedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetMaintenanceWindowOptions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetMaintenanceWindowOptions.json // this example is just showing the usage of "MaintenanceWindowOptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowsResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowsResource.cs index 6c65ae6fe912..9fe75a64acea 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowsResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_MaintenanceWindowsResource.cs @@ -21,7 +21,7 @@ public partial class Sample_MaintenanceWindowsResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsMaintenanceWindowSettingsForASelectedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetMaintenanceWindows.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetMaintenanceWindows.json // this example is just showing the usage of "MaintenanceWindows_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsMaintenanceWindowSettingsForASelectedDatabase() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_SetsMaintenanceWindowSettingsForASelectedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateMaintenanceWindows.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateMaintenanceWindows.json // this example is just showing the usage of "MaintenanceWindows_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyCollection.cs index c1e9c67a781c..70cba05e2e58 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedBackupShortTermRetentionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateTheShortTermRetentionPolicyForTheDatabase [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheShortTermRetentionPolicyListForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetListManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetListManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyListForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyResource.cs index a3adf3119706..ed8f512ef257 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedBackupShortTermRetentionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedBackupShortTermRetentionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateManagedShortTermRetentionPolicy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateManagedShortTermRetentionPolicy.json // this example is just showing the usage of "ManagedBackupShortTermRetentionPolicies_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionCollection.cs index ca7cf7662a93..d376f160c915 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseAdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedDatabaseSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedDatabaseSAdvancedThreatProtection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedDatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedDatabaseSAdvancedThreatProtection [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAManagedDatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfTheManagedDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsListByDatabase.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAListOfTheManagedDatabaseSAdvancedThreatProtectionSe [Ignore("Only validating compilation of examples")] public async Task Exists_GetAManagedDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAManagedDatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAManagedDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionResource.cs index e821b6947784..aa18ca5dadb7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseAdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseAdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedDatabaseSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAManagedDatabaseSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedDatabaseSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAManagedDatabaseSAdvancedThreatProtectionSettings [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedDatabaseSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ManagedDatabaseAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs index e984bd8c4efa..8a7b62444588 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExternalBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateRestoreExternalBackup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackup.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesANewManagedDatabaseByRestoringFromAnExte [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExternalBackupUsingManagedIdentity() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateRestoreExternalBackupManagedIdentity.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesANewManagedDatabaseByRestoringFromAnExte [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringAGeoReplicatedBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateRecovery.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateRecovery.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringAGeoRepl [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseFromRestoringALongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateRestoreLtrBackup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateRestoreLtrBackup.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesANewManagedDatabaseFromRestoringALongTer [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingCrossSubscriptionPointInTimeRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateCrossSubscriptionPointInTimeRestore.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesANewManagedDatabaseUsingCrossSubscriptio [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingPointInTimeRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreatePointInTimeRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreatePointInTimeRestore.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -273,7 +273,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseUsingPointInTimeResto [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithLedgerOn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateManagedDatabaseLedger.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateManagedDatabaseLedger.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -312,7 +312,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithLedgerOn() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMaximalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateMax.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesANewManagedDatabaseWithMaximalProperties [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCreateMin.json // this example is just showing the usage of "ManagedDatabases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -390,7 +390,7 @@ public async Task CreateOrUpdate_CreatesANewManagedDatabaseWithMinimalProperties [Ignore("Only validating compilation of examples")] public async Task Get_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseListByManagedInstance.json // this example is just showing the usage of "ManagedDatabases_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 @@ -460,7 +460,7 @@ public async Task GetAll_ListDatabasesByManagedInstances() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -490,7 +490,7 @@ public async Task Exists_GetsAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnCollection.cs index 4206d5c42db2..16fbab07f58d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseColumnCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnGet.json // this example is just showing the usage of "ManagedDatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetManagedDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnListByTable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnListByTable.json // this example is just showing the usage of "ManagedDatabaseColumns_ListByTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListManagedDatabaseColumns() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnGet.json // this example is just showing the usage of "ManagedDatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetManagedDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnGet.json // this example is just showing the usage of "ManagedDatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnResource.cs index d3376bbed631..355a997db5f6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseColumnResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseColumnResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnGet.json // this example is just showing the usage of "ManagedDatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task DisableRecommendationManagedDatabaseSensitivityLabel_DisablesTheSensitivityRecommendationsOnAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelDisable.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_DisableRecommendation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 DisableRecommendationManagedDatabaseSensitivityLabel_DisablesT [Ignore("Only validating compilation of examples")] public async Task EnableRecommendationManagedDatabaseSensitivityLabel_EnablesTheSensitivityRecommendationsOnAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRecommendedColumnSensitivityLabelEnable.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_EnableRecommendation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs index c8337592a9e5..d626cf37c3a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseResource.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseGet.json // this example is just showing the usage of "ManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseDelete.json // this example is just showing the usage of "ManagedDatabases_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_DeleteManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesAManagedDatabaseWithMaximalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseUpdateMax.json // this example is just showing the usage of "ManagedDatabases_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 @@ -118,7 +118,7 @@ public async Task Update_UpdatesAManagedDatabaseWithMaximalProperties() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesAManagedDatabaseWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseUpdateMin.json // this example is just showing the usage of "ManagedDatabases_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 @@ -157,7 +157,7 @@ public async Task Update_UpdatesAManagedDatabaseWithMinimalProperties() [Ignore("Only validating compilation of examples")] public async Task GetManagedDatabaseColumnsByDatabase_FilterManagedDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedColumnsListByDatabaseMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedColumnsListByDatabaseMax.json // this example is just showing the usage of "ManagedDatabaseColumns_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetManagedDatabaseColumnsByDatabase_FilterManagedDatabaseColum [Ignore("Only validating compilation of examples")] public async Task GetManagedDatabaseColumnsByDatabase_ListManagedDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedColumnsListByDatabaseMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedColumnsListByDatabaseMin.json // this example is just showing the usage of "ManagedDatabaseColumns_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetManagedDatabaseColumnsByDatabase_ListManagedDatabaseColumns [Ignore("Only validating compilation of examples")] public async Task GetManagedDatabaseQuery_ObtainQueryProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceQueryGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceQueryGet.json // this example is just showing the usage of "ManagedDatabaseQueries_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetManagedDatabaseQuery_ObtainQueryProperties() [Ignore("Only validating compilation of examples")] public async Task GetQueryStatistics_ObtainQueryExecutionStatistics() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceQueryStatisticsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceQueryStatisticsList.json // this example is just showing the usage of "ManagedDatabaseQueries_ListByQuery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetQueryStatistics_ObtainQueryExecutionStatistics() [Ignore("Only validating compilation of examples")] public async Task GetQueryStatistics_ObtainQueryExecutionStatisticsExampleWithAllRequestParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceQueryStatisticsListMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceQueryStatisticsListMax.json // this example is just showing the usage of "ManagedDatabaseQueries_ListByQuery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -322,7 +322,7 @@ public async Task GetQueryStatistics_ObtainQueryExecutionStatisticsExampleWithAl [Ignore("Only validating compilation of examples")] public async Task GetQueryStatistics_ObtainQueryExecutionStatisticsMinimalExampleWithOnlyMandatoryRequestParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceQueryStatisticsListMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceQueryStatisticsListMin.json // this example is just showing the usage of "ManagedDatabaseQueries_ListByQuery" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetQueryStatistics_ObtainQueryExecutionStatisticsMinimalExampl [Ignore("Only validating compilation of examples")] public async Task GetCurrentManagedDatabaseSensitivityLabels_GetsTheCurrentSensitivityLabelsOfAGivenDatabaseInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseCurrent.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_ListCurrent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -388,7 +388,7 @@ public async Task GetCurrentManagedDatabaseSensitivityLabels_GetsTheCurrentSensi [Ignore("Only validating compilation of examples")] public async Task UpdateManagedDatabaseSensitivityLabel_UpdateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSensitivityLabelsCurrentUpdate.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_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 @@ -451,7 +451,7 @@ public async Task UpdateManagedDatabaseSensitivityLabel_UpdateSensitivityLabelsO [Ignore("Only validating compilation of examples")] public async Task GetRecommendedManagedDatabaseSensitivityLabels_GetsTheRecommendedSensitivityLabelsOfAGivenDatabaseInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabaseRecommended.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_ListRecommended" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -485,7 +485,7 @@ public async Task GetRecommendedManagedDatabaseSensitivityLabels_GetsTheRecommen [Ignore("Only validating compilation of examples")] public async Task UpdateRecommendedManagedDatabaseSensitivityLabel_UpdateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSensitivityLabelsRecommendedUpdate.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_UpdateRecommended" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -534,7 +534,7 @@ public async Task UpdateRecommendedManagedDatabaseSensitivityLabel_UpdateRecomme [Ignore("Only validating compilation of examples")] public async Task GetManagedDatabaseSensitivityLabelsByDatabase_GetsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSensitivityLabelsListByDatabase.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -568,7 +568,7 @@ public async Task GetManagedDatabaseSensitivityLabelsByDatabase_GetsTheCurrentAn [Ignore("Only validating compilation of examples")] public async Task CancelMove_CancelsAManagedDatabaseMove() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCancelMove.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCancelMove.json // this example is just showing the usage of "ManagedDatabases_CancelMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -596,7 +596,7 @@ public async Task CancelMove_CancelsAManagedDatabaseMove() [Ignore("Only validating compilation of examples")] public async Task CompleteMove_CompletesAManagedDatabaseMove() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCompleteMove.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCompleteMove.json // this example is just showing the usage of "ManagedDatabases_CompleteMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -624,7 +624,7 @@ public async Task CompleteMove_CompletesAManagedDatabaseMove() [Ignore("Only validating compilation of examples")] public async Task CompleteRestore_CompletesAManagedDatabaseExternalBackupRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseCompleteExternalRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseCompleteExternalRestore.json // this example is just showing the usage of "ManagedDatabases_CompleteRestore" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -652,7 +652,7 @@ public async Task CompleteRestore_CompletesAManagedDatabaseExternalBackupRestore [Ignore("Only validating compilation of examples")] public async Task StartMove_StartsAManagedDatabaseMoveWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseStartMoveMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseStartMoveMax.json // this example is just showing the usage of "ManagedDatabases_StartMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -683,7 +683,7 @@ public async Task StartMove_StartsAManagedDatabaseMoveWithAllOptionalParametersS [Ignore("Only validating compilation of examples")] public async Task StartMove_StartsAManagedDatabaseMoveWithNoOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseStartMoveMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseStartMoveMin.json // this example is just showing the usage of "ManagedDatabases_StartMove" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailCollection.cs index 2989f8568fa3..425adad5664b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseRestoreDetailCollection [Ignore("Only validating compilation of examples")] public async Task Get_ManagedDatabaseRestoreDetails() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRestoreDetails.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRestoreDetails.json // this example is just showing the usage of "ManagedDatabaseRestoreDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ManagedDatabaseRestoreDetails() [Ignore("Only validating compilation of examples")] public async Task Exists_ManagedDatabaseRestoreDetails() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRestoreDetails.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRestoreDetails.json // this example is just showing the usage of "ManagedDatabaseRestoreDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_ManagedDatabaseRestoreDetails() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_ManagedDatabaseRestoreDetails() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRestoreDetails.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRestoreDetails.json // this example is just showing the usage of "ManagedDatabaseRestoreDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailResource.cs index f4f663e04bc0..ef4aab41fb54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseRestoreDetailResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseRestoreDetailResource [Ignore("Only validating compilation of examples")] public async Task Get_ManagedDatabaseRestoreDetails() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseRestoreDetails.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseRestoreDetails.json // this example is just showing the usage of "ManagedDatabaseRestoreDetails_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaCollection.cs index cf01448f138d..28b720fef5a7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseSchemaCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSchemaGet.json // this example is just showing the usage of "ManagedDatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedDatabaseSchemas() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSchemaListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSchemaListByDatabase.json // this example is just showing the usage of "ManagedDatabaseSchemas_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListManagedDatabaseSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSchemaGet.json // this example is just showing the usage of "ManagedDatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSchemaGet.json // this example is just showing the usage of "ManagedDatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaResource.cs index 08310435953b..5e47f2f8b086 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSchemaGet.json // this example is just showing the usage of "ManagedDatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyCollection.cs index 0bd41b6dd6cc..19dc4bd23151 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseSecurityAlertPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSThreatDetectionPolicyWithAllPar [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSThreatDetectionPolicyWithMinima [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfTheDatabaseSThreatDetectionPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertListByDatabase.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAListOfTheDatabaseSThreatDetectionPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyResource.cs index 63920a8de90d..a0e5286ac5fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSecurityAlertPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseSecurityAlertPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertGet.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMax.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateADatabaseSThreatDetectionPolicyWithAllParameters( [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseSecurityAlertCreateMin.json // this example is just showing the usage of "ManagedDatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelCollection.cs index 07f7cbfe13d3..10e79e265661 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseSensitivityLabelCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelResource.cs index 15d87c9ed764..65c2171e2f36 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseSensitivityLabelResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseSensitivityLabelResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSensitivityLabelOfAGivenColumnInAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseColumnSensitivityLabelGet.json // this example is just showing the usage of "ManagedDatabaseSensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableCollection.cs index 47701ce4353e..9c9708eeefa1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseTableCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseTableGet.json // this example is just showing the usage of "ManagedDatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedDatabaseTable() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedDatabaseTables() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseTableListBySchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseTableListBySchema.json // this example is just showing the usage of "ManagedDatabaseTables_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 @@ -93,7 +93,7 @@ public async Task GetAll_ListManagedDatabaseTables() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseTableGet.json // this example is just showing the usage of "ManagedDatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedDatabaseTable() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseTableGet.json // this example is just showing the usage of "ManagedDatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableResource.cs index 04c183b3b40c..4bfb846c2607 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseTableResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedDatabaseTableResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseTableGet.json // this example is just showing the usage of "ManagedDatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentCollection.cs index ad097e03090b..20997d5bc9dc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADatabaseSVulnerabilityAssessmentWithAllP [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithMini [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetADatabaseSVulnerabilityAssessmentsList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSVulnerabilityAssessmentsList() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentResource.cs index 1451cf722b67..6aec30e4ce57 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Delete_RemoveADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_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_RemoveADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabaseSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADatabaseSVulnerabilityAssessmentWithAllParameter [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabaseSVulnerabilityAssessmentWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs index 15beb2798edf..f066f26a699b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineCo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesADatabaseSVulnerabilityAssessme [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs index 91b73f1cfec9..17f46fed7a33 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentRuleBaselineRe [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 @@ -84,7 +84,7 @@ public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanCollection.cs index fb7f44d963a9..98e8623de923 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentScanCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanResource.cs index 33c09fdbf4de..ec5ec6de2dee 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedDatabaseVulnerabilityAssessmentScanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedDatabaseVulnerabilityAssessmentScanResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() [Ignore("Only validating compilation of examples")] public async Task Export_ExportADatabaseSVulnerabilityAssessmentScanResults() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Export_ExportADatabaseSVulnerabilityAssessmentScanResults() [Ignore("Only validating compilation of examples")] public async Task InitiateScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorCollection.cs index 4485fca8e490..9494aa5916c8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAdministratorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorCreate.json // this example is just showing the usage of "ManagedInstanceAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorUpdate.json // this example is just showing the usage of "ManagedInstanceAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Get_GetAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorGet.json // this example is just showing the usage of "ManagedInstanceAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAdministratorsOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorListByInstance.json // this example is just showing the usage of "ManagedInstanceAdministrators_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 @@ -174,7 +174,7 @@ public async Task GetAll_ListAdministratorsOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorGet.json // this example is just showing the usage of "ManagedInstanceAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorGet.json // this example is just showing the usage of "ManagedInstanceAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorResource.cs index 3589af0ae311..62084e34bf42 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdministratorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAdministratorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorGet.json // this example is just showing the usage of "ManagedInstanceAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorDelete.json // this example is just showing the usage of "ManagedInstanceAdministrators_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_DeleteAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorCreate.json // this example is just showing the usage of "ManagedInstanceAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAdministratorOfManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAdministratorOfManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdministratorUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdministratorUpdate.json // this example is just showing the usage of "ManagedInstanceAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionCollection.cs index 6a128cc57eff..8ba15d863294 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedInstanceSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedInstanceSAdvancedThreatProtection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedInstanceSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedInstanceSAdvancedThreatProtection [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedInstanceSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAManagedInstanceSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheManagedInstanceSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsListByInstance.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_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 @@ -168,7 +168,7 @@ public async Task GetAll_ListTheManagedInstanceSAdvancedThreatProtectionSettings [Ignore("Only validating compilation of examples")] public async Task Exists_GetAManagedInstanceSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +198,7 @@ public async Task Exists_GetAManagedInstanceSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAManagedInstanceSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionResource.cs index 58a3f3d986fb..8306fe050108 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedInstanceSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAManagedInstanceSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedInstanceSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_UpdateAManagedInstanceSAdvancedThreatProtectionSettings [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedInstanceSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ManagedInstanceAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationCollection.cs index 069c721de54c..7c2676367ddd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAzureADOnlyAuthenticationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthent [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthListByInstance.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_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 @@ -129,7 +129,7 @@ public async Task GetAll_GetsAListOfAzureActiveDirectoryOnlyAuthenticationObject [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationResource.cs index 4c68da82833a..65c4b91ce629 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceAzureADOnlyAuthenticationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceAzureADOnlyAuthenticationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthGet.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthDelete.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_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_DeletesAzureActiveDirectoryOnlyAuthenticationObject() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceAzureADOnlyAuthCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceAzureADOnlyAuthentications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs index 0fc69b4792c9..1ed6872ca26b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_ManagedInstanceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManagedInstanceWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceCreateMax.json // this example is just showing the usage of "ManagedInstances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateManagedInstanceWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManagedInstanceWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceCreateMin.json // this example is just showing the usage of "ManagedInstances_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateManagedInstanceWithMinimalProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWhileResourceIsUpdating() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWhileUpdating.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetManagedInstanceWhileResourceIsUpdating() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +242,7 @@ public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory( [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedInstancesByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceListByResourceGroup.json // this example is just showing the usage of "ManagedInstances_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 @@ -277,7 +277,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedInstancesByResourceGroupWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceListByResourceGroupWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_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 @@ -312,7 +312,7 @@ public async Task GetAll_ListManagedInstancesByResourceGroupWithExpandAdministra [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -341,7 +341,7 @@ public async Task Exists_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstanceWhileResourceIsUpdating() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWhileUpdating.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetManagedInstanceWhileResourceIsUpdating() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -399,7 +399,7 @@ public async Task Exists_GetManagedInstanceWithExpandAdministratorsActivedirecto [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -440,7 +440,7 @@ public async Task GetIfExists_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstanceWhileResourceIsUpdating() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWhileUpdating.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -481,7 +481,7 @@ public async Task GetIfExists_GetManagedInstanceWhileResourceIsUpdating() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcCollection.cs index 81862de3eead..ab4a3db38b0b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceDtcCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesManagedInstanceDTCSettingsByEnablingDTC() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcUpdateEnableDtc.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json // this example is just showing the usage of "ManagedInstanceDtcs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdatesManagedInstanceDTCSettingsByEnablingDTC( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesManagedInstanceDTCSettingsWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json // this example is just showing the usage of "ManagedInstanceDtcs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdatesManagedInstanceDTCSettingsWithAllOptiona [Ignore("Only validating compilation of examples")] public async Task Get_GetsManagedInstanceDTCSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcGet.json // this example is just showing the usage of "ManagedInstanceDtcs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceDTCSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfManagedInstanceDTCSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcList.json // this example is just showing the usage of "ManagedInstanceDtcs_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsAListOfManagedInstanceDTCSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsManagedInstanceDTCSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcGet.json // this example is just showing the usage of "ManagedInstanceDtcs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceDTCSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsManagedInstanceDTCSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcGet.json // this example is just showing the usage of "ManagedInstanceDtcs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcResource.cs index d8d4ada372fe..a1b6c56e6975 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceDtcResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceDtcResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsManagedInstanceDTCSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcGet.json // this example is just showing the usage of "ManagedInstanceDtcs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceDTCSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesManagedInstanceDTCSettingsByEnablingDTC() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcUpdateEnableDtc.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcUpdateEnableDtc.json // this example is just showing the usage of "ManagedInstanceDtcs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_UpdatesManagedInstanceDTCSettingsByEnablingDTC() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesManagedInstanceDTCSettingsWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDtcUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDtcUpdateMax.json // this example is just showing the usage of "ManagedInstanceDtcs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorCollection.cs index 11d8546f06db..13a7a5b15fdc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceEncryptionProtectorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheEncryptionProtectorToKeyVault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateTheEncryptionProtectorToKeyVault() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheEncryptionProtectorToServiceManaged() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateTheEncryptionProtectorToServiceManaged() [Ignore("Only validating compilation of examples")] public async Task Get_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListEncryptionProtectorsByManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorList.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_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 @@ -171,7 +171,7 @@ public async Task GetAll_ListEncryptionProtectorsByManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorResource.cs index 3cec4df4b84a..bbc6658727f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceEncryptionProtectorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceEncryptionProtectorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorGet.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheEncryptionProtector() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheEncryptionProtectorToKeyVault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateKeyVault.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateTheEncryptionProtectorToKeyVault() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheEncryptionProtectorToServiceManaged() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorCreateOrUpdateServiceManaged.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateTheEncryptionProtectorToServiceManaged() [Ignore("Only validating compilation of examples")] public async Task Revalidate_RevalidatesTheEncryptionProtector() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceEncryptionProtectorRevalidate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceEncryptionProtectorRevalidate.json // this example is just showing the usage of "ManagedInstanceEncryptionProtectors_Revalidate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyCollection.cs index 51a34ecd44ca..f79f0e2f58ca 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceKeyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceKeys_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesAManagedInstanceKey() [Ignore("Only validating compilation of examples")] public async Task Get_GetTheManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyGet.json // this example is just showing the usage of "ManagedInstanceKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheManagedInstanceKey() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheKeysForAManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyList.json // this example is just showing the usage of "ManagedInstanceKeys_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 @@ -130,7 +130,7 @@ public async Task GetAll_ListTheKeysForAManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyGet.json // this example is just showing the usage of "ManagedInstanceKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheManagedInstanceKey() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyGet.json // this example is just showing the usage of "ManagedInstanceKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyResource.cs index df4501ff73bc..c16914962b25 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceKeyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceKeyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyGet.json // this example is just showing the usage of "ManagedInstanceKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheManagedInstanceKey() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyDelete.json // this example is just showing the usage of "ManagedInstanceKeys_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_DeleteTheManagedInstanceKey() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAManagedInstanceKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceKeyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceKeyCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceKeys_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyCollection.cs index 7b3d88fa85c5..85f66997dec1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceLongTermRetentionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateTheLTRPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateTheLTRPolicyForTheManagedDatabase [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheLongTermRetentionPoliciesForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyListByDatabase.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPoliciesForTheManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyResource.cs index 81491e0a43cc..3bca12c0136f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceLongTermRetentionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceLongTermRetentionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyGet.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionPolicyForTheManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesTheLTRPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyDelete.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_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 @@ -85,7 +85,7 @@ public async Task Delete_DeletesTheLTRPolicyForTheManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateTheLTRPolicyForTheManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionPolicyCreateOrUpdate.json // this example is just showing the usage of "ManagedInstanceLongTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationCollection.cs index 4d07d6dc49af..3efd59a7e994 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstanceOperationCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheManagedInstanceManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedInstanceOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedInstanceOperation.json // this example is just showing the usage of "ManagedInstanceOperations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceManagementOperation() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheManagedInstanceManagementOperations() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListManagedInstanceOperations.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListManagedInstanceOperations.json // this example is just showing the usage of "ManagedInstanceOperations_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListTheManagedInstanceManagementOperations() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheManagedInstanceManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedInstanceOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedInstanceOperation.json // this example is just showing the usage of "ManagedInstanceOperations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceManagementOperation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheManagedInstanceManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedInstanceOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedInstanceOperation.json // this example is just showing the usage of "ManagedInstanceOperations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationResource.cs index 0b664f893318..4476e5afdb38 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceOperationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstanceOperationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheManagedInstanceManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedInstanceOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedInstanceOperation.json // this example is just showing the usage of "ManagedInstanceOperations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceManagementOperation() [Ignore("Only validating compilation of examples")] public async Task Cancel_CancelTheManagedInstanceManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CancelManagedInstanceOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CancelManagedInstanceOperation.json // this example is just showing the usage of "ManagedInstanceOperations_Cancel" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionCollection.cs index 43d3080feae0..95637cdcbd1c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstancePrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApproveOrRejectAPrivateEndpointConnectionWithAG [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionList.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsListOfPrivateEndpointConnectionsOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionResource.cs index a6be963db19d..9ea82f95ee35 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstancePrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionGet.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionDelete.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_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_DeletesAPrivateEndpointConnectionWithAGivenName() [Ignore("Only validating compilation of examples")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateEndpointConnectionUpdate.json // this example is just showing the usage of "ManagedInstancePrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkCollection.cs index 95526e97c59f..dafa946f9e8a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstancePrivateLinkCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json // this example is just showing the usage of "ManagedInstancePrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAPrivateLinkResourceForSQL() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsPrivateLinkResourcesForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateLinkResourcesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateLinkResourcesList.json // this example is just showing the usage of "ManagedInstancePrivateLinkResources_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateLinkResourcesForSQL() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json // this example is just showing the usage of "ManagedInstancePrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAPrivateLinkResourceForSQL() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json // this example is just showing the usage of "ManagedInstancePrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkResource.cs index d4c189007acd..b3ba9b2542e7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstancePrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstancePrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstancePrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstancePrivateLinkResourcesGet.json // this example is just showing the usage of "ManagedInstancePrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs index 301b70e1d430..27134fc93a4d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGet.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWhileResourceIsUpdating() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWhileUpdating.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWhileUpdating.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedInstanceWhileResourceIsUpdating() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedInstanceWithExpandAdministratorsActivedirectory( [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceDelete.json // this example is just showing the usage of "ManagedInstances_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_DeleteManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefaultMaintenancePolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceRemoveMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceRemoveMaintenanceConfiguration.json // this example is just showing the usage of "ManagedInstances_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 @@ -171,7 +171,7 @@ public async Task Update_RemoveMaintenancePolicyFromManagedInstanceSelectDefault [Ignore("Only validating compilation of examples")] public async Task Update_UpdateManagedInstanceWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceUpdateMax.json // this example is just showing the usage of "ManagedInstances_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 @@ -228,7 +228,7 @@ public async Task Update_UpdateManagedInstanceWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateManagedInstanceWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceUpdateMin.json // this example is just showing the usage of "ManagedInstances_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 @@ -266,7 +266,7 @@ public async Task Update_UpdateManagedInstanceWithMinimalProperties() [Ignore("Only validating compilation of examples")] public async Task GetInaccessibleManagedDatabases_ListInaccessibleManagedDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/InaccessibleManagedDatabaseListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/InaccessibleManagedDatabaseListByManagedInstance.json // this example is just showing the usage of "ManagedDatabases_ListInaccessibleByInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -299,7 +299,7 @@ public async Task GetInaccessibleManagedDatabases_ListInaccessibleManagedDatabas [Ignore("Only validating compilation of examples")] public async Task CreateManagedInstanceTdeCertificate_UploadATDECertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTdeCertificate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTdeCertificate.json // this example is just showing the usage of "ManagedInstanceTdeCertificates_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 @@ -329,7 +329,7 @@ public async Task CreateManagedInstanceTdeCertificate_UploadATDECertificate() [Ignore("Only validating compilation of examples")] public async Task Failover_FailoverAManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverManagedInstance.json // this example is just showing the usage of "ManagedInstances_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -356,7 +356,7 @@ public async Task Failover_FailoverAManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetOutboundNetworkDependencies_GetsTheCollectionOfOutboundNetworkDependenciesForTheGivenManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListOutboundNetworkDependenciesByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListOutboundNetworkDependenciesByManagedInstance.json // this example is just showing the usage of "ManagedInstances_ListOutboundNetworkDependenciesByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -385,7 +385,7 @@ public async Task GetOutboundNetworkDependencies_GetsTheCollectionOfOutboundNetw [Ignore("Only validating compilation of examples")] public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceRefreshExternalGovernanceStatus.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceRefreshExternalGovernanceStatus.json // this example is just showing the usage of "ManagedInstances_RefreshStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RefreshStatus_RefreshExternalGovernanceEnablementStatus() [Ignore("Only validating compilation of examples")] public async Task Start_StartsTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartManagedInstance.json // this example is just showing the usage of "ManagedInstances_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 @@ -443,7 +443,7 @@ public async Task Start_StartsTheManagedInstance() [Ignore("Only validating compilation of examples")] public async Task Stop_StopsTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StopManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StopManagedInstance.json // this example is just showing the usage of "ManagedInstances_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 @@ -474,7 +474,7 @@ public async Task Stop_StopsTheManagedInstance() [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTopQueriesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTopQueriesList.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -504,7 +504,7 @@ public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueriesFullBlownRequestAndResponse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTopQueriesListMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTopQueriesListMax.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -534,7 +534,7 @@ public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries [Ignore("Only validating compilation of examples")] public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueriesMinimalRequestAndResponse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTopQueriesListMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTopQueriesListMin.json // this example is just showing the usage of "ManagedInstances_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -564,7 +564,7 @@ public async Task GetTopQueries_ObtainListOfInstanceSTopResourceConsumingQueries [Ignore("Only validating compilation of examples")] public async Task GetSqlServerTrustGroups_ListServerTrustGroupsByManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupListByManagedInstance.json // this example is just showing the usage of "ServerTrustGroups_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 diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionCollection.cs index c46b74d82d82..c577a794fa80 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceServerConfigurationOptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionUpdate.json // this example is just showing the usage of "ServerConfigurationOptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdatesManagedInstanceServerConfigurationOption [Ignore("Only validating compilation of examples")] public async Task Get_GetsManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionGet.json // this example is just showing the usage of "ServerConfigurationOptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceServerConfigurationOption() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfManagedInstanceServerConfigurationOptions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionList.json // this example is just showing the usage of "ServerConfigurationOptions_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAListOfManagedInstanceServerConfigurationOptions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionGet.json // this example is just showing the usage of "ServerConfigurationOptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceServerConfigurationOption() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionGet.json // this example is just showing the usage of "ServerConfigurationOptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionResource.cs index 94dcbba31bcf..c4913acbe62e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerConfigurationOptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceServerConfigurationOptionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionGet.json // this example is just showing the usage of "ServerConfigurationOptions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsManagedInstanceServerConfigurationOption() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesManagedInstanceServerConfigurationOption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConfigurationOptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConfigurationOptionUpdate.json // this example is just showing the usage of "ServerConfigurationOptions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateCollection.cs index a224b0392479..6413e18a1bd1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstanceServerTrustCertificateCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesCreate.json // this example is just showing the usage of "ServerTrustCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateServerTrustCertificate() [Ignore("Only validating compilation of examples")] public async Task Get_GetsServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesGet.json // this example is just showing the usage of "ServerTrustCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsServerTrustCertificate() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfServerTrustCertificatesOnAGivenServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesListByInstance.json // this example is just showing the usage of "ServerTrustCertificates_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 @@ -128,7 +128,7 @@ public async Task GetAll_GetsAListOfServerTrustCertificatesOnAGivenServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesGet.json // this example is just showing the usage of "ServerTrustCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsServerTrustCertificate() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesGet.json // this example is just showing the usage of "ServerTrustCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateResource.cs index 2ba19ec6c578..c892d147db6a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceServerTrustCertificateResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ManagedInstanceServerTrustCertificateResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesGet.json // this example is just showing the usage of "ServerTrustCertificates_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsServerTrustCertificate() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesDelete.json // this example is just showing the usage of "ServerTrustCertificates_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_DeleteServerTrustCertificate() [Ignore("Only validating compilation of examples")] public async Task Update_CreateServerTrustCertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustCertificatesCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustCertificatesCreate.json // this example is just showing the usage of "ServerTrustCertificates_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleCollection.cs index 40670aeac13f..225ef788d906 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceStartStopScheduleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesTheManagedInstanceSStartStopScheduleWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesTheManagedInstanceSStartStopSch [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesTheManagedInstanceSStartStopScheduleWithNoOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesTheManagedInstanceSStartStopSch [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheManagedInstanceSStartStopSchedule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceSStartStopSchedule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsTheManagedInstanceSStartStopSchedules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleList.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_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 @@ -170,7 +170,7 @@ public async Task GetAll_ListsTheManagedInstanceSStartStopSchedules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheManagedInstanceSStartStopSchedule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceSStartStopSchedule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheManagedInstanceSStartStopSchedule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleResource.cs index 846652366bd3..52da26595219 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceStartStopScheduleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceStartStopScheduleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheManagedInstanceSStartStopSchedule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleGet.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheManagedInstanceSStartStopSchedule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesTheManagedInstanceSStartStopSchedule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleDelete.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_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_DeletesTheManagedInstanceSStartStopSchedule() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesTheManagedInstanceSStartStopScheduleWithAllOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMax.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesTheManagedInstanceSStartStopScheduleWit [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesTheManagedInstanceSStartStopScheduleWithNoOptionalParametersSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/StartStopManagedInstanceScheduleCreateOrUpdateMin.json // this example is just showing the usage of "StartStopManagedInstanceSchedules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentCollection.cs index 1ec1e339452b..a916b84fa47e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAManagedInstanceSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAManagedInstanceSVulnerabilityAssessmentW [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAManagedInstanceSVulnerabilityAssessmentW [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAManagedInstanceSVulnerabilityAssessmentW [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedInstanceSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAManagedInstanceSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAManagedInstanceSVulnerabilityAssessmentPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_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 @@ -217,7 +217,7 @@ public async Task GetAll_GetAManagedInstanceSVulnerabilityAssessmentPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAManagedInstanceSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task Exists_GetAManagedInstanceSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAManagedInstanceSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentResource.cs index 4ea02d8dcd23..139a1b338ece 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedInstanceVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedInstanceVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedInstanceSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentGet.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAManagedInstanceSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Delete_RemoveAManagedInstanceSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentDelete.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_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_RemoveAManagedInstanceSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAManagedInstanceSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAManagedInstanceSVulnerabilityAssessmentWithAllPa [Ignore("Only validating compilation of examples")] public async Task Update_CreateAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateAManagedInstanceSVulnerabilityAssessmentWithMinim [Ignore("Only validating compilation of examples")] public async Task Update_CreateAManagedInstanceSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadCollection.cs index 6cf8c093a2ad..5c2eff8470fd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedLedgerDigestUploadCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_EnablesManagedLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsEnable.json // this example is just showing the usage of "ManagedLedgerDigestUploads_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_EnablesManagedLedgerDigestUploadConfigurationFo [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json // this example is just showing the usage of "ManagedLedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase( [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfLedgerDigestUploadSettingsOnADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsList.json // this example is just showing the usage of "ManagedLedgerDigestUploads_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsListOfLedgerDigestUploadSettingsOnADatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json // this example is just showing the usage of "ManagedLedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADataba [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json // this example is just showing the usage of "ManagedLedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadResource.cs index a4d6747882bb..03497dbd1799 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedLedgerDigestUploadResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedLedgerDigestUploadResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsGet.json // this example is just showing the usage of "ManagedLedgerDigestUploads_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheCurrentLedgerDigestUploadConfigurationForADatabase( [Ignore("Only validating compilation of examples")] public async Task Update_EnablesManagedLedgerDigestUploadConfigurationForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsEnable.json // this example is just showing the usage of "ManagedLedgerDigestUploads_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_EnablesManagedLedgerDigestUploadConfigurationForADataba [Ignore("Only validating compilation of examples")] public async Task Disable_DisablesUploadingLedgerDigestsForADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedLedgerDigestUploadsDisable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedLedgerDigestUploadsDisable.json // this example is just showing the usage of "ManagedLedgerDigestUploads_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 diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs index 0e887f8c01cf..825d856af80a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPo [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateTheShortTermRetentionPolicyForTheRestorab [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheShortTermRetentionPolicyListForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetListManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_ListByRestorableDroppedDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyListForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs index 490f8affdbde..96edfcedda78 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedRestorableDroppedDbBackupShortTermRetentionPo [Ignore("Only validating compilation of examples")] public async Task Get_GetTheShortTermRetentionPolicyForTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheShortTermRetentionPolicyForTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheShortTermRetentionPolicyForTheRestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateManagedShortTermRetentionPolicyRestorableDropped.json // this example is just showing the usage of "ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasCollection.cs index 10ecca8bb100..b95dd1d7478e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedServerDnsAliasCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json // this example is just showing the usage of "ManagedServerDnsAliases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasGet.json // this example is just showing the usage of "ManagedServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedServerDNSAliases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasList.json // this example is just showing the usage of "ManagedServerDnsAliases_ListByManagedInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListManagedServerDNSAliases() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasGet.json // this example is just showing the usage of "ManagedServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasGet.json // this example is just showing the usage of "ManagedServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasResource.cs index 8d83ec24a7a2..fea4ee7b4148 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerDnsAliasResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedServerDnsAliasResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasGet.json // this example is just showing the usage of "ManagedServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasDelete.json // this example is just showing the usage of "ManagedServerDnsAliases_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_DeleteManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Update_CreateManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasCreateOrUpdate.json // this example is just showing the usage of "ManagedServerDnsAliases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateManagedServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Acquire_AcquireManagedServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerDnsAliasAcquire.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerDnsAliasAcquire.json // this example is just showing the usage of "ManagedServerDnsAliases_Acquire" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyCollection.cs index 4bd590018364..321cb6184d8a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedServerSecurityAlertPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedServerSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertCreateMax.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedServerSThreatDetectionPolicyWithA [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAManagedServerSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertCreateMin.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAManagedServerSThreatDetectionPolicyWithM [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertGet.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAManagedServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheManagedServerSThreatDetectionPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertListByInstance.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_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 @@ -174,7 +174,7 @@ public async Task GetAll_GetTheManagedServerSThreatDetectionPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAManagedServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertGet.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAManagedServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAManagedServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertGet.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyResource.cs index 138d939965f2..d26d5ec98033 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedServerSecurityAlertPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedServerSecurityAlertPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAManagedServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertGet.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAManagedServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedServerSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertCreateMax.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAManagedServerSThreatDetectionPolicyWithAllParame [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAManagedServerSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedServerSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedServerSecurityAlertCreateMin.json // this example is just showing the usage of "ManagedServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionCollection.cs index d52877f6419d..04ee7d807307 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedTransparentDataEncryptionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSTransparentDataEncryptionStateWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSTransparentDataEncryptionStateW [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfTheDatabaseSTransparentDataEncryptions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionList.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAListOfTheDatabaseSTransparentDataEncryptions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionResource.cs index 96d04ebfd109..c273c44b29b6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ManagedTransparentDataEncryptionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ManagedTransparentDataEncryptionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSTransparentDataEncryption() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionGet.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSTransparentDataEncryption() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSTransparentDataEncryptionStateWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedTransparentDataEncryptionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedTransparentDataEncryptionUpdate.json // this example is just showing the usage of "ManagedDatabaseTransparentDataEncryption_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleCollection.cs index 155536f59f1f..b1801eff57f9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsOutboundFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleGet.json // this example is just showing the usage of "OutboundFirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsOutboundFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfOutboundFirewallRulesOnAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleList.json // this example is just showing the usage of "OutboundFirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_GetsListOfOutboundFirewallRulesOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsOutboundFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleGet.json // this example is just showing the usage of "OutboundFirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsOutboundFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsOutboundFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleGet.json // this example is just showing the usage of "OutboundFirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleResource.cs index fbe29f88bf18..61159800aed7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_OutboundFirewallRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OutboundFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsOutboundFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleGet.json // this example is just showing the usage of "OutboundFirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsOutboundFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAOutboundFirewallRuleWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/OutboundFirewallRuleDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/OutboundFirewallRuleDelete.json // this example is just showing the usage of "OutboundFirewallRules_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionCollection.cs index 8be5f3626774..b9daa7b1a6f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RecommendedActionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseRecommendedAction() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionGet.json // this example is just showing the usage of "DatabaseRecommendedActions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseRecommendedAction() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfDatabaseRecommendedActions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionList.json // this example is just showing the usage of "DatabaseRecommendedActions_ListByDatabaseAdvisor" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListOfDatabaseRecommendedActions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDatabaseRecommendedAction() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionGet.json // this example is just showing the usage of "DatabaseRecommendedActions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseRecommendedAction() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDatabaseRecommendedAction() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionGet.json // this example is just showing the usage of "DatabaseRecommendedActions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionResource.cs index 266b8c38923e..ce0b01716dc3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecommendedActionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_RecommendedActionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseRecommendedAction() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionGet.json // this example is just showing the usage of "DatabaseRecommendedActions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseRecommendedAction() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateDatabaseRecommendedAction() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionUpdate.json // this example is just showing the usage of "DatabaseRecommendedActions_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs index d123119e392c..3e04fa6d57fa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RecoverableDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetARecoverableDatabase() [Ignore("Only validating compilation of examples")] public async Task Get_GetsARecoverableDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARecoverableDatabaseWithExpandEqualsKeys() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetListOfRecoverableDatabases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseList.json // this example is just showing the usage of "RecoverableDatabases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task GetAll_GetListOfRecoverableDatabases() [Ignore("Only validating compilation of examples")] public async Task Exists_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetARecoverableDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsARecoverableDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsARecoverableDatabaseWithExpandEqualsKeys() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task GetIfExists_GetARecoverableDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsARecoverableDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs index f7d20e6250c0..2098498b5307 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RecoverableDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetARecoverableDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGet.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetARecoverableDatabase() [Ignore("Only validating compilation of examples")] public async Task Get_GetsARecoverableDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecoverableDatabaseGetWithExpandEqualsKeys.json // this example is just showing the usage of "RecoverableDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseCollection.cs index fd443c375397..9e37818ace1d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RecoverableManagedDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsARecoverableDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRecoverableManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRecoverableManagedDatabase.json // this example is just showing the usage of "RecoverableManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARecoverableDatabasesByManagedInstances() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRecoverableDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListRecoverableManagedDatabasesByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListRecoverableManagedDatabasesByServer.json // this example is just showing the usage of "RecoverableManagedDatabases_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 @@ -89,7 +89,7 @@ public async Task GetAll_ListRecoverableDatabasesByManagedInstances() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsARecoverableDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRecoverableManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRecoverableManagedDatabase.json // this example is just showing the usage of "RecoverableManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARecoverableDatabasesByManagedInstances() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsARecoverableDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRecoverableManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRecoverableManagedDatabase.json // this example is just showing the usage of "RecoverableManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseResource.cs index 9eaa1ce7c44a..947f6aa073b1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RecoverableManagedDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RecoverableManagedDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsARecoverableDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRecoverableManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRecoverableManagedDatabase.json // this example is just showing the usage of "RecoverableManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupCollection.cs index 103b8e6d90b8..915ea99cf8fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupLongTermRetentionBackupCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByDatabase.json // this example is just showing the usage of "LongTermRetentionBackups_ListByResourceGroupDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupResource.cs index 2f654edc54a5..96de08d8ccf1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupLongTermRetentionBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupDelete.json // this example is just showing the usage of "LongTermRetentionBackups_DeleteByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Delete_DeleteTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task ChangeAccessTierByResourceGroup_ChangeTheLongTermRetentionBackupStorageAccessTierForAResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedChangeLongTermRetentionBackupAccessTier.json // this example is just showing the usage of "LongTermRetentionBackups_ChangeAccessTierByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ChangeAccessTierByResourceGroup_ChangeTheLongTermRetentionBack [Ignore("Only validating compilation of examples")] public async Task CopyByResourceGroup_CopyTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupCopy.json // this example is just showing the usage of "LongTermRetentionBackups_CopyByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CopyByResourceGroup_CopyTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task UpdateByResourceGroup_UpdateTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupUpdate.json // this example is just showing the usage of "LongTermRetentionBackups_UpdateByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs index 69d1f136458f..ea92d7fee8da 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ResourceGroupLongTermRetentionManagedInstanceBackupC [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByDatabase.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByResourceGroupDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs index 031c1c2a71af..2e1ef61e8b27 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_ResourceGroupLongTermRetentionManagedInstanceBackupR [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_GetByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupDelete.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_DeleteByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs index 2f1cb041e267..3993bd0c3216 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ResourceGroupResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_ResourceGroupResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocationBasedOnResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByLocation.json // this example is just showing the usage of "LongTermRetentionBackups_ListByResourceGroupLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentio [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionBackupsUnderTheServerBasedOnResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedLongTermRetentionBackupListByServer.json // this example is just showing the usage of "LongTermRetentionBackups_ListByResourceGroupServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionB [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocationWithMaximalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocationMax.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByResourceGroupLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllL [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByLocation.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByResourceGroupLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllL [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithInstance_GetAllLongTermRetentionBackupsUnderTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResourceGroupBasedManagedInstanceLongTermRetentionBackupListByInstance.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByResourceGroupInstance" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseCollection.cs index cee519e8ad3f..c5e26c53fb28 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RestorableDroppedDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabase.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfRestorableDroppedDatabases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListRestorableDroppedDatabasesByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListRestorableDroppedDatabasesByServer.json // this example is just showing the usage of "RestorableDroppedDatabases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task GetAll_GetsAListOfRestorableDroppedDatabases() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsARestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabase.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsARestorableDroppedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetIfExists_GetsARestorableDroppedDatabaseWithExpandEqualsKeys [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsARestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabase.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseResource.cs index 6892a7c4ecc5..af466d44f64f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RestorableDroppedDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedDatabaseWithExpandEqualsKeys() [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedDatabase.json // this example is just showing the usage of "RestorableDroppedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseCollection.cs index 31c830b05303..31a68b41b758 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_RestorableDroppedManagedDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json // this example is just showing the usage of "RestorableDroppedManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListRestorableDroppedDatabasesByManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RestorableDroppedManagedDatabaseListByManagedInstance.json // this example is just showing the usage of "RestorableDroppedManagedDatabases_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 @@ -89,7 +89,7 @@ public async Task GetAll_ListRestorableDroppedDatabasesByManagedInstances() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsARestorableDroppedManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json // this example is just showing the usage of "RestorableDroppedManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsARestorableDroppedManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsARestorableDroppedManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json // this example is just showing the usage of "RestorableDroppedManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseResource.cs index b5c9cf29b3fb..193322394388 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_RestorableDroppedManagedDatabaseResource.cs @@ -19,7 +19,7 @@ public partial class Sample_RestorableDroppedManagedDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsARestorableDroppedManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetRestorableDroppedManagedDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetRestorableDroppedManagedDatabase.json // this example is just showing the usage of "RestorableDroppedManagedDatabases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionCollection.cs index f23f4dbba4d2..b1ea2335ff94 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_ServerAdvancedThreatProtectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSAdvancedThreatProtectionSettingsW [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSAdvancedThreatProtectionSettingsW [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsListByServer.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task GetAll_ListTheServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +198,7 @@ public async Task Exists_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionResource.cs index 3278b9d2bef2..30b82d849a66 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_ServerAdvancedThreatProtectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_ServerAdvancedThreatProtectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAdvancedThreatProtectionSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsGet.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSAdvancedThreatProtectionSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSAdvancedThreatProtectionSettingsWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMax.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_UpdateAServerSAdvancedThreatProtectionSettingsWithAllPa [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSAdvancedThreatProtectionSettingsWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvancedThreatProtectionSettingsCreateMin.json // this example is just showing the usage of "ServerAdvancedThreatProtectionSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlAgentConfigurationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlAgentConfigurationResource.cs index cf4169e3a220..94874445721a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlAgentConfigurationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlAgentConfigurationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlAgentConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsCurrentInstanceSqlAgentConfiguration() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlAgentConfigurationGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlAgentConfigurationGet.json // this example is just showing the usage of "SqlAgent_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsCurrentInstanceSqlAgentConfiguration() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutsNewSqlAgentConfigurationToInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlAgentConfigurationPut.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlAgentConfigurationPut.json // this example is just showing the usage of "SqlAgent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorCollection.cs index 11435e4e2375..1bd90f49540f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseAdvisorCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorGet.json // this example is just showing the usage of "DatabaseAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseAdvisor() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfDatabaseAdvisors() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorList.json // this example is just showing the usage of "DatabaseAdvisors_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListOfDatabaseAdvisors() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfDatabaseRecommendedActionsForAllAdvisors() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRecommendedActionListExpand.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRecommendedActionListExpand.json // this example is just showing the usage of "DatabaseAdvisors_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListOfDatabaseRecommendedActionsForAllAdvisors() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDatabaseAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorGet.json // this example is just showing the usage of "DatabaseAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseAdvisor() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDatabaseAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorGet.json // this example is just showing the usage of "DatabaseAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorResource.cs index 38cbcc4c817b..8c831116ca3d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAdvisorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseAdvisorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorGet.json // this example is just showing the usage of "DatabaseAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseAdvisor() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateDatabaseAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAdvisorUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAdvisorUpdate.json // this example is just showing the usage of "DatabaseAdvisors_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAutomaticTuningResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAutomaticTuningResource.cs index 1b7b7eb0e740..8a21e77e7552 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAutomaticTuningResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseAutomaticTuningResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseAutomaticTuningResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSAutomaticTuningSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAutomaticTuningGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAutomaticTuningGet.json // this example is just showing the usage of "DatabaseAutomaticTuning_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSAutomaticTuningSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesDatabaseAutomaticTuningSettingsWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAutomaticTuningUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAutomaticTuningUpdateMax.json // this example is just showing the usage of "DatabaseAutomaticTuning_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Update_UpdatesDatabaseAutomaticTuningSettingsWithAllProperties [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesDatabaseAutomaticTuningSettingsWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAutomaticTuningUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAutomaticTuningUpdateMin.json // this example is just showing the usage of "DatabaseAutomaticTuning_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyCollection.cs index 2107cd15665b..e7e0ade0f3e7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseBlobAuditingPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateADatabaseSAzureMonitorAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAzureMonitorAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateADatabaseSAzureMonitorAuditingPol [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateADatabaseSBlobAuditingPolicyWithA [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreateOrUpdateADatabaseSBlobAuditingPolicyWithM [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingGet.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAuditSettingsOfADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAuditingSettingsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAuditingSettingsList.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListAuditSettingsOfADatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingGet.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +254,7 @@ public async Task Exists_GetADatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingGet.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyResource.cs index a1daa6e46d34..0fb46ae81d7e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseBlobAuditingPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseBlobAuditingPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingGet.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateADatabaseSAzureMonitorAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseAzureMonitorAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseAzureMonitorAuditingCreateMin.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateADatabaseSAzureMonitorAuditingPolicyWithM [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingCreateMax.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateOrUpdateADatabaseSBlobAuditingPolicyWithAllParame [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseBlobAuditingCreateMin.json // this example is just showing the usage of "DatabaseBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseCollection.cs index 38b519b223e1..ebbcda7886aa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAVCoreDatabaseBySpecifyingServiceObjectiveName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateVCoreDatabaseByServiceObjective.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateVCoreDatabaseByServiceObjective.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesAVCoreDatabaseBySpecifyingServiceObjecti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesAVCoreDatabaseBySpecifyingSkuNameAndCapacity() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateVCoreDatabaseBySkuNameCapacity.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateVCoreDatabaseBySkuNameCapacity.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesAVCoreDatabaseBySpecifyingSkuNameAndCapa [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromABackupOfADroppedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDwDatabaseCrossSubscriptionRestore.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRestore.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task CreateOrUpdate_CreatesADataWarehouseDatabaseAsACrossSubscripti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromAGeoBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDwDatabaseCrossSubscriptionRecovery.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionRecovery.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesADataWarehouseDatabaseAsACrossSubscripti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADataWarehouseDatabaseAsACrossSubscriptionRestoreFromARestorePointOfAnExistingDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDwDatabaseCrossSubscriptionPITR.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDwDatabaseCrossSubscriptionPITR.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -227,7 +227,7 @@ public async Task CreateOrUpdate_CreatesADataWarehouseDatabaseAsACrossSubscripti [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseAsACopy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseCopyMode.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseCopyMode.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseAsACopy() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseAsAStandbySecondary() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseStandbyMode.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseStandbyMode.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseAsAStandbySecondary() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseAsAnOnLineSecondary() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseSecondaryMode.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseSecondaryMode.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -361,7 +361,7 @@ public async Task CreateOrUpdate_CreatesADatabaseAsAnOnLineSecondary() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseAsNamedReplicaSecondary() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseNamedReplica.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseNamedReplica.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseAsNamedReplicaSecondary() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseFromPointInTimeRestore() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabasePITRMode.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabasePITRMode.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseFromPointInTimeRestore() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -487,7 +487,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -526,7 +526,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithAvailabilityZoneSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseWithAvailabilityZone.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseWithAvailabilityZoneSpecified() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithDatabaseLevelCustomerManagedKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseDefaultModeWithKeysAndEncryptionProtector.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_CreatesADatabaseWithDatabaseLevelCustomerManage [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithDefaultMode() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseDefaultMode.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseDefaultMode.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -676,7 +676,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithDefaultMode() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithEncryptionProtectorAutoRotation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseWithEncryptionProtectorAutoRotation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseWithEncryptionProtectorAutoRotation.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -731,7 +731,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithEncryptionProtectorAutoRota [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithLedgerOn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseLedger.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseLedger.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -770,7 +770,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithLedgerOn() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithMinimumNumberOfParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseMin.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -806,7 +806,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithMinimumNumberOfParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithPreferredMaintenanceWindow() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseMaintenanceConfiguration.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -852,7 +852,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithPreferredMaintenanceWindow( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesADatabaseWithSpecifiedBackupStorageRedundancy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateDatabaseConfiguredBackupStorageRedundancy.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -891,7 +891,7 @@ public async Task CreateOrUpdate_CreatesADatabaseWithSpecifiedBackupStorageRedun [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesADatabaseToHyperscaleSLOWithManualCutover() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationWithManualCutover.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -943,7 +943,7 @@ public async Task CreateOrUpdate_UpdatesADatabaseToHyperscaleSLOWithManualCutove [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesADatabaseToHyperscaleTierByTriggeringManualCutoverDuringMigrationWorkflow() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateDatabaseHyperscaleMigrationPerformCutover.json // this example is just showing the usage of "Databases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -991,7 +991,7 @@ public async Task CreateOrUpdate_UpdatesADatabaseToHyperscaleTierByTriggeringMan [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseConfiguredWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1025,7 +1025,7 @@ public async Task Get_GetsADatabaseConfiguredWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseConfiguredWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1059,7 +1059,7 @@ public async Task Get_GetsADatabaseConfiguredWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseWithAvailabilityZoneSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDatabaseWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1093,7 +1093,7 @@ public async Task Get_GetsADatabaseWithAvailabilityZoneSpecified() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseWithDatabaseLevelKeysExpanded() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1128,7 +1128,7 @@ public async Task Get_GetsADatabaseWithDatabaseLevelKeysExpanded() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabase.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1162,7 +1162,7 @@ public async Task Get_GetsADatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfDatabasesConfiguredWithEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListVCoreDatabasesEnclaveTypeByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListVCoreDatabasesEnclaveTypeByServer.json // this example is just showing the usage of "Databases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1198,7 +1198,7 @@ public async Task GetAll_GetsAListOfDatabasesConfiguredWithEnclaveType() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfDatabases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListVCoreDatabasesByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListVCoreDatabasesByServer.json // this example is just showing the usage of "Databases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1234,7 +1234,7 @@ public async Task GetAll_GetsAListOfDatabases() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseConfiguredWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1264,7 +1264,7 @@ public async Task Exists_GetsADatabaseConfiguredWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseConfiguredWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1294,7 +1294,7 @@ public async Task Exists_GetsADatabaseConfiguredWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseWithAvailabilityZoneSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDatabaseWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1324,7 +1324,7 @@ public async Task Exists_GetsADatabaseWithAvailabilityZoneSpecified() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseWithDatabaseLevelKeysExpanded() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1355,7 +1355,7 @@ public async Task Exists_GetsADatabaseWithDatabaseLevelKeysExpanded() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabase.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1385,7 +1385,7 @@ public async Task Exists_GetsADatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseConfiguredWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1427,7 +1427,7 @@ public async Task GetIfExists_GetsADatabaseConfiguredWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseConfiguredWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1469,7 +1469,7 @@ public async Task GetIfExists_GetsADatabaseConfiguredWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseWithAvailabilityZoneSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDatabaseWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1511,7 +1511,7 @@ public async Task GetIfExists_GetsADatabaseWithAvailabilityZoneSpecified() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseWithDatabaseLevelKeysExpanded() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1554,7 +1554,7 @@ public async Task GetIfExists_GetsADatabaseWithDatabaseLevelKeysExpanded() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabase.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnCollection.cs index a46aceeda334..370db21cbde9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseColumnCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseColumnGet.json // this example is just showing the usage of "DatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseColumnListByTable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseColumnListByTable.json // this example is just showing the usage of "DatabaseColumns_ListByTable" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListDatabaseColumns() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseColumnGet.json // this example is just showing the usage of "DatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseColumnGet.json // this example is just showing the usage of "DatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnResource.cs index 0d2fd115dabd..5f2f9586f408 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseColumnResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseColumnResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseColumnGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseColumnGet.json // this example is just showing the usage of "DatabaseColumns_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseColumn() [Ignore("Only validating compilation of examples")] public async Task DisableRecommendationSensitivityLabel_DisablesSensitivityRecommendationsOnAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecommendedColumnSensitivityLabelDisable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecommendedColumnSensitivityLabelDisable.json // this example is just showing the usage of "SensitivityLabels_DisableRecommendation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 DisableRecommendationSensitivityLabel_DisablesSensitivityRecom [Ignore("Only validating compilation of examples")] public async Task EnableRecommendationSensitivityLabel_EnablesSensitivityRecommendationsOnAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RecommendedColumnSensitivityLabelEnable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RecommendedColumnSensitivityLabelEnable.json // this example is just showing the usage of "SensitivityLabels_EnableRecommendation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs index 6ca67e8f48f3..e8b21f5682b6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseResource.cs @@ -22,7 +22,7 @@ public partial class Sample_SqlDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseConfiguredWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetsADatabaseConfiguredWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseConfiguredWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Get_GetsADatabaseConfiguredWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseWithAvailabilityZoneSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDatabaseWithAvailabilityZone.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDatabaseWithAvailabilityZone.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -115,7 +115,7 @@ public async Task Get_GetsADatabaseWithAvailabilityZoneSpecified() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseWithDatabaseLevelKeysExpanded() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabaseWithExpandEqualsKeys.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabaseWithExpandEqualsKeys.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Get_GetsADatabaseWithDatabaseLevelKeysExpanded() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetVCoreDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetVCoreDatabase.json // this example is just showing the usage of "Databases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task Get_GetsADatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteDatabase.json // this example is just showing the usage of "Databases_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -205,7 +205,7 @@ public async Task Delete_DeletesADatabase() [Ignore("Only validating compilation of examples")] public async Task Update_AssignsMaintenanceWindowToADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchVCoreDatabaseAssignMaintenanceConfiguration.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -242,7 +242,7 @@ public async Task Update_AssignsMaintenanceWindowToADatabase() [Ignore("Only validating compilation of examples")] public async Task Update_PatchADatabaseWithDatabaseLevelCustomerManagedKeys() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchVCoreDatabaseWithKeysAndEncryptionProtector.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -296,7 +296,7 @@ public async Task Update_PatchADatabaseWithDatabaseLevelCustomerManagedKeys() [Ignore("Only validating compilation of examples")] public async Task Update_ResetsMaintenanceWindowOfADatabaseToDefault() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchVCoreDatabaseResetMaintenanceConfiguration.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -333,7 +333,7 @@ public async Task Update_ResetsMaintenanceWindowOfADatabaseToDefault() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesADatabaseWithDefaultEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchDatabaseDefaultEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchDatabaseDefaultEnclave.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -369,7 +369,7 @@ public async Task Update_UpdatesADatabaseWithDefaultEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesADatabaseWithVBSEnclaveType() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchDatabaseVBSEnclave.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchDatabaseVBSEnclave.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -405,7 +405,7 @@ public async Task Update_UpdatesADatabaseWithVBSEnclaveType() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PatchVCoreDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PatchVCoreDatabase.json // this example is just showing the usage of "Databases_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -443,7 +443,7 @@ public async Task Update_UpdatesADatabase() [Ignore("Only validating compilation of examples")] public async Task GetDatabaseColumns_FilterDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnsListByDatabaseMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnsListByDatabaseMax.json // this example is just showing the usage of "DatabaseColumns_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -481,7 +481,7 @@ public async Task GetDatabaseColumns_FilterDatabaseColumns() [Ignore("Only validating compilation of examples")] public async Task GetDatabaseColumns_ListDatabaseColumns() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnsListByDatabaseMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnsListByDatabaseMin.json // this example is just showing the usage of "DatabaseColumns_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetDatabaseColumns_ListDatabaseColumns() [Ignore("Only validating compilation of examples")] public async Task RevalidateDatabaseEncryptionProtector_RevalidatesTheEncryptionProtectorForAParticularDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseEncryptionProtectorRevalidate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseEncryptionProtectorRevalidate.json // this example is just showing the usage of "DatabaseEncryptionProtectors_Revalidate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -543,7 +543,7 @@ public async Task RevalidateDatabaseEncryptionProtector_RevalidatesTheEncryption [Ignore("Only validating compilation of examples")] public async Task RevertDatabaseEncryptionProtector_RevertsTheEncryptionProtectorForAParticularDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseEncryptionProtectorRevert.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseEncryptionProtectorRevert.json // this example is just showing the usage of "DatabaseEncryptionProtectors_Revert" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -571,7 +571,7 @@ public async Task RevertDatabaseEncryptionProtector_RevertsTheEncryptionProtecto [Ignore("Only validating compilation of examples")] public async Task GetDatabaseExtensions_ListDatabaseExtensions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListDatabaseExtensions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListDatabaseExtensions.json // this example is just showing the usage of "DatabaseExtensions_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -601,7 +601,7 @@ public async Task GetDatabaseExtensions_ListDatabaseExtensions() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDatabaseExtension_CreateOrUpdateDatabaseExtensions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateDatabaseExtensions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateDatabaseExtensions.json // this example is just showing the usage of "DatabaseExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,11 +633,49 @@ public async Task CreateOrUpdateDatabaseExtension_CreateOrUpdateDatabaseExtensio Console.WriteLine($"Succeeded: {result}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdateDatabaseExtension_ExportDatabaseUsingDatabaseExtensionWithManagedIdentity() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExportDatabaseUsingDatabaseExtensionsWithManagedIdentity.json + // this example is just showing the usage of "DatabaseExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "0ca8cd24-0b47-4ad5-bc7e-d70e35c44adf"; + string resourceGroupName = "rg_d1ef9eae-044d-4710-ba59-b82e84ad3157"; + string serverName = "srv_9243d320-ac4e-4f97-8e06-b1167dae5f4c"; + string databaseName = "db_7fe424c8-23cf-4ac3-bdc3-e21f424bdb68"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // invoke the operation + string extensionName = "Export"; + SqlDatabaseExtension sqlDatabaseExtension = new SqlDatabaseExtension + { + OperationMode = DatabaseExtensionOperationMode.Export, + StorageKeyType = StorageKeyType.ManagedIdentity, + StorageKey = "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + StorageUri = new Uri("https://teststorage.blob.core.windows.net/testcontainer/Manifest.xml"), + AdministratorLogin = "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", + AuthenticationType = "ManagedIdentity", + }; + ArmOperation lro = await sqlDatabase.CreateOrUpdateDatabaseExtensionAsync(WaitUntil.Completed, extensionName, sqlDatabaseExtension); + ImportExportExtensionsOperationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDatabaseExtension_ExportDatabaseUsingDatabaseExtension() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExportDatabaseUsingDatabaseExtensions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExportDatabaseUsingDatabaseExtensions.json // this example is just showing the usage of "DatabaseExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -676,7 +714,7 @@ public async Task CreateOrUpdateDatabaseExtension_ExportDatabaseUsingDatabaseExt [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdateDatabaseExtension_ImportDatabaseUsingDatabaseExtension() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ImportDatabaseUsingDatabaseExtensions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportDatabaseUsingDatabaseExtensions.json // this example is just showing the usage of "DatabaseExtensions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -715,7 +753,7 @@ public async Task CreateOrUpdateDatabaseExtension_ImportDatabaseUsingDatabaseExt [Ignore("Only validating compilation of examples")] public async Task GetDatabaseOperations_ListTheDatabaseManagementOperations() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListDatabaseOperations.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListDatabaseOperations.json // this example is just showing the usage of "DatabaseOperations_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -745,7 +783,7 @@ public async Task GetDatabaseOperations_ListTheDatabaseManagementOperations() [Ignore("Only validating compilation of examples")] public async Task CancelDatabaseOperation_CancelTheDatabaseManagementOperation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CancelDatabaseOperation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CancelDatabaseOperation.json // this example is just showing the usage of "DatabaseOperations_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 @@ -773,7 +811,7 @@ public async Task CancelDatabaseOperation_CancelTheDatabaseManagementOperation() [Ignore("Only validating compilation of examples")] public async Task GetDatabaseUsages_GetsDatabaseUsages() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetDatabaseUsages.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetDatabaseUsages.json // this example is just showing the usage of "DatabaseUsages_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -799,11 +837,43 @@ public async Task GetDatabaseUsages_GetsDatabaseUsages() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Export_ExportsADatabaseUsingManagedIdentityToCommunicateWithSQLServerAndStorageAccount() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExportDatabaseWithManagedIdentity.json + // this example is just showing the usage of "Databases_Export" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string serverName = "testsvr"; + string databaseName = "testdb"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // invoke the operation + DatabaseExportDefinition databaseExportDefinition = new DatabaseExportDefinition(StorageKeyType.ManagedIdentity, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", new Uri("https://test.blob.core.windows.net/test.bacpac"), "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") + { + AuthenticationType = "ManagedIdentity", + }; + ArmOperation lro = await sqlDatabase.ExportAsync(WaitUntil.Completed, databaseExportDefinition); + ImportExportOperationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Export_ExportsADatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExportDatabaseWithNetworkIsolation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExportDatabaseWithNetworkIsolation.json // this example is just showing the usage of "Databases_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -821,8 +891,9 @@ public async Task Export_ExportsADatabaseUsingPrivateLinkToCommunicateWithSQLSer SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); // invoke the operation - DatabaseExportDefinition databaseExportDefinition = new DatabaseExportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + DatabaseExportDefinition databaseExportDefinition = new DatabaseExportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { + AdministratorLoginPassword = "password", AuthenticationType = "Sql", NetworkIsolation = new NetworkIsolationSettings { @@ -840,7 +911,7 @@ public async Task Export_ExportsADatabaseUsingPrivateLinkToCommunicateWithSQLSer [Ignore("Only validating compilation of examples")] public async Task Export_ExportsADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ExportDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ExportDatabase.json // this example is just showing the usage of "Databases_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -858,8 +929,9 @@ public async Task Export_ExportsADatabase() SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); // invoke the operation - DatabaseExportDefinition databaseExportDefinition = new DatabaseExportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + DatabaseExportDefinition databaseExportDefinition = new DatabaseExportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { + AdministratorLoginPassword = "password", AuthenticationType = "Sql", }; ArmOperation lro = await sqlDatabase.ExportAsync(WaitUntil.Completed, databaseExportDefinition); @@ -872,7 +944,7 @@ public async Task Export_ExportsADatabase() [Ignore("Only validating compilation of examples")] public async Task Failover_FailoverAnDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FailoverDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FailoverDatabase.json // this example is just showing the usage of "Databases_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -896,11 +968,43 @@ public async Task Failover_FailoverAnDatabase() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Import_ImportsToAnExistingEmptyDatabaseUsingManagedIdentityToCommunicateWithSQLServerAndStorageAccount() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportDatabaseWithManagedIdentity.json + // this example is just showing the usage of "Databases_Import" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlDatabaseResource created on azure + // for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string serverName = "testsvr"; + string databaseName = "testdb"; + ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName); + SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); + + // invoke the operation + ImportExistingDatabaseDefinition importExistingDatabaseDefinition = new ImportExistingDatabaseDefinition(StorageKeyType.ManagedIdentity, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", new Uri("https://test.blob.core.windows.net/test.bacpac"), "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") + { + AuthenticationType = "ManagedIdentity", + }; + ArmOperation lro = await sqlDatabase.ImportAsync(WaitUntil.Completed, importExistingDatabaseDefinition); + ImportExportOperationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task Import_ImportsToAnExistingEmptyDatabaseUsingPrivateLinkToCommunicateWithSQLServerAndStorageAccount() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ImportDatabaseWithNetworkIsolation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportDatabaseWithNetworkIsolation.json // this example is just showing the usage of "Databases_Import" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -918,8 +1022,9 @@ public async Task Import_ImportsToAnExistingEmptyDatabaseUsingPrivateLinkToCommu SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); // invoke the operation - ImportExistingDatabaseDefinition importExistingDatabaseDefinition = new ImportExistingDatabaseDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + ImportExistingDatabaseDefinition importExistingDatabaseDefinition = new ImportExistingDatabaseDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { + AdministratorLoginPassword = "password", AuthenticationType = "Sql", NetworkIsolation = new NetworkIsolationSettings { @@ -937,7 +1042,7 @@ public async Task Import_ImportsToAnExistingEmptyDatabaseUsingPrivateLinkToCommu [Ignore("Only validating compilation of examples")] public async Task Import_ImportsToAnExistingEmptyDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ImportDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportDatabase.json // this example is just showing the usage of "Databases_Import" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -955,8 +1060,9 @@ public async Task Import_ImportsToAnExistingEmptyDatabase() SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId); // invoke the operation - ImportExistingDatabaseDefinition importExistingDatabaseDefinition = new ImportExistingDatabaseDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + ImportExistingDatabaseDefinition importExistingDatabaseDefinition = new ImportExistingDatabaseDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { + AdministratorLoginPassword = "password", AuthenticationType = "Sql", }; ArmOperation lro = await sqlDatabase.ImportAsync(WaitUntil.Completed, importExistingDatabaseDefinition); @@ -969,7 +1075,7 @@ public async Task Import_ImportsToAnExistingEmptyDatabase() [Ignore("Only validating compilation of examples")] public async Task Rename_RenamesADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RenameDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RenameDatabase.json // this example is just showing the usage of "Databases_Rename" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -997,7 +1103,7 @@ public async Task Rename_RenamesADatabase() [Ignore("Only validating compilation of examples")] public async Task Pause_PausesADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PauseDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PauseDatabase.json // this example is just showing the usage of "Databases_Pause" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1029,7 +1135,7 @@ public async Task Pause_PausesADatabase() [Ignore("Only validating compilation of examples")] public async Task Resume_ResumesADatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ResumeDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ResumeDatabase.json // this example is just showing the usage of "Databases_Resume" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1061,7 +1167,7 @@ public async Task Resume_ResumesADatabase() [Ignore("Only validating compilation of examples")] public async Task UpgradeDataWarehouse_UpgradesADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpgradeDataWarehouse.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpgradeDataWarehouse.json // this example is just showing the usage of "Databases_UpgradeDataWarehouse" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1088,7 +1194,7 @@ public async Task UpgradeDataWarehouse_UpgradesADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task CreateRestorePoint_CreatesDatawarehouseDatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsPost.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsPost.json // this example is just showing the usage of "RestorePoints_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 @@ -1121,7 +1227,7 @@ public async Task CreateRestorePoint_CreatesDatawarehouseDatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task GetCurrentSensitivityLabels_GetsTheCurrentSensitivityLabelsOfAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceCurrent.json // this example is just showing the usage of "SensitivityLabels_ListCurrentByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1155,7 +1261,7 @@ public async Task GetCurrentSensitivityLabels_GetsTheCurrentSensitivityLabelsOfA [Ignore("Only validating compilation of examples")] public async Task UpdateSensitivityLabel_UpdateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SensitivityLabelsCurrentUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SensitivityLabelsCurrentUpdate.json // this example is just showing the usage of "SensitivityLabels_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 @@ -1220,7 +1326,7 @@ public async Task UpdateSensitivityLabel_UpdateSensitivityLabelsOfAGivenDatabase [Ignore("Only validating compilation of examples")] public async Task GetRecommendedSensitivityLabels_GetsTheRecommendedSensitivityLabelsOfAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SensitivityLabelsListByDatabaseWithSourceRecommended.json // this example is just showing the usage of "SensitivityLabels_ListRecommendedByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1254,7 +1360,7 @@ public async Task GetRecommendedSensitivityLabels_GetsTheRecommendedSensitivityL [Ignore("Only validating compilation of examples")] public async Task UpdateRecommendedSensitivityLabel_UpdateRecommendedSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SensitivityLabelsRecommendedUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SensitivityLabelsRecommendedUpdate.json // this example is just showing the usage of "SensitivityLabels_UpdateRecommended" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1303,7 +1409,7 @@ public async Task UpdateRecommendedSensitivityLabel_UpdateRecommendedSensitivity [Ignore("Only validating compilation of examples")] public async Task GetSensitivityLabels_GetsTheCurrentAndRecommendedSensitivityLabelsOfAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SensitivityLabelsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SensitivityLabelsListByDatabase.json // this example is just showing the usage of "SensitivityLabels_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1337,7 +1443,7 @@ public async Task GetSensitivityLabels_GetsTheCurrentAndRecommendedSensitivityLa [Ignore("Only validating compilation of examples")] public async Task GetSynapseLinkWorkspaces_ListAllSynapselinkWorkspacesForTheGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SynapseLinkWorkspaceListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SynapseLinkWorkspaceListByDatabase.json // this example is just showing the usage of "SynapseLinkWorkspaces_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaCollection.cs index b751f3411e4b..b260fc99f274 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseSchemaCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSchemaGet.json // this example is just showing the usage of "DatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabaseSchemas() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSchemaListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSchemaListByDatabase.json // this example is just showing the usage of "DatabaseSchemas_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListDatabaseSchemas() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSchemaGet.json // this example is just showing the usage of "DatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSchemaGet.json // this example is just showing the usage of "DatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaResource.cs index 65ca39a7a784..f26c6aa2613a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSchemaResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseSchemaResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSchemaGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSchemaGet.json // this example is just showing the usage of "DatabaseSchemas_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyCollection.cs index ab79a5c58f51..10bb50b584ae 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSecurityAlertPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertCreateMax.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSThreatDetectionPolicyWithAllPar [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateADatabaseSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertCreateMin.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateADatabaseSThreatDetectionPolicyWithMinima [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertGet.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheDatabaseSThreatDetectionPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertListByDatabase.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheDatabaseSThreatDetectionPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertGet.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertGet.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyResource.cs index bb5142f8bea1..15aac9d6ec2d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSecurityAlertPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSecurityAlertPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertGet.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertCreateMax.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateADatabaseSThreatDetectionPolicyWithAllParameters( [Ignore("Only validating compilation of examples")] public async Task Update_UpdateADatabaseSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSecurityAlertCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSecurityAlertCreateMin.json // this example is just showing the usage of "DatabaseSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelCollection.cs index 2f14f616d3cf..015439deb331 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSensitivityLabelCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSensitivityLabelOfAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnSensitivityLabelGet.json // this example is just showing the usage of "SensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsTheSensitivityLabelOfAGivenColumn() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheSensitivityLabelOfAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnSensitivityLabelGet.json // this example is just showing the usage of "SensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsTheSensitivityLabelOfAGivenColumn() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheSensitivityLabelOfAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnSensitivityLabelGet.json // this example is just showing the usage of "SensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelResource.cs index ae0536f494e1..5251992b0a54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSensitivityLabelResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSensitivityLabelResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheSensitivityLabelOfAGivenColumn() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ColumnSensitivityLabelGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ColumnSensitivityLabelGet.json // this example is just showing the usage of "SensitivityLabels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs index 25f03367c9c8..6e81e92c386f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineCollect [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AddADatabaseSVulnerabilityAssessmentRuleBaselin [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AddADatabaseSVulnerabilityAssessmentRuleBaselin [Ignore("Only validating compilation of examples")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_ListBySqlVulnerabilityAssessment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -221,7 +221,7 @@ public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs index 2963f09b3b0d..b209adab96a7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineResourc [Ignore("Only validating compilation of examples")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromThe [Ignore("Only validating compilation of examples")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs index 65f08d250a2e..ab0cd451841c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCol [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesADatabaseSVulnerabilityAssessme [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineListByBaseline.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_ListByBaseline" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs index f200c7f9a993..aba28ff3f2a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleRes [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSSqlVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_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 @@ -84,7 +84,7 @@ public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs index 1a698af9dfbe..c62fa3d6729c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSQLVulnerabilityAssessmentPolicyForDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetSQLVulnerabilityAssessmentPoliciesOnAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListByDatabase.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetSQLVulnerabilityAssessmentPoliciesOnAGivenDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetSQLVulnerabilityAssessmentPolicyForDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs index 9e298f7aa558..fa8f88bf45ee 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSQLVulnerabilityAssessmentPolicyForDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSQLVulnerabilityAssessmentPolicyForDatabase() [Ignore("Only validating compilation of examples")] public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentExecuteScan_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs index 2667c496d214..3fdddb0ce778 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSVulnerabilityAssessmentScan() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetADatabaseSVulnerabilityAssessmentScan() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs index 3f119f7b55a6..103b4b7646bc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs index 33fab79d3e1f..5b9eaa5039a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultColle [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdA [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabaseSQLVulnerabilityAssessmentScanResultsForScanId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentListScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_ListByScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListDatabaseSQLVulnerabilityAssessmentScanResultsForSca [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetADatabaseSQLVulnerabilityAssessmentScanResultForScan [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs index d6a4b6470713..3c48e8df65d7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseSqlVulnerabilityAssessmentScanResultResou [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseSqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "DatabaseSqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableCollection.cs index fc8f2cc11f6c..9e323fcc3660 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseTableCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseTableGet.json // this example is just showing the usage of "DatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseTable() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabaseTables() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseTableListBySchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseTableListBySchema.json // this example is just showing the usage of "DatabaseTables_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 @@ -93,7 +93,7 @@ public async Task GetAll_ListDatabaseTables() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseTableGet.json // this example is just showing the usage of "DatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetDatabaseTable() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseTableGet.json // this example is just showing the usage of "DatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableResource.cs index 977ec40cb696..f748ef8359ed 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseTableResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlDatabaseTableResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDatabaseTable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseTableGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseTableGet.json // this example is just showing the usage of "DatabaseTables_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentCollection.cs index b62c58ea79c4..e821660452cc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADatabaseSVulnerabilityAssessmentWithAllP [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADatabaseSVulnerabilityAssessmentWithMini [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADatabaseSVulnerabilityAssessmentWithMini [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheDatabaseSVulnerabilityAssessmentPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentListByDatabase.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -222,7 +222,7 @@ public async Task GetAll_GetTheDatabaseSVulnerabilityAssessmentPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentResource.cs index c9c373a78891..592678b2c6f2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Delete_RemoveADatabaseSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentDelete.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_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_RemoveADatabaseSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabaseSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateADatabaseSVulnerabilityAssessmentWithAllParameter [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateADatabaseSVulnerabilityAssessmentWithMinimalParam [Ignore("Only validating compilation of examples")] public async Task Update_CreateADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "DatabaseVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs index 58d9eac63cef..1950314ce90d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineCollec [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesADatabaseSVulnerabilityAssessme [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs index cde21baffb9f..8b0c329b40b0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentRuleBaselineResour [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_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 @@ -84,7 +84,7 @@ public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentRuleBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanCollection.cs index b5e14f59e499..5566ce51d715 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentScanCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID( [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanResource.cs index def829ccd575..f15e5acce65f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDatabaseVulnerabilityAssessmentScanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDatabaseVulnerabilityAssessmentScanResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseVulnerabilityAssessmentScanRecordByScanID() [Ignore("Only validating compilation of examples")] public async Task Export_ExportADatabaseSVulnerabilityAssessmentScanResults() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScanExport.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_Export" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -82,7 +82,7 @@ public async Task Export_ExportADatabaseSVulnerabilityAssessmentScanResults() [Ignore("Only validating compilation of examples")] public async Task InitiateScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "DatabaseVulnerabilityAssessmentScans_InitiateScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupCollection.cs index f5cfe1cb90d9..c8632c6b34c6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDistributedAvailabilityGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADistributedAvailabilityGroupWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsCreateMax.json // this example is just showing the usage of "DistributedAvailabilityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADistributedAvailabilityGroupWithAllPrope [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateADistributedAvailabilityGroupWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsCreateMin.json // this example is just showing the usage of "DistributedAvailabilityGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateADistributedAvailabilityGroupWithMinimalP [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAllDistributedAvailabilityGroupsInInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsListByInstance.json // this example is just showing the usage of "DistributedAvailabilityGroups_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 @@ -183,7 +183,7 @@ public async Task GetAll_ListsAllDistributedAvailabilityGroupsInInstance() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupResource.cs index 641267a0c056..711852c10784 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlDistributedAvailabilityGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlDistributedAvailabilityGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheDistributedAvailabilityGroupInfo() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsGet.json // this example is just showing the usage of "DistributedAvailabilityGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheDistributedAvailabilityGroupInfo() [Ignore("Only validating compilation of examples")] public async Task Delete_InitiateADistributedAvailabilityGroupDrop() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsDelete.json // this example is just showing the usage of "DistributedAvailabilityGroups_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_InitiateADistributedAvailabilityGroupDrop() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheDistributedAvailabilityGroupReplicationModeBeforeDeletingIt() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsUpdate.json // this example is just showing the usage of "DistributedAvailabilityGroups_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_UpdateTheDistributedAvailabilityGroupReplicationModeBef [Ignore("Only validating compilation of examples")] public async Task Failover_FailoverADistributedAvailabilityGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsFailover.json // this example is just showing the usage of "DistributedAvailabilityGroups_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -147,7 +147,7 @@ public async Task Failover_FailoverADistributedAvailabilityGroup() [Ignore("Only validating compilation of examples")] public async Task SetRole_SetDistributedAvailabilityGroupPrimaryReplicaToManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DistributedAvailabilityGroupsSetRole.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DistributedAvailabilityGroupsSetRole.json // this example is just showing the usage of "DistributedAvailabilityGroups_SetRole" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleCollection.cs index cd151b2d01d2..dd07a50129f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlFirewallRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAFirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAFirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAFirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleUpdate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateAFirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListFirewallRules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleList.json // this example is just showing the usage of "FirewallRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task GetAll_ListFirewallRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -199,7 +199,7 @@ public async Task Exists_GetFirewallRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleResource.cs index bfc6ff001b9a..8c944000897f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlFirewallRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlFirewallRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleGet.json // this example is just showing the usage of "FirewallRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAFirewallRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleDelete.json // this example is just showing the usage of "FirewallRules_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_DeleteAFirewallRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAFirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleCreate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAFirewallRuleMaxMin() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAFirewallRuleMaxMin() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/FirewallRuleUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/FirewallRuleUpdate.json // this example is just showing the usage of "FirewallRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationCollection.cs new file mode 100644 index 000000000000..946aa9fa5a01 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationCollection.cs @@ -0,0 +1,196 @@ +// 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.Sql.Samples +{ + public partial class Sample_SqlInstancePoolOperationCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this SqlInstancePoolOperationResource + SqlInstancePoolOperationCollection collection = instancePool.GetSqlInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + SqlInstancePoolOperationResource result = await collection.GetAsync(operationId); + + // 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 + SqlInstancePoolOperationData 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_ListTheInstancePoolManagementOperationsWithNoResults() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperationsEmpty.json + // this example is just showing the usage of "InstancePoolOperations_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this SqlInstancePoolOperationResource + SqlInstancePoolOperationCollection collection = instancePool.GetSqlInstancePoolOperations(); + + // invoke the operation and iterate over the result + await foreach (SqlInstancePoolOperationResource 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 + SqlInstancePoolOperationData 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_ListTheInstancePoolManagementOperationsWithSomeResults() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolOperations.json + // this example is just showing the usage of "InstancePoolOperations_ListByInstancePool" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this SqlInstancePoolOperationResource + SqlInstancePoolOperationCollection collection = instancePool.GetSqlInstancePoolOperations(); + + // invoke the operation and iterate over the result + await foreach (SqlInstancePoolOperationResource 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 + SqlInstancePoolOperationData 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_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this SqlInstancePoolOperationResource + SqlInstancePoolOperationCollection collection = instancePool.GetSqlInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + bool result = await collection.ExistsAsync(operationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this InstancePoolResource created on azure + // for more information of creating InstancePoolResource, please refer to the document of InstancePoolResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + ResourceIdentifier instancePoolResourceId = InstancePoolResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName); + InstancePoolResource instancePool = client.GetInstancePoolResource(instancePoolResourceId); + + // get the collection of this SqlInstancePoolOperationResource + SqlInstancePoolOperationCollection collection = instancePool.GetSqlInstancePoolOperations(); + + // invoke the operation + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + NullableResponse response = await collection.GetIfExistsAsync(operationId); + SqlInstancePoolOperationResource 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 + SqlInstancePoolOperationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationResource.cs new file mode 100644 index 000000000000..01bdd73119ab --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlInstancePoolOperationResource.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.Sql.Samples +{ + public partial class Sample_SqlInstancePoolOperationResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GetsTheInstancePoolManagementOperation() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetInstancePoolOperation.json + // this example is just showing the usage of "InstancePoolOperations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlInstancePoolOperationResource created on azure + // for more information of creating SqlInstancePoolOperationResource, please refer to the document of SqlInstancePoolOperationResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "resource-group"; + string instancePoolName = "test-instance-pool"; + Guid operationId = Guid.Parse("c218773b-203f-4c7a-b174-6bd71fe20f72"); + ResourceIdentifier sqlInstancePoolOperationResourceId = SqlInstancePoolOperationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instancePoolName, operationId); + SqlInstancePoolOperationResource sqlInstancePoolOperation = client.GetSqlInstancePoolOperationResource(sqlInstancePoolOperationResourceId); + + // invoke the operation + SqlInstancePoolOperationResource result = await sqlInstancePoolOperation.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 + SqlInstancePoolOperationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationCollection.cs index fcea924db20f..acfa4de0640f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlNetworkSecurityPerimeterConfigurationCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAnNSPConfigByName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNSPConfigsByServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsListByServer.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_ListNSPConfigsByServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnNSPConfigByName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnNSPConfigByName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationResource.cs index 4f5c26c082ea..aa599a2b51f0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlNetworkSecurityPerimeterConfigurationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlNetworkSecurityPerimeterConfigurationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnNSPConfigByName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsGet.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAnNSPConfigByName() [Ignore("Only validating compilation of examples")] public async Task Reconcile_ReconcileNSPConfig() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/NetworkSecurityPerimeterConfigurationsReconcile.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/NetworkSecurityPerimeterConfigurationsReconcile.json // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Reconcile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionCollection.cs index fea2b635d171..cf33d417a77b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlPrivateEndpointConnectionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ApproveOrRejectAPrivateEndpointConnectionWithAG [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsListOfPrivateEndpointConnectionsOnAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionList.json // this example is just showing the usage of "PrivateEndpointConnections_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsListOfPrivateEndpointConnectionsOnAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionResource.cs index 1353499bf8e3..337f4850cda0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlPrivateEndpointConnectionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsPrivateEndpointConnection() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionGet.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsPrivateEndpointConnection() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionDelete.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_DeletesAPrivateEndpointConnectionWithAGivenName() [Ignore("Only validating compilation of examples")] public async Task Update_ApproveOrRejectAPrivateEndpointConnectionWithAGivenName() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateEndpointConnectionUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateEndpointConnectionUpdate.json // this example is just showing the usage of "PrivateEndpointConnections_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResource.cs index 428ec06b127d..4b01f0c6fb0b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlPrivateLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateLinkResourcesGet.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResourceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResourceCollection.cs index 71155f31a4fa..2e8cc601fb8a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResourceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlPrivateLinkResourceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlPrivateLinkResourceCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateLinkResourcesGet.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_GetsAPrivateLinkResourceForSQL() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsPrivateLinkResourcesForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateLinkResourcesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateLinkResourcesList.json // this example is just showing the usage of "PrivateLinkResources_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_GetsPrivateLinkResourcesForSQL() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateLinkResourcesGet.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -119,7 +119,7 @@ public async Task Exists_GetsAPrivateLinkResourceForSQL() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAPrivateLinkResourceForSQL() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/PrivateLinkResourcesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/PrivateLinkResourcesGet.json // this example is just showing the usage of "PrivateLinkResources_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorCollection.cs index 77ce6c8189e1..a4982d277502 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerAdvisorCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetServerAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorGet.json // this example is just showing the usage of "ServerAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerAdvisor() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfServerAdvisors() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorList.json // this example is just showing the usage of "ServerAdvisors_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -89,7 +89,7 @@ public async Task GetAll_ListOfServerAdvisors() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListOfServerRecommendedActionsForAllAdvisors() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerRecommendedActionListExpand.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerRecommendedActionListExpand.json // this example is just showing the usage of "ServerAdvisors_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetAll_ListOfServerRecommendedActionsForAllAdvisors() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServerAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorGet.json // this example is just showing the usage of "ServerAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerAdvisor() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServerAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorGet.json // this example is just showing the usage of "ServerAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorResource.cs index 4ad4f81e6e16..65f38a444f0e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAdvisorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAdvisorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServerAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorGet.json // this example is just showing the usage of "ServerAdvisors_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerAdvisor() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateServerAdvisor() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAdvisorUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAdvisorUpdate.json // this example is just showing the usage of "ServerAdvisors_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAutomaticTuningResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAutomaticTuningResource.cs index 6263c6a98cd7..26f6432102ef 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAutomaticTuningResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAutomaticTuningResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAutomaticTuningResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSAutomaticTuningSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAutomaticTuningGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAutomaticTuningGet.json // this example is just showing the usage of "ServerAutomaticTuning_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSAutomaticTuningSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesServerAutomaticTuningSettingsWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAutomaticTuningUpdateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAutomaticTuningUpdateMax.json // this example is just showing the usage of "ServerAutomaticTuning_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 @@ -99,7 +99,7 @@ public async Task Update_UpdatesServerAutomaticTuningSettingsWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesServerAutomaticTuningSettingsWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAutomaticTuningUpdateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAutomaticTuningUpdateMin.json // this example is just showing the usage of "ServerAutomaticTuning_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorCollection.cs index f69863ce7fa9..93ef177e5bf7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAzureADAdministratorCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAnExistingAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorCreateOrUpdate.json // this example is just showing the usage of "ServerAzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesAnExistingAzureActiveDirectoryA [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorGet.json // this example is just showing the usage of "ServerAzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorList.json // this example is just showing the usage of "ServerAzureADAdministrators_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -132,7 +132,7 @@ public async Task GetAll_GetsAListOfAzureActiveDirectoryAdministrator() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorGet.json // this example is just showing the usage of "ServerAzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryAdministrator() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorGet.json // this example is just showing the usage of "ServerAzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorResource.cs index daecde9d020b..f9ea2f4262c7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADAdministratorResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAzureADAdministratorResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorGet.json // this example is just showing the usage of "ServerAzureADAdministrators_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryAdministrator() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorDelete.json // this example is just showing the usage of "ServerAzureADAdministrators_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_DeleteAzureActiveDirectoryAdministrator() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAnExistingAzureActiveDirectoryAdministrator() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AdministratorCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AdministratorCreateOrUpdate.json // this example is just showing the usage of "ServerAzureADAdministrators_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationCollection.cs index ca41be7917bd..e74d2a069546 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAzureADOnlyAuthenticationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthent [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthGet.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthList.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_GetsAListOfAzureActiveDirectoryOnlyAuthenticationObject [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthGet.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthGet.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationResource.cs index 47e94918a304..7fd80201f330 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerAzureADOnlyAuthenticationResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerAzureADOnlyAuthenticationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthGet.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAAzureActiveDirectoryOnlyAuthenticationProperty() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthDelete.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_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_DeletesAzureActiveDirectoryOnlyAuthenticationObject() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAzureActiveDirectoryOnlyAuthenticationObject() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/AzureADOnlyAuthCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/AzureADOnlyAuthCreateOrUpdate.json // this example is just showing the usage of "ServerAzureADOnlyAuthentications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyCollection.cs index a04a0590f56f..1d5a4127baa8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerBlobAuditingPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingCreateMax.json // this example is just showing the usage of "ServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSBlobAuditingPolicyWithAllParamete [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingCreateMin.json // this example is just showing the usage of "ServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateAServerSBlobAuditingPolicyWithMinimalPara [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingGet.json // this example is just showing the usage of "ServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAuditingSettingsOfAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerAuditingSettingsList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerAuditingSettingsList.json // this example is just showing the usage of "ServerBlobAuditingPolicies_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,7 +178,7 @@ public async Task GetAll_ListAuditingSettingsOfAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingGet.json // this example is just showing the usage of "ServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAServerSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingGet.json // this example is just showing the usage of "ServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyResource.cs index 05962030aa86..e6616f309e11 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerBlobAuditingPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerBlobAuditingPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSBlobAuditingPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingGet.json // this example is just showing the usage of "ServerBlobAuditingPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSBlobAuditingPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSBlobAuditingPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingCreateMax.json // this example is just showing the usage of "ServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAServerSBlobAuditingPolicyWithAllParameters() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSBlobAuditingPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerBlobAuditingCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerBlobAuditingCreateMin.json // this example is just showing the usage of "ServerBlobAuditingPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs index 7d724d597245..b00f3b658ec0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerCreate.json // this example is just showing the usage of "Servers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerWithExpandAdministratorsActivedirectory() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServersByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerListByResourceGroup.json // this example is just showing the usage of "Servers_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 @@ -172,7 +172,7 @@ public async Task GetAll_ListServersByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServersByResourceGroupWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerListByResourceGroupWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -207,7 +207,7 @@ public async Task GetAll_ListServersByResourceGroupWithExpandAdministratorsActiv [Ignore("Only validating compilation of examples")] public async Task Exists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,7 +265,7 @@ public async Task Exists_GetServerWithExpandAdministratorsActivedirectory() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -306,7 +306,7 @@ public async Task GetIfExists_GetServer() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyCollection.cs index bd655d44495f..f505f8404eed 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerConnectionPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesUpdate.json // this example is just showing the usage of "ServerConnectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdatesAServerConnectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetsAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesGet.json // this example is just showing the usage of "ServerConnectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAServerConnectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListsAServersConnectionPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesList.json // this example is just showing the usage of "ServerConnectionPolicies_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ListsAServersConnectionPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesGet.json // this example is just showing the usage of "ServerConnectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAServerConnectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesGet.json // this example is just showing the usage of "ServerConnectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyResource.cs index a77e24ec805d..897e22581c55 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerConnectionPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerConnectionPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesGet.json // this example is just showing the usage of "ServerConnectionPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAServerConnectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdatesAServerConnectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerConnectionPoliciesUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerConnectionPoliciesUpdate.json // this example is just showing the usage of "ServerConnectionPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs index 3eeb9908328c..d5e48848b683 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerDatabaseReplicationLinkCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdatesReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkCreateOrUpdate.json // this example is just showing the usage of "ReplicationLinks_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdatesReplicationLink() [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheReplicationLink() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListReplicationLinksOnServerOnDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkListByDatabase.json // this example is just showing the usage of "ReplicationLinks_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListReplicationLinksOnServerOnDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheReplicationLink() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs index e01fb0c3da88..9f129a6b6400 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseReplicationLinkResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerDatabaseReplicationLinkResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkGet.json // this example is just showing the usage of "ReplicationLinks_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheReplicationLink() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteReplicationLinkOnServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkDelete.json // this example is just showing the usage of "ReplicationLinks_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_DeleteReplicationLinkOnServer() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkUpdate.json // this example is just showing the usage of "ReplicationLinks_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -117,7 +117,7 @@ public async Task Update_UpdateReplicationLink() [Ignore("Only validating compilation of examples")] public async Task Failover_PlannedFailoverOfAReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkFailover.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkFailover.json // this example is just showing the usage of "ReplicationLinks_Failover" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -150,7 +150,7 @@ public async Task Failover_PlannedFailoverOfAReplicationLink() [Ignore("Only validating compilation of examples")] public async Task FailoverAllowDataLoss_ForcedFailoverOfAReplicationLink() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkFailoverAllowDataLoss.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkFailoverAllowDataLoss.json // this example is just showing the usage of "ReplicationLinks_FailoverAllowDataLoss" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointCollection.cs index 75cef7ef07a0..01a3f363af49 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerDatabaseRestorePointCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatawarehouseDatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataWarehouseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataWarehouseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatawarehouseDatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatabaseRestorePoints() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsListByDatabase.json // this example is just showing the usage of "RestorePoints_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListDatabaseRestorePoints() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDatawarehouseDatabaseRestorePoints() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataWarehouseRestorePointsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataWarehouseRestorePointsListByDatabase.json // this example is just showing the usage of "RestorePoints_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListDatawarehouseDatabaseRestorePoints() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsADatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsADatawarehouseDatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataWarehouseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataWarehouseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatawarehouseDatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task GetIfExists_GetsADatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsADatawarehouseDatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataWarehouseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataWarehouseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointResource.cs index 7c45d41e09a1..86ddbcf984fa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDatabaseRestorePointResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerDatabaseRestorePointResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsADatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task Get_GetsADatawarehouseDatabaseRestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DataWarehouseRestorePointsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DataWarehouseRestorePointsGet.json // this example is just showing the usage of "RestorePoints_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsADatawarehouseDatabaseRestorePoint() [Ignore("Only validating compilation of examples")] public async Task Delete_DeletesARestorePoint() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DatabaseRestorePointsDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DatabaseRestorePointsDelete.json // this example is just showing the usage of "RestorePoints_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingCollection.cs index 60fd07e3fb59..86896388572e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerDevOpsAuditingSettingCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSDevOpsAuditSettingsWithAllParams() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditCreateMax.json // this example is just showing the usage of "ServerDevOpsAuditSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSDevOpsAuditSettingsWithAllParams( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSDevOpsAuditSettingsWithMinimalInput() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditCreateMin.json // this example is just showing the usage of "ServerDevOpsAuditSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSDevOpsAuditSettingsWithMinimalInp [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSDevOpsAuditSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditGet.json // this example is just showing the usage of "ServerDevOpsAuditSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAServerSDevOpsAuditSettings() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDevOpsAuditSettingsOfAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditList.json // this example is just showing the usage of "ServerDevOpsAuditSettings_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetAll_ListDevOpsAuditSettingsOfAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSDevOpsAuditSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditGet.json // this example is just showing the usage of "ServerDevOpsAuditSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAServerSDevOpsAuditSettings() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSDevOpsAuditSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditGet.json // this example is just showing the usage of "ServerDevOpsAuditSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingResource.cs index 1cd542897ac2..4193308d651c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDevOpsAuditingSettingResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerDevOpsAuditingSettingResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSDevOpsAuditSettings() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditGet.json // this example is just showing the usage of "ServerDevOpsAuditSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSDevOpsAuditSettings() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSDevOpsAuditSettingsWithAllParams() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditCreateMax.json // this example is just showing the usage of "ServerDevOpsAuditSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAServerSDevOpsAuditSettingsWithAllParams() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSDevOpsAuditSettingsWithMinimalInput() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDevOpsAuditCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDevOpsAuditCreateMin.json // this example is just showing the usage of "ServerDevOpsAuditSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasCollection.cs index 7c4b01b5e28f..95325049194c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerDnsAliasCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasCreateOrUpdate.json // this example is just showing the usage of "ServerDnsAliases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Get_GetServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasGet.json // this example is just showing the usage of "ServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServerDNSAliases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasList.json // this example is just showing the usage of "ServerDnsAliases_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -124,7 +124,7 @@ public async Task GetAll_ListServerDNSAliases() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasGet.json // this example is just showing the usage of "ServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasGet.json // this example is just showing the usage of "ServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasResource.cs index 54bd5f64c10b..aecd056b4453 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerDnsAliasResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerDnsAliasResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasGet.json // this example is just showing the usage of "ServerDnsAliases_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasDelete.json // this example is just showing the usage of "ServerDnsAliases_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_DeleteServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Update_CreateServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasCreateOrUpdate.json // this example is just showing the usage of "ServerDnsAliases_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateServerDNSAlias() [Ignore("Only validating compilation of examples")] public async Task Acquire_AcquireServerDNSAlias() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDnsAliasAcquire.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDnsAliasAcquire.json // this example is just showing the usage of "ServerDnsAliases_Acquire" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentCollection.cs index ce1e4b9b175d..2f888d6b60ee 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerJobAgentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobAgent.json // this example is just showing the usage of "JobAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAJobAgent() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAJobAgentWithIdentity() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobAgentWithIdentity.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobAgentWithIdentity.json // this example is just showing the usage of "JobAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAJobAgentWithIdentity() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAJobAgentWithSku() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobAgentWithSku.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobAgentWithSku.json // this example is just showing the usage of "JobAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -146,7 +146,7 @@ public async Task CreateOrUpdate_CreateOrUpdateAJobAgentWithSku() [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobAgent.json // this example is just showing the usage of "JobAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAJobAgent() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobAgentsInAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobAgentsByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobAgentsByServer.json // this example is just showing the usage of "JobAgents_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task GetAll_ListJobAgentsInAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobAgent.json // this example is just showing the usage of "JobAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJobAgent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobAgent.json // this example is just showing the usage of "JobAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentResource.cs index bc16cbeabf84..67ddb3e1d9ee 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobAgentResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerJobAgentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobAgent.json // this example is just showing the usage of "JobAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJobAgent() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteJobAgent.json // this example is just showing the usage of "JobAgents_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_DeleteAJobAgent() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAJobAgentSIdentity() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateJobAgentWithIdentity.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateJobAgentWithIdentity.json // this example is just showing the usage of "JobAgents_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 @@ -121,7 +121,7 @@ public async Task Update_UpdateAJobAgentSIdentity() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAJobAgentSSku() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateJobAgentWithSku.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateJobAgentWithSku.json // this example is just showing the usage of "JobAgents_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 @@ -157,7 +157,7 @@ public async Task Update_UpdateAJobAgentSSku() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAJobAgentSTags() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateJobAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateJobAgent.json // this example is just showing the usage of "JobAgents_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 @@ -196,7 +196,7 @@ public async Task Update_UpdateAJobAgentSTags() [Ignore("Only validating compilation of examples")] public async Task GetJobExecutionsByAgent_ListAllJobExecutionsInAJobAgentWithFiltering() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionsByAgentWithFilter.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionsByAgentWithFilter.json // this example is just showing the usage of "JobExecutions_ListByAgent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetJobExecutionsByAgent_ListAllJobExecutionsInAJobAgentWithFil [Ignore("Only validating compilation of examples")] public async Task GetJobExecutionsByAgent_ListAllJobExecutionsInAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionsByAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionsByAgent.json // this example is just showing the usage of "JobExecutions_ListByAgent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCollection.cs index 9a180338a611..0dc3ef4d0ec8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerJobCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAJobWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobMax.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAJobWithAllPropertiesSpecified() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAJobWithDefaultProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobMin.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAJobWithDefaultProperties() [Ignore("Only validating compilation of examples")] public async Task Get_GetAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJob.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAJob() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobsInAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobsByAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobsByAgent.json // this example is just showing the usage of "Jobs_ListByAgent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListJobsInAJobAgent() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJob.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJob() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJob.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialCollection.cs index 15bcbc38b769..acfc1d857df9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobCredentialCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobCredential.json // this example is just showing the usage of "JobCredentials_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateACredential() [Ignore("Only validating compilation of examples")] public async Task Get_GetACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobCredential.json // this example is just showing the usage of "JobCredentials_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetACredential() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCredentialsInAJobAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobCredentialsByAgent.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobCredentialsByAgent.json // this example is just showing the usage of "JobCredentials_ListByAgent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListCredentialsInAJobAgent() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobCredential.json // this example is just showing the usage of "JobCredentials_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetACredential() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobCredential.json // this example is just showing the usage of "JobCredentials_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialResource.cs index 8a9b4f3bf61d..9dcdc7cafe46 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobCredentialResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobCredentialResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobCredential.json // this example is just showing the usage of "JobCredentials_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetACredential() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteJobCredential.json // this example is just showing the usage of "JobCredentials_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_DeleteACredential() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateACredential() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobCredential.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobCredential.json // this example is just showing the usage of "JobCredentials_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionCollection.cs index aba0808f72e2..5d8bb2fe8e31 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobExecutionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobExecution.json // this example is just showing the usage of "JobExecutions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateJobExecution() [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecution.json // this example is just showing the usage of "JobExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJobExecution() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAJobSExecutions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionsByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionsByJob.json // this example is just showing the usage of "JobExecutions_ListByJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListAJobSExecutions() [Ignore("Only validating compilation of examples")] public async Task GetJobTargetExecutions_ListJobStepTargetExecutions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionTargetsByExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionTargetsByExecution.json // this example is just showing the usage of "JobTargetExecutions_ListByJobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetJobTargetExecutions_ListJobStepTargetExecutions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecution.json // this example is just showing the usage of "JobExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAJobExecution() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecution.json // this example is just showing the usage of "JobExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionResource.cs index 19517739d245..2bf0c90a08dd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobExecutionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecution.json // this example is just showing the usage of "JobExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJobExecution() [Ignore("Only validating compilation of examples")] public async Task Update_CreateJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobExecution.json // this example is just showing the usage of "JobExecutions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateJobExecution() [Ignore("Only validating compilation of examples")] public async Task Cancel_CancelAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CancelJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CancelJobExecution.json // this example is just showing the usage of "JobExecutions_Cancel" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepCollection.cs index 0e67a59e9429..2a6c645556ca 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobExecutionStepCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobStepExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionStep.json // this example is just showing the usage of "JobStepExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAJobStepExecution() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobStepExecutions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionSteps.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionSteps.json // this example is just showing the usage of "JobStepExecutions_ListByJobExecution" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListJobStepExecutions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAJobStepExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionStep.json // this example is just showing the usage of "JobStepExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAJobStepExecution() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAJobStepExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionStep.json // this example is just showing the usage of "JobStepExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepResource.cs index dcd0190aed7d..d6c4e9ace1d2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobExecutionStepResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobStepExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionStep.json // this example is just showing the usage of "JobStepExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetCollection.cs index 081f3672353c..72e8fdadf336 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobExecutionStepTargetCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobStepTargetExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionTarget.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionTarget.json // this example is just showing the usage of "JobTargetExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAJobStepTargetExecution() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobStepTargetExecutions() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobExecutionTargetsByStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobExecutionTargetsByStep.json // this example is just showing the usage of "JobTargetExecutions_ListByStep" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListJobStepTargetExecutions() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAJobStepTargetExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionTarget.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionTarget.json // this example is just showing the usage of "JobTargetExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAJobStepTargetExecution() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAJobStepTargetExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionTarget.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionTarget.json // this example is just showing the usage of "JobTargetExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetResource.cs index a8575f3cf9ae..1840a0895d9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobExecutionStepTargetResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobExecutionStepTargetResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAJobStepTargetExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobExecutionTarget.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobExecutionTarget.json // this example is just showing the usage of "JobTargetExecutions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobResource.cs index 56139f52a3de..9f7a7cb7be0b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerJobResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJob.json // this example is just showing the usage of "Jobs_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAJob() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteJob.json // this example is just showing the usage of "Jobs_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_DeleteAJob() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAJobWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobMax.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateAJobWithAllPropertiesSpecified() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAJobWithDefaultProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobMin.json // this example is just showing the usage of "Jobs_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -160,7 +160,7 @@ public async Task Update_CreateAJobWithDefaultProperties() [Ignore("Only validating compilation of examples")] public async Task CreateJobExecution_StartAJobExecution() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateJobExecution.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateJobExecution.json // this example is just showing the usage of "JobExecutions_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepCollection.cs index 33deffc5d8e2..70e651a34f84 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobStepCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAJobStepWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobStepMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobStepMax.json // this example is just showing the usage of "JobSteps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAJobStepWithAllPropertiesSpecifie [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAJobStepWithMinimalPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobStepMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobStepMin.json // this example is just showing the usage of "JobSteps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAJobStepWithMinimalPropertiesSpec [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLatestVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByJob.json // this example is just showing the usage of "JobSteps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheLatestVersionOfAJobStep() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobStepsForTheLatestVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobStepsByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobStepsByJob.json // this example is just showing the usage of "JobSteps_ListByJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListJobStepsForTheLatestVersionOfAJob() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLatestVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByJob.json // this example is just showing the usage of "JobSteps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLatestVersionOfAJobStep() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLatestVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByJob.json // this example is just showing the usage of "JobSteps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepResource.cs index 4b6bf3e3528e..e963e6d31e6a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobStepResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobStepResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLatestVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByJob.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByJob.json // this example is just showing the usage of "JobSteps_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLatestVersionOfAJobStep() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteJobStep.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteJobStep.json // this example is just showing the usage of "JobSteps_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 @@ -82,7 +82,7 @@ public async Task Delete_DeleteAJobStep() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAJobStepWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobStepMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobStepMax.json // this example is just showing the usage of "JobSteps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateOrUpdateAJobStepWithAllPropertiesSpecified() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAJobStepWithMinimalPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobStepMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobStepMin.json // this example is just showing the usage of "JobSteps_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupCollection.cs index b023142d0203..e624b856cbb8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobTargetGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateATargetGroupWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobTargetGroupMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json // this example is just showing the usage of "JobTargetGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateATargetGroupWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateATargetGroupWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobTargetGroupMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json // this example is just showing the usage of "JobTargetGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateATargetGroupWithMinimalProperties [Ignore("Only validating compilation of examples")] public async Task Get_GetATargetGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobTargetGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobTargetGroup.json // this example is just showing the usage of "JobTargetGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task Get_GetATargetGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllTargetGroupsInAnAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobTargetGroups.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobTargetGroups.json // this example is just showing the usage of "JobTargetGroups_ListByAgent" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAllTargetGroupsInAnAgent() [Ignore("Only validating compilation of examples")] public async Task Exists_GetATargetGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobTargetGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobTargetGroup.json // this example is just showing the usage of "JobTargetGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetATargetGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetATargetGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobTargetGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobTargetGroup.json // this example is just showing the usage of "JobTargetGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupResource.cs index 2a56a2a3c1c7..1a6de20a0f4f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobTargetGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerJobTargetGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetATargetGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobTargetGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobTargetGroup.json // this example is just showing the usage of "JobTargetGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetATargetGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteATargetGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteJobTargetGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteJobTargetGroup.json // this example is just showing the usage of "JobTargetGroups_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_DeleteATargetGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateATargetGroupWithAllProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobTargetGroupMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobTargetGroupMax.json // this example is just showing the usage of "JobTargetGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateOrUpdateATargetGroupWithAllProperties() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateATargetGroupWithMinimalProperties() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateJobTargetGroupMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateJobTargetGroupMin.json // this example is just showing the usage of "JobTargetGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionCollection.cs index 8fa59c1a993f..bc5dcda244f3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobVersionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobVersion.json // this example is just showing the usage of "JobVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAVersionOfAJob() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllVersionsOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobVersions.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobVersions.json // this example is just showing the usage of "JobVersions_ListByJob" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAllVersionsOfAJob() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobVersion.json // this example is just showing the usage of "JobVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAVersionOfAJob() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobVersion.json // this example is just showing the usage of "JobVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionResource.cs index a0e06e33da35..bfa4f094a9ec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobVersion.json // this example is just showing the usage of "JobVersions_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepCollection.cs index 38f786245aab..6ff20570a1d6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobVersionStepCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetTheSpecifiedVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByVersion.json // this example is just showing the usage of "JobSteps_GetByVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetTheSpecifiedVersionOfAJobStep() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListJobStepsForTheSpecifiedVersionOfAJob() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListJobStepsByVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListJobStepsByVersion.json // this example is just showing the usage of "JobSteps_ListByVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListJobStepsForTheSpecifiedVersionOfAJob() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheSpecifiedVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByVersion.json // this example is just showing the usage of "JobSteps_GetByVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheSpecifiedVersionOfAJobStep() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheSpecifiedVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByVersion.json // this example is just showing the usage of "JobSteps_GetByVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepResource.cs index 2e5d5c9908c0..2d8561638103 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerJobVersionStepResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerJobVersionStepResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheSpecifiedVersionOfAJobStep() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetJobStepByVersion.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetJobStepByVersion.json // this example is just showing the usage of "JobSteps_GetByVersion" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyCollection.cs index 4fef929a1594..3e1433f3b29d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerKeyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesAServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyCreateOrUpdate.json // this example is just showing the usage of "ServerKeys_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesAServerKey() [Ignore("Only validating compilation of examples")] public async Task Get_GetTheServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyGet.json // this example is just showing the usage of "ServerKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheServerKey() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheServerKeysByServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyList.json // this example is just showing the usage of "ServerKeys_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,7 +130,7 @@ public async Task GetAll_ListTheServerKeysByServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyGet.json // this example is just showing the usage of "ServerKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheServerKey() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyGet.json // this example is just showing the usage of "ServerKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyResource.cs index 8a428f8eb55b..283ca5d26d2b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerKeyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerKeyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyGet.json // this example is just showing the usage of "ServerKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheServerKey() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyDelete.json // this example is just showing the usage of "ServerKeys_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_DeleteTheServerKey() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesAServerKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerKeyCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerKeyCreateOrUpdate.json // this example is just showing the usage of "ServerKeys_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs index 9b547d2bf171..e148ca25e2e6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGet.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServer() [Ignore("Only validating compilation of examples")] public async Task Get_GetServerWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerGetWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerGetWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerWithExpandAdministratorsActivedirectory() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerDelete.json // this example is just showing the usage of "Servers_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_DeleteServer() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerUpdate.json // this example is just showing the usage of "Servers_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task Update_UpdateAServer() [Ignore("Only validating compilation of examples")] public async Task GetInaccessibleDatabases_GetsAListOfInaccessibleDatabasesInALogicalServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListVCoreInaccessibleDatabasesByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListVCoreInaccessibleDatabasesByServer.json // this example is just showing the usage of "Databases_ListInaccessibleByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetInaccessibleDatabases_GetsAListOfInaccessibleDatabasesInALo [Ignore("Only validating compilation of examples")] public async Task GetReplicationLinks_ListReplicationLinksOnServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ReplicationLinkListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ReplicationLinkListByServer.json // this example is just showing the usage of "ReplicationLinks_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -211,7 +211,7 @@ public async Task GetReplicationLinks_ListReplicationLinksOnServer() [Ignore("Only validating compilation of examples")] public async Task GetServerOperations_ListTheServerManagementOperations() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListServerOperations.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListServerOperations.json // this example is just showing the usage of "ServerOperations_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -240,7 +240,7 @@ public async Task GetServerOperations_ListTheServerManagementOperations() [Ignore("Only validating compilation of examples")] public async Task GetServerUsages_ListServersUsages() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerUsageList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerUsageList.json // this example is just showing the usage of "ServerUsages_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -265,11 +265,43 @@ public async Task GetServerUsages_ListServersUsages() Console.WriteLine("Succeeded"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ImportDatabase_ImportsToANewDatabaseUsingManagedIdentityForTheSQLServerAndStorageAccount() + { + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportNewDatabaseWithManagedIdentity.json + // this example is just showing the usage of "Servers_ImportDatabase" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SqlServerResource created on azure + // for more information of creating SqlServerResource, please refer to the document of SqlServerResource + string subscriptionId = "00000000-1111-2222-3333-444444444444"; + string resourceGroupName = "Default-SQL-SouthEastAsia"; + string serverName = "testsvr"; + ResourceIdentifier sqlServerResourceId = SqlServerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName); + SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); + + // invoke the operation + DatabaseImportDefinition databaseImportDefinition = new DatabaseImportDefinition(StorageKeyType.ManagedIdentity, "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName", new Uri("https://test.blob.core.windows.net/test.bacpac"), "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/rgName/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identityName") + { + DatabaseName = "testdb", + AuthenticationType = "ManagedIdentity", + }; + ArmOperation lro = await sqlServer.ImportDatabaseAsync(WaitUntil.Completed, databaseImportDefinition); + ImportExportOperationResult result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLServerAndStorageAccount() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ImportNewDatabaseWithNetworkIsolation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportNewDatabaseWithNetworkIsolation.json // this example is just showing the usage of "Servers_ImportDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -286,9 +318,10 @@ public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLS SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); // invoke the operation - DatabaseImportDefinition databaseImportDefinition = new DatabaseImportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + DatabaseImportDefinition databaseImportDefinition = new DatabaseImportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { DatabaseName = "testdb", + AdministratorLoginPassword = "password", AuthenticationType = "Sql", NetworkIsolation = new NetworkIsolationSettings { @@ -306,7 +339,7 @@ public async Task ImportDatabase_ImportsToANewDatabaseUsingPrivateLinkForTheSQLS [Ignore("Only validating compilation of examples")] public async Task ImportDatabase_ImportsToANewDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ImportNewDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ImportNewDatabase.json // this example is just showing the usage of "Servers_ImportDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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,9 +356,10 @@ public async Task ImportDatabase_ImportsToANewDatabase() SqlServerResource sqlServer = client.GetSqlServerResource(sqlServerResourceId); // invoke the operation - DatabaseImportDefinition databaseImportDefinition = new DatabaseImportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login", "password") + DatabaseImportDefinition databaseImportDefinition = new DatabaseImportDefinition(StorageKeyType.StorageAccessKey, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", new Uri("https://test.blob.core.windows.net/test.bacpac"), "login") { DatabaseName = "testdb", + AdministratorLoginPassword = "password", AuthenticationType = "Sql", }; ArmOperation lro = await sqlServer.ImportDatabaseAsync(WaitUntil.Completed, databaseImportDefinition); @@ -338,7 +372,7 @@ public async Task ImportDatabase_ImportsToANewDatabase() [Ignore("Only validating compilation of examples")] public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/RefreshExternalGovernanceStatus.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/RefreshExternalGovernanceStatus.json // this example is just showing the usage of "Servers_RefreshStatus" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -365,7 +399,7 @@ public async Task RefreshStatus_RefreshExternalGovernanceEnablementStatus() [Ignore("Only validating compilation of examples")] public async Task CreateTdeCertificate_UploadATDECertificate() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlTdeCertificateCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlTdeCertificateCreate.json // this example is just showing the usage of "TdeCertificates_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyCollection.cs index 596f2feb6855..0166b2ab9fd8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSecurityAlertPolicyCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsCreateMax.json // this example is just showing the usage of "ServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSThreatDetectionPolicyWithAllParam [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateAServerSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsCreateMin.json // this example is just showing the usage of "ServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_UpdateAServerSThreatDetectionPolicyWithMinimalP [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsGet.json // this example is just showing the usage of "ServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListTheServerSThreatDetectionPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsListByServer.json // this example is just showing the usage of "ServerSecurityAlertPolicies_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetAll_ListTheServerSThreatDetectionPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsGet.json // this example is just showing the usage of "ServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetAServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsGet.json // this example is just showing the usage of "ServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyResource.cs index 944172faf09b..e09ecdd36058 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSecurityAlertPolicyResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSecurityAlertPolicyResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSThreatDetectionPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsGet.json // this example is just showing the usage of "ServerSecurityAlertPolicies_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSThreatDetectionPolicy() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSThreatDetectionPolicyWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsCreateMax.json // this example is just showing the usage of "ServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateAServerSThreatDetectionPolicyWithAllParameters() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAServerSThreatDetectionPolicyWithMinimalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerSecurityAlertsCreateMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerSecurityAlertsCreateMin.json // this example is just showing the usage of "ServerSecurityAlertPolicies_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs index d0e502c528fb..56d18d09eabf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineCollectio [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AddADatabaseSVulnerabilityAssessmentRuleBaselin [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_AddADatabaseSVulnerabilityAssessmentRuleBaselin [Ignore("Only validating compilation of examples")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineListBySqlVulnerabilityAssessment.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_ListBySqlVulnerabilityAssessment" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -216,7 +216,7 @@ public async Task Exists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs index fd5bfeedbce1..8ac3ed7ccf63 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaselines() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAListOfDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromTheLatestScanResult() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAddLatest.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineFromThe [Ignore("Only validating compilation of examples")] public async Task Update_AddADatabaseSVulnerabilityAssessmentRuleBaselineList() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentBaselineAdd.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentBaselineAdd.json // this example is just showing the usage of "SqlVulnerabilityAssessmentBaselines_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs index 90ccbca5f41d..688580eb9703 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleColle [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreatesOrUpdatesADatabaseSVulnerabilityAssessme [Ignore("Only validating compilation of examples")] public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineListByBaseline.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_ListByBaseline" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task Exists_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task Exists_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBasel [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs index 2cecad816975..b35499b010fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentBaselineRuleResou [Ignore("Only validating compilation of examples")] public async Task Get_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsASystemDatabaseSSqlVulnerabilityAssessmentRuleBaseline [Ignore("Only validating compilation of examples")] public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineDelete.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaselines_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 @@ -82,7 +82,7 @@ public async Task Delete_RemovesADatabaseSVulnerabilityAssessmentRuleBaseline() [Ignore("Only validating compilation of examples")] public async Task Update_CreatesOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentRuleBaselineCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentRuleBaseline_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs index 8e6e3aff0364..de5383d1116a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateASQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateASQLVulnerabilityAssessmentPolicy() [Ignore("Only validating compilation of examples")] public async Task Get_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSQLVulnerabilityAssessmentPolicy() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetSQLVulnerabilityAssessmentPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentListByServer.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_GetSQLVulnerabilityAssessmentPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSQLVulnerabilityAssessmentPolicy() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs index 971cae0f0b35..122b5c44ae5a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentGet.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSQLVulnerabilityAssessmentPolicy() [Ignore("Only validating compilation of examples")] public async Task Delete_RemoveSQLVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentDelete.json // this example is just showing the usage of "SqlVulnerabilityAssessments_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_RemoveSQLVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Update_CreateASQLVulnerabilityAssessmentPolicy() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentCreate.json // this example is just showing the usage of "SqlVulnerabilityAssessmentsSettings_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateASQLVulnerabilityAssessmentPolicy() [Ignore("Only validating compilation of examples")] public async Task ExecuteScan_ExecutesADatabaseSVulnerabilityAssessmentScan() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScansExecute.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScansExecute.json // this example is just showing the usage of "SqlVulnerabilityAssessmentExecuteScan_Execute" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs index d882ad7f2b21..4f654885c5e1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsTheADatabaseVulnerabilityAssessmentScanRecords() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScanRecordsListByDatabase.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_ListBySqlVulnerabilityAssessments" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetsTheListOfADatabaseVulnerabilityAssessmentScanRecord [Ignore("Only validating compilation of examples")] public async Task Exists_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsTheADatabaseVulnerabilityAssessmentScanRecords() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs index ccf2d536ebb9..848dc56de605 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsTheADatabaseVulnerabilityAssessmentScanRecords() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScan.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScan.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScans_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs index 40b3775a3a28..eb3730e26bd8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResultCollect [Ignore("Only validating compilation of examples")] public async Task Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForS [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSystemDatabaseSQLVulnerabilityAssessmentScanResultsForScanId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentListScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentListScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_ListByScan" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListSystemDatabaseSQLVulnerabilityAssessmentScanResults [Ignore("Only validating compilation of examples")] public async Task Exists_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultF [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs index 3aebc87bcee3..c928b8039e74 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerSqlVulnerabilityAssessmentScanResultResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerSqlVulnerabilityAssessmentScanResultResourc [Ignore("Only validating compilation of examples")] public async Task Get_GetASystemDatabaseSQLVulnerabilityAssessmentScanResultForScanIdAndScanResultId() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SqlVulnerabilityAssessmentScansResults.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SqlVulnerabilityAssessmentScansResults.json // this example is just showing the usage of "SqlVulnerabilityAssessmentScanResult_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupCollection.cs index 551672f22a02..127f9de528d6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SqlServerTrustGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupCreate.json // this example is just showing the usage of "ServerTrustGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateServerTrustGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupGet.json // this example is just showing the usage of "ServerTrustGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerTrustGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListServerTrustGroups() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupList.json // this example is just showing the usage of "ServerTrustGroups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListServerTrustGroups() [Ignore("Only validating compilation of examples")] public async Task Exists_GetServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupGet.json // this example is just showing the usage of "ServerTrustGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerTrustGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupGet.json // this example is just showing the usage of "ServerTrustGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupResource.cs index 9d76406d0078..9d7318edf3fd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerTrustGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerTrustGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupGet.json // this example is just showing the usage of "ServerTrustGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetServerTrustGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DropServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupDelete.json // this example is just showing the usage of "ServerTrustGroups_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_DropServerTrustGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateServerTrustGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerTrustGroupCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerTrustGroupCreate.json // this example is just showing the usage of "ServerTrustGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleCollection.cs index 3abd963e5069..5d7efe182369 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerVirtualNetworkRuleCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json // this example is just showing the usage of "VirtualNetworkRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateOrUpdateAVirtualNetworkRule() [Ignore("Only validating compilation of examples")] public async Task Get_GetsAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesGet.json // this example is just showing the usage of "VirtualNetworkRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAVirtualNetworkRule() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkRules() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesList.json // this example is just showing the usage of "VirtualNetworkRules_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetAll_ListVirtualNetworkRules() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesGet.json // this example is just showing the usage of "VirtualNetworkRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAVirtualNetworkRule() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesGet.json // this example is just showing the usage of "VirtualNetworkRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleResource.cs index 753ea98678a6..38ac31d498cd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVirtualNetworkRuleResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlServerVirtualNetworkRuleResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesGet.json // this example is just showing the usage of "VirtualNetworkRules_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAVirtualNetworkRule() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesDelete.json // this example is just showing the usage of "VirtualNetworkRules_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_DeleteAVirtualNetworkRule() [Ignore("Only validating compilation of examples")] public async Task Update_CreateOrUpdateAVirtualNetworkRule() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualNetworkRulesCreateOrUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualNetworkRulesCreateOrUpdate.json // this example is just showing the usage of "VirtualNetworkRules_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentCollection.cs index b488229c1ac1..09efc97b1ba2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerVulnerabilityAssessmentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAServerSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAServerSVulnerabilityAssessmentWithAllPar [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAServerSVulnerabilityAssessmentWithMinima [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAServerSVulnerabilityAssessmentWithMinima [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json // this example is just showing the usage of "ServerVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetAServerSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAServerSVulnerabilityAssessmentPolicies() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentListByServer.json // this example is just showing the usage of "ServerVulnerabilityAssessments_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -217,7 +217,7 @@ public async Task GetAll_GetAServerSVulnerabilityAssessmentPolicies() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAServerSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json // this example is just showing the usage of "ServerVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task Exists_GetAServerSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAServerSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json // this example is just showing the usage of "ServerVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentResource.cs index 314bbd84d8b9..994b724e53b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlServerVulnerabilityAssessmentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlServerVulnerabilityAssessmentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAServerSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentGet.json // this example is just showing the usage of "ServerVulnerabilityAssessments_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetAServerSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Delete_RemoveAServerSVulnerabilityAssessment() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentDelete.json // this example is just showing the usage of "ServerVulnerabilityAssessments_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_RemoveAServerSVulnerabilityAssessment() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAServerSVulnerabilityAssessmentWithAllParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateMax.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAServerSVulnerabilityAssessmentWithAllParameters( [Ignore("Only validating compilation of examples")] public async Task Update_CreateAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_CreateAServerSVulnerabilityAssessmentWithMinimalParamet [Ignore("Only validating compilation of examples")] public async Task Update_CreateAServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json // this example is just showing the usage of "ServerVulnerabilityAssessments_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneCollection.cs index 4735434e1c45..d5e476910e35 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SqlTimeZoneCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceTimeZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTimeZoneGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTimeZoneGet.json // this example is just showing the usage of "TimeZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetManagedInstanceTimeZone() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListManagedInstanceTimeZonesByLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTimeZoneListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTimeZoneListByLocation.json // this example is just showing the usage of "TimeZones_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListManagedInstanceTimeZonesByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetManagedInstanceTimeZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTimeZoneGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTimeZoneGet.json // this example is just showing the usage of "TimeZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetManagedInstanceTimeZone() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetManagedInstanceTimeZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTimeZoneGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTimeZoneGet.json // this example is just showing the usage of "TimeZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneResource.cs index bc22858e505a..300924fc3516 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SqlTimeZoneResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SqlTimeZoneResource [Ignore("Only validating compilation of examples")] public async Task Get_GetManagedInstanceTimeZone() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceTimeZoneGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceTimeZoneGet.json // this example is just showing the usage of "TimeZones_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupCollection.cs index 731d03fd1d5e..52303e597647 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionLongTermRetentionBackupCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupListByDatabase.json // this example is just showing the usage of "LongTermRetentionBackups_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupResource.cs index cd6872fbad01..0e881b4521dc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionLongTermRetentionBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupDelete.json // this example is just showing the usage of "LongTermRetentionBackups_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_DeleteTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task ChangeAccessTier_ChangeTheLongTermRetentionBackupStorageAccessTier() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ChangeLongTermRetentionBackupAccessTier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ChangeLongTermRetentionBackupAccessTier.json // this example is just showing the usage of "LongTermRetentionBackups_ChangeAccessTier" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 ChangeAccessTier_ChangeTheLongTermRetentionBackupStorageAccess [Ignore("Only validating compilation of examples")] public async Task Copy_CopyTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupCopy.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupCopy.json // this example is just showing the usage of "LongTermRetentionBackups_Copy" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Copy_CopyTheLongTermRetentionBackup() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupUpdate.json // this example is just showing the usage of "LongTermRetentionBackups_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs index 391a0e99af65..9d17c06cc4c9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionLongTermRetentionManagedInstanceBackupCo [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackupOfAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackupOfAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByDatabase.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_GetAllLongTermRetentionBackupsUnderTheDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetTheLongTermRetentionBackupOfAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetTheLongTermRetentionBackupOfAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetTheLongTermRetentionBackupOfAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupResource.cs index 98c3fece8903..2a13dfb1d24e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionLongTermRetentionManagedInstanceBackupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionLongTermRetentionManagedInstanceBackupRe [Ignore("Only validating compilation of examples")] public async Task Get_GetTheLongTermRetentionBackupOfAManagedDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupGet.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheLongTermRetentionBackupOfAManagedDatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteTheLongTermRetentionBackup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupDelete.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 4511b815834e..d09d48c64d9c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -22,7 +22,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetDeletedServers_ListDeletedServersInASubscription() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeletedServerListBySubscription.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeletedServerListBySubscription.json // this example is just showing the usage of "DeletedServers_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 @@ -53,7 +53,7 @@ public async Task GetDeletedServers_ListDeletedServersInASubscription() [Ignore("Only validating compilation of examples")] public async Task GetInstancePools_ListInstancePoolsInTheSubscription() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ListInstancePoolsBySubscriptionId.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ListInstancePoolsBySubscriptionId.json // this example is just showing the usage of "InstancePools_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 @@ -84,7 +84,7 @@ public async Task GetInstancePools_ListInstancePoolsInTheSubscription() [Ignore("Only validating compilation of examples")] public async Task GetCapabilitiesByLocation_ListSubscriptionCapabilitiesInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LocationCapabilityListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LocationCapabilityListByLocation.json // this example is just showing the usage of "Capabilities_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetCapabilitiesByLocation_ListSubscriptionCapabilitiesInTheGiv [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupListByLocation.json // this example is just showing the usage of "LongTermRetentionBackups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionBackupsWithLocation_GetAllLongTermRetentio [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionBackupsUnderTheServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/LongTermRetentionBackupListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/LongTermRetentionBackupListByServer.json // this example is just showing the usage of "LongTermRetentionBackups_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -168,7 +168,7 @@ public async Task GetLongTermRetentionBackupsWithServer_GetAllLongTermRetentionB [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocationWithMaximalParameters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocationMax.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 +198,7 @@ public async Task GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllL [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllLongTermRetentionBackupsUnderTheLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByLocation.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLongTermRetentionManagedInstanceBackupsWithLocation_GetAllL [Ignore("Only validating compilation of examples")] public async Task GetLongTermRetentionManagedInstanceBackupsWithInstance_GetAllLongTermRetentionBackupsUnderTheManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceLongTermRetentionBackupListByInstance.json // this example is just showing the usage of "LongTermRetentionManagedInstanceBackups_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 @@ -258,7 +258,7 @@ public async Task GetLongTermRetentionManagedInstanceBackupsWithInstance_GetAllL [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstances() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceList.json // this example is just showing the usage of "ManagedInstances_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 @@ -289,7 +289,7 @@ public async Task GetManagedInstances_ListManagedInstances() [Ignore("Only validating compilation of examples")] public async Task GetManagedInstances_ListManagedInstancesWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ManagedInstanceListWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ManagedInstanceListWithExpandEqualsAdministrators.json // this example is just showing the usage of "ManagedInstances_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 GetManagedInstances_ListManagedInstancesWithExpandAdministrato [Ignore("Only validating compilation of examples")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyExists() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CheckNameAvailabilityServerAlreadyExists.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CheckNameAvailabilityServerAlreadyExists.json // this example is just showing the usage of "Servers_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 @@ -345,7 +345,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatAlreadyE [Ignore("Only validating compilation of examples")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvailable() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CheckNameAvailabilityServerAvailable.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CheckNameAvailabilityServerAvailable.json // this example is just showing the usage of "Servers_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 @@ -370,7 +370,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsAvaila [Ignore("Only validating compilation of examples")] public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvalid() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CheckNameAvailabilityServerInvalid.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CheckNameAvailabilityServerInvalid.json // this example is just showing the usage of "Servers_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 @@ -395,7 +395,7 @@ public async Task CheckSqlServerNameAvailability_CheckForAServerNameThatIsInvali [Ignore("Only validating compilation of examples")] public async Task GetSqlServers_ListServers() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerList.json // this example is just showing the usage of "Servers_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 @@ -426,7 +426,7 @@ public async Task GetSqlServers_ListServers() [Ignore("Only validating compilation of examples")] public async Task GetSqlServers_ListServersWithExpandAdministratorsActivedirectory() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/ServerListWithExpandEqualsAdministrators.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/ServerListWithExpandEqualsAdministrators.json // this example is just showing the usage of "Servers_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 @@ -457,7 +457,7 @@ public async Task GetSqlServers_ListServersWithExpandAdministratorsActivedirecto [Ignore("Only validating compilation of examples")] public async Task GetSyncDatabaseIdsSyncGroups_GetASyncDatabaseID() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGetSyncDatabaseId.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGetSyncDatabaseId.json // this example is just showing the usage of "SyncGroups_ListSyncDatabaseIds" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -485,7 +485,7 @@ public async Task GetSyncDatabaseIdsSyncGroups_GetASyncDatabaseID() [Ignore("Only validating compilation of examples")] public async Task GetVirtualClusters_ListVirtualClusters() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterList.json // this example is just showing the usage of "VirtualClusters_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/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageCollection.cs index ace0d5a88bb8..e086812cd9dd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionUsageCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetSpecificSubscriptionUsageInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SubscriptionUsageGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SubscriptionUsageGet.json // this example is just showing the usage of "SubscriptionUsages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetSpecificSubscriptionUsageInTheGivenLocation() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSubscriptionUsagesInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SubscriptionUsageListByLocation.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SubscriptionUsageListByLocation.json // this example is just showing the usage of "SubscriptionUsages_ListByLocation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListSubscriptionUsagesInTheGivenLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetSpecificSubscriptionUsageInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SubscriptionUsageGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SubscriptionUsageGet.json // this example is just showing the usage of "SubscriptionUsages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetSpecificSubscriptionUsageInTheGivenLocation() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetSpecificSubscriptionUsageInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SubscriptionUsageGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SubscriptionUsageGet.json // this example is just showing the usage of "SubscriptionUsages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageResource.cs index 7dfc62b92dd6..074eb87fd52d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SubscriptionUsageResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionUsageResource [Ignore("Only validating compilation of examples")] public async Task Get_GetSpecificSubscriptionUsageInTheGivenLocation() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SubscriptionUsageGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SubscriptionUsageGet.json // this example is just showing the usage of "SubscriptionUsages_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentCollection.cs index a005d777137c..782deeff5d83 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SyncAgentCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewSyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentCreate.json // this example is just showing the usage of "SyncAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateANewSyncAgent() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentUpdate.json // this example is just showing the usage of "SyncAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateASyncAgent() [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGet.json // this example is just showing the usage of "SyncAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetASyncAgent() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetSyncAgentsUnderAServer() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentListByServer.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentListByServer.json // this example is just showing the usage of "SyncAgents_ListByServer" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +167,7 @@ public async Task GetAll_GetSyncAgentsUnderAServer() [Ignore("Only validating compilation of examples")] public async Task Exists_GetASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGet.json // this example is just showing the usage of "SyncAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncAgent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGet.json // this example is just showing the usage of "SyncAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentResource.cs index a91746e74ef3..51e6dee9ff2a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncAgentResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SyncAgentResource [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGet.json // this example is just showing the usage of "SyncAgents_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncAgent() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentDelete.json // this example is just showing the usage of "SyncAgents_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_DeleteASyncAgent() [Ignore("Only validating compilation of examples")] public async Task Update_CreateANewSyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentCreate.json // this example is just showing the usage of "SyncAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateANewSyncAgent() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateASyncAgent() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentUpdate.json // this example is just showing the usage of "SyncAgents_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Update_UpdateASyncAgent() [Ignore("Only validating compilation of examples")] public async Task GenerateKey_GenerateASyncAgentKey() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGenerateKey.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGenerateKey.json // this example is just showing the usage of "SyncAgents_GenerateKey" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GenerateKey_GenerateASyncAgentKey() [Ignore("Only validating compilation of examples")] public async Task GetLinkedDatabases_GetSyncAgentLinkedDatabases() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncAgentGetLinkedDatabases.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncAgentGetLinkedDatabases.json // this example is just showing the usage of "SyncAgents_ListLinkedDatabases" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupCollection.cs index 2baf77e200bc..ef8063f238b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SyncGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupCreate.json // this example is just showing the usage of "SyncGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateASyncGroup() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupUpdate.json // this example is just showing the usage of "SyncGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateASyncGroup() [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGet.json // this example is just showing the usage of "SyncGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncGroup() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSyncGroupsUnderAGivenDatabase() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupListByDatabase.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupListByDatabase.json // this example is just showing the usage of "SyncGroups_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_ListSyncGroupsUnderAGivenDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_GetASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGet.json // this example is just showing the usage of "SyncGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetASyncGroup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGet.json // this example is just showing the usage of "SyncGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupResource.cs index 3b8a68c73c20..4ed6ee090ae6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncGroupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SyncGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGet.json // this example is just showing the usage of "SyncGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncGroup() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupDelete.json // this example is just showing the usage of "SyncGroups_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_DeleteASyncGroup() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupPatch.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupPatch.json // this example is just showing the usage of "SyncGroups_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 @@ -122,7 +122,7 @@ public async Task Update_UpdateASyncGroup() [Ignore("Only validating compilation of examples")] public async Task CancelSync_CancelASyncGroupSynchronization() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupCancelSync.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupCancelSync.json // this example is just showing the usage of "SyncGroups_CancelSync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CancelSync_CancelASyncGroupSynchronization() [Ignore("Only validating compilation of examples")] public async Task GetHubSchemas_GetAHubDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGetHubSchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGetHubSchema.json // this example is just showing the usage of "SyncGroups_ListHubSchemas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetHubSchemas_GetAHubDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetLogs_GetSyncGroupLogs() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupGetLog.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupGetLog.json // this example is just showing the usage of "SyncGroups_ListLogs" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetLogs_GetSyncGroupLogs() [Ignore("Only validating compilation of examples")] public async Task RefreshHubSchema_RefreshAHubDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupRefreshHubSchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupRefreshHubSchema.json // this example is just showing the usage of "SyncGroups_RefreshHubSchema" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -243,7 +243,7 @@ public async Task RefreshHubSchema_RefreshAHubDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task TriggerSync_TriggerASyncGroupSynchronization() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncGroupTriggerSync.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncGroupTriggerSync.json // this example is just showing the usage of "SyncGroups_TriggerSync" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberCollection.cs index 23ff2f8deaa9..4efcf1e24fe2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SyncMemberCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateANewSyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberCreate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberCreate.json // this example is just showing the usage of "SyncMembers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateANewSyncMember() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_UpdateASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberUpdate.json // this example is just showing the usage of "SyncMembers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 CreateOrUpdate_UpdateASyncMember() [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberGet.json // this example is just showing the usage of "SyncMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetASyncMember() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListSyncMembersUnderASyncGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberListBySyncGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberListBySyncGroup.json // this example is just showing the usage of "SyncMembers_ListBySyncGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 GetAll_ListSyncMembersUnderASyncGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberGet.json // this example is just showing the usage of "SyncMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncMember() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberGet.json // this example is just showing the usage of "SyncMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberResource.cs index a6c40ecbc6b3..a17ec36985a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_SyncMemberResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SyncMemberResource [Ignore("Only validating compilation of examples")] public async Task Get_GetASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberGet.json // this example is just showing the usage of "SyncMembers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetASyncMember() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteASyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberDelete.json // this example is just showing the usage of "SyncMembers_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 @@ -82,7 +82,7 @@ public async Task Delete_DeleteASyncMember() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateAnExistingSyncMember() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberPatch.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberPatch.json // this example is just showing the usage of "SyncMembers_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 @@ -126,7 +126,7 @@ public async Task Update_UpdateAnExistingSyncMember() [Ignore("Only validating compilation of examples")] public async Task RefreshMemberSchema_RefreshASyncMemberDatabaseSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberRefreshSchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberRefreshSchema.json // this example is just showing the usage of "SyncMembers_RefreshMemberSchema" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 RefreshMemberSchema_RefreshASyncMemberDatabaseSchema() [Ignore("Only validating compilation of examples")] public async Task GetMemberSchemas_GetASyncMemberSchema() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/SyncMemberGetSchema.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/SyncMemberGetSchema.json // this example is just showing the usage of "SyncMembers_ListMemberSchemas" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterCollection.cs index beaf9c882505..077b4b0db3f2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualClusterCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetsAVirtualCluster() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterGet.json // this example is just showing the usage of "VirtualClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAVirtualCluster() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualClustersByResourceGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterListByResourceGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterListByResourceGroup.json // this example is just showing the usage of "VirtualClusters_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 @@ -88,7 +88,7 @@ public async Task GetAll_ListVirtualClustersByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAVirtualCluster() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterGet.json // this example is just showing the usage of "VirtualClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Exists_GetsAVirtualCluster() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAVirtualCluster() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterGet.json // this example is just showing the usage of "VirtualClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterResource.cs index e70aa985397d..9a09ba4c3b34 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_VirtualClusterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_VirtualClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAVirtualCluster() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterGet.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterGet.json // this example is just showing the usage of "VirtualClusters_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAVirtualCluster() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualCluster() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterDelete.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterDelete.json // this example is just showing the usage of "VirtualClusters_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_DeleteVirtualCluster() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateVirtualClusterWithTags() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/VirtualClusterUpdate.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/VirtualClusterUpdate.json // this example is just showing the usage of "VirtualClusters_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Update_UpdateVirtualClusterWithTags() [Ignore("Only validating compilation of examples")] public async Task UpdateDnsServers_PerformsUpdateOfDnsServersOnManagedInstance() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/UpdateVirtualClusterDnsServers.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/UpdateVirtualClusterDnsServers.json // this example is just showing the usage of "VirtualClusters_UpdateDnsServers" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierCollection.cs index 8dff021d22bb..3f9c7bb35ae3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkloadClassifierCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAWorkloadGroupWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadClassifierMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json // this example is just showing the usage of "WorkloadClassifiers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAWorkloadGroupWithAllPropertiesSpecified( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAWorkloadGroupWithTheRequiredPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadClassifierMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json // this example is just showing the usage of "WorkloadClassifiers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAWorkloadGroupWithTheRequiredPropertiesSp [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWorkloadClassifierForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadClassifier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadClassifier.json // this example is just showing the usage of "WorkloadClassifiers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAWorkloadClassifierForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheListOfWorkloadClassifiersForAWorkloadGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadClassifierList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadClassifierList.json // this example is just showing the usage of "WorkloadClassifiers_ListByWorkloadGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheListOfWorkloadClassifiersForAWorkloadGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAWorkloadClassifierForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadClassifier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadClassifier.json // this example is just showing the usage of "WorkloadClassifiers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAWorkloadClassifierForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAWorkloadClassifierForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadClassifier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadClassifier.json // this example is just showing the usage of "WorkloadClassifiers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierResource.cs index c46f12ba401d..3249e5856f7f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadClassifierResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkloadClassifierResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWorkloadClassifierForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadClassifier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadClassifier.json // this example is just showing the usage of "WorkloadClassifiers_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAWorkloadClassifierForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAWorkloadClassifier() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteWorkloadClassifier.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteWorkloadClassifier.json // this example is just showing the usage of "WorkloadClassifiers_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_DeleteAWorkloadClassifier() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAWorkloadGroupWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadClassifierMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMax.json // this example is just showing the usage of "WorkloadClassifiers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAWorkloadGroupWithAllPropertiesSpecified() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAWorkloadGroupWithTheRequiredPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadClassifierMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadClassifierMin.json // this example is just showing the usage of "WorkloadClassifiers_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupCollection.cs index 6759a1fdd41f..99aed5ea3f94 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkloadGroupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAWorkloadGroupWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadGroupMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json // this example is just showing the usage of "WorkloadGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAWorkloadGroupWithAllPropertiesSpecified( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAWorkloadGroupWithTheRequiredPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadGroupMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json // this example is just showing the usage of "WorkloadGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_CreateAWorkloadGroupWithTheRequiredPropertiesSp [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWorkloadGroupForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadGroup.json // this example is just showing the usage of "WorkloadGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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 Get_GetsAWorkloadGroupForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetTheListOfWorkloadGroupsForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadGroupList.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadGroupList.json // this example is just showing the usage of "WorkloadGroups_ListByDatabase" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetTheListOfWorkloadGroupsForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task Exists_GetsAWorkloadGroupForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadGroup.json // this example is just showing the usage of "WorkloadGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAWorkloadGroupForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetsAWorkloadGroupForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadGroup.json // this example is just showing the usage of "WorkloadGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupResource.cs index 54b4fb4e3a66..86030943fcde 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/samples/Generated/Samples/Sample_WorkloadGroupResource.cs @@ -19,7 +19,7 @@ public partial class Sample_WorkloadGroupResource [Ignore("Only validating compilation of examples")] public async Task Get_GetsAWorkloadGroupForADataWarehouse() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/GetWorkloadGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/GetWorkloadGroup.json // this example is just showing the usage of "WorkloadGroups_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details 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_GetsAWorkloadGroupForADataWarehouse() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAWorkloadGroup() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteWorkloadGroup.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/DeleteWorkloadGroup.json // this example is just showing the usage of "WorkloadGroups_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_DeleteAWorkloadGroup() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAWorkloadGroupWithAllPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadGroupMax.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadGroupMax.json // this example is just showing the usage of "WorkloadGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Update_CreateAWorkloadGroupWithAllPropertiesSpecified() [Ignore("Only validating compilation of examples")] public async Task Update_CreateAWorkloadGroupWithTheRequiredPropertiesSpecified() { - // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/CreateOrUpdateWorkloadGroupMin.json + // Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/preview/2024-05-01-preview/examples/CreateOrUpdateWorkloadGroupMin.json // this example is just showing the usage of "WorkloadGroups_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj index 3dcd369d9976..ebe16357e451 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Azure.ResourceManager.Sql.csproj @@ -1,6 +1,6 @@ - 1.4.0-beta.1 + 1.4.0-beta.2 1.3.0 Azure.ResourceManager.Sql diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ArmSqlModelFactory.cs new file mode 100644 index 000000000000..c54953a46912 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/ArmSqlModelFactory.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.Sql.Models +{ + public static partial class ArmSqlModelFactory + { + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Resource kind. + /// Resource location. + /// Gets the reason for recommending this action. e.g., DuplicateIndex. + /// Gets the time since when this recommended action is valid. + /// Gets time when this recommended action was last refreshed. + /// Gets the info of the current state the recommended action is in. + /// Gets if this recommended action is actionable by user. + /// Gets if changes applied by this recommended action can be reverted by user. + /// Gets if this recommended action was suggested some time ago but user chose to ignore this and system added a new recommended action again. + /// Gets the time when system started applying this recommended action on the user resource. e.g., index creation start time. + /// Gets the time taken for applying this recommended action on user resource. e.g., time taken for index creation. + /// Gets the time when system started reverting changes of this recommended action on user resource. e.g., time when index drop is executed. + /// Gets the time taken for reverting changes of this recommended action on user resource. e.g., time taken for dropping the created index. + /// Gets if approval for applying this recommended action was given by user/system. + /// Gets the time when this recommended action was approved for execution. + /// Gets if approval for reverting this recommended action was given by user/system. + /// Gets the time when this recommended action was approved for revert. + /// Gets the impact of this recommended action. Possible values are 1 - Low impact, 2 - Medium Impact and 3 - High Impact. + /// Gets the implementation details of this recommended action for user to apply it manually. + /// Gets the error details if and why this recommended action is put to error state. + /// Gets the estimated impact info for this recommended action e.g., Estimated CPU gain, Estimated Disk Space change. + /// Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change. + /// Gets the time series info of metrics for this recommended action e.g., CPU consumption time series. + /// Gets the linked objects, if any. + /// Gets additional details specific to this recommended action. + /// A new instance for mocking. + public static RecommendedActionData RecommendedActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, string recommendationReason = null, DateTimeOffset? validSince = null, DateTimeOffset? lastRefresh = null, RecommendedActionStateInfo state = null, bool? isExecutableAction = null, bool? isRevertableAction = null, bool? isArchivedAction = null, DateTimeOffset? executeActionStartOn = null, TimeSpan? executeActionDuration = null, DateTimeOffset? revertActionStartOn = null, TimeSpan? revertActionDuration = null, RecommendedActionInitiatedBy? executeActionInitiatedBy = null, DateTimeOffset? executeActionInitiatedOn = null, RecommendedActionInitiatedBy? revertActionInitiatedBy = null, DateTimeOffset? revertActionInitiatedOn = null, int? score = null, RecommendedActionImplementationInfo implementationDetails = null, RecommendedActionErrorInfo errorDetails = null, IEnumerable estimatedImpact = null, IEnumerable observedImpact = null, IEnumerable timeSeries = null, IEnumerable linkedObjects = null, IReadOnlyDictionary additionalDetails = null) + { + estimatedImpact ??= new List(); + observedImpact ??= new List(); + timeSeries ??= new List(); + linkedObjects ??= new List(); + additionalDetails ??= new Dictionary(); + + return new RecommendedActionData( + id, + name, + resourceType, + systemData, + kind, + location, + recommendationReason, + validSince, + lastRefresh, + state, + isExecutableAction, + isRevertableAction, + isArchivedAction, + executeActionStartOn, + executeActionDuration, + revertActionStartOn, + revertActionDuration, + executeActionInitiatedBy, + executeActionInitiatedOn, + revertActionInitiatedBy, + revertActionInitiatedOn, + score, + implementationDetails, + errorDetails, + estimatedImpact?.ToList(), + observedImpact?.ToList(), + timeSeries?.ToList(), + linkedObjects?.ToList(), + additionalDetails.ToDictionary(kvp => kvp.Key, + kvp => BinaryData.FromString(kvp.Value)), + serializedAdditionalRawData: null); + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseExportDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseExportDefinition.cs new file mode 100644 index 000000000000..599c6a3eb9f2 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseExportDefinition.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; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DatabaseExportDefinition + { + /// Initializes a new instance of . + /// Storage key type. + /// Storage key. + /// Storage Uri. + /// Administrator login name. + /// Administrator login password. + /// , , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public DatabaseExportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + { + Argument.AssertNotNull(storageKey, nameof(storageKey)); + Argument.AssertNotNull(storageUri, nameof(storageUri)); + Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); + Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); + + StorageKeyType = storageKeyType; + StorageKey = storageKey; + StorageUri = storageUri; + AdministratorLogin = administratorLogin; + AdministratorLoginPassword = administratorLoginPassword; + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseImportDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseImportDefinition.cs new file mode 100644 index 000000000000..3a3a1b41be63 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseImportDefinition.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class DatabaseImportDefinition + { + /// Initializes a new instance of . + /// Storage key type. + /// Storage key. + /// Storage Uri. + /// Administrator login name. + /// Administrator login password. + /// , , or is null. + public DatabaseImportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + { + Argument.AssertNotNull(storageKey, nameof(storageKey)); + Argument.AssertNotNull(storageUri, nameof(storageUri)); + Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); + Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); + + StorageKeyType = storageKeyType; + StorageKey = storageKey; + StorageUri = storageUri; + AdministratorLogin = administratorLogin; + AdministratorLoginPassword = administratorLoginPassword; + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseOperationPhase.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseOperationPhase.cs new file mode 100644 index 000000000000..e10ee7bed7c5 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/DatabaseOperationPhase.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + public readonly partial struct DatabaseOperationPhase + { + private const string BuildingHyperscaleComponentsValue = "BuildingHyperscaleComponents"; + private const string LogTransitionInProgressValue = "LogTransitionInProgress"; + + /// LogTransitionInProgress. + public static DatabaseOperationPhase LogTransitionInProgress { get; } = new DatabaseOperationPhase(LogTransitionInProgressValue); + /// BuildingHyperscaleComponents. + public static DatabaseOperationPhase BuildingHyperscaleComponents { get; } = new DatabaseOperationPhase(BuildingHyperscaleComponentsValue); + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ImportExistingDatabaseDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ImportExistingDatabaseDefinition.cs new file mode 100644 index 000000000000..523ea2cf550b --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/Models/ImportExistingDatabaseDefinition.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; +using System.ComponentModel; + +namespace Azure.ResourceManager.Sql.Models +{ + public partial class ImportExistingDatabaseDefinition + { + /// Initializes a new instance of . + /// Storage key type. + /// Storage key. + /// Storage Uri. + /// Administrator login name. + /// Administrator login password. + /// , , or is null. + [EditorBrowsable(EditorBrowsableState.Never)] + public ImportExistingDatabaseDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + { + Argument.AssertNotNull(storageKey, nameof(storageKey)); + Argument.AssertNotNull(storageUri, nameof(storageUri)); + Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); + Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); + + StorageKeyType = storageKeyType; + StorageKey = storageKey; + StorageUri = storageUri; + AdministratorLogin = administratorLogin; + AdministratorLoginPassword = administratorLoginPassword; + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecommendedActionData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecommendedActionData.cs index 7fa749698363..7fd6da122b4a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecommendedActionData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Custom/RecommendedActionData.cs @@ -47,12 +47,19 @@ public partial class RecommendedActionData /// [EditorBrowsable(EditorBrowsableState.Never)] public IReadOnlyDictionary Details + { + get => ActionDetails; + } + + /// Gets additional details specific to this recommended action. + [WirePath("properties.details")] + public IReadOnlyDictionary AdditionalDetails { get { - return AdditionalDetails.ToDictionary( + return ActionDetails.ToDictionary( kvp => kvp.Key, - kvp => BinaryData.FromString(kvp.Value) + kvp => kvp.Value.ToString() ?? string.Empty ); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs index 47ad63548e09..5d60da693175 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ArmSqlModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -736,15 +737,15 @@ public static SqlAdvisorData SqlAdvisorData(ResourceIdentifier id = null, string /// Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change. /// Gets the time series info of metrics for this recommended action e.g., CPU consumption time series. /// Gets the linked objects, if any. - /// Gets additional details specific to this recommended action. + /// Gets additional details specific to this recommended action. /// A new instance for mocking. - public static RecommendedActionData RecommendedActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, string recommendationReason = null, DateTimeOffset? validSince = null, DateTimeOffset? lastRefresh = null, RecommendedActionStateInfo state = null, bool? isExecutableAction = null, bool? isRevertableAction = null, bool? isArchivedAction = null, DateTimeOffset? executeActionStartOn = null, TimeSpan? executeActionDuration = null, DateTimeOffset? revertActionStartOn = null, TimeSpan? revertActionDuration = null, RecommendedActionInitiatedBy? executeActionInitiatedBy = null, DateTimeOffset? executeActionInitiatedOn = null, RecommendedActionInitiatedBy? revertActionInitiatedBy = null, DateTimeOffset? revertActionInitiatedOn = null, int? score = null, RecommendedActionImplementationInfo implementationDetails = null, RecommendedActionErrorInfo errorDetails = null, IEnumerable estimatedImpact = null, IEnumerable observedImpact = null, IEnumerable timeSeries = null, IEnumerable linkedObjects = null, IReadOnlyDictionary additionalDetails = null) + public static RecommendedActionData RecommendedActionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kind = null, AzureLocation? location = null, string recommendationReason = null, DateTimeOffset? validSince = null, DateTimeOffset? lastRefresh = null, RecommendedActionStateInfo state = null, bool? isExecutableAction = null, bool? isRevertableAction = null, bool? isArchivedAction = null, DateTimeOffset? executeActionStartOn = null, TimeSpan? executeActionDuration = null, DateTimeOffset? revertActionStartOn = null, TimeSpan? revertActionDuration = null, RecommendedActionInitiatedBy? executeActionInitiatedBy = null, DateTimeOffset? executeActionInitiatedOn = null, RecommendedActionInitiatedBy? revertActionInitiatedBy = null, DateTimeOffset? revertActionInitiatedOn = null, int? score = null, RecommendedActionImplementationInfo implementationDetails = null, RecommendedActionErrorInfo errorDetails = null, IEnumerable estimatedImpact = null, IEnumerable observedImpact = null, IEnumerable timeSeries = null, IEnumerable linkedObjects = null, IReadOnlyDictionary actionDetails = null) { estimatedImpact ??= new List(); observedImpact ??= new List(); timeSeries ??= new List(); linkedObjects ??= new List(); - additionalDetails ??= new Dictionary(); + actionDetails ??= new Dictionary(); return new RecommendedActionData( id, @@ -775,7 +776,7 @@ public static RecommendedActionData RecommendedActionData(ResourceIdentifier id observedImpact?.ToList(), timeSeries?.ToList(), linkedObjects?.ToList(), - additionalDetails, + actionDetails, serializedAdditionalRawData: null); } @@ -956,12 +957,12 @@ public static PrivateEndpointConnectionRequestStatus PrivateEndpointConnectionRe /// The resourceType. /// The systemData. /// Operation mode of the operation: Import, Export, or PolybaseImport. - /// Storage key type: StorageAccessKey or SharedAccessKey. - /// Storage key for the storage account. + /// Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri for the storage account. - /// Administrator login name. - /// Administrator login password. - /// Authentication type: SQL authentication or AD password. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Authentication type used to access the SQL: Sql, ADPassword or ManagedIdentity. /// Database edition for the newly created database in the case of an import operation. /// Database service level objective for the newly created database in the case of an import operation. /// Database max size in bytes for the newly created database in the case of an import operation. @@ -1892,12 +1893,12 @@ public static SqlDatabasePatch SqlDatabasePatch(SqlSku sku = null, DatabaseIdent } /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// A new instance for mocking. public static DatabaseExportDefinition DatabaseExportDefinition(StorageKeyType storageKeyType = default, string storageKey = null, Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, NetworkIsolationSettings networkIsolation = null) @@ -1952,12 +1953,12 @@ public static ImportExportOperationResult ImportExportOperationResult(ResourceId } /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// A new instance for mocking. public static ImportExistingDatabaseDefinition ImportExistingDatabaseDefinition(StorageKeyType storageKeyType = default, string storageKey = null, Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, NetworkIsolationSettings networkIsolation = null) @@ -2477,6 +2478,48 @@ public static InstancePoolPatch InstancePoolPatch(SqlSku sku = null, IDictionary serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the instance pool the operation is being performed on. + /// The name of operation. + /// The friendly name of operation. + /// The percentage of the operation completed. + /// The operation start time. + /// The operation state. + /// The operation error code. + /// The operation error description. + /// The operation error severity. + /// Error type (e.g. None, User). + /// The estimated completion time of the operation. + /// The operation description. + /// Whether the operation can be cancelled. + /// A new instance for mocking. + public static SqlInstancePoolOperationData SqlInstancePoolOperationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string instancePoolName = null, string operation = null, string operationFriendlyName = null, int? percentComplete = null, DateTimeOffset? startOn = null, ManagementOperationState? state = null, int? errorCode = null, string errorDescription = null, int? errorSeverity = null, SqlInstancePoolOperationErrorType? errorType = null, DateTimeOffset? estimatedCompleteOn = null, string description = null, bool? isCancellable = null) + { + return new SqlInstancePoolOperationData( + id, + name, + resourceType, + systemData, + instancePoolName, + operation, + operationFriendlyName, + percentComplete, + startOn, + state, + errorCode, + errorDescription, + errorSeverity, + errorType, + estimatedCompleteOn, + description, + isCancellable, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -4447,6 +4490,7 @@ public static ManagedInstanceVulnerabilityAssessmentData ManagedInstanceVulnerab /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -4480,7 +4524,7 @@ public static ManagedInstanceVulnerabilityAssessmentData ManagedInstanceVulnerab /// The managed instance's authentication metadata lookup mode. /// Specifies the internal format of instance databases specific to the SQL engine version. /// A new instance for mocking. - public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, ResourceIdentifier virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, SqlManagedInstancePricingModel? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) + public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, SqlSku sku = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, int? totalMemoryInMB = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, ResourceIdentifier virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, SqlManagedInstancePricingModel? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -4509,6 +4553,7 @@ public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id = nu storageSizeInGB, storageIOps, storageThroughputMBps, + totalMemoryInMB, collation, dnsZone, managedDnsZonePartner, @@ -4582,6 +4627,7 @@ public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -4615,7 +4661,7 @@ public static SqlServicePrincipal SqlServicePrincipal(Guid? principalId = null, /// The managed instance's authentication metadata lookup mode. /// Specifies the internal format of instance databases specific to the SQL engine version. /// A new instance for mocking. - public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, ResourceIdentifier virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, SqlManagedInstancePricingModel? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) + public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku = null, ManagedServiceIdentity identity = null, IDictionary tags = null, ManagedInstancePropertiesProvisioningState? provisioningState = null, ManagedServerCreateMode? managedInstanceCreateMode = null, string fullyQualifiedDomainName = null, bool? isGeneralPurposeV2 = null, string administratorLogin = null, string administratorLoginPassword = null, ResourceIdentifier subnetId = null, string state = null, ManagedInstanceLicenseType? licenseType = null, HybridSecondaryUsage? hybridSecondaryUsage = null, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected = null, int? vCores = null, int? storageSizeInGB = null, int? storageIOps = null, int? storageThroughputMBps = null, int? totalMemoryInMB = null, string collation = null, string dnsZone = null, ResourceIdentifier managedDnsZonePartner = null, bool? isPublicDataEndpointEnabled = null, ResourceIdentifier sourceManagedInstanceId = null, DateTimeOffset? restorePointInTime = null, ManagedInstanceProxyOverride? proxyOverride = null, string timezoneId = null, ResourceIdentifier instancePoolId = null, ResourceIdentifier maintenanceConfigurationId = null, IEnumerable privateEndpointConnections = null, string minimalTlsVersion = null, SqlBackupStorageRedundancy? currentBackupStorageRedundancy = null, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy = null, bool? isZoneRedundant = null, ResourceIdentifier primaryUserAssignedIdentityId = null, Uri keyId = null, ManagedInstanceExternalAdministrator administrators = null, SqlServicePrincipal servicePrincipal = null, ResourceIdentifier virtualClusterId = null, ExternalGovernanceStatus? externalGovernanceStatus = null, SqlManagedInstancePricingModel? pricingModel = null, DateTimeOffset? createOn = null, AuthMetadataLookupMode? authenticationMetadata = null, ManagedInstanceDatabaseFormat? databaseFormat = null) { tags ??= new Dictionary(); privateEndpointConnections ??= new List(); @@ -4639,6 +4685,7 @@ public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku = null, Manag storageSizeInGB, storageIOps, storageThroughputMBps, + totalMemoryInMB, collation, dnsZone, managedDnsZonePartner, @@ -5701,12 +5748,12 @@ public static SqlServerPatch SqlServerPatch(ManagedServiceIdentity identity = nu /// Edition of the import database. /// Service level objective name of the import database. /// Max size in bytes for the import database. - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// A new instance for mocking. public static DatabaseImportDefinition DatabaseImportDefinition(string databaseName = null, string edition = null, string serviceObjectiveName = null, string maxSizeBytes = null, StorageKeyType storageKeyType = default, string storageKey = null, Uri storageUri = null, string administratorLogin = null, string administratorLoginPassword = null, string authenticationType = null, NetworkIsolationSettings networkIsolation = null) @@ -6270,5 +6317,134 @@ public static WorkloadGroupData WorkloadGroupData(ResourceIdentifier id = null, queryExecutionTimeout, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The Azure Active Directory identity of the managed instance. + /// Managed instance SKU. Allowed values for sku.name: GP_Gen5, GP_G8IM, GP_G8IH, BC_Gen5, BC_G8IM, BC_G8IH. + /// Provisioning state of managed instance. + /// + /// Specifies the mode of database creation. + /// Default: Regular instance creation. + /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + /// + /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. + /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). + /// The administrator login password (required for managed instance creation). + /// Subnet resource ID for the managed instance. + /// The state of the managed instance. + /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Collation of the managed instance. + /// The Dns Zone that the managed instance is in. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// Whether or not the public data endpoint is enabled. + /// The resource identifier of the source managed instance associated with create operation of this instance. + /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Connection type used for connecting to the instance. + /// + /// Id of the timezone. Allowed values are timezones supported by Windows. + /// Windows keeps details on supported timezones, including the id, in registry under + /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + /// + /// The Id of the instance pool this managed server belongs to. + /// Specifies maintenance configuration id to apply to this managed instance. + /// List of private endpoint connections on a managed instance. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// Whether or not the multi-az is enabled. + /// The resource id of a user assigned identity to be used by default. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Pricing model of Managed Instance. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedInstanceData ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IEnumerable privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat) + { + return ManagedInstanceData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, identity: identity, sku: sku, provisioningState: provisioningState, managedInstanceCreateMode: managedInstanceCreateMode, fullyQualifiedDomainName: fullyQualifiedDomainName, isGeneralPurposeV2: isGeneralPurposeV2, administratorLogin: administratorLogin, administratorLoginPassword: administratorLoginPassword, subnetId: subnetId, state: state, licenseType: licenseType, hybridSecondaryUsage: hybridSecondaryUsage, hybridSecondaryUsageDetected: hybridSecondaryUsageDetected, vCores: vCores, storageSizeInGB: storageSizeInGB, storageIOps: storageIOps, storageThroughputMBps: storageThroughputMBps, totalMemoryInMB: default, collation: collation, dnsZone: dnsZone, managedDnsZonePartner: managedDnsZonePartner, isPublicDataEndpointEnabled: isPublicDataEndpointEnabled, sourceManagedInstanceId: sourceManagedInstanceId, restorePointInTime: restorePointInTime, proxyOverride: proxyOverride, timezoneId: timezoneId, instancePoolId: instancePoolId, maintenanceConfigurationId: maintenanceConfigurationId, privateEndpointConnections: privateEndpointConnections, minimalTlsVersion: minimalTlsVersion, currentBackupStorageRedundancy: currentBackupStorageRedundancy, requestedBackupStorageRedundancy: requestedBackupStorageRedundancy, isZoneRedundant: isZoneRedundant, primaryUserAssignedIdentityId: primaryUserAssignedIdentityId, keyId: keyId, administrators: administrators, servicePrincipal: servicePrincipal, virtualClusterId: virtualClusterId, externalGovernanceStatus: externalGovernanceStatus, pricingModel: pricingModel, createOn: createOn, authenticationMetadata: authenticationMetadata, databaseFormat: databaseFormat); + } + + /// Initializes a new instance of . + /// Managed instance sku. + /// Managed instance identity. + /// Resource tags. + /// Provisioning state of managed instance. + /// + /// Specifies the mode of database creation. + /// Default: Regular instance creation. + /// Restore: Creates an instance by restoring a set of backups to specific point in time. RestorePointInTime and SourceManagedInstanceId must be specified. + /// + /// The fully qualified domain name of the managed instance. + /// Whether or not this is a GPv2 variant of General Purpose edition. + /// Administrator username for the managed instance. Can only be specified when the managed instance is being created (and is required for creation). + /// The administrator login password (required for managed instance creation). + /// Subnet resource ID for the managed instance. + /// The state of the managed instance. + /// The license type. Possible values are 'LicenseIncluded' (regular price inclusive of a new SQL license) and 'BasePrice' (discounted AHB price for bringing your own SQL licenses). + /// Hybrid secondary usage. Possible values are 'Active' (default value) and 'Passive' (customer uses the secondary as Passive DR). + /// Hybrid secondary usage detected. Possible values are 'Active' (customer does not meet the requirements to use the secondary as Passive DR) and 'Passive' (customer meets the requirements to use the secondary as Passive DR). + /// The number of vCores. Allowed values: 8, 16, 24, 32, 40, 64, 80. + /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. + /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Collation of the managed instance. + /// The Dns Zone that the managed instance is in. + /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. + /// Whether or not the public data endpoint is enabled. + /// The resource identifier of the source managed instance associated with create operation of this instance. + /// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. + /// Connection type used for connecting to the instance. + /// + /// Id of the timezone. Allowed values are timezones supported by Windows. + /// Windows keeps details on supported timezones, including the id, in registry under + /// KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + /// You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM sys.time_zone_info. + /// List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + /// An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + /// + /// The Id of the instance pool this managed server belongs to. + /// Specifies maintenance configuration id to apply to this managed instance. + /// List of private endpoint connections on a managed instance. + /// Minimal TLS version. Allowed values: 'None', '1.0', '1.1', '1.2'. + /// The storage account type used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// The storage account type to be used to store backups for this instance. The options are Local (LocallyRedundantStorage), Zone (ZoneRedundantStorage), Geo (GeoRedundantStorage) and GeoZone(GeoZoneRedundantStorage). + /// Whether or not the multi-az is enabled. + /// The resource id of a user assigned identity to be used by default. + /// A CMK URI of the key to use for encryption. + /// The Azure Active Directory administrator of the instance. This can only be used at instance create time. If used for instance update, it will be ignored or it will result in an error. For updates individual APIs will need to be used. + /// The managed instance's service principal. + /// Virtual cluster resource id for the Managed Instance. + /// Status of external governance. + /// Pricing model of Managed Instance. + /// Specifies the point in time (ISO8601 format) of the Managed Instance creation. + /// The managed instance's authentication metadata lookup mode. + /// Specifies the internal format of instance databases specific to the SQL engine version. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ManagedInstancePatch ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDictionary tags, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IEnumerable privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat) + { + return ManagedInstancePatch(sku: sku, identity: identity, tags: tags, provisioningState: provisioningState, managedInstanceCreateMode: managedInstanceCreateMode, fullyQualifiedDomainName: fullyQualifiedDomainName, isGeneralPurposeV2: isGeneralPurposeV2, administratorLogin: administratorLogin, administratorLoginPassword: administratorLoginPassword, subnetId: subnetId, state: state, licenseType: licenseType, hybridSecondaryUsage: hybridSecondaryUsage, hybridSecondaryUsageDetected: hybridSecondaryUsageDetected, vCores: vCores, storageSizeInGB: storageSizeInGB, storageIOps: storageIOps, storageThroughputMBps: storageThroughputMBps, totalMemoryInMB: default, collation: collation, dnsZone: dnsZone, managedDnsZonePartner: managedDnsZonePartner, isPublicDataEndpointEnabled: isPublicDataEndpointEnabled, sourceManagedInstanceId: sourceManagedInstanceId, restorePointInTime: restorePointInTime, proxyOverride: proxyOverride, timezoneId: timezoneId, instancePoolId: instancePoolId, maintenanceConfigurationId: maintenanceConfigurationId, privateEndpointConnections: privateEndpointConnections, minimalTlsVersion: minimalTlsVersion, currentBackupStorageRedundancy: currentBackupStorageRedundancy, requestedBackupStorageRedundancy: requestedBackupStorageRedundancy, isZoneRedundant: isZoneRedundant, primaryUserAssignedIdentityId: primaryUserAssignedIdentityId, keyId: keyId, administrators: administrators, servicePrincipal: servicePrincipal, virtualClusterId: virtualClusterId, externalGovernanceStatus: externalGovernanceStatus, pricingModel: pricingModel, createOn: createOn, authenticationMetadata: authenticationMetadata, databaseFormat: databaseFormat); + } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyCollection.cs index d1b768401c45..8262cbf28a24 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(ShortTermRet /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ShortTermRetentionPolicyNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ShortTermRetentionPolicyName policyName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.Serialization.cs index 362a309498bd..a5c5c1cbbb1d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class BackupShortTermRetentionPolicyResource : IJsonModel { + private static BackupShortTermRetentionPolicyData s_dataDeserializationInstance; + private static BackupShortTermRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); BackupShortTermRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.cs index 03893642f4c4..05b2bf026e2d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/BackupShortTermRetentionPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyCollection.cs index bab3b715729e..59c0961694ab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -201,7 +201,7 @@ public virtual async Task> GetAsync(DataMask /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response Get(DataMaskingPolicyName dat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task> ExistsAsync(DataMaskingPolicyName data /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -320,7 +320,7 @@ public virtual Response Exists(DataMaskingPolicyName dataMaskingPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.Serialization.cs index 9faa41c94118..c0d422d25307 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class DataMaskingPolicyResource : IJsonModel { + private static DataMaskingPolicyData s_dataDeserializationInstance; + private static DataMaskingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataMaskingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataMaskingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DataMaskingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.cs index 95f8d6a1cd08..b0b9f866f6ea 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataMaskingPolicyResource.cs @@ -108,7 +108,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -148,7 +148,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -236,7 +236,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -310,7 +310,7 @@ public virtual AsyncPageable GetDataMaskingRulesAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -336,7 +336,7 @@ public virtual Pageable GetDataMaskingRules(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -377,7 +377,7 @@ public virtual async Task> CreateOrUpdateDataMaskingRu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityCollection.cs index 570ddd593639..c1dbf3c9d0fe 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(DataWarehouseUser /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -177,7 +177,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> ExistsAsync(DataWarehouseUserActivityN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual Response Exists(DataWarehouseUserActivityName dataWarehouse /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -326,7 +326,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.Serialization.cs index 5698161dacb2..eae5c95b2f03 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class DataWarehouseUserActivityResource : IJsonModel { + private static DataWarehouseUserActivityData s_dataDeserializationInstance; + private static DataWarehouseUserActivityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DataWarehouseUserActivityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DataWarehouseUserActivityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DataWarehouseUserActivityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.cs index e310adceaab8..c44d55de69b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DataWarehouseUserActivityResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionCollection.cs index 10ab82277690..057617e23beb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(AdvancedTh /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.Serialization.cs index 0d8771d5b16a..74fac53fefe7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class DatabaseAdvancedThreatProtectionResource : IJsonModel { + private static DatabaseAdvancedThreatProtectionData s_dataDeserializationInstance; + private static DatabaseAdvancedThreatProtectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseAdvancedThreatProtectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.cs index c2a88db4be34..3f1a33095907 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DatabaseAdvancedThreatProtectionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerCollection.cs index e42abe303d4f..6c4a18843759 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string delet /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string deletedServerName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string deletedServerName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string deletedServerName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.Serialization.cs index 922187327b82..0a77dce6a920 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class DeletedServerResource : IJsonModel { + private static DeletedServerData s_dataDeserializationInstance; + private static DeletedServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DeletedServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.cs index 20d2f1681d80..55b26f86d2d6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/DeletedServerResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> RecoverAsync(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs index 75f502b94069..284b013f0b6c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string elastic /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string elasticPoolName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(long? skip = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(long? skip = null, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string elasticPoolName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string elasticPoolName, CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.Serialization.cs index e2391f0af4fb..059d1eac5af1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ElasticPoolResource : IJsonModel { + private static ElasticPoolData s_dataDeserializationInstance; + private static ElasticPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ElasticPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ElasticPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ElasticPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs index b88c88cc6aad..a87971c78287 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ElasticPoolResource.cs @@ -95,7 +95,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -135,7 +135,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -175,7 +175,7 @@ public virtual Response Get(CancellationToken cancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -351,7 +351,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Ela /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual AsyncPageable GetDatabasesAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -411,7 +411,7 @@ public virtual Pageable GetDatabases(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -437,7 +437,7 @@ public virtual AsyncPageable GetElasticPoolOperationsA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -463,7 +463,7 @@ public virtual Pageable GetElasticPoolOperations(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -498,7 +498,7 @@ public virtual async Task CancelElasticPoolOperationAsync(Guid operati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -533,7 +533,7 @@ public virtual Response CancelElasticPoolOperation(Guid operationId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -575,7 +575,7 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -617,7 +617,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -679,7 +679,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -741,7 +741,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -798,7 +798,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -855,7 +855,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -915,7 +915,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorCollection.cs index 9a0a1b00bd9b..3a9ae5661036 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(Encryp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(EncryptionProtectorName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(EncryptionProtectorName en /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(EncryptionProtectorName encryptionProtector /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.Serialization.cs index 885303620efc..47ccee4aaec7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class EncryptionProtectorResource : IJsonModel { + private static EncryptionProtectorData s_dataDeserializationInstance; + private static EncryptionProtectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); EncryptionProtectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.cs index 56ba5168b789..bddefa1156f3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EncryptionProtectorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Update(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task RevalidateAsync(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs index 0209711d88f7..4b3e2e934023 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string endpointType, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string endpointType, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string endpointType, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.Serialization.cs index 67b507e7ea61..03f9b85a0b47 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class EndpointCertificateResource : IJsonModel { + private static EndpointCertificateData s_dataDeserializationInstance; + private static EndpointCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EndpointCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EndpointCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); EndpointCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs index 829b4b2cd2c1..2c6b648e26f0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/EndpointCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyCollection.cs index 8790aa659fb8..8347d0f25e2c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(BlobAudi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(BlobAuditingPolicyName blo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(BlobAuditingPolicyName blobAuditingPolicyNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.Serialization.cs index 7a2dcede0aa8..f2d68ab52f71 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ExtendedDatabaseBlobAuditingPolicyResource : IJsonModel { + private static ExtendedDatabaseBlobAuditingPolicyData s_dataDeserializationInstance; + private static ExtendedDatabaseBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtendedDatabaseBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtendedDatabaseBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ExtendedDatabaseBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.cs index 12ecf5ee9e56..70dd992e0a72 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedDatabaseBlobAuditingPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyCollection.cs index bc41768ceb75..5e1a60eb8e11 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(BlobAuditi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(BlobAuditingPolicyName blo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(BlobAuditingPolicyName blobAuditingPolicyNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.Serialization.cs index ef77351d820c..76a059bb67f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ExtendedServerBlobAuditingPolicyResource : IJsonModel { + private static ExtendedServerBlobAuditingPolicyData s_dataDeserializationInstance; + private static ExtendedServerBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ExtendedServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ExtendedServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ExtendedServerBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.cs index df3e13041e57..079b8ca873cf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ExtendedServerBlobAuditingPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs index 1136b337bd0d..a23dda13dd19 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlArmClient.cs @@ -599,6 +599,18 @@ public virtual InstancePoolResource GetInstancePoolResource(ResourceIdentifier i return new InstancePoolResource(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 SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(ResourceIdentifier id) + { + SqlInstancePoolOperationResource.ValidateResourceId(id); + return new SqlInstancePoolOperationResource(Client, id); + } + /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs index 9acb4e28e1d6..3e1fc7520f0f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlResourceGroupResource.cs @@ -67,7 +67,7 @@ public virtual InstanceFailoverGroupCollection GetInstanceFailoverGroups(AzureLo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -99,7 +99,7 @@ public virtual async Task> GetInstanceFa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -138,7 +138,7 @@ public virtual InstancePoolCollection GetInstancePools() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual async Task> GetInstancePoolAsync(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual ResourceGroupLongTermRetentionManagedInstanceBackupCollection Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -326,7 +326,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -367,7 +367,7 @@ public virtual ManagedInstanceCollection GetManagedInstances() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual async Task> GetManagedInstanceA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -439,7 +439,7 @@ public virtual SqlServerTrustGroupCollection GetSqlServerTrustGroups(AzureLocati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -471,7 +471,7 @@ public virtual async Task> GetSqlServerTru /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -510,7 +510,7 @@ public virtual SqlServerCollection GetSqlServers() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -542,7 +542,7 @@ public virtual async Task> GetSqlServerAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -581,7 +581,7 @@ public virtual VirtualClusterCollection GetVirtualClusters() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -612,7 +612,7 @@ public virtual async Task> GetVirtualClusterAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -643,7 +643,7 @@ public virtual Response GetVirtualCluster(string virtual /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -672,7 +672,7 @@ public virtual AsyncPageable GetLongTermRetentionBa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -701,7 +701,7 @@ public virtual Pageable GetLongTermRetentionBackups /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -735,7 +735,7 @@ public virtual AsyncPageable GetLongTermRetentionBa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -769,7 +769,7 @@ public virtual Pageable GetLongTermRetentionBackups /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -799,7 +799,7 @@ public virtual AsyncPageable GetLong /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -829,7 +829,7 @@ public virtual Pageable GetLongTermR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -863,7 +863,7 @@ public virtual AsyncPageable GetLong /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs index 6274a909bffa..5be46bb929f4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/MockableSqlSubscriptionResource.cs @@ -97,7 +97,7 @@ public virtual DeletedServerCollection GetDeletedServers(AzureLocation locationN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -129,7 +129,7 @@ public virtual async Task> GetDeletedServerAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -173,7 +173,7 @@ public virtual SubscriptionLongTermRetentionBackupCollection GetSubscriptionLong /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual SubscriptionLongTermRetentionManagedInstanceBackupCollection GetS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -329,7 +329,7 @@ public virtual SubscriptionUsageCollection GetSubscriptionUsages(AzureLocation l /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> GetSubscriptionUs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual SqlTimeZoneCollection GetSqlTimeZones(AzureLocation locationName) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -433,7 +433,7 @@ public virtual async Task> GetSqlTimeZoneAsync(Azu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -465,7 +465,7 @@ public virtual Response GetSqlTimeZone(AzureLocation locati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -495,7 +495,7 @@ public virtual AsyncPageable GetDeletedServersAsync(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -525,7 +525,7 @@ public virtual Pageable GetDeletedServers(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -555,7 +555,7 @@ public virtual AsyncPageable GetInstancePoolsAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -585,7 +585,7 @@ public virtual Pageable GetInstancePools(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -621,7 +621,7 @@ public virtual async Task> GetCapabilitiesByLo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -657,7 +657,7 @@ public virtual Response GetCapabilitiesByLocation(Azure /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -686,7 +686,7 @@ public virtual AsyncPageable GetLongTermRetentionBa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -715,7 +715,7 @@ public virtual Pageable GetLongTermRetentionBackups /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -749,7 +749,7 @@ public virtual AsyncPageable GetLongTermRetentionBa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -783,7 +783,7 @@ public virtual Pageable GetLongTermRetentionBackups /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -813,7 +813,7 @@ public virtual AsyncPageable GetLong /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -843,7 +843,7 @@ public virtual Pageable GetLongTermR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -877,7 +877,7 @@ public virtual AsyncPageable GetLong /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -911,7 +911,7 @@ public virtual Pageable GetLongTermR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -942,7 +942,7 @@ public virtual AsyncPageable GetManagedInstancesAsync(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -973,7 +973,7 @@ public virtual Pageable GetManagedInstances(string expa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1015,7 +1015,7 @@ public virtual async Task> CheckSqlServerN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1057,7 +1057,7 @@ public virtual Response CheckSqlServerNameAvailabil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1088,7 +1088,7 @@ public virtual AsyncPageable GetSqlServersAsync(string expand /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1119,7 +1119,7 @@ public virtual Pageable GetSqlServers(string expand = null, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1150,7 +1150,7 @@ public virtual AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(Azur /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1181,7 +1181,7 @@ public virtual Pageable GetSyncDatabaseIdsSyncGroups(AzureLocation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1211,7 +1211,7 @@ public virtual AsyncPageable GetVirtualClustersAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs index 465575a7a106..69b47c6ed836 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Extensions/SqlExtensions.cs @@ -927,6 +927,25 @@ public static InstancePoolResource GetInstancePoolResource(this ArmClient client return GetMockableSqlArmClient(client).GetInstancePoolResource(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 SqlInstancePoolOperationResource GetSqlInstancePoolOperationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableSqlArmClient(client).GetSqlInstancePoolOperationResource(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. @@ -2440,7 +2459,7 @@ public static InstanceFailoverGroupCollection GetInstanceFailoverGroups(this Res /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2479,7 +2498,7 @@ public static async Task> GetInstanceFai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2535,7 +2554,7 @@ public static InstancePoolCollection GetInstancePools(this ResourceGroupResource /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2573,7 +2592,7 @@ public static async Task> GetInstancePoolAsync(th /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2632,7 +2651,7 @@ public static ResourceGroupLongTermRetentionBackupCollection GetResourceGroupLon /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2673,7 +2692,7 @@ public static async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2735,7 +2754,7 @@ public static ResourceGroupLongTermRetentionManagedInstanceBackupCollection GetR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2776,7 +2795,7 @@ public static async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2834,7 +2853,7 @@ public static ManagedInstanceCollection GetManagedInstances(this ResourceGroupRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2873,7 +2892,7 @@ public static async Task> GetManagedInstanceAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2930,7 +2949,7 @@ public static SqlServerTrustGroupCollection GetSqlServerTrustGroups(this Resourc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2969,7 +2988,7 @@ public static async Task> GetSqlServerTrus /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3025,7 +3044,7 @@ public static SqlServerCollection GetSqlServers(this ResourceGroupResource resou /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3064,7 +3083,7 @@ public static async Task> GetSqlServerAsync(this Res /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3120,7 +3139,7 @@ public static VirtualClusterCollection GetVirtualClusters(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3158,7 +3177,7 @@ public static async Task> GetVirtualClusterAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3196,7 +3215,7 @@ public static Response GetVirtualCluster(this ResourceGr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3231,7 +3250,7 @@ public static AsyncPageable GetLongTermRetentionBac /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3266,7 +3285,7 @@ public static Pageable GetLongTermRetentionBackupsW /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3303,7 +3322,7 @@ public static AsyncPageable GetLongTermRetentionBac /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3340,7 +3359,7 @@ public static Pageable GetLongTermRetentionBackupsW /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3373,7 +3392,7 @@ public static AsyncPageable GetLongT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3406,7 +3425,7 @@ public static Pageable GetLongTermRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3443,7 +3462,7 @@ public static AsyncPageable GetLongT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3498,7 +3517,7 @@ public static DeletedServerCollection GetDeletedServers(this SubscriptionResourc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3537,7 +3556,7 @@ public static async Task> GetDeletedServerAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3597,7 +3616,7 @@ public static SubscriptionLongTermRetentionBackupCollection GetSubscriptionLongT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3638,7 +3657,7 @@ public static async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3700,7 +3719,7 @@ public static SubscriptionLongTermRetentionManagedInstanceBackupCollection GetSu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3741,7 +3760,7 @@ public static async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3800,7 +3819,7 @@ public static SubscriptionUsageCollection GetSubscriptionUsages(this Subscriptio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3839,7 +3858,7 @@ public static async Task> GetSubscriptionUsa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3896,7 +3915,7 @@ public static SqlTimeZoneCollection GetSqlTimeZones(this SubscriptionResource su /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3935,7 +3954,7 @@ public static async Task> GetSqlTimeZoneAsync(this /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3974,7 +3993,7 @@ public static Response GetSqlTimeZone(this SubscriptionReso /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4010,7 +4029,7 @@ public static AsyncPageable GetDeletedServersAsync(this S /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4046,7 +4065,7 @@ public static Pageable GetDeletedServers(this Subscriptio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4082,7 +4101,7 @@ public static AsyncPageable GetInstancePoolsAsync(this Sub /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4118,7 +4137,7 @@ public static Pageable GetInstancePools(this SubscriptionR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4151,7 +4170,7 @@ public static async Task> GetCapabilitiesByLoc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4184,7 +4203,7 @@ public static Response GetCapabilitiesByLocation(this S /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4219,7 +4238,7 @@ public static AsyncPageable GetLongTermRetentionBac /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4254,7 +4273,7 @@ public static Pageable GetLongTermRetentionBackupsW /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4291,7 +4310,7 @@ public static AsyncPageable GetLongTermRetentionBac /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4328,7 +4347,7 @@ public static Pageable GetLongTermRetentionBackupsW /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4361,7 +4380,7 @@ public static AsyncPageable GetLongT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4394,7 +4413,7 @@ public static Pageable GetLongTermRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4431,7 +4450,7 @@ public static AsyncPageable GetLongT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -4468,7 +4487,7 @@ public static Pageable GetLongTermRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4505,7 +4524,7 @@ public static AsyncPageable GetManagedInstancesAsync(th /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4542,7 +4561,7 @@ public static Pageable GetManagedInstances(this Subscri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4578,7 +4597,7 @@ public static async Task> CheckSqlServerNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4614,7 +4633,7 @@ public static Response CheckSqlServerNameAvailabili /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4651,7 +4670,7 @@ public static AsyncPageable GetSqlServersAsync(this Subscript /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4688,7 +4707,7 @@ public static Pageable GetSqlServers(this SubscriptionResourc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4725,7 +4744,7 @@ public static AsyncPageable GetSyncDatabaseIdsSyncGroupsAsync(this /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4762,7 +4781,7 @@ public static Pageable GetSyncDatabaseIdsSyncGroups(this Subscripti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -4798,7 +4817,7 @@ public static AsyncPageable GetVirtualClustersAsync(this /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs index 5c79b2a264fd..a12cb5efe435 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string failo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string failoverGroupName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string failoverGroupName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string failoverGroupName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.Serialization.cs index ce3f05fc0856..36dc8d962bb8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class FailoverGroupResource : IJsonModel { + private static FailoverGroupData s_dataDeserializationInstance; + private static FailoverGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FailoverGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FailoverGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); FailoverGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs index bbf09940255f..c58c5fab2bf5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/FailoverGroupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, F /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task> FailoverAsync(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task> ForceFailoverAllo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -527,7 +527,7 @@ public virtual ArmOperation ForceFailoverAllowDataLoss(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -569,7 +569,7 @@ public virtual async Task> TryPlannedBeforeF /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -611,7 +611,7 @@ public virtual ArmOperation TryPlannedBeforeForcedFailove /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -673,7 +673,7 @@ public virtual async Task> AddTagAsync(string ke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -735,7 +735,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -792,7 +792,7 @@ public virtual async Task> SetTagsAsync(IDiction /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -849,7 +849,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -909,7 +909,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyCollection.cs index 914b200e5673..5ce8fc567aed 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(GeoBackupP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(GeoBackupPolicyName geoBack /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(GeoBackupPolicyName geoBac /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(GeoBackupPolicyName geoBackupPolicyName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.Serialization.cs index 3936b8ba4f98..c58f1b31635f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class GeoBackupPolicyResource : IJsonModel { + private static GeoBackupPolicyData s_dataDeserializationInstance; + private static GeoBackupPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - GeoBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + GeoBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); GeoBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.cs index 0925c3f77674..558fb7d5309c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/GeoBackupPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleCollection.cs index 726a260c9b4c..68c6bc283b3a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string fi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string firewallRuleName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.Serialization.cs index 12985c092ec7..0e9c9017bca4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class IPv6FirewallRuleResource : IJsonModel { + private static IPv6FirewallRuleData s_dataDeserializationInstance; + private static IPv6FirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - IPv6FirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + IPv6FirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); IPv6FirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.cs index db4724e201e9..1a72ad910d81 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/IPv6FirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupCollection.cs index db9c2e596930..a6129ea5740d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string failoverGroupN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string failoverGroupName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string failoverGroupName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.Serialization.cs index 6f5f88f9a155..58de1b205674 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class InstanceFailoverGroupResource : IJsonModel { + private static InstanceFailoverGroupData s_dataDeserializationInstance; + private static InstanceFailoverGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InstanceFailoverGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InstanceFailoverGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); InstanceFailoverGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.cs index 00b6a9f1a77b..f741c16cb74d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstanceFailoverGroupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual async Task> FailoverA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -442,7 +442,7 @@ public virtual ArmOperation Failover(WaitUntil wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -484,7 +484,7 @@ public virtual async Task> ForceFail /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolCollection.cs index 833efbc64701..8155218cdb86 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string instan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string instancePoolName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string instancePoolName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string instancePoolName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.Serialization.cs index 28c15b5642fc..a7fc22c67479 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class InstancePoolResource : IJsonModel { + private static InstancePoolData s_dataDeserializationInstance; + private static InstancePoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - InstancePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + InstancePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); InstancePoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs index 40b3fbfe81c5..94b69a03fdc2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/InstancePoolResource.cs @@ -100,6 +100,71 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of SqlInstancePoolOperationResources in the InstancePool. + /// An object representing collection of SqlInstancePoolOperationResources and their operations over a SqlInstancePoolOperationResource. + public virtual SqlInstancePoolOperationCollection GetSqlInstancePoolOperations() + { + return GetCachedClient(client => new SqlInstancePoolOperationCollection(client, Id)); + } + + /// + /// Gets a management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual async Task> GetSqlInstancePoolOperationAsync(Guid operationId, CancellationToken cancellationToken = default) + { + return await GetSqlInstancePoolOperations().GetAsync(operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets a management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + [ForwardsClientCalls] + public virtual Response GetSqlInstancePoolOperation(Guid operationId, CancellationToken cancellationToken = default) + { + return GetSqlInstancePoolOperations().Get(operationId, cancellationToken); + } + /// /// Gets an instance pool. /// @@ -113,7 +178,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -153,7 +218,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -193,7 +258,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -235,7 +300,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -277,7 +342,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -323,7 +388,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -369,7 +434,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, In /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -400,7 +465,7 @@ public virtual AsyncPageable GetManagedInstancesAsync(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -431,7 +496,7 @@ public virtual Pageable GetManagedInstances(string expa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -458,7 +523,7 @@ public virtual AsyncPageable GetUsagesAsync(bool? expandChild /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -485,7 +550,7 @@ public virtual Pageable GetUsages(bool? expandChildren = null /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -547,7 +612,7 @@ public virtual async Task> AddTagAsync(string key /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -609,7 +674,7 @@ public virtual Response AddTag(string key, string value, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -666,7 +731,7 @@ public virtual async Task> SetTagsAsync(IDictiona /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -723,7 +788,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -783,7 +848,7 @@ public virtual async Task> RemoveTagAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadCollection.cs index 226f7675da79..18abc3147c36 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(LedgerD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(LedgerDigestUploadsName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(LedgerDigestUploadsName le /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(LedgerDigestUploadsName ledgerDigestUploads /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.Serialization.cs index bc95c83a56cf..5585c19688a0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class LedgerDigestUploadResource : IJsonModel { + private static LedgerDigestUploadData s_dataDeserializationInstance; + private static LedgerDigestUploadData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LedgerDigestUploadData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LedgerDigestUploadData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); LedgerDigestUploadData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.cs index 303de373b031..2feb2a917c98 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LedgerDigestUploadResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> DisableAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionCollection.cs index 1907b646b253..437cb9bf9c47 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Tr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(TransparentDataEncryptionN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(TransparentDataEncryptionName tdeName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.Serialization.cs index 7957f9de9e75..a54c82bf8245 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class LogicalDatabaseTransparentDataEncryptionResource : IJsonModel { + private static LogicalDatabaseTransparentDataEncryptionData s_dataDeserializationInstance; + private static LogicalDatabaseTransparentDataEncryptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LogicalDatabaseTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LogicalDatabaseTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); LogicalDatabaseTransparentDataEncryptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.cs index 02caadf956a0..fde186d8aa3f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LogicalDatabaseTransparentDataEncryptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs index eb483e573d64..f1bf772b93b9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(Lo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(LongTermRetentionPo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(LongTermRetentionPolicyNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(LongTermRetentionPolicyName policyName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.Serialization.cs index add366527d89..bc734a88ff86 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class LongTermRetentionPolicyResource : IJsonModel { + private static LongTermRetentionPolicyData s_dataDeserializationInstance; + private static LongTermRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LongTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LongTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); LongTermRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs index 05cb46620d7e..ec1012ef8a5b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/LongTermRetentionPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.Serialization.cs index 541bdbba74b8..8503f2582bd7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class MaintenanceWindowOptionResource : IJsonModel { + private static MaintenanceWindowOptionData s_dataDeserializationInstance; + private static MaintenanceWindowOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MaintenanceWindowOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MaintenanceWindowOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); MaintenanceWindowOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.cs index f253dbedb05c..ae8a34b2a104 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowOptionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.Serialization.cs index 1b4f5b49a7d4..1fbe9076ce1a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class MaintenanceWindowsResource : IJsonModel { + private static MaintenanceWindowsData s_dataDeserializationInstance; + private static MaintenanceWindowsData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MaintenanceWindowsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MaintenanceWindowsData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); MaintenanceWindowsData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.cs index b1fda505ae2f..e0c3da733514 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/MaintenanceWindowsResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -189,7 +189,7 @@ public virtual Response Get(string maintenanceWindow /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -239,7 +239,7 @@ public virtual async Task CreateOrUpdateAsync(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyCollection.cs index 5772342d47d2..7ddacb0c6273 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Manag /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ManagedShortTermRetentionP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ManagedShortTermRetentionPolicyName policyN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.Serialization.cs index 862ac8271bee..d474925a780e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedBackupShortTermRetentionPolicyResource : IJsonModel { + private static ManagedBackupShortTermRetentionPolicyData s_dataDeserializationInstance; + private static ManagedBackupShortTermRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedBackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedBackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedBackupShortTermRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.cs index 1d2551edf02e..298515e21978 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedBackupShortTermRetentionPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionCollection.cs index ef7d30c0338b..f2ffbb9b0b5e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Adv /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.Serialization.cs index ae043fff3f05..01f9be4743db 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseAdvancedThreatProtectionResource : IJsonModel { + private static ManagedDatabaseAdvancedThreatProtectionData s_dataDeserializationInstance; + private static ManagedDatabaseAdvancedThreatProtectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedDatabaseAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedDatabaseAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedDatabaseAdvancedThreatProtectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.cs index 7b81305b0ca4..521cb4dd69fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseAdvancedThreatProtectionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseCollection.cs index 0bbf14255410..e4033c953147 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string dat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string databaseName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string databaseName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string databaseName, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnCollection.cs index 4574ea238999..e5ab7a0c78d2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string columnName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string columnName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string columnName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.Serialization.cs index 435daebe26f3..7f287be1b294 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseColumnResource : IJsonModel { + private static DatabaseColumnData s_dataDeserializationInstance; + private static DatabaseColumnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseColumnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.cs index e856230b1798..df649a2a8a0a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseColumnResource.cs @@ -117,7 +117,7 @@ public virtual ManagedDatabaseSensitivityLabelCollection GetManagedDatabaseSensi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -175,7 +175,7 @@ public virtual Response GetManagedDatab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DisableRecommendationManagedDatabaseSensitiv /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -331,7 +331,7 @@ public virtual Response DisableRecommendationManagedDatabaseSensitivityLabel(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task EnableRecommendationManagedDatabaseSensitivi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.Serialization.cs index f74c3023210b..4b25ce35d7c3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseResource : IJsonModel { + private static ManagedDatabaseData s_dataDeserializationInstance; + private static ManagedDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs index 2220a0dd3237..4e1fe57c7e2f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseResource.cs @@ -129,7 +129,7 @@ public virtual ManagedDatabaseSchemaCollection GetManagedDatabaseSchemas() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual async Task> GetManagedDat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -198,7 +198,7 @@ public virtual ManagedDatabaseVulnerabilityAssessmentCollection GetManagedDataba /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual ManagedBackupShortTermRetentionPolicyCollection GetManagedBackupS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -328,7 +328,7 @@ public virtual ManagedDatabaseAdvancedThreatProtectionCollection GetManagedDatab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -393,7 +393,7 @@ public virtual ManagedDatabaseRestoreDetailCollection GetManagedDatabaseRestoreD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -422,7 +422,7 @@ public virtual async Task> GetMan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -458,7 +458,7 @@ public virtual ManagedDatabaseSecurityAlertPolicyCollection GetManagedDatabaseSe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -487,7 +487,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -523,7 +523,7 @@ public virtual ManagedTransparentDataEncryptionCollection GetManagedTransparentD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -552,7 +552,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -588,7 +588,7 @@ public virtual ManagedInstanceLongTermRetentionPolicyCollection GetManagedInstan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -617,7 +617,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -653,7 +653,7 @@ public virtual ManagedLedgerDigestUploadCollection GetManagedLedgerDigestUploads /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -682,7 +682,7 @@ public virtual async Task> GetManage /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -711,7 +711,7 @@ public virtual Response GetManagedLedgerDiges /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -751,7 +751,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -791,7 +791,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -833,7 +833,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -875,7 +875,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -921,7 +921,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -967,7 +967,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1002,7 +1002,7 @@ public virtual AsyncPageable GetManagedDatabaseCo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1037,7 +1037,7 @@ public virtual Pageable GetManagedDatabaseColumns /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1076,7 +1076,7 @@ public virtual async Task> GetManagedDatabaseQuer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1115,7 +1115,7 @@ public virtual Response GetManagedDatabaseQuery(string que /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1149,7 +1149,7 @@ public virtual AsyncPageable GetQueryStatisticsAsync(string que /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1183,7 +1183,7 @@ public virtual Pageable GetQueryStatistics(string queryId, stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1213,7 +1213,7 @@ public virtual AsyncPageable GetManagedDatabaseSecurityEventsByDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1243,7 +1243,7 @@ public virtual Pageable GetManagedDatabaseSecurityEventsByDatabas /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1276,7 +1276,7 @@ public virtual AsyncPageable GetCurrent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1309,7 +1309,7 @@ public virtual Pageable GetCurrentManag /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1351,7 +1351,7 @@ public virtual async Task UpdateManagedDatabaseSensitivityLabelAsync(S /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1393,7 +1393,7 @@ public virtual Response UpdateManagedDatabaseSensitivityLabel(SensitivityLabelUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1426,7 +1426,7 @@ public virtual AsyncPageable GetRecomme /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1459,7 +1459,7 @@ public virtual Pageable GetRecommendedM /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1501,7 +1501,7 @@ public virtual async Task UpdateRecommendedManagedDatabaseSensitivityL /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1543,7 +1543,7 @@ public virtual Response UpdateRecommendedManagedDatabaseSensitivityLabel(Recomme /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1574,7 +1574,7 @@ public virtual AsyncPageable GetManaged /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1605,7 +1605,7 @@ public virtual Pageable GetManagedDatab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1651,7 +1651,7 @@ public virtual async Task CancelMoveAsync(WaitUntil waitUntil, Man /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1697,7 +1697,7 @@ public virtual ArmOperation CancelMove(WaitUntil waitUntil, ManagedDatabaseMoveD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1743,7 +1743,7 @@ public virtual async Task CompleteMoveAsync(WaitUntil waitUntil, M /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1789,7 +1789,7 @@ public virtual ArmOperation CompleteMove(WaitUntil waitUntil, ManagedDatabaseMov /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1835,7 +1835,7 @@ public virtual async Task CompleteRestoreAsync(WaitUntil waitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1881,7 +1881,7 @@ public virtual ArmOperation CompleteRestore(WaitUntil waitUntil, CompleteDatabas /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1927,7 +1927,7 @@ public virtual async Task StartMoveAsync(WaitUntil waitUntil, Mana /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1973,7 +1973,7 @@ public virtual ArmOperation StartMove(WaitUntil waitUntil, ManagedDatabaseStartM /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2035,7 +2035,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2097,7 +2097,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2154,7 +2154,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2211,7 +2211,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2271,7 +2271,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailCollection.cs index 02fdcfce675c..4d0a67f7de58 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -103,7 +103,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual Response Get(RestoreDetails /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual async Task> ExistsAsync(RestoreDetailsName restore /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual Response Exists(RestoreDetailsName restoreDetailsName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.Serialization.cs index 22cd4bd63479..8bc3f823ba08 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseRestoreDetailResource : IJsonModel { + private static ManagedDatabaseRestoreDetailData s_dataDeserializationInstance; + private static ManagedDatabaseRestoreDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedDatabaseRestoreDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedDatabaseRestoreDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedDatabaseRestoreDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.cs index dbb2e14250a7..db378dfbe65c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseRestoreDetailResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaCollection.cs index a37366e20140..f6b3c822f5ce 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string schemaName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string f /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = nu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string schemaName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string schemaName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.Serialization.cs index 7549b913f9e8..b461741276a8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseSchemaResource : IJsonModel { + private static DatabaseSchemaData s_dataDeserializationInstance; + private static DatabaseSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.cs index ffa03b41f5e6..909caa7b22cb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSchemaResource.cs @@ -109,7 +109,7 @@ public virtual ManagedDatabaseTableCollection GetManagedDatabaseTables() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetManagedData /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetManagedDatabaseTable(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyCollection.cs index ba3d57478205..6c47cc41fa67 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(SqlSecur /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(SqlSecurityAlertPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(SqlSecurityAlertPolicyName securityAlertPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.Serialization.cs index 230f7b50e0f6..4e982ebdcf22 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseSecurityAlertPolicyResource : IJsonModel { + private static ManagedDatabaseSecurityAlertPolicyData s_dataDeserializationInstance; + private static ManagedDatabaseSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedDatabaseSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedDatabaseSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedDatabaseSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.cs index 95925991c2d1..799310dd9108 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSecurityAlertPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelCollection.cs index 20b9959fa675..8d6c59419931 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response Get(Sensitivity /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> ExistsAsync(SensitivityLabelSource sen /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Response Exists(SensitivityLabelSource sensitivityLabelSour /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.Serialization.cs index 566f864e129c..1388380ab12e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseSensitivityLabelResource : IJsonModel { + private static SensitivityLabelData s_dataDeserializationInstance; + private static SensitivityLabelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SensitivityLabelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.cs index 2f9cb47c02e0..2c485ac46acc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseSensitivityLabelResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableCollection.cs index 4a8676f83094..256489e46485 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string tableName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string fi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = nul /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string tableName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string tableName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.Serialization.cs index 1b69e3e3e46b..b808be0a2eaa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseTableResource : IJsonModel { + private static DatabaseTableData s_dataDeserializationInstance; + private static DatabaseTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.cs index 45b276108134..2f7846787571 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseTableResource.cs @@ -110,7 +110,7 @@ public virtual ManagedDatabaseColumnCollection GetManagedDatabaseColumns() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetManagedDat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetManagedDatabaseColumn( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentCollection.cs index 9503a27ac010..7cf7b0d80995 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Vuln /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.Serialization.cs index b476c15b7f17..123a954e468c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseVulnerabilityAssessmentResource : IJsonModel { + private static DatabaseVulnerabilityAssessmentData s_dataDeserializationInstance; + private static DatabaseVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.cs index 9d38c8ddf767..2d1a27229a2f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentResource.cs @@ -110,7 +110,7 @@ public virtual ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection GetM /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual ManagedDatabaseVulnerabilityAssessmentScanCollection GetManagedDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -243,7 +243,7 @@ public virtual Response GetM /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -411,7 +411,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs index bf76fb679e26..6c20b3dcb983 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual async Task> ExistsAsync(string ruleId, Vulnerabili /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response Exists(string ruleId, VulnerabilityAssessmentPolic /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -392,7 +392,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs index d3b5bc8d9a72..95030eb13370 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource : IJsonModel { + private static DatabaseVulnerabilityAssessmentRuleBaselineData s_dataDeserializationInstance; + private static DatabaseVulnerabilityAssessmentRuleBaselineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseVulnerabilityAssessmentRuleBaselineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs index 1acca93334ec..f8e794d658c7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentRuleBaselineResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanCollection.cs index 540fbb6cc79e..2c390ed7f4a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.Serialization.cs index d941691a577e..1ff406cfee51 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedDatabaseVulnerabilityAssessmentScanResource : IJsonModel { + private static VulnerabilityAssessmentScanRecordData s_dataDeserializationInstance; + private static VulnerabilityAssessmentScanRecordData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); VulnerabilityAssessmentScanRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.cs index f6d8e44382f7..e5d3a80252a3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedDatabaseVulnerabilityAssessmentScanResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Export(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual async Task InitiateScanAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorCollection.cs index adf74341c80f..f05c76156107 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(SqlAdministrat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(SqlAdministratorName admin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(SqlAdministratorName administratorName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.Serialization.cs index c5ca9464622e..04e47b01b80c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceAdministratorResource : IJsonModel { + private static ManagedInstanceAdministratorData s_dataDeserializationInstance; + private static ManagedInstanceAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.cs index 09b9a5474f7c..78de3f63096b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdministratorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionCollection.cs index 2e843d1d183f..c4196bbd34a0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Cre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Adv /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.Serialization.cs index 1a631f2461a2..8394c00b169b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceAdvancedThreatProtectionResource : IJsonModel { + private static ManagedInstanceAdvancedThreatProtectionData s_dataDeserializationInstance; + private static ManagedInstanceAdvancedThreatProtectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceAdvancedThreatProtectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.cs index 2484048e9f43..ccc24d95a843 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAdvancedThreatProtectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationCollection.cs index 3cc39554d663..2afbdf780cf6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Au /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AuthenticationName authent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AuthenticationName authenticationName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.Serialization.cs index fb76160d780c..f0222ff9212f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceAzureADOnlyAuthenticationResource : IJsonModel { + private static ManagedInstanceAzureADOnlyAuthenticationData s_dataDeserializationInstance; + private static ManagedInstanceAzureADOnlyAuthenticationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceAzureADOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceAzureADOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceAzureADOnlyAuthenticationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.cs index 6113a1e01587..a090bfd90f0b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceAzureADOnlyAuthenticationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs index fc7c4dff849e..5a62408c7bf0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string man /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string managedInstanceName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(string expand /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string expand = null, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string managedInstanceName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string managedInstanceName, string expand = /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs index 21921a751003..a4377ab7909b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.Serialization.cs @@ -127,6 +127,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("storageThroughputMBps"u8); writer.WriteNumberValue(StorageThroughputMBps.Value); } + if (Optional.IsDefined(TotalMemoryInMB)) + { + writer.WritePropertyName("totalMemoryMB"u8); + writer.WriteNumberValue(TotalMemoryInMB.Value); + } if (Optional.IsDefined(Collation)) { writer.WritePropertyName("collation"u8); @@ -303,6 +308,7 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e int? storageSizeInGB = default; int? storageIOps = default; int? storageThroughputMBps = default; + int? totalMemoryMB = default; string collation = default; string dnsZone = default; ResourceIdentifier dnsZonePartner = default; @@ -522,6 +528,15 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e storageThroughputMBps = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("totalMemoryMB"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalMemoryMB = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("collation"u8)) { collation = property0.Value.GetString(); @@ -769,6 +784,7 @@ internal static ManagedInstanceData DeserializeManagedInstanceData(JsonElement e storageSizeInGB, storageIOps, storageThroughputMBps, + totalMemoryMB, collation, dnsZone, dnsZonePartner, @@ -1200,6 +1216,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TotalMemoryInMB), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" totalMemoryMB: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(TotalMemoryInMB)) + { + builder.Append(" totalMemoryMB: "); + builder.AppendLine($"{TotalMemoryInMB.Value}"); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Collation), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs index 6d44d67420ce..0f90f9225c9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceData.cs @@ -88,6 +88,7 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -121,7 +122,7 @@ public ManagedInstanceData(AzureLocation location) : base(location) /// The managed instance's authentication metadata lookup mode. /// Specifies the internal format of instance databases specific to the SQL engine version. /// Keeps track of any properties unknown to the library. - internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, SqlSku sku, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, int? totalMemoryInMB, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { Identity = identity; Sku = sku; @@ -140,6 +141,7 @@ internal ManagedInstanceData(ResourceIdentifier id, string name, ResourceType re StorageSizeInGB = storageSizeInGB; StorageIOps = storageIOps; StorageThroughputMBps = storageThroughputMBps; + TotalMemoryInMB = totalMemoryInMB; Collation = collation; DnsZone = dnsZone; ManagedDnsZonePartner = managedDnsZonePartner; @@ -230,6 +232,9 @@ internal ManagedInstanceData() /// Storage throughput MBps parameter is not supported in the instance create/update operation. [WirePath("properties.storageThroughputMBps")] public int? StorageThroughputMBps { get; set; } + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. + [WirePath("properties.totalMemoryMB")] + public int? TotalMemoryInMB { get; set; } /// Collation of the managed instance. [WirePath("properties.collation")] public string Collation { get; set; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcCollection.cs index 0f778ba8f75e..fcd8b653967e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync(DtcName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(DtcName dtcName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(DtcName dtcName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(DtcName dtcName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.Serialization.cs index b2f68b522f19..6ed6ad5574e3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceDtcResource : IJsonModel { + private static ManagedInstanceDtcData s_dataDeserializationInstance; + private static ManagedInstanceDtcData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceDtcData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceDtcData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceDtcData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.cs index 0eaefe1bf9a1..6e4f98b36cf8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceDtcResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorCollection.cs index 239b41027c8f..bfdf399fedd3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Encrypti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(EncryptionProtectorName en /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(EncryptionProtectorName encryptionProtector /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.Serialization.cs index 851563e4f0ac..ffd5ab375f7e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceEncryptionProtectorResource : IJsonModel { + private static ManagedInstanceEncryptionProtectorData s_dataDeserializationInstance; + private static ManagedInstanceEncryptionProtectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceEncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceEncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceEncryptionProtectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.cs index e3fe1833f285..1e7c7c6f4762 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceEncryptionProtectorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Update(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual async Task RevalidateAsync(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyCollection.cs index 48f587c4be30..f34fae10787d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string keyName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(string filt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string keyName, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string keyName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.Serialization.cs index 56ac6a9a6bf9..251788271dfc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceKeyResource : IJsonModel { + private static ManagedInstanceKeyData s_dataDeserializationInstance; + private static ManagedInstanceKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.cs index 4b405cd1507b..8d0242fa163a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceKeyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyCollection.cs index 63af6ab994e9..236d3d10fc51 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Mana /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ManagedInstanceLongTermRet /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ManagedInstanceLongTermRetentionPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.Serialization.cs index 8b7d7732ac7d..33da964f19d3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceLongTermRetentionPolicyResource : IJsonModel { + private static ManagedInstanceLongTermRetentionPolicyData s_dataDeserializationInstance; + private static ManagedInstanceLongTermRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceLongTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceLongTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceLongTermRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.cs index bd0fda467ff2..e03c17af6e8a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceLongTermRetentionPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Dele /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationCollection.cs index ec4634b322dd..1b8da4e2b418 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> GetAsync(G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(Guid operationId, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -206,7 +206,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual async Task> ExistsAsync(Guid operationId, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual Response Exists(Guid operationId, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.Serialization.cs index 39403afefbee..604ca42ea687 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceOperationResource : IJsonModel { + private static ManagedInstanceOperationData s_dataDeserializationInstance; + private static ManagedInstanceOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.cs index 8af94b1398ae..1774fdbf1010 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceOperationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task CancelAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionCollection.cs index adbfb0a9190b..4412d90d0dc0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.Serialization.cs index 4da0fc94d391..4796fdbfa9ba 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstancePrivateEndpointConnectionResource : IJsonModel { + private static ManagedInstancePrivateEndpointConnectionData s_dataDeserializationInstance; + private static ManagedInstancePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstancePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstancePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstancePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.cs index 68fa5168b201..1f871e3a806a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkCollection.cs index 4e11614ca0a5..dc4269314d40 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string groupName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.Serialization.cs index 9158306275e6..488b62b9e849 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstancePrivateLinkResource : IJsonModel { + private static ManagedInstancePrivateLinkData s_dataDeserializationInstance; + private static ManagedInstancePrivateLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstancePrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstancePrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstancePrivateLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.cs index c66ddb131366..c99d49e8adaa 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstancePrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.Serialization.cs index b856afdf26de..b528593e6373 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceResource : IJsonModel { + private static ManagedInstanceData s_dataDeserializationInstance; + private static ManagedInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs index 56b376d788b7..99c46a43cfda 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceResource.cs @@ -125,7 +125,7 @@ public virtual SqlDistributedAvailabilityGroupCollection GetSqlDistributedAvaila /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -156,7 +156,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -194,7 +194,7 @@ public virtual EndpointCertificateCollection GetEndpointCertificates() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> GetEndpointCert /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual ManagedDatabaseCollection GetManagedDatabases() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task> GetManagedDatabaseA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -332,7 +332,7 @@ public virtual ManagedInstanceAdministratorCollection GetManagedInstanceAdminist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> GetMan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual ManagedInstanceAdvancedThreatProtectionCollection GetManagedInsta /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -426,7 +426,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -462,7 +462,7 @@ public virtual ManagedInstanceAzureADOnlyAuthenticationCollection GetManagedInst /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -491,7 +491,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -527,7 +527,7 @@ public virtual ManagedInstanceDtcCollection GetManagedInstanceDtcs() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -556,7 +556,7 @@ public virtual async Task> GetManagedInstan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -592,7 +592,7 @@ public virtual ManagedInstanceEncryptionProtectorCollection GetManagedInstanceEn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -621,7 +621,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -657,7 +657,7 @@ public virtual ManagedInstanceKeyCollection GetManagedInstanceKeys() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -688,7 +688,7 @@ public virtual async Task> GetManagedInstan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -726,7 +726,7 @@ public virtual ManagedInstanceOperationCollection GetManagedInstanceOperations() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -755,7 +755,7 @@ public virtual async Task> GetManaged /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -791,7 +791,7 @@ public virtual ManagedInstancePrivateEndpointConnectionCollection GetManagedInst /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -822,7 +822,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -860,7 +860,7 @@ public virtual ManagedInstancePrivateLinkCollection GetManagedInstancePrivateLin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -891,7 +891,7 @@ public virtual async Task> GetManag /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -929,7 +929,7 @@ public virtual ManagedInstanceVulnerabilityAssessmentCollection GetManagedInstan /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -958,7 +958,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -994,7 +994,7 @@ public virtual ManagedServerDnsAliasCollection GetManagedServerDnsAliases() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1025,7 +1025,7 @@ public virtual async Task> GetManagedSer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1063,7 +1063,7 @@ public virtual ManagedServerSecurityAlertPolicyCollection GetManagedServerSecuri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1092,7 +1092,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1128,7 +1128,7 @@ public virtual RecoverableManagedDatabaseCollection GetRecoverableManagedDatabas /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1159,7 +1159,7 @@ public virtual async Task> GetRecov /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1197,7 +1197,7 @@ public virtual RestorableDroppedManagedDatabaseCollection GetRestorableDroppedMa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1228,7 +1228,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1266,7 +1266,7 @@ public virtual ManagedInstanceServerConfigurationOptionCollection GetManagedInst /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1295,7 +1295,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1331,7 +1331,7 @@ public virtual ManagedInstanceServerTrustCertificateCollection GetManagedInstanc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1362,7 +1362,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1407,7 +1407,7 @@ public virtual ManagedInstanceStartStopScheduleCollection GetManagedInstanceStar /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1436,7 +1436,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1465,7 +1465,7 @@ public virtual Response GetManagedInst /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1506,7 +1506,7 @@ public virtual async Task> GetAsync(string exp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1547,7 +1547,7 @@ public virtual Response Get(string expand = null, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1589,7 +1589,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1631,7 +1631,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1677,7 +1677,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1723,7 +1723,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1753,7 +1753,7 @@ public virtual AsyncPageable GetInaccessibleManagedData /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1783,7 +1783,7 @@ public virtual Pageable GetInaccessibleManagedDatabases /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1825,7 +1825,7 @@ public virtual async Task CreateManagedInstanceTdeCertificateAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1867,7 +1867,7 @@ public virtual ArmOperation CreateManagedInstanceTdeCertificate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1910,7 +1910,7 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Repli /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1953,7 +1953,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, ReplicaType? replicaTy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1983,7 +1983,7 @@ public virtual AsyncPageable GetOutboundNetworkD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2013,7 +2013,7 @@ public virtual Pageable GetOutboundNetworkDepend /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2055,7 +2055,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2097,7 +2097,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2139,7 +2139,7 @@ public virtual async Task> StartAsync(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2181,7 +2181,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2223,7 +2223,7 @@ public virtual async Task> StopAsync(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2265,7 +2265,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2298,7 +2298,7 @@ public virtual AsyncPageable GetTopQueriesAsync(ManagedInstanceResou /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2331,7 +2331,7 @@ public virtual Pageable GetTopQueries(ManagedInstanceResourceGetTopQ /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2361,7 +2361,7 @@ public virtual AsyncPageable GetSqlServerTrustGroup /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2391,7 +2391,7 @@ public virtual Pageable GetSqlServerTrustGroups(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2453,7 +2453,7 @@ public virtual async Task> AddTagAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2515,7 +2515,7 @@ public virtual Response AddTag(string key, string value /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2572,7 +2572,7 @@ public virtual async Task> SetTagsAsync(IDicti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2629,7 +2629,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2689,7 +2689,7 @@ public virtual async Task> RemoveTagAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionCollection.cs index 8298293630bc..6561f00eab29 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Ma /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ManagedInstanceServerConfi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ManagedInstanceServerConfigurationOptionNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.Serialization.cs index a6f9a6d48193..80cc1b68db8f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceServerConfigurationOptionResource : IJsonModel { + private static ManagedInstanceServerConfigurationOptionData s_dataDeserializationInstance; + private static ManagedInstanceServerConfigurationOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceServerConfigurationOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceServerConfigurationOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceServerConfigurationOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.cs index 79590140d4d5..fbccb73ef33b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerConfigurationOptionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateCollection.cs index 379cb78b8239..fd3baef33cc7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation Creat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string certificateName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string certificateName, CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.Serialization.cs index 4fb9c53c8362..011161475ea5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceServerTrustCertificateResource : IJsonModel { + private static ServerTrustCertificateData s_dataDeserializationInstance; + private static ServerTrustCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServerTrustCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServerTrustCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ServerTrustCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.cs index fd8eed32712e..c99f0e56742d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceServerTrustCertificateResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleCollection.cs index 014bc8731533..f167516bce95 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(ManagedIns /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(ManagedInstanceStartStopSc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(ManagedInstanceStartStopScheduleName startS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.Serialization.cs index 9145979d6612..23c4853201ab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceStartStopScheduleResource : IJsonModel { + private static ManagedInstanceStartStopScheduleData s_dataDeserializationInstance; + private static ManagedInstanceStartStopScheduleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceStartStopScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceStartStopScheduleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceStartStopScheduleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.cs index bcd5370d762d..31312f464d9e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceStartStopScheduleResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentCollection.cs index 5534e4680f44..ccd23ae9d851 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation Crea /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Vuln /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.Serialization.cs index d7a4901aeec4..71f24204df38 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedInstanceVulnerabilityAssessmentResource : IJsonModel { + private static ManagedInstanceVulnerabilityAssessmentData s_dataDeserializationInstance; + private static ManagedInstanceVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.cs index 3b005ed40543..60495d4d09bf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedInstanceVulnerabilityAssessmentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadCollection.cs index fa30fad89a91..b82294e0d4bc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(ManagedLedgerDige /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ManagedLedgerDigestUploads /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ManagedLedgerDigestUploadsName ledgerDigest /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.Serialization.cs index f1b0faf27e52..ee8fa39a4310 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedLedgerDigestUploadResource : IJsonModel { + private static ManagedLedgerDigestUploadData s_dataDeserializationInstance; + private static ManagedLedgerDigestUploadData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedLedgerDigestUploadData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedLedgerDigestUploadData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedLedgerDigestUploadData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.cs index bea1a9e27555..558e95a7761f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedLedgerDigestUploadResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> Disab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs index 24a67a830889..b54fa2c10411 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ManagedShortTermRetentionP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ManagedShortTermRetentionPolicyName policyN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.Serialization.cs index 6595e47d13f5..ad50ab5e3d05 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource : IJsonModel { + private static ManagedBackupShortTermRetentionPolicyData s_dataDeserializationInstance; + private static ManagedBackupShortTermRetentionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedBackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedBackupShortTermRetentionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedBackupShortTermRetentionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs index 9a435202d475..973eb04eef19 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedRestorableDroppedDbBackupShortTermRetentionPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasCollection.cs index e2f5e48cc897..11c85a9eb4af 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string dnsAliasName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string dnsAliasName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string dnsAliasName, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.Serialization.cs index 6be7bb2a710d..331ad3e628c8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedServerDnsAliasResource : IJsonModel { + private static ManagedServerDnsAliasData s_dataDeserializationInstance; + private static ManagedServerDnsAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedServerDnsAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedServerDnsAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedServerDnsAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.cs index 154e7806f6f6..11daf05b2859 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerDnsAliasResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> AcquireAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyCollection.cs index 20b3355fed8f..a1c28802e9fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(SqlSecurit /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(SqlSecurityAlertPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(SqlSecurityAlertPolicyName securityAlertPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.Serialization.cs index 1631444cf724..a0f8e0cb8eea 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedServerSecurityAlertPolicyResource : IJsonModel { + private static ManagedServerSecurityAlertPolicyData s_dataDeserializationInstance; + private static ManagedServerSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedServerSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.cs index de4f50b82c08..1b4cf63edf22 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedServerSecurityAlertPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionCollection.cs index deec7ba9c27a..6d70e57e8e05 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Transparen /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(TransparentDataEncryptionN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(TransparentDataEncryptionName tdeName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.Serialization.cs index ed4ec318ff8e..3f43e8cc1ddd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ManagedTransparentDataEncryptionResource : IJsonModel { + private static ManagedTransparentDataEncryptionData s_dataDeserializationInstance; + private static ManagedTransparentDataEncryptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedTransparentDataEncryptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.cs index 20ec9cba9ce8..e83741d9c299 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ManagedTransparentDataEncryptionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.Serialization.cs index 9a5b027b9fb8..aaa535d3677a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.Serialization.cs @@ -42,8 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(StorageUri.AbsoluteUri); writer.WritePropertyName("administratorLogin"u8); writer.WriteStringValue(AdministratorLogin); - writer.WritePropertyName("administratorLoginPassword"u8); - writer.WriteStringValue(AdministratorLoginPassword); + if (Optional.IsDefined(AdministratorLoginPassword)) + { + writer.WritePropertyName("administratorLoginPassword"u8); + writer.WriteStringValue(AdministratorLoginPassword); + } if (Optional.IsDefined(AuthenticationType)) { writer.WritePropertyName("authenticationType"u8); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.cs index 99954b357566..320565844d8f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseExportDefinition.cs @@ -46,33 +46,30 @@ public partial class DatabaseExportDefinition private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// , , or is null. - public DatabaseExportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// , or is null. + public DatabaseExportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin) { Argument.AssertNotNull(storageKey, nameof(storageKey)); Argument.AssertNotNull(storageUri, nameof(storageUri)); Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); - Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); StorageKeyType = storageKeyType; StorageKey = storageKey; StorageUri = storageUri; AdministratorLogin = administratorLogin; - AdministratorLoginPassword = administratorLoginPassword; } /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// Keeps track of any properties unknown to the library. internal DatabaseExportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword, string authenticationType, NetworkIsolationSettings networkIsolation, IDictionary serializedAdditionalRawData) @@ -92,22 +89,22 @@ internal DatabaseExportDefinition() { } - /// Storage key type. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. [WirePath("storageKeyType")] public StorageKeyType StorageKeyType { get; } - /// Storage key. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("storageKey")] public string StorageKey { get; } /// Storage Uri. [WirePath("storageUri")] public Uri StorageUri { get; } - /// Administrator login name. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("administratorLogin")] public string AdministratorLogin { get; } - /// Administrator login password. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. [WirePath("administratorLoginPassword")] - public string AdministratorLoginPassword { get; } - /// Authentication type. + public string AdministratorLoginPassword { get; set; } + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. [WirePath("authenticationType")] public string AuthenticationType { get; set; } /// Optional resource information to enable network isolation for request. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.Serialization.cs index d3a473278f98..6e0873887721 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.Serialization.cs @@ -62,8 +62,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(StorageUri.AbsoluteUri); writer.WritePropertyName("administratorLogin"u8); writer.WriteStringValue(AdministratorLogin); - writer.WritePropertyName("administratorLoginPassword"u8); - writer.WriteStringValue(AdministratorLoginPassword); + if (Optional.IsDefined(AdministratorLoginPassword)) + { + writer.WritePropertyName("administratorLoginPassword"u8); + writer.WriteStringValue(AdministratorLoginPassword); + } if (Optional.IsDefined(AuthenticationType)) { writer.WritePropertyName("authenticationType"u8); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs index 47652f002f16..850c11e79aab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseImportDefinition.cs @@ -46,24 +46,21 @@ public partial class DatabaseImportDefinition private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// , , or is null. - public DatabaseImportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// , or is null. + public DatabaseImportDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin) { Argument.AssertNotNull(storageKey, nameof(storageKey)); Argument.AssertNotNull(storageUri, nameof(storageUri)); Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); - Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); StorageKeyType = storageKeyType; StorageKey = storageKey; StorageUri = storageUri; AdministratorLogin = administratorLogin; - AdministratorLoginPassword = administratorLoginPassword; } /// Initializes a new instance of . @@ -71,12 +68,12 @@ public DatabaseImportDefinition(StorageKeyType storageKeyType, string storageKey /// Edition of the import database. /// Service level objective name of the import database. /// Max size in bytes for the import database. - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// Keeps track of any properties unknown to the library. internal DatabaseImportDefinition(string databaseName, string edition, string serviceObjectiveName, string maxSizeBytes, StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword, string authenticationType, NetworkIsolationSettings networkIsolation, IDictionary serializedAdditionalRawData) @@ -112,22 +109,22 @@ internal DatabaseImportDefinition() /// Max size in bytes for the import database. [WirePath("maxSizeBytes")] public string MaxSizeBytes { get; set; } - /// Storage key type. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. [WirePath("storageKeyType")] public StorageKeyType StorageKeyType { get; } - /// Storage key. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("storageKey")] public string StorageKey { get; } /// Storage Uri. [WirePath("storageUri")] public Uri StorageUri { get; } - /// Administrator login name. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("administratorLogin")] public string AdministratorLogin { get; } - /// Administrator login password. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. [WirePath("administratorLoginPassword")] - public string AdministratorLoginPassword { get; } - /// Authentication type. + public string AdministratorLoginPassword { get; set; } + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. [WirePath("authenticationType")] public string AuthenticationType { get; set; } /// Optional resource information to enable network isolation for request. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs index eca75c1f05d3..07c91e9a539f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/DatabaseOperationPhase.cs @@ -22,19 +22,13 @@ public DatabaseOperationPhase(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string LogTransitionInProgressValue = "LogTransitionInProgress"; private const string CopyingValue = "Copying"; - private const string BuildingHyperscaleComponentsValue = "BuildingHyperscaleComponents"; private const string CatchupValue = "Catchup"; private const string WaitingForCutoverValue = "WaitingForCutover"; private const string CutoverInProgressValue = "CutoverInProgress"; - /// LogTransitionInProgress. - public static DatabaseOperationPhase LogTransitionInProgress { get; } = new DatabaseOperationPhase(LogTransitionInProgressValue); /// Copying. public static DatabaseOperationPhase Copying { get; } = new DatabaseOperationPhase(CopyingValue); - /// BuildingHyperscaleComponents. - public static DatabaseOperationPhase BuildingHyperscaleComponents { get; } = new DatabaseOperationPhase(BuildingHyperscaleComponentsValue); /// Catchup. public static DatabaseOperationPhase Catchup { get; } = new DatabaseOperationPhase(CatchupValue); /// WaitingForCutover. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.Serialization.cs index 53b14968f708..2251879c53dc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.Serialization.cs @@ -42,8 +42,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteStringValue(StorageUri.AbsoluteUri); writer.WritePropertyName("administratorLogin"u8); writer.WriteStringValue(AdministratorLogin); - writer.WritePropertyName("administratorLoginPassword"u8); - writer.WriteStringValue(AdministratorLoginPassword); + if (Optional.IsDefined(AdministratorLoginPassword)) + { + writer.WritePropertyName("administratorLoginPassword"u8); + writer.WriteStringValue(AdministratorLoginPassword); + } if (Optional.IsDefined(AuthenticationType)) { writer.WritePropertyName("authenticationType"u8); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.cs index 6a1b09d9d131..8e70b501aac7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ImportExistingDatabaseDefinition.cs @@ -46,33 +46,30 @@ public partial class ImportExistingDatabaseDefinition private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// , , or is null. - public ImportExistingDatabaseDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword) + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// , or is null. + public ImportExistingDatabaseDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin) { Argument.AssertNotNull(storageKey, nameof(storageKey)); Argument.AssertNotNull(storageUri, nameof(storageUri)); Argument.AssertNotNull(administratorLogin, nameof(administratorLogin)); - Argument.AssertNotNull(administratorLoginPassword, nameof(administratorLoginPassword)); StorageKeyType = storageKeyType; StorageKey = storageKey; StorageUri = storageUri; AdministratorLogin = administratorLogin; - AdministratorLoginPassword = administratorLoginPassword; } /// Initializes a new instance of . - /// Storage key type. - /// Storage key. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri. - /// Administrator login name. - /// Administrator login password. - /// Authentication type. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. /// Optional resource information to enable network isolation for request. /// Keeps track of any properties unknown to the library. internal ImportExistingDatabaseDefinition(StorageKeyType storageKeyType, string storageKey, Uri storageUri, string administratorLogin, string administratorLoginPassword, string authenticationType, NetworkIsolationSettings networkIsolation, IDictionary serializedAdditionalRawData) @@ -92,22 +89,22 @@ internal ImportExistingDatabaseDefinition() { } - /// Storage key type. + /// Storage key type: StorageAccessKey, SharedAccessKey, or ManagedIdentity. [WirePath("storageKeyType")] public StorageKeyType StorageKeyType { get; } - /// Storage key. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("storageKey")] public string StorageKey { get; } /// Storage Uri. [WirePath("storageUri")] public Uri StorageUri { get; } - /// Administrator login name. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("administratorLogin")] public string AdministratorLogin { get; } - /// Administrator login password. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. [WirePath("administratorLoginPassword")] - public string AdministratorLoginPassword { get; } - /// Authentication type. + public string AdministratorLoginPassword { get; set; } + /// Type of credentials provided for access to the target SQL server: SQL, ADPassword or ManagedIdentity. [WirePath("authenticationType")] public string AuthenticationType { get; set; } /// Optional resource information to enable network isolation for request. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.Serialization.cs new file mode 100644 index 000000000000..260943083e9b --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.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.Sql.Models +{ + internal partial class InstancePoolOperationListResult : 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(InstancePoolOperationListResult)} 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" && 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 + } + } + } + + InstancePoolOperationListResult 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(InstancePoolOperationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstancePoolOperationListResult(document.RootElement, options); + } + + internal static InstancePoolOperationListResult DeserializeInstancePoolOperationListResult(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(SqlInstancePoolOperationData.DeserializeSqlInstancePoolOperationData(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 InstancePoolOperationListResult(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, AzureResourceManagerSqlContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(InstancePoolOperationListResult)} does not support writing '{options.Format}' format."); + } + } + + InstancePoolOperationListResult 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 DeserializeInstancePoolOperationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstancePoolOperationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.cs new file mode 100644 index 000000000000..a1e20c81bc3d --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/InstancePoolOperationListResult.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.Sql.Models +{ + /// The response to a list instance pool operations request. + internal partial class InstancePoolOperationListResult + { + /// + /// 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 InstancePoolOperationListResult() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Array of results. + /// Link to retrieve next page of results. + /// Keeps track of any properties unknown to the library. + internal InstancePoolOperationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Array of results. + public IReadOnlyList Value { get; } + /// Link to retrieve next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs index 8f0ced8ff4dc..05e7826c0b34 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.Serialization.cs @@ -134,6 +134,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageThroughputMBps"u8); writer.WriteNumberValue(StorageThroughputMBps.Value); } + if (Optional.IsDefined(TotalMemoryInMB)) + { + writer.WritePropertyName("totalMemoryMB"u8); + writer.WriteNumberValue(TotalMemoryInMB.Value); + } if (Optional.IsDefined(Collation)) { writer.WritePropertyName("collation"u8); @@ -320,6 +325,7 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement int? storageSizeInGB = default; int? storageIOps = default; int? storageThroughputMBps = default; + int? totalMemoryMB = default; string collation = default; string dnsZone = default; ResourceIdentifier dnsZonePartner = default; @@ -510,6 +516,15 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement storageThroughputMBps = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("totalMemoryMB"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalMemoryMB = property0.Value.GetInt32(); + continue; + } if (property0.NameEquals("collation"u8)) { collation = property0.Value.GetString(); @@ -752,6 +767,7 @@ internal static ManagedInstancePatch DeserializeManagedInstancePatch(JsonElement storageSizeInGB, storageIOps, storageThroughputMBps, + totalMemoryMB, collation, dnsZone, dnsZonePartner, diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs index 81de4567401b..df202e6f36e1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/ManagedInstancePatch.cs @@ -79,6 +79,7 @@ public ManagedInstancePatch() /// Storage size in GB. Minimum value: 32. Maximum value: 16384. Increments of 32 GB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage IOps. Minimum value: 300. Maximum value: 80000. Increments of 1 IOps allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Storage throughput MBps parameter is not supported in the instance create/update operation. + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. /// Collation of the managed instance. /// The Dns Zone that the managed instance is in. /// The resource id of another managed instance whose DNS zone this managed instance will share after creation. @@ -112,7 +113,7 @@ public ManagedInstancePatch() /// The managed instance's authentication metadata lookup mode. /// Specifies the internal format of instance databases specific to the SQL engine version. /// Keeps track of any properties unknown to the library. - internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDictionary tags, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) + internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDictionary tags, ManagedInstancePropertiesProvisioningState? provisioningState, ManagedServerCreateMode? managedInstanceCreateMode, string fullyQualifiedDomainName, bool? isGeneralPurposeV2, string administratorLogin, string administratorLoginPassword, ResourceIdentifier subnetId, string state, ManagedInstanceLicenseType? licenseType, HybridSecondaryUsage? hybridSecondaryUsage, HybridSecondaryUsageDetected? hybridSecondaryUsageDetected, int? vCores, int? storageSizeInGB, int? storageIOps, int? storageThroughputMBps, int? totalMemoryInMB, string collation, string dnsZone, ResourceIdentifier managedDnsZonePartner, bool? isPublicDataEndpointEnabled, ResourceIdentifier sourceManagedInstanceId, DateTimeOffset? restorePointInTime, ManagedInstanceProxyOverride? proxyOverride, string timezoneId, ResourceIdentifier instancePoolId, ResourceIdentifier maintenanceConfigurationId, IReadOnlyList privateEndpointConnections, string minimalTlsVersion, SqlBackupStorageRedundancy? currentBackupStorageRedundancy, SqlBackupStorageRedundancy? requestedBackupStorageRedundancy, bool? isZoneRedundant, ResourceIdentifier primaryUserAssignedIdentityId, Uri keyId, ManagedInstanceExternalAdministrator administrators, SqlServicePrincipal servicePrincipal, ResourceIdentifier virtualClusterId, ExternalGovernanceStatus? externalGovernanceStatus, SqlManagedInstancePricingModel? pricingModel, DateTimeOffset? createOn, AuthMetadataLookupMode? authenticationMetadata, ManagedInstanceDatabaseFormat? databaseFormat, IDictionary serializedAdditionalRawData) { Sku = sku; Identity = identity; @@ -132,6 +133,7 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict StorageSizeInGB = storageSizeInGB; StorageIOps = storageIOps; StorageThroughputMBps = storageThroughputMBps; + TotalMemoryInMB = totalMemoryInMB; Collation = collation; DnsZone = dnsZone; ManagedDnsZonePartner = managedDnsZonePartner; @@ -220,6 +222,9 @@ internal ManagedInstancePatch(SqlSku sku, ManagedServiceIdentity identity, IDict /// Storage throughput MBps parameter is not supported in the instance create/update operation. [WirePath("properties.storageThroughputMBps")] public int? StorageThroughputMBps { get; set; } + /// Total memory in MB. Minimum value: 7168. Maximum value: 891328. Increments of 1 MB allowed only. Maximum value depends on the selected hardware family and number of vCores. + [WirePath("properties.totalMemoryMB")] + public int? TotalMemoryInMB { get; set; } /// Collation of the managed instance. [WirePath("properties.collation")] public string Collation { get; set; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseExtension.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseExtension.cs index 65dd140b1b7f..ae901794a626 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseExtension.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlDatabaseExtension.cs @@ -58,12 +58,12 @@ public SqlDatabaseExtension() /// The resourceType. /// The systemData. /// Operation mode of the operation: Import, Export, or PolybaseImport. - /// Storage key type: StorageAccessKey or SharedAccessKey. - /// Storage key for the storage account. + /// Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. /// Storage Uri for the storage account. - /// Administrator login name. - /// Administrator login password. - /// Authentication type: SQL authentication or AD password. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. + /// Authentication type used to access the SQL: Sql, ADPassword or ManagedIdentity. /// Database edition for the newly created database in the case of an import operation. /// Database service level objective for the newly created database in the case of an import operation. /// Database max size in bytes for the newly created database in the case of an import operation. @@ -88,22 +88,22 @@ internal SqlDatabaseExtension(ResourceIdentifier id, string name, ResourceType r /// Operation mode of the operation: Import, Export, or PolybaseImport. [WirePath("properties.operationMode")] public DatabaseExtensionOperationMode? OperationMode { get; set; } - /// Storage key type: StorageAccessKey or SharedAccessKey. + /// Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. [WirePath("properties.storageKeyType")] public StorageKeyType? StorageKeyType { get; set; } - /// Storage key for the storage account. + /// Storage key for the storage account. If StorageKeyType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("properties.storageKey")] public string StorageKey { get; set; } /// Storage Uri for the storage account. [WirePath("properties.storageUri")] public Uri StorageUri { get; set; } - /// Administrator login name. + /// Administrator login name. If AuthenticationType is ManagedIdentity, this field should specify the Managed Identity's resource ID. [WirePath("properties.administratorLogin")] public string AdministratorLogin { get; set; } - /// Administrator login password. + /// Administrator login password. If AuthenticationType is ManagedIdentity, this field should not be specified. [WirePath("properties.administratorLoginPassword")] public string AdministratorLoginPassword { get; set; } - /// Authentication type: SQL authentication or AD password. + /// Authentication type used to access the SQL: Sql, ADPassword or ManagedIdentity. [WirePath("properties.authenticationType")] public string AuthenticationType { get; set; } /// Database edition for the newly created database in the case of an import operation. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlInstancePoolOperationErrorType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlInstancePoolOperationErrorType.cs new file mode 100644 index 000000000000..50d4d6af02f4 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/SqlInstancePoolOperationErrorType.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.Sql.Models +{ + /// Error type (e.g. None, User). + public readonly partial struct SqlInstancePoolOperationErrorType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SqlInstancePoolOperationErrorType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string UserValue = "User"; + + /// None. + public static SqlInstancePoolOperationErrorType None { get; } = new SqlInstancePoolOperationErrorType(NoneValue); + /// User. + public static SqlInstancePoolOperationErrorType User { get; } = new SqlInstancePoolOperationErrorType(UserValue); + /// Determines if two values are the same. + public static bool operator ==(SqlInstancePoolOperationErrorType left, SqlInstancePoolOperationErrorType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SqlInstancePoolOperationErrorType left, SqlInstancePoolOperationErrorType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SqlInstancePoolOperationErrorType(string value) => new SqlInstancePoolOperationErrorType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SqlInstancePoolOperationErrorType other && Equals(other); + /// + public bool Equals(SqlInstancePoolOperationErrorType 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/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/StorageKeyType.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/StorageKeyType.cs index 6786a00aecd1..61963ef0487d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/StorageKeyType.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/Models/StorageKeyType.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Sql.Models { - /// Storage key type: StorageAccessKey or SharedAccessKey. + /// Storage key type: StorageAccessKey, SharedAccessKey or ManagedIdentity. public readonly partial struct StorageKeyType : IEquatable { private readonly string _value; @@ -24,11 +24,14 @@ public StorageKeyType(string value) private const string SharedAccessKeyValue = "SharedAccessKey"; private const string StorageAccessKeyValue = "StorageAccessKey"; + private const string ManagedIdentityValue = "ManagedIdentity"; /// SharedAccessKey. public static StorageKeyType SharedAccessKey { get; } = new StorageKeyType(SharedAccessKeyValue); /// StorageAccessKey. public static StorageKeyType StorageAccessKey { get; } = new StorageKeyType(StorageAccessKeyValue); + /// ManagedIdentity. + public static StorageKeyType ManagedIdentity { get; } = new StorageKeyType(ManagedIdentityValue); /// Determines if two values are the same. public static bool operator ==(StorageKeyType left, StorageKeyType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleCollection.cs index c1bd5e481b6a..cd0bfc318ebb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string outboundRuleFqd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string outboundRuleFqdn, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string outboundRuleFqdn, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.Serialization.cs index 7c6123f17904..94420f0307e3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class OutboundFirewallRuleResource : IJsonModel { + private static OutboundFirewallRuleData s_dataDeserializationInstance; + private static OutboundFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - OutboundFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + OutboundFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); OutboundFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.cs index e309286d061a..cdbd729b579b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/OutboundFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionCollection.cs index 058dd4b2bac2..fdda98f47fbb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string r /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string recommendedActionN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string recommendedActionNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string recommendedActionName, CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.Serialization.cs index 88907af9eacd..f07e32f17cbd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.Serialization.cs @@ -181,14 +181,26 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsCollectionDefined(AdditionalDetails)) + if (options.Format != "W" && Optional.IsCollectionDefined(ActionDetails)) { writer.WritePropertyName("details"u8); writer.WriteStartObject(); - foreach (var item in AdditionalDetails) + foreach (var item in ActionDetails) { writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); + 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(); } @@ -243,7 +255,7 @@ internal static RecommendedActionData DeserializeRecommendedActionData(JsonEleme IReadOnlyList observedImpact = default; IReadOnlyList timeSeries = default; IReadOnlyList linkedObjects = default; - IReadOnlyDictionary details = default; + IReadOnlyDictionary details = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -515,10 +527,17 @@ internal static RecommendedActionData DeserializeRecommendedActionData(JsonEleme { continue; } - Dictionary dictionary = new Dictionary(); + Dictionary dictionary = new Dictionary(); foreach (var property1 in property0.Value.EnumerateObject()) { - dictionary.Add(property1.Name, property1.Value.GetString()); + if (property1.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property1.Name, null); + } + else + { + dictionary.Add(property1.Name, BinaryData.FromString(property1.Value.GetRawText())); + } } details = dictionary; continue; @@ -561,7 +580,7 @@ internal static RecommendedActionData DeserializeRecommendedActionData(JsonEleme observedImpact ?? new ChangeTrackingList(), timeSeries ?? new ChangeTrackingList(), linkedObjects ?? new ChangeTrackingList(), - details ?? new ChangeTrackingDictionary(), + details ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } @@ -1063,7 +1082,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(AdditionalDetails), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ActionDetails), out propertyOverride); if (hasPropertyOverride) { builder.Append(" details: "); @@ -1071,13 +1090,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(AdditionalDetails)) + if (Optional.IsCollectionDefined(ActionDetails)) { - if (AdditionalDetails.Any()) + if (ActionDetails.Any()) { builder.Append(" details: "); builder.AppendLine("{"); - foreach (var item in AdditionalDetails) + foreach (var item in ActionDetails) { builder.Append($" '{item.Key}': "); if (item.Value == null) @@ -1085,15 +1104,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.Append("null"); continue; } - if (item.Value.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{item.Value}'''"); - } - else - { - builder.AppendLine($"'{item.Value}'"); - } + builder.AppendLine($"'{item.Value.ToString()}'"); } builder.AppendLine(" }"); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.cs index abb9ba8870c8..e65ef06bc9ac 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionData.cs @@ -58,7 +58,7 @@ public RecommendedActionData() ObservedImpact = new ChangeTrackingList(); TimeSeries = new ChangeTrackingList(); LinkedObjects = new ChangeTrackingList(); - AdditionalDetails = new ChangeTrackingDictionary(); + ActionDetails = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -90,9 +90,9 @@ public RecommendedActionData() /// Gets the observed/actual impact info for this recommended action e.g., Actual CPU gain, Actual Disk Space change. /// Gets the time series info of metrics for this recommended action e.g., CPU consumption time series. /// Gets the linked objects, if any. - /// Gets additional details specific to this recommended action. + /// Gets additional details specific to this recommended action. /// Keeps track of any properties unknown to the library. - internal RecommendedActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, AzureLocation? location, string recommendationReason, DateTimeOffset? validSince, DateTimeOffset? lastRefresh, RecommendedActionStateInfo state, bool? isExecutableAction, bool? isRevertableAction, bool? isArchivedAction, DateTimeOffset? executeActionStartOn, TimeSpan? executeActionDuration, DateTimeOffset? revertActionStartOn, TimeSpan? revertActionDuration, RecommendedActionInitiatedBy? executeActionInitiatedBy, DateTimeOffset? executeActionInitiatedOn, RecommendedActionInitiatedBy? revertActionInitiatedBy, DateTimeOffset? revertActionInitiatedOn, int? score, RecommendedActionImplementationInfo implementationDetails, RecommendedActionErrorInfo errorDetails, IReadOnlyList estimatedImpact, IReadOnlyList observedImpact, IReadOnlyList timeSeries, IReadOnlyList linkedObjects, IReadOnlyDictionary additionalDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal RecommendedActionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, AzureLocation? location, string recommendationReason, DateTimeOffset? validSince, DateTimeOffset? lastRefresh, RecommendedActionStateInfo state, bool? isExecutableAction, bool? isRevertableAction, bool? isArchivedAction, DateTimeOffset? executeActionStartOn, TimeSpan? executeActionDuration, DateTimeOffset? revertActionStartOn, TimeSpan? revertActionDuration, RecommendedActionInitiatedBy? executeActionInitiatedBy, DateTimeOffset? executeActionInitiatedOn, RecommendedActionInitiatedBy? revertActionInitiatedBy, DateTimeOffset? revertActionInitiatedOn, int? score, RecommendedActionImplementationInfo implementationDetails, RecommendedActionErrorInfo errorDetails, IReadOnlyList estimatedImpact, IReadOnlyList observedImpact, IReadOnlyList timeSeries, IReadOnlyList linkedObjects, IReadOnlyDictionary actionDetails, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Kind = kind; Location = location; @@ -118,7 +118,7 @@ internal RecommendedActionData(ResourceIdentifier id, string name, ResourceType ObservedImpact = observedImpact; TimeSeries = timeSeries; LinkedObjects = linkedObjects; - AdditionalDetails = additionalDetails; + ActionDetails = actionDetails; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -194,8 +194,37 @@ internal RecommendedActionData(ResourceIdentifier id, string name, ResourceType /// Gets the linked objects, if any. [WirePath("properties.linkedObjects")] public IReadOnlyList LinkedObjects { get; } - /// Gets additional details specific to this recommended action. + /// + /// Gets additional details specific to this recommended action. + /// + /// 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" }. + /// + /// + /// + /// [WirePath("properties.details")] - public IReadOnlyDictionary AdditionalDetails { get; } + public IReadOnlyDictionary ActionDetails { get; } } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.Serialization.cs index 105402601cb8..ef76815a1a35 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class RecommendedActionResource : IJsonModel { + private static RecommendedActionData s_dataDeserializationInstance; + private static RecommendedActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecommendedActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecommendedActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); RecommendedActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.cs index dfc1b5b41b23..ebb6d6f9cbef 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecommendedActionResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> UpdateAsync(Recom /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs index f8a6ff0ef4c1..04331ec7e0ec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string databaseName, st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string databaseName, strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string databaseName, string expand = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.Serialization.cs index 53958bf52c25..afb27e8c7588 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class RecoverableDatabaseResource : IJsonModel { + private static RecoverableDatabaseData s_dataDeserializationInstance; + private static RecoverableDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecoverableDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecoverableDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); RecoverableDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs index bc3b3d531fcc..0dbb3df21201 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableDatabaseResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseCollection.cs index 0419594cb426..6c1cee810424 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string recoverab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string recoverableDatabase /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string recoverableDatabaseName, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.Serialization.cs index ee4b68181b8a..235a6c4ecb89 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class RecoverableManagedDatabaseResource : IJsonModel { + private static RecoverableManagedDatabaseData s_dataDeserializationInstance; + private static RecoverableManagedDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecoverableManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecoverableManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); RecoverableManagedDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.cs index 0efcdc1819c5..f53377931522 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RecoverableManagedDatabaseResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupCollection.cs index 42d36980250f..2efa47c7d808 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupCollection.cs @@ -77,7 +77,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual AsyncPageable GetAl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual Pageable GetAll(boo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.Serialization.cs index 4da37132461a..54c5701ad574 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ResourceGroupLongTermRetentionBackupResource : IJsonModel { + private static LongTermRetentionBackupData s_dataDeserializationInstance; + private static LongTermRetentionBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); LongTermRetentionBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.cs index a92ec051b365..ac4850173012 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionBackupResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Change /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -453,7 +453,7 @@ public virtual ArmOperation CopyByResour /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -499,7 +499,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs index db524d4460be..a7f0c93b29cb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupCollection.cs @@ -77,7 +77,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual Pageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.Serialization.cs index be869fcc3537..f3129e66b6d0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ResourceGroupLongTermRetentionManagedInstanceBackupResource : IJsonModel { + private static ManagedInstanceLongTermRetentionBackupData s_dataDeserializationInstance; + private static ManagedInstanceLongTermRetentionBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceLongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceLongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceLongTermRetentionBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs index 41d1f29e4869..309f4062b51b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ResourceGroupLongTermRetentionManagedInstanceBackupResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/BackupShortTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/BackupShortTermRetentionPoliciesRestOperations.cs index a51dc7f07581..a4dcadd450a4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/BackupShortTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/BackupShortTermRetentionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public BackupShortTermRetentionPoliciesRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/CapabilitiesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/CapabilitiesRestOperations.cs index 65238cdd2fc4..b560ddac9431 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/CapabilitiesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/CapabilitiesRestOperations.cs @@ -32,7 +32,7 @@ public CapabilitiesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingPoliciesRestOperations.cs index 45e1c4f241a3..2b2041ab55dc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DataMaskingPoliciesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingRulesRestOperations.cs index b3769e90598b..426301040e15 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataMaskingRulesRestOperations.cs @@ -32,7 +32,7 @@ public DataMaskingRulesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataWarehouseUserActivitiesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataWarehouseUserActivitiesRestOperations.cs index bad2303d7df8..b46c5a779cb1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataWarehouseUserActivitiesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DataWarehouseUserActivitiesRestOperations.cs @@ -32,7 +32,7 @@ public DataWarehouseUserActivitiesRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvancedThreatProtectionSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvancedThreatProtectionSettingsRestOperations.cs index c4b1b2800ce0..27f77713a130 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvancedThreatProtectionSettingsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseAdvancedThreatProtectionSettingsRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvisorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvisorsRestOperations.cs index ddd6831cb8b1..a306f1ca91e0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvisorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAdvisorsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseAdvisorsRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAutomaticTuningRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAutomaticTuningRestOperations.cs index 8440d9c1159f..3b95f7288383 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAutomaticTuningRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseAutomaticTuningRestOperations.cs @@ -31,7 +31,7 @@ public DatabaseAutomaticTuningRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseBlobAuditingPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseBlobAuditingPoliciesRestOperations.cs index 6795ed91bdd2..17e7a77b10a0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseBlobAuditingPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseBlobAuditingPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseBlobAuditingPoliciesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseColumnsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseColumnsRestOperations.cs index ce760dbb0f5d..c1de0c3fd6c9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseColumnsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseColumnsRestOperations.cs @@ -33,7 +33,7 @@ public DatabaseColumnsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseEncryptionProtectorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseEncryptionProtectorsRestOperations.cs index d294bc636a09..5e64218bbdf2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseEncryptionProtectorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseEncryptionProtectorsRestOperations.cs @@ -31,7 +31,7 @@ public DatabaseEncryptionProtectorsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseExtensionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseExtensionsRestOperations.cs index a05a540735bb..6d30ffefd4bb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseExtensionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseExtensionsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseExtensionsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRecommendedActionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRecommendedActionsRestOperations.cs index b37d8e1cc9cf..5906c1e7eac3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRecommendedActionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRecommendedActionsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseRecommendedActionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs index 1c491aab3592..c99d82a21dc5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -78,7 +78,7 @@ internal HttpMessage CreateListByDatabaseRequest(string subscriptionId, string r /// Gets a list of operations performed on the database. /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group that contains the resource. /// The name of the server. /// The name of the database. /// The cancellation token to use. @@ -109,7 +109,7 @@ public async Task> ListByDatabaseAsync(str /// Gets a list of operations performed on the database. /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group that contains the resource. /// The name of the server. /// The name of the database. /// The cancellation token to use. @@ -261,7 +261,7 @@ internal HttpMessage CreateListByDatabaseNextPageRequest(string nextLink, string /// Gets a list of operations performed on the database. /// The URL to the next page of results. /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group that contains the resource. /// The name of the server. /// The name of the database. /// The cancellation token to use. @@ -294,7 +294,7 @@ public async Task> ListByDatabaseNextPageA /// Gets a list of operations performed on the database. /// The URL to the next page of results. /// The subscription ID that identifies an Azure subscription. - /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the resource group that contains the resource. /// The name of the server. /// The name of the database. /// The cancellation token to use. diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSchemasRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSchemasRestOperations.cs index f8995dd74648..9b6d99a0b054 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSchemasRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSchemasRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSchemasRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSecurityAlertPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSecurityAlertPoliciesRestOperations.cs index d010b0f1bc06..ac5e15a1b8cc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSecurityAlertPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSecurityAlertPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSecurityAlertPoliciesRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs index ad7a3d8f0a43..e7677d769542 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentBaselinesRestOperations(HttpPipeline pi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs index e384aebe9bd2..fa2c6b6a0c15 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations.cs @@ -31,7 +31,7 @@ public DatabaseSqlVulnerabilityAssessmentExecuteScanRestOperations(HttpPipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs index ea4a572d127e..0a4aebeeb3a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs index 9141537b7f10..73e972936d28 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScanResultRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentScanResultRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs index 6701eaa3f665..5089e7a9feec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentScansRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentScansRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs index 333781727f2d..29c42c7ccd88 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseSqlVulnerabilityAssessmentsSettingsRestOperations(HttpPipeline pi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseTablesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseTablesRestOperations.cs index 50fe976febbd..be4b2138b733 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseTablesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseTablesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseTablesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseUsagesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseUsagesRestOperations.cs index d883293ed10e..b409dedc07bf 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseUsagesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseUsagesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseUsagesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs index d534a973bffd..436c393b7d9f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPipeline p { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentScansRestOperations.cs index 439144579184..27b6c0d67ec1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentScansRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseVulnerabilityAssessmentScansRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentsRestOperations.cs index ef06daec94b9..add8920a1336 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabaseVulnerabilityAssessmentsRestOperations.cs @@ -32,7 +32,7 @@ public DatabaseVulnerabilityAssessmentsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs index d71eea42d535..74d0f457a7c6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DatabasesRestOperations.cs @@ -32,7 +32,7 @@ public DatabasesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DeletedServersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DeletedServersRestOperations.cs index 7bea7eab69e9..26c05edebe44 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DeletedServersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DeletedServersRestOperations.cs @@ -32,7 +32,7 @@ public DeletedServersRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs index 96116b6da93c..544436d49cbd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/DistributedAvailabilityGroupsRestOperations.cs @@ -32,7 +32,7 @@ public DistributedAvailabilityGroupsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolRestOperations.cs index 943984fa421e..4ed5f4696537 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolRestOperations.cs @@ -32,7 +32,7 @@ public ElasticPoolRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs index 60ba44c4d6ce..aeba1ade0d41 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ElasticPoolsRestOperations.cs @@ -32,7 +32,7 @@ public ElasticPoolsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EncryptionProtectorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EncryptionProtectorsRestOperations.cs index a858346e47b6..64fe57383bfb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EncryptionProtectorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EncryptionProtectorsRestOperations.cs @@ -32,7 +32,7 @@ public EncryptionProtectorsRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EndpointCertificatesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EndpointCertificatesRestOperations.cs index 70eb454576a9..8ed117966dfb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EndpointCertificatesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/EndpointCertificatesRestOperations.cs @@ -32,7 +32,7 @@ public EndpointCertificatesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedDatabaseBlobAuditingPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedDatabaseBlobAuditingPoliciesRestOperations.cs index 78e0c253ca56..d4d497e96638 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedDatabaseBlobAuditingPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedDatabaseBlobAuditingPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ExtendedDatabaseBlobAuditingPoliciesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedServerBlobAuditingPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedServerBlobAuditingPoliciesRestOperations.cs index bed66a9f2c7d..8e3ce9910000 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedServerBlobAuditingPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ExtendedServerBlobAuditingPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ExtendedServerBlobAuditingPoliciesRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs index e34659aa7187..a1beaa5a1890 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FailoverGroupsRestOperations.cs @@ -32,7 +32,7 @@ public FailoverGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FirewallRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FirewallRulesRestOperations.cs index 646a0097dcfc..b9318853332f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FirewallRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public FirewallRulesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/GeoBackupPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/GeoBackupPoliciesRestOperations.cs index c8f0acf8b5b9..98cbe7255c37 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/GeoBackupPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/GeoBackupPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public GeoBackupPoliciesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs index ed3ef3e2fb9a..7d9f79cd8b96 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/IPv6FirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public IPv6FirewallRulesRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstanceFailoverGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstanceFailoverGroupsRestOperations.cs index 049b386e0eb2..46854f428da8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstanceFailoverGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstanceFailoverGroupsRestOperations.cs @@ -32,7 +32,7 @@ public InstanceFailoverGroupsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolRestOperations.cs new file mode 100644 index 000000000000..389a691a6a31 --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolRestOperations.cs @@ -0,0 +1,319 @@ +// 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.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + internal partial class InstancePoolRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of InstancePoolRestOperations. + /// 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 InstancePoolRestOperations(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-05-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByInstancePoolRequestUri(string subscriptionId, string resourceGroupName, string instancePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/instancePools/", false); + uri.AppendPath(instancePoolName, true); + uri.AppendPath("/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByInstancePoolRequest(string subscriptionId, string resourceGroupName, string instancePoolName) + { + 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.Sql/instancePools/", false); + uri.AppendPath(instancePoolName, true); + uri.AppendPath("/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a list of operations performed on the instance pool. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstancePoolAsync(string subscriptionId, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateListByInstancePoolRequest(subscriptionId, resourceGroupName, instancePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstancePoolOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstancePoolOperationListResult.DeserializeInstancePoolOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of operations performed on the instance pool. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstancePool(string subscriptionId, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateListByInstancePoolRequest(subscriptionId, resourceGroupName, instancePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstancePoolOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstancePoolOperationListResult.DeserializeInstancePoolOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instancePoolName, Guid operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Sql/instancePools/", false); + uri.AppendPath(instancePoolName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instancePoolName, Guid operationId) + { + 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.Sql/instancePools/", false); + uri.AppendPath(instancePoolName, true); + uri.AppendPath("/operations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets a management operation on a instance pool. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The to use. + /// 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 instancePoolName, Guid operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instancePoolName, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + SqlInstancePoolOperationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = SqlInstancePoolOperationData.DeserializeSqlInstancePoolOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SqlInstancePoolOperationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a management operation on a instance pool. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The to use. + /// 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 instancePoolName, Guid operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instancePoolName, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + SqlInstancePoolOperationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = SqlInstancePoolOperationData.DeserializeSqlInstancePoolOperationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((SqlInstancePoolOperationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstancePoolNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instancePoolName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByInstancePoolNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instancePoolName) + { + 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 a list of operations performed on the instance pool. + /// The URL to the next page of results. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstancePoolNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateListByInstancePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, instancePoolName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + InstancePoolOperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = InstancePoolOperationListResult.DeserializeInstancePoolOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets a list of operations performed on the instance pool. + /// The URL to the next page of results. + /// The subscription ID that identifies an Azure subscription. + /// The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. + /// The name of the managed instance pool. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstancePoolNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instancePoolName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instancePoolName, nameof(instancePoolName)); + + using var message = CreateListByInstancePoolNextPageRequest(nextLink, subscriptionId, resourceGroupName, instancePoolName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + InstancePoolOperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = InstancePoolOperationListResult.DeserializeInstancePoolOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolsRestOperations.cs index 475849998a29..9469a8e6e970 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/InstancePoolsRestOperations.cs @@ -32,7 +32,7 @@ public InstancePoolsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobAgentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobAgentsRestOperations.cs index 53d1ed2e2b09..634323ddde89 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobAgentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobAgentsRestOperations.cs @@ -32,7 +32,7 @@ public JobAgentsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobCredentialsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobCredentialsRestOperations.cs index dc1d00e185e4..5c47455d65e2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobCredentialsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobCredentialsRestOperations.cs @@ -32,7 +32,7 @@ public JobCredentialsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobExecutionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobExecutionsRestOperations.cs index f1a9e2a135b7..46dc7012cbee 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobExecutionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobExecutionsRestOperations.cs @@ -32,7 +32,7 @@ public JobExecutionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepExecutionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepExecutionsRestOperations.cs index 012dc816724c..2b82ca4f7fe0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepExecutionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepExecutionsRestOperations.cs @@ -32,7 +32,7 @@ public JobStepExecutionsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepsRestOperations.cs index d7324c761cb2..1c6872e7dfd4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobStepsRestOperations.cs @@ -32,7 +32,7 @@ public JobStepsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetExecutionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetExecutionsRestOperations.cs index e5e4d8c3c0e4..de49c00b4f03 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetExecutionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetExecutionsRestOperations.cs @@ -32,7 +32,7 @@ public JobTargetExecutionsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetGroupsRestOperations.cs index b1b3e67c3a91..12b40dcdf960 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobTargetGroupsRestOperations.cs @@ -32,7 +32,7 @@ public JobTargetGroupsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobVersionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobVersionsRestOperations.cs index 089d1ab62793..65210347ba82 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobVersionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobVersionsRestOperations.cs @@ -32,7 +32,7 @@ public JobVersionsRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobsRestOperations.cs index f164170f47d9..8b0cbabf4c4c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/JobsRestOperations.cs @@ -32,7 +32,7 @@ public JobsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LedgerDigestUploadsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LedgerDigestUploadsRestOperations.cs index fa1706165895..9792dccdad20 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LedgerDigestUploadsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LedgerDigestUploadsRestOperations.cs @@ -32,7 +32,7 @@ public LedgerDigestUploadsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs index b907a2bea2d5..9142ea4b5a27 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionBackupsRestOperations.cs @@ -32,7 +32,7 @@ public LongTermRetentionBackupsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionManagedInstanceBackupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionManagedInstanceBackupsRestOperations.cs index 3e47b2fbcac3..ac148762e497 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionManagedInstanceBackupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionManagedInstanceBackupsRestOperations.cs @@ -32,7 +32,7 @@ public LongTermRetentionManagedInstanceBackupsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs index de2d6273c8fd..9bb6992301a9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/LongTermRetentionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public LongTermRetentionPoliciesRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowOptionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowOptionsRestOperations.cs index fc9510d8f2c2..b617a100a108 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowOptionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowOptionsRestOperations.cs @@ -31,7 +31,7 @@ public MaintenanceWindowOptionsRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowsRestOperations.cs index e723fdde5fe6..47ac95c96b4b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/MaintenanceWindowsRestOperations.cs @@ -31,7 +31,7 @@ public MaintenanceWindowsRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedBackupShortTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedBackupShortTermRetentionPoliciesRestOperations.cs index d6edd92d0566..af26ed03323c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedBackupShortTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedBackupShortTermRetentionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedBackupShortTermRetentionPoliciesRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseAdvancedThreatProtectionSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseAdvancedThreatProtectionSettingsRestOperations.cs index 4e61fea3cf9e..d111d6c203cd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseAdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseAdvancedThreatProtectionSettingsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseAdvancedThreatProtectionSettingsRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseColumnsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseColumnsRestOperations.cs index cc67a5fc0287..87e89e402a10 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseColumnsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseColumnsRestOperations.cs @@ -33,7 +33,7 @@ public ManagedDatabaseColumnsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseQueriesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseQueriesRestOperations.cs index 3976bee31a94..5bcb4fed93ff 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseQueriesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseQueriesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseQueriesRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseRestoreDetailsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseRestoreDetailsRestOperations.cs index 44d166224160..3e9e0b0729a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseRestoreDetailsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseRestoreDetailsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseRestoreDetailsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSchemasRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSchemasRestOperations.cs index 59475d7b2896..ce14b9e87f95 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSchemasRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSchemasRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseSchemasRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityAlertPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityAlertPoliciesRestOperations.cs index ece15c247dea..b948a4f6fe05 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityAlertPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityAlertPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseSecurityAlertPoliciesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityEventsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityEventsRestOperations.cs index 2a481ee1dbbe..f58e3465bbf0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityEventsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSecurityEventsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseSecurityEventsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSensitivityLabelsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSensitivityLabelsRestOperations.cs index 7ba50f91730e..49b38e430980 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSensitivityLabelsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseSensitivityLabelsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseSensitivityLabelsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTablesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTablesRestOperations.cs index 96f88d532328..d9694be4ddb6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTablesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTablesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseTablesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTransparentDataEncryptionRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTransparentDataEncryptionRestOperations.cs index e22e079b5dc7..5f1ddb571525 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTransparentDataEncryptionRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseTransparentDataEncryptionRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseTransparentDataEncryptionRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs index 07e8ad079a0e..5874bf1e6756 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPip { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentScansRestOperations.cs index 46653e740137..23956fe73d2f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentScansRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseVulnerabilityAssessmentScansRestOperations(HttpPipeline pi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentsRestOperations.cs index e0395b1253a6..eef190a3cff1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabaseVulnerabilityAssessmentsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabaseVulnerabilityAssessmentsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs index 390eac2b6f67..e38ef0c113e4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedDatabasesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdministratorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdministratorsRestOperations.cs index dd419e427057..c61c01cfc3e0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdministratorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdministratorsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceAdministratorsRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdvancedThreatProtectionSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdvancedThreatProtectionSettingsRestOperations.cs index 6539ad6ad962..b4da404b1211 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAdvancedThreatProtectionSettingsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceAdvancedThreatProtectionSettingsRestOperations(HttpPipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAzureADOnlyAuthenticationsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAzureADOnlyAuthenticationsRestOperations.cs index e85869532bfb..e9bf9dd7dbab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAzureADOnlyAuthenticationsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceAzureADOnlyAuthenticationsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceAzureADOnlyAuthenticationsRestOperations(HttpPipeline pipe { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceDtcsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceDtcsRestOperations.cs index 9a8388db10ab..4dc8da8432f7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceDtcsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceDtcsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceDtcsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceEncryptionProtectorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceEncryptionProtectorsRestOperations.cs index 5566d0e69f20..cf19f0e705a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceEncryptionProtectorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceEncryptionProtectorsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceEncryptionProtectorsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceKeysRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceKeysRestOperations.cs index 7efa63be9f73..85b59fb66b5c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceKeysRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceKeysRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceKeysRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceLongTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceLongTermRetentionPoliciesRestOperations.cs index e0eab97236e3..054667685175 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceLongTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceLongTermRetentionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceLongTermRetentionPoliciesRestOperations(HttpPipeline pipel { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateEndpointConnectionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateEndpointConnectionsRestOperations.cs index e3122a7f9da0..0a3e20eb6b4d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateEndpointConnectionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstancePrivateEndpointConnectionsRestOperations(HttpPipeline pipe { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateLinkResourcesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateLinkResourcesRestOperations.cs index 8d44f80b8b00..a2f8c6a0508b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateLinkResourcesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancePrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstancePrivateLinkResourcesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceRestOperations.cs index 40a6cfbeb894..fa69da86349c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceTdeCertificatesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceTdeCertificatesRestOperations.cs index 0078332d433b..881a19d30600 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceTdeCertificatesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceTdeCertificatesRestOperations.cs @@ -31,7 +31,7 @@ public ManagedInstanceTdeCertificatesRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceVulnerabilityAssessmentsRestOperations.cs index b15ac7d667ee..aa6824d14c3d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstanceVulnerabilityAssessmentsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstanceVulnerabilityAssessmentsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs index 32079e5e8e96..a82f3ab63278 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedInstancesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedInstancesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedLedgerDigestUploadsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedLedgerDigestUploadsRestOperations.cs index 38c722ea3a19..8b1c56bffd47 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedLedgerDigestUploadsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedLedgerDigestUploadsRestOperations.cs @@ -32,7 +32,7 @@ public ManagedLedgerDigestUploadsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesRestOperations.cs index c1c794fac590..c952d796ce79 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedRestorableDroppedDatabaseBackupShortTermRetentionPoliciesRestOpera { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerDnsAliasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerDnsAliasesRestOperations.cs index b7e88cd590a2..d352d40b080a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerDnsAliasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerDnsAliasesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedServerDnsAliasesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerSecurityAlertPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerSecurityAlertPoliciesRestOperations.cs index ae61321e1941..fe11ba6d90b0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerSecurityAlertPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ManagedServerSecurityAlertPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ManagedServerSecurityAlertPoliciesRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs index 2220056ff31a..ffd15025c354 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -32,7 +32,7 @@ public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/OutboundFirewallRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/OutboundFirewallRulesRestOperations.cs index 4110c1200ab9..a67819a56536 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/OutboundFirewallRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/OutboundFirewallRulesRestOperations.cs @@ -32,7 +32,7 @@ public OutboundFirewallRulesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 0a080b38f799..51826789609e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/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 ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index 7f7d0ae88097..832d139d8ec3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/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 ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs index 6c575529b140..0e1d5089e98b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public RecoverableDatabasesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableManagedDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableManagedDatabasesRestOperations.cs index 22d97b1c4cf3..678f01a6c7fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableManagedDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RecoverableManagedDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public RecoverableManagedDatabasesRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs index 309f5c3f8643..51484fa1ee10 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ReplicationLinksRestOperations.cs @@ -32,7 +32,7 @@ public ReplicationLinksRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedDatabasesRestOperations.cs index 1649ba861ef8..1258051529a3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public RestorableDroppedDatabasesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedManagedDatabasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedManagedDatabasesRestOperations.cs index 111d3cbe068a..869235b045c8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedManagedDatabasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorableDroppedManagedDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public RestorableDroppedManagedDatabasesRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorePointsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorePointsRestOperations.cs index 0cfe341611ee..6318f9eb9774 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorePointsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/RestorePointsRestOperations.cs @@ -32,7 +32,7 @@ public RestorePointsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SensitivityLabelsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SensitivityLabelsRestOperations.cs index d7f169c8ffdb..b83441f4ca73 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SensitivityLabelsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SensitivityLabelsRestOperations.cs @@ -32,7 +32,7 @@ public SensitivityLabelsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvancedThreatProtectionSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvancedThreatProtectionSettingsRestOperations.cs index 75cfa9994ea5..769b2e33da06 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvancedThreatProtectionSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvancedThreatProtectionSettingsRestOperations.cs @@ -32,7 +32,7 @@ public ServerAdvancedThreatProtectionSettingsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvisorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvisorsRestOperations.cs index 971fcfde7803..4efa54ddde98 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvisorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAdvisorsRestOperations.cs @@ -32,7 +32,7 @@ public ServerAdvisorsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAutomaticTuningRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAutomaticTuningRestOperations.cs index bb51dcfb140f..f10b62681a69 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAutomaticTuningRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAutomaticTuningRestOperations.cs @@ -31,7 +31,7 @@ public ServerAutomaticTuningRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADAdministratorsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADAdministratorsRestOperations.cs index 34f1112633f3..5a3ac6ee15f7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADAdministratorsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADAdministratorsRestOperations.cs @@ -32,7 +32,7 @@ public ServerAzureADAdministratorsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADOnlyAuthenticationsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADOnlyAuthenticationsRestOperations.cs index 8a0a614dcc42..82b3223c56bc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADOnlyAuthenticationsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerAzureADOnlyAuthenticationsRestOperations.cs @@ -32,7 +32,7 @@ public ServerAzureADOnlyAuthenticationsRestOperations(HttpPipeline pipeline, str { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerBlobAuditingPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerBlobAuditingPoliciesRestOperations.cs index 910e45fb6c11..4afdeb94e74d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerBlobAuditingPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerBlobAuditingPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ServerBlobAuditingPoliciesRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConfigurationOptionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConfigurationOptionsRestOperations.cs index 753d0a99258a..4cc8470740be 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConfigurationOptionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConfigurationOptionsRestOperations.cs @@ -32,7 +32,7 @@ public ServerConfigurationOptionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConnectionPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConnectionPoliciesRestOperations.cs index f4b0ac181607..8ca382862c37 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConnectionPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerConnectionPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ServerConnectionPoliciesRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDevOpsAuditSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDevOpsAuditSettingsRestOperations.cs index 8630187612a9..6913940379f5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDevOpsAuditSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDevOpsAuditSettingsRestOperations.cs @@ -32,7 +32,7 @@ public ServerDevOpsAuditSettingsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDnsAliasesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDnsAliasesRestOperations.cs index 6762f2289c6d..fdacad463119 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDnsAliasesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerDnsAliasesRestOperations.cs @@ -32,7 +32,7 @@ public ServerDnsAliasesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerKeysRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerKeysRestOperations.cs index a72711a1b8e9..88600a8d0c53 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerKeysRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerKeysRestOperations.cs @@ -32,7 +32,7 @@ public ServerKeysRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerRestOperations.cs index a8c8468ef8b2..b6ac1a2a2070 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerRestOperations.cs @@ -32,7 +32,7 @@ public ServerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs index 2b6fc4859b0d..3c0ef1fedf68 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerSecurityAlertPoliciesRestOperations.cs @@ -32,7 +32,7 @@ public ServerSecurityAlertPoliciesRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustCertificatesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustCertificatesRestOperations.cs index d30427255676..743e8825ad9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustCertificatesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustCertificatesRestOperations.cs @@ -32,7 +32,7 @@ public ServerTrustCertificatesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustGroupsRestOperations.cs index 2824e4d3371f..86aad38d4b9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerTrustGroupsRestOperations.cs @@ -32,7 +32,7 @@ public ServerTrustGroupsRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerUsagesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerUsagesRestOperations.cs index 5d3ce734768f..9ef3f73e798d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerUsagesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerUsagesRestOperations.cs @@ -32,7 +32,7 @@ public ServerUsagesRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerVulnerabilityAssessmentsRestOperations.cs index 8d2f984d2046..d06b238f95e9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServerVulnerabilityAssessmentsRestOperations.cs @@ -32,7 +32,7 @@ public ServerVulnerabilityAssessmentsRestOperations(HttpPipeline pipeline, strin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs index 50adf9826494..f05361a78401 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/ServersRestOperations.cs @@ -32,7 +32,7 @@ public ServersRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlAgentRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlAgentRestOperations.cs index 2e9ee4b518e9..792967675198 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlAgentRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlAgentRestOperations.cs @@ -31,7 +31,7 @@ public SqlAgentRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs index bb36295fc3fb..6249ff8911ad 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselineRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentBaselineRestOperations(HttpPipeline pipeline, s { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs index 9e2776296a30..b7bb50cf83ea 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentBaselinesRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentBaselinesRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs index 6716ad4f6b54..1f002a3832d3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentExecuteScanRestOperations.cs @@ -31,7 +31,7 @@ public SqlVulnerabilityAssessmentExecuteScanRestOperations(HttpPipeline pipeline { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs index 54508d4706ba..3b1284bf436d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselineRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentRuleBaselineRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs index 5680500db09a..824c019ded75 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentRuleBaselinesRestOperations.cs @@ -31,7 +31,7 @@ public SqlVulnerabilityAssessmentRuleBaselinesRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs index c43f80142f21..1322b348b9b1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScanResultRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentScanResultRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs index c6513399dc40..70a0424ca1fe 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentScansRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentScansRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs index 706f3e1f472d..4513675c2439 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsRestOperations.cs @@ -31,7 +31,7 @@ public SqlVulnerabilityAssessmentsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs index ef74d132365a..4c800e06e192 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SqlVulnerabilityAssessmentsSettingsRestOperations.cs @@ -32,7 +32,7 @@ public SqlVulnerabilityAssessmentsSettingsRestOperations(HttpPipeline pipeline, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/StartStopManagedInstanceSchedulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/StartStopManagedInstanceSchedulesRestOperations.cs index f8982d02d831..5114804c1a58 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/StartStopManagedInstanceSchedulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/StartStopManagedInstanceSchedulesRestOperations.cs @@ -32,7 +32,7 @@ public StartStopManagedInstanceSchedulesRestOperations(HttpPipeline pipeline, st { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs index dc2d246fb9af..3a8f6cb072ec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SubscriptionUsagesRestOperations.cs @@ -32,7 +32,7 @@ public SubscriptionUsagesRestOperations(HttpPipeline pipeline, string applicatio { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SynapseLinkWorkspacesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SynapseLinkWorkspacesRestOperations.cs index 36130d085e43..0ea0cbff1e6e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SynapseLinkWorkspacesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SynapseLinkWorkspacesRestOperations.cs @@ -32,7 +32,7 @@ public SynapseLinkWorkspacesRestOperations(HttpPipeline pipeline, string applica { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncAgentsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncAgentsRestOperations.cs index 3f58fa6fe0dc..54fdaf65535d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncAgentsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncAgentsRestOperations.cs @@ -32,7 +32,7 @@ public SyncAgentsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncGroupsRestOperations.cs index 06d8b856c8ed..44c7b78d6e9c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncGroupsRestOperations.cs @@ -32,7 +32,7 @@ public SyncGroupsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncMembersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncMembersRestOperations.cs index 967e1e5e8b4a..c698cc3ba3b9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncMembersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/SyncMembersRestOperations.cs @@ -32,7 +32,7 @@ public SyncMembersRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TdeCertificatesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TdeCertificatesRestOperations.cs index 5f2181da3eb6..01e93f65f52f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TdeCertificatesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TdeCertificatesRestOperations.cs @@ -31,7 +31,7 @@ public TdeCertificatesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TimeZonesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TimeZonesRestOperations.cs index 42a52c3bb25f..794a3b54c5bc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TimeZonesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TimeZonesRestOperations.cs @@ -32,7 +32,7 @@ public TimeZonesRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TransparentDataEncryptionsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TransparentDataEncryptionsRestOperations.cs index 719cd55a535c..f052c11f8066 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TransparentDataEncryptionsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/TransparentDataEncryptionsRestOperations.cs @@ -32,7 +32,7 @@ public TransparentDataEncryptionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/UsagesRestOperations.cs index e56238523cc9..7a3ec79fe07a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/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 ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualClustersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualClustersRestOperations.cs index 696824e29ea9..2e933d4af075 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualClustersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualClustersRestOperations.cs @@ -32,7 +32,7 @@ public VirtualClustersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs index 1ef0f8dd0443..763008892fb8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/VirtualNetworkRulesRestOperations.cs @@ -32,7 +32,7 @@ public VirtualNetworkRulesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadClassifiersRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadClassifiersRestOperations.cs index bd0df26abbad..a919a8945c56 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadClassifiersRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadClassifiersRestOperations.cs @@ -32,7 +32,7 @@ public WorkloadClassifiersRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadGroupsRestOperations.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadGroupsRestOperations.cs index df552e406ed7..15f6b99b004a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadGroupsRestOperations.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestOperations/WorkloadGroupsRestOperations.cs @@ -32,7 +32,7 @@ public WorkloadGroupsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-08-01"; + _apiVersion = apiVersion ?? "2024-05-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseCollection.cs index d5168e2bcc7f..1fbe07d25465 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string restorable /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual async Task> ExistsAsync(string restorableDroppedDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response Exists(string restorableDroppedDatabaseId, string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.Serialization.cs index 6e8bde04a380..4786d158eb46 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class RestorableDroppedDatabaseResource : IJsonModel { + private static RestorableDroppedDatabaseData s_dataDeserializationInstance; + private static RestorableDroppedDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RestorableDroppedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RestorableDroppedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); RestorableDroppedDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.cs index 82df83e1767a..8710f80c0508 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedDatabaseResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseCollection.cs index 50ca03e85c38..c0d1518c80e3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string res /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string restorableDroppedDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string restorableDroppedDatabaseId, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.Serialization.cs index ca610185d848..421360e2afd5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class RestorableDroppedManagedDatabaseResource : IJsonModel { + private static RestorableDroppedManagedDatabaseData s_dataDeserializationInstance; + private static RestorableDroppedManagedDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RestorableDroppedManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RestorableDroppedManagedDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); RestorableDroppedManagedDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.cs index 02e7f2846ca7..3edee95a2570 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/RestorableDroppedManagedDatabaseResource.cs @@ -109,7 +109,7 @@ public virtual ManagedRestorableDroppedDbBackupShortTermRetentionPolicyCollectio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionCollection.cs index 1876222c7446..097a3f038e84 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(AdvancedThre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AdvancedThreatProtectionNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AdvancedThreatProtectionName advancedThreat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.Serialization.cs index 6c0671123f3b..1bc4d67ed7ef 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class ServerAdvancedThreatProtectionResource : IJsonModel { + private static ServerAdvancedThreatProtectionData s_dataDeserializationInstance; + private static ServerAdvancedThreatProtectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ServerAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ServerAdvancedThreatProtectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ServerAdvancedThreatProtectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.cs index 957863079b7e..9480c47e1c44 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/ServerAdvancedThreatProtectionResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.Serialization.cs index 126c53a4b10e..3770ab75dc10 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlAgentConfigurationResource : IJsonModel { + private static SqlAgentConfigurationData s_dataDeserializationInstance; + private static SqlAgentConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlAgentConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlAgentConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlAgentConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.cs index 382ed74b74ea..657619e6dd88 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlAgentConfigurationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorCollection.cs index b9c884af25e7..d269eb2e9b05 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string advisorName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(string expa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(string expand = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string advisorName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string advisorName, CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.Serialization.cs index cef0a439af9f..d807ebb572b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseAdvisorResource : IJsonModel { + private static SqlAdvisorData s_dataDeserializationInstance; + private static SqlAdvisorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlAdvisorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.cs index ff149ba3b5fa..45bb0b7a1e5c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAdvisorResource.cs @@ -109,7 +109,7 @@ public virtual RecommendedActionCollection GetRecommendedActions() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetRecommendedAct /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetRecommendedAction(string r /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> UpdateAsync(SqlA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.Serialization.cs index 63f89acbb509..a0a576a4672d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseAutomaticTuningResource : IJsonModel { + private static SqlDatabaseAutomaticTuningData s_dataDeserializationInstance; + private static SqlDatabaseAutomaticTuningData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlDatabaseAutomaticTuningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlDatabaseAutomaticTuningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlDatabaseAutomaticTuningData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.cs index e64bf90d677f..fc192aefa2bc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseAutomaticTuningResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyCollection.cs index bc43044f42bc..473e51f76be4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(BlobAuditingP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(BlobAuditingPolicyName blo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(BlobAuditingPolicyName blobAuditingPolicyNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.Serialization.cs index 5955c7247f37..ca0fa36cc16e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseBlobAuditingPolicyResource : IJsonModel { + private static SqlDatabaseBlobAuditingPolicyData s_dataDeserializationInstance; + private static SqlDatabaseBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlDatabaseBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlDatabaseBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlDatabaseBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.cs index d05769e100c3..f6362cd05ade 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseBlobAuditingPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseCollection.cs index 07c68d166f34..cd046552fb01 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string databas /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string databaseName, string exp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(string skipToken = /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Pageable GetAll(string skipToken = null, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -363,7 +363,7 @@ public virtual async Task> ExistsAsync(string databaseName, strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Exists(string databaseName, string expand = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -455,7 +455,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnCollection.cs index 4be70301fa64..f2431a28f54a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string columnName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string columnName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string columnName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.Serialization.cs index d328486024fa..b780fa76b11a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseColumnResource : IJsonModel { + private static DatabaseColumnData s_dataDeserializationInstance; + private static DatabaseColumnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseColumnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.cs index da62606e394f..875dbb6eb972 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseColumnResource.cs @@ -117,7 +117,7 @@ public virtual SqlDatabaseSensitivityLabelCollection GetSqlDatabaseSensitivityLa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetSqlD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -175,7 +175,7 @@ public virtual Response GetSqlDatabaseSensi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DisableRecommendationSensitivityLabelAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -331,7 +331,7 @@ public virtual Response DisableRecommendationSensitivityLabel(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task EnableRecommendationSensitivityLabelAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.Serialization.cs index b994b685cada..87b88bf5b555 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseResource : IJsonModel { + private static SqlDatabaseData s_dataDeserializationInstance; + private static SqlDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs index 24161b0526f8..9ab68d60560f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseResource.cs @@ -114,7 +114,7 @@ public virtual BackupShortTermRetentionPolicyCollection GetBackupShortTermRetent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetB /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual SqlDatabaseBlobAuditingPolicyCollection GetSqlDatabaseBlobAuditin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetSq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -244,7 +244,7 @@ public virtual ExtendedDatabaseBlobAuditingPolicyCollection GetExtendedDatabaseB /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -309,7 +309,7 @@ public virtual DataMaskingPolicyCollection GetDataMaskingPolicies() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -338,7 +338,7 @@ public virtual async Task> GetDataMaskingPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -374,7 +374,7 @@ public virtual DataWarehouseUserActivityCollection GetDataWarehouseUserActivitie /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task> GetDataWa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -439,7 +439,7 @@ public virtual DatabaseAdvancedThreatProtectionCollection GetDatabaseAdvancedThr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -468,7 +468,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -504,7 +504,7 @@ public virtual SqlDatabaseAdvisorCollection GetSqlDatabaseAdvisors() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -535,7 +535,7 @@ public virtual async Task> GetSqlDatabaseAd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -580,7 +580,7 @@ public virtual SqlDatabaseSchemaCollection GetSqlDatabaseSchemas() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -611,7 +611,7 @@ public virtual async Task> GetSqlDatabaseSch /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -649,7 +649,7 @@ public virtual SqlDatabaseSecurityAlertPolicyCollection GetSqlDatabaseSecurityAl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -678,7 +678,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -714,7 +714,7 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentCollection GetSqlDatabaseSql /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -743,7 +743,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -779,7 +779,7 @@ public virtual SqlDatabaseVulnerabilityAssessmentCollection GetSqlDatabaseVulner /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -808,7 +808,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -844,7 +844,7 @@ public virtual GeoBackupPolicyCollection GetGeoBackupPolicies() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -873,7 +873,7 @@ public virtual async Task> GetGeoBackupPolicyA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -909,7 +909,7 @@ public virtual LedgerDigestUploadCollection GetLedgerDigestUploads() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -938,7 +938,7 @@ public virtual async Task> GetLedgerDigestU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -974,7 +974,7 @@ public virtual LongTermRetentionPolicyCollection GetLongTermRetentionPolicies() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1003,7 +1003,7 @@ public virtual async Task> GetLongTerm /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1053,7 +1053,7 @@ public virtual SqlServerDatabaseReplicationLinkCollection GetSqlServerDatabaseRe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1084,7 +1084,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1122,7 +1122,7 @@ public virtual SqlServerDatabaseRestorePointCollection GetSqlServerDatabaseResto /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1153,7 +1153,7 @@ public virtual async Task> GetSq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1191,7 +1191,7 @@ public virtual SyncGroupCollection GetSyncGroups() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1222,7 +1222,7 @@ public virtual async Task> GetSyncGroupAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1260,7 +1260,7 @@ public virtual LogicalDatabaseTransparentDataEncryptionCollection GetLogicalData /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1289,7 +1289,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1325,7 +1325,7 @@ public virtual WorkloadGroupCollection GetWorkloadGroups() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1356,7 +1356,7 @@ public virtual async Task> GetWorkloadGroupAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1387,7 +1387,7 @@ public virtual Response GetWorkloadGroup(string workloadG /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1429,7 +1429,7 @@ public virtual async Task> GetAsync(string expand /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1471,7 +1471,7 @@ public virtual Response Get(string expand = null, string fi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1513,7 +1513,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1555,7 +1555,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1601,7 +1601,7 @@ public virtual async Task> UpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1647,7 +1647,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sql /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1682,7 +1682,7 @@ public virtual AsyncPageable GetDatabaseColumnsAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1717,7 +1717,7 @@ public virtual Pageable GetDatabaseColumns(IEnumerabl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1756,7 +1756,7 @@ public virtual async Task RevalidateDatabaseEncryptionProtectorAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1795,7 +1795,7 @@ public virtual ArmOperation RevalidateDatabaseEncryptionProtector(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1834,7 +1834,7 @@ public virtual async Task RevertDatabaseEncryptionProtectorAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1873,7 +1873,7 @@ public virtual ArmOperation RevertDatabaseEncryptionProtector(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1899,7 +1899,7 @@ public virtual AsyncPageable GetDatabaseE /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1925,7 +1925,7 @@ public virtual Pageable GetDatabaseExtens /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -1970,7 +1970,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2015,7 +2015,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2041,7 +2041,7 @@ public virtual AsyncPageable GetDatabaseOperationsAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2067,7 +2067,7 @@ public virtual Pageable GetDatabaseOperations(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2102,7 +2102,7 @@ public virtual async Task CancelDatabaseOperationAsync(Guid operationI /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2137,7 +2137,7 @@ public virtual Response CancelDatabaseOperation(Guid operationId, CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2163,7 +2163,7 @@ public virtual AsyncPageable GetDatabaseUsagesAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2189,7 +2189,7 @@ public virtual Pageable GetDatabaseUsages(CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2235,7 +2235,7 @@ public virtual async Task> ExportAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2281,7 +2281,7 @@ public virtual ArmOperation Export(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2324,7 +2324,7 @@ public virtual async Task FailoverAsync(WaitUntil waitUntil, Repli /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2367,7 +2367,7 @@ public virtual ArmOperation Failover(WaitUntil waitUntil, ReplicaType? replicaTy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2413,7 +2413,7 @@ public virtual async Task> ImportAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2459,7 +2459,7 @@ public virtual ArmOperation Import(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2501,7 +2501,7 @@ public virtual async Task RenameAsync(SqlResourceMoveDefinition sqlRes /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2543,7 +2543,7 @@ public virtual Response Rename(SqlResourceMoveDefinition sqlResourceMoveDefiniti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2585,7 +2585,7 @@ public virtual async Task> PauseAsync(WaitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2627,7 +2627,7 @@ public virtual ArmOperation Pause(WaitUntil waitUntil, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2669,7 +2669,7 @@ public virtual async Task> ResumeAsync(WaitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2711,7 +2711,7 @@ public virtual ArmOperation Resume(WaitUntil waitUntil, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2753,7 +2753,7 @@ public virtual async Task UpgradeDataWarehouseAsync(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2795,7 +2795,7 @@ public virtual ArmOperation UpgradeDataWarehouse(WaitUntil waitUntil, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2841,7 +2841,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2887,7 +2887,7 @@ public virtual ArmOperation CreateRestore /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2920,7 +2920,7 @@ public virtual AsyncPageable GetCurrentSens /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2953,7 +2953,7 @@ public virtual Pageable GetCurrentSensitivi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2995,7 +2995,7 @@ public virtual async Task UpdateSensitivityLabelAsync(SensitivityLabel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3037,7 +3037,7 @@ public virtual Response UpdateSensitivityLabel(SensitivityLabelUpdateList sensit /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3070,7 +3070,7 @@ public virtual AsyncPageable GetRecommended /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3103,7 +3103,7 @@ public virtual Pageable GetRecommendedSensi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3145,7 +3145,7 @@ public virtual async Task UpdateRecommendedSensitivityLabelAsync(Recom /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3187,7 +3187,7 @@ public virtual Response UpdateRecommendedSensitivityLabel(RecommendedSensitivity /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3218,7 +3218,7 @@ public virtual AsyncPageable GetSensitivity /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3249,7 +3249,7 @@ public virtual Pageable GetSensitivityLabel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3275,7 +3275,7 @@ public virtual AsyncPageable GetSynapseLinkWorkspacesAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -3301,7 +3301,7 @@ public virtual Pageable GetSynapseLinkWorkspaces(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3363,7 +3363,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3425,7 +3425,7 @@ public virtual Response AddTag(string key, string value, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3482,7 +3482,7 @@ public virtual async Task> SetTagsAsync(IDictionar /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3539,7 +3539,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3599,7 +3599,7 @@ public virtual async Task> RemoveTagAsync(string k /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaCollection.cs index 8d2e552f5e84..e11233e06f07 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string schemaName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string filte /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = null, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string schemaName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string schemaName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.Serialization.cs index 42725867463f..e38c18e2b58d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSchemaResource : IJsonModel { + private static DatabaseSchemaData s_dataDeserializationInstance; + private static DatabaseSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.cs index d416ba762723..0f3394014f5d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSchemaResource.cs @@ -109,7 +109,7 @@ public virtual SqlDatabaseTableCollection GetSqlDatabaseTables() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetSqlDatabaseTabl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetSqlDatabaseTable(string tab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyCollection.cs index 2d4873eafd93..2317a0d1f2e8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(SqlSecurityA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(SqlSecurityAlertPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(SqlSecurityAlertPolicyName securityAlertPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.Serialization.cs index 6981376f8b2f..5aaa8fc4afda 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSecurityAlertPolicyResource : IJsonModel { + private static SqlDatabaseSecurityAlertPolicyData s_dataDeserializationInstance; + private static SqlDatabaseSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlDatabaseSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlDatabaseSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlDatabaseSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.cs index 2239edc7030b..3841ac4ba46b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSecurityAlertPolicyResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelCollection.cs index 19b52d2a96ad..f57bfa7d87ff 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -240,7 +240,7 @@ public virtual Response Get(SensitivityLabe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> ExistsAsync(SensitivityLabelSource sen /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual Response Exists(SensitivityLabelSource sensitivityLabelSour /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.Serialization.cs index 1e193efddcb1..e94c121d4f58 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSensitivityLabelResource : IJsonModel { + private static SensitivityLabelData s_dataDeserializationInstance; + private static SensitivityLabelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SensitivityLabelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.cs index 557725f71589..ab9f2b902672 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSensitivityLabelResource.cs @@ -106,7 +106,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -186,7 +186,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -230,7 +230,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -322,7 +322,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs index c75fb8414cc7..29ffaead2cdc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(SqlVulnerabilityAssessment /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(SqlVulnerabilityAssessmentBaselineName base /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.Serialization.cs index 54130d4a287e..1bb7a806b1ae 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineResource : IJsonModel { + private static SqlVulnerabilityAssessmentBaselineData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentBaselineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentBaselineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs index 3bf4eb64988e..cf5998019285 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineResource.cs @@ -111,7 +111,7 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection GetSq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs index bcda50912b96..d5a7a3986d39 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string ruleId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ruleId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs index aaae6fbab2ae..a726da6c5a54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource : IJsonModel { + private static SqlVulnerabilityAssessmentBaselineRuleData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentBaselineRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentBaselineRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs index 60c8563f9e5e..ac2d1c5e8f3a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentCollection.cs index 9096f30eda51..40c6d5c3ba20 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(Vulne /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -177,7 +177,7 @@ public virtual AsyncPageable GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual Pageable GetAll(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -326,7 +326,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.Serialization.cs index d4335ce94ca9..fac4e8c74db0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSqlVulnerabilityAssessmentResource : IJsonModel { + private static SqlVulnerabilityAssessmentData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.cs index d5c5aa47b06c..82490e7bf051 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentResource.cs @@ -114,7 +114,7 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentBaselineCollection GetSqlDat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentScanCollection GetSqlDatabas /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response GetSq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -281,7 +281,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual Response Get(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -359,7 +359,7 @@ public virtual async Task ExecuteScanAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs index 7a3c0dc7a410..7addc94c56d0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.Serialization.cs index 9f420fbf2792..750789502b6d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSqlVulnerabilityAssessmentScanResource : IJsonModel { + private static SqlVulnerabilityAssessmentScanData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentScanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentScanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs index effae2cae3a0..e04031ac6d10 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResource.cs @@ -111,7 +111,7 @@ public virtual SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection GetSqlD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs index bf823c23acb1..e555eb880d19 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanResultId, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanResultId, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.Serialization.cs index c672bb6202f0..c779525375b0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseSqlVulnerabilityAssessmentScanResultResource : IJsonModel { + private static SqlVulnerabilityAssessmentScanResultData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentScanResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentScanResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentScanResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentScanResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs index a8c212674920..d1ca7d6e56c2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseSqlVulnerabilityAssessmentScanResultResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableCollection.cs index 14baf5e3541c..07aea9e3b541 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string ta /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string tableName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(string filter /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual Pageable GetAll(string filter = null, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -259,7 +259,7 @@ public virtual async Task> ExistsAsync(string tableName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual Response Exists(string tableName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -347,7 +347,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.Serialization.cs index 147127137877..e706d495b5ec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseTableResource : IJsonModel { + private static DatabaseTableData s_dataDeserializationInstance; + private static DatabaseTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.cs index 34c87a7b5f45..534d910317b6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseTableResource.cs @@ -110,7 +110,7 @@ public virtual SqlDatabaseColumnCollection GetSqlDatabaseColumns() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSqlDatabaseCol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetSqlDatabaseColumn(string c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentCollection.cs index 2ff208b3613e..22e0646b61c6 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Vulnerab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.Serialization.cs index d2ce59c8843d..671fc5cc3290 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseVulnerabilityAssessmentResource : IJsonModel { + private static DatabaseVulnerabilityAssessmentData s_dataDeserializationInstance; + private static DatabaseVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.cs index 73b6b2736125..4162b6f7459f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentResource.cs @@ -110,7 +110,7 @@ public virtual SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection GetSqlDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual SqlDatabaseVulnerabilityAssessmentScanCollection GetSqlDatabaseVu /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -243,7 +243,7 @@ public virtual Response GetSqlDa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -367,7 +367,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -411,7 +411,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -459,7 +459,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs index 067915ad07d1..67aa3e9c078c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual async Task> ExistsAsync(string ruleId, Vulnerabili /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual Response Exists(string ruleId, VulnerabilityAssessmentPolic /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -392,7 +392,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs index 611b05375635..a5e04c0e13a0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseVulnerabilityAssessmentRuleBaselineResource : IJsonModel { + private static DatabaseVulnerabilityAssessmentRuleBaselineData s_dataDeserializationInstance; + private static DatabaseVulnerabilityAssessmentRuleBaselineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DatabaseVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DatabaseVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); DatabaseVulnerabilityAssessmentRuleBaselineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs index c548290583eb..8db73f532f68 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentRuleBaselineResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -273,7 +273,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -321,7 +321,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanCollection.cs index 09303bf04c0a..cadcda13052a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.Serialization.cs index 8d78662dd150..ae5a9afddd53 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDatabaseVulnerabilityAssessmentScanResource : IJsonModel { + private static VulnerabilityAssessmentScanRecordData s_dataDeserializationInstance; + private static VulnerabilityAssessmentScanRecordData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); VulnerabilityAssessmentScanRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.cs index 093b5708eab2..31e8d944deec 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDatabaseVulnerabilityAssessmentScanResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -260,7 +260,7 @@ public virtual Response Export(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -302,7 +302,7 @@ public virtual async Task InitiateScanAsync(WaitUntil waitUntil, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupCollection.cs index ea0f81809ba4..5f6f4ee3bcf9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string dist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string distributedAvailabi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string distributedAvailabilityGroupName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.Serialization.cs index e21dc9289858..a4b20554aa56 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlDistributedAvailabilityGroupResource : IJsonModel { + private static SqlDistributedAvailabilityGroupData s_dataDeserializationInstance; + private static SqlDistributedAvailabilityGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlDistributedAvailabilityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlDistributedAvailabilityGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlDistributedAvailabilityGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.cs index af87799ef3ec..64fd61a3f94f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlDistributedAvailabilityGroupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -358,7 +358,7 @@ public virtual ArmOperation Update(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -404,7 +404,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual ArmOperation Failover(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -496,7 +496,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleCollection.cs index 134289f7b355..6eeb6fd5a1cc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string fir /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string firewallRuleName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string firewallRuleName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string firewallRuleName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.Serialization.cs index 7e7adf9bc040..904b0730b488 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlFirewallRuleResource : IJsonModel { + private static SqlFirewallRuleData s_dataDeserializationInstance; + private static SqlFirewallRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlFirewallRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlFirewallRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.cs index 67eb1065b87a..80d92ba4012f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlFirewallRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task> UpdateAsync(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationCollection.cs new file mode 100644 index 000000000000..9dfe4065c5cc --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationCollection.cs @@ -0,0 +1,371 @@ +// 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.Sql +{ + /// + /// 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 GetSqlInstancePoolOperations method from an instance of . + /// + public partial class SqlInstancePoolOperationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics; + private readonly InstancePoolRestOperations _sqlInstancePoolOperationInstancePoolOperationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected SqlInstancePoolOperationCollection() + { + } + + /// 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 SqlInstancePoolOperationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", SqlInstancePoolOperationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(SqlInstancePoolOperationResource.ResourceType, out string sqlInstancePoolOperationInstancePoolOperationsApiVersion); + _sqlInstancePoolOperationInstancePoolOperationsRestClient = new InstancePoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlInstancePoolOperationInstancePoolOperationsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != InstancePoolResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, InstancePoolResource.ResourceType), nameof(id)); + } + + /// + /// Gets a management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual async Task> GetAsync(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.Get"); + scope.Start(); + try + { + var response = await _sqlInstancePoolOperationInstancePoolOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual Response Get(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.Get"); + scope.Start(); + try + { + var response = _sqlInstancePoolOperationInstancePoolOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a list of operations performed on the instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations + /// + /// + /// Operation Id + /// InstancePoolOperations_ListByInstancePool + /// + /// + /// Default Api Version + /// 2024-05-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) => _sqlInstancePoolOperationInstancePoolOperationsRestClient.CreateListByInstancePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlInstancePoolOperationInstancePoolOperationsRestClient.CreateListByInstancePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new SqlInstancePoolOperationResource(Client, SqlInstancePoolOperationData.DeserializeSqlInstancePoolOperationData(e)), _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics, Pipeline, "SqlInstancePoolOperationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Gets a list of operations performed on the instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations + /// + /// + /// Operation Id + /// InstancePoolOperations_ListByInstancePool + /// + /// + /// Default Api Version + /// 2024-05-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) => _sqlInstancePoolOperationInstancePoolOperationsRestClient.CreateListByInstancePoolRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _sqlInstancePoolOperationInstancePoolOperationsRestClient.CreateListByInstancePoolNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new SqlInstancePoolOperationResource(Client, SqlInstancePoolOperationData.DeserializeSqlInstancePoolOperationData(e)), _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics, Pipeline, "SqlInstancePoolOperationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual async Task> ExistsAsync(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.Exists"); + scope.Start(); + try + { + var response = await _sqlInstancePoolOperationInstancePoolOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, 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.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual Response Exists(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.Exists"); + scope.Start(); + try + { + var response = _sqlInstancePoolOperationInstancePoolOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, 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.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual async Task> GetIfExistsAsync(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _sqlInstancePoolOperationInstancePoolOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(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.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The to use. + /// The cancellation token to use. + public virtual NullableResponse GetIfExists(Guid operationId, CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _sqlInstancePoolOperationInstancePoolOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(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/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.Serialization.cs new file mode 100644 index 000000000000..560fe31cd38d --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.Serialization.cs @@ -0,0 +1,654 @@ +// Copyright (c) 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.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + public partial class SqlInstancePoolOperationData : 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(SqlInstancePoolOperationData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("properties"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(InstancePoolName)) + { + writer.WritePropertyName("instancePoolName"u8); + writer.WriteStringValue(InstancePoolName); + } + if (options.Format != "W" && Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation); + } + if (options.Format != "W" && Optional.IsDefined(OperationFriendlyName)) + { + writer.WritePropertyName("operationFriendlyName"u8); + writer.WriteStringValue(OperationFriendlyName); + } + if (options.Format != "W" && Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + if (options.Format != "W" && Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(State)) + { + writer.WritePropertyName("state"u8); + writer.WriteStringValue(State.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(ErrorCode)) + { + writer.WritePropertyName("errorCode"u8); + writer.WriteNumberValue(ErrorCode.Value); + } + if (options.Format != "W" && Optional.IsDefined(ErrorDescription)) + { + writer.WritePropertyName("errorDescription"u8); + writer.WriteStringValue(ErrorDescription); + } + if (options.Format != "W" && Optional.IsDefined(ErrorSeverity)) + { + writer.WritePropertyName("errorSeverity"u8); + writer.WriteNumberValue(ErrorSeverity.Value); + } + if (options.Format != "W" && Optional.IsDefined(ErrorType)) + { + writer.WritePropertyName("errorType"u8); + writer.WriteStringValue(ErrorType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(EstimatedCompleteOn)) + { + writer.WritePropertyName("estimatedCompletionTime"u8); + writer.WriteStringValue(EstimatedCompleteOn.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(IsCancellable)) + { + writer.WritePropertyName("isCancellable"u8); + writer.WriteBooleanValue(IsCancellable.Value); + } + writer.WriteEndObject(); + } + + SqlInstancePoolOperationData 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(SqlInstancePoolOperationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSqlInstancePoolOperationData(document.RootElement, options); + } + + internal static SqlInstancePoolOperationData DeserializeSqlInstancePoolOperationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + string instancePoolName = default; + string operation = default; + string operationFriendlyName = default; + int? percentComplete = default; + DateTimeOffset? startTime = default; + ManagementOperationState? state = default; + int? errorCode = default; + string errorDescription = default; + int? errorSeverity = default; + SqlInstancePoolOperationErrorType? errorType = default; + DateTimeOffset? estimatedCompletionTime = default; + string description = default; + bool? isCancellable = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("instancePoolName"u8)) + { + instancePoolName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("operation"u8)) + { + operation = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("operationFriendlyName"u8)) + { + operationFriendlyName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("percentComplete"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("startTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("state"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + state = new ManagementOperationState(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("errorCode"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorCode = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("errorDescription"u8)) + { + errorDescription = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("errorSeverity"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorSeverity = property0.Value.GetInt32(); + continue; + } + if (property0.NameEquals("errorType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + errorType = new SqlInstancePoolOperationErrorType(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("estimatedCompletionTime"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + estimatedCompletionTime = property0.Value.GetDateTimeOffset("O"); + continue; + } + if (property0.NameEquals("description"u8)) + { + description = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("isCancellable"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isCancellable = property0.Value.GetBoolean(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SqlInstancePoolOperationData( + id, + name, + type, + systemData, + instancePoolName, + operation, + operationFriendlyName, + percentComplete, + startTime, + state, + errorCode, + errorDescription, + errorSeverity, + errorType, + estimatedCompletionTime, + description, + isCancellable, + serializedAdditionalRawData); + } + + private BinaryData SerializeBicep(ModelReaderWriterOptions options) + { + StringBuilder builder = new StringBuilder(); + BicepModelReaderWriterOptions bicepOptions = options as BicepModelReaderWriterOptions; + IDictionary propertyOverrides = null; + bool hasObjectOverride = bicepOptions != null && bicepOptions.PropertyOverrides.TryGetValue(this, out propertyOverrides); + bool hasPropertyOverride = false; + string propertyOverride = null; + + builder.AppendLine("{"); + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Name), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" name: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Name)) + { + builder.Append(" name: "); + if (Name.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Name}'''"); + } + else + { + builder.AppendLine($"'{Name}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" id: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Id)) + { + builder.Append(" id: "); + builder.AppendLine($"'{Id.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(SystemData), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" systemData: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(SystemData)) + { + builder.Append(" systemData: "); + builder.AppendLine($"'{SystemData.ToString()}'"); + } + } + + builder.Append(" properties:"); + builder.AppendLine(" {"); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(InstancePoolName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" instancePoolName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(InstancePoolName)) + { + builder.Append(" instancePoolName: "); + if (InstancePoolName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{InstancePoolName}'''"); + } + else + { + builder.AppendLine($"'{InstancePoolName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Operation), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operation: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Operation)) + { + builder.Append(" operation: "); + if (Operation.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Operation}'''"); + } + else + { + builder.AppendLine($"'{Operation}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(OperationFriendlyName), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" operationFriendlyName: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(OperationFriendlyName)) + { + builder.Append(" operationFriendlyName: "); + if (OperationFriendlyName.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{OperationFriendlyName}'''"); + } + else + { + builder.AppendLine($"'{OperationFriendlyName}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(PercentComplete), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" percentComplete: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(PercentComplete)) + { + builder.Append(" percentComplete: "); + builder.AppendLine($"{PercentComplete.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(StartOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" startTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(StartOn)) + { + builder.Append(" startTime: "); + var formattedDateTimeString = TypeFormatters.ToString(StartOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(State), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" state: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(State)) + { + builder.Append(" state: "); + builder.AppendLine($"'{State.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorCode), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorCode: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorCode)) + { + builder.Append(" errorCode: "); + builder.AppendLine($"{ErrorCode.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorDescription), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorDescription: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorDescription)) + { + builder.Append(" errorDescription: "); + if (ErrorDescription.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{ErrorDescription}'''"); + } + else + { + builder.AppendLine($"'{ErrorDescription}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorSeverity), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorSeverity: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorSeverity)) + { + builder.Append(" errorSeverity: "); + builder.AppendLine($"{ErrorSeverity.Value}"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ErrorType), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" errorType: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(ErrorType)) + { + builder.Append(" errorType: "); + builder.AppendLine($"'{ErrorType.Value.ToString()}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EstimatedCompleteOn), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" estimatedCompletionTime: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(EstimatedCompleteOn)) + { + builder.Append(" estimatedCompletionTime: "); + var formattedDateTimeString = TypeFormatters.ToString(EstimatedCompleteOn.Value, "o"); + builder.AppendLine($"'{formattedDateTimeString}'"); + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Description), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" description: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Description)) + { + builder.Append(" description: "); + if (Description.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Description}'''"); + } + else + { + builder.AppendLine($"'{Description}'"); + } + } + } + + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCancellable), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" isCancellable: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(IsCancellable)) + { + builder.Append(" isCancellable: "); + var boolValue = IsCancellable.Value == true ? "true" : "false"; + builder.AppendLine($"{boolValue}"); + } + } + + 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, AzureResourceManagerSqlContext.Default); + case "bicep": + return SerializeBicep(options); + default: + throw new FormatException($"The model {nameof(SqlInstancePoolOperationData)} does not support writing '{options.Format}' format."); + } + } + + SqlInstancePoolOperationData 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 DeserializeSqlInstancePoolOperationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SqlInstancePoolOperationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.cs new file mode 100644 index 000000000000..24e88810210f --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationData.cs @@ -0,0 +1,136 @@ +// 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.Sql.Models; + +namespace Azure.ResourceManager.Sql +{ + /// + /// A class representing the SqlInstancePoolOperation data model. + /// A instance pool operation. + /// + public partial class SqlInstancePoolOperationData : 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 SqlInstancePoolOperationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The name of the instance pool the operation is being performed on. + /// The name of operation. + /// The friendly name of operation. + /// The percentage of the operation completed. + /// The operation start time. + /// The operation state. + /// The operation error code. + /// The operation error description. + /// The operation error severity. + /// Error type (e.g. None, User). + /// The estimated completion time of the operation. + /// The operation description. + /// Whether the operation can be cancelled. + /// Keeps track of any properties unknown to the library. + internal SqlInstancePoolOperationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string instancePoolName, string operation, string operationFriendlyName, int? percentComplete, DateTimeOffset? startOn, ManagementOperationState? state, int? errorCode, string errorDescription, int? errorSeverity, SqlInstancePoolOperationErrorType? errorType, DateTimeOffset? estimatedCompleteOn, string description, bool? isCancellable, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + InstancePoolName = instancePoolName; + Operation = operation; + OperationFriendlyName = operationFriendlyName; + PercentComplete = percentComplete; + StartOn = startOn; + State = state; + ErrorCode = errorCode; + ErrorDescription = errorDescription; + ErrorSeverity = errorSeverity; + ErrorType = errorType; + EstimatedCompleteOn = estimatedCompleteOn; + Description = description; + IsCancellable = isCancellable; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the instance pool the operation is being performed on. + [WirePath("properties.instancePoolName")] + public string InstancePoolName { get; } + /// The name of operation. + [WirePath("properties.operation")] + public string Operation { get; } + /// The friendly name of operation. + [WirePath("properties.operationFriendlyName")] + public string OperationFriendlyName { get; } + /// The percentage of the operation completed. + [WirePath("properties.percentComplete")] + public int? PercentComplete { get; } + /// The operation start time. + [WirePath("properties.startTime")] + public DateTimeOffset? StartOn { get; } + /// The operation state. + [WirePath("properties.state")] + public ManagementOperationState? State { get; } + /// The operation error code. + [WirePath("properties.errorCode")] + public int? ErrorCode { get; } + /// The operation error description. + [WirePath("properties.errorDescription")] + public string ErrorDescription { get; } + /// The operation error severity. + [WirePath("properties.errorSeverity")] + public int? ErrorSeverity { get; } + /// Error type (e.g. None, User). + [WirePath("properties.errorType")] + public SqlInstancePoolOperationErrorType? ErrorType { get; } + /// The estimated completion time of the operation. + [WirePath("properties.estimatedCompletionTime")] + public DateTimeOffset? EstimatedCompleteOn { get; } + /// The operation description. + [WirePath("properties.description")] + public string Description { get; } + /// Whether the operation can be cancelled. + [WirePath("properties.isCancellable")] + public bool? IsCancellable { get; } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.Serialization.cs new file mode 100644 index 000000000000..00933e36251d --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.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.Sql +{ + public partial class SqlInstancePoolOperationResource : IJsonModel + { + private static SqlInstancePoolOperationData s_dataDeserializationInstance; + private static SqlInstancePoolOperationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + SqlInstancePoolOperationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); + + SqlInstancePoolOperationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.cs new file mode 100644 index 000000000000..0aa388cb403a --- /dev/null +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlInstancePoolOperationResource.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.Sql +{ + /// + /// A Class representing a SqlInstancePoolOperation 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 GetSqlInstancePoolOperationResource method. + /// Otherwise you can get one from its parent resource using the GetSqlInstancePoolOperation method. + /// + public partial class SqlInstancePoolOperationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instancePoolName. + /// The operationId. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instancePoolName, Guid operationId) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics; + private readonly InstancePoolRestOperations _sqlInstancePoolOperationInstancePoolOperationsRestClient; + private readonly SqlInstancePoolOperationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Sql/instancePools/operations"; + + /// Initializes a new instance of the class for mocking. + protected SqlInstancePoolOperationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal SqlInstancePoolOperationResource(ArmClient client, SqlInstancePoolOperationData 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 SqlInstancePoolOperationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Sql", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string sqlInstancePoolOperationInstancePoolOperationsApiVersion); + _sqlInstancePoolOperationInstancePoolOperationsRestClient = new InstancePoolRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, sqlInstancePoolOperationInstancePoolOperationsApiVersion); +#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 SqlInstancePoolOperationData 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 management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationResource.Get"); + scope.Start(); + try + { + var response = await _sqlInstancePoolOperationInstancePoolOperationsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a management operation on a instance pool. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}/operations/{operationId} + /// + /// + /// Operation Id + /// InstancePoolOperations_Get + /// + /// + /// Default Api Version + /// 2024-05-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _sqlInstancePoolOperationInstancePoolOperationsClientDiagnostics.CreateScope("SqlInstancePoolOperationResource.Get"); + scope.Start(); + try + { + var response = _sqlInstancePoolOperationInstancePoolOperationsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Guid.Parse(Id.Name), cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new SqlInstancePoolOperationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationCollection.cs index fad6aaa2e26e..90c1ced0536b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string nspConfigName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string nspConfigName, CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.Serialization.cs index 3ee10b6d8f4b..1bce6cdd1cc3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -41,7 +41,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState); diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.cs index 99ec181d0ff8..dd183885953f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationData.cs @@ -78,9 +78,9 @@ internal SqlNetworkSecurityPerimeterConfigurationData(ResourceIdentifier id, str _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the provisioning state. + /// Gets or sets the provisioning state. [WirePath("properties.provisioningState")] - public string ProvisioningState { get; } + public string ProvisioningState { get; set; } /// Gets or sets the network security perimeter. [WirePath("properties.networkSecurityPerimeter")] public SqlNetworkSecurityPerimeterConfigPerimeter NetworkSecurityPerimeter { get; set; } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.Serialization.cs index 8c6e3ad68b90..2b7ade4322e4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlNetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static SqlNetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static SqlNetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlNetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlNetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlNetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.cs index 6a6b5e7a9fcf..56e760c67c3f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlNetworkSecurityPerimeterConfigurationResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionCollection.cs index bef3810c1a0e..f2837cfcf0d1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string private /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.Serialization.cs index fbd30f746021..916b20ef1014 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlPrivateEndpointConnectionResource : IJsonModel { + private static SqlPrivateEndpointConnectionData s_dataDeserializationInstance; + private static SqlPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.cs index 3753675c273e..ec26fafb5585 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.Serialization.cs index 0d0f57a230a8..24e8e8fd69a8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlPrivateLinkResource : IJsonModel { + private static SqlPrivateLinkResourceData s_dataDeserializationInstance; + private static SqlPrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlPrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlPrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.cs index cd4896b0c8a4..dcbdd78a1fc2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResourceCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResourceCollection.cs index 1fb8a907680b..efa0d0878d77 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResourceCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlPrivateLinkResourceCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string grou /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string groupName, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string groupName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string groupName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorCollection.cs index 37653a473e10..effe6a7ec17f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string ad /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string advisorName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(string expand /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(string expand = null, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string advisorName, Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string advisorName, CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.Serialization.cs index 267b5e3b5ad0..52d3740493e0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerAdvisorResource : IJsonModel { + private static SqlAdvisorData s_dataDeserializationInstance; + private static SqlAdvisorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlAdvisorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlAdvisorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.cs index ee716287c977..19399066fccd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAdvisorResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task> UpdateAsync(SqlAdv /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.Serialization.cs index 742af5a06509..6ac26329c6b5 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerAutomaticTuningResource : IJsonModel { + private static SqlServerAutomaticTuningData s_dataDeserializationInstance; + private static SqlServerAutomaticTuningData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerAutomaticTuningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerAutomaticTuningData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerAutomaticTuningData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.cs index 27b5da16f207..7ae81c435c92 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAutomaticTuningResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> UpdateAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorCollection.cs index f35b1a3133a6..6a5a3bcd481a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(SqlAdministra /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(SqlAdministratorName admin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(SqlAdministratorName administratorName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.Serialization.cs index 93da69be5de0..702935e91ec9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerAzureADAdministratorResource : IJsonModel { + private static SqlServerAzureADAdministratorData s_dataDeserializationInstance; + private static SqlServerAzureADAdministratorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerAzureADAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerAzureADAdministratorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerAzureADAdministratorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.cs index 036b6f86d5f1..68cd5cbb3fc1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADAdministratorResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationCollection.cs index be81fb375168..7271910880ab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(Authenti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(AuthenticationName authent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(AuthenticationName authenticationName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.Serialization.cs index 1ae0e9c1c041..08ad37d752f4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerAzureADOnlyAuthenticationResource : IJsonModel { + private static SqlServerAzureADOnlyAuthenticationData s_dataDeserializationInstance; + private static SqlServerAzureADOnlyAuthenticationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerAzureADOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerAzureADOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerAzureADOnlyAuthenticationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.cs index d564c2cb0e5c..3e35fd544c67 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerAzureADOnlyAuthenticationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyCollection.cs index 0fc5e7af1b2d..3589d313f16e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(BlobAuditingPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(BlobAuditingPolicyName blo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(BlobAuditingPolicyName blobAuditingPolicyNa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.Serialization.cs index 73d84ef213eb..1a68e0ab9e55 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerBlobAuditingPolicyResource : IJsonModel { + private static SqlServerBlobAuditingPolicyData s_dataDeserializationInstance; + private static SqlServerBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.cs index d75dafc36da2..d54e30846e18 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerBlobAuditingPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs index 5913acf0e4c7..26419dad2143 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync(string serverNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual Response Get(string serverName, string expand /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(string expand = null /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(string expand = null, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> ExistsAsync(string serverName, string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -405,7 +405,7 @@ public virtual Response Exists(string serverName, string expand = null, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -451,7 +451,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyCollection.cs index 7a98259d8b3c..2ae40c9d8469 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(ConnectionPolicyN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(ConnectionPolicyName conne /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(ConnectionPolicyName connectionPolicyName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.Serialization.cs index dfe16fcec1f5..a30114003ef0 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerConnectionPolicyResource : IJsonModel { + private static SqlServerConnectionPolicyData s_dataDeserializationInstance; + private static SqlServerConnectionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerConnectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerConnectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerConnectionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.cs index 3fc3d150286c..01d5650f65fc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerConnectionPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs index 13b10d63ba74..feac30a5b77c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string lin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string linkId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string linkId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.Serialization.cs index 27a74f66de72..d87ee4c1725e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerDatabaseReplicationLinkResource : IJsonModel { + private static SqlServerDatabaseReplicationLinkData s_dataDeserializationInstance; + private static SqlServerDatabaseReplicationLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerDatabaseReplicationLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerDatabaseReplicationLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerDatabaseReplicationLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs index 0cc1a45d267f..cafefd35a067 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseReplicationLinkResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(Wai /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Failover(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -485,7 +485,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointCollection.cs index 451e875bf453..76e227e1e0dd 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string restor /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string restorePointName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string restorePointName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.Serialization.cs index b2011889b7a4..0e915d8742af 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerDatabaseRestorePointResource : IJsonModel { + private static SqlServerDatabaseRestorePointData s_dataDeserializationInstance; + private static SqlServerDatabaseRestorePointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerDatabaseRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerDatabaseRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerDatabaseRestorePointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.cs index d8d472783c1a..ccd3d46f11d7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDatabaseRestorePointResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingCollection.cs index acc09df2794b..4468513be2ce 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string devOp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string devOpsAuditingSetti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string devOpsAuditingSettingsName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.Serialization.cs index 0c5c893794ae..ab474df4a87c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerDevOpsAuditingSettingResource : IJsonModel { + private static SqlServerDevOpsAuditingSettingData s_dataDeserializationInstance; + private static SqlServerDevOpsAuditingSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerDevOpsAuditingSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerDevOpsAuditingSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerDevOpsAuditingSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.cs index a04d2efb7074..a17534576904 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDevOpsAuditingSettingResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasCollection.cs index dd0725d6b89f..1bb2cd12d736 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -203,7 +203,7 @@ public virtual async Task> GetAsync(string d /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(string dnsAliasName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -278,7 +278,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -351,7 +351,7 @@ public virtual async Task> ExistsAsync(string dnsAliasName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -394,7 +394,7 @@ public virtual Response Exists(string dnsAliasName, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -439,7 +439,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.Serialization.cs index de81c66b1ccc..fc7a873eab1d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerDnsAliasResource : IJsonModel { + private static SqlServerDnsAliasData s_dataDeserializationInstance; + private static SqlServerDnsAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerDnsAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerDnsAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerDnsAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.cs index a145e442f733..41cc75a5433d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerDnsAliasResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -350,7 +350,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -396,7 +396,7 @@ public virtual async Task> AcquireAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentCollection.cs index 0ee775147885..6614b8f7d03c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string j /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string jobAgentName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string jobAgentName, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string jobAgentName, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.Serialization.cs index 9d501077d938..8c9713f96e58 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobAgentResource : IJsonModel { + private static SqlServerJobAgentData s_dataDeserializationInstance; + private static SqlServerJobAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs index 59c5d1dc58df..6b6231f89288 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobAgentResource.cs @@ -116,7 +116,7 @@ public virtual SqlServerJobCredentialCollection GetSqlServerJobCredentials() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task> GetSqlServer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual SqlServerJobTargetGroupCollection GetSqlServerJobTargetGroups() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -216,7 +216,7 @@ public virtual async Task> GetSqlServe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -254,7 +254,7 @@ public virtual SqlServerJobCollection GetSqlServerJobs() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> GetSqlServerJobAsync(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Response GetSqlServerJob(string jobName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -396,7 +396,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -438,7 +438,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -480,7 +480,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -526,7 +526,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -572,7 +572,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -605,7 +605,7 @@ public virtual AsyncPageable GetJobExecutionsByAg /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -638,7 +638,7 @@ public virtual Pageable GetJobExecutionsByAgent(S /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -700,7 +700,7 @@ public virtual async Task> AddTagAsync(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -762,7 +762,7 @@ public virtual Response AddTag(string key, string val /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -819,7 +819,7 @@ public virtual async Task> SetTagsAsync(IDic /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -876,7 +876,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -936,7 +936,7 @@ public virtual async Task> RemoveTagAsync(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCollection.cs index e4e96305064a..66789d35940e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string jobNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string jobName, CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string jobName, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string jobName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialCollection.cs index 94923e44e39f..dab412ca89c8 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string credentialNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string credentialName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string credentialName, CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.Serialization.cs index 3fe6e159a42c..1c7d0e8dc3de 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobCredentialResource : IJsonModel { + private static SqlServerJobCredentialData s_dataDeserializationInstance; + private static SqlServerJobCredentialData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobCredentialData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobCredentialData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.cs index c5898b27520b..0cc0da5ae830 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobCredentialResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionCollection.cs index 500522a84090..6959d9bd71f9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -156,7 +156,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -197,7 +197,7 @@ public virtual async Task> GetAsync(Guid /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -238,7 +238,7 @@ public virtual Response Get(Guid jobExecutionId, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(SqlServe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Pageable GetAll(SqlServerJobExecut /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -338,7 +338,7 @@ public virtual AsyncPageable GetJobTarg /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -372,7 +372,7 @@ public virtual Pageable GetJobTargetExe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -411,7 +411,7 @@ public virtual async Task> ExistsAsync(Guid jobExecutionId, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual Response Exists(Guid jobExecutionId, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -491,7 +491,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.Serialization.cs index 051843847a4b..572f35f48f87 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobExecutionResource : IJsonModel { + private static SqlServerJobExecutionData s_dataDeserializationInstance; + private static SqlServerJobExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.cs index e42d4ab7dacc..63e6cce0f96e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionResource.cs @@ -110,7 +110,7 @@ public virtual SqlServerJobExecutionStepCollection GetSqlServerJobExecutionSteps /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSqlSer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetSqlServerJobExecut /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Update(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -374,7 +374,7 @@ public virtual async Task CancelAsync(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepCollection.cs index af186fa6123b..ef4f1f1377c7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string stepName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(SqlS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -221,7 +221,7 @@ public virtual Pageable GetAll(SqlServerJobEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual async Task> ExistsAsync(string stepName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string stepName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.Serialization.cs index 048041a23543..174f25e211ad 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobExecutionStepResource : IJsonModel { + private static SqlServerJobExecutionData s_dataDeserializationInstance; + private static SqlServerJobExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.cs index 5ab6b9bfcee6..747b8c699ac9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepResource.cs @@ -111,7 +111,7 @@ public virtual SqlServerJobExecutionStepTargetCollection GetSqlServerJobExecutio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response GetSqlServerJob /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetCollection.cs index 18f6a5efd5b4..8d17a142998c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -106,7 +106,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual Response Get(Guid target /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(SqlServe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual async Task> ExistsAsync(Guid targetId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -291,7 +291,7 @@ public virtual Response Exists(Guid targetId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -332,7 +332,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.Serialization.cs index 76e407d3ecbb..9dfe109c86f9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobExecutionStepTargetResource : IJsonModel { + private static SqlServerJobExecutionData s_dataDeserializationInstance; + private static SqlServerJobExecutionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobExecutionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobExecutionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.cs index 6452aea2e75f..1e704a2eb75b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobExecutionStepTargetResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.Serialization.cs index e696802e270f..a94de81e4401 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobResource : IJsonModel { + private static SqlServerJobData s_dataDeserializationInstance; + private static SqlServerJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.cs index c47b4cc10bfa..c73fbcb01902 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobResource.cs @@ -114,7 +114,7 @@ public virtual SqlServerJobExecutionCollection GetSqlServerJobExecutions() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetSqlServerJ /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual SqlServerJobStepCollection GetSqlServerJobSteps() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetSqlServerJobSte /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual SqlServerJobVersionCollection GetSqlServerJobVersions() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -277,7 +277,7 @@ public virtual async Task> GetSqlServerJob /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -306,7 +306,7 @@ public virtual Response GetSqlServerJobVersion(int /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -386,7 +386,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -430,7 +430,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -474,7 +474,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -522,7 +522,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -570,7 +570,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -612,7 +612,7 @@ public virtual async Task> CreateJob /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepCollection.cs index deb4a77bcb6b..c36243a36888 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdate /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil w /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string stepName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string stepName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string stepName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExist /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.Serialization.cs index cca0a41636a5..41ebd7778385 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobStepResource : IJsonModel { + private static SqlServerJobStepData s_dataDeserializationInstance; + private static SqlServerJobStepData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobStepData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobStepData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobStepData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.cs index 69cad9a5e44f..e7a2bb3e8a51 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobStepResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task> UpdateAsync(Wa /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupCollection.cs index 113b55dce955..630fc52824ab 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateO /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string targetGroupN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string targetGroupName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string targetGroupName, CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.Serialization.cs index 1b5a501c8c1d..6be1bfc31da7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobTargetGroupResource : IJsonModel { + private static SqlServerJobTargetGroupData s_dataDeserializationInstance; + private static SqlServerJobTargetGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobTargetGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobTargetGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobTargetGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.cs index 45a1352a7177..30bebff522a9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobTargetGroupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task> UpdateA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionCollection.cs index 59048cf33452..65af46177e82 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -105,7 +105,7 @@ public virtual async Task> GetAsync(int jo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(int jobVersion, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -206,7 +206,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual async Task> ExistsAsync(int jobVersion, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual Response Exists(int jobVersion, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.Serialization.cs index de2badb8d54b..fc7b85ddb27b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobVersionResource : IJsonModel { + private static SqlServerJobVersionData s_dataDeserializationInstance; + private static SqlServerJobVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.cs index 1c17c85c34fd..11e10229fec1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionResource.cs @@ -110,7 +110,7 @@ public virtual SqlServerJobVersionStepCollection GetSqlServerJobVersionSteps() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetSqlServe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetSqlServerJobVersionS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepCollection.cs index 8f3836786068..1091b9b8f945 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(st /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string stepName, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string stepName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string stepName, CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.Serialization.cs index a469a83de3c4..3bb200bbce1f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerJobVersionStepResource : IJsonModel { + private static SqlServerJobStepData s_dataDeserializationInstance; + private static SqlServerJobStepData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerJobStepData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerJobStepData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerJobStepData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.cs index 83e5af505ad8..f391e9be884d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerJobVersionStepResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyCollection.cs index 8bab37670d7a..4f27eb51d4a9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string keyNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string keyName, CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string keyName, Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string keyName, CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.Serialization.cs index 9583e92905d9..eb42372f4600 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerKeyResource : IJsonModel { + private static SqlServerKeyData s_dataDeserializationInstance; + private static SqlServerKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.cs index 9d354a50e989..45323042290e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerKeyResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationT /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> UpdateAsync(WaitUn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.Serialization.cs index 533869863977..b97a008cd11e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerResource : IJsonModel { + private static SqlServerData s_dataDeserializationInstance; + private static SqlServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs index 11fd10e24aff..d45b0631fb34 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerResource.cs @@ -133,7 +133,7 @@ public virtual SqlServerBlobAuditingPolicyCollection GetSqlServerBlobAuditingPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual async Task> GetSqlS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -198,7 +198,7 @@ public virtual ExtendedServerBlobAuditingPolicyCollection GetExtendedServerBlobA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -263,7 +263,7 @@ public virtual SqlServerAdvisorCollection GetSqlServerAdvisors() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task> GetSqlServerAdviso /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -332,7 +332,7 @@ public virtual SqlServerSqlVulnerabilityAssessmentCollection GetSqlServerSqlVuln /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual SqlDatabaseCollection GetSqlDatabases() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -430,7 +430,7 @@ public virtual async Task> GetSqlDatabaseAsync(str /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -470,7 +470,7 @@ public virtual ElasticPoolCollection GetElasticPools() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -501,7 +501,7 @@ public virtual async Task> GetElasticPoolAsync(str /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -539,7 +539,7 @@ public virtual EncryptionProtectorCollection GetEncryptionProtectors() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -568,7 +568,7 @@ public virtual async Task> GetEncryptionPr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -604,7 +604,7 @@ public virtual FailoverGroupCollection GetFailoverGroups() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -635,7 +635,7 @@ public virtual async Task> GetFailoverGroupAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -673,7 +673,7 @@ public virtual SqlFirewallRuleCollection GetSqlFirewallRules() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -704,7 +704,7 @@ public virtual async Task> GetSqlFirewallRuleA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -742,7 +742,7 @@ public virtual IPv6FirewallRuleCollection GetIPv6FirewallRules() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -773,7 +773,7 @@ public virtual async Task> GetIPv6FirewallRul /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -811,7 +811,7 @@ public virtual SqlServerJobAgentCollection GetSqlServerJobAgents() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -842,7 +842,7 @@ public virtual async Task> GetSqlServerJobAg /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -880,7 +880,7 @@ public virtual SqlNetworkSecurityPerimeterConfigurationCollection GetSqlNetworkS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -911,7 +911,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -949,7 +949,7 @@ public virtual OutboundFirewallRuleCollection GetOutboundFirewallRules() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -980,7 +980,7 @@ public virtual async Task> GetOutboundFir /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1018,7 +1018,7 @@ public virtual SqlPrivateEndpointConnectionCollection GetSqlPrivateEndpointConne /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1049,7 +1049,7 @@ public virtual async Task> GetSql /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1087,7 +1087,7 @@ public virtual SqlPrivateLinkResourceCollection GetSqlPrivateLinkResources() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1118,7 +1118,7 @@ public virtual async Task> GetSqlPrivateLinkRes /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1156,7 +1156,7 @@ public virtual RecoverableDatabaseCollection GetRecoverableDatabases() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1189,7 +1189,7 @@ public virtual async Task> GetRecoverableD /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1229,7 +1229,7 @@ public virtual RestorableDroppedDatabaseCollection GetRestorableDroppedDatabases /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1262,7 +1262,7 @@ public virtual async Task> GetRestor /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1302,7 +1302,7 @@ public virtual ServerAdvancedThreatProtectionCollection GetServerAdvancedThreatP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1331,7 +1331,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1374,7 +1374,7 @@ public virtual SqlServerAzureADAdministratorCollection GetSqlServerAzureADAdmini /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1403,7 +1403,7 @@ public virtual async Task> GetSq /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1439,7 +1439,7 @@ public virtual SqlServerAzureADOnlyAuthenticationCollection GetSqlServerAzureADO /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1468,7 +1468,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1504,7 +1504,7 @@ public virtual SqlServerConnectionPolicyCollection GetSqlServerConnectionPolicie /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1533,7 +1533,7 @@ public virtual async Task> GetSqlSer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1569,7 +1569,7 @@ public virtual SqlServerDevOpsAuditingSettingCollection GetSqlServerDevOpsAuditi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1600,7 +1600,7 @@ public virtual async Task> GetS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1638,7 +1638,7 @@ public virtual SqlServerDnsAliasCollection GetSqlServerDnsAliases() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1669,7 +1669,7 @@ public virtual async Task> GetSqlServerDnsAl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1707,7 +1707,7 @@ public virtual SqlServerKeyCollection GetSqlServerKeys() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1738,7 +1738,7 @@ public virtual async Task> GetSqlServerKeyAsync(s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1776,7 +1776,7 @@ public virtual SqlServerSecurityAlertPolicyCollection GetSqlServerSecurityAlertP /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1805,7 +1805,7 @@ public virtual async Task> GetSql /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1841,7 +1841,7 @@ public virtual SqlServerVulnerabilityAssessmentCollection GetSqlServerVulnerabil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1870,7 +1870,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1906,7 +1906,7 @@ public virtual SyncAgentCollection GetSyncAgents() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1937,7 +1937,7 @@ public virtual async Task> GetSyncAgentAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -1975,7 +1975,7 @@ public virtual SqlServerVirtualNetworkRuleCollection GetSqlServerVirtualNetworkR /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2006,7 +2006,7 @@ public virtual async Task> GetSqlS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2037,7 +2037,7 @@ public virtual Response GetSqlServerVirtual /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2078,7 +2078,7 @@ public virtual async Task> GetAsync(string expand = /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2119,7 +2119,7 @@ public virtual Response Get(string expand = null, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2161,7 +2161,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2203,7 +2203,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2249,7 +2249,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2295,7 +2295,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SqlSe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2325,7 +2325,7 @@ public virtual AsyncPageable GetInaccessibleDatabasesAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2355,7 +2355,7 @@ public virtual Pageable GetInaccessibleDatabases(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2385,7 +2385,7 @@ public virtual AsyncPageable GetReplic /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2415,7 +2415,7 @@ public virtual Pageable GetReplication /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2441,7 +2441,7 @@ public virtual AsyncPageable GetServerOperationsAsync(Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2467,7 +2467,7 @@ public virtual Pageable GetServerOperations(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2493,7 +2493,7 @@ public virtual AsyncPageable GetServerUsagesAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2519,7 +2519,7 @@ public virtual Pageable GetServerUsages(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2565,7 +2565,7 @@ public virtual async Task> ImportDatab /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2611,7 +2611,7 @@ public virtual ArmOperation ImportDatabase(WaitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2653,7 +2653,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2695,7 +2695,7 @@ public virtual ArmOperation Refr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2737,7 +2737,7 @@ public virtual async Task CreateTdeCertificateAsync(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -2779,7 +2779,7 @@ public virtual ArmOperation CreateTdeCertificate(WaitUntil waitUntil, TdeCertifi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2841,7 +2841,7 @@ public virtual async Task> AddTagAsync(string key, s /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2903,7 +2903,7 @@ public virtual Response AddTag(string key, string value, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -2960,7 +2960,7 @@ public virtual async Task> SetTagsAsync(IDictionary< /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3017,7 +3017,7 @@ public virtual Response SetTags(IDictionary t /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -3077,7 +3077,7 @@ public virtual async Task> RemoveTagAsync(string key /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyCollection.cs index af8965b3a485..7e19185ef9b9 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -112,7 +112,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -159,7 +159,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -200,7 +200,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -241,7 +241,7 @@ public virtual Response Get(SqlSecurityAle /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -340,7 +340,7 @@ public virtual async Task> ExistsAsync(SqlSecurityAlertPolicyName /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -379,7 +379,7 @@ public virtual Response Exists(SqlSecurityAlertPolicyName securityAlertPol /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.Serialization.cs index 44aab0e1d5c8..7bae3588279d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSecurityAlertPolicyResource : IJsonModel { + private static SqlServerSecurityAlertPolicyData s_dataDeserializationInstance; + private static SqlServerSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.cs index bebc86787540..8d235e8ae80a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSecurityAlertPolicyResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs index fb5c11087d2d..8aef217be65d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineCollection.cs @@ -70,7 +70,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -119,7 +119,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -168,7 +168,7 @@ public virtual ArmOperation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -280,7 +280,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -310,7 +310,7 @@ public virtual Pageable Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> ExistsAsync(SqlVulnerabilityAssessment /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual Response Exists(SqlVulnerabilityAssessmentBaselineName base /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -429,7 +429,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.Serialization.cs index 52b5e99ed44f..b4e729227e97 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSqlVulnerabilityAssessmentBaselineResource : IJsonModel { + private static SqlVulnerabilityAssessmentBaselineData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentBaselineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentBaselineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.cs index 910cf85b19b4..bb304eeaef9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineResource.cs @@ -115,7 +115,7 @@ public virtual SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection GetSqlS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -146,7 +146,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -177,7 +177,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -217,7 +217,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs index 67c9aa0ac8f4..2d52316e5ef1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string ruleId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string ruleId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs index 1c98dfd053ce..a5a56c9d3a9a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSqlVulnerabilityAssessmentBaselineRuleResource : IJsonModel { + private static SqlVulnerabilityAssessmentBaselineRuleData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentBaselineRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentBaselineRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentBaselineRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs index 5c4d4b81a722..7426e2ae4975 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentBaselineRuleResource.cs @@ -109,7 +109,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -149,7 +149,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -189,7 +189,7 @@ public virtual Response /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -233,7 +233,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -325,7 +325,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentCollection.cs index 0c1f2fb5ebee..47a31e7edf7b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Vulnera /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.Serialization.cs index 7ddba42ec807..d078fc5251d1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSqlVulnerabilityAssessmentResource : IJsonModel { + private static SqlVulnerabilityAssessmentData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.cs index 4c1ac0ad5a89..a8fa82529f23 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentResource.cs @@ -118,7 +118,7 @@ public virtual SqlServerSqlVulnerabilityAssessmentBaselineCollection GetSqlServe /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -147,7 +147,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual SqlServerSqlVulnerabilityAssessmentScanCollection GetSqlServerSql /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response GetSqlS /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -325,7 +325,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -369,7 +369,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -413,7 +413,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -461,7 +461,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -509,7 +509,7 @@ public virtual ArmOperation Update( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// @@ -547,7 +547,7 @@ public virtual async Task ExecuteScanAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanCollection.cs index 936774cc9124..d5138f700d3a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(str /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanId, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanId, CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.Serialization.cs index 3842eba98e10..4956c80a597f 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSqlVulnerabilityAssessmentScanResource : IJsonModel { + private static SqlVulnerabilityAssessmentScanData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentScanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentScanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentScanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.cs index 604ec080c67d..200aa9aa7972 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResource.cs @@ -110,7 +110,7 @@ public virtual SqlServerSqlVulnerabilityAssessmentScanResultCollection GetSqlSer /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs index f5f48e9ced70..5f72c8be1788 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable G /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string scanResultId, Cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string scanResultId, CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.Serialization.cs index 610b1b9ad024..221ff130547e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerSqlVulnerabilityAssessmentScanResultResource : IJsonModel { + private static SqlVulnerabilityAssessmentScanResultData s_dataDeserializationInstance; + private static SqlVulnerabilityAssessmentScanResultData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVulnerabilityAssessmentScanResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVulnerabilityAssessmentScanResultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlVulnerabilityAssessmentScanResultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.cs index 811e2b9783f3..e8bc5a62115b 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerSqlVulnerabilityAssessmentScanResultResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupCollection.cs index 45a835edb480..3b836534ba67 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -117,7 +117,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string serverTrustGroup /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string serverTrustGroupNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string serverTrustGroupName, CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.Serialization.cs index 7481bee5c927..332c854bd7f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerTrustGroupResource : IJsonModel { + private static SqlServerTrustGroupData s_dataDeserializationInstance; + private static SqlServerTrustGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerTrustGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerTrustGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerTrustGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.cs index b84d156b53dd..2540dcae82a3 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerTrustGroupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleCollection.cs index adac6d097e43..b75754c562f1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string virtualN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string virtualNetworkRuleN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string virtualNetworkRuleName, Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.Serialization.cs index 4c602afdb060..f343516bf928 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerVirtualNetworkRuleResource : IJsonModel { + private static SqlServerVirtualNetworkRuleData s_dataDeserializationInstance; + private static SqlServerVirtualNetworkRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerVirtualNetworkRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerVirtualNetworkRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.cs index 2381e9129e42..9ccd21257ab1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVirtualNetworkRuleResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentCollection.cs index 26d15dcec8e9..88e7d7a857ff 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(Vulnerabil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(VulnerabilityAssessmentNam /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(VulnerabilityAssessmentName vulnerabilityAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.Serialization.cs index c2f38d1273b4..d0ae2919d763 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlServerVulnerabilityAssessmentResource : IJsonModel { + private static SqlServerVulnerabilityAssessmentData s_dataDeserializationInstance; + private static SqlServerVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlServerVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.cs index bded653471f5..e4d754e05e41 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlServerVulnerabilityAssessmentResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneCollection.cs index f39862b38101..e44a049cb6db 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string timeZon /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string timeZoneId, Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string timeZoneId, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string timeZoneId, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfExistsAsyn /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.Serialization.cs index 234fbc48456f..042bb8a755de 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SqlTimeZoneResource : IJsonModel { + private static SqlTimeZoneData s_dataDeserializationInstance; + private static SqlTimeZoneData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlTimeZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlTimeZoneData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SqlTimeZoneData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.cs index 19ceb41e0df0..7e4cbd96fe16 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SqlTimeZoneResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupCollection.cs index 9c43fa5fc0d9..5a863a2ea3cc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupCollection.cs @@ -77,7 +77,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual Pageable GetAll(bool /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.Serialization.cs index 1299e4ce24fd..9d7a336f96db 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SubscriptionLongTermRetentionBackupResource : IJsonModel { + private static LongTermRetentionBackupData s_dataDeserializationInstance; + private static LongTermRetentionBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - LongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + LongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); LongTermRetentionBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.cs index 7abb370e2ea4..d4c3f2f70762 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionBackupResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation ChangeA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -406,7 +406,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -452,7 +452,7 @@ public virtual ArmOperation Copy(WaitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -498,7 +498,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs index 624f25eafd77..8c5c6f7a8730 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupCollection.cs @@ -77,7 +77,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -122,7 +122,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -199,7 +199,7 @@ public virtual AsyncPageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual Pageable /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -274,7 +274,7 @@ public virtual async Task> ExistsAsync(string backupName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Response Exists(string backupName, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -362,7 +362,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.Serialization.cs index b064491f3173..042dc0d88afb 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SubscriptionLongTermRetentionManagedInstanceBackupResource : IJsonModel { + private static ManagedInstanceLongTermRetentionBackupData s_dataDeserializationInstance; + private static ManagedInstanceLongTermRetentionBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ManagedInstanceLongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ManagedInstanceLongTermRetentionBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); ManagedInstanceLongTermRetentionBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.cs index a6039aadfb10..51cf7d845a54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionLongTermRetentionManagedInstanceBackupResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageCollection.cs index 781d4493f8c1..3e51a521e348 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string u /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual Response Get(string usageName, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string usageName, Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string usageName, CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.Serialization.cs index 9d096bfd6b3e..a5ae2fc3905d 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SubscriptionUsageResource : IJsonModel { + private static SubscriptionUsageData s_dataDeserializationInstance; + private static SubscriptionUsageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionUsageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionUsageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SubscriptionUsageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.cs index 1c8df2748f0d..d3431327f058 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SubscriptionUsageResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentCollection.cs index 212c5b419456..6203e501e97a 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string syncAgent /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string syncAgentName, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string syncAgentName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string syncAgentName, CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.Serialization.cs index 78332c56690f..707a5941cafc 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SyncAgentResource : IJsonModel { + private static SyncAgentData s_dataDeserializationInstance; + private static SyncAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SyncAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SyncAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SyncAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.cs index 0369834f56ea..6e8e5b3e0cd1 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncAgentResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SyncA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -397,7 +397,7 @@ public virtual async Task> GenerateKeyAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -435,7 +435,7 @@ public virtual Response GenerateKey(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -465,7 +465,7 @@ public virtual AsyncPageable GetLinkedDatabasesAsync(Ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupCollection.cs index badfbd167f2c..5242696d4a54 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync(W /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string syncGroup /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string syncGroupName, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string syncGroupName, Canc /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string syncGroupName, CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.Serialization.cs index ddbfdba80f84..e83f8f2d4cef 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SyncGroupResource : IJsonModel { + private static SyncGroupData s_dataDeserializationInstance; + private static SyncGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SyncGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SyncGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SyncGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.cs index 59621184ea83..0c16f209960c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncGroupResource.cs @@ -111,7 +111,7 @@ public virtual SyncMemberCollection GetSyncMembers() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetSyncMemberAsync(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -173,7 +173,7 @@ public virtual Response GetSyncMember(string syncMemberName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetAsync(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(CancellationToken cancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -295,7 +295,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -337,7 +337,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual async Task> UpdateAsync(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -429,7 +429,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, SyncG /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -467,7 +467,7 @@ public virtual async Task CancelSyncAsync(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -505,7 +505,7 @@ public virtual Response CancelSync(CancellationToken cancellationToken = default /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -535,7 +535,7 @@ public virtual AsyncPageable GetHubSchemasAsync(Cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -565,7 +565,7 @@ public virtual Pageable GetHubSchemas(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -603,7 +603,7 @@ public virtual AsyncPageable GetLogsAsync(string startTi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -641,7 +641,7 @@ public virtual Pageable GetLogs(string startTime, string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -683,7 +683,7 @@ public virtual async Task RefreshHubSchemaAsync(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -725,7 +725,7 @@ public virtual ArmOperation RefreshHubSchema(WaitUntil waitUntil, CancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -763,7 +763,7 @@ public virtual async Task TriggerSyncAsync(CancellationToken cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberCollection.cs index 1afe23e42c0b..e4d92ede0f90 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string syncMemb /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string syncMemberName, Cancellat /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string syncMemberName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string syncMemberName, CancellationToken ca /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.Serialization.cs index 4719e73057f2..a3a3b7064bf4 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class SyncMemberResource : IJsonModel { + private static SyncMemberData s_dataDeserializationInstance; + private static SyncMemberData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SyncMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SyncMemberData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); SyncMemberData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.cs index fd154ca274bb..53a4569b1576 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/SyncMemberResource.cs @@ -105,7 +105,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -145,7 +145,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -315,7 +315,7 @@ public virtual async Task> UpdateAsync(WaitUnti /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -361,7 +361,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, Sync /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual async Task RefreshMemberSchemaAsync(WaitUntil waitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual ArmOperation RefreshMemberSchema(WaitUntil waitUntil, Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -475,7 +475,7 @@ public virtual AsyncPageable GetMemberSchemasAsync(Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterCollection.cs index ecc708728d34..7835d01a051c 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string virt /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -155,7 +155,7 @@ public virtual Response Get(string virtualClusterName, C /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -215,7 +215,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -258,7 +258,7 @@ public virtual async Task> ExistsAsync(string virtualClusterName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -301,7 +301,7 @@ public virtual Response Exists(string virtualClusterName, CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -346,7 +346,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.Serialization.cs index cd7db28a98a7..9b9e6c9b5444 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class VirtualClusterResource : IJsonModel { + private static VirtualClusterData s_dataDeserializationInstance; + private static VirtualClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VirtualClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VirtualClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); VirtualClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.cs index e23f4018e2ad..aa71eb3e41b7 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/VirtualClusterResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -401,7 +401,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual ArmOperation Update /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -505,7 +505,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -567,7 +567,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -624,7 +624,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -681,7 +681,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -741,7 +741,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierCollection.cs index 542d2154445d..cf44e76e5602 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string workloadClassifie /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string workloadClassifierN /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string workloadClassifierName, Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.Serialization.cs index 200f01812ed6..5a21c8578494 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class WorkloadClassifierResource : IJsonModel { + private static WorkloadClassifierData s_dataDeserializationInstance; + private static WorkloadClassifierData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadClassifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadClassifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); WorkloadClassifierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.cs index bb2209cac02e..a3d3398b4602 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadClassifierResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -267,7 +267,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupCollection.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupCollection.cs index ff888162dacb..beb543cc056e 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupCollection.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpdateAsy /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wait /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string workl /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string workloadGroupName, Can /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToke /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken cancella /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string workloadGroupName, /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string workloadGroupName, CancellationToken /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfExistsAs /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.Serialization.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.Serialization.cs index 33742a93da77..bf23dc3334a2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.Serialization.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Sql { public partial class WorkloadGroupResource : IJsonModel { + private static WorkloadGroupData s_dataDeserializationInstance; + private static WorkloadGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkloadGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkloadGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlContext.Default); WorkloadGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.cs b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.cs index a4df613790ab..2f6e5adb0ef2 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.cs +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/Generated/WorkloadGroupResource.cs @@ -109,7 +109,7 @@ public virtual WorkloadClassifierCollection GetWorkloadClassifiers() /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetWorkloadClass /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -171,7 +171,7 @@ public virtual Response GetWorkloadClassifier(string /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(Cancellation /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -251,7 +251,7 @@ public virtual Response Get(CancellationToken cancellatio /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -335,7 +335,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> UpdateAsync(WaitU /// /// /// Default Api Version - /// 2023-08-01 + /// 2024-05-01-preview /// /// /// Resource diff --git a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md index 9ba23309f2c1..665b00e32c81 100644 --- a/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md +++ b/sdk/sqlmanagement/Azure.ResourceManager.Sql/src/autorest.md @@ -4,9 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml azure-arm: true -tag: package-2023-08 +tag: package-preview-2024-05 require: https://github.com/Azure/azure-rest-api-specs/blob/8c2c4da647cc9dbe6317a5961138fd058ed78401/specification/sql/resource-manager/readme.md -#package-2023-08 +#package-preview-2024-05 namespace: Azure.ResourceManager.Sql output-folder: $(this-folder)/Generated clear-output-folder: true @@ -367,7 +367,7 @@ rename-mapping: TrustScope: ServerTrustGroupPropertiesTrustScopesItem GeoBackupPolicy.properties.state: GeoBackupPolicyState DistributedAvailabilityGroup: SqlDistributedAvailabilityGroup - RecommendedAction.properties.details: AdditionalDetails + RecommendedAction.properties.details: ActionDetails ManagedDatabase.properties.crossSubscriptionSourceDatabaseId: -|arm-id ManagedDatabase.properties.crossSubscriptionRestorableDroppedDatabaseId: -|arm-id ManagedDatabaseUpdate.properties.crossSubscriptionSourceDatabaseId: -|arm-id @@ -398,6 +398,10 @@ rename-mapping: ReplicaSynchronizationHealth: SqlReplicaSynchronizationHealth ReplicationModeType: SqlReplicationModeType RoleChangeType: DistributedAvailabilityGroupRoleChangeType + InstancePoolOperation: SqlInstancePoolOperation + ManagedInstance.properties.totalMemoryMB: TotalMemoryInMB + ManagedInstanceUpdate.properties.totalMemoryMB: TotalMemoryInMB + ErrorType: SqlInstancePoolOperationErrorType prompted-enum-values: - Default diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs index 17ad22e1ec7c..6f510459b756 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/AvailabilityGroupListenerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine { public partial class AvailabilityGroupListenerResource : IJsonModel { + private static AvailabilityGroupListenerData s_dataDeserializationInstance; + private static AvailabilityGroupListenerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AvailabilityGroupListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); AvailabilityGroupListenerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs index c8f8255d3282..a09afdec9cce 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine { public partial class SqlVmGroupResource : IJsonModel { + private static SqlVmGroupData s_dataDeserializationInstance; + private static SqlVmGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVmGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); SqlVmGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs index 59ce8ed52211..597819481e86 100644 --- a/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs +++ b/sdk/sqlvirtualmachine/Azure.ResourceManager.SqlVirtualMachine/src/Generated/SqlVmResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.SqlVirtualMachine { public partial class SqlVmResource : IJsonModel { + private static SqlVmData s_dataDeserializationInstance; + private static SqlVmData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SqlVmData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSqlVirtualMachineContext.Default); SqlVmData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSqlVirtualMachineContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolResource.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolResource.Serialization.cs index 7dd3cf5602d9..3b5561867f92 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolResource.Serialization.cs +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StandbyPool { public partial class StandbyContainerGroupPoolResource : IJsonModel { + private static StandbyContainerGroupPoolData s_dataDeserializationInstance; + private static StandbyContainerGroupPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StandbyContainerGroupPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StandbyContainerGroupPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStandbyPoolContext.Default); StandbyContainerGroupPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStandbyPoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolRuntimeViewResource.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolRuntimeViewResource.Serialization.cs index 31fbabdba8cc..aa70c0c00f20 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolRuntimeViewResource.Serialization.cs +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyContainerGroupPoolRuntimeViewResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StandbyPool { public partial class StandbyContainerGroupPoolRuntimeViewResource : IJsonModel { + private static StandbyContainerGroupPoolRuntimeViewData s_dataDeserializationInstance; + private static StandbyContainerGroupPoolRuntimeViewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StandbyContainerGroupPoolRuntimeViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StandbyContainerGroupPoolRuntimeViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStandbyPoolContext.Default); StandbyContainerGroupPoolRuntimeViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStandbyPoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolResource.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolResource.Serialization.cs index 60e83bb826fa..a4d25a11a787 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolResource.Serialization.cs +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StandbyPool { public partial class StandbyVirtualMachinePoolResource : IJsonModel { + private static StandbyVirtualMachinePoolData s_dataDeserializationInstance; + private static StandbyVirtualMachinePoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StandbyVirtualMachinePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StandbyVirtualMachinePoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStandbyPoolContext.Default); StandbyVirtualMachinePoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStandbyPoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolRuntimeViewResource.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolRuntimeViewResource.Serialization.cs index 8ad589dab21d..00cc9c4f36d8 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolRuntimeViewResource.Serialization.cs +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachinePoolRuntimeViewResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StandbyPool { public partial class StandbyVirtualMachinePoolRuntimeViewResource : IJsonModel { + private static StandbyVirtualMachinePoolRuntimeViewData s_dataDeserializationInstance; + private static StandbyVirtualMachinePoolRuntimeViewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StandbyVirtualMachinePoolRuntimeViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StandbyVirtualMachinePoolRuntimeViewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStandbyPoolContext.Default); StandbyVirtualMachinePoolRuntimeViewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStandbyPoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachineResource.Serialization.cs b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachineResource.Serialization.cs index 937fcc54cef6..82f8e22a3b64 100644 --- a/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachineResource.Serialization.cs +++ b/sdk/standbypool/Azure.ResourceManager.StandbyPool/src/Generated/StandbyVirtualMachineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StandbyPool { public partial class StandbyVirtualMachineResource : IJsonModel { + private static StandbyVirtualMachineData s_dataDeserializationInstance; + private static StandbyVirtualMachineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StandbyVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StandbyVirtualMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStandbyPoolContext.Default); StandbyVirtualMachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStandbyPoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobContainerResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobContainerResource.Serialization.cs index 7352625adfe9..a892f3668f7a 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobContainerResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class BlobContainerResource : IJsonModel { + private static BlobContainerData s_dataDeserializationInstance; + private static BlobContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BlobContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BlobContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); BlobContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobInventoryPolicyResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobInventoryPolicyResource.Serialization.cs index f17e674a6c84..d5e9f1b77db6 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobInventoryPolicyResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobInventoryPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class BlobInventoryPolicyResource : IJsonModel { + private static BlobInventoryPolicyData s_dataDeserializationInstance; + private static BlobInventoryPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BlobInventoryPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BlobInventoryPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); BlobInventoryPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobServiceResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobServiceResource.Serialization.cs index 97ce5e0b58bb..60210b33f16f 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobServiceResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/BlobServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class BlobServiceResource : IJsonModel { + private static BlobServiceData s_dataDeserializationInstance; + private static BlobServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BlobServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BlobServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); BlobServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/DeletedAccountResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/DeletedAccountResource.Serialization.cs index 57c9657d80d1..ec1bbda023b1 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/DeletedAccountResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/DeletedAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class DeletedAccountResource : IJsonModel { + private static DeletedAccountData s_dataDeserializationInstance; + private static DeletedAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); DeletedAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/EncryptionScopeResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/EncryptionScopeResource.Serialization.cs index 0b9a80de82c1..bcd1d2a750cf 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/EncryptionScopeResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/EncryptionScopeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class EncryptionScopeResource : IJsonModel { + private static EncryptionScopeData s_dataDeserializationInstance; + private static EncryptionScopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - EncryptionScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + EncryptionScopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); EncryptionScopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceResource.Serialization.cs index 569e3498d6a4..ae3c653f9ab5 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class FileServiceResource : IJsonModel { + private static FileServiceData s_dataDeserializationInstance; + private static FileServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FileServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FileServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); FileServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceUsageResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceUsageResource.Serialization.cs index 3410271f7175..51454272b608 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceUsageResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileServiceUsageResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class FileServiceUsageResource : IJsonModel { + private static FileServiceUsageData s_dataDeserializationInstance; + private static FileServiceUsageData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FileServiceUsageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FileServiceUsageData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); FileServiceUsageData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileShareResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileShareResource.Serialization.cs index 930ed2d2d36c..d07942674674 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileShareResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/FileShareResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class FileShareResource : IJsonModel { + private static FileShareData s_dataDeserializationInstance; + private static FileShareData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FileShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FileShareData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); FileShareData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ImmutabilityPolicyResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ImmutabilityPolicyResource.Serialization.cs index 8d4dd7b19f43..c3db8caa04f3 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ImmutabilityPolicyResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ImmutabilityPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class ImmutabilityPolicyResource : IJsonModel { + private static ImmutabilityPolicyData s_dataDeserializationInstance; + private static ImmutabilityPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ImmutabilityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ImmutabilityPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); ImmutabilityPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs index 7242ad7e8461..01cfd41deff3 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel { + private static NetworkSecurityPerimeterConfigurationData s_dataDeserializationInstance; + private static NetworkSecurityPerimeterConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ObjectReplicationPolicyResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ObjectReplicationPolicyResource.Serialization.cs index 43a33683dff4..9f722a7d3d2b 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ObjectReplicationPolicyResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/ObjectReplicationPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class ObjectReplicationPolicyResource : IJsonModel { + private static ObjectReplicationPolicyData s_dataDeserializationInstance; + private static ObjectReplicationPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ObjectReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ObjectReplicationPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); ObjectReplicationPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/QueueServiceResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/QueueServiceResource.Serialization.cs index 58cf06772eb9..08ebf0987350 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/QueueServiceResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/QueueServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class QueueServiceResource : IJsonModel { + private static QueueServiceData s_dataDeserializationInstance; + private static QueueServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - QueueServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + QueueServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); QueueServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountLocalUserResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountLocalUserResource.Serialization.cs index 4915f18773bb..1a9ee21e18f4 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountLocalUserResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountLocalUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageAccountLocalUserResource : IJsonModel { + private static StorageAccountLocalUserData s_dataDeserializationInstance; + private static StorageAccountLocalUserData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageAccountLocalUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageAccountLocalUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageAccountLocalUserData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountManagementPolicyResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountManagementPolicyResource.Serialization.cs index b513b498ba48..3c690f077c8e 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountManagementPolicyResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountManagementPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageAccountManagementPolicyResource : IJsonModel { + private static StorageAccountManagementPolicyData s_dataDeserializationInstance; + private static StorageAccountManagementPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageAccountManagementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageAccountManagementPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageAccountManagementPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountMigrationResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountMigrationResource.Serialization.cs index fa9a387d1348..8131f0102dbe 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountMigrationResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountMigrationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageAccountMigrationResource : IJsonModel { + private static StorageAccountMigrationData s_dataDeserializationInstance; + private static StorageAccountMigrationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageAccountMigrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageAccountMigrationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageAccountMigrationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountResource.Serialization.cs index 6a5b584c7aa4..071b8e37895d 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageAccountResource : IJsonModel { + private static StorageAccountData s_dataDeserializationInstance; + private static StorageAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StoragePrivateEndpointConnectionResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StoragePrivateEndpointConnectionResource.Serialization.cs index 3fcad28a7685..e03b41f3cfa6 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StoragePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StoragePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StoragePrivateEndpointConnectionResource : IJsonModel { + private static StoragePrivateEndpointConnectionData s_dataDeserializationInstance; + private static StoragePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StoragePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StoragePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StoragePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageQueueResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageQueueResource.Serialization.cs index c21a52684b7d..9f73275821a9 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageQueueResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageQueueResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageQueueResource : IJsonModel { + private static StorageQueueData s_dataDeserializationInstance; + private static StorageQueueData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageQueueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageQueueData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageQueueData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.Serialization.cs index dcc6d9bc7614..d3a61e7d0554 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/StorageTaskAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class StorageTaskAssignmentResource : IJsonModel { + private static StorageTaskAssignmentData s_dataDeserializationInstance; + private static StorageTaskAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageTaskAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageTaskAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); StorageTaskAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableResource.Serialization.cs index fd3eb39e9495..b397daf263a0 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class TableResource : IJsonModel { + private static TableData s_dataDeserializationInstance; + private static TableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); TableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableServiceResource.Serialization.cs b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableServiceResource.Serialization.cs index 0d5191c90d8d..de81176c5231 100644 --- a/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableServiceResource.Serialization.cs +++ b/sdk/storage/Azure.ResourceManager.Storage/src/Generated/TableServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Storage { public partial class TableServiceResource : IJsonModel { + private static TableServiceData s_dataDeserializationInstance; + private static TableServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TableServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TableServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageContext.Default); TableServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj index f0d8008efbcd..24cb3b1d887b 100644 --- a/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj +++ b/sdk/storage/Azure.Storage.Blobs.Batch/src/Azure.Storage.Blobs.Batch.csproj @@ -21,6 +21,7 @@ true + diff --git a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj index 84d2b7829467..e144601219de 100644 --- a/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj +++ b/sdk/storage/Azure.Storage.Blobs/src/Azure.Storage.Blobs.csproj @@ -29,6 +29,7 @@ + diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/assets.json b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/assets.json index 723c084b4eaf..30f74ba0de72 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Blobs.Files.Shares", - "Tag": "net/storage/Azure.Storage.DataMovement.Blobs.Files.Shares_34f2bc6bf8" + "Tag": "net/storage/Azure.Storage.DataMovement.Blobs.Files.Shares_9cbe89e314" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/AppendBlobToShareFileTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/AppendBlobToShareFileTests.cs index dec9ae2e5df4..6dac8bc23bf0 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/AppendBlobToShareFileTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/AppendBlobToShareFileTests.cs @@ -198,7 +198,11 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( ShareFileClient objectClient, TransferPropertiesTestType type = TransferPropertiesTestType.Default) { - ShareFileStorageResourceOptions options = default; + // Blob to Share File does not require checking if the destination requires NFS + ShareFileStorageResourceOptions options = new() + { + SkipProtocolValidation = true, + }; if (type == TransferPropertiesTestType.NewProperties) { options = new ShareFileStorageResourceOptions() @@ -210,7 +214,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = _defaultMetadata, FileCreatedOn = _defaultFileCreatedOn, FileLastWrittenOn = _defaultFileLastWrittenOn, - FileChangedOn = _defaultFileChangedOn + FileChangedOn = _defaultFileChangedOn, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.Preserve) @@ -218,6 +223,7 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( options = new ShareFileStorageResourceOptions() { FilePermissions = true, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.NoPreserve) @@ -231,7 +237,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = default, FileCreatedOn = default, FileLastWrittenOn = default, - FileChangedOn = default + FileChangedOn = default, + SkipProtocolValidation = true, }; } return new ShareFileStorageResource(objectClient, options); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/BlockBlobToShareFileTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/BlockBlobToShareFileTests.cs index 490d7cf78e11..15c3c37d3490 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/BlockBlobToShareFileTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/BlockBlobToShareFileTests.cs @@ -197,7 +197,11 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( ShareFileClient objectClient, TransferPropertiesTestType type = TransferPropertiesTestType.Default) { - ShareFileStorageResourceOptions options = default; + // Blob to Share File does not require checking if the destination requires NFS + ShareFileStorageResourceOptions options = new() + { + SkipProtocolValidation = true, + }; if (type == TransferPropertiesTestType.NewProperties) { options = new ShareFileStorageResourceOptions() @@ -209,7 +213,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = _defaultMetadata, FileCreatedOn = _defaultFileCreatedOn, FileLastWrittenOn = _defaultFileLastWrittenOn, - FileChangedOn = _defaultFileChangedOn + FileChangedOn = _defaultFileChangedOn, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.Preserve) @@ -217,6 +222,7 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( options = new ShareFileStorageResourceOptions() { FilePermissions = true, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.NoPreserve) @@ -230,7 +236,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = default, FileCreatedOn = default, FileLastWrittenOn = default, - FileChangedOn = default + FileChangedOn = default, + SkipProtocolValidation = true, }; } return new ShareFileStorageResource(objectClient, options); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/PageBlobToShareFileTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/PageBlobToShareFileTests.cs index d1e5152ad773..6bd551253250 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/PageBlobToShareFileTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/PageBlobToShareFileTests.cs @@ -200,7 +200,11 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( ShareFileClient objectClient, TransferPropertiesTestType type = TransferPropertiesTestType.Default) { - ShareFileStorageResourceOptions options = default; + // Blob to Share File does not require checking if the destination requires NFS + ShareFileStorageResourceOptions options = new() + { + SkipProtocolValidation = true, + }; if (type == TransferPropertiesTestType.NewProperties) { options = new ShareFileStorageResourceOptions() @@ -212,7 +216,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = _defaultMetadata, FileCreatedOn = _defaultFileCreatedOn, FileLastWrittenOn = _defaultFileLastWrittenOn, - FileChangedOn = _defaultFileChangedOn + FileChangedOn = _defaultFileChangedOn, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.Preserve) @@ -220,6 +225,7 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( options = new ShareFileStorageResourceOptions() { FilePermissions = true, + SkipProtocolValidation = true, }; } else if (type == TransferPropertiesTestType.NoPreserve) @@ -233,7 +239,8 @@ protected override StorageResourceItem GetDestinationStorageResourceItem( FileMetadata = default, FileCreatedOn = default, FileLastWrittenOn = default, - FileChangedOn = default + FileChangedOn = default, + SkipProtocolValidation = true, }; } return new ShareFileStorageResource(objectClient, options); diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/StartTransferCopyToShareDirectoryTestBase.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/StartTransferCopyToShareDirectoryTestBase.cs index 384122db1cb2..fdab4ae9974d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/StartTransferCopyToShareDirectoryTestBase.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/tests/StartTransferCopyToShareDirectoryTestBase.cs @@ -102,7 +102,10 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain string directoryPath, TransferPropertiesTestType propertiesTestType = default) { - ShareFileStorageResourceOptions options = default; + ShareFileStorageResourceOptions options = new() + { + SkipProtocolValidation = true, + }; if (propertiesTestType == TransferPropertiesTestType.NewProperties) { options = new ShareFileStorageResourceOptions @@ -115,7 +118,8 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain FileAttributes = _defaultFileAttributes, FileCreatedOn = _defaultFileCreatedOn, FileChangedOn = _defaultFileChangedOn, - FileLastWrittenOn = _defaultFileLastWrittenOn + FileLastWrittenOn = _defaultFileLastWrittenOn, + SkipProtocolValidation = true }; } else if (propertiesTestType == TransferPropertiesTestType.NoPreserve) @@ -130,13 +134,15 @@ protected override StorageResourceContainer GetDestinationStorageResourceContain FileAttributes = default, FileCreatedOn = default, FileLastWrittenOn = default, + SkipProtocolValidation = true }; } else if (propertiesTestType == TransferPropertiesTestType.Preserve) { options = new ShareFileStorageResourceOptions { - FilePermissions = true + FilePermissions = true, + SkipProtocolValidation = true }; } // Authorize with SAS when performing operations diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json b/sdk/storage/Azure.Storage.DataMovement.Blobs/assets.json index 40119c441626..a63d57d22af0 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_51a6903a81" + "Tag": "net/storage/Azure.Storage.DataMovement.Blobs_5f8193db17" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs index 3180cce3317e..a471c6bc774e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/AppendBlobStorageResource.cs @@ -244,7 +244,6 @@ protected override async Task GetPropertiesAsync( // The properties could be populated during construction (from enumeration) if (ResourceProperties != default) { - ResourceProperties.Uri = Uri; return ResourceProperties; } else @@ -253,7 +252,6 @@ protected override async Task GetPropertiesAsync( StorageResourceItemProperties resourceProperties = blobProperties.ToStorageResourceProperties(); ResourceProperties = resourceProperties; - ResourceProperties.Uri = Uri; return ResourceProperties; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs index 3aa8ab3ca842..53124f62f4cc 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/BlockBlobStorageResource.cs @@ -269,7 +269,6 @@ protected override async Task GetPropertiesAsync( // The properties could be populated during construction (from enumeration) if (ResourceProperties != default) { - ResourceProperties.Uri = Uri; return ResourceProperties; } else @@ -278,7 +277,6 @@ protected override async Task GetPropertiesAsync( StorageResourceItemProperties resourceProperties = blobProperties.ToStorageResourceProperties(); ResourceProperties = resourceProperties; - ResourceProperties.Uri = Uri; return ResourceProperties; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs index 5aac5953877b..eb4365490b08 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/src/PageBlobStorageResource.cs @@ -255,7 +255,6 @@ protected override async Task GetPropertiesAsync( // The properties could be populated during construction (from enumeration) if (ResourceProperties != default) { - ResourceProperties.Uri = Uri; return ResourceProperties; } else @@ -264,7 +263,6 @@ protected override async Task GetPropertiesAsync( StorageResourceItemProperties resourceProperties = blobProperties.ToStorageResourceProperties(); ResourceProperties = resourceProperties; - ResourceProperties.Uri = Uri; return ResourceProperties; } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStorageResourceTests.cs index 379af00abbd1..f675632ff3a8 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/AppendBlobStorageResourceTests.cs @@ -1560,7 +1560,6 @@ public async Task GetPropertiesAsync_NotCached() Assert.That(metadata, Is.EqualTo(metadataResult)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Once()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } @@ -1603,7 +1602,6 @@ public async Task GetPropertiesAsync_Cached() Assert.That(rawProperties, Is.EqualTo(result.RawProperties)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Never()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobStorageResourceTests.cs index e9b4822a9285..e4ded6652799 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/BlockBlobStorageResourceTests.cs @@ -1275,7 +1275,6 @@ public async Task GetPropertiesAsync_NotCached() Assert.That(metadata, Is.EqualTo(metadataResult)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Once()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } @@ -1319,7 +1318,6 @@ public async Task GetPropertiesAsync_Cached() Assert.That(rawProperties, Is.EqualTo(result.RawProperties)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Never()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStorageResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStorageResourceTests.cs index 5b6d187733c8..8f9d2f4e4ee9 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStorageResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Blobs/tests/PageBlobStorageResourceTests.cs @@ -1639,7 +1639,6 @@ public async Task GetPropertiesAsync_NotCached() Assert.That(metadata, Is.EqualTo(metadataResult)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Once()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } @@ -1682,7 +1681,6 @@ public async Task GetPropertiesAsync_Cached() Assert.That(rawProperties, Is.EqualTo(result.RawProperties)); mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Never()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/README.md b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/README.md index 2f65daf4fc67..80a326d7a1d9 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/README.md +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/README.md @@ -86,11 +86,11 @@ To create a share `StorageResource`, use the methods `FromFile` or `FromDirector ```C# Snippet:ResourceConstruction_Shares StorageResource directory = await shares.FromDirectoryAsync( - new Uri("http://myaccount.files.core.windows.net/share/path/to/directory")); + new Uri("https://myaccount.files.core.windows.net/share/path/to/directory")); StorageResource rootDirectory = await shares.FromDirectoryAsync( - new Uri("http://myaccount.files.core.windows.net/share")); + new Uri("https://myaccount.files.core.windows.net/share")); StorageResource file = await shares.FromFileAsync( - new Uri("http://myaccount.files.core.windows.net/share/path/to/file.txt")); + new Uri("https://myaccount.files.core.windows.net/share/path/to/file.txt")); ``` Storage resources can also be initialized with the appropriate client object from Azure.Storage.Files.Shares. Since these resources will use the credential already present in the client object, no credential is required in the provider when using `FromClient()`. **However**, a `ShareFilesStorageResourceProvider` must still have a credential if it is to be used in `TransferManagerOptions` for resuming a transfer. diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs index 0424b9d154c6..4b7eeace7c0d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net6.0.cs @@ -40,7 +40,7 @@ public ShareFileStorageResourceOptions() { } public System.DateTimeOffset? FileLastWrittenOn { get { throw null; } set { } } public System.Collections.Generic.IDictionary FileMetadata { get { throw null; } set { } } public bool? FilePermissions { get { throw null; } set { } } - public bool IsNfs { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.ShareProtocols ShareProtocol { get { throw null; } set { } } public bool SkipProtocolValidation { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceConditions { get { throw null; } set { } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net8.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net8.0.cs index 0424b9d154c6..4b7eeace7c0d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net8.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.net8.0.cs @@ -40,7 +40,7 @@ public ShareFileStorageResourceOptions() { } public System.DateTimeOffset? FileLastWrittenOn { get { throw null; } set { } } public System.Collections.Generic.IDictionary FileMetadata { get { throw null; } set { } } public bool? FilePermissions { get { throw null; } set { } } - public bool IsNfs { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.ShareProtocols ShareProtocol { get { throw null; } set { } } public bool SkipProtocolValidation { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceConditions { get { throw null; } set { } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs index 0424b9d154c6..4b7eeace7c0d 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/api/Azure.Storage.DataMovement.Files.Shares.netstandard2.0.cs @@ -40,7 +40,7 @@ public ShareFileStorageResourceOptions() { } public System.DateTimeOffset? FileLastWrittenOn { get { throw null; } set { } } public System.Collections.Generic.IDictionary FileMetadata { get { throw null; } set { } } public bool? FilePermissions { get { throw null; } set { } } - public bool IsNfs { get { throw null; } set { } } + public Azure.Storage.Files.Shares.Models.ShareProtocols ShareProtocol { get { throw null; } set { } } public bool SkipProtocolValidation { get { throw null; } set { } } public Azure.Storage.Files.Shares.Models.ShareFileRequestConditions SourceConditions { get { throw null; } set { } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json index 6a701b99296d..405aa30d9505 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/storage/Azure.Storage.DataMovement.Files.Shares", - "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_5ab02c363e" + "Tag": "net/storage/Azure.Storage.DataMovement.Files.Shares_349100bbca" } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs index 323bfae88b09..5ef9df34d436 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/samples/Sample01b_HelloWorldAsync.cs @@ -47,11 +47,11 @@ public async Task ResourceConstructionDemonstration() // Construct simple share file resources for data movement #region Snippet:ResourceConstruction_Shares StorageResource directory = await shares.FromDirectoryAsync( - new Uri("http://myaccount.files.core.windows.net/share/path/to/directory")); + new Uri("https://myaccount.files.core.windows.net/share/path/to/directory")); StorageResource rootDirectory = await shares.FromDirectoryAsync( - new Uri("http://myaccount.files.core.windows.net/share")); + new Uri("https://myaccount.files.core.windows.net/share")); StorageResource file = await shares.FromFileAsync( - new Uri("http://myaccount.files.core.windows.net/share/path/to/file.txt")); + new Uri("https://myaccount.files.core.windows.net/share/path/to/file.txt")); #endregion } { diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementFileShareEventSource.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementFileShareEventSource.cs index 6b7aaae65568..4bc8a9b40d94 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementFileShareEventSource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementFileShareEventSource.cs @@ -11,6 +11,8 @@ internal class DataMovementFileShareEventSource : AzureEventSource private const string EventSourceName = "Azure-Storage-DataMovement-Files-Shares"; private const int ProtocolValidationSkippedEvent = 1; + private const int SymLinkDetectedEvent = 2; + private const int HardLinkDetectedEvent = 3; private DataMovementFileShareEventSource() : base(EventSourceName) { } @@ -21,5 +23,17 @@ public void ProtocolValidationSkipped(string transferId, string endpoint, string { WriteEvent(ProtocolValidationSkippedEvent, transferId, endpoint, resourceUri); } + + [Event(SymLinkDetectedEvent, Level = EventLevel.Informational, Message = "Source resource item detected to be Symbolic link. The item transfer will be skipped: Resource={0}")] + public void SymLinkDetected(string resourceUri) + { + WriteEvent(SymLinkDetectedEvent, resourceUri); + } + + [Event(HardLinkDetectedEvent, Level = EventLevel.Informational, Message = "Source resource item detected to be Hard link. The item will be transfered as a regular file: Resource={0}")] + public void HardLinkDetected(string resourceUri) + { + WriteEvent(HardLinkDetectedEvent, resourceUri); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs index f554585d8c93..e807ba94ba6a 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/DataMovementSharesExtensions.cs @@ -58,10 +58,10 @@ public static string GetFilePermission( this ShareFileStorageResourceOptions options, StorageResourceItemProperties sourceProperties) { - // Only set permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!sourceProperties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; + ShareProtocols protocol = options?.ShareProtocol ?? ShareProtocols.Smb; - if ((!options?.IsNfs ?? true) && setPermissions) + if (protocol == ShareProtocols.Smb && setPermissions) { return sourceProperties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.FilePermissions, out object permission) == true ? (string)permission @@ -75,9 +75,10 @@ public static string GetFilePermission( StorageResourceContainerProperties sourceProperties) { // Only set permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!sourceProperties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; + ShareProtocols protocol = options?.ShareProtocol ?? ShareProtocols.Smb; - if ((!options?.IsNfs ?? true) && setPermissions) + if (protocol == ShareProtocols.Smb && setPermissions) { return sourceProperties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.FilePermissions, out object permission) == true ? (string)permission @@ -113,7 +114,7 @@ public static FileSmbProperties GetFileSmbProperties( if (string.IsNullOrEmpty(permissionKeyValue)) { // Only set permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!properties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; permissionKeyValue = setPermissions ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, out object permissionKeyObject) == true @@ -123,16 +124,20 @@ public static FileSmbProperties GetFileSmbProperties( } return new() { - FileAttributes = (options?.IsNfs ?? false) - ? default - : GetPropertyValue( + FileAttributes = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => GetPropertyValue( options?._isFileAttributesSet ?? false, options?.FileAttributes, properties?.RawProperties, - DataMovementConstants.ResourceProperties.FileAttributes), - FilePermissionKey = (options?.IsNfs ?? false) - ? default - : permissionKeyValue, + DataMovementConstants.ResourceProperties.FileAttributes) + }, + FilePermissionKey = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => permissionKeyValue + }, FileCreatedOn = GetPropertyValue( options?._isFileCreatedOnSet ?? false, options?.FileCreatedOn, @@ -143,13 +148,15 @@ public static FileSmbProperties GetFileSmbProperties( options?.FileLastWrittenOn, properties?.RawProperties, DataMovementConstants.ResourceProperties.LastWrittenOn), - FileChangedOn = (options?.IsNfs ?? false) - ? default - : GetPropertyValue( + FileChangedOn = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => GetPropertyValue( options?._isFileChangedOnSet ?? false, options?.FileChangedOn, properties?.RawProperties, DataMovementConstants.ResourceProperties.ChangedOnTime) + } }; } @@ -158,7 +165,7 @@ public static FileSmbProperties GetFileSmbProperties( StorageResourceContainerProperties properties) { // Only set permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!properties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; string permissionKeyValue = setPermissions ? properties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, out object permissionKeyObject) == true @@ -167,16 +174,20 @@ public static FileSmbProperties GetFileSmbProperties( : default; return new() { - FileAttributes = (options?.IsNfs ?? false) - ? default - : GetPropertyValue( + FileAttributes = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => GetPropertyValue( options?._isFileAttributesSet ?? false, options?.FileAttributes, properties?.RawProperties, - DataMovementConstants.ResourceProperties.FileAttributes), - FilePermissionKey = (options?.IsNfs ?? false) - ? default - : permissionKeyValue, + DataMovementConstants.ResourceProperties.FileAttributes) + }, + FilePermissionKey = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => permissionKeyValue + }, FileCreatedOn = GetPropertyValue( options?._isFileCreatedOnSet ?? false, options?.FileCreatedOn, @@ -187,13 +198,15 @@ public static FileSmbProperties GetFileSmbProperties( options?.FileLastWrittenOn, properties?.RawProperties, DataMovementConstants.ResourceProperties.LastWrittenOn), - FileChangedOn = (options?.IsNfs ?? false) - ? default - : GetPropertyValue( + FileChangedOn = options?.ShareProtocol switch + { + ShareProtocols.Nfs => default, + _ => GetPropertyValue( options?._isFileChangedOnSet ?? false, options?.FileChangedOn, properties?.RawProperties, DataMovementConstants.ResourceProperties.ChangedOnTime) + } }; } @@ -218,9 +231,10 @@ public static FilePosixProperties GetFilePosixProperties( StorageResourceItemProperties sourceProperties) { // Only set NFS permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!sourceProperties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; + ShareProtocols protocol = options?.ShareProtocol ?? ShareProtocols.Smb; - if (options?.IsNfs ?? false) + if (protocol == ShareProtocols.Nfs) { NfsFileMode FileMode = default; string Owner = default; @@ -259,9 +273,10 @@ public static FilePosixProperties GetFilePosixProperties( string Group = default; // Only set NFS permissions if Copy transfer and FilePermissions is on. - bool setPermissions = (!sourceProperties?.Uri?.IsFile ?? false) && (options?.FilePermissions ?? false); + bool setPermissions = options?.FilePermissions ?? false; + ShareProtocols protocol = options?.ShareProtocol ?? ShareProtocols.Smb; - if ((options?.IsNfs ?? false) && setPermissions) + if (protocol == ShareProtocols.Nfs && setPermissions) { FileMode = sourceProperties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.FileMode, out object fileMode) == true ? (NfsFileMode)fileMode @@ -383,6 +398,14 @@ internal static StorageResourceItemProperties ToStorageResourceItemProperties( { rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileMode, fileProperties.PosixProperties.FileMode); } + if (fileProperties.PosixProperties.FileType != default) + { + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileType, fileProperties.PosixProperties.FileType); + } + if (fileProperties.PosixProperties.LinkCount != default) + { + rawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.LinkCount, fileProperties.PosixProperties.LinkCount); + } return new StorageResourceItemProperties() { ResourceLength = fileProperties.ContentLength, @@ -468,6 +491,14 @@ internal static void AddToStorageResourceItemProperties( { existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileMode, fileProperties.PosixProperties.FileMode); } + if (fileProperties.PosixProperties.FileType != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.FileType, fileProperties.PosixProperties.FileType); + } + if (fileProperties.PosixProperties.LinkCount != default) + { + existingProperties.RawProperties.WriteKeyValue(DataMovementConstants.ResourceProperties.LinkCount, fileProperties.PosixProperties.LinkCount); + } } internal static StorageResourceContainerProperties ToStorageResourceContainerProperties( @@ -697,7 +728,7 @@ public static async Task ValidateProtocolAsync( try { ShareProperties properties = await parentShareClient.GetPropertiesAsync(cancellationToken).ConfigureAwait(false); - ShareProtocols expectedProtocol = options.IsNfs ? ShareProtocols.Nfs : ShareProtocols.Smb; + ShareProtocols expectedProtocol = options?.ShareProtocol ?? ShareProtocols.Smb; ShareProtocols actualProtocol = properties.Protocols ?? ShareProtocols.Smb; if (actualProtocol != expectedProtocol) diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs index f2d3fee5c7a4..5b77545b03cb 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareDirectoryStorageResourceContainer.cs @@ -25,6 +25,8 @@ internal class ShareDirectoryStorageResourceContainer : StorageResourceContainer public override string ProviderId => "share"; + internal bool _isResourcePropertiesFullySet = false; + internal ShareDirectoryStorageResourceContainer(ShareDirectoryClient shareDirectoryClient, ShareFileStorageResourceOptions options) { ShareDirectoryClient = shareDirectoryClient; @@ -66,7 +68,8 @@ ShareDirectoryStorageResourceContainer destinationStorageResourceContainer = destinationContainer as ShareDirectoryStorageResourceContainer; ShareFileStorageResourceOptions destinationOptions = destinationStorageResourceContainer.ResourceOptions; // both source and destination must be SMB - if ((!ResourceOptions?.IsNfs ?? true) && (!destinationOptions?.IsNfs ?? true)) + if (((ResourceOptions?.ShareProtocol ?? ShareProtocols.Smb) == ShareProtocols.Smb) + && ((destinationOptions?.ShareProtocol ?? ShareProtocols.Smb) == ShareProtocols.Smb)) { traits = ShareFileTraits.Attributes; if (destinationOptions?.FilePermissions ?? false) @@ -141,6 +144,11 @@ protected override StorageResourceContainer GetChildStorageResourceContainer(str protected override async Task GetPropertiesAsync(CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + + if (_isResourcePropertiesFullySet) + { + return ResourceProperties; + } Response response = await ShareDirectoryClient.GetPropertiesAsync( cancellationToken: cancellationToken).ConfigureAwait(false); if (ResourceProperties != default) @@ -151,7 +159,7 @@ protected override async Task GetPropertiesA { ResourceProperties = response.Value.ToStorageResourceContainerProperties(); } - ResourceProperties.Uri = Uri; + _isResourcePropertiesFullySet = true; return ResourceProperties; } @@ -184,10 +192,12 @@ protected override async Task ValidateTransferAsync( { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + // ShareDirectory to ShareDirectory Copy transfer if (sourceResource is ShareDirectoryStorageResourceContainer sourceShareDirectoryResource) { // Ensure the transfer is supported (NFS -> NFS and SMB -> SMB) - if ((ResourceOptions?.IsNfs ?? false) != (sourceShareDirectoryResource.ResourceOptions?.IsNfs ?? false)) + if ((ResourceOptions?.ShareProtocol ?? ShareProtocols.Smb) + != (sourceShareDirectoryResource.ResourceOptions?.ShareProtocol ?? ShareProtocols.Smb)) { throw Errors.ShareTransferNotSupported(); } @@ -200,16 +210,16 @@ await DataMovementSharesExtensions.ValidateProtocolAsync( "source", sourceResource.Uri.AbsoluteUri, cancellationToken).ConfigureAwait(false); - } - // Validate the destination protocol - await DataMovementSharesExtensions.ValidateProtocolAsync( - ShareDirectoryClient.GetParentShareClient(), - ResourceOptions, - transferId, - "destination", - Uri.AbsoluteUri, - cancellationToken).ConfigureAwait(false); + // Validate the destination protocol + await DataMovementSharesExtensions.ValidateProtocolAsync( + ShareDirectoryClient.GetParentShareClient(), + ResourceOptions, + transferId, + "destination", + Uri.AbsoluteUri, + cancellationToken).ConfigureAwait(false); + } } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs index 4d8b8ba6360a..1fdb9559d07e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResource.cs @@ -38,6 +38,8 @@ internal class ShareFileStorageResource : StorageResourceItemInternal internal string _destinationPermissionKey; + internal bool _isResourcePropertiesFullySet = false; + public ShareFileStorageResource( ShareFileClient fileClient, ShareFileStorageResourceOptions options = default) @@ -239,6 +241,11 @@ protected override async Task GetCopyAuthorizationHeaderAsync protected override async Task GetPropertiesAsync(CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + + if (_isResourcePropertiesFullySet) + { + return ResourceProperties; + } Response response = await ShareFileClient.GetPropertiesAsync( conditions: _options?.SourceConditions, cancellationToken: cancellationToken).ConfigureAwait(false); @@ -250,7 +257,7 @@ protected override async Task GetPropertiesAsync( { ResourceProperties = response.Value.ToStorageResourceItemProperties(); } - ResourceProperties.Uri = Uri; + _isResourcePropertiesFullySet = true; return ResourceProperties; } @@ -272,12 +279,13 @@ protected override async Task SetPermissionsAsync( StorageResourceItemProperties sourceProperties, CancellationToken cancellationToken = default) { - // Copy transfer if (sourceResource is ShareFileStorageResource) { ShareFileStorageResource sourceShareFile = (ShareFileStorageResource)sourceResource; // both source and destination must be SMB and destination FilePermission option must be set. - if ((!sourceShareFile._options?.IsNfs ?? true) && (!_options?.IsNfs ?? true) && (_options?.FilePermissions ?? false)) + if (((sourceShareFile._options?.ShareProtocol ?? ShareProtocols.Smb) == ShareProtocols.Smb) + && ((_options?.ShareProtocol ?? ShareProtocols.Smb) == ShareProtocols.Smb) + && (_options?.FilePermissions ?? false)) { string permissionsValue = sourceProperties?.RawProperties?.GetPermission(); string destinationPermissionKey = sourceProperties?.RawProperties?.GetDestinationPermissionKey(); @@ -348,6 +356,33 @@ protected override StorageResourceCheckpointDetails GetDestinationCheckpointDeta directoryMetadata: _options?.DirectoryMetadata); } + protected override async Task ShouldItemTransferAsync(CancellationToken cancellationToken = default) + { + CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + + StorageResourceItemProperties sourceProperties = await GetPropertiesAsync(cancellationToken: cancellationToken).ConfigureAwait(false); + NfsFileType FileType = sourceProperties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.FileType, out object fileType) == true + ? (NfsFileType)fileType + : default; + if (FileType == NfsFileType.SymLink) + { + DataMovementFileShareEventSource.Singleton.SymLinkDetected(Uri.AbsoluteUri); + return false; + } + else if (FileType == NfsFileType.Regular) + { + long LinkCount = sourceProperties?.RawProperties?.TryGetValue(DataMovementConstants.ResourceProperties.LinkCount, out object linkCount) == true + ? (long)linkCount + : default; + // Hardlink detected + if (LinkCount > 1) + { + DataMovementFileShareEventSource.Singleton.HardLinkDetected(Uri.AbsoluteUri); + } + } + return true; + } + protected override async Task ValidateTransferAsync( string transferId, StorageResource sourceResource, @@ -355,10 +390,12 @@ protected override async Task ValidateTransferAsync( { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + // ShareFile to ShareFile Copy transfer if (sourceResource is ShareFileStorageResource sourceShareFileResource) { // Ensure the transfer is supported (NFS -> NFS and SMB -> SMB) - if ((_options?.IsNfs ?? false) != (sourceShareFileResource._options?.IsNfs ?? false)) + if ((_options?.ShareProtocol ?? ShareProtocols.Smb) + != (sourceShareFileResource._options?.ShareProtocol ?? ShareProtocols.Smb)) { throw Errors.ShareTransferNotSupported(); } @@ -371,16 +408,16 @@ await DataMovementSharesExtensions.ValidateProtocolAsync( "source", sourceResource.Uri.AbsoluteUri, cancellationToken).ConfigureAwait(false); - } - // Validate the destination protocol - await DataMovementSharesExtensions.ValidateProtocolAsync( - ShareFileClient.GetParentShareClient(), - _options, - transferId, - "destination", - Uri.AbsoluteUri, - cancellationToken).ConfigureAwait(false); + // Validate the destination protocol + await DataMovementSharesExtensions.ValidateProtocolAsync( + ShareFileClient.GetParentShareClient(), + _options, + transferId, + "destination", + Uri.AbsoluteUri, + cancellationToken).ConfigureAwait(false); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs index 0cf9f3aa6121..45452c7845f4 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/src/ShareFileStorageResourceOptions.cs @@ -49,17 +49,21 @@ public class ShareFileStorageResourceOptions /// /// Optional. Specifies whether protocol validation for the resource should be skipped before starting the transfer. /// By default this value is set to false. - /// Applies to copy, upload, and download transfers. + /// Applies to only Share-to-Share copy transfers. /// Note: Protocol validation requires share-level read access. /// public bool SkipProtocolValidation { get; set; } = false; /// /// Optional. Specifies whether the Share uses NFS or SMB protocol. - /// By default this value is set to false. If true is selected, the account used must support NFS. + /// By default this value is set to SMB. /// Applies to copy, upload, and download transfers. + /// + /// Note: Only NFS -> NFS and SMB -> SMB transfers are currently supported. + /// For NFS Share-to-Share Copy and Download transfers, Hardlinks will be copied as regular files and Symbolic links are skipped. + /// For NFS Upload transfers, Hardlinks will be copied as regular files and Symbolic links are not supported. /// - public bool IsNfs { get; set; } = false; + public ShareProtocols ShareProtocol { get; set; } = ShareProtocols.Smb; /// /// Optional. See . @@ -316,6 +320,8 @@ internal ShareFileStorageResourceOptions(ShareFileStorageResourceOptions options _isDirectoryMetadataSet = options?._isDirectoryMetadataSet ?? false; FileMetadata = options?.FileMetadata; _isFileMetadataSet = options?._isFileMetadataSet ?? false; + SkipProtocolValidation = options?.SkipProtocolValidation ?? false; + ShareProtocol = options?.ShareProtocol ?? ShareProtocols.Smb; } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs index 485735e5382b..97e9b40786cb 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferCopyTests.cs @@ -125,10 +125,10 @@ protected override StorageResourceContainer GetSourceStorageResourceContainer(Sh => new ShareDirectoryStorageResourceContainer(containerClient.GetDirectoryClient(prefix), default); protected override async Task CreateDirectoryInSourceAsync(ShareClient sourceContainer, string directoryPath, CancellationToken cancellationToken = default) - => await CreateDirectoryAsync(sourceContainer, directoryPath, cancellationToken); + => await CreateDirectoryAsync(container: sourceContainer, directoryPath: directoryPath, cancellationToken: cancellationToken); protected override async Task CreateDirectoryInDestinationAsync(ShareClient destinationContainer, string directoryPath, CancellationToken cancellationToken = default) - => await CreateDirectoryAsync(destinationContainer, directoryPath, cancellationToken); + => await CreateDirectoryAsync(container: destinationContainer, directoryPath: directoryPath, cancellationToken: cancellationToken); protected override async Task VerifyEmptyDestinationContainerAsync( ShareClient destinationContainer, @@ -303,16 +303,68 @@ await fileClient.CreateAsync( } } - private async Task CreateDirectoryAsync(ShareClient container, string directoryPath, CancellationToken cancellationToken = default) + private async Task CreateShareFileNfsAndHardLinkAsync( + ShareClient container, + long? objectLength = null, + string objectName = null, + CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); - ShareDirectoryClient directory = container.GetRootDirectoryClient().GetSubdirectoryClient(directoryPath); - await directory.CreateIfNotExistsAsync(cancellationToken: cancellationToken); + objectName ??= GetNewObjectName(); + if (!objectLength.HasValue) + { + throw new InvalidOperationException($"Cannot create share file without size specified. Specify {nameof(objectLength)}."); + } + ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); + + await fileClient.CreateAsync( + maxSize: objectLength.Value, + cancellationToken: cancellationToken); + + ShareFileClient hardlinkClient = InstrumentClient(container.GetRootDirectoryClient().GetFileClient($"{objectName}-hardlink")); + + // Create Hardlink + await hardlinkClient.CreateHardLinkAsync( + targetFile: $"{container.GetRootDirectoryClient().Name}/{objectName}"); + + // Assert hardlink was successfully created + ShareFileProperties properties = await hardlinkClient.GetPropertiesAsync(); + Assert.AreEqual(2, properties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, properties.PosixProperties.FileType); + } + + private async Task CreateShareFileNfsAndSymLinkAsync( + ShareClient container, + long? objectLength = null, + string objectName = null, + CancellationToken cancellationToken = default) + { + CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + objectName ??= GetNewObjectName(); + if (!objectLength.HasValue) + { + throw new InvalidOperationException($"Cannot create share file without size specified. Specify {nameof(objectLength)}."); + } + ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); + + await fileClient.CreateAsync( + maxSize: objectLength.Value, + cancellationToken: cancellationToken); + + ShareFileClient symlinkClient = InstrumentClient(container.GetRootDirectoryClient().GetFileClient($"{objectName}-symlink")); + + // Create Symlink + await symlinkClient.CreateSymbolicLinkAsync(linkText: fileClient.Uri.AbsolutePath); + + // Assert symlink was successfully created + ShareFileProperties properties = await symlinkClient.GetPropertiesAsync(); + Assert.AreEqual(1, properties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.SymLink, properties.PosixProperties.FileType); } private async Task CreateDirectoryAsync(ShareClient container, string directoryPath, - ShareDirectoryCreateOptions options, + ShareDirectoryCreateOptions options = default, CancellationToken cancellationToken = default) { CancellationHelper.ThrowIfCancellationRequested(cancellationToken); @@ -537,11 +589,11 @@ public async Task ShareDirectoryToShareDirectory_PreserveSmb(bool? filePermissio // Create storage resource containers StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( source.Container.GetDirectoryClient(sourcePrefix), - new ShareFileStorageResourceOptions() { IsNfs = false, }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Smb, }); StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( destination.Container.GetDirectoryClient(destPrefix), - new ShareFileStorageResourceOptions() { IsNfs = false, FilePermissions = filePermissions }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Smb, FilePermissions = filePermissions }); // Create Transfer Manager with single threaded operation TransferManagerOptions managerOptions = new TransferManagerOptions() @@ -557,7 +609,7 @@ public async Task ShareDirectoryToShareDirectory_PreserveSmb(bool? filePermissio options).ConfigureAwait(false); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3000)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await TestTransferWithTimeout.WaitForCompletionAsync( transfer, testEventsRaised, @@ -619,11 +671,11 @@ public async Task ShareDirectoryToShareDirectory_PreserveNfs(bool? filePermissio // Create storage resource containers StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( source.Container.GetDirectoryClient(sourcePrefix), - new ShareFileStorageResourceOptions() { IsNfs = true }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( destination.Container.GetDirectoryClient(destPrefix), - new ShareFileStorageResourceOptions() { IsNfs = true, FilePermissions = filePermissions }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs, FilePermissions = filePermissions }); // Create Transfer Manager with single threaded operation TransferManagerOptions managerOptions = new TransferManagerOptions() @@ -639,7 +691,7 @@ public async Task ShareDirectoryToShareDirectory_PreserveNfs(bool? filePermissio options).ConfigureAwait(false); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3000)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await TestTransferWithTimeout.WaitForCompletionAsync( transfer, testEventsRaised, @@ -663,9 +715,9 @@ await VerifyResultsAsync( } [RecordedTest] - [TestCase(true, true)] - [TestCase(false, false)] - public async Task ValidateProtocolAsync_SmbShareDirectoryToSmbShareDirectory_CompareProtocolSetToActual(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Nfs)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Smb)] + public async Task ValidateProtocolAsync_SmbShareDirectoryToSmbShareDirectory_CompareProtocolSetToActual(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); @@ -698,12 +750,12 @@ public async Task ValidateProtocolAsync_SmbShareDirectoryToSmbShareDirectory_Com ShareDirectoryClient sourceClient = source.Container.GetDirectoryClient(sourcePrefix); StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( sourceClient, - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol }); ShareDirectoryClient destClient = destination.Container.GetDirectoryClient(destPrefix); StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( destClient, - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol }); // Create Transfer Manager with single threaded operation TransferManagerOptions managerOptions = new TransferManagerOptions() @@ -713,7 +765,7 @@ public async Task ValidateProtocolAsync_SmbShareDirectoryToSmbShareDirectory_Com TransferManager transferManager = new TransferManager(managerOptions); // Act and Assert - if (!sourceIsNfs && !destIsNfs) + if (sourceProtocol == ShareProtocols.Smb && destProtocol == ShareProtocols.Smb) { // Start transfer and await for completion. TransferOperation transfer = await transferManager.StartTransferAsync( @@ -722,7 +774,7 @@ public async Task ValidateProtocolAsync_SmbShareDirectoryToSmbShareDirectory_Com options).ConfigureAwait(false); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3000)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await TestTransferWithTimeout.WaitForCompletionAsync( transfer, testEventsRaised, @@ -750,9 +802,9 @@ await VerifyResultsAsync( } [RecordedTest] - [TestCase(true, true)] - [TestCase(false, false)] - public async Task ValidateProtocolAsync_NfsShareDirectoryToNfsShareDirectory_CompareProtocolSetToActual(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Nfs)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Smb)] + public async Task ValidateProtocolAsync_NfsShareDirectoryToNfsShareDirectory_CompareProtocolSetToActual(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); @@ -787,11 +839,11 @@ public async Task ValidateProtocolAsync_NfsShareDirectoryToNfsShareDirectory_Com // Create storage resource containers StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( source.Container.GetDirectoryClient(sourcePrefix), - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol }); StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( destination.Container.GetDirectoryClient(destPrefix), - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol }); // Create Transfer Manager with single threaded operation TransferManagerOptions managerOptions = new TransferManagerOptions() @@ -801,7 +853,7 @@ public async Task ValidateProtocolAsync_NfsShareDirectoryToNfsShareDirectory_Com TransferManager transferManager = new TransferManager(managerOptions); // Act and Assert - if (sourceIsNfs && destIsNfs) + if (sourceProtocol == ShareProtocols.Nfs && destProtocol == ShareProtocols.Nfs) { // Start transfer and await for completion. TransferOperation transfer = await transferManager.StartTransferAsync( @@ -810,7 +862,7 @@ public async Task ValidateProtocolAsync_NfsShareDirectoryToNfsShareDirectory_Com options).ConfigureAwait(false); // Act - CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(3000)); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); await TestTransferWithTimeout.WaitForCompletionAsync( transfer, testEventsRaised, @@ -838,9 +890,9 @@ await VerifyResultsAsync( } [RecordedTest] - [TestCase(true, false)] - [TestCase(false, true)] - public async Task ValidateProtocolAsync_ShareDirectoryToShareDirectory_ShareTransferNotSupported(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Smb)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Nfs)] + public async Task ValidateProtocolAsync_ShareDirectoryToShareDirectory_ShareTransferNotSupported(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); @@ -860,11 +912,11 @@ public async Task ValidateProtocolAsync_ShareDirectoryToShareDirectory_ShareTran // Create storage resource containers StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( source.Container.GetDirectoryClient(sourcePrefix), - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol }); StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( destination.Container.GetDirectoryClient(destPrefix), - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol }); // Create Transfer Manager with single threaded operation TransferManagerOptions managerOptions = new TransferManagerOptions() @@ -878,5 +930,175 @@ public async Task ValidateProtocolAsync_ShareDirectoryToShareDirectory_ShareTran await transferManager.StartTransferAsync(sourceResource, destinationResource, options)); Assert.AreEqual("This Share transfer is not supported. Currently only NFS -> NFS and SMB -> SMB Share transfers are supported", ex.Message); } + + [RecordedTest] + public async Task ShareDirectoryToShareDirectory_NfsHardLink() + { + // Arrange + await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); + await using IDisposingContainer destination = await DestinationClientBuilder.GetTestShareSasNfsAsync(); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + string sourcePrefix = "sourceFolder"; + string destPrefix = "destFolder"; + + ShareDirectoryCreateOptions directoryCreateOptions = new ShareDirectoryCreateOptions() + { + Metadata = _defaultMetadata, + SmbProperties = new FileSmbProperties() + { + FileCreatedOn = _defaultFileCreatedOn, + FileLastWrittenOn = _defaultFileLastWrittenOn, + }, + PosixProperties = new FilePosixProperties() + { + Owner = "345", + Group = "123", + FileMode = NfsFileMode.ParseOctalFileMode("1777"), + } + }; + + // setup source + await CreateDirectoryAsync(source.Container, sourcePrefix, directoryCreateOptions); + string itemName1 = string.Join("/", sourcePrefix, "item1"); + await CreateShareFileNfsAndHardLinkAsync(source.Container, DataMovementTestConstants.KB, itemName1); + // setup destination + await CreateDirectoryInDestinationAsync(destination.Container, destPrefix); + + // Create storage resource containers + StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( + source.Container.GetDirectoryClient(sourcePrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( + destination.Container.GetDirectoryClient(destPrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs, FilePermissions = true }); + + // Create Transfer Manager with single threaded operation + TransferManagerOptions managerOptions = new TransferManagerOptions() + { + MaximumConcurrency = 1, + }; + TransferManager transferManager = new TransferManager(managerOptions); + + // Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options).ConfigureAwait(false); + + // Act + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + testEventsRaised.AssertUnexpectedFailureCheck(); + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + + await VerifyResultsAsync( + sourceContainer: source.Container, + sourcePrefix: sourcePrefix, + destinationContainer: destination.Container, + destinationPrefix: destPrefix, + propertiesTestType: TransferPropertiesTestType.PreserveNfs); + + ShareDirectoryClient destinationDirectory = destination.Container.GetDirectoryClient(destPrefix); + ShareFileClient destinationClient = destinationDirectory.GetFileClient("item1-hardlink"); + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + // Assert the hardlink was copied as regular file + Assert.AreEqual(1, destinationProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, destinationProperties.PosixProperties.FileType); + } + + [RecordedTest] + public async Task ShareDirectoryToShareDirectory_NfsSymbolicLink() + { + // Arrange + await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); + await using IDisposingContainer destination = await DestinationClientBuilder.GetTestShareSasNfsAsync(); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + string sourcePrefix = "sourceFolder"; + string destPrefix = "destFolder"; + + // setup source + await CreateDirectoryAsync(source.Container, sourcePrefix); + string itemName1 = string.Join("/", sourcePrefix, "item1"); + await CreateShareFileNfsAndSymLinkAsync(source.Container, DataMovementTestConstants.KB, itemName1); + // setup destination + await CreateDirectoryInDestinationAsync(destination.Container, destPrefix); + + // Create storage resource containers + StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( + source.Container.GetDirectoryClient(sourcePrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + StorageResourceContainer destinationResource = new ShareDirectoryStorageResourceContainer( + destination.Container.GetDirectoryClient(destPrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + // Create Transfer Manager with single threaded operation + TransferManagerOptions managerOptions = new TransferManagerOptions() + { + MaximumConcurrency = 1, + }; + TransferManager transferManager = new TransferManager(managerOptions); + + // Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options).ConfigureAwait(false); + + // Act + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + testEventsRaised.AssertUnexpectedFailureCheck(); + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + + // List all files in source folder path + List sourceFileNames = new List(); + List sourceDirectoryNames = new List(); + ShareDirectoryClient sourceDirectory = source.Container.GetDirectoryClient(sourcePrefix); + await foreach (Page page in sourceDirectory.GetFilesAndDirectoriesAsync().AsPages()) + { + sourceFileNames.AddRange(page.Values.Where((ShareFileItem item) => !item.IsDirectory).Select((ShareFileItem item) => item.Name)); + sourceDirectoryNames.AddRange(page.Values.Where((ShareFileItem item) => item.IsDirectory).Select((ShareFileItem item) => item.Name)); + } + + // List all files in the destination folder path + List destinationFileNames = new List(); + List destinationDirectoryNames = new List(); + ShareDirectoryClient destinationDirectory = destination.Container.GetDirectoryClient(destPrefix); + await foreach (Page page in destinationDirectory.GetFilesAndDirectoriesAsync().AsPages()) + { + destinationFileNames.AddRange(page.Values.Where((ShareFileItem item) => !item.IsDirectory).Select((ShareFileItem item) => item.Name)); + destinationDirectoryNames.AddRange(page.Values.Where((ShareFileItem item) => item.IsDirectory).Select((ShareFileItem item) => item.Name)); + } + + // Assert subdirectories + Assert.AreEqual(sourceDirectoryNames.Count, destinationDirectoryNames.Count); + Assert.AreEqual(sourceDirectoryNames, destinationDirectoryNames); + // Ensure the Symlink file was skipped and not copied + Assert.AreEqual(2, sourceFileNames.Count); + Assert.AreEqual(1, destinationFileNames.Count); + Assert.Contains("item1-symlink", sourceFileNames); + Assert.False(destinationFileNames.Contains("item1-symlink")); + Assert.AreEqual("item1", destinationFileNames[0]); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferDownloadTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferDownloadTests.cs index 25d7845ab639..5aaa753ead2f 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferDownloadTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareDirectoryStartTransferDownloadTests.cs @@ -13,6 +13,10 @@ using BaseShares::Azure.Storage.Files.Shares; using Azure.Storage.Test.Shared; using DMShare::Azure.Storage.DataMovement.Files.Shares; +using NUnit.Framework; +using Azure.Core.TestFramework; +using BaseShares::Azure.Storage.Files.Shares.Models; +using System.Linq; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -62,6 +66,74 @@ protected override async Task CreateObjectClientAsync( } } + private async Task CreateDirectoryAsync(ShareClient container, + string directoryPath, + CancellationToken cancellationToken = default) + { + CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + ShareDirectoryClient directory = container.GetRootDirectoryClient().GetSubdirectoryClient(directoryPath); + await directory.CreateIfNotExistsAsync(cancellationToken: cancellationToken); + } + + private async Task CreateShareFileNfsAndHardLinkAsync( + ShareClient container, + long? objectLength = null, + string objectName = null, + CancellationToken cancellationToken = default) + { + CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + objectName ??= GetNewObjectName(); + if (!objectLength.HasValue) + { + throw new InvalidOperationException($"Cannot create share file without size specified. Specify {nameof(objectLength)}."); + } + ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); + + await fileClient.CreateAsync( + maxSize: objectLength.Value, + cancellationToken: cancellationToken); + + ShareFileClient hardlinkClient = InstrumentClient(container.GetRootDirectoryClient().GetFileClient($"{objectName}-hardlink")); + + // Create Hardlink + await hardlinkClient.CreateHardLinkAsync( + targetFile: $"{container.GetRootDirectoryClient().Name}/{objectName}"); + + // Assert hardlink was successfully created + ShareFileProperties properties = await hardlinkClient.GetPropertiesAsync(); + Assert.AreEqual(2, properties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, properties.PosixProperties.FileType); + } + + private async Task CreateShareFileNfsAndSymLinkAsync( + ShareClient container, + long? objectLength = null, + string objectName = null, + CancellationToken cancellationToken = default) + { + CancellationHelper.ThrowIfCancellationRequested(cancellationToken); + objectName ??= GetNewObjectName(); + if (!objectLength.HasValue) + { + throw new InvalidOperationException($"Cannot create share file without size specified. Specify {nameof(objectLength)}."); + } + ShareFileClient fileClient = container.GetRootDirectoryClient().GetFileClient(objectName); + + await fileClient.CreateAsync( + maxSize: objectLength.Value, + cancellationToken: cancellationToken); + + ShareFileClient symlinkClient = InstrumentClient(container.GetRootDirectoryClient().GetFileClient($"{objectName}-symlink")); + + // Create Symlink + await symlinkClient.CreateSymbolicLinkAsync(linkText: fileClient.Uri.AbsolutePath); + + // Assert symlink was successfully created + ShareFileProperties properties = await symlinkClient.GetPropertiesAsync(); + Assert.AreEqual(1, properties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.SymLink, properties.PosixProperties.FileType); + } + protected override TransferValidator.ListFilesAsync GetSourceLister(ShareClient container, string prefix) => TransferValidator.GetShareFileLister(container.GetDirectoryClient(prefix)); @@ -120,5 +192,144 @@ protected override async Task SetupSourceDirectoryAsync( } } } + + [RecordedTest] + public async Task ShareDirectoryToLocalDirectory_NfsHardLink() + { + // Arrange + await using IDisposingContainer source = await ClientBuilder.GetTestShareSasNfsAsync(); + using DisposingLocalDirectory destination = DisposingLocalDirectory.GetTestDirectory(); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + string sourcePrefix = "sourceFolder"; + + // setup source + await CreateDirectoryAsync(source.Container, sourcePrefix); + string itemName1 = string.Join("/", sourcePrefix, "item1"); + await CreateShareFileNfsAndHardLinkAsync(source.Container, DataMovementTestConstants.KB, itemName1); + + // Create storage resource containers + StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( + source.Container.GetDirectoryClient(sourcePrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + StorageResource destinationResource = LocalFilesStorageResourceProvider.FromDirectory(destination.DirectoryPath); + + // Create Transfer Manager with single threaded operation + TransferManagerOptions managerOptions = new TransferManagerOptions() + { + MaximumConcurrency = 1, + }; + TransferManager transferManager = new TransferManager(managerOptions); + + // Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options).ConfigureAwait(false); + + // Act + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + testEventsRaised.AssertUnexpectedFailureCheck(); + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertContainerCompletedCheck(2); + + // Get source files + List sourceFileNames = new List(); + ShareDirectoryClient sourceDirectory = source.Container.GetDirectoryClient(sourcePrefix); + await foreach (Page page in sourceDirectory.GetFilesAndDirectoriesAsync().AsPages()) + { + sourceFileNames.AddRange(page.Values.Where((ShareFileItem item) => !item.IsDirectory).Select((ShareFileItem item) => item.Name)); + } + // Get dest files + List destFileNames = Directory + .EnumerateFiles(destination.DirectoryPath, "*", SearchOption.TopDirectoryOnly) + .Select(Path.GetFileName) + .ToList(); + + // Assert all files (including hardlink) were copied over to dest + Assert.AreEqual(sourceFileNames.Count, destFileNames.Count); + Assert.That(sourceFileNames, Is.EquivalentTo(destFileNames)); + } + + [RecordedTest] + public async Task ShareDirectoryToLocalDirectory_NfsSymbolicLink() + { + // Arrange + await using IDisposingContainer source = await ClientBuilder.GetTestShareSasNfsAsync(); + using DisposingLocalDirectory destination = DisposingLocalDirectory.GetTestDirectory(); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + string sourcePrefix = "sourceFolder"; + + // setup source + await CreateDirectoryAsync(source.Container, sourcePrefix); + string itemName1 = string.Join("/", sourcePrefix, "item1"); + await CreateShareFileNfsAndSymLinkAsync(source.Container, DataMovementTestConstants.KB, itemName1); + + // Create storage resource containers + StorageResourceContainer sourceResource = new ShareDirectoryStorageResourceContainer( + source.Container.GetDirectoryClient(sourcePrefix), + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + StorageResource destinationResource = LocalFilesStorageResourceProvider.FromDirectory(destination.DirectoryPath); + + // Create Transfer Manager with single threaded operation + TransferManagerOptions managerOptions = new TransferManagerOptions() + { + MaximumConcurrency = 1, + }; + TransferManager transferManager = new TransferManager(managerOptions); + + // Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options).ConfigureAwait(false); + + // Act + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + testEventsRaised.AssertUnexpectedFailureCheck(); + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertContainerCompletedCheck(2); + + // Get source files + List sourceFileNames = new List(); + ShareDirectoryClient sourceDirectory = source.Container.GetDirectoryClient(sourcePrefix); + await foreach (Page page in sourceDirectory.GetFilesAndDirectoriesAsync().AsPages()) + { + sourceFileNames.AddRange(page.Values.Where((ShareFileItem item) => !item.IsDirectory).Select((ShareFileItem item) => item.Name)); + } + // Get dest files + List destFileNames = Directory + .EnumerateFiles(destination.DirectoryPath, "*", SearchOption.TopDirectoryOnly) + .Select(Path.GetFileName) + .ToList(); + + // Ensure the Symlink file was skipped and not copied + Assert.AreEqual(2, sourceFileNames.Count); + Assert.AreEqual(1, destFileNames.Count); + Assert.Contains("item1-symlink", sourceFileNames); + Assert.False(destFileNames.Contains("item1-symlink")); + Assert.AreEqual("item1", destFileNames[0]); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs index a71c588e6af3..bc0051ef854e 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileResourceTests.cs @@ -35,10 +35,14 @@ public class ShareFileResourceTests private const string DefaultFilePermissionKey = "key"; private const string DefaultDestinationFilePermissionKey = "destinationKey"; private readonly DateTimeOffset DefaultLastModifiedOn = new DateTimeOffset(2024, 4, 1, 12, 18, 10, default); - private const NtfsFileAttributes DefaultFileAttributes = NtfsFileAttributes.Archive | NtfsFileAttributes.ReadOnly; + private const NtfsFileAttributes DefaultFileAttributes = NtfsFileAttributes.Archive | NtfsFileAttributes.Offline; private readonly DateTimeOffset DefaultFileCreatedOn = new DateTimeOffset(2024, 4, 1, 9, 5, 55, default); private readonly DateTimeOffset DefaultLastWrittenOn = new DateTimeOffset(2024, 4, 1, 12, 16, 6, default); private readonly DateTimeOffset DefaultFileChangedOn = new DateTimeOffset(2024, 4, 1, 13, 30, 3, default); + private readonly string DefaultSourceOwner = "345"; + private readonly string DefaultSourceGroup = "123"; + private readonly NfsFileMode DefaultSourceFileMode = NfsFileMode.ParseOctalFileMode("1777"); + private readonly NfsFileType DefaultFileType = NfsFileType.Regular; private readonly Dictionary DefaultFileMetadata = new(StringComparer.OrdinalIgnoreCase) { { "fkey", "fvalue" }, @@ -467,7 +471,77 @@ public async Task CopyFromStreamAsync_PropertiesPreserve() { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, - { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata } + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + Mock mock = await CopyFromStreamPreserveProperties_Internal( + stream: stream, + length: length, + resourceOptions: new ShareFileStorageResourceOptions(), + sourceProperties: sourceProperties); + + mock.Verify(b => b.UploadRangeAsync( + new HttpRange(0, length), + stream, + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mock.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == DefaultFileChangedOn && + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == null && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mock.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mock.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyFromStreamAsync_SmbPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + var data = GetRandomBuffer(length); + using var stream = new MemoryStream(data); + + // Act + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } }; Mock mock = await CopyFromStreamPreserveProperties_Internal( @@ -497,7 +571,83 @@ public async Task CopyFromStreamAsync_PropertiesPreserve() option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && option.SmbProperties.FileChangedOn == DefaultFileChangedOn && - option.SmbProperties.FilePermissionKey == default), + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == DefaultDestinationFilePermissionKey && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mock.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mock.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyFromStreamAsync_NfsPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + var data = GetRandomBuffer(length); + using var stream = new MemoryStream(data); + + // Act + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + Mock mock = await CopyFromStreamPreserveProperties_Internal( + stream: stream, + length: length, + resourceOptions: new ShareFileStorageResourceOptions() + { + FilePermissions = true, + ShareProtocol = ShareProtocols.Nfs + }, + sourceProperties: sourceProperties); + + mock.Verify(b => b.UploadRangeAsync( + new HttpRange(0, length), + stream, + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mock.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == null && + option.SmbProperties.FileAttributes == null && + option.SmbProperties.FilePermissionKey == null && + option.PosixProperties.Owner == DefaultSourceOwner && + option.PosixProperties.Group == DefaultSourceGroup && + option.PosixProperties.FileMode == DefaultSourceFileMode && + option.PosixProperties.FileType == DefaultFileType), It.IsAny(), It.IsAny()), Times.Once()); @@ -891,7 +1041,156 @@ await CopyFromUriAsyncPreserveProperties_Internal( option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && option.SmbProperties.FileChangedOn == DefaultFileChangedOn && - option.SmbProperties.FilePermissionKey == default), + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == default && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.UploadRangeFromUriAsync( + mockTuple.Item1.Object.Uri, + new HttpRange(0, length), + new HttpRange(0, length), + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockTuple.Item2.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyFromUriAsync_SmbPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + // Act + Tuple, Mock> mockTuple = + await CopyFromUriAsyncPreserveProperties_Internal( + length, + resourceOptions: new() { FilePermissions = true }, + new StorageResourceItemProperties() + { + ResourceLength = length, + ETag = new("ETag"), + LastModifiedTime = DefaultLastWrittenOn, + RawProperties = sourceProperties + }); + + // Verify + mockTuple.Item2.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == DefaultFileChangedOn && + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == DefaultDestinationFilePermissionKey && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.UploadRangeFromUriAsync( + mockTuple.Item1.Object.Uri, + new HttpRange(0, length), + new HttpRange(0, length), + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockTuple.Item2.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyFromUriAsync_NfsPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + // Act + Tuple, Mock> mockTuple = + await CopyFromUriAsyncPreserveProperties_Internal( + length, + resourceOptions: new() { FilePermissions = true, ShareProtocol = ShareProtocols.Nfs }, + new StorageResourceItemProperties() + { + ResourceLength = length, + ETag = new("ETag"), + LastModifiedTime = DefaultLastWrittenOn, + RawProperties = sourceProperties + }); + + // Verify + mockTuple.Item2.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == null && + option.SmbProperties.FileAttributes == null && + option.SmbProperties.FilePermissionKey == null && + option.PosixProperties.Owner == DefaultSourceOwner && + option.PosixProperties.Group == DefaultSourceGroup && + option.PosixProperties.FileMode == DefaultSourceFileMode && + option.PosixProperties.FileType == DefaultFileType), It.IsAny(), It.IsAny()), Times.Once()); @@ -1308,7 +1607,156 @@ await CopyBlockFromUriAsyncPreserveProperties_Internal( option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && option.SmbProperties.FileChangedOn == DefaultFileChangedOn && - option.SmbProperties.FilePermissionKey == default), + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == default && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.UploadRangeFromUriAsync( + mockTuple.Item1.Object.Uri, + new HttpRange(0, length), + new HttpRange(0, length), + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockTuple.Item2.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyBlockFromUriAsync_SmbPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + // Act + Tuple, Mock> mockTuple = + await CopyBlockFromUriAsyncPreserveProperties_Internal( + length, + resourceOptions: new() { FilePermissions = true }, + new StorageResourceItemProperties() + { + ResourceLength = length, + ETag = new("ETag"), + LastModifiedTime = DefaultLastWrittenOn, + RawProperties = sourceProperties + }); + + // Verify + mockTuple.Item2.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == DefaultFileChangedOn && + option.SmbProperties.FileAttributes == DefaultFileAttributes && + option.SmbProperties.FilePermissionKey == DefaultDestinationFilePermissionKey && + option.PosixProperties.Owner == null && + option.PosixProperties.Group == null && + option.PosixProperties.FileMode == null && + option.PosixProperties.FileType == null), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.UploadRangeFromUriAsync( + mockTuple.Item1.Object.Uri, + new HttpRange(0, length), + new HttpRange(0, length), + It.Is(options => + options.FileLastWrittenMode == FileLastWrittenMode.Preserve), + It.IsAny()), + Times.Once()); + mockTuple.Item2.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockTuple.Item2.VerifyNoOtherCalls(); + } + + [Test] + public async Task CopyBlockFromUriAsync_NfsPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + Dictionary sourceProperties = new() + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + }; + + // Act + Tuple, Mock> mockTuple = + await CopyBlockFromUriAsyncPreserveProperties_Internal( + length, + resourceOptions: new() { FilePermissions = true, ShareProtocol = ShareProtocols.Nfs }, + new StorageResourceItemProperties() + { + ResourceLength = length, + ETag = new("ETag"), + LastModifiedTime = DefaultLastWrittenOn, + RawProperties = sourceProperties + }); + + // Verify + mockTuple.Item2.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == null && + option.SmbProperties.FileAttributes == null && + option.SmbProperties.FilePermissionKey == null && + option.PosixProperties.Owner == DefaultSourceOwner && + option.PosixProperties.Group == DefaultSourceGroup && + option.PosixProperties.FileMode == DefaultSourceFileMode && + option.PosixProperties.FileType == DefaultFileType), It.IsAny(), It.IsAny()), Times.Once()); @@ -1535,7 +1983,6 @@ public async Task GetPropertiesAsync() mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Once()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } @@ -1626,7 +2073,6 @@ public async Task GetPropertiesAsync_CachedFromEnumeration() mock.Verify(b => b.GetPropertiesAsync(It.IsAny(), It.IsAny()), Times.Once()); - mock.Verify(b => b.Uri, Times.Once()); mock.VerifyNoOtherCalls(); } @@ -2078,7 +2524,97 @@ await destinationResource.CreateAsync( option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && option.SmbProperties.FileChangedOn == DefaultFileChangedOn && - option.SmbProperties.FilePermissionKey == default), + option.SmbProperties.FilePermissionKey == DefaultDestinationFilePermissionKey), + It.IsAny(), + It.IsAny()), + Times.Once()); + mockDestination.Verify(b => b.ExistsAsync( + It.IsAny()), + Times.Once()); + mockDestination.VerifyNoOtherCalls(); + } + + [Test] + public async Task CreateAsync_NfsPropertiesPermissionsPreserve() + { + // Arrange + int length = 1024; + Mock mockDestination = new( + new Uri("https://storageaccount.file.core.windows.net/container/destinationfile"), + new ShareClientOptions()); + + mockDestination.Setup(b => b.ExistsAsync(It.IsAny())) + .Returns(Task.FromResult(Response.FromValue(false, new MockResponse(200)))); + mockDestination.Setup(b => b.CreateAsync(It.IsAny(), It.IsAny(), It.IsAny(), It.IsAny())) + .Returns(Task.FromResult(Response.FromValue( + FilesModelFactory.StorageFileInfo( + eTag: new ETag("eTag"), + lastModified: DateTimeOffset.UtcNow, + isServerEncrypted: false, + fileCreationTime: DateTimeOffset.UtcNow, + fileLastWriteTime: DateTimeOffset.UtcNow, + owner: DefaultSourceOwner, + group: DefaultSourceGroup, + nfsFileMode: DefaultSourceFileMode, + fileId: "48903841", + fileParentId: "93024923"), + new MockResponse(200)))); + ShareFileStorageResource destinationResource = new ShareFileStorageResource( + mockDestination.Object, + new() + { + FilePermissions = true, + ShareProtocol = ShareProtocols.Nfs + }); + StorageResourceItemProperties properties = new() + { + ResourceLength = 1024, + ETag = new("etag"), + LastModifiedTime = DateTimeOffset.UtcNow, + RawProperties = new Dictionary + { + { DataMovementConstants.ResourceProperties.ContentType, DefaultContentType }, + { DataMovementConstants.ResourceProperties.ContentEncoding, DefaultContentEncoding }, + { DataMovementConstants.ResourceProperties.ContentLanguage, DefaultContentLanguage }, + { DataMovementConstants.ResourceProperties.ContentDisposition, DefaultContentDisposition }, + { DataMovementConstants.ResourceProperties.CacheControl, DefaultCacheControl }, + { DataMovementConstants.ResourceProperties.FileAttributes, DefaultFileAttributes }, + { DataMovementConstants.ResourceProperties.SourceFilePermissionKey, DefaultFilePermissionKey }, + { DataMovementConstants.ResourceProperties.DestinationFilePermissionKey, DefaultDestinationFilePermissionKey }, + { DataMovementConstants.ResourceProperties.CreationTime, DefaultFileCreatedOn }, + { DataMovementConstants.ResourceProperties.LastWrittenOn, DefaultLastWrittenOn }, + { DataMovementConstants.ResourceProperties.ChangedOnTime, DefaultFileChangedOn }, + { DataMovementConstants.ResourceProperties.Metadata, DefaultFileMetadata }, + { DataMovementConstants.ResourceProperties.Owner, DefaultSourceOwner }, + { DataMovementConstants.ResourceProperties.Group, DefaultSourceGroup }, + { DataMovementConstants.ResourceProperties.FileMode, DefaultSourceFileMode } + } + }; + + // Act + await destinationResource.CreateAsync( + overwrite: false, + maxSize: length, + properties: properties, + cancellationToken: CancellationToken.None); + + mockDestination.Verify(b => b.CreateAsync( + length, + It.Is(option => + option.HttpHeaders.CacheControl == DefaultCacheControl && + option.HttpHeaders.ContentDisposition == DefaultContentDisposition && + option.HttpHeaders.ContentEncoding == DefaultContentEncoding && + option.HttpHeaders.ContentType == DefaultContentType && + option.Metadata == DefaultFileMetadata && + option.SmbProperties.FileCreatedOn == DefaultFileCreatedOn && + option.SmbProperties.FileLastWrittenOn == DefaultLastWrittenOn && + option.SmbProperties.FileChangedOn == null && + option.SmbProperties.FileAttributes == null && + option.SmbProperties.FilePermissionKey == null && + option.PosixProperties.Owner == DefaultSourceOwner && + option.PosixProperties.Group == DefaultSourceGroup && + option.PosixProperties.FileMode == DefaultSourceFileMode && + option.PosixProperties.FileType == DefaultFileType), It.IsAny(), It.IsAny()), Times.Once()); diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs index aa3f1d9297d2..5aa7a4efea6b 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferCopyTests.cs @@ -20,6 +20,7 @@ using Metadata = System.Collections.Generic.IDictionary; using DMShare::Azure.Storage.DataMovement.Files.Shares; using System.Text.RegularExpressions; +using System.Security.AccessControl; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -762,14 +763,14 @@ public async Task ShareFileToShareFile_PreserveNfs(bool? filePermissions) createResource: true, options: sharefileCreateOptions); StorageResourceItem sourceResource = new ShareFileStorageResource(sourceClient, - new ShareFileStorageResourceOptions() { IsNfs = true }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); // Create destination file ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( container: destination.Container, createResource: false); StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, - new ShareFileStorageResourceOptions() { IsNfs = true, FilePermissions = filePermissions }); + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs, FilePermissions = filePermissions }); TransferOptions options = new TransferOptions(); TestEventsRaised testEventsRaised = new TestEventsRaised(options); @@ -816,9 +817,9 @@ await TestTransferWithTimeout.WaitForCompletionAsync( } [RecordedTest] - [TestCase(true, true)] - [TestCase(false, false)] - public async Task ValidateProtocolAsync_SmbShareFileToSmbShareFile_CompareProtocolSetToActual(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Nfs)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Smb)] + public async Task ValidateProtocolAsync_SmbShareFileToSmbShareFile_CompareProtocolSetToActual(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); @@ -830,21 +831,21 @@ public async Task ValidateProtocolAsync_SmbShareFileToSmbShareFile_CompareProtoc objectLength: DataMovementTestConstants.KB, createResource: true); StorageResourceItem sourceResource = new ShareFileStorageResource(sourceClient, - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol }); // Destination client - Set Properties ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( container: destination.Container, createResource: false); StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol }); TransferOptions options = new TransferOptions(); TestEventsRaised testEventsRaised = new TestEventsRaised(options); TransferManager transferManager = new TransferManager(); // Act and Assert - if (!sourceIsNfs && !destIsNfs) + if (sourceProtocol == ShareProtocols.Smb && destProtocol == ShareProtocols.Smb) { // Act - Start transfer and await for completion. TransferOperation transfer = await transferManager.StartTransferAsync( @@ -875,9 +876,9 @@ await TestTransferWithTimeout.WaitForCompletionAsync( } [RecordedTest] - [TestCase(true, true)] - [TestCase(false, false)] - public async Task ValidateProtocolAsync_NfsShareFileToNfsShareFile_CompareProtocolSetToActual(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Nfs)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Smb)] + public async Task ValidateProtocolAsync_NfsShareFileToNfsShareFile_CompareProtocolSetToActual(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); @@ -889,21 +890,21 @@ public async Task ValidateProtocolAsync_NfsShareFileToNfsShareFile_CompareProtoc objectLength: DataMovementTestConstants.KB, createResource: true); StorageResourceItem sourceResource = new ShareFileStorageResource(sourceClient, - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol }); // Create destination file ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( container: destination.Container, createResource: false); StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol }); TransferOptions options = new TransferOptions(); TestEventsRaised testEventsRaised = new TestEventsRaised(options); TransferManager transferManager = new TransferManager(); // Act and Assert - if (sourceIsNfs && destIsNfs) + if (sourceProtocol == ShareProtocols.Nfs && destProtocol == ShareProtocols.Nfs) { // Act - Start transfer and await for completion. TransferOperation transfer = await transferManager.StartTransferAsync( @@ -994,9 +995,9 @@ await TestTransferWithTimeout.WaitForCompletionAsync( } [RecordedTest] - [TestCase(true, false)] - [TestCase(false, true)] - public async Task ValidateProtocolAsync_ShareFileToShareFile_ShareTransferNotSupported(bool sourceIsNfs, bool destIsNfs) + [TestCase(ShareProtocols.Nfs, ShareProtocols.Smb)] + [TestCase(ShareProtocols.Smb, ShareProtocols.Nfs)] + public async Task ValidateProtocolAsync_ShareFileToShareFile_ShareTransferNotSupported(ShareProtocols sourceProtocol, ShareProtocols destProtocol) { // Arrange await using IDisposingContainer source = await GetSourceDisposingContainerAsync(); @@ -1008,14 +1009,14 @@ public async Task ValidateProtocolAsync_ShareFileToShareFile_ShareTransferNotSup objectLength: DataMovementTestConstants.KB, createResource: true); StorageResourceItem sourceResource = new ShareFileStorageResource(sourceClient, - new ShareFileStorageResourceOptions() { IsNfs = sourceIsNfs, SkipProtocolValidation = true }); + new ShareFileStorageResourceOptions() { ShareProtocol = sourceProtocol, SkipProtocolValidation = true }); // Destination client - Set Properties ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( container: destination.Container, createResource: false); StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, - new ShareFileStorageResourceOptions() { IsNfs = destIsNfs, SkipProtocolValidation = true }); + new ShareFileStorageResourceOptions() { ShareProtocol = destProtocol, SkipProtocolValidation = true }); TransferOptions options = new TransferOptions(); TestEventsRaised testEventsRaised = new TestEventsRaised(options); @@ -1026,5 +1027,156 @@ public async Task ValidateProtocolAsync_ShareFileToShareFile_ShareTransferNotSup await transferManager.StartTransferAsync(sourceResource, destinationResource, options)); Assert.AreEqual("This Share transfer is not supported. Currently only NFS -> NFS and SMB -> SMB Share transfers are supported", ex.Message); } + + [RecordedTest] + public async Task ShareFileToShareFile_NfsHardLink() + { + // Arrange + await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); + await using IDisposingContainer destination = await DestinationClientBuilder.GetTestShareSasNfsAsync(); + + DateTimeOffset sourceFileCreatedOn = _defaultFileCreatedOn; + DateTimeOffset sourceFileLastWrittenOn = _defaultFileLastWrittenOn; + string sourceOwner = "345"; + string sourceGroup = "123"; + string sourceFileMode = "1777"; + ShareFileCreateOptions sharefileCreateOptions = new ShareFileCreateOptions() + { + SmbProperties = new FileSmbProperties() + { + FileCreatedOn = sourceFileCreatedOn, + FileLastWrittenOn = sourceFileLastWrittenOn, + }, + PosixProperties = new FilePosixProperties() + { + Owner = sourceOwner, + Group = sourceGroup, + FileMode = NfsFileMode.ParseOctalFileMode(sourceFileMode), + } + }; + + ShareDirectoryClient directory = source.Container.GetRootDirectoryClient(); + ShareFileClient originalClient = await CreateFileClientWithOptionsAsync( + container: source.Container, + objectLength: DataMovementTestConstants.KB, + createResource: true, + options: sharefileCreateOptions); + ShareFileClient hardlinkClient = InstrumentClient(directory.GetFileClient("original-hardlink")); + + // Create Hardlink + await hardlinkClient.CreateHardLinkAsync( + targetFile: $"{directory.Name}/{originalClient.Name}"); + + // Assert hardlink was successfully created + ShareFileProperties sourceProperties = await hardlinkClient.GetPropertiesAsync(); + Assert.AreEqual(2, sourceProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, sourceProperties.PosixProperties.FileType); + + // Use the hardlink to create the source file + StorageResourceItem sourceResource = new ShareFileStorageResource(hardlinkClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + // Create destination file + ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( + container: destination.Container, + createResource: false); + StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs, FilePermissions = true }); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertSingleCompletedCheck(); + using Stream sourceStream = await hardlinkClient.OpenReadAsync(); + using Stream destinationStream = await destinationClient.OpenReadAsync(); + Assert.AreEqual(sourceStream.Length, destinationStream.Length); + + ShareFileProperties destinationProperties = await destinationClient.GetPropertiesAsync(); + Assert.AreEqual(sourceFileCreatedOn, destinationProperties.SmbProperties.FileCreatedOn); + Assert.AreEqual(sourceFileLastWrittenOn, destinationProperties.SmbProperties.FileLastWrittenOn); + Assert.AreEqual(sourceOwner, destinationProperties.PosixProperties.Owner); + Assert.AreEqual(sourceGroup, destinationProperties.PosixProperties.Group); + Assert.AreEqual(sourceFileMode, destinationProperties.PosixProperties.FileMode.ToOctalFileMode()); + + // Assert dest was copied as regular file + Assert.AreEqual(1, destinationProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, destinationProperties.PosixProperties.FileType); + } + + [RecordedTest] + public async Task ShareFileToShareFile_NfsSymbolicLink() + { + // Arrange + await using IDisposingContainer source = await SourceClientBuilder.GetTestShareSasNfsAsync(); + await using IDisposingContainer destination = await DestinationClientBuilder.GetTestShareSasNfsAsync(); + + ShareDirectoryClient directory = source.Container.GetRootDirectoryClient(); + ShareFileClient originalClient = await CreateFileClientWithOptionsAsync( + container: source.Container, + objectLength: DataMovementTestConstants.KB, + createResource: true, + objectName: "original"); + ShareFileClient symlinkClient = InstrumentClient(directory.GetFileClient("original-symlink")); + + // Create Symlink + await symlinkClient.CreateSymbolicLinkAsync(linkText: originalClient.Uri.AbsolutePath); + + // Assert symlink was successfully created + ShareFileProperties sourceProperties = await symlinkClient.GetPropertiesAsync(); + Assert.AreEqual(1, sourceProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.SymLink, sourceProperties.PosixProperties.FileType); + + // Use the symlink to create the source file + StorageResourceItem sourceResource = new ShareFileStorageResource(symlinkClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + // Create destination file + ShareFileClient destinationClient = await CreateFileClientWithOptionsAsync( + container: destination.Container, + createResource: false); + StorageResourceItem destinationResource = new ShareFileStorageResource(destinationClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertSingleCompletedCheck(); + + // Assert that Symlinks are skipped and not copied + bool destExists = await destinationClient.ExistsAsync(); + Assert.IsFalse(destExists); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferDownloadTests.cs b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferDownloadTests.cs index 7bbda3e3efe8..04b7408d9496 100644 --- a/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferDownloadTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement.Files.Shares/tests/ShareFileStartTransferDownloadTests.cs @@ -10,6 +10,10 @@ using BaseShares::Azure.Storage.Files.Shares; using Azure.Storage.Test.Shared; using DMShare::Azure.Storage.DataMovement.Files.Shares; +using NUnit.Framework; +using System.Threading; +using Azure.Core.TestFramework; +using BaseShares::Azure.Storage.Files.Shares.Models; namespace Azure.Storage.DataMovement.Files.Shares.Tests { @@ -68,5 +72,123 @@ protected override StorageResourceItem GetStorageResourceItem(ShareFileClient ob protected override Task OpenReadAsync(ShareFileClient objectClient) => objectClient.OpenReadAsync(); + + [RecordedTest] + public async Task ShareFileToLocalFile_NfsHardLink() + { + // Arrange + await using IDisposingContainer source = await ClientBuilder.GetTestShareSasNfsAsync(); + using DisposingLocalDirectory destination = DisposingLocalDirectory.GetTestDirectory(); + + ShareDirectoryClient directory = source.Container.GetRootDirectoryClient(); + ShareFileClient originalClient = await GetObjectClientAsync( + container: source.Container, + objectLength: DataMovementTestConstants.KB, + objectName: "original", + createObject: true); + ShareFileClient hardlinkClient = InstrumentClient(directory.GetFileClient("original-hardlink")); + + // Create Hardlink + await hardlinkClient.CreateHardLinkAsync( + targetFile: $"{directory.Name}/{originalClient.Name}"); + + // Assert hardlink was successfully created + ShareFileProperties sourceProperties = await hardlinkClient.GetPropertiesAsync(); + Assert.AreEqual(2, sourceProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.Regular, sourceProperties.PosixProperties.FileType); + + // Use the hardlink to create the source file + StorageResource sourceResource = new ShareFileStorageResource(hardlinkClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + // Create destination local file + string destFile = Path.Combine(destination.DirectoryPath, GetNewObjectName()); + StorageResource destinationResource = LocalFilesStorageResourceProvider.FromFile(destFile); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertSingleCompletedCheck(); + + // Assert dest was copied as regular file + bool destExists = File.Exists(destinationResource.Uri.LocalPath); + Assert.IsTrue(destExists); + using Stream sourceStream = await hardlinkClient.OpenReadAsync(); + using Stream destinationStream = File.OpenRead(destinationResource.Uri.LocalPath); + Assert.AreEqual(sourceStream.Length, destinationStream.Length); + } + + [RecordedTest] + public async Task ShareFileToLocalFile_NfsSymbolicLink() + { + // Arrange + await using IDisposingContainer source = await ClientBuilder.GetTestShareSasNfsAsync(); + using DisposingLocalDirectory destination = DisposingLocalDirectory.GetTestDirectory(); + + ShareDirectoryClient directory = source.Container.GetRootDirectoryClient(); + ShareFileClient originalClient = await GetObjectClientAsync( + container: source.Container, + objectLength: DataMovementTestConstants.KB, + objectName: "original", + createObject: true); + ShareFileClient symlinkClient = InstrumentClient(directory.GetFileClient("original-symlink")); + + // Create Symlink + await symlinkClient.CreateSymbolicLinkAsync(linkText: originalClient.Uri.AbsolutePath); + + // Assert symlink was successfully created + ShareFileProperties sourceProperties = await symlinkClient.GetPropertiesAsync(); + Assert.AreEqual(1, sourceProperties.PosixProperties.LinkCount); + Assert.AreEqual(NfsFileType.SymLink, sourceProperties.PosixProperties.FileType); + + // Use the symlink to create the source file + StorageResourceItem sourceResource = new ShareFileStorageResource(symlinkClient, + new ShareFileStorageResourceOptions() { ShareProtocol = ShareProtocols.Nfs }); + + // Create destination local file + string destFile = Path.Combine(destination.DirectoryPath, GetNewObjectName()); + StorageResource destinationResource = LocalFilesStorageResourceProvider.FromFile(destFile); + + TransferOptions options = new TransferOptions(); + TestEventsRaised testEventsRaised = new TestEventsRaised(options); + TransferManager transferManager = new TransferManager(); + + // Act - Start transfer and await for completion. + TransferOperation transfer = await transferManager.StartTransferAsync( + sourceResource, + destinationResource, + options); + CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(TimeSpan.FromSeconds(30)); + await TestTransferWithTimeout.WaitForCompletionAsync( + transfer, + testEventsRaised, + cancellationTokenSource.Token); + + // Assert + Assert.NotNull(transfer); + Assert.IsTrue(transfer.HasCompleted); + Assert.AreEqual(TransferState.Completed, transfer.Status.State); + await testEventsRaised.AssertSingleCompletedCheck(); + + // Assert the Symlink was skipped and not copied + bool destExists = File.Exists(destinationResource.Uri.LocalPath); + Assert.IsFalse(destExists); + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md index 8d91a3d31b57..760f067ea778 100644 --- a/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md +++ b/sdk/storage/Azure.Storage.DataMovement/CHANGELOG.md @@ -7,6 +7,7 @@ ### Breaking Changes ### Bugs Fixed +- Fixed issue where transfers added concurrently to the local checkpointer would throw collision exceptions intermittently. ### Other Changes diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs index 0c403a842126..cfb14bc04cd2 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net6.0.cs @@ -70,8 +70,6 @@ public partial class StorageResourceContainerProperties public StorageResourceContainerProperties() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceCopyFromUriOptions @@ -130,6 +128,8 @@ protected StorageResourceItem() { } protected internal abstract System.Threading.Tasks.Task ReadStreamAsync(long position = (long)0, long? length = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected internal abstract System.Threading.Tasks.Task SetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.Storage.DataMovement.StorageResourceItemProperties sourceProperties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + protected internal virtual System.Threading.Tasks.Task ShouldItemTransferAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceItemProperties @@ -144,8 +144,6 @@ public StorageResourceItemProperties() { } public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public long? ResourceLength { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } public abstract partial class StorageResourceProvider { diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net8.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net8.0.cs index 0c403a842126..cfb14bc04cd2 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net8.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.net8.0.cs @@ -70,8 +70,6 @@ public partial class StorageResourceContainerProperties public StorageResourceContainerProperties() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceCopyFromUriOptions @@ -130,6 +128,8 @@ protected StorageResourceItem() { } protected internal abstract System.Threading.Tasks.Task ReadStreamAsync(long position = (long)0, long? length = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected internal abstract System.Threading.Tasks.Task SetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.Storage.DataMovement.StorageResourceItemProperties sourceProperties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + protected internal virtual System.Threading.Tasks.Task ShouldItemTransferAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceItemProperties @@ -144,8 +144,6 @@ public StorageResourceItemProperties() { } public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public long? ResourceLength { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } public abstract partial class StorageResourceProvider { diff --git a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs index 0c403a842126..cfb14bc04cd2 100644 --- a/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs +++ b/sdk/storage/Azure.Storage.DataMovement/api/Azure.Storage.DataMovement.netstandard2.0.cs @@ -70,8 +70,6 @@ public partial class StorageResourceContainerProperties public StorageResourceContainerProperties() { } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceCopyFromUriOptions @@ -130,6 +128,8 @@ protected StorageResourceItem() { } protected internal abstract System.Threading.Tasks.Task ReadStreamAsync(long position = (long)0, long? length = default(long?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] protected internal abstract System.Threading.Tasks.Task SetPermissionsAsync(Azure.Storage.DataMovement.StorageResourceItem sourceResource, Azure.Storage.DataMovement.StorageResourceItemProperties sourceProperties, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + protected internal virtual System.Threading.Tasks.Task ShouldItemTransferAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public partial class StorageResourceItemProperties @@ -144,8 +144,6 @@ public StorageResourceItemProperties() { } public System.Collections.Generic.IDictionary RawProperties { get { throw null; } set { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public long? ResourceLength { get { throw null; } set { } } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public System.Uri Uri { get { throw null; } set { } } } public abstract partial class StorageResourceProvider { 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 10cc777d2c24..c9e0ab6b797b 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj +++ b/sdk/storage/Azure.Storage.DataMovement/src/Azure.Storage.DataMovement.csproj @@ -21,7 +21,10 @@ - + + + + diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs index 499c05a501ec..a6462a45a261 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalFileStorageResource.cs @@ -211,7 +211,6 @@ protected internal override Task GetPropertiesAsy if (fileInfo.Exists) { StorageResourceItemProperties properties = fileInfo.ToStorageResourceProperties(); - properties.Uri = Uri; return Task.FromResult(properties); } throw new FileNotFoundException(); diff --git a/sdk/storage/Azure.Storage.DataMovement/src/LocalTransferCheckpointer.cs b/sdk/storage/Azure.Storage.DataMovement/src/LocalTransferCheckpointer.cs index f3827e38f00a..7ade69bc033d 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/LocalTransferCheckpointer.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/LocalTransferCheckpointer.cs @@ -3,6 +3,7 @@ using System; using System.Buffers; +using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.IO.MemoryMappedFiles; @@ -27,7 +28,7 @@ internal class LocalTransferCheckpointer : SerializerTransferCheckpointer /// /// Stores references to the memory mapped files stored by IDs. /// - internal readonly Dictionary _transferStates; + internal readonly ConcurrentDictionary _transferStates; /// /// Initializes a new instance of class. @@ -35,7 +36,7 @@ internal class LocalTransferCheckpointer : SerializerTransferCheckpointer /// Path to the folder containing the checkpointing information to resume from. public LocalTransferCheckpointer(string folderPath) { - _transferStates = new Dictionary(); + _transferStates = new ConcurrentDictionary(); if (string.IsNullOrEmpty(folderPath)) { _pathToCheckpointer = Path.Combine(Environment.CurrentDirectory, DataMovementConstants.DefaultCheckpointerPath); @@ -109,7 +110,7 @@ public override async Task AddNewJobAsync( transferId, headerStream, cancellationToken).ConfigureAwait(false); - _transferStates.Add(transferId, jobPlanFile); + AddToTransferStates(transferId, jobPlanFile); } } @@ -302,7 +303,7 @@ public override Task TryRemoveStoredTransferAsync(string transferId, Cance } } - _transferStates.Remove(transferId); + _transferStates.TryRemove(transferId, out _); return Task.FromResult(result); } @@ -337,7 +338,8 @@ public override async Task SetJobTransferStatusAsync( // if paused or other completion state, remove the memory cache but still write state to the plan file for later resume if (status.State == TransferState.Completed || status.State == TransferState.Paused) { - _transferStates.Remove(transferId); + // If TryRemove fails, it's fine it may be because it does not already exist or already has been removed + _transferStates.TryRemove(transferId, out _); } await jobPlanFile.WriteLock.WaitAsync(cancellationToken).ConfigureAwait(false); @@ -406,7 +408,7 @@ private void RefreshCache() JobPlanFile jobPlanFile = JobPlanFile.LoadExistingJobPlanFile(path); if (!_transferStates.ContainsKey(jobPlanFile.Id)) { - _transferStates.Add(jobPlanFile.Id, jobPlanFile); + AddToTransferStates(jobPlanFile.Id, jobPlanFile); } else { @@ -433,17 +435,18 @@ private void RefreshCache() } /// - /// Clears cache for a given trandfer ID and repopulates from disk if any. + /// Clears cache for a given transfer ID and repopulates from disk if any. /// private void RefreshCache(string transferId) { - _transferStates.Remove(transferId); + // If TryRemove fails, it's fine it may be because it does not already exist or already has been removed + _transferStates.TryRemove(transferId, out _); JobPlanFile jobPlanFile = JobPlanFile.LoadExistingJobPlanFile(_pathToCheckpointer, transferId); if (!File.Exists(jobPlanFile.FilePath)) { return; } - _transferStates.Add(transferId, jobPlanFile); + AddToTransferStates(transferId, jobPlanFile); foreach (string path in Directory.EnumerateFiles(_pathToCheckpointer) .Where(p => Path.GetExtension(p) == DataMovementConstants.JobPartPlanFile.FileExtension)) { @@ -477,5 +480,13 @@ private static JobPlanOperation GetOperationType(StorageResource source, Storage throw Errors.InvalidSourceDestinationParams(); } } + + private void AddToTransferStates(string transferId, JobPlanFile jobPlanFile) + { + if (!_transferStates.TryAdd(transferId, jobPlanFile)) + { + throw Errors.CollisionJobPlanFile(transferId); + } + } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs index 58f73c1c2f2d..07fd2688678d 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/ServiceToServiceJobPart.cs @@ -155,6 +155,12 @@ public override async Task ProcessPartToChunkAsync() } await OnTransferStateChangedAsync(TransferState.InProgress).ConfigureAwait(false); + if (!await _sourceResource.ShouldItemTransferAsync(_cancellationToken).ConfigureAwait(false)) + { + await OnTransferStateChangedAsync(TransferState.Completed).ConfigureAwait(false); + return; + } + StorageResourceItemProperties sourceProperties = await _sourceResource.GetPropertiesAsync(_cancellationToken).ConfigureAwait(false); if (!sourceProperties.ResourceLength.HasValue) diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs index 542e73f99cf3..897282ecdfdc 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementConstants.cs @@ -164,6 +164,8 @@ internal static class ResourceProperties internal const string Owner = "Owner"; internal const string Group = "Group"; internal const string FileMode = "FileMode"; + internal const string FileType = "FileType"; + internal const string LinkCount = "LinkCount"; } } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementExtensions.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementExtensions.cs index d2c8772ca364..e3101428b9e9 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementExtensions.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/DataMovementExtensions.cs @@ -27,7 +27,6 @@ internal static StorageResourceContainerProperties ToStorageResourceContainerPro { return new StorageResourceContainerProperties() { - Uri = properties.Uri, RawProperties = properties.RawProperties }; } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs b/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs index e771aa0e844c..942bcce60be5 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/Shared/Errors.DataMovement.cs @@ -51,6 +51,9 @@ public static ArgumentException MissingTransferIdCheckpointer(string transferId) public static ArgumentException CollisionJobPart(string transferId, int jobPart) => throw new ArgumentException($"Job Part Collision Checkpointer: The job part {jobPart} for transfer id {transferId}, already exists in the checkpointer."); + public static ArgumentException CollisionJobPlanFile(string transferId) + => throw new ArgumentException($"Job Plan File collision checkpointer: The job {transferId}, already exists in the checkpointer."); + public static ArgumentException MissingCheckpointerPath(string directoryPath) => throw new ArgumentException($"Could not initialize the LocalTransferCheckpointer because the folderPath passed does not exist. Please create the {directoryPath}, folder path first."); diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainerProperties.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainerProperties.cs index d4b292986bab..3b6838f337ce 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainerProperties.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceContainerProperties.cs @@ -13,12 +13,6 @@ namespace Azure.Storage.DataMovement [EditorBrowsable(EditorBrowsableState.Never)] public class StorageResourceContainerProperties { - /// - /// The Uri of the Storage Resource Container. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public Uri Uri { get; set; } - /// /// Dictionary of the properties associated with this resource container. /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs index 63ed4f21947a..fa7472bbbc88 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItem.cs @@ -241,5 +241,19 @@ protected internal abstract Task CompleteTransferAsync( /// [EditorBrowsable(EditorBrowsableState.Never)] protected internal abstract Task DeleteIfExistsAsync(CancellationToken cancellationToken = default); + + /// + /// Determines whether to perform the item transfer. This should be called on the source resource item. + /// + /// + /// Optional to propagate + /// notifications that the operation should be cancelled. + /// + /// + /// Whether the item transfer should be performed. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected internal virtual Task ShouldItemTransferAsync(CancellationToken cancellationToken = default) + => Task.FromResult(true); } } diff --git a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs index 5f78582f7367..98894fdee8e7 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/StorageResourceItemProperties.cs @@ -13,12 +13,6 @@ namespace Azure.Storage.DataMovement [EditorBrowsable(EditorBrowsableState.Never)] public class StorageResourceItemProperties { - /// - /// The Uri of the resource. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public Uri Uri { get; set; } - /// /// The length of the resource. /// diff --git a/sdk/storage/Azure.Storage.DataMovement/src/UriToStreamJobPart.cs b/sdk/storage/Azure.Storage.DataMovement/src/UriToStreamJobPart.cs index c777cc85d7b6..01571b9245be 100644 --- a/sdk/storage/Azure.Storage.DataMovement/src/UriToStreamJobPart.cs +++ b/sdk/storage/Azure.Storage.DataMovement/src/UriToStreamJobPart.cs @@ -166,6 +166,12 @@ public override async Task ProcessPartToChunkAsync() } await OnTransferStateChangedAsync(TransferState.InProgress).ConfigureAwait(false); + if (!await _sourceResource.ShouldItemTransferAsync(_cancellationToken).ConfigureAwait(false)) + { + await OnTransferStateChangedAsync(TransferState.Completed).ConfigureAwait(false); + return; + } + if (!_sourceResource.Length.HasValue) { await UnknownLengthDownloadAsync().ConfigureAwait(false); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs index bdc72fc503f1..1441e3b70324 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/CleanUpTransferTests.cs @@ -36,6 +36,8 @@ private Mock GetRemoteSourceResource(long length = Constant })); mock.Setup(b => b.GetCopyAuthorizationHeaderAsync(It.IsAny())) .Returns(Task.FromResult(default)); + mock.Setup(b => b.ShouldItemTransferAsync(It.IsAny())) + .Returns(Task.FromResult(true)); return mock; } @@ -89,6 +91,7 @@ private void AssertBaseSource(Mock source) source.Verify(b => b.ResourceId, Times.Exactly(2)); source.Verify(b => b.IsContainer, Times.Once()); source.Verify(b => b.GetSourceCheckpointDetails(), Times.Once()); + source.Verify(b => b.ShouldItemTransferAsync(It.IsAny())); source.Verify(b => b.GetPropertiesAsync(It.IsAny())); source.Verify(b => b.GetCopyAuthorizationHeaderAsync(It.IsAny())); source.VerifyNoOtherCalls(); diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResourceItem.cs index 89b829bf3eca..8bac70bcad42 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/MockStorageResourceItem.cs @@ -96,7 +96,6 @@ protected internal override Task GetPropertiesAsy { return Task.FromResult(new StorageResourceItemProperties() { - Uri = Uri, ResourceLength = Length ?? 0, ETag = new ETag("etag"), LastModifiedTime = DateTimeOffset.UtcNow diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs b/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs index cfa8b3b3fc91..5e889eecafa1 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/ServiceToServiceJobPartTests.cs @@ -129,6 +129,8 @@ public async Task ProcessPartToChunkAsync_OneShot() .Returns(Task.FromResult(properties)); mockSource.Setup(r => r.GetCopyAuthorizationHeaderAsync(It.IsAny())) .Returns(Task.FromResult(httpAuthorization)); + mockSource.Setup(b => b.ShouldItemTransferAsync(It.IsAny())) + .Returns(Task.FromResult(true)); // Set up Destination to copy in one shot with a large chunk size and smaller total length. Mock mockDestination = GetStorageResourceItem(); @@ -202,6 +204,8 @@ public async Task ProcessPartToChunkAsync_Chunks() StorageResourceItemProperties properties = GetResourceProperties(length); mockSource.Setup(r => r.GetPropertiesAsync(It.IsAny())) .Returns(Task.FromResult(properties)); + mockSource.Setup(b => b.ShouldItemTransferAsync(It.IsAny())) + .Returns(Task.FromResult(true)); // Setup destination with small chunk size and a larger source total length // to cause chunked copy diff --git a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs index 32aca217edbc..5987615c89ab 100644 --- a/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs +++ b/sdk/storage/Azure.Storage.DataMovement/tests/Shared/MemoryStorageResourceItem.cs @@ -80,7 +80,6 @@ protected internal override Task GetPropertiesAsy { return Task.FromResult(new StorageResourceItemProperties() { - Uri = Uri, ResourceLength = Buffer.Length, ETag = new ETag("etag"), LastModifiedTime = DateTimeOffset.UtcNow diff --git a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj index 261541a3f17b..d7c70835251c 100644 --- a/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj +++ b/sdk/storage/Azure.Storage.Files.DataLake/src/Azure.Storage.Files.DataLake.csproj @@ -22,6 +22,7 @@ true + diff --git a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj index 70ca9a819905..618315c551e5 100644 --- a/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj +++ b/sdk/storage/Azure.Storage.Files.Shares/src/Azure.Storage.Files.Shares.csproj @@ -21,6 +21,7 @@ true + diff --git a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj index 631ef6c887f1..d7c045a03e2f 100644 --- a/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj +++ b/sdk/storage/Azure.Storage.Queues/src/Azure.Storage.Queues.csproj @@ -28,6 +28,7 @@ + diff --git a/sdk/storage/ci.datamovement.yml b/sdk/storage/ci.datamovement.yml index e1301b252e81..9fdee85f9589 100644 --- a/sdk/storage/ci.datamovement.yml +++ b/sdk/storage/ci.datamovement.yml @@ -14,6 +14,7 @@ pr: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files.Shares/ + - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -32,5 +33,8 @@ extends: - name: Azure.Storage.DataMovement.Files.Shares safeName: AzureStorageDataMovementFilesShares skipSmokeTests: true + - name: Azure.Storage.DataMovement.Blobs.Files.Shares + safeName: AzureStorageDataMovementBlobsFilesShares + skipSmokeTests: true TestSetupSteps: - template: /sdk/storage/tests-install-azurite.yml diff --git a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.Serialization.cs b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.Serialization.cs index a6684cdbcfc3..a98763c1e6a0 100644 --- a/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.Serialization.cs +++ b/sdk/storageactions/Azure.ResourceManager.StorageActions/src/Generated/StorageTaskResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageActions { public partial class StorageTaskResource : IJsonModel { + private static StorageTaskData s_dataDeserializationInstance; + private static StorageTaskData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageTaskData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageActionsContext.Default); StorageTaskData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageActionsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/AmlFileSystemResource.Serialization.cs b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/AmlFileSystemResource.Serialization.cs index 1a6410731daa..22a28ae2c68c 100644 --- a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/AmlFileSystemResource.Serialization.cs +++ b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/AmlFileSystemResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageCache { public partial class AmlFileSystemResource : IJsonModel { + private static AmlFileSystemData s_dataDeserializationInstance; + private static AmlFileSystemData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AmlFileSystemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AmlFileSystemData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageCacheContext.Default); AmlFileSystemData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageCacheContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheImportJobResource.Serialization.cs b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheImportJobResource.Serialization.cs index 365900bc6556..0abc541fd401 100644 --- a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheImportJobResource.Serialization.cs +++ b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheImportJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageCache { public partial class StorageCacheImportJobResource : IJsonModel { + private static StorageCacheImportJobData s_dataDeserializationInstance; + private static StorageCacheImportJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageCacheImportJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageCacheImportJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageCacheContext.Default); StorageCacheImportJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageCacheContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheResource.Serialization.cs b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheResource.Serialization.cs index 8134218cd353..5defbf375523 100644 --- a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheResource.Serialization.cs +++ b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageCacheResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageCache { public partial class StorageCacheResource : IJsonModel { + private static StorageCacheData s_dataDeserializationInstance; + private static StorageCacheData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageCacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageCacheData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageCacheContext.Default); StorageCacheData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageCacheContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageTargetResource.Serialization.cs b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageTargetResource.Serialization.cs index b6143ce3f7db..277fd79cbe1f 100644 --- a/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageTargetResource.Serialization.cs +++ b/sdk/storagecache/Azure.ResourceManager.StorageCache/src/Generated/StorageTargetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageCache { public partial class StorageTargetResource : IJsonModel { + private static StorageTargetData s_dataDeserializationInstance; + private static StorageTargetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageCacheContext.Default); StorageTargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageCacheContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.Serialization.cs index 4d0671dcccef..89cad4531d9c 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobDefinitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class JobDefinitionResource : IJsonModel { + private static JobDefinitionData s_dataDeserializationInstance; + private static JobDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - JobDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + JobDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); JobDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.Serialization.cs index 64d2826e6ad1..bd2eb05900f3 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/JobRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class JobRunResource : IJsonModel { + private static JobRunData s_dataDeserializationInstance; + private static JobRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - JobRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + JobRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); JobRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.Serialization.cs index 51e7b43b2c5c..00df2995bbb3 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverAgentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class StorageMoverAgentResource : IJsonModel { + private static StorageMoverAgentData s_dataDeserializationInstance; + private static StorageMoverAgentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageMoverAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageMoverAgentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); StorageMoverAgentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.Serialization.cs index 479ccc003881..0a5cea907312 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class StorageMoverEndpointResource : IJsonModel { + private static StorageMoverEndpointData s_dataDeserializationInstance; + private static StorageMoverEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageMoverEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageMoverEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); StorageMoverEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.Serialization.cs index d7eab650e8c0..b53a3ff887b4 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverProjectResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class StorageMoverProjectResource : IJsonModel { + private static StorageMoverProjectData s_dataDeserializationInstance; + private static StorageMoverProjectData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageMoverProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageMoverProjectData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); StorageMoverProjectData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.Serialization.cs b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.Serialization.cs index 4873b0e8f226..5240ed7b5573 100644 --- a/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.Serialization.cs +++ b/sdk/storagemover/Azure.ResourceManager.StorageMover/src/Generated/StorageMoverResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageMover { public partial class StorageMoverResource : IJsonModel { + private static StorageMoverData s_dataDeserializationInstance; + private static StorageMoverData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageMoverData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageMoverData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageMoverContext.Default); StorageMoverData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageMoverContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolIscsiTargetResource.Serialization.cs b/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolIscsiTargetResource.Serialization.cs index 370f4fdfd54b..8b003e333adf 100644 --- a/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolIscsiTargetResource.Serialization.cs +++ b/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolIscsiTargetResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StoragePool { public partial class DiskPoolIscsiTargetResource : IJsonModel { + private static DiskPoolIscsiTargetData s_dataDeserializationInstance; + private static DiskPoolIscsiTargetData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskPoolIscsiTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskPoolIscsiTargetData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStoragePoolContext.Default); DiskPoolIscsiTargetData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStoragePoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolResource.Serialization.cs b/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolResource.Serialization.cs index f1b1e08d910a..5d1c4967949f 100644 --- a/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolResource.Serialization.cs +++ b/sdk/storagepool/Azure.ResourceManager.StoragePool/src/Generated/DiskPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StoragePool { public partial class DiskPoolResource : IJsonModel { + private static DiskPoolData s_dataDeserializationInstance; + private static DiskPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiskPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiskPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStoragePoolContext.Default); DiskPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStoragePoolContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/CloudEndpointResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/CloudEndpointResource.Serialization.cs index 5fad523617c2..237d8e218ed2 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/CloudEndpointResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/CloudEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class CloudEndpointResource : IJsonModel { + private static CloudEndpointData s_dataDeserializationInstance; + private static CloudEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CloudEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CloudEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); CloudEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncGroupResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncGroupResource.Serialization.cs index b7fa5eb4ba28..c1b7e58cef17 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncGroupResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncGroupResource : IJsonModel { + private static StorageSyncGroupData s_dataDeserializationInstance; + private static StorageSyncGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncPrivateEndpointConnectionResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncPrivateEndpointConnectionResource.Serialization.cs index c4f9171b8b94..1b3d6f14a49e 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncPrivateEndpointConnectionResource : IJsonModel { + private static StorageSyncPrivateEndpointConnectionData s_dataDeserializationInstance; + private static StorageSyncPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncRegisteredServerResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncRegisteredServerResource.Serialization.cs index e6d7532e5160..6a9a0e04662b 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncRegisteredServerResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncRegisteredServerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncRegisteredServerResource : IJsonModel { + private static StorageSyncRegisteredServerData s_dataDeserializationInstance; + private static StorageSyncRegisteredServerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncRegisteredServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncRegisteredServerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncRegisteredServerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServerEndpointResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServerEndpointResource.Serialization.cs index 5866a4782a7c..b308d493f8f8 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServerEndpointResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServerEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncServerEndpointResource : IJsonModel { + private static StorageSyncServerEndpointData s_dataDeserializationInstance; + private static StorageSyncServerEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncServerEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncServerEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncServerEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServiceResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServiceResource.Serialization.cs index f77d2f303514..ae7e85da0388 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServiceResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncServiceResource : IJsonModel { + private static StorageSyncServiceData s_dataDeserializationInstance; + private static StorageSyncServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncWorkflowResource.Serialization.cs b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncWorkflowResource.Serialization.cs index 21702182995b..7affacd44274 100644 --- a/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncWorkflowResource.Serialization.cs +++ b/sdk/storagesync/Azure.ResourceManager.StorageSync/src/Generated/StorageSyncWorkflowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StorageSync { public partial class StorageSyncWorkflowResource : IJsonModel { + private static StorageSyncWorkflowData s_dataDeserializationInstance; + private static StorageSyncWorkflowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StorageSyncWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StorageSyncWorkflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStorageSyncContext.Default); StorageSyncWorkflowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStorageSyncContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.Serialization.cs index 009224383909..6723e6a079b2 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsClusterResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamAnalyticsClusterResource : IJsonModel { + private static StreamAnalyticsClusterData s_dataDeserializationInstance; + private static StreamAnalyticsClusterData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamAnalyticsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamAnalyticsClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamAnalyticsClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointResource.Serialization.cs index 80c562e83052..fda75a59ed9c 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamAnalyticsPrivateEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamAnalyticsPrivateEndpointResource : IJsonModel { + private static StreamAnalyticsPrivateEndpointData s_dataDeserializationInstance; + private static StreamAnalyticsPrivateEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamAnalyticsPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamAnalyticsPrivateEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamAnalyticsPrivateEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.Serialization.cs index afbb1cdbf8f3..c3f07ecf8f6d 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobFunctionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamingJobFunctionResource : IJsonModel { + private static StreamingJobFunctionData s_dataDeserializationInstance; + private static StreamingJobFunctionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingJobFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingJobFunctionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamingJobFunctionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.Serialization.cs index 4fb8c3045674..b6833bb0f057 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobInputResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamingJobInputResource : IJsonModel { + private static StreamingJobInputData s_dataDeserializationInstance; + private static StreamingJobInputData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingJobInputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingJobInputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamingJobInputData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.Serialization.cs index e909e0b8706f..7138ca4ce7ec 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobOutputResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamingJobOutputResource : IJsonModel { + private static StreamingJobOutputData s_dataDeserializationInstance; + private static StreamingJobOutputData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingJobOutputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingJobOutputData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamingJobOutputData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.Serialization.cs index da2d6fdea34f..188977713175 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamingJobResource : IJsonModel { + private static StreamingJobData s_dataDeserializationInstance; + private static StreamingJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamingJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationResource.Serialization.cs b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationResource.Serialization.cs index c6f271fe99b3..f3ce8769e4ef 100644 --- a/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationResource.Serialization.cs +++ b/sdk/streamanalytics/Azure.ResourceManager.StreamAnalytics/src/Generated/StreamingJobTransformationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.StreamAnalytics { public partial class StreamingJobTransformationResource : IJsonModel { + private static StreamingJobTransformationData s_dataDeserializationInstance; + private static StreamingJobTransformationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StreamingJobTransformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StreamingJobTransformationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerStreamAnalyticsContext.Default); StreamingJobTransformationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerStreamAnalyticsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/BillingAccountPolicyResource.Serialization.cs b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/BillingAccountPolicyResource.Serialization.cs index 62e480c0e2cd..67bdba8eed10 100644 --- a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/BillingAccountPolicyResource.Serialization.cs +++ b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/BillingAccountPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Subscription { public partial class BillingAccountPolicyResource : IJsonModel { + private static BillingAccountPolicyData s_dataDeserializationInstance; + private static BillingAccountPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - BillingAccountPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + BillingAccountPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSubscriptionContext.Default); BillingAccountPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSubscriptionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/SubscriptionAliasResource.Serialization.cs b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/SubscriptionAliasResource.Serialization.cs index 0d49168b574e..790434784de5 100644 --- a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/SubscriptionAliasResource.Serialization.cs +++ b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/SubscriptionAliasResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Subscription { public partial class SubscriptionAliasResource : IJsonModel { + private static SubscriptionAliasData s_dataDeserializationInstance; + private static SubscriptionAliasData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SubscriptionAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SubscriptionAliasData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSubscriptionContext.Default); SubscriptionAliasData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSubscriptionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/TenantPolicyResource.Serialization.cs b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/TenantPolicyResource.Serialization.cs index 04b30c6f01a0..3e442bbd4f71 100644 --- a/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/TenantPolicyResource.Serialization.cs +++ b/sdk/subscription/Azure.ResourceManager.Subscription/src/Generated/TenantPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Subscription { public partial class TenantPolicyResource : IJsonModel { + private static TenantPolicyData s_dataDeserializationInstance; + private static TenantPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TenantPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TenantPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSubscriptionContext.Default); TenantPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSubscriptionContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.Serialization.cs index 8547eb330327..8bf12abc6ca5 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class ProblemClassificationResource : IJsonModel { + private static ProblemClassificationData s_dataDeserializationInstance; + private static ProblemClassificationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProblemClassificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProblemClassificationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); ProblemClassificationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.Serialization.cs index dc8dabe387da..eba67a8eefb1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SubscriptionFileWorkspaceResource : IJsonModel { + private static FileWorkspaceDetailData s_dataDeserializationInstance; + private static FileWorkspaceDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FileWorkspaceDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FileWorkspaceDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); FileWorkspaceDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.Serialization.cs index 6fcef36e9533..aa9b95f48d88 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SubscriptionSupportTicketResource : IJsonModel { + private static SupportTicketData s_dataDeserializationInstance; + private static SupportTicketData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportTicketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportTicketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportTicketData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.Serialization.cs index 8936e31ad49e..014350c57bd8 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportAzureServiceResource : IJsonModel { + private static SupportAzureServiceData s_dataDeserializationInstance; + private static SupportAzureServiceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportAzureServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportAzureServiceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportAzureServiceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.Serialization.cs index 8e931ac48fad..26e5acb6b02f 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketChatTranscriptResource : IJsonModel { + private static ChatTranscriptDetailData s_dataDeserializationInstance; + private static ChatTranscriptDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChatTranscriptDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChatTranscriptDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); ChatTranscriptDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.Serialization.cs index 5bad1cef3af3..05f217d22c76 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketCommunicationResource : IJsonModel { + private static SupportTicketCommunicationData s_dataDeserializationInstance; + private static SupportTicketCommunicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportTicketCommunicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportTicketCommunicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportTicketCommunicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.Serialization.cs index ac4c7ac1db3d..818de95d74b9 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketFileResource : IJsonModel { + private static SupportFileDetailData s_dataDeserializationInstance; + private static SupportFileDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportFileDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportFileDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportFileDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.Serialization.cs index 58d79bf7f740..0f93ac9b9fe1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketNoSubChatTranscriptResource : IJsonModel { + private static ChatTranscriptDetailData s_dataDeserializationInstance; + private static ChatTranscriptDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ChatTranscriptDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ChatTranscriptDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); ChatTranscriptDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.Serialization.cs index 4aff24b7a6cd..1d91825ae17c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketNoSubCommunicationResource : IJsonModel { + private static SupportTicketCommunicationData s_dataDeserializationInstance; + private static SupportTicketCommunicationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportTicketCommunicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportTicketCommunicationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportTicketCommunicationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.Serialization.cs index 24688b21bd0e..db3ea8a9d7be 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class SupportTicketNoSubFileResource : IJsonModel { + private static SupportFileDetailData s_dataDeserializationInstance; + private static SupportFileDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportFileDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportFileDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportFileDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.Serialization.cs index 82ffc266bb9d..1aa8ac345631 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class TenantFileWorkspaceResource : IJsonModel { + private static FileWorkspaceDetailData s_dataDeserializationInstance; + private static FileWorkspaceDetailData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FileWorkspaceDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FileWorkspaceDetailData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); FileWorkspaceDetailData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.Serialization.cs index 8b4a5a9fcd68..38c3b08b611d 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Support { public partial class TenantSupportTicketResource : IJsonModel { + private static SupportTicketData s_dataDeserializationInstance; + private static SupportTicketData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SupportTicketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SupportTicketData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSupportContext.Default); SupportTicketData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSupportContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAadOnlyAuthenticationResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAadOnlyAuthenticationResource.Serialization.cs index 40244f4fb07b..d6c5347368b2 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAadOnlyAuthenticationResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAadOnlyAuthenticationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseAadOnlyAuthenticationResource : IJsonModel { + private static SynapseAadOnlyAuthenticationData s_dataDeserializationInstance; + private static SynapseAadOnlyAuthenticationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseAadOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseAadOnlyAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseAadOnlyAuthenticationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAttachedDatabaseConfigurationResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAttachedDatabaseConfigurationResource.Serialization.cs index 329606f7f91e..7c227394d2ca 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAttachedDatabaseConfigurationResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseAttachedDatabaseConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseAttachedDatabaseConfigurationResource : IJsonModel { + private static SynapseAttachedDatabaseConfigurationData s_dataDeserializationInstance; + private static SynapseAttachedDatabaseConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseAttachedDatabaseConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseAttachedDatabaseConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseAttachedDatabaseConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseBigDataPoolInfoResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseBigDataPoolInfoResource.Serialization.cs index 3fa17e31ae98..4dcab4d8f012 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseBigDataPoolInfoResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseBigDataPoolInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseBigDataPoolInfoResource : IJsonModel { + private static SynapseBigDataPoolInfoData s_dataDeserializationInstance; + private static SynapseBigDataPoolInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseBigDataPoolInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseBigDataPoolInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseBigDataPoolInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseClusterPrincipalAssignmentResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseClusterPrincipalAssignmentResource.Serialization.cs index 3969c4f3849a..5134430bb186 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseClusterPrincipalAssignmentResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseClusterPrincipalAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseClusterPrincipalAssignmentResource : IJsonModel { + private static SynapseClusterPrincipalAssignmentData s_dataDeserializationInstance; + private static SynapseClusterPrincipalAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseClusterPrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseClusterPrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseClusterPrincipalAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataConnectionResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataConnectionResource.Serialization.cs index f1f5602974a4..083fce112d58 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataConnectionResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDataConnectionResource : IJsonModel { + private static SynapseDataConnectionData s_dataDeserializationInstance; + private static SynapseDataConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDataConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDataConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDataConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingPolicyResource.Serialization.cs index 813b65756287..8d856512b694 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDataMaskingPolicyResource : IJsonModel { + private static SynapseDataMaskingPolicyData s_dataDeserializationInstance; + private static SynapseDataMaskingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDataMaskingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDataMaskingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDataMaskingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingRuleResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingRuleResource.Serialization.cs index 003918618c06..209a51c6eb9a 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingRuleResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataMaskingRuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDataMaskingRuleResource : IJsonModel { + private static SynapseDataMaskingRuleData s_dataDeserializationInstance; + private static SynapseDataMaskingRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDataMaskingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDataMaskingRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDataMaskingRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataWarehouseUserActivityResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataWarehouseUserActivityResource.Serialization.cs index 3adae188e68d..7a20c42bca06 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataWarehouseUserActivityResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDataWarehouseUserActivityResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDataWarehouseUserActivityResource : IJsonModel { + private static SynapseDataWarehouseUserActivityData s_dataDeserializationInstance; + private static SynapseDataWarehouseUserActivityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDataWarehouseUserActivityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDataWarehouseUserActivityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDataWarehouseUserActivityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabasePrincipalAssignmentResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabasePrincipalAssignmentResource.Serialization.cs index 32e01a6dbc4d..3927449f3913 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabasePrincipalAssignmentResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabasePrincipalAssignmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDatabasePrincipalAssignmentResource : IJsonModel { + private static SynapseDatabasePrincipalAssignmentData s_dataDeserializationInstance; + private static SynapseDatabasePrincipalAssignmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDatabasePrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDatabasePrincipalAssignmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDatabasePrincipalAssignmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabaseResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabaseResource.Serialization.cs index 68e801f536f1..edc0d0e2ae35 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabaseResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDatabaseResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDatabaseResource : IJsonModel { + private static SynapseDatabaseData s_dataDeserializationInstance; + private static SynapseDatabaseData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDatabaseData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDatabaseData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDedicatedSqlMinimalTlsSettingResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDedicatedSqlMinimalTlsSettingResource.Serialization.cs index bbf6725a0c0d..719f22b27b69 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDedicatedSqlMinimalTlsSettingResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseDedicatedSqlMinimalTlsSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseDedicatedSqlMinimalTlsSettingResource : IJsonModel { + private static SynapseDedicatedSqlMinimalTlsSettingData s_dataDeserializationInstance; + private static SynapseDedicatedSqlMinimalTlsSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseDedicatedSqlMinimalTlsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseDedicatedSqlMinimalTlsSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseDedicatedSqlMinimalTlsSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseEncryptionProtectorResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseEncryptionProtectorResource.Serialization.cs index 5c819209d871..210d71d073e0 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseEncryptionProtectorResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseEncryptionProtectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseEncryptionProtectorResource : IJsonModel { + private static SynapseEncryptionProtectorData s_dataDeserializationInstance; + private static SynapseEncryptionProtectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseEncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseEncryptionProtectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseEncryptionProtectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedServerBlobAuditingPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedServerBlobAuditingPolicyResource.Serialization.cs index 083fe28e3173..da1eb62d7b76 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedServerBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedServerBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseExtendedServerBlobAuditingPolicyResource : IJsonModel { + private static SynapseExtendedServerBlobAuditingPolicyData s_dataDeserializationInstance; + private static SynapseExtendedServerBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseExtendedServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseExtendedServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseExtendedServerBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedSqlPoolBlobAuditingPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedSqlPoolBlobAuditingPolicyResource.Serialization.cs index ff9ebd56f9fe..62ee6bf56f3b 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedSqlPoolBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseExtendedSqlPoolBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseExtendedSqlPoolBlobAuditingPolicyResource : IJsonModel { + private static SynapseExtendedSqlPoolBlobAuditingPolicyData s_dataDeserializationInstance; + private static SynapseExtendedSqlPoolBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseExtendedSqlPoolBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseExtendedSqlPoolBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseExtendedSqlPoolBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseGeoBackupPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseGeoBackupPolicyResource.Serialization.cs index 937ad193b574..eff059f33c74 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseGeoBackupPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseGeoBackupPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseGeoBackupPolicyResource : IJsonModel { + private static SynapseGeoBackupPolicyData s_dataDeserializationInstance; + private static SynapseGeoBackupPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseGeoBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseGeoBackupPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseGeoBackupPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIPFirewallRuleInfoResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIPFirewallRuleInfoResource.Serialization.cs index 83cb71748325..45c16e96371c 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIPFirewallRuleInfoResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIPFirewallRuleInfoResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseIPFirewallRuleInfoResource : IJsonModel { + private static SynapseIPFirewallRuleInfoData s_dataDeserializationInstance; + private static SynapseIPFirewallRuleInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseIPFirewallRuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseIPFirewallRuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseIPFirewallRuleInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIntegrationRuntimeResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIntegrationRuntimeResource.Serialization.cs index 624e45d64f6a..059df930b4e0 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIntegrationRuntimeResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseIntegrationRuntimeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseIntegrationRuntimeResource : IJsonModel { + private static SynapseIntegrationRuntimeData s_dataDeserializationInstance; + private static SynapseIntegrationRuntimeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseIntegrationRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseIntegrationRuntimeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseIntegrationRuntimeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKeyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKeyResource.Serialization.cs index dd8b82f0ef59..430e431fa91e 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKeyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKeyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseKeyResource : IJsonModel { + private static SynapseKeyData s_dataDeserializationInstance; + private static SynapseKeyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseKeyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseKeyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKustoPoolResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKustoPoolResource.Serialization.cs index f2a03b3f2977..44a978d3b740 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKustoPoolResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseKustoPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseKustoPoolResource : IJsonModel { + private static SynapseKustoPoolData s_dataDeserializationInstance; + private static SynapseKustoPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseKustoPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseKustoPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseKustoPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseLibraryResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseLibraryResource.Serialization.cs index 306812caf659..f577e95800a5 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseLibraryResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseLibraryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseLibraryResource : IJsonModel { + private static SynapseLibraryData s_dataDeserializationInstance; + private static SynapseLibraryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseLibraryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseLibraryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseLibraryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowOptionResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowOptionResource.Serialization.cs index dea0e25e2cf7..a12869f0233c 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowOptionResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowOptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseMaintenanceWindowOptionResource : IJsonModel { + private static SynapseMaintenanceWindowOptionData s_dataDeserializationInstance; + private static SynapseMaintenanceWindowOptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseMaintenanceWindowOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseMaintenanceWindowOptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseMaintenanceWindowOptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowResource.Serialization.cs index 39b8d5075db2..99bad0638ff1 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMaintenanceWindowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseMaintenanceWindowResource : IJsonModel { + private static SynapseMaintenanceWindowData s_dataDeserializationInstance; + private static SynapseMaintenanceWindowData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseMaintenanceWindowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseMaintenanceWindowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseMaintenanceWindowData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseManagedIdentitySqlControlSettingResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseManagedIdentitySqlControlSettingResource.Serialization.cs index 85edfd2d54de..41e5fc39fe17 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseManagedIdentitySqlControlSettingResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseManagedIdentitySqlControlSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseManagedIdentitySqlControlSettingResource : IJsonModel { + private static SynapseManagedIdentitySqlControlSettingData s_dataDeserializationInstance; + private static SynapseManagedIdentitySqlControlSettingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseManagedIdentitySqlControlSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseManagedIdentitySqlControlSettingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseManagedIdentitySqlControlSettingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMetadataSyncConfigurationResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMetadataSyncConfigurationResource.Serialization.cs index 8cd57434ad65..7422a67ed828 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMetadataSyncConfigurationResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseMetadataSyncConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseMetadataSyncConfigurationResource : IJsonModel { + private static SynapseMetadataSyncConfigurationData s_dataDeserializationInstance; + private static SynapseMetadataSyncConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseMetadataSyncConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseMetadataSyncConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseMetadataSyncConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionForPrivateLinkHubResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionForPrivateLinkHubResource.Serialization.cs index b38b287751ab..4e156f18a8fc 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionForPrivateLinkHubResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionForPrivateLinkHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapsePrivateEndpointConnectionForPrivateLinkHubResource : IJsonModel { + private static SynapsePrivateEndpointConnectionForPrivateLinkHubData s_dataDeserializationInstance; + private static SynapsePrivateEndpointConnectionForPrivateLinkHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapsePrivateEndpointConnectionForPrivateLinkHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapsePrivateEndpointConnectionForPrivateLinkHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapsePrivateEndpointConnectionForPrivateLinkHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionResource.Serialization.cs index 35e2a5b809e4..7f52aba68051 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapsePrivateEndpointConnectionResource : IJsonModel { + private static SynapsePrivateEndpointConnectionData s_dataDeserializationInstance; + private static SynapsePrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapsePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapsePrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapsePrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkHubResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkHubResource.Serialization.cs index 73ed7896ca18..4dc4fd568008 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkHubResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapsePrivateLinkHubResource : IJsonModel { + private static SynapsePrivateLinkHubData s_dataDeserializationInstance; + private static SynapsePrivateLinkHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapsePrivateLinkHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapsePrivateLinkHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapsePrivateLinkHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkResource.Serialization.cs index 022120576b37..7c6f102d0cc3 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapsePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapsePrivateLinkResource : IJsonModel { + private static SynapsePrivateLinkResourceData s_dataDeserializationInstance; + private static SynapsePrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapsePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapsePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapsePrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRecoverableSqlPoolResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRecoverableSqlPoolResource.Serialization.cs index c59676b338f1..abcd7b283269 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRecoverableSqlPoolResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRecoverableSqlPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseRecoverableSqlPoolResource : IJsonModel { + private static SynapseRecoverableSqlPoolData s_dataDeserializationInstance; + private static SynapseRecoverableSqlPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseRecoverableSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseRecoverableSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseRecoverableSqlPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseReplicationLinkResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseReplicationLinkResource.Serialization.cs index 52ff8ccbfebf..35ef5bdf08ab 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseReplicationLinkResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseReplicationLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseReplicationLinkResource : IJsonModel { + private static SynapseReplicationLinkData s_dataDeserializationInstance; + private static SynapseReplicationLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseReplicationLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseReplicationLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseReplicationLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorableDroppedSqlPoolResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorableDroppedSqlPoolResource.Serialization.cs index edf1ec4da1ff..3afa2bf1b29d 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorableDroppedSqlPoolResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorableDroppedSqlPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseRestorableDroppedSqlPoolResource : IJsonModel { + private static SynapseRestorableDroppedSqlPoolData s_dataDeserializationInstance; + private static SynapseRestorableDroppedSqlPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseRestorableDroppedSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseRestorableDroppedSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseRestorableDroppedSqlPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorePointResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorePointResource.Serialization.cs index de4fc0136855..8d255fcff397 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorePointResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseRestorePointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseRestorePointResource : IJsonModel { + private static SynapseRestorePointData s_dataDeserializationInstance; + private static SynapseRestorePointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseRestorePointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseRestorePointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSensitivityLabelResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSensitivityLabelResource.Serialization.cs index 21782a9e8610..c6017a80e5b2 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSensitivityLabelResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSensitivityLabelResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSensitivityLabelResource : IJsonModel { + private static SynapseSensitivityLabelData s_dataDeserializationInstance; + private static SynapseSensitivityLabelData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSensitivityLabelData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSensitivityLabelData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerBlobAuditingPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerBlobAuditingPolicyResource.Serialization.cs index 22f5b7e3f6ee..e3a8ae489f33 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseServerBlobAuditingPolicyResource : IJsonModel { + private static SynapseServerBlobAuditingPolicyData s_dataDeserializationInstance; + private static SynapseServerBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseServerBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseServerBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerSecurityAlertPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerSecurityAlertPolicyResource.Serialization.cs index b5f9da8a226d..4459fb53d692 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseServerSecurityAlertPolicyResource : IJsonModel { + private static SynapseServerSecurityAlertPolicyData s_dataDeserializationInstance; + private static SynapseServerSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseServerSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseServerSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerVulnerabilityAssessmentResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerVulnerabilityAssessmentResource.Serialization.cs index c945d60f31a6..2e311429f9db 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseServerVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseServerVulnerabilityAssessmentResource : IJsonModel { + private static SynapseServerVulnerabilityAssessmentData s_dataDeserializationInstance; + private static SynapseServerVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseServerVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseServerVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSparkConfigurationResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSparkConfigurationResource.Serialization.cs index c5ab7bd71521..c305f4a2fb03 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSparkConfigurationResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSparkConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSparkConfigurationResource : IJsonModel { + private static SynapseSparkConfigurationData s_dataDeserializationInstance; + private static SynapseSparkConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSparkConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSparkConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSparkConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolBlobAuditingPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolBlobAuditingPolicyResource.Serialization.cs index baabeb759c81..41770963b517 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolBlobAuditingPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolBlobAuditingPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolBlobAuditingPolicyResource : IJsonModel { + private static SynapseSqlPoolBlobAuditingPolicyData s_dataDeserializationInstance; + private static SynapseSqlPoolBlobAuditingPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolBlobAuditingPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolBlobAuditingPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolColumnResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolColumnResource.Serialization.cs index 75e293a2a107..f0a3c259a9df 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolColumnResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolColumnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolColumnResource : IJsonModel { + private static SynapseSqlPoolColumnData s_dataDeserializationInstance; + private static SynapseSqlPoolColumnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolColumnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolColumnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolConnectionPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolConnectionPolicyResource.Serialization.cs index 94709b51eba5..8cfa090ff598 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolConnectionPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolConnectionPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolConnectionPolicyResource : IJsonModel { + private static SynapseSqlPoolConnectionPolicyData s_dataDeserializationInstance; + private static SynapseSqlPoolConnectionPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolConnectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolConnectionPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolConnectionPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolResource.Serialization.cs index 33572dd256ba..2e6b0d1b255d 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolResource : IJsonModel { + private static SynapseSqlPoolData s_dataDeserializationInstance; + private static SynapseSqlPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSchemaResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSchemaResource.Serialization.cs index 09e0f8a7933f..095076ab6959 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSchemaResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSchemaResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolSchemaResource : IJsonModel { + private static SynapseSqlPoolSchemaData s_dataDeserializationInstance; + private static SynapseSqlPoolSchemaData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolSchemaData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolSchemaData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSecurityAlertPolicyResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSecurityAlertPolicyResource.Serialization.cs index 64f14bddd314..c7fe861a529b 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSecurityAlertPolicyResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolSecurityAlertPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolSecurityAlertPolicyResource : IJsonModel { + private static SynapseSqlPoolSecurityAlertPolicyData s_dataDeserializationInstance; + private static SynapseSqlPoolSecurityAlertPolicyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolSecurityAlertPolicyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolSecurityAlertPolicyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolTableResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolTableResource.Serialization.cs index 37323ade1059..6e77ea3526ec 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolTableResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolTableResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolTableResource : IJsonModel { + private static SynapseSqlPoolTableData s_dataDeserializationInstance; + private static SynapseSqlPoolTableData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolTableData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolTableData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentResource.Serialization.cs index fc8b6eec977f..52e29bb7d04b 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolVulnerabilityAssessmentResource : IJsonModel { + private static SynapseSqlPoolVulnerabilityAssessmentData s_dataDeserializationInstance; + private static SynapseSqlPoolVulnerabilityAssessmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolVulnerabilityAssessmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolVulnerabilityAssessmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentRuleBaselineResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentRuleBaselineResource.Serialization.cs index 689ce0bd2547..8c8a542067e4 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentRuleBaselineResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseSqlPoolVulnerabilityAssessmentRuleBaselineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseSqlPoolVulnerabilityAssessmentRuleBaselineResource : IJsonModel { + private static SynapseSqlPoolVulnerabilityAssessmentRuleBaselineData s_dataDeserializationInstance; + private static SynapseSqlPoolVulnerabilityAssessmentRuleBaselineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseSqlPoolVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseSqlPoolVulnerabilityAssessmentRuleBaselineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseSqlPoolVulnerabilityAssessmentRuleBaselineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseTransparentDataEncryptionResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseTransparentDataEncryptionResource.Serialization.cs index 96962bd54a7f..661fd48f2af3 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseTransparentDataEncryptionResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseTransparentDataEncryptionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseTransparentDataEncryptionResource : IJsonModel { + private static SynapseTransparentDataEncryptionData s_dataDeserializationInstance; + private static SynapseTransparentDataEncryptionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseTransparentDataEncryptionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseTransparentDataEncryptionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseVulnerabilityAssessmentScanRecordResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseVulnerabilityAssessmentScanRecordResource.Serialization.cs index 511fe3f62488..fdd98d50ddfa 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseVulnerabilityAssessmentScanRecordResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseVulnerabilityAssessmentScanRecordResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseVulnerabilityAssessmentScanRecordResource : IJsonModel { + private static SynapseVulnerabilityAssessmentScanRecordData s_dataDeserializationInstance; + private static SynapseVulnerabilityAssessmentScanRecordData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseVulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseVulnerabilityAssessmentScanRecordData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseVulnerabilityAssessmentScanRecordData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadClassifierResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadClassifierResource.Serialization.cs index 716077bbfcf0..a429ab926e3f 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadClassifierResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadClassifierResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkloadClassifierResource : IJsonModel { + private static SynapseWorkloadClassifierData s_dataDeserializationInstance; + private static SynapseWorkloadClassifierData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseWorkloadClassifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseWorkloadClassifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseWorkloadClassifierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadGroupResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadGroupResource.Serialization.cs index ae4aaf77c300..0d95688a0736 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadGroupResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkloadGroupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkloadGroupResource : IJsonModel { + private static SynapseWorkloadGroupData s_dataDeserializationInstance; + private static SynapseWorkloadGroupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseWorkloadGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseWorkloadGroupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseWorkloadGroupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceAdministratorResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceAdministratorResource.Serialization.cs index 5f8257192b75..0ffa3205bdfa 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceAdministratorResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkspaceAdministratorResource : IJsonModel { + private static SynapseWorkspaceAadAdminInfoData s_dataDeserializationInstance; + private static SynapseWorkspaceAadAdminInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseWorkspaceAadAdminInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseWorkspaceAadAdminInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseWorkspaceAadAdminInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspacePrivateLinkResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspacePrivateLinkResource.Serialization.cs index d6a4e37a09f8..1597cc28b7e3 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspacePrivateLinkResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspacePrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkspacePrivateLinkResource : IJsonModel { + private static SynapsePrivateLinkResourceData s_dataDeserializationInstance; + private static SynapsePrivateLinkResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapsePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapsePrivateLinkResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapsePrivateLinkResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceResource.Serialization.cs index 111538656f75..300c0f7634f5 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkspaceResource : IJsonModel { + private static SynapseWorkspaceData s_dataDeserializationInstance; + private static SynapseWorkspaceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseWorkspaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseWorkspaceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceSqlAdministratorResource.Serialization.cs b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceSqlAdministratorResource.Serialization.cs index f7c2bc846ba5..6cb9cc718497 100644 --- a/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceSqlAdministratorResource.Serialization.cs +++ b/sdk/synapse/Azure.ResourceManager.Synapse/src/Generated/SynapseWorkspaceSqlAdministratorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Synapse { public partial class SynapseWorkspaceSqlAdministratorResource : IJsonModel { + private static SynapseWorkspaceAadAdminInfoData s_dataDeserializationInstance; + private static SynapseWorkspaceAadAdminInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SynapseWorkspaceAadAdminInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SynapseWorkspaceAadAdminInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerSynapseContext.Default); SynapseWorkspaceAadAdminInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerSynapseContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerEndpointResource.Serialization.cs b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerEndpointResource.Serialization.cs index 49f7ca219496..ba3ab66c8db7 100644 --- a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerEndpointResource.Serialization.cs +++ b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerEndpointResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrafficManager { public partial class TrafficManagerEndpointResource : IJsonModel { + private static TrafficManagerEndpointData s_dataDeserializationInstance; + private static TrafficManagerEndpointData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficManagerEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficManagerEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrafficManagerContext.Default); TrafficManagerEndpointData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrafficManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerGeographicHierarchyResource.Serialization.cs b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerGeographicHierarchyResource.Serialization.cs index a57dfbb2ddea..923e508b5865 100644 --- a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerGeographicHierarchyResource.Serialization.cs +++ b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerGeographicHierarchyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrafficManager { public partial class TrafficManagerGeographicHierarchyResource : IJsonModel { + private static TrafficManagerGeographicHierarchyData s_dataDeserializationInstance; + private static TrafficManagerGeographicHierarchyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficManagerGeographicHierarchyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficManagerGeographicHierarchyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrafficManagerContext.Default); TrafficManagerGeographicHierarchyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrafficManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerHeatMapResource.Serialization.cs b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerHeatMapResource.Serialization.cs index dc7166dfbfde..1f6ed79421a2 100644 --- a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerHeatMapResource.Serialization.cs +++ b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerHeatMapResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrafficManager { public partial class TrafficManagerHeatMapResource : IJsonModel { + private static TrafficManagerHeatMapData s_dataDeserializationInstance; + private static TrafficManagerHeatMapData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficManagerHeatMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficManagerHeatMapData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrafficManagerContext.Default); TrafficManagerHeatMapData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrafficManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerProfileResource.Serialization.cs b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerProfileResource.Serialization.cs index 17051e0d065f..60c6d3e50574 100644 --- a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerProfileResource.Serialization.cs +++ b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrafficManager { public partial class TrafficManagerProfileResource : IJsonModel { + private static TrafficManagerProfileData s_dataDeserializationInstance; + private static TrafficManagerProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficManagerProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficManagerProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrafficManagerContext.Default); TrafficManagerProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrafficManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerUserMetricsResource.Serialization.cs b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerUserMetricsResource.Serialization.cs index 12c628107dcc..0f5334bff3b7 100644 --- a/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerUserMetricsResource.Serialization.cs +++ b/sdk/trafficmanager/Azure.ResourceManager.TrafficManager/src/Generated/TrafficManagerUserMetricsResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrafficManager { public partial class TrafficManagerUserMetricsResource : IJsonModel { + private static TrafficManagerUserMetricData s_dataDeserializationInstance; + private static TrafficManagerUserMetricData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrafficManagerUserMetricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrafficManagerUserMetricData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrafficManagerContext.Default); TrafficManagerUserMetricData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrafficManagerContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs index 408551f57cea..ddcd15ed0ba1 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningAccountResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrustedSigning { public partial class TrustedSigningAccountResource : IJsonModel { + private static TrustedSigningAccountData s_dataDeserializationInstance; + private static TrustedSigningAccountData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrustedSigningAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrustedSigningAccountData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrustedSigningContext.Default); TrustedSigningAccountData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrustedSigningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.Serialization.cs b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.Serialization.cs index c6787f0d80cc..3963c7a53a51 100644 --- a/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.Serialization.cs +++ b/sdk/trustedsigning/Azure.ResourceManager.TrustedSigning/src/Generated/TrustedSigningCertificateProfileResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.TrustedSigning { public partial class TrustedSigningCertificateProfileResource : IJsonModel { + private static TrustedSigningCertificateProfileData s_dataDeserializationInstance; + private static TrustedSigningCertificateProfileData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TrustedSigningCertificateProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TrustedSigningCertificateProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerTrustedSigningContext.Default); TrustedSigningCertificateProfileData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerTrustedSigningContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesCommunicationsGatewayResource.Serialization.cs b/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesCommunicationsGatewayResource.Serialization.cs index 8a523608c38b..73e53fa5160f 100644 --- a/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesCommunicationsGatewayResource.Serialization.cs +++ b/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesCommunicationsGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.VoiceServices { public partial class VoiceServicesCommunicationsGatewayResource : IJsonModel { + private static VoiceServicesCommunicationsGatewayData s_dataDeserializationInstance; + private static VoiceServicesCommunicationsGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VoiceServicesCommunicationsGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VoiceServicesCommunicationsGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerVoiceServicesContext.Default); VoiceServicesCommunicationsGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerVoiceServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesTestLineResource.Serialization.cs b/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesTestLineResource.Serialization.cs index b5ba6527295e..c987ca3c1c88 100644 --- a/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesTestLineResource.Serialization.cs +++ b/sdk/voiceservices/Azure.ResourceManager.VoiceServices/src/Generated/VoiceServicesTestLineResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.VoiceServices { public partial class VoiceServicesTestLineResource : IJsonModel { + private static VoiceServicesTestLineData s_dataDeserializationInstance; + private static VoiceServicesTestLineData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - VoiceServicesTestLineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + VoiceServicesTestLineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerVoiceServicesContext.Default); VoiceServicesTestLineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerVoiceServicesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubHubResource.Serialization.cs b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubHubResource.Serialization.cs index e010e35da5f4..aa5998395c44 100644 --- a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubHubResource.Serialization.cs +++ b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubHubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WebPubSub { public partial class WebPubSubHubResource : IJsonModel { + private static WebPubSubHubData s_dataDeserializationInstance; + private static WebPubSubHubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebPubSubHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebPubSubHubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWebPubSubContext.Default); WebPubSubHubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWebPubSubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnectionResource.Serialization.cs b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnectionResource.Serialization.cs index f5d27769a66a..21d31f1f04ef 100644 --- a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WebPubSub { public partial class WebPubSubPrivateEndpointConnectionResource : IJsonModel { + private static WebPubSubPrivateEndpointConnectionData s_dataDeserializationInstance; + private static WebPubSubPrivateEndpointConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebPubSubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebPubSubPrivateEndpointConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWebPubSubContext.Default); WebPubSubPrivateEndpointConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWebPubSubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubResource.Serialization.cs b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubResource.Serialization.cs index 97a08c4af0b4..cead493191dd 100644 --- a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubResource.Serialization.cs +++ b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WebPubSub { public partial class WebPubSubResource : IJsonModel { + private static WebPubSubData s_dataDeserializationInstance; + private static WebPubSubData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebPubSubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebPubSubData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWebPubSubContext.Default); WebPubSubData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWebPubSubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubSharedPrivateLinkResource.Serialization.cs b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubSharedPrivateLinkResource.Serialization.cs index 300934ff4848..190bf624f8d4 100644 --- a/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubSharedPrivateLinkResource.Serialization.cs +++ b/sdk/webpubsub/Azure.ResourceManager.WebPubSub/src/Generated/WebPubSubSharedPrivateLinkResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WebPubSub { public partial class WebPubSubSharedPrivateLinkResource : IJsonModel { + private static WebPubSubSharedPrivateLinkData s_dataDeserializationInstance; + private static WebPubSubSharedPrivateLinkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebPubSubSharedPrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebPubSubSharedPrivateLinkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWebPubSubContext.Default); WebPubSubSharedPrivateLinkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWebPubSubContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.Serialization.cs index e61a96e7d94e..5114b5b0d6fd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppCertificateResource : IJsonModel { + private static AppCertificateData s_dataDeserializationInstance; + private static AppCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.Serialization.cs index 9878c1b2ba32..79bc12429827 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateOrderResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServiceCertificateOrderResource : IJsonModel { + private static AppServiceCertificateOrderData s_dataDeserializationInstance; + private static AppServiceCertificateOrderData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceCertificateOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceCertificateOrderData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceCertificateOrderData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.Serialization.cs index 72e3a8bd0224..f4c7c36f8f52 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServiceCertificateResource : IJsonModel { + private static AppServiceCertificateData s_dataDeserializationInstance; + private static AppServiceCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.Serialization.cs index 457d1e776618..ec67d33dd684 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServiceDomainResource : IJsonModel { + private static AppServiceDomainData s_dataDeserializationInstance; + private static AppServiceDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.Serialization.cs index 986490502fad..daaf25da953b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServiceEnvironmentResource : IJsonModel { + private static AppServiceEnvironmentData s_dataDeserializationInstance; + private static AppServiceEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.Serialization.cs index 7769190095d8..19f3f1783dbf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanHybridConnectionNamespaceRelayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServicePlanHybridConnectionNamespaceRelayResource : IJsonModel { + private static HybridConnectionData s_dataDeserializationInstance; + private static HybridConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HybridConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.Serialization.cs index 8688cb152d26..02f27b4b11e5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServicePlanResource : IJsonModel { + private static AppServicePlanData s_dataDeserializationInstance; + private static AppServicePlanData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServicePlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServicePlanData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServicePlanData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.Serialization.cs index 57fdf63fac15..d387b0939eb1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServicePlanVirtualNetworkConnectionGatewayResource : IJsonModel { + private static AppServiceVirtualNetworkGatewayData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.Serialization.cs index 750c6c751e9c..e5f2647aa0a0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServicePlanVirtualNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServicePlanVirtualNetworkConnectionResource : IJsonModel { + private static AppServiceVirtualNetworkData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.Serialization.cs index db072b8521d5..a130a01cb831 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AppServiceSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AppServiceSourceControlResource : IJsonModel { + private static AppServiceSourceControlData s_dataDeserializationInstance; + private static AppServiceSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.Serialization.cs index a97d1dfcae4e..2414d001de74 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/AseV3NetworkingConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class AseV3NetworkingConfigurationResource : IJsonModel { + private static AseV3NetworkingConfigurationData s_dataDeserializationInstance; + private static AseV3NetworkingConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AseV3NetworkingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AseV3NetworkingConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AseV3NetworkingConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.Serialization.cs index 837584daae3e..060a03a2b7ab 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CertificateOrderDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class CertificateOrderDetectorResource : IJsonModel { + private static AppServiceDetectorData s_dataDeserializationInstance; + private static AppServiceDetectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceDetectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs index 8df70b824bf4..bc5660aed1a5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/CustomDnsSuffixConfigurationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class CustomDnsSuffixConfigurationResource : IJsonModel { + private static CustomDnsSuffixConfigurationData s_dataDeserializationInstance; + private static CustomDnsSuffixConfigurationData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CustomDnsSuffixConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); CustomDnsSuffixConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.Serialization.cs index a820de0d0bf0..9dc62b89c5ea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DeletedSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class DeletedSiteResource : IJsonModel { + private static DeletedSiteData s_dataDeserializationInstance; + private static DeletedSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DeletedSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DeletedSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DeletedSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.Serialization.cs index 88f819f1d94d..edf3497886ce 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/DomainOwnershipIdentifierResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class DomainOwnershipIdentifierResource : IJsonModel { + private static DomainOwnershipIdentifierData s_dataDeserializationInstance; + private static DomainOwnershipIdentifierData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DomainOwnershipIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DomainOwnershipIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DomainOwnershipIdentifierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.Serialization.cs index 34150b7e2dd0..b5385fe8bf08 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HostingEnvironmentDetectorResource : IJsonModel { + private static AppServiceDetectorData s_dataDeserializationInstance; + private static AppServiceDetectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceDetectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.Serialization.cs index 045e4cf3c286..1f83fb7ed100 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentMultiRolePoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HostingEnvironmentMultiRolePoolResource : IJsonModel { + private static AppServiceWorkerPoolData s_dataDeserializationInstance; + private static AppServiceWorkerPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceWorkerPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceWorkerPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceWorkerPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.Serialization.cs index 447efc4f2012..cffbf4980f58 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HostingEnvironmentPrivateEndpointConnectionResource : IJsonModel { + private static RemotePrivateEndpointConnectionARMResourceData s_dataDeserializationInstance; + private static RemotePrivateEndpointConnectionARMResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RemotePrivateEndpointConnectionARMResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.Serialization.cs index d0493a7b642c..460ffb4c1ed6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentRecommendationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HostingEnvironmentRecommendationResource : IJsonModel { + private static RecommendationRuleData s_dataDeserializationInstance; + private static RecommendationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecommendationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecommendationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RecommendationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.Serialization.cs index ac5917125b8f..07ae1c16a9b0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HostingEnvironmentWorkerPoolResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HostingEnvironmentWorkerPoolResource : IJsonModel { + private static AppServiceWorkerPoolData s_dataDeserializationInstance; + private static AppServiceWorkerPoolData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceWorkerPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceWorkerPoolData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceWorkerPoolData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.Serialization.cs index 00423135b7fc..355481cc99ea 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/HybridConnectionLimitResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class HybridConnectionLimitResource : IJsonModel { + private static HybridConnectionLimitData s_dataDeserializationInstance; + private static HybridConnectionLimitData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectionLimitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectionLimitData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HybridConnectionLimitData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.Serialization.cs index 9519861629e9..d5a461d976c4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/KubeEnvironmentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class KubeEnvironmentResource : IJsonModel { + private static KubeEnvironmentData s_dataDeserializationInstance; + private static KubeEnvironmentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - KubeEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + KubeEnvironmentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); KubeEnvironmentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.Serialization.cs index 988604b68f62..a22ac795b84b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class LogsSiteConfigResource : IJsonModel { + private static SiteLogsConfigData s_dataDeserializationInstance; + private static SiteLogsConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteLogsConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteLogsConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteLogsConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.Serialization.cs index e562d8ccc9bd..65e6681bafcf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/LogsSiteSlotConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class LogsSiteSlotConfigResource : IJsonModel { + private static SiteLogsConfigData s_dataDeserializationInstance; + private static SiteLogsConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteLogsConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteLogsConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteLogsConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.Serialization.cs index dc20c105c051..d0f655c037e1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/MigrateMySqlStatusResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class MigrateMySqlStatusResource : IJsonModel { + private static MigrateMySqlStatusData s_dataDeserializationInstance; + private static MigrateMySqlStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MigrateMySqlStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MigrateMySqlStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); MigrateMySqlStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.Serialization.cs index e964eb842524..85425c2b0786 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/NetworkFeatureResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class NetworkFeatureResource : IJsonModel { + private static NetworkFeatureData s_dataDeserializationInstance; + private static NetworkFeatureData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - NetworkFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + NetworkFeatureData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); NetworkFeatureData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.Serialization.cs index 85828cfda403..c3c2cfb64f97 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/PublishingUserResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class PublishingUserResource : IJsonModel { + private static PublishingUserData s_dataDeserializationInstance; + private static PublishingUserData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublishingUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublishingUserData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PublishingUserData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.Serialization.cs index f2ed67347d43..37b7dafdf821 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteBasicPublishingCredentialsPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class ScmSiteBasicPublishingCredentialsPolicyResource : IJsonModel { + private static CsmPublishingCredentialsPoliciesEntityData s_dataDeserializationInstance; + private static CsmPublishingCredentialsPoliciesEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); CsmPublishingCredentialsPoliciesEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.Serialization.cs index c143c504f104..a0571c51c239 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/ScmSiteSlotBasicPublishingCredentialsPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class ScmSiteSlotBasicPublishingCredentialsPolicyResource : IJsonModel { + private static CsmPublishingCredentialsPoliciesEntityData s_dataDeserializationInstance; + private static CsmPublishingCredentialsPoliciesEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); CsmPublishingCredentialsPoliciesEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.Serialization.cs index 0a6f1d44e0e5..02b59ae28ff2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteBackupResource : IJsonModel { + private static WebAppBackupData s_dataDeserializationInstance; + private static WebAppBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebAppBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.Serialization.cs index 9fe362ca336c..3d7ef69eb44d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigAppsettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteConfigAppsettingResource : IJsonModel { + private static ApiKeyVaultReferenceData s_dataDeserializationInstance; + private static ApiKeyVaultReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ApiKeyVaultReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.Serialization.cs index 2975ae98e1cb..36798af18b48 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteConfigSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteConfigSnapshotResource : IJsonModel { + private static SiteConfigData s_dataDeserializationInstance; + private static SiteConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs index 7a9b77c51df3..5ece2f447244 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteContainerResource : IJsonModel { + private static SiteContainerData s_dataDeserializationInstance; + private static SiteContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.Serialization.cs index bd105583a0a2..c1c6cc9b9c43 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDeploymentResource : IJsonModel { + private static WebAppDeploymentData s_dataDeserializationInstance; + private static WebAppDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebAppDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebAppDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebAppDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.Serialization.cs index 3b8c0848e677..7afe6f1a58a6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDetectorResource : IJsonModel { + private static AppServiceDetectorData s_dataDeserializationInstance; + private static AppServiceDetectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceDetectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.Serialization.cs index 29472a4bbe34..009783fbaab4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticAnalysisResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDiagnosticAnalysisResource : IJsonModel { + private static WebSiteAnalysisDefinitionData s_dataDeserializationInstance; + private static WebSiteAnalysisDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteAnalysisDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteAnalysisDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteAnalysisDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.Serialization.cs index 47516d591b71..31d23384a542 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDiagnosticDetectorResource : IJsonModel { + private static DetectorDefinitionResourceData s_dataDeserializationInstance; + private static DetectorDefinitionResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DetectorDefinitionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DetectorDefinitionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DetectorDefinitionResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.Serialization.cs index 358366ccd8e9..e9713fbef38b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDiagnosticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDiagnosticResource : IJsonModel { + private static DiagnosticCategoryData s_dataDeserializationInstance; + private static DiagnosticCategoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DiagnosticCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.Serialization.cs index 53a628092612..ce7da19f1628 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteDomainOwnershipIdentifierResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteDomainOwnershipIdentifierResource : IJsonModel { + private static AppServiceIdentifierData s_dataDeserializationInstance; + private static AppServiceIdentifierData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceIdentifierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.Serialization.cs index 41258e7fcf60..f9fd5a90add0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteExtensionResource : IJsonModel { + private static MSDeployStatusData s_dataDeserializationInstance; + private static MSDeployStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); MSDeployStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.Serialization.cs index b943bb41b03a..8cee5be99cd2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteFunctionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteFunctionResource : IJsonModel { + private static FunctionEnvelopeData s_dataDeserializationInstance; + private static FunctionEnvelopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FunctionEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FunctionEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); FunctionEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.Serialization.cs index 95c466531ca5..54f35b687214 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHostNameBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteHostNameBindingResource : IJsonModel { + private static HostNameBindingData s_dataDeserializationInstance; + private static HostNameBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HostNameBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HostNameBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HostNameBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.Serialization.cs index 07ad71d91c4f..399fc571ba9b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteHybridConnectionNamespaceRelayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteHybridConnectionNamespaceRelayResource : IJsonModel { + private static HybridConnectionData s_dataDeserializationInstance; + private static HybridConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HybridConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.Serialization.cs index c03a6939012a..52ecb96b6a34 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteInstanceExtensionResource : IJsonModel { + private static MSDeployStatusData s_dataDeserializationInstance; + private static MSDeployStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); MSDeployStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.Serialization.cs index ba821e065764..2dc23adf9861 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessModuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteInstanceProcessModuleResource : IJsonModel { + private static ProcessModuleInfoData s_dataDeserializationInstance; + private static ProcessModuleInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessModuleInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.Serialization.cs index bd69cae97694..4273a99cced3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceProcessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteInstanceProcessResource : IJsonModel { + private static ProcessInfoData s_dataDeserializationInstance; + private static ProcessInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.Serialization.cs index f1124d09e970..0f4b781446cb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteInstanceResource : IJsonModel { + private static WebSiteInstanceStatusData s_dataDeserializationInstance; + private static WebSiteInstanceStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteInstanceStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteInstanceStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteInstanceStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.Serialization.cs index c33605944209..568811e2292c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteNetworkConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteNetworkConfigResource : IJsonModel { + private static SwiftVirtualNetworkData s_dataDeserializationInstance; + private static SwiftVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SwiftVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SwiftVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SwiftVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.Serialization.cs index 30dd9bd56c57..3cb7348254f2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SitePrivateEndpointConnectionResource : IJsonModel { + private static RemotePrivateEndpointConnectionARMResourceData s_dataDeserializationInstance; + private static RemotePrivateEndpointConnectionARMResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RemotePrivateEndpointConnectionARMResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.Serialization.cs index 7aaff90ebdcb..b98c63b38488 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessModuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteProcessModuleResource : IJsonModel { + private static ProcessModuleInfoData s_dataDeserializationInstance; + private static ProcessModuleInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessModuleInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.Serialization.cs index 38a79d267f91..62f7e044484d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteProcessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteProcessResource : IJsonModel { + private static ProcessInfoData s_dataDeserializationInstance; + private static ProcessInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.Serialization.cs index 1b74421895b9..3f17ff4b53f6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SitePublicCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SitePublicCertificateResource : IJsonModel { + private static PublicCertificateData s_dataDeserializationInstance; + private static PublicCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PublicCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.Serialization.cs index 97dbcfe42363..13c735d917a2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteRecommendationResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteRecommendationResource : IJsonModel { + private static RecommendationRuleData s_dataDeserializationInstance; + private static RecommendationRuleData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RecommendationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RecommendationRuleData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RecommendationRuleData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.Serialization.cs index d5388e9f29ad..9f4a081a9e54 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotBackupResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotBackupResource : IJsonModel { + private static WebAppBackupData s_dataDeserializationInstance; + private static WebAppBackupData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebAppBackupData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebAppBackupData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.Serialization.cs index 7e8119cf09a6..c6cdd8dc2ca9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotConfigSnapshotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotConfigSnapshotResource : IJsonModel { + private static SiteConfigData s_dataDeserializationInstance; + private static SiteConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.Serialization.cs index 052c53f96f85..44bec57f0618 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDeploymentResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDeploymentResource : IJsonModel { + private static WebAppDeploymentData s_dataDeserializationInstance; + private static WebAppDeploymentData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebAppDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebAppDeploymentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebAppDeploymentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.Serialization.cs index e6ce80c5b374..a3229203a228 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDetectorResource : IJsonModel { + private static AppServiceDetectorData s_dataDeserializationInstance; + private static AppServiceDetectorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceDetectorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceDetectorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.Serialization.cs index dfc16a8655f8..d3e00f9ba15d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticAnalysisResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDiagnosticAnalysisResource : IJsonModel { + private static WebSiteAnalysisDefinitionData s_dataDeserializationInstance; + private static WebSiteAnalysisDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteAnalysisDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteAnalysisDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteAnalysisDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.Serialization.cs index 96b904d7f64b..db795fca94c5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticDetectorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDiagnosticDetectorResource : IJsonModel { + private static DetectorDefinitionResourceData s_dataDeserializationInstance; + private static DetectorDefinitionResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DetectorDefinitionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DetectorDefinitionResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DetectorDefinitionResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.Serialization.cs index 6d89e0db5cb3..d1a1b0f325d3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDiagnosticResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDiagnosticResource : IJsonModel { + private static DiagnosticCategoryData s_dataDeserializationInstance; + private static DiagnosticCategoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - DiagnosticCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + DiagnosticCategoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); DiagnosticCategoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.Serialization.cs index 349af8ace4fc..1a75282ea5a7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotDomainOwnershipIdentifierResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotDomainOwnershipIdentifierResource : IJsonModel { + private static AppServiceIdentifierData s_dataDeserializationInstance; + private static AppServiceIdentifierData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceIdentifierData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceIdentifierData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.Serialization.cs index 18d1fb0a9739..5cc1c9297f16 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotExtensionResource : IJsonModel { + private static MSDeployStatusData s_dataDeserializationInstance; + private static MSDeployStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); MSDeployStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.Serialization.cs index ded82f490049..bb7fb48d6878 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotFunctionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotFunctionResource : IJsonModel { + private static FunctionEnvelopeData s_dataDeserializationInstance; + private static FunctionEnvelopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - FunctionEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + FunctionEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); FunctionEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.Serialization.cs index 797bc8166d7e..9013467675a4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHostNameBindingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotHostNameBindingResource : IJsonModel { + private static HostNameBindingData s_dataDeserializationInstance; + private static HostNameBindingData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HostNameBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HostNameBindingData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HostNameBindingData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.Serialization.cs index 430b8cea4ba7..398fdc3ac0fa 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotHybridConnectionNamespaceRelayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotHybridConnectionNamespaceRelayResource : IJsonModel { + private static HybridConnectionData s_dataDeserializationInstance; + private static HybridConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HybridConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); HybridConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.Serialization.cs index 37c6b86c1aef..1a55c6b73d1a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotInstanceExtensionResource : IJsonModel { + private static MSDeployStatusData s_dataDeserializationInstance; + private static MSDeployStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + MSDeployStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); MSDeployStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.Serialization.cs index 303d1a00c37c..f773937152d7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessModuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotInstanceProcessModuleResource : IJsonModel { + private static ProcessModuleInfoData s_dataDeserializationInstance; + private static ProcessModuleInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessModuleInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.Serialization.cs index a720359eab6a..c537d5051a9e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceProcessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotInstanceProcessResource : IJsonModel { + private static ProcessInfoData s_dataDeserializationInstance; + private static ProcessInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.Serialization.cs index 7edffcec341f..3fb598d712d4 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotInstanceResource : IJsonModel { + private static WebSiteInstanceStatusData s_dataDeserializationInstance; + private static WebSiteInstanceStatusData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteInstanceStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteInstanceStatusData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteInstanceStatusData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.Serialization.cs index b5a4ff8dd8d2..f365223531ec 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotNetworkConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotNetworkConfigResource : IJsonModel { + private static SwiftVirtualNetworkData s_dataDeserializationInstance; + private static SwiftVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SwiftVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SwiftVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SwiftVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.Serialization.cs index af858f70d8f6..79a149c4d9a5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotPrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotPrivateEndpointConnectionResource : IJsonModel { + private static RemotePrivateEndpointConnectionARMResourceData s_dataDeserializationInstance; + private static RemotePrivateEndpointConnectionARMResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RemotePrivateEndpointConnectionARMResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.Serialization.cs index f800f2dbf57d..4b4dfadaea26 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessModuleResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotProcessModuleResource : IJsonModel { + private static ProcessModuleInfoData s_dataDeserializationInstance; + private static ProcessModuleInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessModuleInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessModuleInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.Serialization.cs index 8d29cb971967..8a08c13a92ce 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotProcessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotProcessResource : IJsonModel { + private static ProcessInfoData s_dataDeserializationInstance; + private static ProcessInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ProcessInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ProcessInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs index 19645e399338..a9c0373c2d7c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotSiteContainerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotSiteContainerResource : IJsonModel { + private static SiteContainerData s_dataDeserializationInstance; + private static SiteContainerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteContainerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteContainerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.Serialization.cs index f77558839f43..cf1fa4a741cd 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotVirtualNetworkConnectionGatewayResource : IJsonModel { + private static AppServiceVirtualNetworkGatewayData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.Serialization.cs index 28dc2a8314fe..bc8e173eb4c7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotVirtualNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotVirtualNetworkConnectionResource : IJsonModel { + private static AppServiceVirtualNetworkData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs index a151efaed853..275bae5d5948 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteSlotWorkflowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteSlotWorkflowResource : IJsonModel { + private static WorkflowEnvelopeData s_dataDeserializationInstance; + private static WorkflowEnvelopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.Serialization.cs index 1480fcf0a3b9..cb6785670228 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionGatewayResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteVirtualNetworkConnectionGatewayResource : IJsonModel { + private static AppServiceVirtualNetworkGatewayData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkGatewayData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkGatewayData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkGatewayData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.Serialization.cs index 06f4a097353b..51eb21b340fb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteVirtualNetworkConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteVirtualNetworkConnectionResource : IJsonModel { + private static AppServiceVirtualNetworkData s_dataDeserializationInstance; + private static AppServiceVirtualNetworkData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + AppServiceVirtualNetworkData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); AppServiceVirtualNetworkData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs index 6e217fda3608..f65a063ad24d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SiteWorkflowResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SiteWorkflowResource : IJsonModel { + private static WorkflowEnvelopeData s_dataDeserializationInstance; + private static WorkflowEnvelopeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowEnvelopeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowEnvelopeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.Serialization.cs index 8b51f68488d7..93f4ee846c8a 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/SlotConfigNamesResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class SlotConfigNamesResource : IJsonModel { + private static SlotConfigNamesResourceData s_dataDeserializationInstance; + private static SlotConfigNamesResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SlotConfigNamesResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SlotConfigNamesResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SlotConfigNamesResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs index cfa8f8e831e7..b68fd945570e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBasicAuthPropertyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteBasicAuthPropertyResource : IJsonModel { + private static StaticSiteBasicAuthPropertyData s_dataDeserializationInstance; + private static StaticSiteBasicAuthPropertyData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteBasicAuthPropertyData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteBasicAuthPropertyData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs index a37e615bec59..8c4e1292b980 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildDatabaseConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteBuildDatabaseConnectionResource : IJsonModel { + private static StaticSiteDatabaseConnectionData s_dataDeserializationInstance; + private static StaticSiteDatabaseConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs index caa08a0711c1..d2391c060777 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildLinkedBackendResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteBuildLinkedBackendResource : IJsonModel { + private static StaticSiteLinkedBackendData s_dataDeserializationInstance; + private static StaticSiteLinkedBackendData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.Serialization.cs index 30895404906c..7cd0354442e7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteBuildResource : IJsonModel { + private static StaticSiteBuildData s_dataDeserializationInstance; + private static StaticSiteBuildData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteBuildData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteBuildData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.Serialization.cs index b9132b1bed8d..5c0e4a57b5d1 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteBuildUserProvidedFunctionAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteBuildUserProvidedFunctionAppResource : IJsonModel { + private static StaticSiteUserProvidedFunctionAppData s_dataDeserializationInstance; + private static StaticSiteUserProvidedFunctionAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteUserProvidedFunctionAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteUserProvidedFunctionAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteUserProvidedFunctionAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.Serialization.cs index 91aa408fe81d..c568226363cb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteCustomDomainOverviewResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteCustomDomainOverviewResource : IJsonModel { + private static StaticSiteCustomDomainOverviewData s_dataDeserializationInstance; + private static StaticSiteCustomDomainOverviewData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteCustomDomainOverviewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteCustomDomainOverviewData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteCustomDomainOverviewData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs index 4a7eb3f2724c..7f3c1a0d51d3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteDatabaseConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteDatabaseConnectionResource : IJsonModel { + private static StaticSiteDatabaseConnectionData s_dataDeserializationInstance; + private static StaticSiteDatabaseConnectionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteDatabaseConnectionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteDatabaseConnectionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs index f4a56a5cd097..3c6c2087f4a3 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteLinkedBackendResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteLinkedBackendResource : IJsonModel { + private static StaticSiteLinkedBackendData s_dataDeserializationInstance; + private static StaticSiteLinkedBackendData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteLinkedBackendData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteLinkedBackendData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.Serialization.cs index e929072abda4..d08575b09a21 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSitePrivateEndpointConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSitePrivateEndpointConnectionResource : IJsonModel { + private static RemotePrivateEndpointConnectionARMResourceData s_dataDeserializationInstance; + private static RemotePrivateEndpointConnectionARMResourceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RemotePrivateEndpointConnectionARMResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RemotePrivateEndpointConnectionARMResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.Serialization.cs index 420e041498e7..66a841ffe300 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteResource : IJsonModel { + private static StaticSiteData s_dataDeserializationInstance; + private static StaticSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.Serialization.cs index 6e6da184867c..d856b6634d38 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/StaticSiteUserProvidedFunctionAppResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class StaticSiteUserProvidedFunctionAppResource : IJsonModel { + private static StaticSiteUserProvidedFunctionAppData s_dataDeserializationInstance; + private static StaticSiteUserProvidedFunctionAppData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - StaticSiteUserProvidedFunctionAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + StaticSiteUserProvidedFunctionAppData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); StaticSiteUserProvidedFunctionAppData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.Serialization.cs index 79c4e1c14ded..e049fe20a6a5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/TopLevelDomainResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class TopLevelDomainResource : IJsonModel { + private static TopLevelDomainData s_dataDeserializationInstance; + private static TopLevelDomainData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TopLevelDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TopLevelDomainData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); TopLevelDomainData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs index 317a3bc82fa3..23a73cbe5016 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebAppRequestHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebAppRequestHistoryResource : IJsonModel { + private static WebAppRequestHistoryData s_dataDeserializationInstance; + private static WebAppRequestHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebAppRequestHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebAppRequestHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.Serialization.cs index 3e809886d8e1..fd10e2cd8701 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigConnectionStringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteConfigConnectionStringResource : IJsonModel { + private static ApiKeyVaultReferenceData s_dataDeserializationInstance; + private static ApiKeyVaultReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ApiKeyVaultReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.Serialization.cs index ee80b5c4c3be..1e866a02229f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteConfigResource : IJsonModel { + private static SiteConfigData s_dataDeserializationInstance; + private static SiteConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.Serialization.cs index 914132732204..1bb33622bf8f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteContinuousWebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteContinuousWebJobResource : IJsonModel { + private static ContinuousWebJobData s_dataDeserializationInstance; + private static ContinuousWebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContinuousWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContinuousWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ContinuousWebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.Serialization.cs index 29f8aaee6222..6c94969af84e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteExtensionResource : IJsonModel { + private static SiteExtensionInfoData s_dataDeserializationInstance; + private static SiteExtensionInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteExtensionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteExtensionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteExtensionInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.Serialization.cs index b3dafba89dfd..64f85a46a369 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteFtpPublishingCredentialsPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteFtpPublishingCredentialsPolicyResource : IJsonModel { + private static CsmPublishingCredentialsPoliciesEntityData s_dataDeserializationInstance; + private static CsmPublishingCredentialsPoliciesEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); CsmPublishingCredentialsPoliciesEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.Serialization.cs index 9390dcc0219b..e6f41b73d283 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteHybridConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteHybridConnectionResource : IJsonModel { + private static RelayServiceConnectionEntityData s_dataDeserializationInstance; + private static RelayServiceConnectionEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayServiceConnectionEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayServiceConnectionEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RelayServiceConnectionEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.Serialization.cs index 1674cbd792ec..f9a630fe59eb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePremierAddonResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSitePremierAddonResource : IJsonModel { + private static PremierAddOnData s_dataDeserializationInstance; + private static PremierAddOnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PremierAddOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PremierAddOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PremierAddOnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.Serialization.cs index aa0ccd588c1a..db3475eb8672 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSitePrivateAccessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSitePrivateAccessResource : IJsonModel { + private static PrivateAccessData s_dataDeserializationInstance; + private static PrivateAccessData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PrivateAccessData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.Serialization.cs index 2a9be3fff76e..07de54e8bcbc 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteResource : IJsonModel { + private static WebSiteData s_dataDeserializationInstance; + private static WebSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.Serialization.cs index a2b7b3accf01..b3a3dd1241e6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteResourceHealthMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteResourceHealthMetadataResource : IJsonModel { + private static ResourceHealthMetadataData s_dataDeserializationInstance; + private static ResourceHealthMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ResourceHealthMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.Serialization.cs index 9e01bde37b67..0c92bcef1cc5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigAppSettingResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotConfigAppSettingResource : IJsonModel { + private static ApiKeyVaultReferenceData s_dataDeserializationInstance; + private static ApiKeyVaultReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ApiKeyVaultReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.Serialization.cs index 4b333ce4cb68..c6dedc99e14b 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigConnectionStringResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotConfigConnectionStringResource : IJsonModel { + private static ApiKeyVaultReferenceData s_dataDeserializationInstance; + private static ApiKeyVaultReferenceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ApiKeyVaultReferenceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ApiKeyVaultReferenceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.Serialization.cs index 8fb227e352ac..6b5fd9268105 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotConfigResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotConfigResource : IJsonModel { + private static SiteConfigData s_dataDeserializationInstance; + private static SiteConfigData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteConfigData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteConfigData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.Serialization.cs index 22976d3b168f..769f6b92f617 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotContinuousWebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotContinuousWebJobResource : IJsonModel { + private static ContinuousWebJobData s_dataDeserializationInstance; + private static ContinuousWebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ContinuousWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ContinuousWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ContinuousWebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.Serialization.cs index 219d70a907ef..4599ad208bd2 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotExtensionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotExtensionResource : IJsonModel { + private static SiteExtensionInfoData s_dataDeserializationInstance; + private static SiteExtensionInfoData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteExtensionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteExtensionInfoData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteExtensionInfoData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.Serialization.cs index 95716ecc7e52..955d4d474bd9 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotFtpPublishingCredentialsPolicyResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotFtpPublishingCredentialsPolicyResource : IJsonModel { + private static CsmPublishingCredentialsPoliciesEntityData s_dataDeserializationInstance; + private static CsmPublishingCredentialsPoliciesEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + CsmPublishingCredentialsPoliciesEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); CsmPublishingCredentialsPoliciesEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.Serialization.cs index 822ecf779ffa..df7222c4149d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotHybridConnectionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotHybridConnectionResource : IJsonModel { + private static RelayServiceConnectionEntityData s_dataDeserializationInstance; + private static RelayServiceConnectionEntityData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - RelayServiceConnectionEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + RelayServiceConnectionEntityData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); RelayServiceConnectionEntityData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.Serialization.cs index 551b36e3bacb..bee1dfc90a08 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPremierAddOnResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotPremierAddOnResource : IJsonModel { + private static PremierAddOnData s_dataDeserializationInstance; + private static PremierAddOnData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PremierAddOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PremierAddOnData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PremierAddOnData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.Serialization.cs index e3419fa859c7..26c947dc9f9e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPrivateAccessResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotPrivateAccessResource : IJsonModel { + private static PrivateAccessData s_dataDeserializationInstance; + private static PrivateAccessData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PrivateAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PrivateAccessData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PrivateAccessData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.Serialization.cs index 46ad97863433..088674768cbf 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotPublicCertificateResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotPublicCertificateResource : IJsonModel { + private static PublicCertificateData s_dataDeserializationInstance; + private static PublicCertificateData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - PublicCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + PublicCertificateData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); PublicCertificateData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.Serialization.cs index 820638b65301..cb71e645d1ad 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotResource : IJsonModel { + private static WebSiteData s_dataDeserializationInstance; + private static WebSiteData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebSiteData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebSiteData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.Serialization.cs index 1bcb345fda44..fb048c84bd4e 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotResourceHealthMetadataResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotResourceHealthMetadataResource : IJsonModel { + private static ResourceHealthMetadataData s_dataDeserializationInstance; + private static ResourceHealthMetadataData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - ResourceHealthMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + ResourceHealthMetadataData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); ResourceHealthMetadataData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.Serialization.cs index a7f6bd718d8e..8877efb7f336 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotSourceControlResource : IJsonModel { + private static SiteSourceControlData s_dataDeserializationInstance; + private static SiteSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.Serialization.cs index e8f71176443e..78ed401698cb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotTriggeredWebJobHistoryResource : IJsonModel { + private static TriggeredJobHistoryData s_dataDeserializationInstance; + private static TriggeredJobHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TriggeredJobHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TriggeredJobHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); TriggeredJobHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.Serialization.cs index 1f8b5004b5e7..442c54708c71 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotTriggeredWebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotTriggeredWebJobResource : IJsonModel { + private static TriggeredWebJobData s_dataDeserializationInstance; + private static TriggeredWebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TriggeredWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TriggeredWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); TriggeredWebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.Serialization.cs index aa5b999215ec..e33aebb7909f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSlotWebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSlotWebJobResource : IJsonModel { + private static WebJobData s_dataDeserializationInstance; + private static WebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.Serialization.cs index 6f2d408e55e5..1ac92ba78158 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteSourceControlResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteSourceControlResource : IJsonModel { + private static SiteSourceControlData s_dataDeserializationInstance; + private static SiteSourceControlData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SiteSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SiteSourceControlData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); SiteSourceControlData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.Serialization.cs index 2ce5716823c8..10c6e2ba829f 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredWebJobHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteTriggeredWebJobHistoryResource : IJsonModel { + private static TriggeredJobHistoryData s_dataDeserializationInstance; + private static TriggeredJobHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TriggeredJobHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TriggeredJobHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); TriggeredJobHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.Serialization.cs index bd6fc57cf5b1..9f6ce968db6d 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteTriggeredwebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteTriggeredwebJobResource : IJsonModel { + private static TriggeredWebJobData s_dataDeserializationInstance; + private static TriggeredWebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - TriggeredWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + TriggeredWebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); TriggeredWebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.Serialization.cs index 56c87df84fa8..9011f4fea621 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WebSiteWebJobResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WebSiteWebJobResource : IJsonModel { + private static WebJobData s_dataDeserializationInstance; + private static WebJobData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WebJobData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WebJobData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs index 7444f5811402..b4d28917fb54 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionRepetitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowRunActionRepetitionResource : IJsonModel { + private static WorkflowRunActionRepetitionDefinitionData s_dataDeserializationInstance; + private static WorkflowRunActionRepetitionDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs index 77b19c0e30aa..b9070c0c9fa0 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowRunActionResource : IJsonModel { + private static WorkflowRunActionData s_dataDeserializationInstance; + private static WorkflowRunActionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowRunActionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowRunActionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs index b3f008e49f44..d6f090facb96 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunActionScopeRepetitionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowRunActionScopeRepetitionResource : IJsonModel { + private static WorkflowRunActionRepetitionDefinitionData s_dataDeserializationInstance; + private static WorkflowRunActionRepetitionDefinitionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowRunActionRepetitionDefinitionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowRunActionRepetitionDefinitionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs index 95c8f4ee89f8..db18f40e632c 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowRunResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowRunResource : IJsonModel { + private static WorkflowRunData s_dataDeserializationInstance; + private static WorkflowRunData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowRunData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowRunData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs index 5c53522465f7..26f3861954f8 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerHistoryResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowTriggerHistoryResource : IJsonModel { + private static WorkflowTriggerHistoryData s_dataDeserializationInstance; + private static WorkflowTriggerHistoryData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowTriggerHistoryData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowTriggerHistoryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs index f509aceb4afe..1d91b783f447 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowTriggerResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowTriggerResource : IJsonModel { + private static WorkflowTriggerData s_dataDeserializationInstance; + private static WorkflowTriggerData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowTriggerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowTriggerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs index aae9034936a6..40683e304f85 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/WorkflowVersionResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.AppService { public partial class WorkflowVersionResource : IJsonModel { + private static WorkflowVersionData s_dataDeserializationInstance; + private static WorkflowVersionData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WorkflowVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerAppServiceContext.Default); WorkflowVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerAppServiceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs index c45e86501e03..fb18764df5fe 100644 --- a/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs +++ b/sdk/weightsandbiases/Azure.ResourceManager.WeightsAndBiases/src/Generated/WeightsAndBiasesInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WeightsAndBiases { public partial class WeightsAndBiasesInstanceResource : IJsonModel { + private static WeightsAndBiasesInstanceData s_dataDeserializationInstance; + private static WeightsAndBiasesInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - WeightsAndBiasesInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + WeightsAndBiasesInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWeightsAndBiasesContext.Default); WeightsAndBiasesInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWeightsAndBiasesContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorResource.Serialization.cs b/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorResource.Serialization.cs index 9fd90cfc08f9..41dfe7e2c6d2 100644 --- a/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorResource.Serialization.cs +++ b/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadMonitor { public partial class HealthMonitorResource : IJsonModel { + private static HealthMonitorData s_dataDeserializationInstance; + private static HealthMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadMonitorContext.Default); HealthMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorStateChangeResource.Serialization.cs b/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorStateChangeResource.Serialization.cs index eb3c4d73af66..0c1bdbd3dd6e 100644 --- a/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorStateChangeResource.Serialization.cs +++ b/sdk/workloadmonitor/Azure.ResourceManager.WorkloadMonitor/src/Generated/HealthMonitorStateChangeResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadMonitor { public partial class HealthMonitorStateChangeResource : IJsonModel { + private static HealthMonitorStateChangeData s_dataDeserializationInstance; + private static HealthMonitorStateChangeData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - HealthMonitorStateChangeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + HealthMonitorStateChangeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadMonitorContext.Default); HealthMonitorStateChangeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadMonitorContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.Serialization.cs index 9c961c83f62a..6b224bcabca4 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapApplicationServerInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapApplicationServerInstanceResource : IJsonModel { + private static SapApplicationServerInstanceData s_dataDeserializationInstance; + private static SapApplicationServerInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.Serialization.cs index aa31964e4bff..d5d533daa2e8 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapCentralServerInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapCentralServerInstanceResource : IJsonModel { + private static SapCentralServerInstanceData s_dataDeserializationInstance; + private static SapCentralServerInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.Serialization.cs index af3a421121f6..31257c8948c2 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapDatabaseInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapDatabaseInstanceResource : IJsonModel { + private static SapDatabaseInstanceData s_dataDeserializationInstance; + private static SapDatabaseInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.Serialization.cs index ac833d06cc0f..a0a94cdafba5 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapLandscapeMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapLandscapeMonitorResource : IJsonModel { + private static SapLandscapeMonitorData s_dataDeserializationInstance; + private static SapLandscapeMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapLandscapeMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapLandscapeMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapLandscapeMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.Serialization.cs index f84cd3346a6d..f9d655b9b6cf 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapMonitorResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapMonitorResource : IJsonModel { + private static SapMonitorData s_dataDeserializationInstance; + private static SapMonitorData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapMonitorData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapMonitorData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.Serialization.cs index e09cb4c45f00..4bb04e60d92b 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapProviderInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapProviderInstanceResource : IJsonModel { + private static SapProviderInstanceData s_dataDeserializationInstance; + private static SapProviderInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapProviderInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapProviderInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapProviderInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.Serialization.cs b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.Serialization.cs index 86b8192f0704..c3af553ea441 100644 --- a/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.Serialization.cs +++ b/sdk/workloads/Azure.ResourceManager.Workloads/src/Generated/SapVirtualInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.Workloads { public partial class SapVirtualInstanceResource : IJsonModel { + private static SapVirtualInstanceData s_dataDeserializationInstance; + private static SapVirtualInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsContext.Default); SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapApplicationServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapApplicationServerInstanceResource.Serialization.cs index 4fa136549547..6a47de9c371b 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapApplicationServerInstanceResource.Serialization.cs +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapApplicationServerInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadsSapVirtualInstance { public partial class SapApplicationServerInstanceResource : IJsonModel { + private static SapApplicationServerInstanceData s_dataDeserializationInstance; + private static SapApplicationServerInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapApplicationServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); SapApplicationServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapCentralServerInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapCentralServerInstanceResource.Serialization.cs index ca1bdc3ffa2c..b2edaeef2ae2 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapCentralServerInstanceResource.Serialization.cs +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapCentralServerInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadsSapVirtualInstance { public partial class SapCentralServerInstanceResource : IJsonModel { + private static SapCentralServerInstanceData s_dataDeserializationInstance; + private static SapCentralServerInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapCentralServerInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); SapCentralServerInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapDatabaseInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapDatabaseInstanceResource.Serialization.cs index 0a85b49fcabc..318167c014ef 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapDatabaseInstanceResource.Serialization.cs +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapDatabaseInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadsSapVirtualInstance { public partial class SapDatabaseInstanceResource : IJsonModel { + private static SapDatabaseInstanceData s_dataDeserializationInstance; + private static SapDatabaseInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapDatabaseInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); SapDatabaseInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } } diff --git a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapVirtualInstanceResource.Serialization.cs b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapVirtualInstanceResource.Serialization.cs index c25da7c938f0..c78254672495 100644 --- a/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapVirtualInstanceResource.Serialization.cs +++ b/sdk/workloadssapvirtualinstance/Azure.ResourceManager.WorkloadsSapVirtualInstance/src/Generated/SapVirtualInstanceResource.Serialization.cs @@ -13,14 +13,17 @@ namespace Azure.ResourceManager.WorkloadsSapVirtualInstance { public partial class SapVirtualInstanceResource : IJsonModel { + private static SapVirtualInstanceData s_dataDeserializationInstance; + private static SapVirtualInstanceData DataDeserializationInstance => s_dataDeserializationInstance ??= new(); + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); - SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + SapVirtualInstanceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)DataDeserializationInstance).Create(ref reader, options); BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); SapVirtualInstanceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerWorkloadsSapVirtualInstanceContext.Default); - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)DataDeserializationInstance).GetFormatFromOptions(options); } }